diff options
1460 files changed, 66200 insertions, 31904 deletions
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 59c4dc4020..61696b5e53 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -176,7 +176,7 @@ License: OFL-1.1 Files: ./thirdparty/freetype/ Comment: The FreeType Project -Copyright: 1996-2021, David Turner, Robert Wilhelm, and Werner Lemberg. +Copyright: 1996-2022, David Turner, Robert Wilhelm, and Werner Lemberg. License: FTL Files: ./thirdparty/glslang/ @@ -365,8 +365,8 @@ License: Apache-2.0 Files: ./thirdparty/pcre2/ Comment: PCRE2 -Copyright: 1997-2021, University of Cambridge - 2009-2021, Zoltan Herczeg +Copyright: 1997-2022, University of Cambridge + 2009-2022, Zoltan Herczeg License: BSD-3-clause Files: ./thirdparty/recastnavigation/ diff --git a/core/config/engine.cpp b/core/config/engine.cpp index ff8a8d283f..782d369ae6 100644 --- a/core/config/engine.cpp +++ b/core/config/engine.cpp @@ -208,9 +208,9 @@ void Engine::add_singleton(const Singleton &p_singleton) { } Object *Engine::get_singleton_object(const StringName &p_name) const { - const Map<StringName, Object *>::Element *E = singleton_ptrs.find(p_name); + HashMap<StringName, Object *>::ConstIterator E = singleton_ptrs.find(p_name); ERR_FAIL_COND_V_MSG(!E, nullptr, "Failed to retrieve non-existent singleton '" + String(p_name) + "'."); - return E->get(); + return E->value; } bool Engine::is_singleton_user_created(const StringName &p_name) const { diff --git a/core/config/engine.h b/core/config/engine.h index eac96852b3..82e3ee5487 100644 --- a/core/config/engine.h +++ b/core/config/engine.h @@ -69,7 +69,7 @@ private: bool _in_physics = false; List<Singleton> singletons; - Map<StringName, Object *> singleton_ptrs; + HashMap<StringName, Object *> singleton_ptrs; bool editor_hint = false; bool project_manager_hint = false; diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index ba108d75da..ff5ff83bf8 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -331,7 +331,7 @@ struct _VCSort { void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const { _THREAD_SAFE_METHOD_ - Set<_VCSort> vclist; + RBSet<_VCSort> vclist; for (const KeyValue<StringName, VariantContainer> &E : props) { const VariantContainer *v = &E.value; @@ -360,8 +360,8 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const { vclist.insert(vc); } - for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) { - String prop_info_name = E->get().name; + for (const _VCSort &E : vclist) { + String prop_info_name = E.name; int dot = prop_info_name.find("."); if (dot != -1 && !custom_prop_info.has(prop_info_name)) { prop_info_name = prop_info_name.substr(0, dot); @@ -369,11 +369,11 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const { if (custom_prop_info.has(prop_info_name)) { PropertyInfo pi = custom_prop_info[prop_info_name]; - pi.name = E->get().name; - pi.usage = E->get().flags; + pi.name = E.name; + pi.usage = E.flags; p_list->push_back(pi); } else { - p_list->push_back(PropertyInfo(E->get().type, E->get().name, PROPERTY_HINT_NONE, "", E->get().flags)); + p_list->push_back(PropertyInfo(E.type, E.name, PROPERTY_HINT_NONE, "", E.flags)); } } } @@ -764,7 +764,7 @@ Error ProjectSettings::save() { return error; } -Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) { +Error ProjectSettings::_save_settings_binary(const String &p_file, const RBMap<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) { Error err; Ref<FileAccess> file = FileAccess::open(p_file, FileAccess::WRITE, &err); ERR_FAIL_COND_V_MSG(err != OK, err, "Couldn't save project.binary at " + p_file + "."); @@ -800,19 +800,20 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str file->store_32(count); //store how many properties are saved } - for (Map<String, List<String>>::Element *E = props.front(); E; E = E->next()) { - for (String &key : E->get()) { - if (!E->key().is_empty()) { - key = E->key() + "/" + key; + for (const KeyValue<String, List<String>> &E : props) { + for (const String &key : E.value) { + String k = key; + if (!E.key.is_empty()) { + k = E.key + "/" + k; } Variant value; - if (p_custom.has(key)) { - value = p_custom[key]; + if (p_custom.has(k)) { + value = p_custom[k]; } else { - value = get(key); + value = get(k); } - file->store_pascal_string(key); + file->store_pascal_string(k); int len; err = encode_variant(value, nullptr, len, true); @@ -831,7 +832,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str return OK; } -Error ProjectSettings::_save_settings_text(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) { +Error ProjectSettings::_save_settings_text(const String &p_file, const RBMap<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) { Error err; Ref<FileAccess> file = FileAccess::open(p_file, FileAccess::WRITE, &err); @@ -852,18 +853,18 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin } file->store_string("\n"); - for (const Map<String, List<String>>::Element *E = props.front(); E; E = E->next()) { - if (E != props.front()) { + for (const KeyValue<String, List<String>> &E : props) { + if (E.key != props.begin()->key) { file->store_string("\n"); } - if (!E->key().is_empty()) { - file->store_string("[" + E->key() + "]\n\n"); + if (!E.key.is_empty()) { + file->store_string("[" + E.key + "]\n\n"); } - for (const String &F : E->get()) { + for (const String &F : E.value) { String key = F; - if (!E->key().is_empty()) { - key = E->key() + "/" + key; + if (!E.key.is_empty()) { + key = E.key + "/" + key; } Variant value; if (p_custom.has(key)) { @@ -917,7 +918,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust project_features = _trim_to_supported_features(project_features); set_setting("application/config/features", project_features); - Set<_VCSort> vclist; + RBSet<_VCSort> vclist; if (p_merge_with_current) { for (const KeyValue<StringName, VariantContainer> &G : props) { @@ -946,21 +947,21 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust for (const KeyValue<String, Variant> &E : p_custom) { // Lookup global prop to store in the same order - Map<StringName, VariantContainer>::Element *global_prop = props.find(E.key); + RBMap<StringName, VariantContainer>::Iterator global_prop = props.find(E.key); _VCSort vc; vc.name = E.key; - vc.order = global_prop ? global_prop->get().order : 0xFFFFFFF; + vc.order = global_prop ? global_prop->value.order : 0xFFFFFFF; vc.type = E.value.get_type(); vc.flags = PROPERTY_USAGE_STORAGE; vclist.insert(vc); } - Map<String, List<String>> props; + RBMap<String, List<String>> props; - for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) { - String category = E->get().name; - String name = E->get().name; + for (const _VCSort &E : vclist) { + String category = E.name; + String name = E.name; int div = category.find("/"); @@ -1051,7 +1052,7 @@ void ProjectSettings::set_custom_property_info(const String &p_prop, const Prope custom_prop_info[p_prop].name = p_prop; } -const Map<StringName, PropertyInfo> &ProjectSettings::get_custom_property_info() const { +const HashMap<StringName, PropertyInfo> &ProjectSettings::get_custom_property_info() const { return custom_prop_info; } diff --git a/core/config/project_settings.h b/core/config/project_settings.h index 8655526edd..bacc8adc54 100644 --- a/core/config/project_settings.h +++ b/core/config/project_settings.h @@ -34,14 +34,14 @@ #include "core/object/class_db.h" #include "core/os/thread_safe.h" #include "core/templates/hash_map.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" class ProjectSettings : public Object { GDCLASS(ProjectSettings, Object); _THREAD_SAFE_CLASS_ public: - typedef Map<String, Variant> CustomMap; + typedef HashMap<String, Variant> CustomMap; static const String PROJECT_DATA_DIR_NAME_SUFFIX; enum { @@ -84,15 +84,15 @@ protected: int last_builtin_order = 0; uint64_t last_save_time = 0; - Map<StringName, VariantContainer> props; + RBMap<StringName, VariantContainer> props; // NOTE: Key order is used e.g. in the save_custom method. String resource_path; - Map<StringName, PropertyInfo> custom_prop_info; + HashMap<StringName, PropertyInfo> custom_prop_info; bool disable_feature_overrides = false; bool using_datapack = false; List<String> input_presets; - Set<String> custom_features; - Map<StringName, StringName> feature_overrides; + RBSet<String> custom_features; + HashMap<StringName, StringName> feature_overrides; HashMap<StringName, AutoloadInfo> autoloads; @@ -108,8 +108,8 @@ protected: Error _load_settings_binary(const String &p_path); Error _load_settings_text_or_binary(const String &p_text_path, const String &p_bin_path); - Error _save_settings_text(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); - Error _save_settings_binary(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); + Error _save_settings_text(const String &p_file, const RBMap<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); + Error _save_settings_binary(const String &p_file, const RBMap<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); Error _save_custom_bnd(const String &p_file); @@ -168,7 +168,7 @@ public: Error save_custom(const String &p_path = "", const CustomMap &p_custom = CustomMap(), const Vector<String> &p_custom_features = Vector<String>(), bool p_merge_with_current = true); Error save(); void set_custom_property_info(const String &p_prop, const PropertyInfo &p_info); - const Map<StringName, PropertyInfo> &get_custom_property_info() const; + const HashMap<StringName, PropertyInfo> &get_custom_property_info() const; uint64_t get_last_saved_time() { return last_save_time; } Vector<String> get_optimizer_presets() const; diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 7c3cbfe48d..194c7fdefd 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -439,7 +439,7 @@ void OS::print_resources_by_type(const Vector<String> &p_types) { print_line(vformat("Resources currently in use for the following types: %s", p_types)); - Map<String, int> type_count; + RBMap<String, int> type_count; List<Ref<Resource>> resources; ResourceCache::get_cached_resources(&resources); diff --git a/core/core_bind.h b/core/core_bind.h index 76313dc1a8..e4d15d5c9d 100644 --- a/core/core_bind.h +++ b/core/core_bind.h @@ -680,8 +680,8 @@ public: class EngineDebugger : public Object { GDCLASS(EngineDebugger, Object); - Map<StringName, Callable> captures; - Map<StringName, Ref<EngineProfiler>> profilers; + HashMap<StringName, Callable> captures; + HashMap<StringName, Ref<EngineProfiler>> profilers; protected: static void _bind_methods(); diff --git a/core/debugger/engine_debugger.cpp b/core/debugger/engine_debugger.cpp index 54760d8d65..263c75760b 100644 --- a/core/debugger/engine_debugger.cpp +++ b/core/debugger/engine_debugger.cpp @@ -39,9 +39,9 @@ EngineDebugger *EngineDebugger::singleton = nullptr; ScriptDebugger *EngineDebugger::script_debugger = nullptr; -Map<StringName, EngineDebugger::Profiler> EngineDebugger::profilers; -Map<StringName, EngineDebugger::Capture> EngineDebugger::captures; -Map<String, EngineDebugger::CreatePeerFunc> EngineDebugger::protocols; +HashMap<StringName, EngineDebugger::Profiler> EngineDebugger::profilers; +HashMap<StringName, EngineDebugger::Capture> EngineDebugger::captures; +HashMap<String, EngineDebugger::CreatePeerFunc> EngineDebugger::protocols; void EngineDebugger::register_profiler(const StringName &p_name, const Profiler &p_func) { ERR_FAIL_COND_MSG(profilers.has(p_name), "Profiler already registered: " + p_name); diff --git a/core/debugger/engine_debugger.h b/core/debugger/engine_debugger.h index fdfa41c9cc..a8a791f9b0 100644 --- a/core/debugger/engine_debugger.h +++ b/core/debugger/engine_debugger.h @@ -33,7 +33,7 @@ #include "core/string/string_name.h" #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/hash_map.h" #include "core/templates/vector.h" #include "core/variant/array.h" #include "core/variant/variant.h" @@ -96,9 +96,9 @@ protected: static EngineDebugger *singleton; static ScriptDebugger *script_debugger; - static Map<StringName, Profiler> profilers; - static Map<StringName, Capture> captures; - static Map<String, CreatePeerFunc> protocols; + static HashMap<StringName, Profiler> profilers; + static HashMap<StringName, Capture> captures; + static HashMap<String, CreatePeerFunc> protocols; public: _FORCE_INLINE_ static EngineDebugger *get_singleton() { return singleton; } diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp index 4ed4c97c64..f378ba94c3 100644 --- a/core/debugger/local_debugger.cpp +++ b/core/debugger/local_debugger.cpp @@ -241,14 +241,14 @@ void LocalDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) { } else if (line.begins_with("br") || line.begins_with("break")) { if (line.get_slice_count(" ") <= 1) { - const Map<int, Set<StringName>> &breakpoints = script_debugger->get_breakpoints(); + const HashMap<int, RBSet<StringName>> &breakpoints = script_debugger->get_breakpoints(); if (breakpoints.size() == 0) { print_line("No Breakpoints."); continue; } print_line("Breakpoint(s): " + itos(breakpoints.size())); - for (const KeyValue<int, Set<StringName>> &E : breakpoints) { + for (const KeyValue<int, RBSet<StringName>> &E : breakpoints) { print_line("\t" + String(E.value.front()->get()) + ":" + itos(E.key)); } diff --git a/core/debugger/local_debugger.h b/core/debugger/local_debugger.h index ecd805a6cb..c687214c65 100644 --- a/core/debugger/local_debugger.h +++ b/core/debugger/local_debugger.h @@ -42,7 +42,7 @@ private: ScriptsProfiler *scripts_profiler = nullptr; String target_function; - Map<String, String> options; + HashMap<String, String> options; Pair<String, int> to_breakpoint(const String &p_line); void print_variables(const List<String> &names, const List<Variant> &values, const String &variable_prefix); diff --git a/core/debugger/script_debugger.cpp b/core/debugger/script_debugger.cpp index 4dd93249ef..1efa7f7690 100644 --- a/core/debugger/script_debugger.cpp +++ b/core/debugger/script_debugger.cpp @@ -50,7 +50,7 @@ int ScriptDebugger::get_depth() const { void ScriptDebugger::insert_breakpoint(int p_line, const StringName &p_source) { if (!breakpoints.has(p_line)) { - breakpoints[p_line] = Set<StringName>(); + breakpoints[p_line] = RBSet<StringName>(); } breakpoints[p_line].insert(p_source); } diff --git a/core/debugger/script_debugger.h b/core/debugger/script_debugger.h index feb6702b54..a5a72d7c54 100644 --- a/core/debugger/script_debugger.h +++ b/core/debugger/script_debugger.h @@ -33,8 +33,8 @@ #include "core/object/script_language.h" #include "core/string/string_name.h" -#include "core/templates/map.h" -#include "core/templates/set.h" +#include "core/templates/rb_map.h" +#include "core/templates/rb_set.h" #include "core/templates/vector.h" class ScriptDebugger { @@ -44,7 +44,7 @@ class ScriptDebugger { int depth = -1; bool skip_breakpoints = false; - Map<int, Set<StringName>> breakpoints; + HashMap<int, RBSet<StringName>> breakpoints; ScriptLanguage *break_lang = nullptr; Vector<StackInfo> error_stack_info; @@ -66,7 +66,7 @@ public: bool is_breakpoint(int p_line, const StringName &p_source) const; bool is_breakpoint_line(int p_line) const; void clear_breakpoints(); - const Map<int, Set<StringName>> &get_breakpoints() const { return breakpoints; } + const HashMap<int, RBSet<StringName>> &get_breakpoints() const { return breakpoints; } void debug(ScriptLanguage *p_lang, bool p_can_continue = true, bool p_is_error_breakpoint = false); ScriptLanguage *get_break_language() const; diff --git a/core/doc_data.h b/core/doc_data.h index 194a39a729..af20b717d7 100644 --- a/core/doc_data.h +++ b/core/doc_data.h @@ -32,7 +32,7 @@ #define DOC_DATA_H #include "core/io/xml_parser.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/variant.h" struct ScriptMemberInfo { @@ -161,7 +161,7 @@ public: Vector<MethodDoc> operators; Vector<MethodDoc> signals; Vector<ConstantDoc> constants; - Map<String, String> enums; + HashMap<String, String> enums; Vector<PropertyDoc> properties; Vector<ThemeItemDoc> theme_properties; bool is_script_doc = false; diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp index 4d5dc7958c..9e8addf8aa 100644 --- a/core/extension/extension_api_dump.cpp +++ b/core/extension/extension_api_dump.cpp @@ -334,7 +334,7 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() { { // Global enums and constants. Array constants; - Map<String, List<Pair<String, int>>> enum_list; + HashMap<String, List<Pair<String, int>>> enum_list; for (int i = 0; i < CoreConstants::get_global_constant_count(); i++) { int value = CoreConstants::get_global_constant_value(i); diff --git a/core/extension/native_extension.h b/core/extension/native_extension.h index af5a474e79..8f106f753d 100644 --- a/core/extension/native_extension.h +++ b/core/extension/native_extension.h @@ -45,7 +45,7 @@ class NativeExtension : public Resource { ObjectNativeExtension native_extension; }; - Map<StringName, Extension> extension_classes; + HashMap<StringName, Extension> extension_classes; static void _register_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs); static void _register_extension_class_method(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info); diff --git a/core/extension/native_extension_manager.cpp b/core/extension/native_extension_manager.cpp index 5436f7d51e..186fcc44f6 100644 --- a/core/extension/native_extension_manager.cpp +++ b/core/extension/native_extension_manager.cpp @@ -90,9 +90,9 @@ Vector<String> NativeExtensionManager::get_loaded_extensions() const { return ret; } Ref<NativeExtension> NativeExtensionManager::get_extension(const String &p_path) { - Map<String, Ref<NativeExtension>>::Element *E = native_extension_map.find(p_path); + HashMap<String, Ref<NativeExtension>>::Iterator E = native_extension_map.find(p_path); ERR_FAIL_COND_V(!E, Ref<NativeExtension>()); - return E->get(); + return E->value; } void NativeExtensionManager::initialize_extensions(NativeExtension::InitializationLevel p_level) { diff --git a/core/extension/native_extension_manager.h b/core/extension/native_extension_manager.h index b8339e4817..5594f6c0de 100644 --- a/core/extension/native_extension_manager.h +++ b/core/extension/native_extension_manager.h @@ -37,7 +37,7 @@ class NativeExtensionManager : public Object { GDCLASS(NativeExtensionManager, Object); int32_t level = -1; - Map<String, Ref<NativeExtension>> native_extension_map; + HashMap<String, Ref<NativeExtension>> native_extension_map; static void _bind_methods(); diff --git a/core/input/input.cpp b/core/input/input.cpp index 3a2e50a674..4befdfac58 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -227,8 +227,8 @@ Input::VelocityTrack::VelocityTrack() { bool Input::is_anything_pressed() const { _THREAD_SAFE_METHOD_ - for (Map<StringName, Input::Action>::Element *E = action_state.front(); E; E = E->next()) { - if (E->get().pressed) { + for (const KeyValue<StringName, Input::Action> &E : action_state) { + if (E.value.pressed) { return true; } } @@ -272,65 +272,65 @@ bool Input::is_action_pressed(const StringName &p_action, bool p_exact) const { bool Input::is_action_just_pressed(const StringName &p_action, bool p_exact) const { ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), false, InputMap::get_singleton()->suggest_actions(p_action)); - const Map<StringName, Action>::Element *E = action_state.find(p_action); + HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); if (!E) { return false; } - if (p_exact && E->get().exact == false) { + if (p_exact && E->value.exact == false) { return false; } if (Engine::get_singleton()->is_in_physics_frame()) { - return E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames(); + return E->value.pressed && E->value.physics_frame == Engine::get_singleton()->get_physics_frames(); } else { - return E->get().pressed && E->get().process_frame == Engine::get_singleton()->get_process_frames(); + return E->value.pressed && E->value.process_frame == Engine::get_singleton()->get_process_frames(); } } bool Input::is_action_just_released(const StringName &p_action, bool p_exact) const { ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), false, InputMap::get_singleton()->suggest_actions(p_action)); - const Map<StringName, Action>::Element *E = action_state.find(p_action); + HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); if (!E) { return false; } - if (p_exact && E->get().exact == false) { + if (p_exact && E->value.exact == false) { return false; } if (Engine::get_singleton()->is_in_physics_frame()) { - return !E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames(); + return !E->value.pressed && E->value.physics_frame == Engine::get_singleton()->get_physics_frames(); } else { - return !E->get().pressed && E->get().process_frame == Engine::get_singleton()->get_process_frames(); + return !E->value.pressed && E->value.process_frame == Engine::get_singleton()->get_process_frames(); } } float Input::get_action_strength(const StringName &p_action, bool p_exact) const { ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), 0.0, InputMap::get_singleton()->suggest_actions(p_action)); - const Map<StringName, Action>::Element *E = action_state.find(p_action); + HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); if (!E) { return 0.0f; } - if (p_exact && E->get().exact == false) { + if (p_exact && E->value.exact == false) { return 0.0f; } - return E->get().strength; + return E->value.strength; } float Input::get_action_raw_strength(const StringName &p_action, bool p_exact) const { - const Map<StringName, Action>::Element *E = action_state.find(p_action); + HashMap<StringName, Action>::ConstIterator E = action_state.find(p_action); if (!E) { return 0.0f; } - if (p_exact && E->get().exact == false) { + if (p_exact && E->value.exact == false) { return 0.0f; } - return E->get().raw_strength; + return E->value.raw_strength; } float Input::get_axis(const StringName &p_negative_action, const StringName &p_positive_action) const { @@ -1403,12 +1403,12 @@ String Input::get_joy_guid(int p_device) const { Array Input::get_connected_joypads() { Array ret; - Map<int, Joypad>::Element *elem = joy_names.front(); + HashMap<int, Joypad>::Iterator elem = joy_names.begin(); while (elem) { - if (elem->get().connected) { - ret.push_back(elem->key()); + if (elem->value.connected) { + ret.push_back(elem->key); } - elem = elem->next(); + ++elem; } return ret; } diff --git a/core/input/input.h b/core/input/input.h index 5a7cb84ece..7bb7889a43 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -82,11 +82,11 @@ public: private: MouseButton mouse_button_mask = MouseButton::NONE; - Set<Key> physical_keys_pressed; - Set<Key> keys_pressed; - Set<JoyButton> joy_buttons_pressed; - Map<JoyAxis, float> _joy_axis; - //Map<StringName,int> custom_action_press; + RBSet<Key> physical_keys_pressed; + RBSet<Key> keys_pressed; + RBSet<JoyButton> joy_buttons_pressed; + RBMap<JoyAxis, float> _joy_axis; + //RBMap<StringName,int> custom_action_press; Vector3 gravity; Vector3 accelerometer; Vector3 magnetometer; @@ -103,7 +103,7 @@ private: float raw_strength; }; - Map<StringName, Action> action_state; + HashMap<StringName, Action> action_state; bool emulate_touch_from_mouse = false; bool emulate_mouse_from_touch = false; @@ -137,8 +137,8 @@ private: }; VelocityTrack mouse_velocity_track; - Map<int, VelocityTrack> touch_velocity_track; - Map<int, Joypad> joy_names; + HashMap<int, VelocityTrack> touch_velocity_track; + HashMap<int, Joypad> joy_names; int fallback_mapping = -1; CursorShape default_shape = CURSOR_ARROW; @@ -231,7 +231,7 @@ protected: uint64_t timestamp; }; - Map<int, VibrationInfo> joy_vibration; + HashMap<int, VibrationInfo> joy_vibration; static void _bind_methods(); diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 51c1cf9608..942c5248df 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -691,12 +691,12 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins_with_featur return default_builtin_with_overrides_cache; } - HashMap<String, List<Ref<InputEvent>>> builtins = get_builtins(); + const HashMap<String, List<Ref<InputEvent>>> &builtins = get_builtins(); // Get a list of all built in inputs which are valid overrides for the OS // Key = builtin name (e.g. ui_accept) // Value = override/feature names (e.g. macos, if it was defined as "ui_accept.macos" and the platform supports that feature) - Map<String, Vector<String>> builtins_with_overrides; + HashMap<String, Vector<String>> builtins_with_overrides; for (const KeyValue<String, List<Ref<InputEvent>>> &E : builtins) { String fullname = E.key; diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp index 943dc72307..499d001234 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -32,13 +32,13 @@ #include "core/config/project_settings.h" #include "core/io/dir_access.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" -static Map<String, Vector<uint8_t>> *files = nullptr; +static HashMap<String, Vector<uint8_t>> *files = nullptr; void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) { if (!files) { - files = memnew((Map<String, Vector<uint8_t>>)); + files = memnew((HashMap<String, Vector<uint8_t>>)); } String name; @@ -84,11 +84,11 @@ Error FileAccessMemory::_open(const String &p_path, int p_mode_flags) { String name = fix_path(p_path); //name = DirAccess::normalize_path(name); - Map<String, Vector<uint8_t>>::Element *E = files->find(name); + HashMap<String, Vector<uint8_t>>::Iterator E = files->find(name); ERR_FAIL_COND_V_MSG(!E, ERR_FILE_NOT_FOUND, "Can't find file '" + p_path + "'."); - data = E->get().ptrw(); - length = E->get().size(); + data = E->value.ptrw(); + length = E->value.size(); pos = 0; return OK; diff --git a/core/io/file_access_network.h b/core/io/file_access_network.h index 214d391c95..c7431752c0 100644 --- a/core/io/file_access_network.h +++ b/core/io/file_access_network.h @@ -52,7 +52,7 @@ class FileAccessNetworkClient { bool quit = false; Mutex mutex; Mutex blockrequest_mutex; - Map<int, FileAccessNetwork *> accesses; + HashMap<int, FileAccessNetwork *> accesses; Ref<StreamPeerTCP> client; int32_t last_id = 0; int32_t lockcount = 0; diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index ba120de68b..595a6e9873 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -406,8 +406,8 @@ Error DirAccessPack::list_dir_begin() { list_dirs.push_back(E.key); } - for (Set<String>::Element *E = current->files.front(); E; E = E->next()) { - list_files.push_back(E->get()); + for (const String &E : current->files) { + list_files.push_back(E); } return OK; diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index 17e87c835a..404ad38c96 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -35,8 +35,8 @@ #include "core/io/file_access.h" #include "core/string/print_string.h" #include "core/templates/list.h" -#include "core/templates/map.h" -#include "core/templates/set.h" +#include "core/templates/rb_map.h" +#include "core/templates/rb_set.h" // Godot's packed file magic header ("GDPC" in ASCII). #define PACK_HEADER_MAGIC 0x43504447 @@ -72,23 +72,20 @@ private: struct PackedDir { PackedDir *parent = nullptr; String name; - Map<String, PackedDir *> subdirs; - Set<String> files; + HashMap<String, PackedDir *> subdirs; + RBSet<String> files; }; struct PathMD5 { uint64_t a = 0; uint64_t b = 0; - bool operator<(const PathMD5 &p_md5) const { - if (p_md5.a == a) { - return b < p_md5.b; - } else { - return a < p_md5.a; - } - } - bool operator==(const PathMD5 &p_md5) const { - return a == p_md5.a && b == p_md5.b; + bool operator==(const PathMD5 &p_val) const { + return (a == p_val.a) && (b == p_val.b); + } + static uint32_t hash(const PathMD5 &p_val) { + uint32_t h = hash_djb2_one_32(p_val.a); + return hash_djb2_one_32(p_val.b, h); } PathMD5() {} @@ -99,7 +96,7 @@ private: } }; - Map<PathMD5, PackedFile> files; + HashMap<PathMD5, PackedFile, PathMD5> files; Vector<PackSource *> sources; @@ -186,15 +183,15 @@ public: Ref<FileAccess> PackedData::try_open_path(const String &p_path) { PathMD5 pmd5(p_path.md5_buffer()); - Map<PathMD5, PackedFile>::Element *E = files.find(pmd5); + HashMap<PathMD5, PackedFile, PathMD5>::Iterator E = files.find(pmd5); if (!E) { return nullptr; //not found } - if (E->get().offset == 0) { + if (E->value.offset == 0) { return nullptr; //was erased } - return E->get().src->get_file(p_path, &E->get()); + return E->value.src->get_file(p_path, &E->value); } bool PackedData::has_path(const String &p_path) { diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h index ae58d99a66..6ea603546a 100644 --- a/core/io/file_access_zip.h +++ b/core/io/file_access_zip.h @@ -34,7 +34,7 @@ #ifdef MINIZIP_ENABLED #include "core/io/file_access_pack.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "thirdparty/minizip/unzip.h" @@ -55,7 +55,7 @@ private: }; Vector<Package> packages; - Map<String, File> files; + HashMap<String, File> files; static ZipArchive *instance; diff --git a/core/io/image.cpp b/core/io/image.cpp index 671a000e2c..dfba45c4e9 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -1944,12 +1944,15 @@ Vector<uint8_t> Image::get_data() const { } void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_format) { - ERR_FAIL_COND_MSG(p_width <= 0, "Image width must be greater than 0."); - ERR_FAIL_COND_MSG(p_height <= 0, "Image height must be greater than 0."); - ERR_FAIL_COND_MSG(p_width > MAX_WIDTH, "Image width cannot be greater than " + itos(MAX_WIDTH) + "."); - ERR_FAIL_COND_MSG(p_height > MAX_HEIGHT, "Image height cannot be greater than " + itos(MAX_HEIGHT) + "."); - ERR_FAIL_COND_MSG(p_width * p_height > MAX_PIXELS, "Too many pixels for image, maximum is " + itos(MAX_PIXELS)); - ERR_FAIL_INDEX_MSG(p_format, FORMAT_MAX, "Image format out of range, please see Image's Format enum."); + ERR_FAIL_COND_MSG(p_width <= 0, "The Image width specified (" + itos(p_width) + " pixels) must be greater than 0 pixels."); + ERR_FAIL_COND_MSG(p_height <= 0, "The Image height specified (" + itos(p_height) + " pixels) must be greater than 0 pixels."); + ERR_FAIL_COND_MSG(p_width > MAX_WIDTH, + "The Image width specified (" + itos(p_width) + " pixels) cannot be greater than " + itos(MAX_WIDTH) + "pixels."); + ERR_FAIL_COND_MSG(p_height > MAX_HEIGHT, + "The Image height specified (" + itos(p_height) + " pixels) cannot be greater than " + itos(MAX_HEIGHT) + "pixels."); + ERR_FAIL_COND_MSG(p_width * p_height > MAX_PIXELS, + "Too many pixels for Image. Maximum is " + itos(MAX_WIDTH) + "x" + itos(MAX_HEIGHT) + " = " + itos(MAX_PIXELS) + "pixels."); + ERR_FAIL_INDEX_MSG(p_format, FORMAT_MAX, "The Image format specified (" + itos(p_format) + ") is out of range. See Image's Format enum."); int mm = 0; int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0); @@ -1967,17 +1970,34 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma } void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) { - ERR_FAIL_COND_MSG(p_width <= 0, "Image width must be greater than 0."); - ERR_FAIL_COND_MSG(p_height <= 0, "Image height must be greater than 0."); - ERR_FAIL_COND_MSG(p_width > MAX_WIDTH, "Image width cannot be greater than " + itos(MAX_WIDTH) + "."); - ERR_FAIL_COND_MSG(p_height > MAX_HEIGHT, "Image height cannot be greater than " + itos(MAX_HEIGHT) + "."); - ERR_FAIL_COND_MSG(p_width * p_height > MAX_PIXELS, "Too many pixels for image, maximum is " + itos(MAX_PIXELS)); - ERR_FAIL_INDEX_MSG(p_format, FORMAT_MAX, "Image format out of range, please see Image's Format enum."); + ERR_FAIL_COND_MSG(p_width <= 0, "The Image width specified (" + itos(p_width) + " pixels) must be greater than 0 pixels."); + ERR_FAIL_COND_MSG(p_height <= 0, "The Image height specified (" + itos(p_height) + " pixels) must be greater than 0 pixels."); + ERR_FAIL_COND_MSG(p_width > MAX_WIDTH, + "The Image width specified (" + itos(p_width) + " pixels) cannot be greater than " + itos(MAX_WIDTH) + " pixels."); + ERR_FAIL_COND_MSG(p_height > MAX_HEIGHT, + "The Image height specified (" + itos(p_height) + " pixels) cannot be greater than " + itos(MAX_HEIGHT) + " pixels."); + ERR_FAIL_COND_MSG(p_width * p_height > MAX_PIXELS, + "Too many pixels for Image. Maximum is " + itos(MAX_WIDTH) + "x" + itos(MAX_HEIGHT) + " = " + itos(MAX_PIXELS) + "pixels ."); + ERR_FAIL_INDEX_MSG(p_format, FORMAT_MAX, "The Image format specified (" + itos(p_format) + ") is out of range. See Image's Format enum."); int mm; int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0); - ERR_FAIL_COND_MSG(p_data.size() != size, "Expected data size of " + itos(size) + " bytes in Image::create(), got instead " + itos(p_data.size()) + " bytes."); + if (unlikely(p_data.size() != size)) { + String description_mipmaps; + if (p_use_mipmaps) { + const int num_mipmaps = get_image_required_mipmaps(p_width, p_height, p_format); + if (num_mipmaps != 1) { + description_mipmaps = vformat("with %d mipmaps", num_mipmaps); + } else { + description_mipmaps = "with 1 mipmap"; + } + } else { + description_mipmaps = "without mipmaps"; + } + const String description = vformat("%dx%dx%d (%s)", p_width, p_height, get_format_pixel_size(p_format), description_mipmaps); + ERR_FAIL_MSG(vformat("Expected Image data size of %s = %d bytes, got %d bytes instead.", description, size, p_data.size())); + } height = p_height; width = p_width; diff --git a/core/io/ip.cpp b/core/io/ip.cpp index 5156a5cb99..25e3bef5fc 100644 --- a/core/io/ip.cpp +++ b/core/io/ip.cpp @@ -267,7 +267,7 @@ Array IP::_get_local_addresses() const { Array IP::_get_local_interfaces() const { Array results; - Map<String, Interface_Info> interfaces; + HashMap<String, Interface_Info> interfaces; get_local_interfaces(&interfaces); for (KeyValue<String, Interface_Info> &E : interfaces) { Interface_Info &c = E.value; @@ -289,7 +289,7 @@ Array IP::_get_local_interfaces() const { } void IP::get_local_addresses(List<IPAddress> *r_addresses) const { - Map<String, Interface_Info> interfaces; + HashMap<String, Interface_Info> interfaces; get_local_interfaces(&interfaces); for (const KeyValue<String, Interface_Info> &E : interfaces) { for (const IPAddress &F : E.value.ip_addresses) { diff --git a/core/io/ip.h b/core/io/ip.h index 06ff8a4d70..4d83515e2b 100644 --- a/core/io/ip.h +++ b/core/io/ip.h @@ -92,7 +92,7 @@ public: virtual void _resolve_hostname(List<IPAddress> &r_addresses, const String &p_hostname, Type p_type = TYPE_ANY) const = 0; Array get_resolve_item_addresses(ResolverID p_id) const; - virtual void get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const = 0; + virtual void get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const = 0; void erase_resolve_item(ResolverID p_id); void clear_cache(const String &p_hostname = ""); diff --git a/core/io/json.cpp b/core/io/json.cpp index 4b745dff44..b3a9762e75 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -55,7 +55,7 @@ String JSON::_make_indent(const String &p_indent, int p_size) { return indent_text; } -String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, Set<const void *> &p_markers, bool p_full_precision) { +String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, RBSet<const void *> &p_markers, bool p_full_precision) { String colon = ":"; String end_statement = ""; @@ -529,7 +529,7 @@ Error JSON::_parse_string(const String &p_json, Variant &r_ret, String &r_err_st } String JSON::stringify(const Variant &p_var, const String &p_indent, bool p_sort_keys, bool p_full_precision) { - Set<const void *> markers; + RBSet<const void *> markers; return _stringify(p_var, p_indent, 0, p_sort_keys, markers, p_full_precision); } diff --git a/core/io/json.h b/core/io/json.h index ed251938ec..f883d3963a 100644 --- a/core/io/json.h +++ b/core/io/json.h @@ -70,7 +70,7 @@ class JSON : public RefCounted { static const char *tk_name[]; static String _make_indent(const String &p_indent, int p_size); - static String _stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, Set<const void *> &p_markers, bool p_full_precision = false); + static String _stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, RBSet<const void *> &p_markers, bool p_full_precision = false); static Error _get_token(const char32_t *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str); static Error _parse_value(Variant &value, Token &token, const char32_t *p_str, int &index, int p_len, int &line, String &r_err_str); static Error _parse_array(Array &array, const char32_t *p_str, int &index, int p_len, int &line, String &r_err_str); diff --git a/core/io/logger.cpp b/core/io/logger.cpp index c19fc2820b..925bfdbd02 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -128,7 +128,7 @@ void RotatedFileLogger::clear_old_backups() { da->list_dir_begin(); String f = da->get_next(); - Set<String> backups; + RBSet<String> backups; while (!f.is_empty()) { if (!da->current_is_dir() && f.begins_with(basename) && f.get_extension() == extension && f != base_path.get_file()) { backups.insert(f); @@ -141,7 +141,7 @@ void RotatedFileLogger::clear_old_backups() { // since backups are appended with timestamp and Set iterates them in sorted order, // first backups are the oldest int to_delete = backups.size() - max_backups; - for (Set<String>::Element *E = backups.front(); E && to_delete > 0; E = E->next(), --to_delete) { + for (RBSet<String>::Element *E = backups.front(); E && to_delete > 0; E = E->next(), --to_delete) { da->remove(E->get()); } } diff --git a/core/io/packed_data_container.cpp b/core/io/packed_data_container.cpp index 027fdd51aa..a456318148 100644 --- a/core/io/packed_data_container.cpp +++ b/core/io/packed_data_container.cpp @@ -210,7 +210,7 @@ Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, b } } -uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpdata, Map<String, uint32_t> &string_cache) { +uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpdata, HashMap<String, uint32_t> &string_cache) { switch (p_data.get_type()) { case Variant::STRING: { String s = p_data; @@ -321,7 +321,7 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd Error PackedDataContainer::pack(const Variant &p_data) { Vector<uint8_t> tmpdata; - Map<String, uint32_t> string_cache; + HashMap<String, uint32_t> string_cache; _pack(p_data, tmpdata, string_cache); datalen = tmpdata.size(); data.resize(tmpdata.size()); diff --git a/core/io/packed_data_container.h b/core/io/packed_data_container.h index f042b364ee..73c215aed8 100644 --- a/core/io/packed_data_container.h +++ b/core/io/packed_data_container.h @@ -50,7 +50,7 @@ class PackedDataContainer : public Resource { Vector<uint8_t> data; int datalen = 0; - uint32_t _pack(const Variant &p_data, Vector<uint8_t> &tmpdata, Map<String, uint32_t> &string_cache); + uint32_t _pack(const Variant &p_data, Vector<uint8_t> &tmpdata, HashMap<String, uint32_t> &string_cache); Variant _iter_init_ofs(const Array &p_iter, uint32_t p_offset); Variant _iter_next_ofs(const Array &p_iter, uint32_t p_offset); diff --git a/core/io/resource.cpp b/core/io/resource.cpp index e81382b72e..ad01eb1083 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -193,7 +193,7 @@ void Resource::reload_from_file() { copy_from(s); } -Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache) { +Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache) { List<PropertyInfo> plist; get_property_list(&plist); @@ -228,7 +228,7 @@ Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Res return r; } -void Resource::configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache) { +void Resource::configure_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache) { List<PropertyInfo> plist; get_property_list(&plist); @@ -317,8 +317,8 @@ void Resource::unregister_owner(Object *p_owner) { } void Resource::notify_change_to_owners() { - for (Set<ObjectID>::Element *E = owners.front(); E; E = E->next()) { - Object *obj = ObjectDB::get_instance(E->get()); + for (const ObjectID &E : owners) { + Object *obj = ObjectDB::get_instance(E); ERR_CONTINUE_MSG(!obj, "Object was deleted, while still owning a resource."); //wtf //TODO store string obj->call("resource_changed", Ref<Resource>(this)); @@ -532,7 +532,7 @@ void ResourceCache::dump(const char *p_file, bool p_short) { #ifdef DEBUG_ENABLED lock.read_lock(); - Map<String, int> type_count; + HashMap<String, int> type_count; Ref<FileAccess> f; if (p_file) { diff --git a/core/io/resource.h b/core/io/resource.h index 43ae104da5..53c828f9cd 100644 --- a/core/io/resource.h +++ b/core/io/resource.h @@ -54,7 +54,7 @@ public: virtual String get_base_extension() const { return "res"; } private: - Set<ObjectID> owners; + RBSet<ObjectID> owners; friend class ResBase; friend class ResourceCache; @@ -111,8 +111,8 @@ public: String get_scene_unique_id() const; virtual Ref<Resource> duplicate(bool p_subresources = false) const; - Ref<Resource> duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache); - void configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache); + Ref<Resource> duplicate_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache); + void configure_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &remap_cache); void set_local_to_scene(bool p_enable); bool is_local_to_scene() const; diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 3c854bbbe5..cf87869a32 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1130,7 +1130,7 @@ void ResourceFormatLoaderBinary::get_dependencies(const String &p_path, List<Str loader.get_dependencies(f, p_dependencies, p_add_types); } -Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, const Map<String, String> &p_map) { +Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(f.is_null(), ERR_CANT_OPEN, "Cannot open file '" + p_path + "'."); @@ -1384,7 +1384,7 @@ void ResourceFormatSaverBinaryInstance::_pad_buffer(Ref<FileAccess> f, int p_byt } } -void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const Variant &p_property, Map<Ref<Resource>, int> &resource_map, Map<Ref<Resource>, int> &external_resources, Map<StringName, int> &string_map, const PropertyInfo &p_hint) { +void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const Variant &p_property, HashMap<Ref<Resource>, int> &resource_map, HashMap<Ref<Resource>, int> &external_resources, HashMap<StringName, int> &string_map, const PropertyInfo &p_hint) { switch (p_property.get_type()) { case Variant::NIL: { f->store_32(VARIANT_NIL); @@ -2022,7 +2022,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Re // save internal resource table f->store_32(saved_resources.size()); //amount of internal resources Vector<uint64_t> ofs_pos; - Set<String> used_unique_ids; + RBSet<String> used_unique_ids; for (Ref<Resource> &r : saved_resources) { if (r->is_built_in()) { @@ -2036,7 +2036,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Re } } - Map<Ref<Resource>, int> resource_map; + HashMap<Ref<Resource>, int> resource_map; int res_index = 0; for (Ref<Resource> &r : saved_resources) { if (r->is_built_in()) { diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h index 92d4e4eeaa..db29909dd5 100644 --- a/core/io/resource_format_binary.h +++ b/core/io/resource_format_binary.h @@ -75,12 +75,12 @@ class ResourceLoaderBinary { }; Vector<IntResource> internal_resources; - Map<String, Ref<Resource>> internal_index_cache; + HashMap<String, Ref<Resource>> internal_index_cache; String get_unicode_string(); void _advance_padding(uint32_t p_len); - Map<String, String> remaps; + HashMap<String, String> remaps; Error error = OK; ResourceFormatLoader::CacheMode cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE; @@ -89,7 +89,7 @@ class ResourceLoaderBinary { Error parse_variant(Variant &r_v); - Map<String, Ref<Resource>> dependency_cache; + HashMap<String, Ref<Resource>> dependency_cache; public: void set_local_path(const String &p_local_path); @@ -97,7 +97,7 @@ public: Error load(); void set_translation_remapped(bool p_remapped); - void set_remaps(const Map<String, String> &p_remaps) { remaps = p_remaps; } + void set_remaps(const HashMap<String, String> &p_remaps) { remaps = p_remaps; } void open(Ref<FileAccess> p_f, bool p_no_resources = false, bool p_keep_uuid_paths = false); String recognize(Ref<FileAccess> p_f); void get_dependencies(Ref<FileAccess> p_f, List<String> *p_dependencies, bool p_add_types); @@ -114,7 +114,7 @@ public: virtual String get_resource_type(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); - virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); + virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); }; class ResourceFormatSaverBinaryInstance { @@ -127,7 +127,7 @@ class ResourceFormatSaverBinaryInstance { bool big_endian; bool takeover_paths; String magic; - Set<Ref<Resource>> resource_set; + RBSet<Ref<Resource>> resource_set; struct NonPersistentKey { //for resource properties generated on the fly Ref<Resource> base; @@ -135,11 +135,11 @@ class ResourceFormatSaverBinaryInstance { bool operator<(const NonPersistentKey &p_key) const { return base == p_key.base ? property < p_key.property : base < p_key.base; } }; - Map<NonPersistentKey, Ref<Resource>> non_persistent_map; - Map<StringName, int> string_map; + RBMap<NonPersistentKey, Ref<Resource>> non_persistent_map; + HashMap<StringName, int> string_map; Vector<StringName> strings; - Map<Ref<Resource>, int> external_resources; + HashMap<Ref<Resource>, int> external_resources; List<Ref<Resource>> saved_resources; struct Property { @@ -168,7 +168,7 @@ public: RESERVED_FIELDS = 11 }; Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0); - static void write_variant(Ref<FileAccess> f, const Variant &p_property, Map<Ref<Resource>, int> &resource_map, Map<Ref<Resource>, int> &external_resources, Map<StringName, int> &string_map, const PropertyInfo &p_hint = PropertyInfo()); + static void write_variant(Ref<FileAccess> f, const Variant &p_property, HashMap<Ref<Resource>, int> &resource_map, HashMap<Ref<Resource>, int> &external_resources, HashMap<StringName, int> &string_map, const PropertyInfo &p_hint = PropertyInfo()); }; class ResourceFormatSaverBinary : public ResourceFormatSaver { diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp index 984cf06d2b..5deee9721b 100644 --- a/core/io/resource_importer.cpp +++ b/core/io/resource_importer.cpp @@ -139,7 +139,7 @@ Ref<Resource> ResourceFormatImporter::load(const String &p_path, const String &p } void ResourceFormatImporter::get_recognized_extensions(List<String> *p_extensions) const { - Set<String> found; + RBSet<String> found; for (int i = 0; i < importers.size(); i++) { List<String> local_exts; @@ -159,7 +159,7 @@ void ResourceFormatImporter::get_recognized_extensions_for_type(const String &p_ return; } - Set<String> found; + RBSet<String> found; for (int i = 0; i < importers.size(); i++) { String res_type = importers[i]->get_resource_type(); diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index b3d777847b..0c7909df06 100644 --- a/core/io/resource_importer.h +++ b/core/io/resource_importer.h @@ -134,15 +134,15 @@ public: virtual String get_preset_name(int p_idx) const { return String(); } virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const = 0; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const = 0; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const = 0; virtual String get_option_group_file() const { return String(); } - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) = 0; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) = 0; virtual bool can_import_threaded() const { return true; } virtual void import_threaded_begin() {} virtual void import_threaded_end() {} - virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) { return ERR_UNAVAILABLE; } + virtual Error import_group_file(const String &p_group_file, const HashMap<String, HashMap<StringName, Variant>> &p_source_file_options, const HashMap<String, String> &p_base_paths) { return ERR_UNAVAILABLE; } virtual bool are_import_settings_valid(const String &p_path) const { return true; } virtual String get_import_settings_string() const { return String(); } }; diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index d125dd4e91..fb21db1a19 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -154,7 +154,7 @@ void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> * } } -Error ResourceFormatLoader::rename_dependencies(const String &p_path, const Map<String, String> &p_map) { +Error ResourceFormatLoader::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { Dictionary deps_dict; for (KeyValue<String, String> E : p_map) { deps_dict[E.key] = E.value; @@ -391,8 +391,8 @@ float ResourceLoader::_dependency_get_progress(const String &p_path) { int dep_count = load_task.sub_tasks.size(); if (dep_count > 0) { float dep_progress = 0; - for (Set<String>::Element *E = load_task.sub_tasks.front(); E; E = E->next()) { - dep_progress += _dependency_get_progress(E->get()); + for (const String &E : load_task.sub_tasks) { + dep_progress += _dependency_get_progress(E); } dep_progress /= float(dep_count); dep_progress *= 0.5; @@ -733,7 +733,7 @@ void ResourceLoader::get_dependencies(const String &p_path, List<String> *p_depe } } -Error ResourceLoader::rename_dependencies(const String &p_path, const Map<String, String> &p_map) { +Error ResourceLoader::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { String local_path = _path_remap(_validate_local_path(p_path)); for (int i = 0; i < loader_count; i++) { diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h index ea18ac23fd..e189ad1dff 100644 --- a/core/io/resource_loader.h +++ b/core/io/resource_loader.h @@ -70,7 +70,7 @@ public: virtual String get_resource_type(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); - virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); + virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); virtual bool is_import_valid(const String &p_path) const { return true; } virtual bool is_imported(const String &p_path) const { return false; } virtual int get_import_order(const String &p_path) const { return 0; } @@ -145,7 +145,7 @@ private: bool start_next = true; int requests = 0; int poll_requests = 0; - Set<String> sub_tasks; + RBSet<String> sub_tasks; }; static void _thread_load_function(void *p_userdata); @@ -173,7 +173,7 @@ public: static String get_resource_type(const String &p_path); static ResourceUID::ID get_resource_uid(const String &p_path); static void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); - static Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); + static Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); static bool is_import_valid(const String &p_path); static String get_import_group_file(const String &p_path); static bool is_imported(const String &p_path); diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index 284b4294ea..29aa959e54 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -151,7 +151,7 @@ void AStar3D::connect_points(int p_id, int p_with_id, bool bidirectional) { s.direction = Segment::BIDIRECTIONAL; } - Set<Segment>::Element *element = segments.find(s); + RBSet<Segment>::Element *element = segments.find(s); if (element != nullptr) { s.direction |= element->get().direction; if (s.direction == Segment::BIDIRECTIONAL) { @@ -177,7 +177,7 @@ void AStar3D::disconnect_points(int p_id, int p_with_id, bool bidirectional) { Segment s(p_id, p_with_id); int remove_direction = bidirectional ? (int)Segment::BIDIRECTIONAL : s.direction; - Set<Segment>::Element *element = segments.find(s); + RBSet<Segment>::Element *element = segments.find(s); if (element != nullptr) { // s is the new segment // Erase the directions to be removed @@ -235,7 +235,7 @@ Vector<int> AStar3D::get_point_connections(int p_id) { bool AStar3D::are_points_connected(int p_id, int p_with_id, bool bidirectional) const { Segment s(p_id, p_with_id); - const Set<Segment>::Element *element = segments.find(s); + const RBSet<Segment>::Element *element = segments.find(s); return element != nullptr && (bidirectional || (element->get().direction & s.direction) == s.direction); @@ -293,10 +293,10 @@ Vector3 AStar3D::get_closest_position_in_segment(const Vector3 &p_point) const { real_t closest_dist = 1e20; Vector3 closest_point; - for (const Set<Segment>::Element *E = segments.front(); E; E = E->next()) { + for (const Segment &E : segments) { Point *from_point = nullptr, *to_point = nullptr; - points.lookup(E->get().u, from_point); - points.lookup(E->get().v, to_point); + points.lookup(E.u, from_point); + points.lookup(E.v, to_point); if (!(from_point->enabled && to_point->enabled)) { continue; diff --git a/core/math/a_star.h b/core/math/a_star.h index bb7112fb09..086be839b5 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -112,7 +112,7 @@ class AStar3D : public RefCounted { uint64_t pass = 1; OAHashMap<int, Point *> points; - Set<Segment> segments; + RBSet<Segment> segments; bool _solve(Point *begin_point, Point *end_point); diff --git a/core/math/color.cpp b/core/math/color.cpp index e32f9147d9..74552a2894 100644 --- a/core/math/color.cpp +++ b/core/math/color.cpp @@ -33,7 +33,7 @@ #include "color_names.inc" #include "core/math/math_funcs.h" #include "core/string/print_string.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" uint32_t Color::to_argb32() const { uint32_t c = (uint8_t)Math::round(a * 255); diff --git a/core/math/disjoint_set.h b/core/math/disjoint_set.h index 8657dc068e..d07c08e45e 100644 --- a/core/math/disjoint_set.h +++ b/core/math/disjoint_set.h @@ -31,11 +31,11 @@ #ifndef DISJOINT_SET_H #define DISJOINT_SET_H -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" /* This DisjointSet class uses Find with path compression and Union by rank */ -template <typename T, class C = Comparator<T>, class AL = DefaultAllocator> +template <typename T, class H = HashMapHasherDefault, class C = HashMapComparatorDefault<T>, class AL = DefaultAllocator> class DisjointSet { struct Element { T object; @@ -43,7 +43,7 @@ class DisjointSet { int rank = 0; }; - typedef Map<T, Element *, C, AL> MapT; + typedef HashMap<T, Element *, H, C> MapT; MapT elements; @@ -65,15 +65,15 @@ public: /* FUNCTIONS */ -template <typename T, class C, class AL> -DisjointSet<T, C, AL>::~DisjointSet() { - for (typename MapT::Element *itr = elements.front(); itr != nullptr; itr = itr->next()) { - memdelete_allocator<Element, AL>(itr->value()); +template <typename T, class H, class C, class AL> +DisjointSet<T, H, C, AL>::~DisjointSet() { + for (KeyValue<T, Element *> &E : elements) { + memdelete_allocator<Element, AL>(E.value); } } -template <typename T, class C, class AL> -typename DisjointSet<T, C, AL>::Element *DisjointSet<T, C, AL>::get_parent(Element *element) { +template <typename T, class H, class C, class AL> +typename DisjointSet<T, H, C, AL>::Element *DisjointSet<T, H, C, AL>::get_parent(Element *element) { if (element->parent != element) { element->parent = get_parent(element->parent); } @@ -81,11 +81,11 @@ typename DisjointSet<T, C, AL>::Element *DisjointSet<T, C, AL>::get_parent(Eleme return element->parent; } -template <typename T, class C, class AL> -typename DisjointSet<T, C, AL>::Element *DisjointSet<T, C, AL>::insert_or_get(T object) { - typename MapT::Element *itr = elements.find(object); +template <typename T, class H, class C, class AL> +typename DisjointSet<T, H, C, AL>::Element *DisjointSet<T, H, C, AL>::insert_or_get(T object) { + typename MapT::Iterator itr = elements.find(object); if (itr != nullptr) { - return itr->value(); + return itr->value; } Element *new_element = memnew_allocator(Element, AL); @@ -96,8 +96,8 @@ typename DisjointSet<T, C, AL>::Element *DisjointSet<T, C, AL>::insert_or_get(T return new_element; } -template <typename T, class C, class AL> -void DisjointSet<T, C, AL>::create_union(T a, T b) { +template <typename T, class H, class C, class AL> +void DisjointSet<T, H, C, AL>::create_union(T a, T b) { Element *x = insert_or_get(a); Element *y = insert_or_get(b); @@ -121,28 +121,28 @@ void DisjointSet<T, C, AL>::create_union(T a, T b) { } } -template <typename T, class C, class AL> -void DisjointSet<T, C, AL>::get_representatives(Vector<T> &out_representatives) { - for (typename MapT::Element *itr = elements.front(); itr != nullptr; itr = itr->next()) { - Element *element = itr->value(); +template <typename T, class H, class C, class AL> +void DisjointSet<T, H, C, AL>::get_representatives(Vector<T> &out_representatives) { + for (KeyValue<T, Element *> &E : elements) { + Element *element = E.value; if (element->parent == element) { out_representatives.push_back(element->object); } } } -template <typename T, class C, class AL> -void DisjointSet<T, C, AL>::get_members(Vector<T> &out_members, T representative) { - typename MapT::Element *rep_itr = elements.find(representative); +template <typename T, class H, class C, class AL> +void DisjointSet<T, H, C, AL>::get_members(Vector<T> &out_members, T representative) { + typename MapT::Iterator rep_itr = elements.find(representative); ERR_FAIL_COND(rep_itr == nullptr); - Element *rep_element = rep_itr->value(); + Element *rep_element = rep_itr->value; ERR_FAIL_COND(rep_element->parent != rep_element); - for (typename MapT::Element *itr = elements.front(); itr != nullptr; itr = itr->next()) { - Element *parent = get_parent(itr->value()); + for (KeyValue<T, Element *> &E : elements) { + Element *parent = get_parent(E.value); if (parent == rep_element) { - out_members.push_back(itr->key()); + out_members.push_back(E.key); } } } diff --git a/core/math/geometry_3d.cpp b/core/math/geometry_3d.cpp index f76de079e4..ec96753c79 100644 --- a/core/math/geometry_3d.cpp +++ b/core/math/geometry_3d.cpp @@ -36,7 +36,7 @@ #include "thirdparty/misc/polypartition.h" void Geometry3D::MeshData::optimize_vertices() { - Map<int, int> vtx_remap; + HashMap<int, int> vtx_remap; for (int i = 0; i < faces.size(); i++) { for (int j = 0; j < faces[i].indices.size(); j++) { diff --git a/core/math/octree.h b/core/math/octree.h index 65ab9e2292..8dd103f109 100644 --- a/core/math/octree.h +++ b/core/math/octree.h @@ -36,7 +36,7 @@ #include "core/math/vector3.h" #include "core/string/print_string.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/variant.h" typedef uint32_t OctreeElementID; @@ -151,8 +151,8 @@ private: typename List<PairData *, AL>::Element *eA, *eB; }; - typedef Map<OctreeElementID, Element, Comparator<OctreeElementID>, AL> ElementMap; - typedef Map<PairKey, PairData, Comparator<PairKey>, AL> PairMap; + typedef HashMap<OctreeElementID, Element, Comparator<OctreeElementID>, AL> ElementMap; + typedef HashMap<PairKey, PairData, Comparator<PairKey>, AL> PairMap; ElementMap element_map; PairMap pair_map; diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp index 3614bfadf8..43744deeb0 100644 --- a/core/math/quick_hull.cpp +++ b/core/math/quick_hull.cpp @@ -30,7 +30,7 @@ #include "quick_hull.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" uint32_t QuickHull::debug_stop_after = 0xFFFFFFFF; @@ -52,7 +52,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ Vector<bool> valid_points; valid_points.resize(p_points.size()); - Set<Vector3> valid_cache; + RBSet<Vector3> valid_cache; for (int i = 0; i < p_points.size(); i++) { Vector3 sp = p_points[i].snapped(Vector3(0.0001, 0.0001, 0.0001)); @@ -237,7 +237,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ //find lit faces and lit edges List<List<Face>::Element *> lit_faces; //lit face is a death sentence - Map<Edge, FaceConnect> lit_edges; //create this on the flight, should not be that bad for performance and simplifies code a lot + HashMap<Edge, FaceConnect, Edge> lit_edges; //create this on the flight, should not be that bad for performance and simplifies code a lot for (List<Face>::Element *E = faces.front(); E; E = E->next()) { if (E->get().plane.distance_to(v) > 0) { @@ -248,15 +248,15 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ uint32_t b = E->get().vertices[(i + 1) % 3]; Edge e(a, b); - Map<Edge, FaceConnect>::Element *F = lit_edges.find(e); + HashMap<Edge, FaceConnect, Edge>::Iterator F = lit_edges.find(e); if (!F) { F = lit_edges.insert(e, FaceConnect()); } if (e.vertices[0] == a) { //left - F->get().left = E; + F->value.left = E; } else { - F->get().right = E; + F->value.right = E; } } } @@ -333,7 +333,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ /* CREATE MESHDATA */ //make a map of edges again - Map<Edge, RetFaceConnect> ret_edges; + HashMap<Edge, RetFaceConnect, Edge> ret_edges; List<Geometry3D::MeshData::Face> ret_faces; for (const Face &E : faces) { @@ -351,15 +351,15 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ uint32_t b = E.vertices[(i + 1) % 3]; Edge e(a, b); - Map<Edge, RetFaceConnect>::Element *G = ret_edges.find(e); + HashMap<Edge, RetFaceConnect, Edge>::Iterator G = ret_edges.find(e); if (!G) { G = ret_edges.insert(e, RetFaceConnect()); } if (e.vertices[0] == a) { //left - G->get().left = F; + G->value.left = F; } else { - G->get().right = F; + G->value.right = F; } } } @@ -374,10 +374,10 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ int b = E->get().indices[(i + 1) % f.indices.size()]; Edge e(a, b); - Map<Edge, RetFaceConnect>::Element *F = ret_edges.find(e); + HashMap<Edge, RetFaceConnect, Edge>::Iterator F = ret_edges.find(e); ERR_CONTINUE(!F); - List<Geometry3D::MeshData::Face>::Element *O = F->get().left == E ? F->get().right : F->get().left; + List<Geometry3D::MeshData::Face>::Element *O = F->value.left == E ? F->value.right : F->value.left; ERR_CONTINUE(O == E); ERR_CONTINUE(O == nullptr); @@ -401,13 +401,13 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ } Edge e2(idx, idxn); - Map<Edge, RetFaceConnect>::Element *F2 = ret_edges.find(e2); + HashMap<Edge, RetFaceConnect, Edge>::Iterator F2 = ret_edges.find(e2); ERR_CONTINUE(!F2); //change faceconnect, point to this face instead - if (F2->get().left == O) { - F2->get().left = E; - } else if (F2->get().right == O) { - F2->get().right = E; + if (F2->value.left == O) { + F2->value.left = E; + } else if (F2->value.right == O) { + F2->value.right = E; } } @@ -426,7 +426,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ } } - ret_edges.erase(F); //remove the edge + ret_edges.remove(F); //remove the edge ret_faces.erase(O); //remove the face } } diff --git a/core/math/quick_hull.h b/core/math/quick_hull.h index b8d813c979..1c354880b4 100644 --- a/core/math/quick_hull.h +++ b/core/math/quick_hull.h @@ -34,7 +34,7 @@ #include "core/math/aabb.h" #include "core/math/geometry_3d.h" #include "core/templates/list.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" class QuickHull { public: @@ -44,9 +44,16 @@ public: uint64_t id = 0; }; + static uint32_t hash(const Edge &p_edge) { + return hash_one_uint64(p_edge.id); + } + bool operator<(const Edge &p_edge) const { return id < p_edge.id; } + bool operator==(const Edge &p_edge) const { + return id == p_edge.id; + } Edge(int p_vtx_a = 0, int p_vtx_b = 0) { if (p_vtx_a > p_vtx_b) { diff --git a/core/math/static_raycaster.h b/core/math/static_raycaster.h index 33254399c7..adc81906d7 100644 --- a/core/math/static_raycaster.h +++ b/core/math/static_raycaster.h @@ -102,7 +102,7 @@ public: virtual void add_mesh(const PackedVector3Array &p_vertices, const PackedInt32Array &p_indices, unsigned int p_id) = 0; virtual void commit() = 0; - virtual void set_mesh_filter(const Set<int> &p_mesh_ids) = 0; + virtual void set_mesh_filter(const RBSet<int> &p_mesh_ids) = 0; virtual void clear_mesh_filter() = 0; static Ref<StaticRaycaster> create(); diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp index e146c4a4e3..54461bf70f 100644 --- a/core/math/triangle_mesh.cpp +++ b/core/math/triangle_mesh.cpp @@ -122,7 +122,7 @@ void TriangleMesh::create(const Vector<Vector3> &p_faces) { const Vector3 *r = p_faces.ptr(); Triangle *w = triangles.ptrw(); - Map<Vector3, int> db; + HashMap<Vector3, int> db; for (int i = 0; i < fc; i++) { Triangle &f = w[i]; @@ -131,9 +131,9 @@ void TriangleMesh::create(const Vector<Vector3> &p_faces) { for (int j = 0; j < 3; j++) { int vidx = -1; Vector3 vs = v[j].snapped(Vector3(0.0001, 0.0001, 0.0001)); - Map<Vector3, int>::Element *E = db.find(vs); + HashMap<Vector3, int>::Iterator E = db.find(vs); if (E) { - vidx = E->get(); + vidx = E->value; } else { vidx = db.size(); db[vs] = vidx; diff --git a/core/multiplayer/multiplayer_api.cpp b/core/multiplayer/multiplayer_api.cpp index 3533acd103..9605647b3f 100644 --- a/core/multiplayer/multiplayer_api.cpp +++ b/core/multiplayer/multiplayer_api.cpp @@ -494,8 +494,8 @@ Vector<int> MultiplayerAPI::get_peer_ids() const { ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), Vector<int>(), "No multiplayer peer is assigned. Assume no peers are connected."); Vector<int> ret; - for (Set<int>::Element *E = connected_peers.front(); E; E = E->next()) { - ret.push_back(E->get()); + for (const int &E : connected_peers) { + ret.push_back(E); } return ret; diff --git a/core/multiplayer/multiplayer_api.h b/core/multiplayer/multiplayer_api.h index 9fe67615e3..b93f2acbd3 100644 --- a/core/multiplayer/multiplayer_api.h +++ b/core/multiplayer/multiplayer_api.h @@ -113,7 +113,7 @@ public: private: Ref<MultiplayerPeer> multiplayer_peer; - Set<int> connected_peers; + RBSet<int> connected_peers; int remote_sender_id = 0; int remote_sender_override = 0; @@ -172,7 +172,7 @@ public: bool has_multiplayer_peer() const { return multiplayer_peer.is_valid(); } Vector<int> get_peer_ids() const; - const Set<int> get_connected_peers() const { return connected_peers; } + const RBSet<int> get_connected_peers() const { return connected_peers; } int get_remote_sender_id() const { return remote_sender_override ? remote_sender_override : remote_sender_id; } void set_remote_sender_override(int p_id) { remote_sender_override = p_id; } int get_unique_id() const; diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp index d0fcde832b..d19cbf2642 100644 --- a/core/object/class_db.cpp +++ b/core/object/class_db.cpp @@ -1390,7 +1390,7 @@ void ClassDB::get_extensions_for_type(const StringName &p_class, List<String> *p } HashMap<StringName, HashMap<StringName, Variant>> ClassDB::default_values; -Set<StringName> ClassDB::default_values_cached; +RBSet<StringName> ClassDB::default_values_cached; Variant ClassDB::class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid) { if (!default_values_cached.has(p_class)) { @@ -1492,7 +1492,7 @@ void ClassDB::unregister_extension_class(const StringName &p_class) { classes.erase(p_class); } -Map<StringName, ClassDB::NativeStruct> ClassDB::native_structs; +HashMap<StringName, ClassDB::NativeStruct> ClassDB::native_structs; void ClassDB::register_native_struct(const StringName &p_name, const String &p_code, uint64_t p_current_size) { NativeStruct ns; ns.ccode = p_code; diff --git a/core/object/class_db.h b/core/object/class_db.h index d4e1fc4e76..67b71ab058 100644 --- a/core/object/class_db.h +++ b/core/object/class_db.h @@ -110,10 +110,10 @@ public: #ifdef DEBUG_METHODS_ENABLED List<StringName> constant_order; List<StringName> method_order; - Set<StringName> methods_in_properties; + RBSet<StringName> methods_in_properties; List<MethodInfo> virtual_methods; - Map<StringName, MethodInfo> virtual_methods_map; - Map<StringName, Vector<Error>> method_error_values; + HashMap<StringName, MethodInfo> virtual_methods_map; + HashMap<StringName, Vector<Error>> method_error_values; #endif HashMap<StringName, PropertySetGet> property_setget; @@ -149,14 +149,14 @@ public: static void _add_class2(const StringName &p_class, const StringName &p_inherits); static HashMap<StringName, HashMap<StringName, Variant>> default_values; - static Set<StringName> default_values_cached; + static RBSet<StringName> default_values_cached; // Native structs, used by binder struct NativeStruct { String ccode; // C code to create the native struct, fields separated by ; Arrays accepted (even containing other structs), also function pointers. All types must be Godot types. uint64_t struct_size; // local size of struct, for comparison }; - static Map<StringName, NativeStruct> native_structs; + static HashMap<StringName, NativeStruct> native_structs; private: // Non-locking variants of get_parent_class and is_parent_class. diff --git a/core/object/message_queue.cpp b/core/object/message_queue.cpp index 79c36ac81f..fa1945cf79 100644 --- a/core/object/message_queue.cpp +++ b/core/object/message_queue.cpp @@ -142,9 +142,9 @@ Error MessageQueue::push_callablep(const Callable &p_callable, const Variant **p } void MessageQueue::statistics() { - Map<StringName, int> set_count; - Map<int, int> notify_count; - Map<Callable, int> call_count; + HashMap<StringName, int> set_count; + HashMap<int, int> notify_count; + HashMap<Callable, int> call_count; int null_count = 0; uint32_t read_pos = 0; diff --git a/core/object/object.cpp b/core/object/object.cpp index 797eecd312..0912ea55f0 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -1382,8 +1382,6 @@ bool Object::is_connected(const StringName &p_signal, const Callable &p_callable Callable target = p_callable; return s->slot_map.has(*target.get_base_comparator()); - //const Map<Signal::Target,Signal::Slot>::Element *E = s->slot_map.find(target); - //return (E!=nullptr ); } void Object::disconnect(const StringName &p_signal, const Callable &p_callable) { diff --git a/core/object/object.h b/core/object/object.h index 00cb73593b..ca7b9965f1 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -38,9 +38,9 @@ #include "core/os/spin_lock.h" #include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" +#include "core/templates/rb_set.h" #include "core/templates/safe_refcount.h" -#include "core/templates/set.h" #include "core/templates/vmap.h" #include "core/variant/callable_bind.h" #include "core/variant/variant.h" @@ -510,7 +510,7 @@ private: #ifdef TOOLS_ENABLED bool _edited = false; uint32_t _edited_version = 0; - Set<String> editor_section_folding; + RBSet<String> editor_section_folding; #endif ScriptInstance *script_instance = nullptr; Variant script; // Reference does not exist yet, store it in a Variant. @@ -815,7 +815,7 @@ public: #ifdef TOOLS_ENABLED void editor_set_section_unfold(const String &p_section, bool p_unfolded); bool editor_is_section_unfolded(const String &p_section); - const Set<String> &editor_get_section_folding() const { return editor_section_folding; } + const RBSet<String> &editor_get_section_folding() const { return editor_section_folding; } void editor_clear_section_folding() { editor_section_folding.clear(); } #endif diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index c1036e3413..1546d52fd2 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -93,7 +93,7 @@ Array Script::_get_script_signal_list() { Dictionary Script::_get_script_constant_map() { Dictionary ret; - Map<StringName, Variant> map; + HashMap<StringName, Variant> map; get_constants(&map); for (const KeyValue<StringName, Variant> &E : map) { ret[E.key] = E.value; @@ -474,8 +474,8 @@ bool PlaceHolderScriptInstance::has_method(const StringName &p_method) const { return false; } -void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, const Map<StringName, Variant> &p_values) { - Set<StringName> new_values; +void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, const HashMap<StringName, Variant> &p_values) { + RBSet<StringName> new_values; for (const PropertyInfo &E : p_properties) { StringName n = E.name; new_values.insert(n); @@ -490,16 +490,16 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c properties = p_properties; List<StringName> to_remove; - for (Map<StringName, Variant>::Element *E = values.front(); E; E = E->next()) { - if (!new_values.has(E->key())) { - to_remove.push_back(E->key()); + for (KeyValue<StringName, Variant> &E : values) { + if (!new_values.has(E.key)) { + to_remove.push_back(E.key); } Variant defval; - if (script->get_property_default_value(E->key(), defval)) { + if (script->get_property_default_value(E.key, defval)) { //remove because it's the same as the default value - if (defval == E->get()) { - to_remove.push_back(E->key()); + if (defval == E.value) { + to_remove.push_back(E.key); } } } @@ -520,10 +520,10 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid) { if (script->is_placeholder_fallback_enabled()) { - Map<StringName, Variant>::Element *E = values.find(p_name); + HashMap<StringName, Variant>::Iterator E = values.find(p_name); if (E) { - E->value() = p_value; + E->value = p_value; } else { values.insert(p_name, p_value); } @@ -547,13 +547,13 @@ void PlaceHolderScriptInstance::property_set_fallback(const StringName &p_name, Variant PlaceHolderScriptInstance::property_get_fallback(const StringName &p_name, bool *r_valid) { if (script->is_placeholder_fallback_enabled()) { - const Map<StringName, Variant>::Element *E = values.find(p_name); + HashMap<StringName, Variant>::ConstIterator E = values.find(p_name); if (E) { if (r_valid) { *r_valid = true; } - return E->value(); + return E->value; } E = constants.find(p_name); @@ -561,7 +561,7 @@ Variant PlaceHolderScriptInstance::property_get_fallback(const StringName &p_nam if (r_valid) { *r_valid = true; } - return E->value(); + return E->value; } } diff --git a/core/object/script_language.h b/core/object/script_language.h index bd87427eaf..b1481a372e 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -34,8 +34,8 @@ #include "core/doc_data.h" #include "core/io/resource.h" #include "core/multiplayer/multiplayer.h" -#include "core/templates/map.h" #include "core/templates/pair.h" +#include "core/templates/rb_map.h" class ScriptLanguage; @@ -154,8 +154,8 @@ public: virtual int get_member_line(const StringName &p_member) const { return -1; } - virtual void get_constants(Map<StringName, Variant> *p_constants) {} - virtual void get_members(Set<StringName> *p_constants) {} + virtual void get_constants(HashMap<StringName, Variant> *p_constants) {} + virtual void get_members(RBSet<StringName> *p_constants) {} virtual bool is_placeholder_fallback_enabled() const { return false; } @@ -283,7 +283,7 @@ public: virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const { return Ref<Script>(); } virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) { return Vector<ScriptTemplate>(); } virtual bool is_using_templates() { return false; } - virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const = 0; + virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const = 0; virtual String validate_path(const String &p_path) const { return ""; } virtual Script *create_script() const = 0; virtual bool has_named_classes() const = 0; @@ -433,8 +433,8 @@ extern uint8_t script_encryption_key[32]; class PlaceHolderScriptInstance : public ScriptInstance { Object *owner = nullptr; List<PropertyInfo> properties; - Map<StringName, Variant> values; - Map<StringName, Variant> constants; + HashMap<StringName, Variant> values; + HashMap<StringName, Variant> constants; ScriptLanguage *language = nullptr; Ref<Script> script; @@ -459,7 +459,7 @@ public: Object *get_owner() override { return owner; } - void update(const List<PropertyInfo> &p_properties, const Map<StringName, Variant> &p_values); //likely changed in editor + void update(const List<PropertyInfo> &p_properties, const HashMap<StringName, Variant> &p_values); //likely changed in editor virtual bool is_placeholder() const override { return true; } diff --git a/core/object/script_language_extension.h b/core/object/script_language_extension.h index 40f18ab30d..5ffa6c5a70 100644 --- a/core/object/script_language_extension.h +++ b/core/object/script_language_extension.h @@ -153,7 +153,7 @@ public: GDVIRTUAL0RC(Dictionary, _get_constants) - virtual void get_constants(Map<StringName, Variant> *p_constants) override { + virtual void get_constants(HashMap<StringName, Variant> *p_constants) override { Dictionary constants; GDVIRTUAL_REQUIRED_CALL(_get_constants, constants); List<Variant> keys; @@ -163,7 +163,7 @@ public: } } GDVIRTUAL0RC(TypedArray<StringName>, _get_members) - virtual void get_members(Set<StringName> *p_members) override { + virtual void get_members(RBSet<StringName> *p_members) override { TypedArray<StringName> members; GDVIRTUAL_REQUIRED_CALL(_get_members, members); for (int i = 0; i < members.size(); i++) { @@ -282,7 +282,7 @@ public: EXBIND0R(bool, is_using_templates) GDVIRTUAL6RC(Dictionary, _validate, const String &, const String &, bool, bool, bool, bool) - virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const override { + virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptError> *r_errors = nullptr, List<Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const override { Dictionary ret; GDVIRTUAL_REQUIRED_CALL(_validate, p_script, p_path, r_functions != nullptr, r_errors != nullptr, r_warnings != nullptr, r_safe_lines != nullptr, ret); if (!ret.has("valid")) { diff --git a/core/string/optimized_translation.cpp b/core/string/optimized_translation.cpp index 93429744fc..07302cc8c3 100644 --- a/core/string/optimized_translation.cpp +++ b/core/string/optimized_translation.cpp @@ -53,7 +53,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) { int size = Math::larger_prime(keys.size()); Vector<Vector<Pair<int, CharString>>> buckets; - Vector<Map<uint32_t, int>> table; + Vector<HashMap<uint32_t, int>> table; Vector<uint32_t> hfunc_table; Vector<CompressedString> compressed; @@ -108,7 +108,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) { for (int i = 0; i < size; i++) { const Vector<Pair<int, CharString>> &b = buckets[i]; - Map<uint32_t, int> &t = table.write[i]; + HashMap<uint32_t, int> &t = table.write[i]; if (b.size() == 0) { continue; @@ -147,7 +147,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) { int btindex = 0; for (int i = 0; i < size; i++) { - const Map<uint32_t, int> &t = table[i]; + const HashMap<uint32_t, int> &t = table[i]; if (t.size() == 0) { htw[i] = 0xFFFFFFFF; //nothing continue; diff --git a/core/string/translation.cpp b/core/string/translation.cpp index d6d361b5f1..cba2f09022 100644 --- a/core/string/translation.cpp +++ b/core/string/translation.cpp @@ -95,12 +95,12 @@ StringName Translation::get_message(const StringName &p_src_text, const StringNa WARN_PRINT("Translation class doesn't handle context. Using context in get_message() on a Translation instance is probably a mistake. \nUse a derived Translation class that handles context, such as TranslationPO class"); } - const Map<StringName, StringName>::Element *E = translation_map.find(p_src_text); + HashMap<StringName, StringName>::ConstIterator E = translation_map.find(p_src_text); if (!E) { return StringName(); } - return E->get(); + return E->value; } StringName Translation::get_plural_message(const StringName &p_src_text, const StringName &p_plural_text, int p_n, const StringName &p_context) const { @@ -215,12 +215,12 @@ static _character_accent_pair _character_to_accented[] = { Vector<TranslationServer::LocaleScriptInfo> TranslationServer::locale_script_info; -Map<String, String> TranslationServer::language_map; -Map<String, String> TranslationServer::script_map; -Map<String, String> TranslationServer::locale_rename_map; -Map<String, String> TranslationServer::country_name_map; -Map<String, String> TranslationServer::variant_map; -Map<String, String> TranslationServer::country_rename_map; +HashMap<String, String> TranslationServer::language_map; +HashMap<String, String> TranslationServer::script_map; +HashMap<String, String> TranslationServer::locale_rename_map; +HashMap<String, String> TranslationServer::country_name_map; +HashMap<String, String> TranslationServer::variant_map; +HashMap<String, String> TranslationServer::country_rename_map; void TranslationServer::init_locale_info() { // Init locale info. @@ -452,8 +452,8 @@ String TranslationServer::get_locale_name(const String &p_locale) const { Vector<String> TranslationServer::get_all_languages() const { Vector<String> languages; - for (const Map<String, String>::Element *E = language_map.front(); E; E = E->next()) { - languages.push_back(E->key()); + for (const KeyValue<String, String> &E : language_map) { + languages.push_back(E.key); } return languages; @@ -466,8 +466,8 @@ String TranslationServer::get_language_name(const String &p_language) const { Vector<String> TranslationServer::get_all_scripts() const { Vector<String> scripts; - for (const Map<String, String>::Element *E = script_map.front(); E; E = E->next()) { - scripts.push_back(E->key()); + for (const KeyValue<String, String> &E : script_map) { + scripts.push_back(E.key); } return scripts; @@ -480,8 +480,8 @@ String TranslationServer::get_script_name(const String &p_script) const { Vector<String> TranslationServer::get_all_countries() const { Vector<String> countries; - for (const Map<String, String>::Element *E = country_name_map.front(); E; E = E->next()) { - countries.push_back(E->key()); + for (const KeyValue<String, String> &E : country_name_map) { + countries.push_back(E.key); } return countries; @@ -507,8 +507,8 @@ String TranslationServer::get_locale() const { Array TranslationServer::get_loaded_locales() const { Array locales; - for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { - const Ref<Translation> &t = E->get(); + for (const Ref<Translation> &E : translations) { + const Ref<Translation> &t = E; ERR_FAIL_COND_V(t.is_null(), Array()); String l = t->get_locale(); @@ -530,8 +530,8 @@ Ref<Translation> TranslationServer::get_translation_object(const String &p_local Ref<Translation> res; int best_score = 0; - for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { - const Ref<Translation> &t = E->get(); + for (const Ref<Translation> &E : translations) { + const Ref<Translation> &t = E; ERR_FAIL_COND_V(t.is_null(), nullptr); String l = t->get_locale(); @@ -599,8 +599,8 @@ StringName TranslationServer::_get_message_from_translations(const StringName &p StringName res; int best_score = 0; - for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) { - const Ref<Translation> &t = E->get(); + for (const Ref<Translation> &E : translations) { + const Ref<Translation> &t = E; ERR_FAIL_COND_V(t.is_null(), p_message); String l = t->get_locale(); diff --git a/core/string/translation.h b/core/string/translation.h index ded6ed5925..f58f6f91a2 100644 --- a/core/string/translation.h +++ b/core/string/translation.h @@ -41,7 +41,7 @@ class Translation : public Resource { RES_BASE_EXTENSION("translation"); String locale = "en"; - Map<StringName, StringName> translation_map; + HashMap<StringName, StringName> translation_map; virtual Vector<String> _get_message_list() const; virtual Dictionary _get_messages() const; @@ -74,7 +74,7 @@ class TranslationServer : public Object { String locale = "en"; String fallback; - Set<Ref<Translation>> translations; + RBSet<Ref<Translation>> translations; Ref<Translation> tool_translation; Ref<Translation> doc_translation; @@ -111,16 +111,16 @@ class TranslationServer : public Object { String name; String script; String default_country; - Set<String> supported_countries; + RBSet<String> supported_countries; }; static Vector<LocaleScriptInfo> locale_script_info; - static Map<String, String> language_map; - static Map<String, String> script_map; - static Map<String, String> locale_rename_map; - static Map<String, String> country_name_map; - static Map<String, String> country_rename_map; - static Map<String, String> variant_map; + static HashMap<String, String> language_map; + static HashMap<String, String> script_map; + static HashMap<String, String> locale_rename_map; + static HashMap<String, String> country_name_map; + static HashMap<String, String> country_rename_map; + static HashMap<String, String> variant_map; void init_locale_info(); diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 015dfbc651..f6ad0fe3b0 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -3655,6 +3655,31 @@ bool String::is_absolute_path() const { } } +static _FORCE_INLINE_ bool _is_valid_identifier_bit(int p_index, char32_t p_char) { + if (p_index == 0 && is_digit(p_char)) { + return false; // No start with number plz. + } + return is_ascii_identifier_char(p_char); +} + +String String::validate_identifier() const { + if (is_empty()) { + return "_"; // Empty string is not a valid identifier; + } + + String result = *this; + int len = result.length(); + char32_t *buffer = result.ptrw(); + + for (int i = 0; i < len; i++) { + if (!_is_valid_identifier_bit(i, buffer[i])) { + buffer[i] = '_'; + } + } + + return result; +} + bool String::is_valid_identifier() const { int len = length(); @@ -3665,15 +3690,7 @@ bool String::is_valid_identifier() const { const char32_t *str = &operator[](0); for (int i = 0; i < len; i++) { - if (i == 0) { - if (is_digit(str[0])) { - return false; // no start with number plz - } - } - - bool valid_char = is_ascii_identifier_char(str[i]); - - if (!valid_char) { + if (!_is_valid_identifier_bit(i, str[i])) { return false; } } diff --git a/core/string/ustring.h b/core/string/ustring.h index 48f2e45105..e4f6c3327a 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -427,6 +427,7 @@ public: // node functions static const String invalid_node_name_characters; String validate_node_name() const; + String validate_identifier() const; bool is_valid_identifier() const; bool is_valid_int() const; @@ -527,6 +528,16 @@ String DTRN(const String &p_text, const String &p_text_plural, int p_n, const St #define TTRGET(m_value) (m_value) #endif +// Use this to mark property names for editor translation. +// Often for dynamic properties defined in _get_property_list(). +// Property names defined directly inside EDITOR_DEF, GLOBAL_DEF, and ADD_PROPERTY macros don't need this. +#define PNAME(m_value) (m_value) + +// Similar to PNAME, but to mark groups, i.e. properties with PROPERTY_USAGE_GROUP. +// Groups defined directly inside ADD_GROUP macros don't need this. +// The arguments are the same as ADD_GROUP. m_prefix is only used for extraction. +#define GNAME(m_value, m_prefix) (m_value) + // Runtime translate for the public node API. String RTR(const String &p_text, const String &p_context = ""); String RTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context = ""); diff --git a/core/templates/hash_map.h b/core/templates/hash_map.h index 55292d3eb5..e5f73171a2 100644 --- a/core/templates/hash_map.h +++ b/core/templates/hash_map.h @@ -373,76 +373,80 @@ public: /** Iterator API **/ - struct Iterator { - _FORCE_INLINE_ KeyValue<TKey, TValue> &operator*() const { + struct ConstIterator { + _FORCE_INLINE_ const KeyValue<TKey, TValue> &operator*() const { return E->data; } - _FORCE_INLINE_ KeyValue<TKey, TValue> *operator->() const { return &E->data; } - _FORCE_INLINE_ Iterator &operator++() { + _FORCE_INLINE_ const KeyValue<TKey, TValue> *operator->() const { return &E->data; } + _FORCE_INLINE_ ConstIterator &operator++() { if (E) { E = E->next; } return *this; } - _FORCE_INLINE_ Iterator &operator--() { + _FORCE_INLINE_ ConstIterator &operator--() { if (E) { E = E->prev; } return *this; } - _FORCE_INLINE_ bool operator==(const Iterator &b) const { return E == b.E; } - _FORCE_INLINE_ bool operator!=(const Iterator &b) const { return E != b.E; } + _FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return E == b.E; } + _FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return E != b.E; } - _FORCE_INLINE_ operator bool() const { + _FORCE_INLINE_ explicit operator bool() const { return E != nullptr; } - _FORCE_INLINE_ Iterator(HashMapElement<TKey, TValue> *p_E) { E = p_E; } - _FORCE_INLINE_ Iterator() {} - _FORCE_INLINE_ Iterator(const Iterator &p_it) { E = p_it.E; } - _FORCE_INLINE_ void operator=(const Iterator &p_it) { + _FORCE_INLINE_ ConstIterator(const HashMapElement<TKey, TValue> *p_E) { E = p_E; } + _FORCE_INLINE_ ConstIterator() {} + _FORCE_INLINE_ ConstIterator(const ConstIterator &p_it) { E = p_it.E; } + _FORCE_INLINE_ void operator=(const ConstIterator &p_it) { E = p_it.E; } private: - HashMapElement<TKey, TValue> *E = nullptr; + const HashMapElement<TKey, TValue> *E = nullptr; }; - struct ConstIterator { - _FORCE_INLINE_ const KeyValue<TKey, TValue> &operator*() const { + struct Iterator { + _FORCE_INLINE_ KeyValue<TKey, TValue> &operator*() const { return E->data; } - _FORCE_INLINE_ const KeyValue<TKey, TValue> *operator->() const { return &E->data; } - _FORCE_INLINE_ ConstIterator &operator++() { + _FORCE_INLINE_ KeyValue<TKey, TValue> *operator->() const { return &E->data; } + _FORCE_INLINE_ Iterator &operator++() { if (E) { E = E->next; } return *this; } - _FORCE_INLINE_ ConstIterator &operator--() { + _FORCE_INLINE_ Iterator &operator--() { if (E) { E = E->prev; } return *this; } - _FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return E == b.E; } - _FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return E != b.E; } + _FORCE_INLINE_ bool operator==(const Iterator &b) const { return E == b.E; } + _FORCE_INLINE_ bool operator!=(const Iterator &b) const { return E != b.E; } - _FORCE_INLINE_ operator bool() const { + _FORCE_INLINE_ explicit operator bool() const { return E != nullptr; } - _FORCE_INLINE_ ConstIterator(const HashMapElement<TKey, TValue> *p_E) { E = p_E; } - _FORCE_INLINE_ ConstIterator() {} - _FORCE_INLINE_ ConstIterator(const ConstIterator &p_it) { E = p_it.E; } - _FORCE_INLINE_ void operator=(const ConstIterator &p_it) { + _FORCE_INLINE_ Iterator(HashMapElement<TKey, TValue> *p_E) { E = p_E; } + _FORCE_INLINE_ Iterator() {} + _FORCE_INLINE_ Iterator(const Iterator &p_it) { E = p_it.E; } + _FORCE_INLINE_ void operator=(const Iterator &p_it) { E = p_it.E; } + operator ConstIterator() const { + return ConstIterator(E); + } + private: - const HashMapElement<TKey, TValue> *E = nullptr; + HashMapElement<TKey, TValue> *E = nullptr; }; _FORCE_INLINE_ Iterator begin() { diff --git a/core/templates/hashfuncs.h b/core/templates/hashfuncs.h index eb73ff4ede..1330d55270 100644 --- a/core/templates/hashfuncs.h +++ b/core/templates/hashfuncs.h @@ -163,6 +163,9 @@ static inline uint64_t make_uint64_t(T p_in) { return _u._u64; } +template <class T> +class Ref; + struct HashMapHasherDefault { static _FORCE_INLINE_ uint32_t hash(const String &p_string) { return p_string.hash(); } static _FORCE_INLINE_ uint32_t hash(const char *p_cstr) { return hash_djb2(p_cstr); } @@ -186,6 +189,12 @@ struct HashMapHasherDefault { static _FORCE_INLINE_ uint32_t hash(const StringName &p_string_name) { return p_string_name.hash(); } static _FORCE_INLINE_ uint32_t hash(const NodePath &p_path) { return p_path.hash(); } + template <class T> + static _FORCE_INLINE_ uint32_t hash(const T *p_pointer) { return hash_one_uint64((uint64_t)p_pointer); } + + template <class T> + static _FORCE_INLINE_ uint32_t hash(const Ref<T> &p_ref) { return hash_one_uint64((uint64_t)p_ref.operator->()); } + static _FORCE_INLINE_ uint32_t hash(const Vector2i &p_vec) { uint32_t h = hash_djb2_one_32(p_vec.x); return hash_djb2_one_32(p_vec.y, h); @@ -237,16 +246,36 @@ struct HashMapComparatorDefault { static bool compare(const T &p_lhs, const T &p_rhs) { return p_lhs == p_rhs; } +}; - bool compare(const float &p_lhs, const float &p_rhs) { +template <> +struct HashMapComparatorDefault<float> { + static bool compare(const float &p_lhs, const float &p_rhs) { return (p_lhs == p_rhs) || (Math::is_nan(p_lhs) && Math::is_nan(p_rhs)); } +}; - bool compare(const double &p_lhs, const double &p_rhs) { +template <> +struct HashMapComparatorDefault<double> { + static bool compare(const double &p_lhs, const double &p_rhs) { return (p_lhs == p_rhs) || (Math::is_nan(p_lhs) && Math::is_nan(p_rhs)); } }; +template <> +struct HashMapComparatorDefault<Vector2> { + static bool compare(const Vector2 &p_lhs, const Vector2 &p_rhs) { + return ((p_lhs.x == p_rhs.x) || (Math::is_nan(p_lhs.x) && Math::is_nan(p_rhs.x))) && ((p_lhs.y == p_rhs.y) || (Math::is_nan(p_lhs.y) && Math::is_nan(p_rhs.y))); + } +}; + +template <> +struct HashMapComparatorDefault<Vector3> { + static bool compare(const Vector3 &p_lhs, const Vector3 &p_rhs) { + return ((p_lhs.x == p_rhs.x) || (Math::is_nan(p_lhs.x) && Math::is_nan(p_rhs.x))) && ((p_lhs.y == p_rhs.y) || (Math::is_nan(p_lhs.y) && Math::is_nan(p_rhs.y))) && ((p_lhs.z == p_rhs.z) || (Math::is_nan(p_lhs.z) && Math::is_nan(p_rhs.z))); + } +}; + constexpr uint32_t HASH_TABLE_SIZE_MAX = 29; const uint32_t hash_table_size_primes[HASH_TABLE_SIZE_MAX] = { diff --git a/core/templates/pair.h b/core/templates/pair.h index eb86e21b03..6d33213fe3 100644 --- a/core/templates/pair.h +++ b/core/templates/pair.h @@ -31,8 +31,8 @@ #ifndef PAIR_H #define PAIR_H +#include "core/templates/hashfuncs.h" #include "core/typedefs.h" - template <class F, class S> struct Pair { F first; @@ -69,6 +69,15 @@ struct PairSort { } }; +template <class F, class S> +struct PairHash { + static uint32_t hash(const Pair<F, S> &P) { + uint64_t h1 = HashMapHasherDefault::hash(P.first); + uint64_t h2 = HashMapHasherDefault::hash(P.second); + return hash_one_uint64((h1 << 32) | h2); + } +}; + template <class K, class V> struct KeyValue { const K key; diff --git a/core/templates/map.h b/core/templates/rb_map.h index c54da1dc03..c732ccd485 100644 --- a/core/templates/map.h +++ b/core/templates/rb_map.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* map.h */ +/* rb_map.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef MAP_H -#define MAP_H +#ifndef RB_MAP_H +#define RB_MAP_H #include "core/error/error_macros.h" #include "core/os/memory.h" @@ -39,7 +39,7 @@ // https://web.archive.org/web/20120507164830/https://web.mit.edu/~emin/www/source_code/red_black_tree/index.html template <class K, class V, class C = Comparator<K>, class A = DefaultAllocator> -class Map { +class RBMap { enum Color { RED, BLACK @@ -49,7 +49,7 @@ class Map { public: class Element { private: - friend class Map<K, V, C, A>; + friend class RBMap<K, V, C, A>; int color = RED; Element *right = nullptr; Element *left = nullptr; @@ -111,7 +111,9 @@ public: _FORCE_INLINE_ bool operator==(const Iterator &b) const { return E == b.E; } _FORCE_INLINE_ bool operator!=(const Iterator &b) const { return E != b.E; } - + explicit operator bool() const { + return E != nullptr; + } Iterator(Element *p_E) { E = p_E; } Iterator() {} Iterator(const Iterator &p_it) { E = p_it.E; } @@ -136,7 +138,9 @@ public: _FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return E == b.E; } _FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return E != b.E; } - + explicit operator bool() const { + return E != nullptr; + } ConstIterator(const Element *p_E) { E = p_E; } ConstIterator() {} ConstIterator(const ConstIterator &p_it) { E = p_it.E; } @@ -572,7 +576,7 @@ private: memdelete_allocator<Element, A>(p_element); } - void _copy_from(const Map &p_map) { + void _copy_from(const RBMap &p_map) { clear(); // not the fastest way, but safeset to write. for (Element *I = p_map.front(); I; I = I->next()) { @@ -710,8 +714,12 @@ public: return e; } - inline bool is_empty() const { return _data.size_cache == 0; } - inline int size() const { return _data.size_cache; } + inline bool is_empty() const { + return _data.size_cache == 0; + } + inline int size() const { + return _data.size_cache; + } int calculate_depth() const { // used for debug mostly @@ -735,17 +743,17 @@ public: _data._free_root(); } - void operator=(const Map &p_map) { + void operator=(const RBMap &p_map) { _copy_from(p_map); } - Map(const Map &p_map) { + RBMap(const RBMap &p_map) { _copy_from(p_map); } - _FORCE_INLINE_ Map() {} + _FORCE_INLINE_ RBMap() {} - ~Map() { + ~RBMap() { clear(); } }; diff --git a/core/templates/set.h b/core/templates/rb_set.h index a8a0a77712..2de816769c 100644 --- a/core/templates/set.h +++ b/core/templates/rb_set.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* set.h */ +/* rb_set.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef SET_H -#define SET_H +#ifndef RB_SET_H +#define RB_SET_H #include "core/os/memory.h" #include "core/typedefs.h" @@ -38,7 +38,7 @@ // https://web.archive.org/web/20120507164830/https://web.mit.edu/~emin/www/source_code/red_black_tree/index.html template <class T, class C = Comparator<T>, class A = DefaultAllocator> -class Set { +class RBSet { enum Color { RED, BLACK @@ -48,7 +48,7 @@ class Set { public: class Element { private: - friend class Set<T, C, A>; + friend class RBSet<T, C, A>; int color = RED; Element *right = nullptr; Element *left = nullptr; @@ -554,7 +554,7 @@ private: memdelete_allocator<Element, A>(p_element); } - void _copy_from(const Set &p_set) { + void _copy_from(const RBSet &p_set) { clear(); // not the fastest way, but safeset to write. for (Element *I = p_set.front(); I; I = I->next()) { @@ -661,8 +661,12 @@ public: return e; } - inline bool is_empty() const { return _data.size_cache == 0; } - inline int size() const { return _data.size_cache; } + inline bool is_empty() const { + return _data.size_cache == 0; + } + inline int size() const { + return _data.size_cache; + } int calculate_depth() const { // used for debug mostly @@ -686,17 +690,17 @@ public: _data._free_root(); } - void operator=(const Set &p_set) { + void operator=(const RBSet &p_set) { _copy_from(p_set); } - Set(const Set &p_set) { + RBSet(const RBSet &p_set) { _copy_from(p_set); } - _FORCE_INLINE_ Set() {} + _FORCE_INLINE_ RBSet() {} - ~Set() { + ~RBSet() { clear(); } }; diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h index 95632cdec2..d26977380e 100644 --- a/core/templates/rid_owner.h +++ b/core/templates/rid_owner.h @@ -36,9 +36,9 @@ #include "core/string/print_string.h" #include "core/templates/list.h" #include "core/templates/oa_hash_map.h" +#include "core/templates/rb_set.h" #include "core/templates/rid.h" #include "core/templates/safe_refcount.h" -#include "core/templates/set.h" #include <stdio.h> #include <typeinfo> diff --git a/core/variant/array.cpp b/core/variant/array.cpp index afc4acadf9..7551350c95 100644 --- a/core/variant/array.cpp +++ b/core/variant/array.cpp @@ -43,7 +43,7 @@ class ArrayPrivate { public: SafeRefCount refcount; Vector<Variant> array; - + Variant *read_only = nullptr; // If enabled, a pointer is used to a temporary value that is used to return read-only values. ContainerTypeValidate typed; }; @@ -52,6 +52,16 @@ void Array::_ref(const Array &p_from) const { ERR_FAIL_COND(!_fp); // should NOT happen. + if (unlikely(_fp->read_only != nullptr)) { + // If p_from is a read-only array, just copy the contents to avoid further modification. + _unref(); + _p = memnew(ArrayPrivate); + _p->refcount.init(); + _p->array = _fp->array; + _p->typed = _fp->typed; + return; + } + if (_fp == _p) { return; // whatever it is, nothing to do here move along } @@ -71,16 +81,27 @@ void Array::_unref() const { } if (_p->refcount.unref()) { + if (_p->read_only) { + memdelete(_p->read_only); + } memdelete(_p); } _p = nullptr; } Variant &Array::operator[](int p_idx) { + if (unlikely(_p->read_only)) { + *_p->read_only = _p->array[p_idx]; + return *_p->read_only; + } return _p->array.write[p_idx]; } const Variant &Array::operator[](int p_idx) const { + if (unlikely(_p->read_only)) { + *_p->read_only = _p->array[p_idx]; + return *_p->read_only; + } return _p->array[p_idx]; } @@ -93,6 +114,7 @@ bool Array::is_empty() const { } void Array::clear() { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); _p->array.clear(); } @@ -224,34 +246,43 @@ bool Array::_assign(const Array &p_array) { } void Array::operator=(const Array &p_array) { + if (this == &p_array) { + return; + } _ref(p_array); } void Array::push_back(const Variant &p_value) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); ERR_FAIL_COND(!_p->typed.validate(p_value, "push_back")); _p->array.push_back(p_value); } void Array::append_array(const Array &p_array) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); ERR_FAIL_COND(!_p->typed.validate(p_array, "append_array")); _p->array.append_array(p_array._p->array); } Error Array::resize(int p_new_size) { + ERR_FAIL_COND_V_MSG(_p->read_only, ERR_LOCKED, "Array is in read-only state."); return _p->array.resize(p_new_size); } Error Array::insert(int p_pos, const Variant &p_value) { + ERR_FAIL_COND_V_MSG(_p->read_only, ERR_LOCKED, "Array is in read-only state."); ERR_FAIL_COND_V(!_p->typed.validate(p_value, "insert"), ERR_INVALID_PARAMETER); return _p->array.insert(p_pos, p_value); } void Array::fill(const Variant &p_value) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); ERR_FAIL_COND(!_p->typed.validate(p_value, "fill")); _p->array.fill(p_value); } void Array::erase(const Variant &p_value) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); ERR_FAIL_COND(!_p->typed.validate(p_value, "erase")); _p->array.erase(p_value); } @@ -323,10 +354,12 @@ bool Array::has(const Variant &p_value) const { } void Array::remove_at(int p_pos) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); _p->array.remove_at(p_pos); } void Array::set(int p_idx, const Variant &p_value) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); ERR_FAIL_COND(!_p->typed.validate(p_value, "set")); operator[](p_idx) = p_value; @@ -481,14 +514,17 @@ struct _ArrayVariantSort { }; void Array::sort() { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); _p->array.sort_custom<_ArrayVariantSort>(); } void Array::sort_custom(const Callable &p_callable) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); _p->array.sort_custom<CallableComparator, true>(p_callable); } void Array::shuffle() { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); const int n = _p->array.size(); if (n < 2) { return; @@ -515,15 +551,18 @@ int Array::bsearch_custom(const Variant &p_value, const Callable &p_callable, bo } void Array::reverse() { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); _p->array.reverse(); } void Array::push_front(const Variant &p_value) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); ERR_FAIL_COND(!_p->typed.validate(p_value, "push_front")); _p->array.insert(0, p_value); } Variant Array::pop_back() { + ERR_FAIL_COND_V_MSG(_p->read_only, Variant(), "Array is in read-only state."); if (!_p->array.is_empty()) { const int n = _p->array.size() - 1; const Variant ret = _p->array.get(n); @@ -534,6 +573,7 @@ Variant Array::pop_back() { } Variant Array::pop_front() { + ERR_FAIL_COND_V_MSG(_p->read_only, Variant(), "Array is in read-only state."); if (!_p->array.is_empty()) { const Variant ret = _p->array.get(0); _p->array.remove_at(0); @@ -543,6 +583,7 @@ Variant Array::pop_front() { } Variant Array::pop_at(int p_pos) { + ERR_FAIL_COND_V_MSG(_p->read_only, Variant(), "Array is in read-only state."); if (_p->array.is_empty()) { // Return `null` without printing an error to mimic `pop_back()` and `pop_front()` behavior. return Variant(); @@ -627,6 +668,7 @@ bool Array::typed_assign(const Array &p_other) { } void Array::set_typed(uint32_t p_type, const StringName &p_class_name, const Variant &p_script) { + ERR_FAIL_COND_MSG(_p->read_only, "Array is in read-only state."); ERR_FAIL_COND_MSG(_p->array.size() > 0, "Type can only be set when array is empty."); ERR_FAIL_COND_MSG(_p->refcount.get() > 1, "Type can only be set when array has no more than one user."); ERR_FAIL_COND_MSG(_p->typed.type != Variant::NIL, "Type can only be set once."); @@ -656,6 +698,22 @@ Variant Array::get_typed_script() const { return _p->typed.script; } +void Array::set_read_only(bool p_enable) { + if (p_enable == bool(_p->read_only != nullptr)) { + return; + } + if (p_enable) { + _p->read_only = memnew(Variant); + } else { + memdelete(_p->read_only); + _p->read_only = nullptr; + } +} + +bool Array::is_read_only() const { + return _p->read_only != nullptr; +} + Array::Array(const Array &p_from) { _p = nullptr; _ref(p_from); diff --git a/core/variant/array.h b/core/variant/array.h index ab5f7cd50f..f537700f99 100644 --- a/core/variant/array.h +++ b/core/variant/array.h @@ -125,6 +125,10 @@ public: uint32_t get_typed_builtin() const; StringName get_typed_class_name() const; Variant get_typed_script() const; + + void set_read_only(bool p_enable); + bool is_read_only() const; + Array(const Array &p_from); Array(); ~Array(); diff --git a/core/variant/dictionary.cpp b/core/variant/dictionary.cpp index 46543da2c2..bda8c93a79 100644 --- a/core/variant/dictionary.cpp +++ b/core/variant/dictionary.cpp @@ -41,6 +41,7 @@ struct DictionaryPrivate { SafeRefCount refcount; + Variant *read_only = nullptr; // If enabled, a pointer is used to a temporary value that is used to return read-only values. HashMap<Variant, Variant, VariantHasher, VariantComparator> variant_map; }; @@ -79,11 +80,22 @@ Variant Dictionary::get_value_at_index(int p_index) const { } Variant &Dictionary::operator[](const Variant &p_key) { - if (p_key.get_type() == Variant::STRING_NAME) { - const StringName *sn = VariantInternal::get_string_name(&p_key); - return _p->variant_map[sn->operator String()]; + if (unlikely(_p->read_only)) { + if (p_key.get_type() == Variant::STRING_NAME) { + const StringName *sn = VariantInternal::get_string_name(&p_key); + *_p->read_only = _p->variant_map[sn->operator String()]; + } else { + *_p->read_only = _p->variant_map[p_key]; + } + + return *_p->read_only; } else { - return _p->variant_map[p_key]; + if (p_key.get_type() == Variant::STRING_NAME) { + const StringName *sn = VariantInternal::get_string_name(&p_key); + return _p->variant_map[sn->operator String()]; + } else { + return _p->variant_map[p_key]; + } } } @@ -124,7 +136,12 @@ Variant *Dictionary::getptr(const Variant &p_key) { if (!E) { return nullptr; } - return &E->value; + if (unlikely(_p->read_only != nullptr)) { + *_p->read_only = E->value; + return _p->read_only; + } else { + return &E->value; + } } Variant Dictionary::get_valid(const Variant &p_key) const { @@ -179,6 +196,7 @@ bool Dictionary::has_all(const Array &p_keys) const { } bool Dictionary::erase(const Variant &p_key) { + ERR_FAIL_COND_V_MSG(_p->read_only, false, "Dictionary is in read-only state."); if (p_key.get_type() == Variant::STRING_NAME) { const StringName *sn = VariantInternal::get_string_name(&p_key); return _p->variant_map.erase(sn->operator String()); @@ -220,6 +238,16 @@ bool Dictionary::recursive_equal(const Dictionary &p_dictionary, int recursion_c } void Dictionary::_ref(const Dictionary &p_from) const { + if (unlikely(p_from._p->read_only != nullptr)) { + // If p_from is a read-only dictionary, just copy the contents to avoid further modification. + if (_p) { + _unref(); + } + _p = memnew(DictionaryPrivate); + _p->refcount.init(); + _p->variant_map = p_from._p->variant_map; + return; + } //make a copy first (thread safe) if (!p_from._p->refcount.ref()) { return; // couldn't copy @@ -237,12 +265,16 @@ void Dictionary::_ref(const Dictionary &p_from) const { } void Dictionary::clear() { + ERR_FAIL_COND_MSG(_p->read_only, "Dictionary is in read-only state."); _p->variant_map.clear(); } void Dictionary::_unref() const { ERR_FAIL_COND(!_p); if (_p->refcount.unref()) { + if (_p->read_only) { + memdelete(_p->read_only); + } memdelete(_p); } _p = nullptr; @@ -330,6 +362,21 @@ Dictionary Dictionary::duplicate(bool p_deep) const { return recursive_duplicate(p_deep, 0); } +void Dictionary::set_read_only(bool p_enable) { + if (p_enable == bool(_p->read_only != nullptr)) { + return; + } + if (p_enable) { + _p->read_only = memnew(Variant); + } else { + memdelete(_p->read_only); + _p->read_only = nullptr; + } +} +bool Dictionary::is_read_only() const { + return _p->read_only != nullptr; +} + Dictionary Dictionary::recursive_duplicate(bool p_deep, int recursion_count) const { Dictionary n; @@ -353,6 +400,9 @@ Dictionary Dictionary::recursive_duplicate(bool p_deep, int recursion_count) con } void Dictionary::operator=(const Dictionary &p_dictionary) { + if (this == &p_dictionary) { + return; + } _ref(p_dictionary); } diff --git a/core/variant/dictionary.h b/core/variant/dictionary.h index 16cf0c2bf8..1224a4ff6f 100644 --- a/core/variant/dictionary.h +++ b/core/variant/dictionary.h @@ -84,6 +84,9 @@ public: Dictionary duplicate(bool p_deep = false) const; Dictionary recursive_duplicate(bool p_deep, int recursion_count) const; + void set_read_only(bool p_enable); + bool is_read_only() const; + const void *id() const; Dictionary(const Dictionary &p_from); diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 882a89b8ba..a3568a8d6a 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -919,11 +919,11 @@ struct _VariantCall { } struct ConstantData { - Map<StringName, int> value; + HashMap<StringName, int> value; #ifdef DEBUG_ENABLED List<StringName> value_ordered; #endif - Map<StringName, Variant> variant_value; + HashMap<StringName, Variant> variant_value; #ifdef DEBUG_ENABLED List<StringName> variant_value_ordered; #endif @@ -1281,14 +1281,14 @@ Variant Variant::get_constant_value(Variant::Type p_type, const StringName &p_va ERR_FAIL_INDEX_V(p_type, Variant::VARIANT_MAX, 0); _VariantCall::ConstantData &cd = _VariantCall::constant_data[p_type]; - Map<StringName, int>::Element *E = cd.value.find(p_value); + HashMap<StringName, int>::Iterator E = cd.value.find(p_value); if (!E) { - Map<StringName, Variant>::Element *F = cd.variant_value.find(p_value); + HashMap<StringName, Variant>::Iterator F = cd.variant_value.find(p_value); if (F) { if (r_valid) { *r_valid = true; } - return F->get(); + return F->value; } else { return -1; } @@ -1297,7 +1297,7 @@ Variant Variant::get_constant_value(Variant::Type p_type, const StringName &p_va *r_valid = true; } - return E->get(); + return E->value; } #ifdef DEBUG_METHODS_ENABLED diff --git a/core/variant/variant_parser.h b/core/variant/variant_parser.h index 70ca8d8cb5..56b484c8bc 100644 --- a/core/variant/variant_parser.h +++ b/core/variant/variant_parser.h @@ -113,7 +113,7 @@ public: struct Tag { String name; - Map<String, Variant> fields; + HashMap<String, Variant> fields; }; private: diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp index 6023e4d129..3839da495f 100644 --- a/core/variant/variant_setget.cpp +++ b/core/variant/variant_setget.cpp @@ -624,6 +624,11 @@ struct VariantIndexedSetGet_Array { PtrToArg<Variant>::encode(v[index], member); } static void set(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob) { + if (VariantGetInternalPtr<Array>::get_ptr(base)->is_read_only()) { + *valid = false; + *oob = true; + return; + } int64_t size = VariantGetInternalPtr<Array>::get_ptr(base)->size(); if (index < 0) { index += size; @@ -638,6 +643,10 @@ struct VariantIndexedSetGet_Array { *valid = true; } static void validated_set(Variant *base, int64_t index, const Variant *value, bool *oob) { + if (VariantGetInternalPtr<Array>::get_ptr(base)->is_read_only()) { + *oob = true; + return; + } int64_t size = VariantGetInternalPtr<Array>::get_ptr(base)->size(); if (index < 0) { index += size; @@ -766,11 +775,20 @@ struct VariantIndexedSetGet_String { PtrToArg<Variant>::encode(*ptr, member); \ } \ static void set(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob) { \ + if (VariantGetInternalPtr<m_base_type>::get_ptr(base)->is_read_only()) { \ + *valid = false; \ + *oob = true; \ + return; \ + } \ (*VariantGetInternalPtr<m_base_type>::get_ptr(base))[index] = *value; \ *oob = false; \ *valid = true; \ } \ static void validated_set(Variant *base, int64_t index, const Variant *value, bool *oob) { \ + if (VariantGetInternalPtr<m_base_type>::get_ptr(base)->is_read_only()) { \ + *oob = true; \ + return; \ + } \ (*VariantGetInternalPtr<m_base_type>::get_ptr(base))[index] = *value; \ *oob = false; \ } \ @@ -946,6 +964,10 @@ struct VariantKeyedSetGetDictionary { PtrToArg<Variant>::encode(*ptr, value); } static void set(Variant *base, const Variant *key, const Variant *value, bool *r_valid) { + if (VariantGetInternalPtr<Dictionary>::get_ptr(base)->is_read_only()) { + *r_valid = false; + return; + } (*VariantGetInternalPtr<Dictionary>::get_ptr(base))[*key] = *value; *r_valid = true; } diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 99d21706ee..9026aa6a34 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -53,6 +53,7 @@ <return type="float" /> <argument index="0" name="time" type="float" /> <argument index="1" name="seek" type="bool" /> + <argument index="2" name="seek_root" type="bool" /> <description> User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory. @@ -72,8 +73,9 @@ <argument index="1" name="time" type="float" /> <argument index="2" name="delta" type="float" /> <argument index="3" name="seeked" type="bool" /> - <argument index="4" name="blend" type="float" /> - <argument index="5" name="pingponged" type="int" default="0" /> + <argument index="4" name="seek_root" type="bool" /> + <argument index="5" name="blend" type="float" /> + <argument index="6" name="pingponged" type="int" default="0" /> <description> Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened. </description> @@ -83,9 +85,10 @@ <argument index="0" name="input_index" type="int" /> <argument index="1" name="time" type="float" /> <argument index="2" name="seek" type="bool" /> - <argument index="3" name="blend" type="float" /> - <argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> - <argument index="5" name="optimize" type="bool" default="true" /> + <argument index="3" name="seek_root" type="bool" /> + <argument index="4" name="blend" type="float" /> + <argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> + <argument index="6" name="optimize" type="bool" default="true" /> <description> Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options). </description> @@ -96,9 +99,10 @@ <argument index="1" name="node" type="AnimationNode" /> <argument index="2" name="time" type="float" /> <argument index="3" name="seek" type="bool" /> - <argument index="4" name="blend" type="float" /> - <argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> - <argument index="6" name="optimize" type="bool" default="true" /> + <argument index="4" name="seek_root" type="bool" /> + <argument index="5" name="blend" type="float" /> + <argument index="6" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> + <argument index="7" name="optimize" type="bool" default="true" /> <description> Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition. </description> diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index 727a09e110..de2414cd43 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -20,9 +20,9 @@ <member name="autorestart_random_delay" type="float" setter="set_autorestart_random_delay" getter="get_autorestart_random_delay" default="0.0"> If [member autorestart] is [code]true[/code], a random additional delay (in seconds) between 0 and this value will be added to [member autorestart_delay]. </member> - <member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.1"> + <member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.0"> </member> - <member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time" default="0.1"> + <member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time" default="0.0"> </member> <member name="mix_mode" type="int" setter="set_mix_mode" getter="get_mix_mode" enum="AnimationNodeOneShot.MixMode" default="0"> </member> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 625cf3c47c..653607610d 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -179,6 +179,7 @@ <argument index="1" name="update" type="bool" default="false" /> <description> Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped. + [b]Note:[/b] Seeking to the end of the animation doesn't emit [signal animation_finished]. If you want to skip animation and emit the signal, use [method advance]. </description> </method> <method name="set_blend_time"> diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 5008cd826e..56e5ce1522 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -88,14 +88,14 @@ <return type="Vector3" /> <argument index="0" name="screen_point" type="Vector2" /> <description> - Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. </description> </method> <method name="project_ray_origin" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="screen_point" type="Vector2" /> <description> - Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. </description> </method> <method name="set_cull_mask_value"> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index d084bd4db9..2828896eac 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1037,6 +1037,10 @@ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter" default="0"> Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does. </member> + <member name="mouse_force_pass_scroll_events" type="bool" setter="set_force_pass_scroll_events" getter="is_force_pass_scroll_events" default="true"> + When enabled, scroll wheel events processed by [method _gui_input] will be passed to the parent control even if [member mouse_filter] is set to [constant MOUSE_FILTER_STOP]. As it defaults to true, this allows nested scrollable containers to work out of the box. + You should disable it on the root of your UI if you do not want scroll events to go to the [code]_unhandled_input[/code] processing. + </member> <member name="offset_bottom" type="float" setter="set_offset" getter="get_offset" default="0.0"> Distance between the node's bottom edge and its parent control, based on [member anchor_bottom]. Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node. @@ -1194,10 +1198,10 @@ Show the system's cross mouse cursor when the user hovers the node. </constant> <constant name="CURSOR_WAIT" value="4" enum="CursorShape"> - Show the system's wait mouse cursor, often an hourglass, when the user hovers the node. + Show the system's wait mouse cursor when the user hovers the node. Often an hourglass. </constant> <constant name="CURSOR_BUSY" value="5" enum="CursorShape"> - Show the system's busy mouse cursor when the user hovers the node. Often an hourglass. + Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass. </constant> <constant name="CURSOR_DRAG" value="6" enum="CursorShape"> Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock. @@ -1315,7 +1319,7 @@ The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. </constant> <constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter"> - The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. + The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to `_unhandled_input` for further processing. </constant> <constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter"> The control will not receive mouse button input events through [method _gui_input]. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index 16d0e82a1f..383d33532b 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -38,12 +38,6 @@ Removes all points from the curve. </description> </method> - <method name="get_point_count" qualifiers="const"> - <return type="int" /> - <description> - Returns the number of points describing the curve. - </description> - </method> <method name="get_point_left_mode" qualifiers="const"> <return type="int" enum="Curve.TangentMode" /> <argument index="0" name="index" type="int" /> @@ -159,6 +153,9 @@ <member name="min_value" type="float" setter="set_min_value" getter="get_min_value" default="0.0"> The minimum value the curve can reach. </member> + <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0"> + The number of points describing the curve. + </member> </members> <signals> <signal name="range_changed"> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 94e52912a1..3bba825aaa 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -55,12 +55,6 @@ [code]to_point[/code] must be in this curve's local space. </description> </method> - <method name="get_point_count" qualifiers="const"> - <return type="int" /> - <description> - Returns the number of points describing the curve. - </description> - </method> <method name="get_point_in" qualifiers="const"> <return type="Vector2" /> <argument index="0" name="idx" type="int" /> @@ -155,5 +149,8 @@ <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="5.0"> The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. </member> + <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0"> + The number of points describing the curve. + </member> </members> </class> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index ed642e0ddc..6457d9681e 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -68,12 +68,6 @@ [code]to_point[/code] must be in this curve's local space. </description> </method> - <method name="get_point_count" qualifiers="const"> - <return type="int" /> - <description> - Returns the number of points describing the curve. - </description> - </method> <method name="get_point_in" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="idx" type="int" /> @@ -194,6 +188,9 @@ <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="0.2"> The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. </member> + <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0"> + The number of points describing the curve. + </member> <member name="up_vector_enabled" type="bool" setter="set_up_vector_enabled" getter="is_up_vector_enabled" default="true"> If [code]true[/code], the curve will bake up vectors used for orientation. This is used when [member PathFollow3D.rotation_mode] is set to [constant PathFollow3D.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed. </member> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 300cb4bfd6..402efba34a 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -39,7 +39,16 @@ <method name="is_scanning" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] of the filesystem is being scanned. + Returns [code]true[/code] if the filesystem is being scanned. + </description> + </method> + <method name="reimport_files"> + <return type="void" /> + <argument index="0" name="files" type="PackedStringArray" /> + <description> + Reimports a set of files. Call this if these files or their [code].import[/code] files were directly edited by script or an external program. + If the file type changed or the file was newly created, use [method update_file] or [method scan]. + [b]Note:[/b] This function blocks until the import is finished. However, the main loop iteration, including timers and [method Node._process], will occur during the import process due to progress bar updates. Avoid calls to [method reimport_files] or [method scan] while an import is in progress. </description> </method> <method name="scan"> @@ -58,7 +67,8 @@ <return type="void" /> <argument index="0" name="path" type="String" /> <description> - Update a file information. Call this if an external program (not Godot) modified the file. + Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. + This will not import the file. To reimport, call [method reimport_files] or [method scan] methods. </description> </method> <method name="update_script_classes"> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index 96dea1edce..2ada211dab 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -11,6 +11,9 @@ <members> <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false"> </member> + <member name="hide_slider" type="bool" setter="set_hide_slider" getter="is_hiding_slider" default="false"> + If [code]true[/code], the slider is hidden. + </member> <member name="label" type="String" setter="set_label" getter="get_label" default=""""> </member> <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml index 5577b47c89..e69255cc31 100644 --- a/doc/classes/GPUParticlesAttractor3D.xml +++ b/doc/classes/GPUParticlesAttractor3D.xml @@ -1,19 +1,31 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractor3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Abstract class for 3D particle attractors affecting [GPUParticles3D] nodes. </brief_description> <description> + Particle attractors can be used to attract particles towards the attractor's origin, or to push them away from the attractor's origin. + Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. + Attractors can be temporarily disabled by hiding them, or by setting their [member strength] to [code]0.0[/code]. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0"> + The particle attractor's attenuation. Higher values result in more gradual pushing of particles as they come closer to the attractor's origin. Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges. </member> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> + The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the attractor. By default, all particles are affected by an attractor. + After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. </member> <member name="directionality" type="float" setter="set_directionality" getter="get_directionality" default="0.0"> + Adjusts how directional the attractor is. At [code]0.0[/code], the attractor is not directional at all: it will attract particles towards its center. At [code]1.0[/code], the attractor is fully directional: particles will always be pushed towards local -Z (or +Z if [member strength] is negative). + [b]Note:[/b] If [member directionality] is greater than [code]0.0[/code], the direction in which particles are pushed can be changed by rotating the [GPUParticlesAttractor3D] node. </member> <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> + If [member strength] is negative, particles will be pushed in the reverse direction. Particles will be pushed [i]away[/i] from the attractor's origin if [member directionality] is [code]0.0[/code], or towards local +Z if [member directionality] is greater than [code]0.0[/code]. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorBox3D.xml b/doc/classes/GPUParticlesAttractorBox3D.xml index 3fa8276579..6595428cc2 100644 --- a/doc/classes/GPUParticlesAttractorBox3D.xml +++ b/doc/classes/GPUParticlesAttractorBox3D.xml @@ -1,13 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorBox3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The attractor box's extents in 3D units. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorSphere3D.xml b/doc/classes/GPUParticlesAttractorSphere3D.xml index 2b68637b38..4077937ef3 100644 --- a/doc/classes/GPUParticlesAttractorSphere3D.xml +++ b/doc/classes/GPUParticlesAttractorSphere3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorSphere3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Ellipse-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Ellipse-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The attractor sphere's radius in 3D units. + [b]Note:[/b] Stretched ellipses can be obtained by using non-uniform scaling on the [GPUParticlesAttractorSphere3D] node. </member> </members> </class> diff --git a/doc/classes/GPUParticlesAttractorVectorField3D.xml b/doc/classes/GPUParticlesAttractorVectorField3D.xml index cbf817f407..aeadfaf4ab 100644 --- a/doc/classes/GPUParticlesAttractorVectorField3D.xml +++ b/doc/classes/GPUParticlesAttractorVectorField3D.xml @@ -1,15 +1,22 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesAttractorVectorField3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle attractor with strength varying within the box, affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle attractor with strength varying within the box, affecting [GPUParticles3D] nodes. + Unlike [GPUParticlesAttractorBox3D], [GPUParticlesAttractorVectorField3D] uses a [member texture] to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms. + [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The extents of the vector field box in 3D units. </member> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> + The 3D texture to be used. Values are linearly interpolated between the texture's pixels. + [b]Note:[/b] To get better performance, the 3D texture's resolution should reflect the [member extents] of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml index 45bc9b402b..435f9781f0 100644 --- a/doc/classes/GPUParticlesCollision3D.xml +++ b/doc/classes/GPUParticlesCollision3D.xml @@ -1,13 +1,23 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollision3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Abstract class for 3D particle collision shapes affecting [GPUParticles3D] nodes. </brief_description> <description> + Particle collision shapes can be used to make particles stop or bounce against them. + Particle collision shapes in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is [i]not[/i] supported. + Particle collision shapes can be temporarily disabled by hiding them. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. + [b]Note:[/b] Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting [member GPUParticles3D.fixed_fps] to [code]0[/code] or a value that matches or exceeds the target framerate. </description> <tutorials> </tutorials> <members> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> + The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the collision shape. By default, all particles that have [member ParticlesMaterial.collision_enabled] set to [code]true[/code] will be affected by a collision shape. + After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollisionBox3D.xml b/doc/classes/GPUParticlesCollisionBox3D.xml index 091b4ca730..60d66ca682 100644 --- a/doc/classes/GPUParticlesCollisionBox3D.xml +++ b/doc/classes/GPUParticlesCollisionBox3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionBox3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. </brief_description> <description> + Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision box's extents in 3D units. </member> </members> </class> diff --git a/doc/classes/GPUParticlesCollisionHeightField3D.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml index a7b59ea684..3fcad43efb 100644 --- a/doc/classes/GPUParticlesCollisionHeightField3D.xml +++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml @@ -1,39 +1,59 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionHeightField3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes. + Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than [GPUParticlesCollisionSDF3D], but it doesn't require a baking step. + [GPUParticlesCollisionHeightField3D] can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes [GPUParticlesCollisionHeightField3D] a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, [GPUParticlesCollisionHeightField3D] is not suited for indoor particle collision. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision heightmap's extents in 3D units. To improve heightmap quality, [member extents] should be set as small as possible while covering the parts of the scene you need. </member> <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_enabled" getter="is_follow_camera_enabled" default="false"> + 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]. </member> <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField3D.Resolution" default="2"> + 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. </member> <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField3D.UpdateMode" default="0"> + The update policy to use for the generated heightmap. </member> </members> <constants> <constant name="RESOLUTION_256" value="0" enum="Resolution"> + Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles. </constant> <constant name="RESOLUTION_512" value="1" enum="Resolution"> + Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles. </constant> <constant name="RESOLUTION_1024" value="2" enum="Resolution"> + Generate a 1024×1024 heightmap. Intended for large scenes with distant particles. </constant> <constant name="RESOLUTION_2048" value="3" enum="Resolution"> + Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles. </constant> <constant name="RESOLUTION_4096" value="4" enum="Resolution"> + Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles. </constant> <constant name="RESOLUTION_8192" value="5" enum="Resolution"> + Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles. </constant> <constant name="RESOLUTION_MAX" value="6" enum="Resolution"> + Represents the size of the [enum Resolution] enum. </constant> <constant name="UPDATE_MODE_WHEN_MOVED" value="0" enum="UpdateMode"> + Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction. </constant> <constant name="UPDATE_MODE_ALWAYS" value="1" enum="UpdateMode"> + Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay. </constant> </constants> </class> diff --git a/doc/classes/GPUParticlesCollisionSDF3D.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml index 6f59a18eb5..c9af07288e 100644 --- a/doc/classes/GPUParticlesCollisionSDF3D.xml +++ b/doc/classes/GPUParticlesCollisionSDF3D.xml @@ -1,35 +1,53 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionSDF3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Baked signed distance field 3D particle attractor affecting [GPUParticles3D] nodes. </brief_description> <description> + Baked signed distance field 3D particle attractor affecting [GPUParticles3D] nodes. + Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than [GPUParticlesCollisionHeightField3D], but it requires a baking step. + [b]Baking:[/b] The signed distance field texture can be baked by selecting the [GPUParticlesCollisionSDF3D] node in the editor, then clicking [b]Bake SDF[/b] at the top of the 3D viewport. Any [i]visible[/i] [MeshInstance3D]s touching the [member extents] will be taken into account for baking, regardless of their [member GeometryInstance3D.gi_mode]. + [b]Note:[/b] Baking a [GPUParticlesCollisionSDF3D]'s [member texture] is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked [Texture3D]s into its [member texture] property in an exported project. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> + The collision SDF's extents in 3D units. To improve SDF quality, the [member extents] should be set as small as possible while covering the parts of the scene you need. </member> <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF3D.Resolution" default="2"> + The bake resolution to use for the signed distance field [member texture]. The texture must be baked again for changes to the [member resolution] property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of. </member> <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture"> + The 3D texture representing the signed distance field. </member> <member name="thickness" type="float" setter="set_thickness" getter="get_thickness" default="1.0"> + The collision shape's thickness. Unlike other particle colliders, [GPUParticlesCollisionSDF3D] is actually hollow on the inside. [member thickness] can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the [GPUParticlesCollisionSDF3D] is moved. </member> </members> <constants> <constant name="RESOLUTION_16" value="0" enum="Resolution"> + Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise. </constant> <constant name="RESOLUTION_32" value="1" enum="Resolution"> + Bake a 32×32×32 signed distance field. </constant> <constant name="RESOLUTION_64" value="2" enum="Resolution"> + Bake a 64×64×64 signed distance field. </constant> <constant name="RESOLUTION_128" value="3" enum="Resolution"> + Bake a 128×128×128 signed distance field. </constant> <constant name="RESOLUTION_256" value="4" enum="Resolution"> + Bake a 256×256×256 signed distance field. </constant> <constant name="RESOLUTION_512" value="5" enum="Resolution"> + Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise. </constant> <constant name="RESOLUTION_MAX" value="6" enum="Resolution"> + Represents the size of the [enum Resolution] enum. </constant> </constants> </class> diff --git a/doc/classes/GPUParticlesCollisionSphere3D.xml b/doc/classes/GPUParticlesCollisionSphere3D.xml index b78e114d09..6651a732da 100644 --- a/doc/classes/GPUParticlesCollisionSphere3D.xml +++ b/doc/classes/GPUParticlesCollisionSphere3D.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GPUParticlesCollisionSphere3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. </brief_description> <description> + Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> </tutorials> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The collision sphere's radius in 3D units. </member> </members> </class> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index e699a40ea0..02352ca808 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -296,8 +296,9 @@ </description> </signal> <signal name="delete_nodes_request"> + <argument index="0" name="nodes" type="StringName[]" /> <description> - Emitted when a GraphNode is attempted to be removed from the GraphEdit. + Emitted when a GraphNode is attempted to be removed from the GraphEdit. Provides a list of node names to be removed (all selected nodes, excluding nodes without closing button). </description> </signal> <signal name="disconnection_request"> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 173da63a15..5f0dca0402 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -119,6 +119,13 @@ Returns the right (output) type of the slot [code]idx[/code]. </description> </method> + <method name="is_slot_draw_stylebox" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> + <description> + Returns true if the background [StyleBox] of the slot [code]idx[/code] is drawn. + </description> + </method> <method name="is_slot_enabled_left" qualifiers="const"> <return type="bool" /> <argument index="0" name="idx" type="int" /> @@ -152,6 +159,7 @@ <argument index="6" name="color_right" type="Color" /> <argument index="7" name="custom_left" type="Texture2D" default="null" /> <argument index="8" name="custom_right" type="Texture2D" default="null" /> + <argument index="9" name="enable" type="bool" default="true" /> <description> Sets properties of the slot with ID [code]idx[/code]. If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side. @@ -178,6 +186,14 @@ Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code]. </description> </method> + <method name="set_slot_draw_stylebox"> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="draw_stylebox" type="bool" /> + <description> + Toggles the background [StyleBox] of the slot [code]idx[/code]. + </description> + </method> <method name="set_slot_enabled_left"> <return type="void" /> <argument index="0" name="idx" type="int" /> @@ -301,6 +317,8 @@ <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)"> Color of the title text. </theme_item> + <theme_item name="close_h_offset" data_type="constant" type="int" default="22"> + </theme_item> <theme_item name="close_offset" data_type="constant" type="int" default="22"> The vertical offset of the close button. </theme_item> @@ -343,5 +361,8 @@ <theme_item name="selected_frame" data_type="style" type="StyleBox"> The background used when the [GraphNode] is selected. </theme_item> + <theme_item name="slot" data_type="style" type="StyleBox"> + The [StyleBox] used for each slot of the [GraphNode]. + </theme_item> </theme_items> </class> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 948c4b253f..2a4381b41b 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -428,10 +428,10 @@ Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. </constant> <constant name="CURSOR_WAIT" value="4" enum="CursorShape"> - Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. + Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). </constant> <constant name="CURSOR_BUSY" value="5" enum="CursorShape"> - Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). + Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. </constant> <constant name="CURSOR_DRAG" value="6" enum="CursorShape"> Drag cursor. Usually displayed when dragging something. diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml index 1bd52ab2dc..c4d02e6101 100644 --- a/doc/classes/Label3D.xml +++ b/doc/classes/Label3D.xml @@ -78,7 +78,7 @@ Font size of the [Label3D]'s text. </member> <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="1"> - Controls the text's horizontal alignment. Supports left, center, right. Set it to one of the [enum HorizontalAlignment] constants. + Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. </member> <member name="language" type="String" setter="set_language" getter="get_language" default=""""> Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index 1cffb1a627..36588ce2f5 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -1,8 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="NavigationMeshGenerator" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Helper class for creating and clearing navigation meshes. </brief_description> <description> + This class is responsible for creating and clearing 3D navigation meshes used as [NavigationMesh] resources inside [NavigationRegion3D]. The [NavigationMeshGenerator] has very limited to no use for 2D as the navigation mesh baking process expects 3D node types and 3D source geometry to parse. + The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations. + Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area. + The finalized navigation mesh is then returned and stored inside the [NavigationMesh] for use as a resource inside [NavigationRegion3D] nodes. </description> <tutorials> </tutorials> @@ -12,12 +17,14 @@ <argument index="0" name="nav_mesh" type="NavigationMesh" /> <argument index="1" name="root_node" type="Node" /> <description> + Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child nodes under the provided [code]root_node[/code] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry/parsed_geometry_type] and [member NavigationMesh.geometry/source_geometry_mode] properties on the [NavigationMesh] resource. </description> </method> <method name="clear"> <return type="void" /> <argument index="0" name="nav_mesh" type="NavigationMesh" /> <description> + Removes all polygons and vertices from the provided [code]nav_mesh[/code] resource. </description> </method> </methods> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index 2540c56258..f3690ce8a7 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -8,6 +8,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this obstacle on the [NavigationServer2D]. + </description> + </method> + </methods> <members> <member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true"> Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml index f9489db5f1..e6ea70b91a 100644 --- a/doc/classes/NavigationObstacle3D.xml +++ b/doc/classes/NavigationObstacle3D.xml @@ -8,6 +8,14 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of this obstacle on the [NavigationServer3D]. + </description> + </method> + </methods> <members> <member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true"> Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 60f1020286..42f0e0c5d9 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -14,7 +14,7 @@ <return type="void" /> <argument index="0" name="on_thread" type="bool" default="true" /> <description> - Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. + Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled). </description> </method> <method name="get_region_rid" qualifiers="const"> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index e007dfd9b5..928834101f 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -21,6 +21,13 @@ Creates the agent. </description> </method> + <method name="agent_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="agent" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to. + </description> + </method> <method name="agent_is_map_changed" qualifiers="const"> <return type="bool" /> <argument index="0" name="agent" type="RID" /> @@ -123,6 +130,13 @@ Create a new map. </description> </method> + <method name="map_get_agents" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_cell_size" qualifiers="const"> <return type="float" /> <argument index="0" name="map" type="RID" /> @@ -164,6 +178,13 @@ Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> + <method name="map_get_regions" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_is_active" qualifiers="const"> <return type="bool" /> <argument index="0" name="nap" type="RID" /> @@ -231,6 +252,13 @@ Returns the region's layers. </description> </method> + <method name="region_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index c987bc9042..8c83fe5485 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -21,6 +21,13 @@ Creates the agent. </description> </method> + <method name="agent_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="agent" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to. + </description> + </method> <method name="agent_is_map_changed" qualifiers="const"> <return type="bool" /> <argument index="0" name="agent" type="RID" /> @@ -123,6 +130,13 @@ Create a new map. </description> </method> + <method name="map_get_agents" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_cell_size" qualifiers="const"> <return type="float" /> <argument index="0" name="map" type="RID" /> @@ -182,6 +196,13 @@ Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> + <method name="map_get_regions" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="map" type="RID" /> + <description> + Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code]. + </description> + </method> <method name="map_get_up" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="map" type="RID" /> @@ -281,6 +302,13 @@ Returns the region's layers. </description> </method> + <method name="region_get_map" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index bcaf38fd06..01da9cb9a2 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -6,8 +6,8 @@ <description> This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel. By using the [method get_monitor] method of this class, you can access this data from your code. You can add custom monitors using the [method add_custom_monitor] method. Custom monitors are available in [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel together with built-in monitors. - [b]Note:[/b] A few of these monitors are only available in debug mode and will always return 0 when used in a release build. - [b]Note:[/b] Many of these monitors are not updated in real-time, so there may be a short delay between changes. + [b]Note:[/b] Some of the built-in monitors are only available in debug mode and will always return [code]0[/code] when used in a project exported in release mode. + [b]Note:[/b] Some of the built-in monitors are not updated in real-time for performance reasons, so there may be a delay of up to 1 second between changes. [b]Note:[/b] Custom monitors do not support negative values. Negative values are clamped to 0. </description> <tutorials> @@ -19,7 +19,7 @@ <argument index="1" name="callable" type="Callable" /> <argument index="2" name="arguments" type="Array" default="[]" /> <description> - Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom". + Adds a custom monitor with the name [code]id[/code]. You can specify the category of the monitor using slash delimiters in [code]id[/code] (for example: [code]"Game/NumberOfNPCs"[/code]). If there is more than one slash delimiter, then the default category is used. The default category is [code]"Custom"[/code]. Prints an error if given [code]id[/code] is already present. [codeblocks] [gdscript] func _ready(): @@ -29,11 +29,11 @@ Performance.add_custom_monitor("MyCategory/MyMonitor", monitor_value) # Adds monitor with name "MyName" to category "Custom". - # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid. + # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different IDs, so the code is valid. Performance.add_custom_monitor("MyMonitor", monitor_value) # Adds monitor with name "MyName" to category "Custom". - # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid. + # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different IDs, so the code is valid. Performance.add_custom_monitor("Custom/MyMonitor", monitor_value) # Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom". @@ -67,30 +67,28 @@ } [/csharp] [/codeblocks] - The debugger calls the callable to get the value of custom monitor. The callable must return a number. + The debugger calls the callable to get the value of custom monitor. The callable must return a zero or positive integer or floating-point number. Callables are called with arguments supplied in argument array. - [b]Note:[/b] It prints an error if given id is already present. </description> </method> <method name="get_custom_monitor"> <return type="Variant" /> <argument index="0" name="id" type="StringName" /> <description> - Returns the value of custom monitor with given id. The callable is called to get the value of custom monitor. - [b]Note:[/b] It prints an error if the given id is absent. + Returns the value of custom monitor with given [code]id[/code]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [code]id[/code] is absent. </description> </method> <method name="get_custom_monitor_names"> <return type="Array" /> <description> - Returns the names of active custom monitors in an array. + Returns the names of active custom monitors in an [Array]. </description> </method> <method name="get_monitor" qualifiers="const"> <return type="float" /> <argument index="0" name="monitor" type="int" enum="Performance.Monitor" /> <description> - Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this: + Returns the value of one of the available built-in monitors. You should provide one of the [enum Monitor] constants as the argument, like this: [codeblocks] [gdscript] print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console. @@ -99,95 +97,99 @@ GD.Print(Performance.GetMonitor(Performance.Monitor.TimeFps)); // Prints the FPS to the console. [/csharp] [/codeblocks] + See [method get_custom_monitor] to query custom performance monitors' values. </description> </method> <method name="get_monitor_modification_time"> <return type="int" /> <description> - Returns the last tick in which custom monitor was added/removed. + Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to [method Time.get_ticks_usec] when the monitor is updated. </description> </method> <method name="has_custom_monitor"> <return type="bool" /> <argument index="0" name="id" type="StringName" /> <description> - Returns true if custom monitor with the given id is present otherwise returns false. + Returns [code]true[/code] if custom monitor with the given [code]id[/code] is present, [code]false[/code] otherwise. </description> </method> <method name="remove_custom_monitor"> <return type="void" /> <argument index="0" name="id" type="StringName" /> <description> - Removes the custom monitor with given id. - [b]Note:[/b] It prints an error if the given id is already absent. + Removes the custom monitor with given [code]id[/code]. Prints an error if the given [code]id[/code] is already absent. </description> </method> </methods> <constants> <constant name="TIME_FPS" value="0" enum="Monitor"> - Number of frames per second. + The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. [i]Higher is better.[/i] </constant> <constant name="TIME_PROCESS" value="1" enum="Monitor"> - Time it took to complete one frame, in seconds. + Time it took to complete one frame, in seconds. [i]Lower is better.[/i] </constant> <constant name="TIME_PHYSICS_PROCESS" value="2" enum="Monitor"> - Time it took to complete one physics frame, in seconds. + Time it took to complete one physics frame, in seconds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_STATIC" value="3" enum="Monitor"> - Static memory currently used, in bytes. Not available in release builds. + Static memory currently used, in bytes. Not available in release builds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor"> - Available static memory. Not available in release builds. + Available static memory. Not available in release builds. [i]Lower is better.[/i] </constant> <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor"> - Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. + Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. [i]Lower is better.[/i] </constant> <constant name="OBJECT_COUNT" value="6" enum="Monitor"> - Number of objects currently instantiated (including nodes). + Number of objects currently instantiated (including nodes). [i]Lower is better.[/i] </constant> <constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor"> - Number of resources currently used. + Number of resources currently used. [i]Lower is better.[/i] </constant> <constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor"> - Number of nodes currently instantiated in the scene tree. This also includes the root node. + Number of nodes currently instantiated in the scene tree. This also includes the root node. [i]Lower is better.[/i] </constant> <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor"> - Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. + Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_OBJECTS_IN_FRAME" value="10" enum="Monitor"> + The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_PRIMITIVES_IN_FRAME" value="11" enum="Monitor"> + The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). [i]Lower is better.[/i] </constant> <constant name="RENDER_TOTAL_DRAW_CALLS_IN_FRAME" value="12" enum="Monitor"> + The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. [i]Lower is better.[/i] </constant> <constant name="RENDER_VIDEO_MEM_USED" value="13" enum="Monitor"> - The amount of video memory used, i.e. texture and vertex memory combined. + The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of [constant RENDER_TEXTURE_MEM_USED] and [constant RENDER_BUFFER_MEM_USED]. [i]Lower is better.[/i] </constant> <constant name="RENDER_TEXTURE_MEM_USED" value="14" enum="Monitor"> - The amount of texture memory used. + The amount of texture memory used (in bytes). [i]Lower is better.[/i] </constant> <constant name="RENDER_BUFFER_MEM_USED" value="15" enum="Monitor"> + The amount of render buffer memory used (in bytes). [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="16" enum="Monitor"> - Number of active [RigidDynamicBody2D] nodes in the game. + Number of active [RigidDynamicBody2D] nodes in the game. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_COLLISION_PAIRS" value="17" enum="Monitor"> - Number of collision pairs in the 2D physics engine. + Number of collision pairs in the 2D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_2D_ISLAND_COUNT" value="18" enum="Monitor"> - Number of islands in the 2D physics engine. + Number of islands in the 2D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="19" enum="Monitor"> - Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game. + Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_COLLISION_PAIRS" value="20" enum="Monitor"> - Number of collision pairs in the 3D physics engine. + Number of collision pairs in the 3D physics engine. [i]Lower is better.[/i] </constant> <constant name="PHYSICS_3D_ISLAND_COUNT" value="21" enum="Monitor"> - Number of islands in the 3D physics engine. + Number of islands in the 3D physics engine. [i]Lower is better.[/i] </constant> <constant name="AUDIO_OUTPUT_LATENCY" value="22" enum="Monitor"> - Output latency of the [AudioServer]. + Output latency of the [AudioServer]. [i]Lower is better.[/i] </constant> <constant name="MONITOR_MAX" value="23" enum="Monitor"> Represents the size of the [enum Monitor] enum. diff --git a/doc/classes/PhysicsTestMotionParameters2D.xml b/doc/classes/PhysicsTestMotionParameters2D.xml index c22a49edf7..00f21a2058 100644 --- a/doc/classes/PhysicsTestMotionParameters2D.xml +++ b/doc/classes/PhysicsTestMotionParameters2D.xml @@ -28,5 +28,9 @@ <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2(0, 0)"> Motion vector to define the length and direction of the motion to test. </member> + <member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false"> + If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [method CharacterBody2D.move_and_slide] for improving floor detection when floor snapping is disabled. + If set to [code]false[/code], only collisions resulting from the motion are reported; this is used e.g. by [method PhysicsBody2D.move_and_collide]. + </member> </members> </class> diff --git a/doc/classes/PhysicsTestMotionParameters3D.xml b/doc/classes/PhysicsTestMotionParameters3D.xml index 4ff07de7aa..5b07796a10 100644 --- a/doc/classes/PhysicsTestMotionParameters3D.xml +++ b/doc/classes/PhysicsTestMotionParameters3D.xml @@ -31,5 +31,9 @@ <member name="motion" type="Vector3" setter="set_motion" getter="get_motion" default="Vector3(0, 0, 0)"> Motion vector to define the length and direction of the motion to test. </member> + <member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false"> + If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [method CharacterBody3D.move_and_slide] for improving floor detection when floor snapping is disabled. + If set to [code]false[/code], only collisions resulting from the motion are detected; this is used e.g. by [method PhysicsBody3D.move_and_collide]. + </member> </members> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b54c129369..7f3c0ea6d9 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1723,13 +1723,13 @@ <member name="rendering/limits/global_shader_variables/buffer_size" type="int" setter="" getter="" default="65536"> </member> <member name="rendering/limits/opengl/max_lights_per_object" type="int" setter="" getter="" default="8"> - Max number of lights renderable per object. This is further limited by hardware support. Setting this low will slightly reduce memory usage, may decrease shader compile times, and may result in faster rendering on low-end, mobile, or web devices. + Max number of omnilights and spotlights renderable per object. At the default value of 8, this means that each surface can be affected by up to 8 omnilights and 8 spotlights. This is further limited by hardware support and [member rendering/limits/opengl/max_renderable_lights]. Setting this low will slightly reduce memory usage, may decrease shader compile times, and may result in faster rendering on low-end, mobile, or web devices. </member> <member name="rendering/limits/opengl/max_renderable_elements" type="int" setter="" getter="" default="65536"> Max amount of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. </member> - <member name="rendering/limits/opengl/max_renderable_lights" type="int" setter="" getter="" default="256"> - Max number of lights renderable in a frame. If more lights than this number are used, they will be ignored. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. + <member name="rendering/limits/opengl/max_renderable_lights" type="int" setter="" getter="" default="32"> + Max number of positional lights renderable in a frame. If more lights than this number are used, they will be ignored. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. </member> <member name="rendering/limits/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000"> </member> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 62a692d4a7..c481fa30c2 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -60,6 +60,7 @@ <argument index="0" name="character" type="int" /> <description> Returns the line number of the character position provided. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_character_paragraph"> @@ -67,24 +68,28 @@ <argument index="0" name="character" type="int" /> <description> Returns the paragraph number of the character position provided. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_content_height" qualifiers="const"> <return type="int" /> <description> Returns the height of the content. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_content_width" qualifiers="const"> <return type="int" /> <description> Returns the width of the content. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_line_count" qualifiers="const"> <return type="int" /> <description> Returns the total number of lines in the text. Wrapped text is counted as multiple lines. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_line_offset"> @@ -92,6 +97,7 @@ <argument index="0" name="line" type="int" /> <description> Returns the vertical offset of the line found at the provided index. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_menu" qualifiers="const"> @@ -112,6 +118,7 @@ <argument index="0" name="paragraph" type="int" /> <description> Returns the vertical offset of the paragraph found at the provided index. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_parsed_text" qualifiers="const"> @@ -155,12 +162,14 @@ <return type="int" /> <description> Returns the number of visible lines. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_visible_paragraph_count" qualifiers="const"> <return type="int" /> <description> Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="install_effect"> @@ -176,6 +185,12 @@ Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). </description> </method> + <method name="is_ready" qualifiers="const"> + <return type="bool" /> + <description> + If [member threaded] is enabled, returns [code]true[/code] if the background thread has finished text processing, otherwise always return [code]true[/code]. + </description> + </method> <method name="newline"> <return type="void" /> <description> @@ -476,6 +491,10 @@ The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count]. </member> + <member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000"> + The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely. + [b]Note:[/b] Progress bar is dislayed only if [member threaded] is enabled. + </member> <member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true"> If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line]. </member> @@ -504,6 +523,9 @@ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> Base text writing direction. </member> + <member name="threaded" type="bool" setter="set_threaded" getter="is_threaded" default="false"> + If [code]true[/code], text processing is done in a background thread. + </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed. [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count]. @@ -513,6 +535,11 @@ </member> </members> <signals> + <signal name="finished"> + <description> + Triggered when the document is fully loaded. + </description> + </signal> <signal name="meta_clicked"> <argument index="0" name="meta" type="Variant" /> <description> diff --git a/doc/classes/TextMesh.xml b/doc/classes/TextMesh.xml new file mode 100644 index 0000000000..5a1501d2ca --- /dev/null +++ b/doc/classes/TextMesh.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TextMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Generate an [PrimitiveMesh] from the text. + </brief_description> + <description> + Generate an [PrimitiveMesh] from the text. + TextMesh can be generated only when using dynamic fonts with vector glyph contours. Bitmap fonts (including bitmap data in the TrueType/OpenType containers, like color emoji fonts) are not supported. + The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the height for the front face, 40% for the back face, 10% for the outer edges and 10% for the inner edges. + </description> + <tutorials> + </tutorials> + <methods> + <method name="clear_opentype_features"> + <return type="void" /> + <description> + Removes all OpenType features. + </description> + </method> + <method name="get_opentype_feature" qualifiers="const"> + <return type="int" /> + <argument index="0" name="tag" type="String" /> + <description> + Returns OpenType feature [code]tag[/code]. + </description> + </method> + <method name="set_opentype_feature"> + <return type="void" /> + <argument index="0" name="tag" type="String" /> + <argument index="1" name="value" type="int" /> + <description> + Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. + </description> + </method> + </methods> + <members> + <member name="curve_step" type="float" setter="set_curve_step" getter="get_curve_step" default="0.5"> + Step (in pixels) used to approximate Bézier curves. + </member> + <member name="depth" type="float" setter="set_depth" getter="get_depth" default="0.05"> + Depths of the mesh, if set to [code]0.0[/code] only front surface, is generated, and UV layout is changed to use full texture for the front face only. + </member> + <member name="font" type="Font" setter="set_font" getter="get_font"> + [Font] used for the [TextMesh]'s text. + </member> + <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16"> + Font size of the [TextMesh]'s text. + </member> + <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="1"> + Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. + </member> + <member name="language" type="String" setter="set_language" getter="get_language" default=""""> + Language code used for text shaping algorithms, if left empty current locale is used instead. + </member> + <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01"> + The size of one pixel's width on the text to scale it in 3D. + </member> + <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0"> + Set BiDi algorithm override for the structured text. + </member> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]"> + Set additional options for BiDi override. + </member> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> + The text to generate mesh from. + </member> + <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="TextServer.Direction" default="0"> + Base text writing direction. + </member> + <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false"> + If [code]true[/code], all the text displays as UPPERCASE. + </member> + <member name="width" type="float" setter="set_width" getter="get_width" default="500.0"> + Text width (in pixels), used for fill alignment. + </member> + </members> +</class> diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml index 1ba86c633d..330a405d5f 100644 --- a/doc/classes/VehicleBody3D.xml +++ b/doc/classes/VehicleBody3D.xml @@ -22,7 +22,7 @@ </member> <member name="mass" type="float" setter="set_mass" getter="get_mass" overrides="RigidDynamicBody3D" default="40.0" /> <member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0"> - The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated. + The steering angle for the vehicle, in radians. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated. </member> </members> </class> diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml index 7fc59722e1..1c164d7c9a 100644 --- a/doc/classes/VehicleWheel3D.xml +++ b/doc/classes/VehicleWheel3D.xml @@ -53,7 +53,7 @@ A negative value will result in the wheel reversing. </member> <member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0"> - The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving. + The steering angle for the wheel, in radians. Setting this to a non-zero value will result in the vehicle turning when it's moving. </member> <member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force" default="6000.0"> The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidDynamicBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 78a681d92a..2468042850 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -66,6 +66,7 @@ <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask"> The render layer(s) this [VisualInstance3D] is drawn on. This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. + For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal. </member> </members> </class> diff --git a/doc/translations/ar.po b/doc/translations/ar.po index 41f1f50d6b..9c160cb499 100644 --- a/doc/translations/ar.po +++ b/doc/translations/ar.po @@ -1017,11 +1017,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1065,37 +1066,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4197,17 +4197,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4235,9 +4242,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4261,8 +4268,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4314,6 +4324,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4830,11 +4850,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5870,7 +5890,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7060,7 +7083,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7105,10 +7131,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7246,11 +7276,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8385,7 +8419,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8607,7 +8641,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11721,17 +11755,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13983,7 +14017,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14079,7 +14115,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22495,6 +22533,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "ÙŠÙØ±Ø¬Ø¹ جيب التمام \"cosine \" لقيمة المَعلم." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26082,9 +26125,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34614,13 +34670,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35332,6 +35388,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35401,6 +35463,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "ÙŠÙØ±Ø¬Ø¹ قيمة الجيب العكسية للمَعلم." @@ -35428,6 +35496,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "ÙŠÙØ±Ø¬Ø¹ جيب التمام \"cosine \" لقيمة المَعلم." @@ -35451,6 +35525,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "ÙŠÙØ±Ø¬Ø¹ جيب المَعلم." @@ -35929,19 +36009,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "ÙŠÙØ±Ø¬Ø¹ جيب المَعلم." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -35960,7 +36081,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36006,6 +36130,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "ÙŠÙØ±Ø¬Ø¹ جيب المَعلم." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36042,6 +36171,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "ÙŠÙØ±Ø¬Ø¹ جيب المَعلم." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37230,7 +37364,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37238,8 +37372,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37533,14 +37667,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37673,6 +37799,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37834,6 +37969,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39075,7 +39228,7 @@ msgstr "ÙŠÙØ±Ø¬Ø¹ جيب المَعلم." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39097,7 +39250,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44450,6 +44604,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45244,6 +45407,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48690,19 +48857,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53534,8 +53688,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53556,8 +53717,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/ca.po b/doc/translations/ca.po index eb82d850ee..9b721874b7 100644 --- a/doc/translations/ca.po +++ b/doc/translations/ca.po @@ -1047,11 +1047,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1095,37 +1096,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4220,17 +4220,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4258,9 +4265,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4284,8 +4291,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4337,6 +4347,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4852,11 +4872,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5891,7 +5911,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7081,7 +7104,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7126,10 +7152,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7267,11 +7297,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8406,7 +8440,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8628,7 +8662,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11739,17 +11773,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13998,7 +14032,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14094,7 +14130,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22500,6 +22538,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26084,9 +26126,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34608,13 +34663,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35320,6 +35375,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35383,6 +35444,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35409,6 +35476,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35430,6 +35503,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35902,17 +35981,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35933,7 +36052,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35979,6 +36101,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36015,6 +36141,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37199,7 +37329,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37207,8 +37337,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37502,14 +37632,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37642,6 +37764,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37803,6 +37934,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39043,7 +39192,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39065,7 +39214,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44392,6 +44542,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45185,6 +45344,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48630,19 +48793,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53472,8 +53622,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53494,8 +53651,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot index 067a49c93d..0068c04766 100644 --- a/doc/translations/classes.pot +++ b/doc/translations/classes.pot @@ -927,11 +927,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -975,37 +976,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4100,17 +4100,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4138,9 +4145,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4164,8 +4171,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4217,6 +4227,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4732,11 +4752,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5771,7 +5791,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6961,7 +6984,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7006,10 +7032,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7147,11 +7177,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8286,7 +8320,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8508,7 +8542,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11619,17 +11653,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13878,7 +13912,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13974,7 +14010,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22380,6 +22418,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25961,9 +26003,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34485,13 +34540,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35197,6 +35252,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35260,6 +35321,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35286,6 +35353,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35307,6 +35380,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35779,17 +35858,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35810,7 +35929,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35856,6 +35978,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35892,6 +36018,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37076,7 +37206,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37084,8 +37214,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37379,14 +37509,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37519,6 +37641,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37680,6 +37811,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38920,7 +39069,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38942,7 +39091,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44269,6 +44419,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45062,6 +45221,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48507,19 +48670,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53349,8 +53499,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53371,8 +53528,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/cs.po b/doc/translations/cs.po index 6315c89af2..bfa9be6259 100644 --- a/doc/translations/cs.po +++ b/doc/translations/cs.po @@ -1357,12 +1357,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Náhodný rozptyl, jakákoliv hodnota ÄÃsla s plovoucà řádkou (float, double) " "mezi hodnotami [code]od[/code] a [code]do[/code].\n" @@ -1427,37 +1429,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4604,17 +4605,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4642,9 +4650,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4668,8 +4676,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4721,6 +4732,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5237,11 +5258,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -6277,7 +6298,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7469,7 +7493,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7514,10 +7541,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7655,11 +7686,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8795,7 +8830,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -9017,7 +9052,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12138,17 +12173,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14405,7 +14440,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14501,7 +14538,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22952,6 +22991,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Vrátà [code] true [/code], pokud je vektor normalizován, jinak false." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26539,9 +26583,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -35079,13 +35136,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35798,6 +35855,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "Vrátà [code] true [/code], pokud je vektor normalizován, jinak false." @@ -35868,6 +35931,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Vrátà arkus sinus parametru." @@ -35895,6 +35964,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Vrátà [code] true [/code], pokud je vektor normalizován, jinak false." @@ -35918,6 +35993,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Vrátà sinus parametru." @@ -36398,19 +36479,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Vracà [code]true[/code] pokud [code]s[/code] je nula nebo téměř nula." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -36429,7 +36551,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36475,6 +36600,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Vrátà sinus parametru." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36511,6 +36641,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Vrátà sinus parametru." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37699,7 +37834,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37707,8 +37842,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -38002,14 +38137,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -38142,6 +38269,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38303,6 +38439,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39547,7 +39701,7 @@ msgstr "Vracà [code]true[/code] pokud [code]s[/code] je nula nebo téměř nula #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39569,7 +39723,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44930,6 +45085,18 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" +"Vracà [code]true[/code] pokud si jsou [code]a[/code] a [code]b[/code] " +"pÅ™iblÞnÄ› rovny." + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45726,6 +45893,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -49172,19 +49343,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -54024,8 +54182,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -54046,8 +54211,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/de.po b/doc/translations/de.po index eb6e3b1886..10d5d2f52c 100644 --- a/doc/translations/de.po +++ b/doc/translations/de.po @@ -46,12 +46,13 @@ # Robin <robin.janzen@gmx.net>, 2022. # Andreas <self@andreasbresser.de>, 2022. # Christian Packenius <christian@packenius.com>, 2022. +# Hannes Petersen <01zustrom.baklava@icloud.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-04-30 17:12+0000\n" -"Last-Translator: Christian Packenius <christian@packenius.com>\n" +"PO-Revision-Date: 2022-05-13 19:27+0000\n" +"Last-Translator: Hannes Petersen <01zustrom.baklava@icloud.com>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/de/>\n" "Language: de\n" @@ -59,7 +60,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -103,7 +104,7 @@ msgstr "Methoden-Beschreibung" #: doc/tools/make_rst.py msgid "Theme Property Descriptions" -msgstr "Theme-Eigenschaften-Beschreibung" +msgstr "Beschreibung der Theme-Eigenschaften" #: doc/tools/make_rst.py msgid "Inherits:" @@ -123,7 +124,7 @@ msgstr "Standard" #: doc/tools/make_rst.py msgid "Setter" -msgstr "Setter" +msgstr "Wert-Zuweiser" #: doc/tools/make_rst.py msgid "value" @@ -131,7 +132,7 @@ msgstr "Wert" #: doc/tools/make_rst.py msgid "Getter" -msgstr "Getter" +msgstr "Wert-Abrufer" #: doc/tools/make_rst.py msgid "" @@ -143,7 +144,7 @@ msgid "" "This method has no side effects. It doesn't modify any of the instance's " "member variables." msgstr "" -"Diese Methode verursacht keine Seiteneffekte. Variablen der betroffenen " +"Diese Methode löst keine Seiteneffekte aus. Variablen der betroffenen " "Instanz bleiben unverändert." #: doc/tools/make_rst.py @@ -151,11 +152,11 @@ msgid "" "This method accepts any number of arguments after the ones described here." msgstr "" "Diese Methode nimmt eine beliebige Anzahl an Argumenten nach Ende der hier " -"beschriebenen auf." +"beschriebenen Argumente auf." #: doc/tools/make_rst.py msgid "This method is used to construct a type." -msgstr "Diese Methode wird dazu verwendet, einen Typ zu konstruieren." +msgstr "Diese Methode wird dazu verwendet, einen Typen zu konstruieren." #: doc/tools/make_rst.py msgid "" @@ -1533,12 +1534,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Gibt einen Zufallswert zwischen [code]from[/code] und [code]to[/code] " "zurück.\n" @@ -1617,37 +1620,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -1656,45 +1658,6 @@ msgid "" "3\n" "[/codeblock]" msgstr "" -"Gibt zurück ein Array mit der angegebenen Reichweite. Range kann 1 Argument " -"[code]N[/code] (0 bis [code]N[/code] - 1), zwei Argumente ([code]initial[/" -"code], [code]final - 1[/code]) oder drei Argumente ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]) aufnehmen. Gibt ein leeres " -"Array zurück, falls die Reichweite ungültig ist (z.B. [code]range(2, 5, -1)[/" -"code] oder [code]range(5, 5, 1)[/code]).\n" -"Gibt zurück ein Array mit der angegebenen Reichweite. [code]range()[/code] " -"kann 1 Argument N ([code]0[/code] bis [code]N - 1[/code]), zwei Argumente " -"([code]initial[/code], [code]final - 1[/code]) oder drei Argumente " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]) " -"aufnehmen. [code]increment[/code] darf negativ sein. Ist [code]increment[/" -"code] negativ, wird [code]final - 1[/code] zu [code]final + 1[/code]. Ferner " -"muss, damit die Schleife durchlaufen werden kann, der Initialwert größer " -"sein als der Finalwert.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Ausgabe:\n" -"[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" -"[/codeblock]\n" -"Um rückwärts durch ein [Array] zu iterieren:\n" -"[codeblock]\n" -"var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" -"[/codeblock]\n" -"Ausgabe:\n" -"[codeblock]\n" -"9\n" -"6\n" -"3\n" -"[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -3973,6 +3936,8 @@ msgid "" "MIDI note ON message. See the documentation of [InputEventMIDI] for " "information of how to use MIDI inputs." msgstr "" +"MIDI Noten ON Mitteilung. Weitere Informationen, wie MIDI Eingaben verwendet " +"werden, können der Dokumentation von [InputEventMIDI] entnommen werden." #: doc/classes/@GlobalScope.xml msgid "" @@ -3985,6 +3950,9 @@ msgid "" "MIDI control change message. This message is sent when a controller value " "changes. Controllers include devices such as pedals and levers." msgstr "" +"Änderungsmitteilung für eine MIDI-Steuerungseinheit. Diese Mitteilung wird " +"gesendet, sollte sich der Wert einer Steuerungseinheit ändern. " +"Steuerungseinheiten sind zum Beispiel Pedale und Schalter." #: doc/classes/@GlobalScope.xml msgid "" @@ -4028,6 +3996,9 @@ msgid "" "MIDI song select message. Specifies which sequence or song is to be played. " "Getting this data is not implemented in Godot." msgstr "" +"MIDI Mitteilung für Songauswahl. Legt fest, welche Musik-Sequenz oder " +"welcher Song abgespielt werden soll. Das Abrufen dieser Daten ist nicht in " +"Godot implementiert." #: doc/classes/@GlobalScope.xml msgid "" @@ -4040,20 +4011,26 @@ msgid "" "MIDI timing clock message. Sent 24 times per quarter note when " "synchronization is required." msgstr "" +"MIDI Mitteilung zum Uhr-Timing. Diese Mitteilung wird 24 Mal pro Viertelnote " +"gesendet, sollte eine Synchronisation erforderlich sein." #: doc/classes/@GlobalScope.xml msgid "" "MIDI start message. Start the current sequence playing. This message will be " "followed with Timing Clocks." msgstr "" +"MIDI Start-Mitteilung. Startet die Wiedergabe der aktuellen Sequenz. Dieser " +"Mitteilung folgen die Uhr-Timings." #: doc/classes/@GlobalScope.xml msgid "MIDI continue message. Continue at the point the sequence was stopped." msgstr "" +"MIDI Wiederaufnahme-Mitteilung. Die Wiedergabe der Sequenz wird an dem Punkt " +"fortgesetzt, an dem die Wiedergabe gestoppt wurde." #: doc/classes/@GlobalScope.xml msgid "MIDI stop message. Stop the current sequence." -msgstr "" +msgstr "MIDI Stop-Mitteilung. Stoppt die Wiedergabe der aktuellen Sequenz." #: doc/classes/@GlobalScope.xml msgid "" @@ -4066,6 +4043,9 @@ msgid "" "MIDI system reset message. Reset all receivers in the system to power-up " "status. It should not be sent on power-up itself." msgstr "" +"MIDI System-Reset Mitteilung. Reset aller Empfänger im System in den " +"Hochfahren-Status. Diese Mitteilung sollte nicht zum Starten der Empfänger " +"selbst genutzt werden." #: doc/classes/@GlobalScope.xml msgid "" @@ -4843,7 +4823,7 @@ msgstr "" #: doc/classes/Transform.xml doc/classes/Transform2D.xml #: doc/classes/Vector2.xml doc/classes/Vector3.xml msgid "Math tutorial index" -msgstr "" +msgstr "Mathematik Anleitungsindex" #: doc/classes/AABB.xml doc/classes/Rect2.xml doc/classes/Vector2.xml #: doc/classes/Vector3.xml @@ -4897,6 +4877,8 @@ msgid "" "Returns the center of the [AABB], which is equal to [member position] + " "([member size] / 2)." msgstr "" +"Gibt den Mittelwert von [AABB] zurück, welcher gleich ist wie [member " +"position] + ([member size] / 2)." #: doc/classes/AABB.xml msgid "Gets the position of the 8 endpoints of the [AABB] in space." @@ -5300,22 +5282,30 @@ msgid "Maximum value for the mode enum." msgstr "Maximaler Wert für das Modus-Enum." #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +#, fuzzy +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "Sprite-Knoten, der mehrere Texturen für die Animation verwenden kann." #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml msgid "2D Sprite animation" -msgstr "" +msgstr "2D Sprite Animation" #: doc/classes/AnimatedSprite.xml doc/classes/Area2D.xml #: doc/classes/AudioStreamPlayer.xml doc/classes/Button.xml @@ -5325,7 +5315,7 @@ msgstr "" #: doc/classes/Particles2D.xml doc/classes/Timer.xml #: doc/classes/VisibilityNotifier2D.xml msgid "2D Dodge The Creeps Demo" -msgstr "" +msgstr "2D „Dodge The Creeps“ Demo" #: doc/classes/AnimatedSprite.xml msgid "" @@ -5342,9 +5332,10 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "Hält die aktuelle Animation an (setzt den Bildzähler nicht zurück)." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml +#, fuzzy msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" "Die aktuelle Animation aus der Ressource [code]frames[/code]. Wenn sich " @@ -5370,9 +5361,12 @@ msgstr "Wenn [code]true[/code], wird die Textur vertikal gespiegelt." msgid "The displayed animation frame's index." msgstr "Der Index des angezeigten Animationsrahmens." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "Die [SpriteFrames]-Ressource, welche die Animation(en) enthält." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -5418,7 +5412,7 @@ msgstr "" #: doc/classes/AnimatedSprite3D.xml msgid "2D Sprite animation (also applies to 3D)" -msgstr "" +msgstr "2D Sprite Animation (gilt ebenfalls für 3D)" #: doc/classes/AnimatedSprite3D.xml msgid "Returns [code]true[/code] if an animation is currently being played." @@ -5433,6 +5427,18 @@ msgstr "" "Spielt die Animation mit dem Namen [code]anim[/code] ab. Wenn keine " "[code]anim[/code] angegeben ist, wird die aktuelle Animation abgespielt." +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" +"Die aktuelle Animation aus der Ressource [code]frames[/code]. Wenn sich " +"dieser Wert ändert, wird der [code]frames[/code]-Zähler zurückgesetzt." + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "Die [SpriteFrames]-Ressource, welche die Animation(en) enthält." + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "Proxy-Textur für einfache framebasierte Animationen." @@ -6169,11 +6175,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "Keine Interpolation (nächstgelegener Wert)." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "lineare Interpolation." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "Kubische Interpolation." @@ -7109,7 +7115,7 @@ msgstr "Benennt das übergebene Node um." #: doc/classes/AnimationNodeStateMachine.xml msgid "Replaces the node and keeps its transitions unchanged." -msgstr "" +msgstr "Ersetzt den Knotenpunkt und erhält seine Übergänge unverändert." #: doc/classes/AnimationNodeStateMachine.xml msgid "Sets the given node as the graph end point." @@ -7556,11 +7562,15 @@ msgstr "" "[code]newname[/code] um." #: doc/classes/AnimationPlayer.xml +#, fuzzy msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" "Sucht die Animation bis zum Zeitpunkt [code]Sekunden[/code] (in Sekunden). " "Wenn [code]update[/code] ist [code]true[/code], wird auch die Animation " @@ -7685,6 +7695,10 @@ msgid "" "[b]Note:[/b] The signal is not emitted when the animation is changed via " "[method play] or from [AnimationTree]." msgstr "" +"Wird ausgelöst, wenn eine zurückgestellte Animation abgespielt wird nachdem " +"eine vorherige Animation beendet wurde. Siehe auch [method queue].\n" +"[b]Anmerkung:[/b] Das Signal wird nicht ausgelöst, wenn die Animation mit " +"[method play] oder von [AnimationTree] geändert wird." #: doc/classes/AnimationPlayer.xml msgid "Notifies when an animation finished playing." @@ -7857,6 +7871,9 @@ msgid "" "[i]Deprecated.[/i] Animation player that uses a node graph for blending " "animations. Superseded by [AnimationTree]." msgstr "" +"[i]Veraltet.[/i] Animations-Wiedergabekomponente die einen Knoten-basierten " +"Graphen zur Überblendung von Animationen nutzt. Wurde ersetzt durch " +"[AnimationTree]." #: doc/classes/AnimationTreePlayer.xml msgid "" @@ -7868,6 +7885,15 @@ msgid "" "depending on the graph.\n" "See [AnimationTree] for a more full-featured replacement of this node." msgstr "" +"[i]Veraltet.[/i] Ein knoten-basiertes Graphen-Tool zum Überblenden von " +"mehreren Animationen die an einen [AnimationPlayer] gebunden sind. Das ist " +"besonders hilfreich beim Animieren von Spieler-Charakteren oder anderen " +"Objekten auf Skelett-Basis. Es kann mehrere Animationen nutzen um eine " +"erwünschte Pose zu formen.\n" +"Es nimmt [Animation]s von einem [AnimationPlayer] Knoten und vermischt sie " +"wie benötigt auf dem Graphen.\n" +"Siehe auch [AnimationTree] für einen vollumfänglichen Austausch dieses " +"Knotenpunkts." #: doc/classes/AnimationTreePlayer.xml #, fuzzy @@ -8999,7 +9025,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -9044,10 +9073,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -9187,11 +9220,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -10331,7 +10368,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -10553,7 +10590,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -13695,17 +13732,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -16027,7 +16064,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -16124,7 +16163,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -24666,6 +24707,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Falls [code]wahr[/code] wir Audio gerade abgespielt." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -28284,9 +28330,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -36869,13 +36928,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -37593,6 +37652,15 @@ msgstr "Benennt das übergebene Node um." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" +"Liefert die [Animation] mit dem Schlüssel [code]name[/code] oder [code]null[/" +"code], wenn nicht gefunden." + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +#, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" "Gibt [code]true[/code] zurück, wenn der Graph das übergebene Node enthält." @@ -37664,6 +37732,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Gibt das letzte Node des Graphen zurück." @@ -37694,6 +37768,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Gibt [code]true[/code] zurück falls das Array leer ist." @@ -37717,6 +37797,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Gibt die Größe des Arrays zurück." @@ -38211,19 +38297,59 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "Steht für die Größe von [enum TextureRepeat] enum." #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml #, fuzzy -msgid "Clears the navigation mesh." -msgstr "Enthält die Audio Daten in Bytes." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Entfernt die Animation mit dem key [code]name[/code]." #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." @@ -38243,7 +38369,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -38293,6 +38422,11 @@ msgid "" msgstr "Gibt das AnimationNode mit dem gegebenen Namen zurück." #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Gibt die Anzahl der Spuren in der Animation zurück." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -38329,6 +38463,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Gibt die Anzahl der Spuren in der Animation zurück." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -39522,7 +39661,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -39530,8 +39669,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -39825,14 +39964,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -39965,6 +40096,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -40126,6 +40266,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -41369,10 +41527,13 @@ msgid "Returns the tooltip of the item at index [code]idx[/code]." msgstr "Liefert die Position des Punktes bei Index [code]Punkt[/code]." #: doc/classes/OptionButton.xml +#, fuzzy msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" +"Liefert die [Animation] mit dem Schlüssel [code]name[/code] oder [code]null[/" +"code], wenn nicht gefunden." #: doc/classes/OptionButton.xml msgid "" @@ -41392,7 +41553,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -46791,6 +46953,17 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" +"Liefert [code]true[/code] wenn die Länge der Zeichenkette [code]0[/code] ist." + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -47659,6 +47832,11 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +#, fuzzy +msgid "[Font] used for the labeled separator." +msgstr "Kein Hinweis auf die bearbeitete Eigenschaft." + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -51117,19 +51295,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -56014,8 +56179,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -56036,8 +56208,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " @@ -76160,10 +76340,12 @@ msgstr "" #: modules/webxr/doc_classes/WebXRInterface.xml msgid "Target ray from touch screen, mouse or other tactile input device." msgstr "" +"Ziel-Strahl für einen Touch-Screen, eine Computer-Maus oder ein taktisches " +"Eingabegerät." #: doc/classes/WindowDialog.xml msgid "Base class for window dialogs." -msgstr "" +msgstr "Basis-Klasse für Fenster-Dialoge." #: doc/classes/WindowDialog.xml msgid "" @@ -76204,6 +76386,8 @@ msgid "" "The thickness of the border that can be dragged when scaling the window (if " "[member resizable] is enabled)." msgstr "" +"Die Breite der Kante, die zum Anpassen der Fenstergröße genutzt werden kann " +"(wenn [member resizable] aktiviert ist)." #: doc/classes/WindowDialog.xml msgid "The vertical offset of the title text." @@ -76234,7 +76418,7 @@ msgstr "" #: doc/classes/World.xml msgid "Class that has everything pertaining to a world." -msgstr "" +msgstr "Eine Klasse die alles für eine Welt mitbringt." #: doc/classes/World.xml msgid "" @@ -76248,6 +76432,8 @@ msgid "" "Direct access to the world's physics 3D space state. Used for querying " "current and potential collisions." msgstr "" +"Direkter Zugang zu dem physischen Zustand des 3D Raums der Welt. Wird " +"genutzt um aktuelle oder zukünftige Kollisionen abzufragen." #: doc/classes/World.xml msgid "The World's [Environment]." @@ -76258,18 +76444,20 @@ msgid "" "The World's fallback_environment will be used if the World's [Environment] " "fails or is missing." msgstr "" +"Das fallback_environment der Welt wird genutzt, sollte das [Environment] der " +"Welt nicht existieren oder nicht geladen werden können." #: doc/classes/World.xml msgid "The World's visual scenario." -msgstr "" +msgstr "Das visuelle Szenario der Welt." #: doc/classes/World.xml msgid "The World's physics space." -msgstr "" +msgstr "The physikalische Raum der Welt." #: doc/classes/World2D.xml msgid "Class that has everything pertaining to a 2D world." -msgstr "" +msgstr "Eine Klasse die alles für eine 2D Welt mitbringt." #: doc/classes/World2D.xml msgid "" @@ -76277,12 +76465,17 @@ msgid "" "visual scenario and a sound space. 2D nodes register their resources into " "the current 2D world." msgstr "" +"Eine Klasse die alles für eine 2D Welt mitbringt. Einen physikalischen Raum, " +"ein visuelles Szenario und einen Bereich für Sounds. 2D Knotenpunkte " +"registrieren ihre Resourcen in die aktuelle 2D Welt." #: doc/classes/World2D.xml msgid "" "The [RID] of this world's canvas resource. Used by the [VisualServer] for 2D " "drawing." msgstr "" +"Die [RID] der Canvas Resource dieser Welt. Wird von [VisualServer] für 2D-" +"Zeichnungen genutzt." #: doc/classes/World2D.xml msgid "" @@ -76357,6 +76550,8 @@ msgid "" "Low-level class for creating parsers for [url=https://en.wikipedia.org/wiki/" "XML]XML[/url] files." msgstr "" +"Niedrig-levelige Klasse um Parser für [url=https://en.wikipedia.org/wiki/" +"XML]XML[/url]-Dateien zu erstellen." #: doc/classes/XMLParser.xml msgid "" @@ -76364,6 +76559,9 @@ msgid "" "flexible standard, this interface is low-level so it can be applied to any " "possible schema." msgstr "" +"Diese Klasse kann als Grundlage für eigene XML Parser genutzt werden. Da XML " +"ein sehr flexibler Standard ist, kann dieses niedrig-levelige Interface an " +"jedes beliebige Schema angepasst werden." #: doc/classes/XMLParser.xml msgid "Gets the amount of attributes in the current element." @@ -76374,16 +76572,22 @@ msgid "" "Gets the name of the attribute specified by the index in [code]idx[/code] " "argument." msgstr "" +"Gibt den Namen des Attributes zurück, dass durch den Index in dem [code]idx[/" +"code] Argument spezifiziert wird." #: doc/classes/XMLParser.xml msgid "" "Gets the value of the attribute specified by the index in [code]idx[/code] " "argument." msgstr "" +"Gibt den Wert eines Attributes zurück, das durch den Index in dem [code]idx[/" +"code] Argument spezifiziert wird." #: doc/classes/XMLParser.xml msgid "Gets the current line in the parsed file (currently not implemented)." msgstr "" +"Gibt die aktuelle Zeile in der geöffneten Datei zurück (aktuell nicht " +"implementiert)." #: doc/classes/XMLParser.xml msgid "" @@ -76396,12 +76600,17 @@ msgid "" "Gets the value of a certain attribute of the current element by name. This " "will return an empty [String] if the attribute is not found." msgstr "" +"Gibt den Wert eines bestimmten Attributes innerhalb des aktuellen Elementes " +"zurück, dass den gesuchten Namen besitzt. Der Rückgabewert ist ein leerer " +"[String], sollte das Attribut nicht gefunden werden." #: doc/classes/XMLParser.xml msgid "" "Gets the contents of a text node. This will raise an error in any other type " "of node." msgstr "" +"Gibt den Inhalt eines Text-Knotenpunkts zurück. Sollte der Knotenpunkt ein " +"anderer Typ sein, so wird ein Fehler geworfen." #: doc/classes/XMLParser.xml msgid "" @@ -76420,10 +76629,12 @@ msgstr "" msgid "" "Gets the type of the current node. Compare with [enum NodeType] constants." msgstr "" +"Gibt den Typ des aktuellen Knotenpunkts zurück. Der Typ kann mit den [enum " +"NodeType] Konstanten verglichen werden." #: doc/classes/XMLParser.xml msgid "Check whether the current element has a certain attribute." -msgstr "" +msgstr "Überprüft, ob das aktuelle Element einen bestimmtes Attribut enthält." #: doc/classes/XMLParser.xml msgid "" @@ -76433,15 +76644,19 @@ msgstr "" #: doc/classes/XMLParser.xml msgid "Opens an XML file for parsing. This returns an error code." -msgstr "" +msgstr "Öffnet eine XML-Datei zum Parsen. Der Rückgabewert ist ein Fehlercode." #: doc/classes/XMLParser.xml msgid "Opens an XML raw buffer for parsing. This returns an error code." msgstr "" +"Öffnet einen unbearbeiteten Buffer zum Parsen. Der Rückgabewert ist ein " +"Fehlercode." #: doc/classes/XMLParser.xml msgid "Reads the next node of the file. This returns an error code." msgstr "" +"Liest den Text-Knotenpunkt der Datei aus. Der Reückgabewert ist ein " +"Fehlercode." #: doc/classes/XMLParser.xml msgid "" @@ -76458,10 +76673,12 @@ msgstr "" #: doc/classes/XMLParser.xml msgid "There's no node (no file or buffer opened)." msgstr "" +"Es ist kein Knotenpunkt verfügbar (da keine Datei oder kein Buffer geöffnet " +"wurde)." #: doc/classes/XMLParser.xml msgid "Element (tag)." -msgstr "" +msgstr "Element (Tag)." #: doc/classes/XMLParser.xml msgid "End of element." @@ -76469,11 +76686,11 @@ msgstr "Ende des Elements." #: doc/classes/XMLParser.xml msgid "Text node." -msgstr "" +msgstr "Text-Knotenpunkt." #: doc/classes/XMLParser.xml msgid "Comment node." -msgstr "" +msgstr "Kommentar-Knotenpunkt." #: doc/classes/XMLParser.xml msgid "CDATA content." @@ -76485,7 +76702,7 @@ msgstr "unbekanntes Node." #: doc/classes/YSort.xml msgid "Sort all child nodes based on their Y positions." -msgstr "" +msgstr "Sotiert alle Kind-Knotenpunkte basierend auf ihrer Y-Position." #: doc/classes/YSort.xml msgid "" diff --git a/doc/translations/el.po b/doc/translations/el.po index ec174486ec..11cf5ad2c9 100644 --- a/doc/translations/el.po +++ b/doc/translations/el.po @@ -942,11 +942,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -990,37 +991,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4115,17 +4115,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4153,9 +4160,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4179,8 +4186,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4232,6 +4242,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4748,11 +4768,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5788,7 +5808,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6978,7 +7001,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7023,10 +7049,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7164,11 +7194,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8303,7 +8337,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8525,7 +8559,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11639,17 +11673,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13902,7 +13936,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13998,7 +14034,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22414,6 +22452,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "ΕπιστÏÎφει το συνημίτονο της παÏαμÎÏ„Ïου." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26001,9 +26044,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34533,13 +34589,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35245,6 +35301,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35314,6 +35376,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "ΕπιστÏÎφει το τόξο ημιτόνου της παÏαμÎÏ„Ïου." @@ -35341,6 +35409,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "ΕπιστÏÎφει το συνημίτονο της παÏαμÎÏ„Ïου." @@ -35364,6 +35438,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "ΕπιστÏÎφει το ημίτονο της παÏαμÎÏ„Ïου." @@ -35842,19 +35922,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "ΕπιστÏÎφει το ημίτονο της παÏαμÎÏ„Ïου." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -35873,7 +35994,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35919,6 +36043,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "ΕπιστÏÎφει το ημίτονο της παÏαμÎÏ„Ïου." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35955,6 +36084,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "ΕπιστÏÎφει το ημίτονο της παÏαμÎÏ„Ïου." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37143,7 +37277,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37151,8 +37285,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37446,14 +37580,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37586,6 +37712,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37747,6 +37882,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38988,7 +39141,7 @@ msgstr "ΕπιστÏÎφει το ημίτονο της παÏαμÎÏ„Ïου." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39010,7 +39163,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44350,6 +44504,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45144,6 +45307,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48590,19 +48757,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53434,8 +53588,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53456,8 +53617,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/es.po b/doc/translations/es.po index caef4dfcef..6980dbaa70 100644 --- a/doc/translations/es.po +++ b/doc/translations/es.po @@ -1517,12 +1517,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Rango aleatorio de cualquier numero real entre [code]from[/code] y [code]to[/" "code].\n" @@ -1595,37 +1597,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -1634,40 +1635,6 @@ msgid "" "3\n" "[/codeblock]" msgstr "" -"Devuelve una formación con el rango dado. El método [code]range()[/code] " -"puede tener un argumento [code]N[/code] (0 a [code]N[/code] - 1), dos " -"argumentos ([code]initial[/code], [code]final - 1[/code]) o tres argumentos " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] puede ser negativo, y en tal caso, [code]final - 1[/" -"code] llega a ser [code]final + 1[/code]. También, el valor incial debe ser " -"mayor que el valor final para que se ejecute la iteración.\n" -"Devuelve una formación vacÃa si el rango no es válido (por ejemplo, " -"[code]range(2, 5, -1)[/code] o [code]range(5, 5, 1)[/code]).\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Salida:\n" -"[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" -"[/codeblock]\n" -"Para iterar sobre un [Array] al revés, utilice:\n" -"[codeblock]\n" -"var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" -"[/codeblock]\n" -"Salida:\n" -"[codeblock]\n" -"9\n" -"6\n" -"3\n" -"[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -5376,17 +5343,25 @@ msgid "Maximum value for the mode enum." msgstr "Valor máximo para el modo enum." #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +#, fuzzy +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "Nodo Sprite que puede usar múltiples texturas para la animación." #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -5417,9 +5392,10 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "Detiene la animación actual (no reinicia el contador de fotogramas)." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml +#, fuzzy msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" "La animación actual del recurso [code]frames[/code]. Si este valor cambia, " @@ -5445,9 +5421,12 @@ msgstr "Si [code]true[/code], la textura se voltea verticalmente." msgid "The displayed animation frame's index." msgstr "El Ãndice del cuadro de animación mostrado." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "El recurso [SpriteFrames] que contiene la(s) animación(es)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -5509,6 +5488,18 @@ msgstr "" "Reproduce la animación llamada [code]anim[/code]. Si no se proporciona " "[code]anim[/code], se reproduce la animación actual." +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" +"La animación actual del recurso [code]frames[/code]. Si este valor cambia, " +"el contador [code]frame[/code] se reinicia." + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "El recurso [SpriteFrames] que contiene la(s) animación(es)." + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "Textura de conexión para animaciones simples basadas en fotogramas." @@ -6235,11 +6226,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "No hay interpolación (valor más cercano)." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "Interpolación lineal." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "Interpolación cúbica." @@ -7593,11 +7584,15 @@ msgstr "" "[code]newname[/code]." #: doc/classes/AnimationPlayer.xml +#, fuzzy msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" "Busca la animación hasta el punto en el tiempo de [code]seconds[/code]. Si " "[code]update[/code] es [code]true[/code], la animación se actualiza también, " @@ -9114,7 +9109,10 @@ msgstr "" "Limpia el array. Esto es equivalente a usar [method resize] con un tamaño de " "[code]0[/code]." -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "Devuelve el numer de veces que un elemento es encuentra en el array." @@ -9174,10 +9172,15 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" "Busca el array por un valor y devuelve su indice o [code]-1[/code] sino se " "encuentra. Opcionalmente, el indice de busqueda inicial puede ser pasado." @@ -9354,11 +9357,16 @@ msgstr "" "Si el array es menor, los elementos so limipiados, si mayor, los nuevos " "elementos son [code]null[/code]." -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" "Busca el array en orden inverso. Opcionalmente, un indice de comienzo de " "busqueda puede ser pasado. Si negacion, el indice de comienzo es considerado " @@ -10992,7 +11000,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11320,7 +11328,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -15234,9 +15242,9 @@ msgstr "" #, fuzzy msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" "Devuelve un vector normal en el espacio del mundo, que es el resultado de " "proyectar un punto en el rectángulo [Viewport] por la proyección de la " @@ -15247,9 +15255,9 @@ msgstr "" #, fuzzy msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" "Devuelve una posición 3D en el espacio mundo, que es el resultado de " "proyectar un punto en el rectángulo [Viewport] por la proyección de la " @@ -18239,9 +18247,12 @@ msgid "If [code]true[/code], no collisions will be detected." msgstr "Si [code]true[/code], no se detectarán colisiones." #: doc/classes/CollisionPolygon2D.xml +#, fuzzy msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" "Si [code]true[/code], sólo los bordes que están boca arriba, en relación con " "la rotación de [CollisionPolygon2D], colisionarán con otros objetos." @@ -18365,9 +18376,12 @@ msgid "" msgstr "Una forma de colisión desactivada no tiene ningún efecto en el mundo." #: doc/classes/CollisionShape2D.xml +#, fuzzy msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" "Establece si esta forma de colisión sólo debe detectar la colisión en un " "lado (superior o inferior)." @@ -29700,6 +29714,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Si [code]true[/code], la flecha de plegado está oculta." + #: doc/classes/EditorVCSInterface.xml #, fuzzy msgid "" @@ -34406,11 +34425,24 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "Los colores de gradiente devueltos como un [PackedColorArray]." #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml #, fuzzy msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" "Los desplazamientos de gradiente devueltos como un [PackedFloat32Array]." +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "Textura llena de gradientes." @@ -45720,13 +45752,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -46669,6 +46701,15 @@ msgstr "Crea un [HingeJoint]." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" +"Devuelve la [Animation] con clave [code]name[/code] or [code]null[/code] si " +"no se encuentra." + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +#, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "Devuelve [code]true[/code] si el script puede ser instanciado." @@ -46740,6 +46781,12 @@ msgid "Create a new map." msgstr "Crea un [Area2D]." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Devuelve el tamaño del array." @@ -46774,6 +46821,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "Devuelve el polÃgono de navegación del tile." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Devuelve [code]true[/code] si la selección está activa." @@ -46799,6 +46852,12 @@ msgid "Creates a new region." msgstr "Crea un [Area2D]." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Establece los metadatos del borde dado." @@ -47320,19 +47379,59 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "Representa el tamaño del enum [enum ShaderMode]." #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml #, fuzzy -msgid "Clears the navigation mesh." -msgstr "Establece la malla de navegación del objeto." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Elimina la animación con la clave [code]name[/code]." #: doc/classes/NavigationMeshInstance.xml #, fuzzy @@ -47353,7 +47452,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -47403,6 +47505,11 @@ msgid "" msgstr "Devuelve el nodo animacion con el nombre dado." #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Devuelve el [RID] de la forma enésima de un área." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -47442,6 +47549,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Devuelve el [RID] de la forma enésima de un área." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -49210,7 +49322,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -49218,8 +49330,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -49645,14 +49757,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -49866,6 +49970,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -50052,6 +50165,27 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "Continúe el proceso sin importar el estado de pausa de [SceneTree]." #: doc/classes/Node.xml +#, fuzzy +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" +"Heredó el modo de pausa del padre del nodo. Para el nodo raÃz, es " +"equivalente a [constant PAUSE_MODE_STOP]. Por defecto." + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "Duplica las señales del nodo." @@ -51808,8 +51942,9 @@ msgid "Returns the tooltip of the item at index [code]idx[/code]." msgstr "Devuelve el texto del artÃculo en el Ãndice [code]idx[/code]." #: doc/classes/OptionButton.xml +#, fuzzy msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" "Devuelve el ID del elemento seleccionado, o [code]0[/code] si no hay ningún " @@ -51835,9 +51970,11 @@ msgid "Removes the item at index [code]idx[/code]." msgstr "Elimina el elemento en el Ãndice [code]idx[/code]." #: doc/classes/OptionButton.xml +#, fuzzy msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" "Selecciona un elemento por Ãndice y lo convierte en el elemento actual. Esto " "funcionará incluso si el elemento está desactivado." @@ -58935,6 +59072,17 @@ msgstr "" "Utiliza esta función si no estás seguro de la fuente de los datos. Para la " "entrada del usuario esta función siempre debe ser preferida." +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" +"Devuelve [code]true[/code] si el objeto contiene el [code]method[/code] dado." + #: doc/classes/PoolByteArray.xml #, fuzzy msgid "" @@ -60037,6 +60185,11 @@ msgstr "[Font] usada para los elementos del menú." #: doc/classes/PopupMenu.xml #, fuzzy +msgid "[Font] used for the labeled separator." +msgstr "[Font] que se usa para el texto de las [Label]." + +#: doc/classes/PopupMenu.xml +#, fuzzy msgid "[Texture] icon for the checked checkbox items." msgstr "Icono [Texture2D] para las casillas marcadas." @@ -64306,19 +64459,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml #, fuzzy msgid "General-purpose 3D proximity detection node." @@ -70533,19 +70673,20 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " "([code]shape_xform[/code])." msgstr "" -"Devuelve una lista de los puntos donde esta forma toca a otra. Si no hay " -"colisiones la lista está vacÃa.\n" -"Este método necesita la matriz de transformación de esta forma " -"([code]local_xform[/code]), la forma para comprobar las colisiones con " -"([code]with_shape[/code]), y la matriz de transformación de esa forma " -"([code]shape_xform[/code])." #: doc/classes/Shape2D.xml msgid "" @@ -70568,9 +70709,18 @@ msgstr "" "([code]shape_motion[/code])." #: doc/classes/Shape2D.xml +#, fuzzy msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/fa.po b/doc/translations/fa.po index fb0b7d196f..0851199fe8 100644 --- a/doc/translations/fa.po +++ b/doc/translations/fa.po @@ -1360,11 +1360,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1408,37 +1409,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4539,17 +4539,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4577,9 +4584,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4603,8 +4610,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4656,6 +4666,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5171,11 +5191,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -6210,7 +6230,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7400,7 +7423,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7445,10 +7471,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7586,11 +7616,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8725,7 +8759,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8947,7 +8981,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12058,17 +12092,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14317,7 +14351,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14413,7 +14449,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22819,6 +22857,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26403,9 +26445,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34927,13 +34982,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35645,6 +35700,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35708,6 +35769,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35734,6 +35801,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35755,6 +35828,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -36227,17 +36306,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36258,7 +36377,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36304,6 +36426,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36340,6 +36466,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37524,7 +37654,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37532,8 +37662,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37827,14 +37957,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37967,6 +38089,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38128,6 +38259,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39368,7 +39517,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39390,7 +39539,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44729,6 +44879,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45522,6 +45681,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48967,19 +49130,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53813,8 +53963,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53835,8 +53992,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/fi.po b/doc/translations/fi.po index 4a23377588..ce19aaf1de 100644 --- a/doc/translations/fi.po +++ b/doc/translations/fi.po @@ -1009,11 +1009,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1057,37 +1058,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4182,17 +4182,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4220,9 +4227,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4246,8 +4253,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4299,6 +4309,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4815,11 +4835,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5855,7 +5875,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7051,7 +7074,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7096,10 +7122,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7237,11 +7267,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8376,7 +8410,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8598,7 +8632,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11713,17 +11747,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13978,7 +14012,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14074,7 +14110,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22490,6 +22528,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Palauttaa parametrin kosinin." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26078,9 +26121,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34617,13 +34673,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35329,6 +35385,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35398,6 +35460,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Palauttaa parametrin arkussinin." @@ -35425,6 +35493,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Palauttaa parametrin kosinin." @@ -35448,6 +35522,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Palauttaa parametrin sinin." @@ -35927,19 +36007,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Laskee kahden vektorin ristitulon." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -35958,7 +36079,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36004,6 +36128,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Palauttaa parametrin sinin." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36040,6 +36169,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Palauttaa parametrin sinin." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37228,7 +37362,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37236,8 +37370,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37531,14 +37665,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37671,6 +37797,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37832,6 +37967,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39073,7 +39226,7 @@ msgstr "Laskee kahden vektorin ristitulon." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39095,7 +39248,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44435,6 +44589,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45229,6 +45392,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48675,19 +48842,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53519,8 +53673,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53541,8 +53702,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/fil.po b/doc/translations/fil.po index d5533cf3b8..d0e5d18650 100644 --- a/doc/translations/fil.po +++ b/doc/translations/fil.po @@ -5,12 +5,13 @@ # # Jethro Parker <lionbearjet@hotmail.com>, 2020. # Pierre Stempin <pierre.stempin@gmail.com>, 2020. +# Marco Santos <enum.scima@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2020-10-07 06:10+0000\n" -"Last-Translator: Pierre Stempin <pierre.stempin@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:39+0000\n" +"Last-Translator: Marco Santos <enum.scima@gmail.com>\n" "Language-Team: Filipino <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/fil/>\n" "Language: fil\n" @@ -19,7 +20,7 @@ msgstr "" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=2; plural=n != 1 && n != 2 && n != 3 && (n % 10 == 4 " "|| n % 10 == 6 || n % 10 == 9);\n" -"X-Generator: Weblate 4.3-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -27,107 +28,115 @@ msgstr "Paglalarawan" #: doc/tools/make_rst.py msgid "Tutorials" -msgstr "Mga tutorial" +msgstr "Mga Tutorial" #: doc/tools/make_rst.py msgid "Properties" -msgstr "" +msgstr "Mga Property" #: doc/tools/make_rst.py msgid "Methods" -msgstr "" +msgstr "Mga Method" #: doc/tools/make_rst.py msgid "Theme Properties" -msgstr "" +msgstr "Mga Property ng Tema" #: doc/tools/make_rst.py msgid "Signals" -msgstr "" +msgstr "Mga Signal" #: doc/tools/make_rst.py msgid "Enumerations" -msgstr "" +msgstr "Mga Enumeration" #: doc/tools/make_rst.py msgid "Constants" -msgstr "" +msgstr "Mga Constant" #: doc/tools/make_rst.py msgid "Property Descriptions" -msgstr "" +msgstr "Mga Paglalarawan sa Property" #: doc/tools/make_rst.py msgid "Method Descriptions" -msgstr "" +msgstr "Mga Paglalarawan sa Method" #: doc/tools/make_rst.py msgid "Theme Property Descriptions" -msgstr "" +msgstr "Mga Paglalarawan sa Property ng Tema" #: doc/tools/make_rst.py msgid "Inherits:" -msgstr "" +msgstr "Minamana ang:" #: doc/tools/make_rst.py msgid "Inherited By:" -msgstr "" +msgstr "Minamana ng:" #: doc/tools/make_rst.py msgid "(overrides %s)" -msgstr "" +msgstr "(ino-override ang %s)" #: doc/tools/make_rst.py msgid "Default" -msgstr "" +msgstr "Default" #: doc/tools/make_rst.py msgid "Setter" -msgstr "" +msgstr "Setter" #: doc/tools/make_rst.py msgid "value" -msgstr "" +msgstr "value" #: doc/tools/make_rst.py msgid "Getter" -msgstr "" +msgstr "Getter" #: doc/tools/make_rst.py msgid "" "This method should typically be overridden by the user to have any effect." -msgstr "" +msgstr "Dapat tipikal na ino-override ang method na ito ng user para umepekto." #: doc/tools/make_rst.py msgid "" "This method has no side effects. It doesn't modify any of the instance's " "member variables." msgstr "" +"Walang mga side effect ang method na ito. Wala itong binabago na kahit anong " +"mga kasaping variable ng instance." #: doc/tools/make_rst.py msgid "" "This method accepts any number of arguments after the ones described here." msgstr "" +"Tumatanggap ang method na ito ng kahit ilang bilang ng argumento pagkatapos " +"ng mga nailarawan rito." #: doc/tools/make_rst.py msgid "This method is used to construct a type." -msgstr "" +msgstr "Ginagamit para mag-construct ng type ang method na ito." #: doc/tools/make_rst.py msgid "" "This method doesn't need an instance to be called, so it can be called " "directly using the class name." msgstr "" +"Di kailangan ng method na ito na magtawag ng isang instance, kaya pwede " +"itong direktang tawagin gamit ang pangalan ng class." #: doc/tools/make_rst.py msgid "" "This method describes a valid operator to use with this type as left-hand " "operand." msgstr "" +"Inilalarawan ng method na ito ang isang valid na operator na gagamitin para " +"sa type na ito bilang isang operand sa kaliwa." #: modules/gdscript/doc_classes/@GDScript.xml msgid "Built-in GDScript functions." -msgstr "" +msgstr "Mga built-in na GDScript function." #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -934,11 +943,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -982,37 +992,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4107,17 +4116,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4145,9 +4161,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4171,8 +4187,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4224,6 +4243,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4739,11 +4768,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5778,7 +5807,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6968,7 +7000,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7013,10 +7048,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7154,11 +7193,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8293,7 +8336,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8515,7 +8558,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11626,17 +11669,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13885,7 +13928,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13981,7 +14026,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22387,6 +22434,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25971,9 +26022,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34495,13 +34559,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35207,6 +35271,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35270,6 +35340,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35296,6 +35372,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35317,6 +35399,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35789,17 +35877,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35820,7 +35948,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35866,6 +35997,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35902,6 +36037,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37086,7 +37225,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37094,8 +37233,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37389,14 +37528,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37529,6 +37660,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37690,6 +37830,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38930,7 +39088,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38952,7 +39110,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44279,6 +44438,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45072,6 +45240,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48517,19 +48689,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53359,8 +53518,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53381,8 +53547,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/fr.po b/doc/translations/fr.po index bf6bfa6135..192cd0933e 100644 --- a/doc/translations/fr.po +++ b/doc/translations/fr.po @@ -61,7 +61,7 @@ msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-05-05 13:38+0000\n" +"PO-Revision-Date: 2022-05-17 21:38+0000\n" "Last-Translator: Maxime Leroy <lisacintosh@gmail.com>\n" "Language-Team: French <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/fr/>\n" @@ -70,7 +70,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -894,6 +894,24 @@ msgid "" "[/codeblock]\n" "See also [method lerp] which performs the reverse of this operation." msgstr "" +"Retourne le facteur d'interpolation ou d'extrapolation suivant l'intervalle " +"spécifié dans [code]from[/code] et [code]to[/code], et la valeur interpolée " +"spécifiée par [code]weight[/code]. La valeur retournée sera entre [code]0.0[/" +"code] et [code]1.0[/code] si [code]weight[/code] est entre [code]from[/code] " +"et [code]to[/code] (inclus). Si [code]weight[/code] est en dehors de cet " +"intervalle, un facteur d'extrapolation sera retourné (une valeur inférieure " +"à [code]0.0[/code] ou supérieure à [code]1.0[/code]).\n" +"[codeblock]\n" +"# Le facteur d'interpolation de cet appel à `lerp()` ci-dessous est le " +"0.75.\n" +"var middle = lerp(20, 30, 0.75)\n" +"# `middle` est maintenant 27.5.\n" +"# Maintenant, on fait comme si on avait oublié le facteur d'interpolation " +"original et qu'on veut le calculer.\n" +"var ratio = inverse_lerp(20, 30, 27.5)\n" +"# `ratio` est maintenant 0.75.\n" +"[/codeblock]\n" +"Voir aussi [method lerp] qui fait l'opération inverse." #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -965,7 +983,6 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml -#, fuzzy msgid "" "Linearly interpolates between two values by the factor defined in " "[code]weight[/code]. To perform interpolation, [code]weight[/code] should be " @@ -993,9 +1010,12 @@ msgstr "" "la valeur de retour sera du même type ([code]lerp[/code] appelle alors la " "méthode du type de vecteur [code]linear_interpolate[/code]).\n" "[codeblock]\n" -"lerp(0, 4, 0.75) # Renvoie 3.0\n" -"lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Renvoie Vector2(2, 3.5)\n" -"[/codeblock]" +"lerp(0, 4, 0.75) # Retourne 3.0\n" +"lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Retourne Vector2(2, 3.5)\n" +"[/codeblock]\n" +"Voir aussi [method inverse_lerp] qui fait l'opération inverse. Pour fait une " +"interpolation plus douce avec [method lerp], combinez l'appel avec [method " +"ease] ou [method smoothstep]." #: modules/gdscript/doc_classes/@GDScript.xml #, fuzzy @@ -1527,12 +1547,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Plage aléatoire, toute valeur à virgule flottante comprise entre [code]from[/" "code] et [code]to[/code].\n" @@ -1606,39 +1628,37 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml -#, fuzzy msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -1647,45 +1667,6 @@ msgid "" "3\n" "[/codeblock]" msgstr "" -"Renvoie un tableau avec la plage donnée reçu. La plage peut être un argument " -"[code]N[/code] (0 à [code]N[/code] - 1), deux arguments ([code]initial[/" -"code], [code]final - 1[/code]) ou trois arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Renvoie un tableau vide si " -"la plage n'est pas valide (par exemple [code]plage(2, 5, -1)[/code] ou " -"[code]plage(5, 5, 1)[/code]).[/code]\n" -"Renvoie un tableau avec la plage donnée. [code]range()[/code] peut avoir 1 " -"argument N ([code]0[/code] à [code]N - 1[/code]), deux arguments " -"([code]initial[/code], [code]final - 1[/code]) ou trois arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] peut être négatif. Si [code]increment[/code] est " -"négatif, [code]final - 1[/code] deviendra [code]final + 1[/code]. De plus, " -"la valeur initiale doit être supérieure à la valeur finale pour que la " -"boucle s'exécute.\n" -"[bloc de code]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[codeblock]\n" -"Sortie :\n" -"[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" -"[codeblock]\n" -"Pour itérer sur un tableau en arrière, utilisez :\n" -"[codeblock]\n" -"var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0 :\n" -" print(array[i])\n" -" i -= 1\n" -"[/codeblock]\n" -"Sortie :\n" -"[codeblock]\n" -"9\n" -"6\n" -"3\n" -"[codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -4088,6 +4069,8 @@ msgstr "" #: doc/classes/@GlobalScope.xml msgid "MIDI continue message. Continue at the point the sequence was stopped." msgstr "" +"Le message de continuation en MIDI. Reprend la séquence où elle a été " +"arrêtée." #: doc/classes/@GlobalScope.xml msgid "MIDI stop message. Stop the current sequence." @@ -5290,7 +5273,6 @@ msgstr "" "MODE_CBC_ENCRYPT] ou [constant MODE_CBC_DECRYPT]." #: doc/classes/AESContext.xml -#, fuzzy msgid "" "Run the desired operation for this AES context. Will return a " "[PoolByteArray] containing the result of encrypting (or decrypting) the " @@ -5298,12 +5280,11 @@ msgid "" "[b]Note:[/b] The size of [code]src[/code] must be a multiple of 16. Apply " "some padding if needed." msgstr "" -"Exécute l'opération désirée pour ce contexte AES. Cette méthode retournerait " -"un [PackedByteArray] qui contiendra le résultat du cryptage (ou décryptage) " -"de l'[code]src[/code] donnée. Voyez [method start] pour le mode " -"d'opération.\n" -"Note : La taille de [code]src[/code] doit être une multiple de 16. Applique " -"du rembourrage si nécessaire." +"Exécute l'opération désirée pour ce contexte AES. Cette méthode retournera " +"un [PoolByteArray] qui contiendra le résultat du cryptage (ou décryptage) de " +"la [code]src[/code] donnée. Voyez [method start] pour le mode d'opération.\n" +"[b]Note :[/b] La taille de [code]src[/code] doit être un multiple de 16. " +"Applique du rembourrage si nécessaire." #: doc/classes/AESContext.xml msgid "AES electronic codebook encryption mode." @@ -5326,17 +5307,25 @@ msgid "Maximum value for the mode enum." msgstr "Valeur maximale pour le mode énumeration." #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +#, fuzzy +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "NÅ“ud de sprite qui peut utiliser plusieurs textures pour l'animation." #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -5368,9 +5357,10 @@ msgid "Stops the current animation (does not reset the frame counter)." msgstr "" "Arrête l'animation actuelle (ne remit pas à zéro le compteur de trames)." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml +#, fuzzy msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" "L'animation actuelle de la ressource [code]frames[/code]. S'il y a un " @@ -5396,9 +5386,12 @@ msgstr "Si [code]vrai[/code], la texture est inversée verticalement." msgid "The displayed animation frame's index." msgstr "L'index de l'image d'animation affichée." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "La ressource [SpriteFrames] qui contient l'animation." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -5458,6 +5451,18 @@ msgstr "" "Joue l'animation intitulée [code]anim[/code]. Si aucun [code]anim[/code] est " "fourni, l'animation actuelle est joué." +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" +"L'animation actuelle de la ressource [code]frames[/code]. S'il y a un " +"changement dans la valeur, le compteur [code]frame[/code] est remis à zéro." + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "La ressource [SpriteFrames] qui contient l'animation." + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "Texture procuration pour des animations simples basés sur les trames." @@ -6180,11 +6185,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "Pas d'interpolation (valeur la plus proche)." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "Interpolation linéaire." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "Interpolation cubique." @@ -7107,6 +7112,14 @@ msgid "" "state_machine.travel(\"some_state\")\n" "[/codeblock]" msgstr "" +"Autorise le contrôle de la machine à états du [AnimationTree] créée avec " +"[AnimationNodeStateMachine]. À récupérer grâce à [code]$AnimationTree." +"get(\"parameters/playback\")[/code].\n" +"[b]Exemple :[/b]\n" +"[codeblock]\n" +"var state_machine = $AnimationTree.get(\"parameters/playback\")\n" +"state_machine.travel(\"some_state\")\n" +"[/codeblock]" #: doc/classes/AnimationNodeStateMachinePlayback.xml msgid "Returns the currently playing animation state." @@ -7140,6 +7153,8 @@ msgid "" "Transitions from the current state to another one, following the shortest " "path." msgstr "" +"Les transitions de l'état actuel vers un autre, en suivant le chemin le plus " +"court." #: doc/classes/AnimationNodeStateMachineTransition.xml msgid "" @@ -7311,6 +7326,8 @@ msgid "" "Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] " "animation completes." msgstr "" +"Le déclencheur de l'animation [code]anim_to[/code] quand l'animation " +"[code]anim_from[/code] se termine." #: doc/classes/AnimationPlayer.xml msgid "" @@ -7326,6 +7343,7 @@ msgstr "Efface toutes les animations en file d’attente et non joués." msgid "" "Returns the name of [code]animation[/code] or an empty string if not found." msgstr "" +"Retourne le nom de [code]animation[/code] ou un chaine vide si n'existe pas." #: doc/classes/AnimationPlayer.xml msgid "" @@ -7420,7 +7438,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7448,6 +7469,9 @@ msgid "" "When set, would change the animation, but would not play it unless currently " "playing. See also [member current_animation]." msgstr "" +"Si en lecture, l'animation actuelle ; sinon, la dernière animation jouée. " +"Quand définit, l'animation change, mais n'est jouée que si en lecture. Voir " +"aussi [member current_animation]." #: doc/classes/AnimationPlayer.xml msgid "The name of the animation to play when the scene loads." @@ -7573,6 +7597,8 @@ msgstr "" msgid "" "A node to be used for advanced animation transitions in an [AnimationPlayer]." msgstr "" +"Un nÅ“ud utilisé pour les transitions avancées entre les animations d'un " +"[AnimationPlayer]." #: doc/classes/AnimationTree.xml msgid "" @@ -7830,9 +7856,8 @@ msgstr "" "différents nombres d'entrées." #: doc/classes/AnimationTreePlayer.xml -#, fuzzy msgid "Returns the input source for a given node input." -msgstr "Retourne le sommet à l’index donné." +msgstr "Retourne la source entrante pour l'entrée spécifiée du nÅ“ud." #: doc/classes/AnimationTreePlayer.xml #, fuzzy @@ -8206,12 +8231,16 @@ msgstr "" #: doc/classes/Area.xml doc/classes/Area2D.xml msgid "If [code]true[/code], other monitoring areas can detect this area." msgstr "" +"Si [code]true[/code], les autres aires surveillantes peut détecter cette " +"aire." #: doc/classes/Area.xml doc/classes/Area2D.xml msgid "" "If [code]true[/code], the area detects bodies or areas entering and exiting " "it." msgstr "" +"Si [code]true[/code], l'aire détecte les corps et aires lui entrants dedans " +"ou sortants d'elle." #: doc/classes/Area.xml doc/classes/Area2D.xml msgid "The area's priority. Higher priority areas are processed first." @@ -8561,6 +8590,38 @@ msgid "" "pushing/removing elements. Using [code]const[/code] will only prevent " "assigning the constant with another value after it was initialized." msgstr "" +"Un tableau générique qui peut contenir différents types d'éléments de tout " +"type, accessible par un indice numérique commençant à 0. Les indices " +"négatifs peuvent être utilisés pour utiliser une position à partir de la fin " +"du tableau, comme en Python (-1 pour le dernier élément, -2 l'avant-dernier, " +"etc.).\n" +"[b]Exemple :[/b]\n" +"[codeblock]\n" +"var array = [\"Un\", 2, 3, \"Quatre\"]\n" +"print(array[0]) # \"Un\"\n" +"print(array[2]) # 3\n" +"print(array[-1]) # \"Quatre\"\n" +"array[2] = \"Trois\"\n" +"print(array[-2]) # \"Trois\"\n" +"[/codeblock]\n" +"Les tableaux peuvent être concaténés (mis à la suite l'un de l'autre) avec " +"l'opérateur [code]+[/code] :\n" +"[codeblock]\n" +"var array1 = [\"Un\", 2]\n" +"var array2 = [3, \"Quatre\"]\n" +"print(array1 + array2) # [\"Un, 2, 3, \"Quatre\"]\n" +"[/codeblock]\n" +"[b]Note :[/b] Concaténer avec l'opérateur [code]+=[/code] créera un nouveau " +"tableau, ce qui a un coût. Si vous voulez ajouter un autre tableau à la " +"suite d'un tableau existant, [method append_array] est plus efficace.\n" +"[b]Note :[/b] Les tableaux sont toujours passés par référence. Pour obtenir " +"une copie d'un tableau qui peut être modifié indépendamment de l'original, " +"utilisez [method duplicate].\n" +"[b]Note :[/b] Lors de la déclaration d'un tableau avec [code]const[/code], " +"le tableau peut toujours être modifié en assignant des valeurs à l'aide " +"d'indices ou en ajoutant/retirant des éléments. Avec [code]const[/code], il " +"est seulement impossible assigner cette constante avec un autre tableau une " +"fois qu'elle a été initialisée." #: doc/classes/Array.xml msgid "Constructs an array from a [PoolColorArray]." @@ -8676,7 +8737,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -8721,10 +8785,15 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" "Trouve la première occurrence d'une sous-chaîne de caractères. Retourne le " "position de départ de la sous-chaîne de caractères ou [code]-1[/code] si non " @@ -8838,7 +8907,7 @@ msgstr "" #: doc/classes/Array.xml msgid "" "Appends an element at the end of the array. See also [method push_front]." -msgstr "" +msgstr "Ajout un élément à la fin du tableau. Voir aussi [method push_front]." #: doc/classes/Array.xml msgid "" @@ -8866,12 +8935,20 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" +"Recherche dans le tableau dans l'ordre inversé. En option, la position de " +"début de la recherche peut être spécifiée. Si négative, la position de début " +"est considérée comme partant de la fin du tableau." #: doc/classes/Array.xml msgid "" @@ -9056,6 +9133,8 @@ msgid "" "Removes a surface at position [code]surf_idx[/code], shifting greater " "surfaces one [code]surf_idx[/code] slot down." msgstr "" +"Retire une surface à la position [code]surf_idx[/code], et décale toutes les " +"surfaces après [code]surf_idx[/code] d'une position." #: doc/classes/ArrayMesh.xml msgid "Sets a name for a given surface." @@ -9082,6 +9161,7 @@ msgstr "" #: doc/classes/ArrayMesh.xml msgid "Default value used for index_array_len when no indices are present." msgstr "" +"La valeur par défaut utilisée pour index_array_len quand il n'y pas d'indice." #: doc/classes/ArrayMesh.xml msgid "Amount of weights/bone indices per vertex (always 4)." @@ -9121,10 +9201,14 @@ msgid "" "[PoolRealArray] or [PoolIntArray] of bone indices. Each element in groups of " "4 floats." msgstr "" +"Un [PoolRealArray] ou [PoolIntArray] d'indices d'os. Il est composé de 4 " +"flottants consécutifs pour chaque indice." #: doc/classes/ArrayMesh.xml msgid "[PoolRealArray] of bone weights. Each element in groups of 4 floats." msgstr "" +"Un [PoolRealArray] de poids d'os. Il est composé de 4 flottants consécutifs " +"pour chaque poids." #: doc/classes/ArrayMesh.xml msgid "" @@ -10007,9 +10091,8 @@ msgid "" msgstr "Aligne les enfants avec le début du conteneur." #: doc/classes/AspectRatioContainer.xml -#, fuzzy msgid "Aligns child controls with the center of the container." -msgstr "Aligne les enfants avec le centre du conteneur." +msgstr "Aligne les contrôles enfants au centre du conteneur." #: doc/classes/AspectRatioContainer.xml #, fuzzy @@ -10074,6 +10157,9 @@ msgid "" "Called when computing the cost between two connected points.\n" "Note that this function is hidden in the default [code]AStar[/code] class." msgstr "" +"Appelé lors du calcul du coût entre deux points connectés.\n" +"À noter que cette fonction est masqué dans la classe [code]AStar[/code] par " +"défaut." #: doc/classes/AStar.xml msgid "" @@ -10081,12 +10167,15 @@ msgid "" "point.\n" "Note that this function is hidden in the default [code]AStar[/code] class." msgstr "" +"Appelé lors du calcul du coût entre un point et le dernier du chemin.\n" +"À noter que cette fonction est masqué dans la classe [code]AStar[/code] par " +"défaut." #: doc/classes/AStar.xml msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -10124,6 +10213,15 @@ msgid "" "astar.connect_points(1, 2, false)\n" "[/codeblock]" msgstr "" +"Crée un segment entre les points donnés. Si [code]bidirectional[/code] est " +"[code]false[/code], seuls les mouvements de [code]id[/code] vers " +"[code]to_id[/code] sera autorisés, et non dans le sens inverse.\n" +"[codeblock]\n" +"var astar = AStar.new()\n" +"astar.add_point(1, Vector3(1, 1, 0))\n" +"astar.add_point(2, Vector3(0, 5, 0))\n" +"astar.connect_points(1, 2, false)\n" +"[/codeblock]" #: doc/classes/AStar.xml msgid "" @@ -10135,6 +10233,8 @@ msgstr "" #: doc/classes/AStar.xml doc/classes/AStar2D.xml msgid "Returns the next available point ID with no point associated to it." msgstr "" +"Retourne l'identifiant du point disponible suivant avec aucun point lui " +"étant associé." #: doc/classes/AStar.xml doc/classes/AStar2D.xml msgid "" @@ -10161,6 +10261,18 @@ msgid "" "The result is in the segment that goes from [code]y = 0[/code] to [code]y = " "5[/code]. It's the closest position in the segment to the given point." msgstr "" +"Retourne la position la plus proche de [code]to_position[/code] qui est dans " +"un segment entre deux points connectés.\n" +"[codeblock]\n" +"var astar = AStar.new()\n" +"astar.add_point(1, Vector3(0, 0, 0))\n" +"astar.add_point(2, Vector3(0, 5, 0))\n" +"astar.connect_points(1, 2)\n" +"var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Retourne " +"(0, 3, 0)\n" +"[/codeblock]\n" +"Le résultat est dans le segment qui va de [code]y = 0[/code] à [code]y = 5[/" +"code]. C'est la position la plus proche dans le segment du point donné." #: doc/classes/AStar.xml msgid "" @@ -10185,6 +10297,26 @@ msgid "" "4, 3][/code] instead, because now even though the distance is longer, it's " "\"easier\" to get through point 4 than through point 2." msgstr "" +"Retourne un tableau avec les identifiants des points qui forment le chemin " +"trouvé par AStar entre les points donnés. Le tableau est dans l'ordre du " +"point de départ de celui de l'arrivée.\n" +"[codeblock]\n" +"var astar = AStar.new()\n" +"astar.add_point(1, Vector3(0, 0, 0))\n" +"astar.add_point(2, Vector3(0, 1, 0), 1) # Le poids par défaut est 1\n" +"astar.add_point(3, Vector3(1, 1, 0))\n" +"astar.add_point(4, Vector3(2, 0, 0))\n" +"\n" +"astar.connect_points(1, 2, false)\n" +"astar.connect_points(2, 3, false)\n" +"astar.connect_points(4, 3, false)\n" +"astar.connect_points(1, 4, false)\n" +"\n" +"var res = astar.get_id_path(1, 3) # Retourne [1, 2, 3]\n" +"[/codeblock]\n" +"Si vous changez le poids du deuxième point à 3, alors le résultat sera " +"plutôt [code][1, 4, 3][/code], parce que même si la distance est plus " +"grande, c'est plus \"facile\" d'aller au point 4 qu'au point 2." #: doc/classes/AStar.xml doc/classes/AStar2D.xml msgid "" @@ -10209,10 +10341,24 @@ msgid "" "var neighbors = astar.get_point_connections(1) # Returns [2, 3]\n" "[/codeblock]" msgstr "" +"Retourne un tableau d'identifiants des points qui forment une connexion avec " +"le point spécifié.\n" +"[codeblock]\n" +"var astar = AStar.new()\n" +"astar.add_point(1, Vector3(0, 0, 0))\n" +"astar.add_point(2, Vector3(0, 1, 0))\n" +"astar.add_point(3, Vector3(1, 1, 0))\n" +"astar.add_point(4, Vector3(2, 0, 0))\n" +"\n" +"astar.connect_points(1, 2, true)\n" +"astar.connect_points(1, 3, true)\n" +"\n" +"var neighbors = astar.get_point_connections(1) # Retourne [2, 3]\n" +"[/codeblock]" #: doc/classes/AStar.xml doc/classes/AStar2D.xml msgid "Returns the number of points currently in the points pool." -msgstr "" +msgstr "Retourne le nombre de points actuellement dans le tas de points." #: doc/classes/AStar.xml msgid "" @@ -10222,11 +10368,17 @@ msgid "" "[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it " "will return an empty [PoolVector3Array] and will print an error message." msgstr "" +"Retourne un tableau avec les points qui sont dans le chemin trouvé par AStar " +"entre les points données. Le tableau est dans l'ordre du point de départ " +"jusqu'au bout d'arrivée.\n" +"[b]Note :[/b] Cette méthode n'est pas thread-safe. Si appelé depuis un " +"[Thread], elle retournera un [PoolVector3Array] vide et affichera un message " +"d'erreur." #: doc/classes/AStar.xml doc/classes/AStar2D.xml msgid "" "Returns the position of the point associated with the given [code]id[/code]." -msgstr "" +msgstr "Retourne la position du point associé au [code]id[/code] spécifié." #: doc/classes/AStar.xml doc/classes/AStar2D.xml msgid "" @@ -10299,6 +10451,9 @@ msgid "" "Called when computing the cost between two connected points.\n" "Note that this function is hidden in the default [code]AStar2D[/code] class." msgstr "" +"Appelé lors du calcul du coût entre deux points connectés.\n" +"À noter que cette fonction est masqué dans la classe [code]AStar2D[/code] " +"par défaut." #: doc/classes/AStar2D.xml msgid "" @@ -10306,12 +10461,15 @@ msgid "" "point.\n" "Note that this function is hidden in the default [code]AStar2D[/code] class." msgstr "" +"Appelé lors du calcul du coût entre un point et le dernier du chemin.\n" +"À noter que cette fonction est masqué dans la classe [code]AStar2D[/code] " +"par défaut." #: doc/classes/AStar2D.xml msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -10328,7 +10486,7 @@ msgstr "" #: doc/classes/AStar2D.xml msgid "Returns whether there is a connection/segment between the given points." -msgstr "" +msgstr "Retourne s'il y a une connexion/segment entre les points spécifiés." #: doc/classes/AStar2D.xml msgid "" @@ -10342,6 +10500,15 @@ msgid "" "astar.connect_points(1, 2, false)\n" "[/codeblock]" msgstr "" +"Crée un segment entre les points donnés. Si [code]bidirectional[/code] est " +"[code]false[/code], seuls les mouvements de [code]id[/code] vers " +"[code]to_id[/code] sera autorisés, et non dans le sens inverse.\n" +"[codeblock]\n" +"var astar = AStar2D.new()\n" +"astar.add_point(1, Vector2(1, 1))\n" +"astar.add_point(2, Vector2(0, 5))\n" +"astar.connect_points(1, 2, false)\n" +"[/codeblock]" #: doc/classes/AStar2D.xml msgid "Deletes the segment between the given points." @@ -10413,6 +10580,12 @@ msgid "" "[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it " "will return an empty [PoolVector2Array] and will print an error message." msgstr "" +"Retourne un tableau avec les points qui sont dans le chemin trouvé par " +"AStar2D entre les points données. Le tableau est dans l'ordre du point de " +"départ jusqu'au bout d'arrivée.\n" +"[b]Note :[/b] Cette méthode n'est pas thread-safe. Si appelé depuis un " +"[Thread], elle retournera un [PoolVector3Array] vide et affichera un message " +"d'erreur." #: doc/classes/AtlasTexture.xml msgid "" @@ -11194,6 +11367,7 @@ msgstr "Représente la taille de l'énumération [enum FFT_Size]." #: doc/classes/AudioEffectRecord.xml msgid "Audio effect used for recording the sound from an audio bus." msgstr "" +"L'effet audio utilisé pour l'enregistrement des sons venants d'un bus audio." #: doc/classes/AudioEffectRecord.xml msgid "" @@ -11345,6 +11519,9 @@ msgid "" "charge of creating sample data (playable audio) as well as its playback via " "a voice interface." msgstr "" +"[AudioServer] est une interface bas-niveau du serveur pour l'accès audio. Il " +"est chargé de créer des données échantillonnées (audio jouable) mais aussi " +"la lecture par une interface orale." #: doc/classes/AudioServer.xml doc/classes/AudioStreamPlayer.xml msgid "Audio Device Changer Demo" @@ -11365,10 +11542,11 @@ msgstr "" #: doc/classes/AudioServer.xml msgid "Returns the names of all audio input devices detected on the system." msgstr "" +"Retourne le nom de tous les appareils d'entrée audio détectés par le système." #: doc/classes/AudioServer.xml msgid "Generates an [AudioBusLayout] using the available buses and effects." -msgstr "" +msgstr "Génère un [AudioBusLayout] en utilisant les bus et effets disponibles." #: doc/classes/AudioServer.xml msgid "" @@ -11428,8 +11606,9 @@ msgid "Returns the names of all audio devices detected on the system." msgstr "" #: doc/classes/AudioServer.xml +#, fuzzy msgid "Returns the sample rate at the output of the [AudioServer]." -msgstr "" +msgstr "Retourne le débit de sortie du [AudioServer]." #: doc/classes/AudioServer.xml msgid "Returns the audio driver's output latency." @@ -11452,6 +11631,8 @@ msgid "" "If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing " "effects." msgstr "" +"Si [code]true[/code], le bus à l'index [code]bus_idx[/code] ignore les " +"effets." #: doc/classes/AudioServer.xml msgid "" @@ -11490,6 +11671,8 @@ msgid "" "Removes the effect at index [code]effect_idx[/code] from the bus at index " "[code]bus_idx[/code]." msgstr "" +"Retire l'effet à la position [code]effect_idx[/code] du bus à la position " +"[code]bus_idx[/code]." #: doc/classes/AudioServer.xml msgid "Overwrites the currently used [AudioBusLayout]." @@ -11703,6 +11886,8 @@ msgid "" "If [code]true[/code], the stream will automatically loop when it reaches the " "end." msgstr "" +"Si [code]true[/code], le flux se répètera automatiquement quand il aura " +"atteint la fin." #: modules/minimp3/doc_classes/AudioStreamMP3.xml #: modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml @@ -12343,6 +12528,8 @@ msgid "" "The environment color when [member environment_mode] is set to [constant " "ENVIRONMENT_MODE_CUSTOM_COLOR]." msgstr "" +"La couleur de l'environnement quand [member environment_mode] est à " +"[constant ENVIRONMENT_MODE_CUSTOM_COLOR]." #: doc/classes/BakedLightmap.xml msgid "" @@ -12356,6 +12543,8 @@ msgid "" "The [Sky] resource to use when [member environment_mode] is set o [constant " "ENVIRONMENT_MODE_CUSTOM_SKY]." msgstr "" +"La ressource [Sky] à utiliser quand [member environment_mode] est à " +"[constant ENVIRONMENT_MODE_CUSTOM_SKY]." #: doc/classes/BakedLightmap.xml #, fuzzy @@ -12689,6 +12878,8 @@ msgid "" "Require a press and a subsequent release before considering the button " "clicked." msgstr "" +"Requiert un appui suivi d'un relâchement avant de considérer le bouton comme " +"cliqué." #: doc/classes/Basis.xml msgid "3×3 matrix datatype." @@ -12853,15 +13044,15 @@ msgstr "" #: doc/classes/Basis.xml msgid "Transposed dot product with the X axis of the matrix." -msgstr "" +msgstr "Le produit scalaire de la matrice transposée avec l'axe X." #: doc/classes/Basis.xml msgid "Transposed dot product with the Y axis of the matrix." -msgstr "" +msgstr "Le produit scalaire de la matrice transposée avec l'axe Y." #: doc/classes/Basis.xml msgid "Transposed dot product with the Z axis of the matrix." -msgstr "" +msgstr "Le produit scalaire de la matrice transposée avec l'axe Z." #: doc/classes/Basis.xml msgid "Returns the transposed version of the matrix." @@ -12945,6 +13136,8 @@ msgstr "" msgid "" "Creates a bitmap with the specified size, filled with [code]false[/code]." msgstr "" +"Crée un bitmap de la taille spécifiée, rempli avec la valeur [code]false[/" +"code]." #: doc/classes/BitMap.xml msgid "" @@ -12984,6 +13177,7 @@ msgstr "Redimensionne l'image à la nouvelle taille [code]new_size[/code]." msgid "" "Sets the bitmap's element at the specified position, to the specified value." msgstr "" +"Définit l'élément du bitmap à la position donnée, avec la valeur spécifiée." #: doc/classes/BitMap.xml msgid "Sets a rectangular portion of the bitmap to the specified value." @@ -13071,6 +13265,8 @@ msgstr "" #: doc/classes/Bone2D.xml msgid "Joint used with [Skeleton2D] to control and animate other nodes." msgstr "" +"Un joint utilisé avec un [Skeleton2D] pour contrôler et animer les autres " +"nÅ“uds." #: doc/classes/Bone2D.xml msgid "" @@ -13104,12 +13300,16 @@ msgstr "" msgid "" "Length of the bone's representation drawn in the editor's viewport in pixels." msgstr "" +"La longueur en pixel de l'os tel qu'affiché dans la fenêtre d'affichage de " +"l'éditeur." #: doc/classes/Bone2D.xml msgid "" "Rest transform of the bone. You can reset the node's transforms to this " "value using [method apply_rest]." msgstr "" +"Le transformation de repos de l'os. Vous pouvez rétablir la transformation " +"du nÅ“ud à cette valeur avec [method apply_rest]." #: doc/classes/BoneAttachment.xml msgid "A node that will attach to a bone." @@ -13179,6 +13379,53 @@ msgid "" " can_shoot = true\n" "[/codeblock]" msgstr "" +"Le type intégré booléen. Il y a deux valeurs booléennes : [code]true[/code] " +"(vrai) et [code]false[/code] (faux). Vous pouvez penser à un interrupteur " +"avec les deux positions allumé ou éteins (1 ou 0). Les booléens sont " +"utilisés en programmation pour la logique dans les instructions de " +"conditions, comme [code]if[/code].\n" +"Les booléens peuvent être directement utilisés dans les instructions " +"[code]if[/code]. Le code en-dessous montre ça dans la ligne [code]if " +"can_shoot:[/code]. Vous n'avez pas besoin d'utiliser [code]== true[/code], " +"mais [code]if can_shoot:[/code] suffit. De même, utilisez [code]if not " +"can_shoot:[/code] plutôt que [code]== false[/code].\n" +"[codeblock]\n" +"var can_shoot = true\n" +"\n" +"func shoot():\n" +" if can_shoot:\n" +" pass # Faire les actions de tirs ici.\n" +"[/codeblock]\n" +"Le code suivant ne créera une balle que si les deux conditions sont " +"correctes : l'action \"shoot\" est pressée et si [code]can_shoot[/code] est " +"[code]true[/code].\n" +"[b]Note :[/b] [code]Input.is_action_pressed(\"shoot\")[/code] est aussi un " +"booléen qui est [code]true[/code] quand \"shoot\" est appuyé et [code]false[/" +"code] quand \"shoot\" n'est pas appuyé.\n" +"[codeblock]\n" +"var can_shoot = true\n" +"\n" +"func shoot():\n" +" if can_shoot and Input.is_action_pressed(\"shoot\"):\n" +" create_bullet()\n" +"[/codeblock]\n" +"Le code suivant définira [code]can_shoot[/code] à [code]false[/code] et " +"lancera un minuteur. Ça empêchera le joueur de tirer tant que le minuteur " +"n'est pas fini. Puis [code]can_shoot[/code] sera mis à [code]true[/code] à " +"nouveau et permettra au joueur de tirer une fois à nouveau.\n" +"[codeblock]\n" +"var can_shoot = true\n" +"onready var cool_down = $CoolDownTimer\n" +"\n" +"func shoot():\n" +" if can_shoot and Input.is_action_pressed(\"shoot\"):\n" +" create_bullet()\n" +" can_shoot = false\n" +" cool_down.start()\n" +"\n" +"func _on_CoolDownTimer_timeout():\n" +" can_shoot = true\n" +"[/codeblock]" #: doc/classes/bool.xml msgid "" @@ -13186,6 +13433,9 @@ msgid "" "code] if [code]0[/code] is passed in, and [code]true[/code] for all other " "ints." msgstr "" +"Transforme une valeur [int] en booléen, cette méthode retournera " +"[code]false[/code] si [code]0[/code] est donné, et [code]true[/code] pour " +"toute autre valeur entière." #: doc/classes/bool.xml msgid "" @@ -13193,6 +13443,9 @@ msgid "" "[code]false[/code] if [code]0.0[/code] is passed in, and [code]true[/code] " "for all other floats." msgstr "" +"Transforme une valeur [float] en booléen, cette méthode retournera " +"[code]false[/code] si [code]0[/code] est donné, et [code]true[/code] pour " +"tout autre flottant." #: doc/classes/bool.xml msgid "" @@ -13247,6 +13500,7 @@ msgstr "Ressource en forme de boîte." #: doc/classes/BoxShape.xml msgid "3D box shape that can be a child of a [PhysicsBody] or [Area]." msgstr "" +"Un forme de boite en 3D qui peut être un enfant d'un [PhysicsBody] ou [Area]." #: doc/classes/BoxShape.xml doc/classes/CapsuleShape.xml #: doc/classes/ConcavePolygonShape.xml doc/classes/ConvexPolygonShape.xml @@ -13543,17 +13797,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13864,6 +14118,9 @@ msgid "" "Only one camera can be current, so setting a different camera [code]current[/" "code] will disable this one." msgstr "" +"Si [code]true[/code], cette camera est la caméra active de la scène " +"actuelle. Seule une caméra peut être l'actuelle, donc définir une autre " +"caméra comme [code]current[/code] désactivera celle-ci." #: doc/classes/Camera2D.xml msgid "" @@ -13923,6 +14180,7 @@ msgstr "" msgid "" "If [code]true[/code], draws the camera's screen rectangle in the editor." msgstr "" +"Si [code]true[/code], affiche le rectangle de la caméra dans l'éditeur." #: doc/classes/Camera2D.xml msgid "" @@ -14001,6 +14259,8 @@ msgid "" "If [code]true[/code], the camera smoothly moves towards the target at " "[member smoothing_speed]." msgstr "" +"Si [code]true[/code], la caméra se déplacement doucement vers la cible à la " +"vitesse [member smoothing_speed]." #: doc/classes/Camera2D.xml msgid "" @@ -14027,6 +14287,8 @@ msgid "" "The camera's position takes into account vertical/horizontal offsets and the " "screen size." msgstr "" +"La position de la caméra prend en compte le décalage vertical et horizontal, " +"et la taille de l'écran." #: doc/classes/Camera2D.xml doc/classes/ClippedCamera.xml msgid "The camera updates with the [code]_physics_process[/code] callback." @@ -14790,6 +15052,7 @@ msgstr "" msgid "" "The manner in which a material's rendering is applied to underlying textures." msgstr "" +"La manière dont le rendu du matériau est appliqué aux textures en-dessous." #: doc/classes/CanvasItemMaterial.xml msgid "The manner in which material reacts to lighting." @@ -15166,6 +15429,8 @@ msgstr "" #: doc/classes/CheckBox.xml msgid "The [CheckBox] text's font color when it's hovered and pressed." msgstr "" +"La couleur de la police du texte du [CheckBox] quand il est survolé ou " +"appuyé." #: doc/classes/CheckBox.xml msgid "The [CheckBox] text's font color when it's pressed." @@ -15220,16 +15485,19 @@ msgstr "Icône à afficher lorsque le [CheckButton] est coché et désactivé." msgid "" "The [StyleBox] to display as a background when the [CheckBox] is disabled." msgstr "" +"La [StyleBox] à afficher en arrière-plan quand la [CheckBox] est cochée." #: doc/classes/CheckBox.xml msgid "" "The [StyleBox] to display as a background when the [CheckBox] is focused." msgstr "" +"La [StyleBox] à afficher en arrière-plan quand la [CheckBox] a le focus." #: doc/classes/CheckBox.xml msgid "" "The [StyleBox] to display as a background when the [CheckBox] is hovered." msgstr "" +"La [StyleBox] à afficher en arrière-plan quand la [CheckBox] est survolée." #: doc/classes/CheckBox.xml msgid "" @@ -15245,6 +15513,7 @@ msgstr "Le [StyleBox] a affiché en arrière-plan." msgid "" "The [StyleBox] to display as a background when the [CheckBox] is pressed." msgstr "" +"La [StyleBox] à afficher en arrière-plan quand la [CheckBox] est appuyée." #: doc/classes/CheckButton.xml msgid "Checkable button. See also [CheckBox]." @@ -15286,6 +15555,8 @@ msgstr "" #: doc/classes/CheckButton.xml msgid "The [CheckButton] text's font color when it's hovered and pressed." msgstr "" +"La couleur de la police du texte du [CheckButton] quand il est survolé ou " +"appuyé." #: doc/classes/CheckButton.xml msgid "The [CheckButton] text's font color when it's pressed." @@ -15324,16 +15595,19 @@ msgstr "Icône à afficher lorsque le [CheckButton] est coché et désactivé." msgid "" "The [StyleBox] to display as a background when the [CheckButton] is disabled." msgstr "" +"La [StyleBox] à afficher en arrière-plan quand la [CheckBox] est désactivée." #: doc/classes/CheckButton.xml msgid "" "The [StyleBox] to display as a background when the [CheckButton] is focused." msgstr "" +"La [StyleBox] à afficher en arrière-plan quand le [CheckButton] a le focus." #: doc/classes/CheckButton.xml msgid "" "The [StyleBox] to display as a background when the [CheckButton] is hovered." msgstr "" +"La [StyleBox] à afficher en arrière-plan quand le [CheckButton] est survolé." #: doc/classes/CheckButton.xml msgid "" @@ -15435,6 +15709,8 @@ msgid "" "Returns the value of [code]property[/code] of [code]class[/code] or its " "ancestry." msgstr "" +"Retourne la valeur de la propriété [code]property[/code] de la classe " +"[code]class[/code] ou de ses parents." #: doc/classes/ClassDB.xml msgid "" @@ -15578,15 +15854,15 @@ msgid "" msgstr "" #: doc/classes/ClippedCamera.xml -#, fuzzy msgid "If [code]true[/code], the camera stops on contact with [Area]s." -msgstr "Si [code]true[/code], le bouton \"add preset\" est activé." +msgstr "" +"Si [code]true[/code], la caméra s'arrête lors des collisions avec les [Area]." #: doc/classes/ClippedCamera.xml -#, fuzzy msgid "If [code]true[/code], the camera stops on contact with [PhysicsBody]s." msgstr "" -"Si [code]true[/code], le mouvement linéaire à travers l’axe Z est limité." +"Si [code]true[/code], la caméra s'arrête lors des collisions avec les " +"[PhysicsBody]." #: doc/classes/ClippedCamera.xml msgid "" @@ -15708,7 +15984,7 @@ msgstr "Retourne le [RID] de la énième forme d'une zone." #: doc/classes/CollisionObject.xml doc/classes/CollisionObject2D.xml msgid "Returns the number of shapes the given shape owner contains." -msgstr "" +msgstr "Retourne le nombre de formes que le propriétaire de forme contient." #: doc/classes/CollisionObject.xml #, fuzzy @@ -15783,6 +16059,7 @@ msgstr "Émis quand le curseur entre dans n'importe quelle forme de l'objet." #: doc/classes/CollisionObject.xml msgid "Emitted when the mouse pointer exits all this object's shapes." msgstr "" +"Émis quand le curseur de la souris quitte toutes les formes de cet objets." #: doc/classes/CollisionObject2D.xml msgid "Base node for 2D collision objects." @@ -15904,6 +16181,7 @@ msgstr "" #: doc/classes/CollisionPolygon.xml msgid "Editor-only class for defining a collision polygon in 3D space." msgstr "" +"Une classe exclusive à l'éditeur pour définir un polygone de collision en 3D." #: doc/classes/CollisionPolygon.xml msgid "" @@ -15960,7 +16238,9 @@ msgstr "Si [code]true[/code], aucune collision ne sera détectée." #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -16061,9 +16341,12 @@ msgid "" msgstr "Une forme de collision désactivée n’a aucun effet dans le monde." #: doc/classes/CollisionShape2D.xml +#, fuzzy msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" "Définit si cette forme de collision doit uniquement détecter la collision " "sur un côté (en haut ou en bas)." @@ -16182,6 +16465,14 @@ msgid "" "var blended_color = bg.blend(fg) # Brown with alpha of 75%\n" "[/codeblock]" msgstr "" +"Retourne une nouvelle couleur résultant du mélanger de cette couleur avec " +"une autre. Si la couleur est opaque, le résultat est aussi opaque. La " +"deuxième couleur peut avoir une certaine opacité.\n" +"[codeblock]\n" +"var bg = Color(0.0, 1.0, 0.0, 0.5) # Vert avec 50% d'opacité\n" +"var fg = Color(1.0, 0.0, 0.0, 0.5) # Rouge avec 50% d'opacité\n" +"var blended_color = bg.blend(fg) # Marron avec 75% d'opacité\n" +"[/codeblock]" #: doc/classes/Color.xml msgid "" @@ -17110,6 +17401,7 @@ msgstr "" #: doc/classes/ColorPicker.xml msgid "Returns the list of colors in the presets of the color picker." msgstr "" +"Retourne la liste des couleurs dans la palette du sélectionneur de couleur." #: doc/classes/ColorPicker.xml doc/classes/ColorPickerButton.xml msgid "The currently selected color." @@ -17151,6 +17443,11 @@ msgid "" "tinting without darkening or rendering sprites in HDR).\n" "[b]Note:[/b] Cannot be enabled if HSV mode is on." msgstr "" +"Si [code]true[/code], autorise les composants de couleur R, G, B à dépasser " +"1.0, ce qui peut être utilisé pour certaines opérations spéciales qui le " +"nécessitent (comme changer de teinte sans assombrir ou afficher des images " +"en HDR).\n" +"[b]Note :[/b] Le mode HSV ne peut pas être activé dans ce cas." #: doc/classes/ColorPicker.xml msgid "Emitted when the color is changed." @@ -17187,6 +17484,8 @@ msgstr "L'icône du bouton pour ajouter un préréglage." #: doc/classes/ColorPicker.xml msgid "Custom texture for the hue selection slider on the right." msgstr "" +"La texture personnalisée pour le glisseur de sélection de la teinte sur la " +"droite." #: doc/classes/ColorPicker.xml msgid "" @@ -17236,6 +17535,7 @@ msgid "" "If [code]true[/code], the alpha channel in the displayed [ColorPicker] will " "be visible." msgstr "" +"Si [code]true[/code], le canal alpha sera affiché dans le [ColorPicker]." #: doc/classes/ColorPickerButton.xml msgid "Emitted when the color changes." @@ -17286,7 +17586,7 @@ msgstr "[Font] du texte du [ColorPickerButton]." #: doc/classes/ColorPickerButton.xml msgid "The background of the color preview rect on the button." -msgstr "" +msgstr "L'arrière-plan du rectangle d'aperçu de couleur sur le bouton." #: doc/classes/ColorPickerButton.xml msgid "[StyleBox] used when the [ColorPickerButton] is disabled." @@ -17505,6 +17805,72 @@ msgid "" "standardized, Godot's ConfigFile formatting may differ from files written by " "other programs." msgstr "" +"Cette classe d'aide peut être utilisée pour enregistrer des valeurs de type " +"[Variant] sur le disque au format INI. Les valeurs enregistrées sont " +"identifiées par une section et une clé :\n" +"[codeblock]\n" +"[section]\n" +"some_key=42\n" +"string_example=\"Bonjour le Monde !\"\n" +"a_vector=Vector3( 1, 0, 2 )\n" +"[/codeblock]\n" +"Les données enregistrées peuvent l'être dans un fichier ou chargé depuis un " +"fichier, mais aussi par les objets ConfigFile qui peuvent être gérés en " +"mémoire seulement.\n" +"L'exemple suivant montre comme créer un simple [ConfigFile] et l'enregistrer " +"sur le disque :\n" +"[codeblock]\n" +"# Create new ConfigFile object.\n" +"var config = ConfigFile.new()\n" +"\n" +"# Enregistrer quelques valeurs.\n" +"config.set_value(\"Player1\", \"nom_joueur\", \"Jean\")\n" +"config.set_value(\"Player1\", \"meilleur_score\", 10)\n" +"config.set_value(\"Player2\", \"nom_joueur\", \"V3geta\")\n" +"config.set_value(\"Player2\", \"meilleur_score\", 9001)\n" +"\n" +"# L'enregistrer sur dans un fichier (en écrasant le fichier déjà existant " +"s'il y en a un).\n" +"config.save(\"user://scores.cfg\")\n" +"[/codeblock]\n" +"Cet exemple montre comme le fichier au-dessus peut-être chargé :\n" +"[codeblock]\n" +"var score_data = {}\n" +"var config = ConfigFile.new()\n" +"\n" +"# Charger depuis le fichier.\n" +"var err = config.load(\"user://scores.cfg\")\n" +"\n" +"# Si le fichier n'a pu être chargé, ignorer la suite.\n" +"if err != OK:\n" +" return\n" +"\n" +"# Défiler les sections.\n" +"for player in config.get_sections():\n" +" # Récupérer les données de chaque section.\n" +" var player_name = config.get_value(player, \"nom_joueur\")\n" +" var player_score = config.get_value(player, \"meilleur_score\")\n" +" score_data[player_name] = player_score\n" +"[/codeblock]\n" +"Toutes les opérations qui modifient un ConfigFile comme [method set_value], " +"[method clear], ou [method erase_section], ne changent que les données en " +"mémoire. Si vous voulez aussi modifier le fichier, vous devez appeler " +"[method save], [method save_encrypted], ou [method save_encrypted_pass].\n" +"Notez que les noms des sections et des propriétés ne peuvent contenir des " +"espaces. Tous les caractères après un espace seront ignorés à la sauvegarde " +"et au chargement.\n" +"Les ConfigFile peuvent aussi contenir des commentaires qui doivent commencer " +"par un point-virgule ([code];[/code]). Ces lignes sont ignorées au " +"chargement d'un fichier. À noter que ces commentaires seront perdus à " +"l'enregistrement d'un ConfigFile. Ils peuvent toujours servir pour les " +"fichiers de configuration sur les serveurs, qui ne sont typiquement jamais " +"modifiés sans le faire manuellement.\n" +"[b]Note :[/b] L'extension du nom de fichier donné à un ConfigFile n'a aucun " +"impact sur son format ou son comportement. Par convention, l'extension " +"[code].cfg[/code] est utilisée ici, mais n'importe quelle autre extension " +"comme [code].ini[/code] est aussi valide. Comme ni [code].cfg[/code] ni " +"[code].ini[/code] ne sont des standards, le format des ConfigFile de Godot " +"peuvent différer d'un programme à un autre." #: doc/classes/ConfigFile.xml #, fuzzy @@ -17742,6 +18108,16 @@ msgid "" "[Button], [PanelContainer] etc.). It can only be used with most basic GUI " "nodes, like [Control], [Container], [Panel] etc." msgstr "" +"Une méthode virtuelle à implémenter par l'utilisateur. Retourne la taille " +"minimale de ce contrôle. Cette taille peut aussi être contrôlée avec [member " +"rect_min_size] par le code. L'actuelle taille minimale sera le maximum de " +"ces deux valeurs (sur chaque axe séparément).\n" +"Si n'est pas surchargé, la valeur par défaut est [constant Vector2.ZERO].\n" +"[b]Note :[/b] Cette méthode n'est pas appelée quand le script est attaché à " +"un nÅ“ud [Control] qui définit depuis lui-même sa taille minimale (ex. " +"[Label], [Button], [PanelContainer], etc.). Elle ne peut être utilisée " +"qu'avec les éléments d'interface les plus basiques, comme les [Control], " +"[Container], [Panel], etc." #: doc/classes/Control.xml msgid "" @@ -17799,6 +18175,38 @@ msgid "" " return tooltip\n" "[/codeblock]" msgstr "" +"Une méthode virtuelle à implémenter par l'utilisateur. Retourne un nÅ“ud " +"[Control] qui doit être utilisé pour l'infobulle plutôt que celui par " +"défaut. Le texte [code]for_text[/code] contient le contenu de la propriété " +"[member hint_tooltip].\n" +"Le nÅ“ud retourné doit être du type [Control] ou doit en hériter. Il peut " +"avoir des enfants de n'importe quel type. Il est libéré quand l'infobulle " +"disparait, alors vérifiez que vous fournissez une nouvelle instance à chaque " +"fois (si vous voulez utiliser un nÅ“ud déjà existant dans votre scène, vous " +"pouvez le dupliquer et passer cette instance dupliquée). Quand [code]null[/" +"code] est retourné ou que ça n'est pas un Control, l'infobulle par défaut " +"sera utilisée à la place.\n" +"Le nÅ“ud retourné sera ajouté comme enfant à un [PopupPanel], alors vous ne " +"devriez pas fournir le contenu de ce panneau. Ce [PopupPanel] peut avoir un " +"thème défini par [method Theme.set_stylebox] pour le type " +"[code]\"TooltipPanel\"[/code] (voir [member hint_tooltip] pour un exemple).\n" +"[b]Note :[/b] L'infobulle est réduite à sa taille minimale. Si vous voulez " +"vous assurer qu'elle est visible entièrement, vous devriez définir sa taille " +"minimale [member rect_min_size] à une valeur supérieure à zéro.\n" +"Exemple avec un nÅ“ud construit manuellement :\n" +"[codeblock]\n" +"func _make_custom_tooltip(for_text):\n" +" var label = Label.new()\n" +" label.text = for_text\n" +" return label\n" +"[/codeblock]\n" +"Exemple avec l’instanciation d'une scène personnalisée :\n" +"[codeblock]\n" +"func _make_custom_tooltip(for_text):\n" +" var tooltip = preload(\"res://SomeTooltipScene.tscn\").instance()\n" +" tooltip.get_node(\"Label\").text = for_text\n" +" return tooltip\n" +"[/codeblock]" #: doc/classes/Control.xml msgid "" @@ -17806,6 +18214,9 @@ msgid "" "propagating, even to nodes listening to [method Node._unhandled_input] or " "[method Node._unhandled_key_input]." msgstr "" +"Marque un événement d'entrée comme traité. Une fois l'événement accepté, il " +"arrête de se propager, même aux nÅ“uds surchargeant les méthodes [method Node." +"_unhandled_input] ou [method Node._unhandled_key_input]." #: doc/classes/Control.xml msgid "" @@ -17823,6 +18234,20 @@ msgid "" "\"Label\"))\n" "[/codeblock]" msgstr "" +"Crée un changement local pour la [Color] du thème pour le nom [code]name[/" +"code] spécifié. Les changements locaux sont prioritaires sur les valeurs du " +"thème pour les contrôles.\n" +"Voir aussi [method get_color], [method remove_color_override].\n" +"[b]Un exemple de surcharge de la couleur d'un label puis son rétablissement :" +"[/b]\n" +"[codeblock]\n" +"# Pour le label \"MyLabel\", changer la couleur de sa police avec un valeur " +"personnalisée.\n" +"$MyLabel.add_color_override(\"font_color\", Color(1, 0.5, 0))\n" +"# Rétablir la couleur de la police du label.\n" +"$MyLabel.add_color_override(\"font_color\", get_color(\"font_color\", " +"\"Label\"))\n" +"[/codeblock]" #: doc/classes/Control.xml #, fuzzy @@ -17925,6 +18350,8 @@ msgstr "" msgid "" "Finds the next (below in the tree) [Control] that can receive the focus." msgstr "" +"Cherche le prochain (en-dessous dans l'arborescence) [Control] qui peut " +"prendre le focus." #: doc/classes/Control.xml #, fuzzy @@ -17988,6 +18415,8 @@ msgid "" "Returns combined minimum size from [member rect_min_size] and [method " "get_minimum_size]." msgstr "" +"Retourne la taille minimal combinée de [member rect_min_size] et [method " +"get_minimum_size]." #: doc/classes/Control.xml msgid "" @@ -18037,6 +18466,7 @@ msgstr "" msgid "" "Returns the control that has the keyboard focus or [code]null[/code] if none." msgstr "" +"Retourne le contrôle qui a le focus du clavier ou [code]null[/code] si aucun." #: doc/classes/Control.xml msgid "" @@ -18175,6 +18605,8 @@ msgid "" "Returns [code]true[/code] if this is the current focused control. See " "[member focus_mode]." msgstr "" +"Retourne [code]true[/code] si c'est le contrôle qui a le focus. Voir [member " +"focus_mode]." #: doc/classes/Control.xml #, fuzzy @@ -18229,14 +18661,14 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy msgid "" "Returns [code]true[/code] if there is a local override for a theme shader " "with the specified [code]name[/code] in this [Control] node.\n" "See [method add_shader_override]." msgstr "" -"Retourne [code]true[/code] si le paramètre spécifié par [code]name[/code] " -"existe, [code]false[/code] autrement." +"Retourne [code]true[/code] s'il y a un écrasement local pour le shader du " +"thème nommé [code]name[/code] pour ce nÅ“ud [Control].\n" +"Voir [method add_shader_override]." #: doc/classes/Control.xml msgid "" @@ -18247,14 +18679,14 @@ msgid "" msgstr "" #: doc/classes/Control.xml -#, fuzzy msgid "" "Returns [code]true[/code] if there is a local override for a theme " "[StyleBox] with the specified [code]name[/code] in this [Control] node.\n" "See [method add_stylebox_override]." msgstr "" -"Retourne [code]true[/code] si le paramètre spécifié par [code]name[/code] " -"existe, [code]false[/code] autrement." +"Retourne [code]true[/code] s'il y a un écrasement local pour la [StyleBox] " +"du thème nommé [code]name[/code] pour ce nÅ“ud [Control].\n" +"Voir [method add_stylebox_override]." #: doc/classes/Control.xml msgid "" @@ -18262,6 +18694,9 @@ msgid "" "[method Viewport.gui_is_drag_successful].\n" "Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" +"Retourne [code]true[/code] si l'opération de déposé-glissé a réussi. C'est " +"une alternative à [method Viewport.gui_is_drag_successful].\n" +"Mieux utilisé avec [constant Node.NOTIFICATION_DRAG_END]." #: doc/classes/Control.xml msgid "" @@ -18384,6 +18819,32 @@ msgid "" " return my_data()\n" "[/codeblock]" msgstr "" +"Donne la gestion du déposé-glissé de ce contrôle au contrôle cible " +"[code]target[/code].\n" +"Cette gestion peut être implémenté dans le contrôle cible de la même manière " +"avec les méthodes [method get_drag_data], [method can_drop_data], et [method " +"drop_data] mais avec deux différences :\n" +"1. Le nom de la fonction doit commencer par [b]_fw[/b]\n" +"2. La fonction doit prendre un argument suplémentaire qui sera le contrôle " +"qui a donné la gestion\n" +"[codeblock]\n" +"# ThisControl.gd\n" +"extends Control\n" +"func _ready():\n" +" set_drag_forwarding(target_control)\n" +"\n" +"# TargetControl.gd\n" +"extends Control\n" +"func can_drop_data_fw(position, data, from_control):\n" +" return true\n" +"\n" +"func drop_data_fw(position, data, from_control):\n" +" my_handle_data(data)\n" +"\n" +"func get_drag_data_fw(position, from_control):\n" +" set_drag_preview(my_preview)\n" +" return my_data()\n" +"[/codeblock]" #: doc/classes/Control.xml msgid "" @@ -18404,6 +18865,23 @@ msgid "" " return color\n" "[/codeblock]" msgstr "" +"Affiche le contrôle donné comme curseur de la souris. Un bon moment pour " +"appeler cette méthode est dans [method get_drag_data]. Le contrôle doit ne " +"pas être dans l'arborescence. Vous ne devriez pas libérer le contrôle, et " +"vous ne devriez pas garder une référence du contrôle en-dehors de la durée " +"du déposé-glissé. Il sera supprimé automatiquement quand le déposé-glissé " +"sera terminé.\n" +"[codeblock]\n" +"export (Color, RGBA) var color = Color(1, 0, 0, 1)\n" +"\n" +"func get_drag_data(position):\n" +" # Utiliser un nÅ“ud qui n'est pas dans l'arborescence\n" +" var cpb = ColorPickerButton.new()\n" +" cpb.color = color\n" +" cpb.rect_size = Vector2(50, 50)\n" +" set_drag_preview(cpb)\n" +" return color\n" +"[/codeblock]" #: doc/classes/Control.xml msgid "Sets [member margin_right] and [member margin_bottom] at the same time." @@ -18416,6 +18894,11 @@ msgid "" "method for [member focus_neighbour_bottom], [member focus_neighbour_left], " "[member focus_neighbour_right] and [member focus_neighbour_top]." msgstr "" +"Définit l'ancre identifiée par la constante [code]margin[/code] depuis " +"l'énumération [enum Margin] du [Control] à l'emplacement du nÅ“ud " +"[code]neighbor[/code]. C'est une méthode pour définir [member " +"focus_neighbour_bottom], [member focus_neighbour_left], [member " +"focus_neighbour_right] et [member focus_neighbour_top]." #: doc/classes/Control.xml msgid "" @@ -18926,6 +19409,7 @@ msgstr "Afficher le curseur de la main qui pointe quand il passe sur ce nÅ“ud." #: doc/classes/Control.xml msgid "Show the system's cross mouse cursor when the user hovers the node." msgstr "" +"Affiche le curseur en croix du système quand l'utilisateur survole ce nÅ“ud." #: doc/classes/Control.xml msgid "" @@ -19248,7 +19732,7 @@ msgstr "Ressource de forme de polygone concave 2D pour la physique." #: doc/classes/ConvexPolygonShape.xml msgid "The list of 3D points forming the convex polygon shape." -msgstr "" +msgstr "La liste des points 3D formant le polygone convexe." #: doc/classes/ConvexPolygonShape2D.xml msgid "Convex polygon shape for 2D physics." @@ -19377,6 +19861,8 @@ msgid "" "Initial angular velocity applied to each particle in [i]degrees[/i] per " "second. Sets the speed of rotation of the particle." msgstr "" +"Le vitesse de rotation appliquée à chaque particule en degrés [i]degrees[/i] " +"par seconde." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's angular velocity will vary along this [Curve]." @@ -19664,6 +20150,8 @@ msgid "" "The [Mesh] used for each particle. If [code]null[/code], particles will be " "spheres." msgstr "" +"Le [Mesh] utilisé pour chaque particule. Si [code]null[/code], les " +"particules seront des sphères." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml #: doc/classes/Particles2D.xml @@ -19703,6 +20191,8 @@ msgid "" "Radial acceleration applied to each particle. Makes particle accelerate away " "from origin." msgstr "" +"L'accélération radiale appliquée à chaque particule. Fait accélérer les " +"particules en s'éloignant de l'origine." #: doc/classes/CPUParticles.xml doc/classes/CPUParticles2D.xml msgid "Each particle's radial acceleration will vary along this [Curve]." @@ -20797,6 +21287,8 @@ msgid "" "The render flags for the [CubeMap]. See the [enum Flags] constants for " "details." msgstr "" +"Les drapeaux de rendu pour le [CubeMap]. Voir les constantes [enum Flags] " +"pour plus d'informations." #: doc/classes/CubeMap.xml msgid "" @@ -21021,7 +21513,7 @@ msgstr "" #: doc/classes/Curve.xml msgid "Recomputes the baked cache of points for the curve." -msgstr "" +msgstr "Recalcule le cache des points de la courbe." #: doc/classes/Curve.xml msgid "" @@ -21047,6 +21539,8 @@ msgid "" "Returns the left tangent angle (in degrees) for the point at [code]index[/" "code]." msgstr "" +"Retourne l'angle de la tangente gauche (en degrés) pour le point à l'index " +"[code]index[/code]." #: doc/classes/Curve.xml msgid "Returns the curve coordinates for the point at [code]index[/code]." @@ -21062,6 +21556,8 @@ msgid "" "Returns the right tangent angle (in degrees) for the point at [code]index[/" "code]." msgstr "" +"Retourne l'angle de la tangente droite (en degrés) pour le point à l'index " +"[code]index[/code]." #: doc/classes/Curve.xml msgid "" @@ -21085,12 +21581,16 @@ msgid "" "Sets the left [enum TangentMode] for the point at [code]index[/code] to " "[code]mode[/code]." msgstr "" +"Définit le mode de la tangent [enum TangentMode] gauche pour la position à " +"l'index [code]index[/code] à [code]mode[/code]." #: doc/classes/Curve.xml msgid "" "Sets the left tangent angle for the point at [code]index[/code] to " "[code]tangent[/code]." msgstr "" +"Définit l'angle de la tangent gauche pour le point à l'index [code]index[/" +"code] avec [code]tangent[/code]." #: doc/classes/Curve.xml msgid "Sets the offset from [code]0.5[/code]." @@ -21101,12 +21601,16 @@ msgid "" "Sets the right [enum TangentMode] for the point at [code]index[/code] to " "[code]mode[/code]." msgstr "" +"Définit le mode de la tangent [enum TangentMode] droite pour la position à " +"l'index [code]index[/code] à [code]mode[/code]." #: doc/classes/Curve.xml msgid "" "Sets the right tangent angle for the point at [code]index[/code] to " "[code]tangent[/code]." msgstr "" +"Définit l'angle de la tangent droite pour le point à l'index [code]index[/" +"code] avec [code]tangent[/code]." #: doc/classes/Curve.xml msgid "" @@ -21157,6 +21661,11 @@ msgid "" "It keeps a cache of precalculated points along the curve, to speed up " "further calculations." msgstr "" +"Cette classe décrit une courbe de Bézier en 2D. C'est principalement utilisé " +"pour définir un chemin [Path2D], mais ça peut être utilisé manuellement pour " +"d'autres usages.\n" +"Ça garde un cache des points calculés le long de la courbe, pour accélérer " +"les calculs ultérieurs." #: doc/classes/Curve2D.xml msgid "" @@ -21374,6 +21883,9 @@ msgid "" "index is out of bounds, the function sends an error to the console, and " "returns [code]0[/code]." msgstr "" +"Retourne l'inclinaison en radians pour le point à l'index [code]idx[/code]. " +"Si l'index est hors limites, la fonction affiche une erreur dans la console, " +"et retourne [code]0[/code]." #: doc/classes/Curve3D.xml msgid "" @@ -21658,6 +22170,113 @@ msgid "" "keys. Using [code]const[/code] will only prevent assigning the constant with " "another value after it was initialized." msgstr "" +"Le type Dictionary. C'est un conteneur associatif qui contient des valeurs " +"référencées par des clés unqiues. Les dictionnaires sont composés de paires " +"de clés (qui doivent toutes être uniques) et des valeurs. Les dictionnaires " +"préservent l'ordre d'ajout des éléments, même si ça n'apparait pas toujours " +"lors de l'affichage du dictionnaire. Dans d'autres langages de " +"programmation, cette structure de données est souvent appelée table de " +"hachage ou tableau associatif.\n" +"Vous pouvez definir un dictionnaire avec une liste de paires au format " +"[code]clé : valeur[/code] entre accolades [code]{}[/code].\n" +"Supprimer des éléments pendant une itération n'est [b]pas supporté[/b] et " +"causera un comportement indéfini.\n" +"[b]Note :[/b] Les dictionnaires sont toujours passés par références. Pour " +"obtenir une copie d'un dictionnaire qui peut être modifié indépendamment du " +"dictionnaire original, utilisez [method duplicate].\n" +"Créer un dictionnaire :\n" +"[codeblock]\n" +"var my_dict = {} # Crée un dictionnaire vide.\n" +"\n" +"var dict_variable_key = \"Une autre clé\"\n" +"var dict_variable_value = \"valeur2\"\n" +"var another_dict = {\n" +" \"Un clé\": \"valeur1\",\n" +" dict_variable_key: dict_variable_value,\n" +"}\n" +"\n" +"var points_dict = {\"Blanc\": 50, \"Jaune\": 75, \"Orange\": 100}\n" +"\n" +"# Syntaxe alternative façon Lua.\n" +"# Ne nécessite pas de guillemets autour des clés, mais seules les chaines de " +"caractères constantes peuvent être utilisées comme nom pour les clés.\n" +"# De plus, les noms des clés doit commencer par une lettre ou un tiret du " +"bas (\"_\").\n" +"# Ici, `une_cle` est une chaine de caractère, pas une variable !\n" +"another_dict = {\n" +" une_cle = 42,\n" +"}\n" +"[/codeblock]\n" +"Vous pouvez accéder aux valeurs d'un dictionnaire en utilisant la clé " +"associée. Dans l'exemple suivant, [code]points_dict[\"Blanc\"][/code] " +"retournera [code]50[/code]. Vous pouvez aussi écrire [code]points_dict." +"Blanc[/code], qui est équivalent. Par contre, vous devez utiliser la syntaxe " +"avec les accolades si la clé n'est pas une chaine de caractère constante " +"(comme un nombre ou une variable).\n" +"[codeblock]\n" +"export(string, \"Blanc\", \"Jaune\", \"Orange\") var my_color\n" +"var points_dict = {\"Blanc\": 50, \"Jaune\": 75, \"Orange\": 100}\n" +"func _ready():\n" +" # On ne peut pas utiliser la syntaxe en point puisque `my_color` est une " +"variable.\n" +" var points = points_dict[my_color]\n" +"[/codeblock]\n" +"Dans l'exemple au-dessus, [code]points[/code] sera assigné à une valeur " +"associée à la couleur choisie dans [code]my_color[/code].\n" +"Les dictionnaires peuvent contenir des données plus complexes :\n" +"[codeblock]\n" +"my_dict = {\"Premier tableau\": [1, 2, 3, 4]} # Assigne un Array à un clé en " +"String.\n" +"[/codeblock]\n" +"Pour ajouter une clé à un dictionnaire déjà existant, accédez-y comme si " +"c'était une clé existante et associez lui une valeur :\n" +"[codeblock]\n" +"var points_dict = {\"Blanc\": 50, \"Jaune\": 75, \"Orange\": 100}\n" +"points_dict[\"Bleu\"] = 150 # Ajoute \"Bleu\" comme clé et lui associe la " +"valeur 150.\n" +"[/codeblock]\n" +"Enfin, les dictionnaires peuvent utiliser différents types de clés et de " +"valeurs dans le même dictionnaire :\n" +"[codeblock]\n" +"# Ceci est un dictionnaire valide.\n" +"# Pour accéder à \"Sous valeur\" en-dessous, utilisez `my_dict.sous_dict." +"sous_cle` ou `my_dict[\"sub_dict\"][\"sous_cle\"]`.\n" +"# Les styles d'accès peuvent être mélangés suivant les besoins.\n" +"var my_dict = {\n" +" \"String Key\": 5,\n" +" 4: [1, 2, 3],\n" +" 7: \"Hello\",\n" +" \"sous_dict\": {\"sous_cle\": \"Sous valeur\"},\n" +"}\n" +"[/codeblock]\n" +"[b]Note :[/b] Contrairement aux [Array], vous ne pouvez pas comparer " +"directement des dictionnaires:\n" +"[codeblock]\n" +"array1 = [1, 2, 3]\n" +"array2 = [1, 2, 3]\n" +"\n" +"func compare_arrays():\n" +" print(array1 == array2) # Affichera \"true\"\n" +"\n" +"var dict1 = {\"a\": 1, \"b\": 2, \"c\": 3}\n" +"var dict2 = {\"a\": 1, \"b\": 2, \"c\": 3}\n" +"\n" +"func compare_dictionaries():\n" +" print(dict1 == dict2) # N'affichera PAS \"true\".\n" +"[/codeblock]\n" +"Vous devez d'abord calculer le hachage du dictionnaire avec la méthode " +"[method hash] avant de pouvoir les comparer :\n" +"[codeblock]\n" +"var dict1 = {\"a\": 1, \"b\": 2, \"c\": 3}\n" +"var dict2 = {\"a\": 1, \"b\": 2, \"c\": 3}\n" +"\n" +"func compare_dictionaries():\n" +" print(dict1.hash() == dict2.hash()) # Affichera \"true\"\n" +"[/codeblock]\n" +"[b]Note :[/b] Quand un dictionnaire est créé avec [code]const[/code], le " +"dictionnaire peut toujours être modifié quand changeant les valeurs ou les " +"clés. Utiliser [code]const[/code] empêche seulement d'assigner cette " +"constante avec une autre valeur une fois la constante initialisée." #: doc/classes/Dictionary.xml msgid "GDScript basics: Dictionary" @@ -21712,6 +22331,17 @@ msgid "" "code] as long as the key exists, even if the associated value is [code]null[/" "code]." msgstr "" +"Retourne [code]true[/code] si le dictionnaire à la clé spécifiée.\n" +"[b]Note :[/b] Ça revient à utiliser l'opérateur [code]in[/code] comme " +"suit :\n" +"[codeblock]\n" +"# Sera évalué à `true`.\n" +"if \"godot\" in {\"godot\": \"engine\"}:\n" +" pass\n" +"[/codeblock]\n" +"Cette méthode (comme pour l'opérateur [code]in[/code]) sera évalué à " +"[code]true[/code] tant que la clé existe, même si elle est associée à " +"[code]null[/code]." #: doc/classes/Dictionary.xml msgid "" @@ -21783,6 +22413,8 @@ msgid "" "Optimizes shadow rendering for detail versus movement. See [enum " "ShadowDepthRange]." msgstr "" +"Optimise le rendu de l'ombre pour les détails plutôt que les mouvements. " +"Voir [enum ShadowDepthRange]." #: doc/classes/DirectionalLight.xml msgid "The maximum distance for shadow splits." @@ -21909,6 +22541,12 @@ msgid "" "overwritten.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" +"Copie le fichier à l'emplacement [code]from[/code] vers la destination " +"[code]to[/code]. Ces deux arguments doivent contenir des chemines vers des " +"fichiers, soient relatifs ou absolus. Si le fichier de destination existe et " +"qu'il n'est pas protégé en écriture, il sera écrasé.\n" +"Retourne un des codes de [enum Error] (et [code]OK[/code] en cas de " +"réussite)." #: doc/classes/Directory.xml msgid "" @@ -21990,6 +22628,9 @@ msgid "" "directory's disk. On other platforms, this information is not available and " "the method returns 0 or -1." msgstr "" +"Sur les systèmes de bureau UNIX, ça retourne l'espace disque disponible sur " +"le disque du dossier actuel. Sur les autres plateformes, cette information " +"n'est pas disponible et la méthode retourne 0 ou -1." #: doc/classes/Directory.xml msgid "" @@ -22002,6 +22643,14 @@ msgid "" "If [code]skip_hidden[/code] is [code]true[/code], hidden files are filtered " "out." msgstr "" +"Initialise le flux utilisée pour lister tous les fichiers et dossiers avec " +"la fonction [method get_next], et ferme le flux actuellement ouvert si " +"nécessaire. Une fois le flux manipulé, il doit être fermé avec [method " +"list_dir_end].\n" +"Si [code]skip_navigational[/code] est [code]true[/code], [code].[/code] et " +"[code]..[/code] sont ignorés.\n" +"Si [code]skip_hidden[/code] est [code]true[/code], les fichiers masqués sont " +"ignorés." #: doc/classes/Directory.xml msgid "" @@ -22034,6 +22683,13 @@ msgid "" "filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\\tmp\\folder[/code]).\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" +"Ouvre un dossier existant dans le système de fichiers. Le chemin [code]path[/" +"code] doit être dans l'arborescence du projet ([code]res://dossier[/code]), " +"dans le dossier utilisateur ([code]user://dossier[/code]) ou un chemin " +"absolu dans le système de fichiers de l'utilisateur (e.g. [code]/tmp/" +"dossier[/code] or [code]C:\\tmp\\dossier[/code]).\n" +"Retourne un des codes d'erreur de [enum Error] (et [code]OK[/code] en cas de " +"succès)." #: doc/classes/Directory.xml msgid "" @@ -22122,6 +22778,68 @@ msgid "" " connected = true\n" "[/codeblock]" msgstr "" +"Cette classe est utilisée pour enregistrer l'état d'un serveur DTLS. La " +"méthode [method setup] convertie les [PacketPeerUDP] connectés en " +"[PacketPeerDTLS] et les acceptent avec [method take_connection] comme " +"clients DTLS. En interne, cette classe est utilisée pour enregistrer l'état " +"DTLS et les cookies sur le serveur. La raison pour laquelle l'état et les " +"cookies sont nécessaires dépasse les propos de cette documentation.\n" +"Voici une petit exemple sur comment l'utiliser :\n" +"[codeblock]\n" +"# server.gd\n" +"extends Node\n" +"\n" +"var dtls := DTLSServer.new()\n" +"var server := UDPServer.new()\n" +"var peers = []\n" +"\n" +"func _ready():\n" +" server.listen(4242)\n" +" var key = load(\"key.key\") # Votre clé privée.\n" +" var cert = load(\"cert.crt\") # Votre certificat X509.\n" +" dtls.setup(key, cert)\n" +"\n" +"func _process(delta):\n" +" while server.is_connection_available():\n" +" var peer : PacketPeerUDP = server.take_connection()\n" +" var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer)\n" +" if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING:\n" +" continue # C'est normal que 50% des connexions échouent à cause " +"des échanges de cookie.\n" +" print(\"Pair connecté !\")\n" +" peers.append(dtls_peer)\n" +" for p in peers:\n" +" p.poll() # Nécessaire pour mettre à jour l'état\n" +" if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED:\n" +" while p.get_available_packet_count() > 0:\n" +" print(\"Message reçu du client : %s\" % p.get_packet()." +"get_string_from_utf8())\n" +" p.put_packet(\"Bonjour client DTLS\".to_utf8())\n" +"[/codeblock]\n" +"[codeblock]\n" +"# client.gd\n" +"extends Node\n" +"\n" +"var dtls := PacketPeerDTLS.new()\n" +"var udp := PacketPeerUDP.new()\n" +"var connected = false\n" +"\n" +"func _ready():\n" +" udp.connect_to_host(\"127.0.0.1\", 4242)\n" +" dtls.connect_to_peer(udp, false) # Utilisez \"true\" en production pour " +"vérifier le certificat !\n" +"\n" +"func _process(delta):\n" +" dtls.poll()\n" +" if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED:\n" +" if !connected:\n" +" # Essayer de contacter le serveur\n" +" dtls.put_packet(\"La réponse est... 42!\".to_utf8())\n" +" while dtls.get_available_packet_count() > 0:\n" +" print(\"Connecté : %s\" % dtls.get_packet()." +"get_string_from_utf8())\n" +" connected = true\n" +"[/codeblock]" #: doc/classes/DTLSServer.xml msgid "" @@ -22417,7 +23135,7 @@ msgstr "" #: doc/classes/EditorExportPlugin.xml msgid "Adds linker flags for the iOS export." -msgstr "" +msgstr "Ajoute un drapeau à l'assembleur pour l'export iOS." #: doc/classes/EditorExportPlugin.xml msgid "Adds content for iOS Property List files." @@ -22454,6 +23172,8 @@ msgstr "" msgid "" "An editor feature profile which can be used to disable specific features." msgstr "" +"Un profile de fonctionnalités de l'éditeur qui permet de désactiver " +"certaines fonctionnalités." #: doc/classes/EditorFeatureProfile.xml msgid "" @@ -22642,13 +23362,15 @@ msgstr "Le fichier actuellement sélectionné." #: doc/classes/EditorFileDialog.xml msgid "The file system path in the address bar." -msgstr "" +msgstr "Le chemin dans le système de fichier dans la barre d'adresse." #: doc/classes/EditorFileDialog.xml msgid "" "If [code]true[/code], the [EditorFileDialog] will not warn the user before " "overwriting files." msgstr "" +"Si [code]true[/code], le [EditorFileDialog] n'avertira pas l'utilisateur " +"avant d'écraser des fichiers." #: doc/classes/EditorFileDialog.xml msgid "" @@ -22666,6 +23388,8 @@ msgid "" "If [code]true[/code], hidden files and directories will be visible in the " "[EditorFileDialog]." msgstr "" +"Si [code]true[/code], les fichiers et dossiers masqués seront visibles dans " +"le [EditorFileDialog]." #: doc/classes/EditorFileDialog.xml msgid "Emitted when a directory is selected." @@ -22770,6 +23494,8 @@ msgstr "Obtient l'objet de répertoire racine." #: doc/classes/EditorFileSystem.xml msgid "Returns a view into the filesystem at [code]path[/code]." msgstr "" +"Retourne une vue dans le système de fichiers à l'emplacement [code]path[/" +"code]." #: doc/classes/EditorFileSystem.xml msgid "Returns the scan progress for 0 to 1 if the FS is being scanned." @@ -22822,7 +23548,7 @@ msgstr "Un répertoire pour le système de fichiers des ressources." #: doc/classes/EditorFileSystemDirectory.xml msgid "A more generalized, low-level variation of the directory concept." -msgstr "" +msgstr "Une variation bas-niveau et plus générale du concept de dossier." #: doc/classes/EditorFileSystemDirectory.xml msgid "" @@ -22890,6 +23616,8 @@ msgid "" "Returns the parent directory for this directory or [code]null[/code] if " "called on a directory at [code]res://[/code] or [code]user://[/code]." msgstr "" +"Retourne le dossier parent de ce dossier ou [code]null[/code] si appelé dans " +"un dossier à [code]res://[/code] ou [code]user://[/code]." #: doc/classes/EditorFileSystemDirectory.xml msgid "Returns the path to this directory." @@ -22966,6 +23694,61 @@ msgid "" "To use [EditorImportPlugin], register it using the [method EditorPlugin." "add_import_plugin] method first." msgstr "" +"Les [EditorImportPlugin] fournissent un moyen d'étendre la fonctionnalité " +"d'importation des ressources dans l'éditeur. Utilisez-les pour importer des " +"ressources depuis des formats de de fichier personnalisés ou pour proposer " +"une alternative aux importateurs existants de l'éditeur.\n" +"Les EditorImportPlugins fonctionnent pas associés certaines extensions de " +"fichiers avec un type de ressource. Voir [method get_recognized_extensions] " +"et [method get_resource_type]. Ils peuvent aussi spécifier des préréglages " +"d'importation qui changerons le processus d'importation. Les " +"EditorImportPlugins sont responsables pour créer les ressources et les " +"enregistrer dans le dossier [code].import[/code] (voir [member " +"ProjectSettings.application/config/use_hidden_project_data_directory]).\n" +"L'exemple ci-dessous définit un EditorImportPlugin qui importe un [Mesh] " +"depuis un fichier avec l'extension \".special\" ou \".spec\" :\n" +"[codeblock]\n" +"tool\n" +"extends EditorImportPlugin\n" +"\n" +"func get_importer_name():\n" +" return \"my.special.plugin\"\n" +"\n" +"func get_visible_name():\n" +" return \"Special Mesh\"\n" +"\n" +"func get_recognized_extensions():\n" +" return [\"special\", \"spec\"]\n" +"\n" +"func get_save_extension():\n" +" return \"mesh\"\n" +"\n" +"func get_resource_type():\n" +" return \"Mesh\"\n" +"\n" +"func get_preset_count():\n" +" return 1\n" +"\n" +"func get_preset_name(i):\n" +" return \"Default\"\n" +"\n" +"func get_import_options(i):\n" +" return [{\"name\": \"my_option\", \"default_value\": false}]\n" +"\n" +"func import(source_file, save_path, options, platform_variants, gen_files):\n" +" var file = File.new()\n" +" if file.open(source_file, File.READ) != OK:\n" +" return FAILED\n" +"\n" +" var mesh = Mesh.new()\n" +" # Remplir le Mesh avec des données lues depuis \"file\" (exercice laissé " +"au lecteur)\n" +"\n" +" var filename = save_path + \".\" + get_save_extension()\n" +" return ResourceSaver.save(filename, mesh)\n" +"[/codeblock]\n" +"Pour utiliser un nouveau [EditorImportPlugin], enregistrez-le d'abord avec " +"la méthode [method EditorPlugin.add_import_plugin]." #: doc/classes/EditorImportPlugin.xml msgid "" @@ -23016,7 +23799,7 @@ msgstr "" #: doc/classes/EditorImportPlugin.xml msgid "Gets the name of the options preset at this index." -msgstr "" +msgstr "Retourne le nom des préréglages de l'option à cette position." #: doc/classes/EditorImportPlugin.xml msgid "" @@ -23132,9 +23915,8 @@ msgid "" msgstr "" #: doc/classes/EditorInspector.xml -#, fuzzy msgid "Emitted when a resource is selected in the inspector." -msgstr "Émis lorsqu'une interface est supprimée." +msgstr "Émis quand une ressource est sélectionnée dans l'inspecteur." #: doc/classes/EditorInspector.xml msgid "" @@ -23299,7 +24081,7 @@ msgstr "" #: doc/classes/EditorInterface.xml msgid "Returns an [Array] with the file paths of the currently opened scenes." -msgstr "" +msgstr "Retourne un [Array] avec le chemin des fichiers des scènes ouvertes." #: doc/classes/EditorInterface.xml msgid "" @@ -23362,6 +24144,8 @@ msgstr "" msgid "" "Returns mesh previews rendered at the given size as an [Array] of [Texture]s." msgstr "" +"Retourne les aperçus des maillages rendus à la taille spécifiée sous forme " +"de [Array] de [Texture]." #: doc/classes/EditorInterface.xml msgid "Opens the scene at the given path." @@ -23914,6 +24698,9 @@ msgid "" "Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/" "b], [b]AssetLib[/b]). Also works with custom screens defined by plugins." msgstr "" +"Émis quand l'utilisateur change d'espace de travail ([b]2D[/b], [b]3D[/b], " +"[b]Script[/b], [b]AssetLib[/b]). Fonctionne aussi avec les écrans " +"personnalisés définis par des greffons." #: doc/classes/EditorPlugin.xml msgid "" @@ -24081,6 +24868,8 @@ msgstr "Émis lors de la sélection. Utilisé en interne." #: doc/classes/EditorResourcePicker.xml msgid "Godot editor's control for selecting [Resource] type properties." msgstr "" +"Le contrôle de l'éditeur de Godot pour la sélection des propriétés de type " +"[Resource]." #: doc/classes/EditorResourcePicker.xml msgid "" @@ -24605,6 +25394,11 @@ msgid "" "the Editor Settings. If [code]update_current[/code] is true, the current " "value of the setting will be set to [code]value[/code] as well." msgstr "" +"Définit la valeur initiale de la préférence nommée [code]name[/code] à " +"[code]value[/code]. C'est utilisé pour définir une valeur pour le bouton " +"Annuler dans les préférences de l'éditeur. Si [code]update_current[/code] " +"est vrai, la valeur actuelle de cette préférence sera définie à [code]value[/" +"code] aussi." #: doc/classes/EditorSettings.xml msgid "" @@ -24766,6 +25560,8 @@ msgid "" "Sets the reference [Spatial] node for the gizmo. [code]node[/code] must " "inherit from [Spatial]." msgstr "" +"Définit le nÅ“ud [Spatial] à utiliser pour le manipulateur. Ce nÅ“ud " +"[code]node[/code] doit hériter d'un [Spatial]." #: doc/classes/EditorSpatialGizmoPlugin.xml msgid "Used by the editor to define Spatial gizmo types." @@ -24792,6 +25588,8 @@ msgid "" "Override this method to define whether the gizmo can be hidden or not. " "Returns [code]true[/code] if not overridden." msgstr "" +"Surchargez cette méthode pour définir quand le manipulateur peut être masqué " +"ou non. Retourne [code]true[/code] si n'est pas surchargé." #: doc/classes/EditorSpatialGizmoPlugin.xml msgid "" @@ -24910,6 +25708,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Si [code]true[/code], la flèche de réduction est masquée." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -24963,6 +25766,9 @@ msgid "" "Fetches new changes from the remote, but doesn't write changes to the " "current working directory. Equivalent to [code]git fetch[/code]." msgstr "" +"Récupère les nouvelles modifications depuis le dépôt distant mais n'inscrit " +"aucune modification dans l'actuel dossier de travail. Équivalent à [code]git " +"fetch[/code]." #: doc/classes/EditorVCSInterface.xml msgid "" @@ -25075,12 +25881,16 @@ msgid "" "Helper function to add an array of [code]diff_hunks[/code] into a " "[code]diff_file[/code]." msgstr "" +"Une fonction d'aide pour ajouter une liste de [code]diff_hunks[/code] dans " +"un [code]diff_file[/code]." #: doc/classes/EditorVCSInterface.xml msgid "" "Helper function to add an array of [code]line_diffs[/code] into a " "[code]diff_hunk[/code]." msgstr "" +"Une fonction d'aide pour ajouter une liste de [code]line_diffs[/code] dans " +"un [code]diff_hunk[/code]." #: doc/classes/EditorVCSInterface.xml msgid "" @@ -25259,6 +26069,8 @@ msgid "" "Returns Dictionary of licenses used by Godot and included third party " "components." msgstr "" +"Retourne un dictionnaire des licences utilisées par Godot en incluant les " +"composants tiers." #: doc/classes/Engine.xml msgid "Returns Godot license text." @@ -25267,6 +26079,7 @@ msgstr "Retourne le texte de la licence Godot." #: doc/classes/Engine.xml msgid "Returns the main loop object (see [MainLoop] and [SceneTree])." msgstr "" +"Retourne l'objet de la boucle principale (voir [MainLoop] et [SceneTree])." #: doc/classes/Engine.xml msgid "" @@ -25281,6 +26094,16 @@ msgid "" " pass # Run expensive logic only once every 2 physics frames here.\n" "[/codeblock]" msgstr "" +"Retourne le nombre de trames écoulées depuis le démarrage du moteur, et est " +"mis à jour à chaque nouvelle [b]trame physique[/b]. Voir aussi [method " +"get_idle_frames].\n" +"[method get_physics_frames] peut être utilisé pour lancer des logiques " +"coûteuses mois souvent sans utiliser un [Timer]:\n" +"[codeblock]\n" +"func _physics_process(_delta):\n" +" if Engine.get_physics_frames() % 2 == 0:\n" +" pass # Lancer la logique coûteuse qu'une trame physique sur 2.\n" +"[/codeblock]" #: doc/classes/Engine.xml msgid "" @@ -25328,12 +26151,44 @@ msgid "" " # Do things specific to versions before 3.2\n" "[/codeblock]" msgstr "" +"Retourne les informations sur la version du moteur de jeu dans un " +"Dictionary.\n" +"[code]major[/code] - Le numéro de version majeur en int\n" +"[code]minor[/code] - Le numéro de version mineur en int\n" +"[code]patch[/code] - Le numéro de version de correctif en int\n" +"[code]hex[/code] - Le numéro complet de version sous forme de int au " +"format hexadécimal avec un octet (2 caractères) par numéro (voir l'exemple " +"en-dessous)\n" +"[code]status[/code] - Le status (ex.: \"beta\", \"rc1\", \"rc2\", ... " +"\"stable\") en String\n" +"[code]build[/code] - Le nom de la version (ex.: \"custom_build\") en " +"String\n" +"[code]hash[/code] - Le hachage du commit Git en String\n" +"[code]year[/code] - L'année où la version a été publiée en int\n" +"[code]string[/code] - [code]major[/code] + [code]minor[/code] + " +"[code]patch[/code] + [code]status[/code] + [code]build[/code] dans une seule " +"String\n" +"La valeur [code]hex[/code] est codée comme suit, de gauche à droite : un " +"octet pour le numéro majeur, un octet pour le numéro mineur, un octet pour " +"le numéro de correct. Par exemple, la \"3.1.12\" sera la valeur " +"[code]0x03010C[/code]. [b]Note :[/b] C'est toujours en int en interne, et " +"l'afficher donnera sa représentation décimale ([code]196876[/code] dans ce " +"cas), qui ne sera pas particulièrement utile. Utiliser une représentation " +"hexadécimale permet facilement de comparer les versions dans le code :\n" +"[codeblock]\n" +"if Engine.get_version_info().hex >= 0x030200:\n" +" # Pour les choses spécifiques à la version 3.2 et suivantes\n" +"else:\n" +" # Pour les choses spécifiques aux versions avant la 3.2\n" +"[/codeblock]" #: doc/classes/Engine.xml msgid "" "Returns [code]true[/code] if a singleton with given [code]name[/code] exists " "in global scope." msgstr "" +"Retourne [code]true[/code] si un singleton avec le nom [code]name[/code] " +"existe dans l'espace global." #: doc/classes/Engine.xml msgid "" @@ -25456,7 +26311,6 @@ msgid "" msgstr "" #: doc/classes/Environment.xml doc/classes/WorldEnvironment.xml -#, fuzzy msgid "Environment and post-processing" msgstr "Les environnements et les effets post-rendu" @@ -25537,6 +26391,8 @@ msgstr "La [Color] de la lumière ambiante." msgid "" "The ambient light's energy. The higher the value, the stronger the light." msgstr "" +"L'énergie de la lumière ambiante. Plus la valeur est grande, plus la lumière " +"est intense." #: doc/classes/Environment.xml msgid "" @@ -25748,6 +26604,8 @@ msgstr "" #: doc/classes/Environment.xml msgid "The depth fog's [Color] when looking towards the sun." msgstr "" +"La [Color] de brouillard de profondeur quand on regarde en direction du " +"soleil." #: doc/classes/Environment.xml msgid "" @@ -26277,6 +27135,42 @@ msgid "" "process will be killed. You can work around this by calling [method flush] " "at regular intervals." msgstr "" +"Le type Fichier. Il est utilisé pour enregistrer de manière permanente des " +"données dans le système de fichiers de l'appareil de l'utilisateur, et " +"pouvoir lire ce fichier. Ça peut être utilisé pour enregistrer les " +"sauvegardes du jeu ou des fichiers de configuration ou de préférence, par " +"exemple.\n" +"Voici un exemple sur comment écrire et lire dans une fichier :\n" +"[codeblock]\n" +"func save(content):\n" +" var file = File.new()\n" +" file.open(\"user://save_game.dat\", File.WRITE) # Ouvert en écriture " +"seulement\n" +" file.store_string(content)\n" +" file.close()\n" +"\n" +"func load():\n" +" var file = File.new()\n" +" file.open(\"user://save_game.dat\", File.READ) # Ouvert en lecture " +"seulement\n" +" var content = file.get_as_text()\n" +" file.close()\n" +" return content\n" +"[/codeblock]\n" +"Dans l'exemple au-dessus, le fichier sera enregistré dans le dossier des " +"données utilisateur comme précisé dans la documentation [url=$DOCS_URL/" +"tutorials/io/data_paths.html]Chemins de données[/url].\n" +"[b]Note:[/b] Pour accéder au ressources du projet une fois le projet " +"exporté, il est recommandé d'utiliser [ResourceLoader] plutôt que l'API " +"[File], puisque certains fichiers sont convertis dans un format spécifique " +"au moteur de jeu et le fichier original risque de ne plus être présent dans " +"le paquet PCK exporté.\n" +"[b]Note :[/b] Les fichiers sont automatiquement fermés seulement si le " +"processus quitte \"normalement\" (comme un cliquant sur le bouton fermer du " +"gestionnaire de fenêtre ou avec [b]Alt + F4[/b]). Si vous arrêtez " +"l'exécution du projet avec [b]F8[/b] pendant que le projet est lancé, les " +"fichiers ne seront pas fermés parce que le processus sera détruit. Vous " +"pouvez gérer ce cas en appelant [method flush] régulièrement." #: doc/classes/File.xml msgid "File system" @@ -26288,6 +27182,9 @@ msgid "" "operations. Use [method flush] to persist the data to disk without closing " "the file." msgstr "" +"Ferme le fichier actuellement ouvert et empêche les opérations de lecture/" +"écriture ultérieures. Utilisez [method flush] pour enregistrer les données " +"sur le disque sans fermer le fichier." #: doc/classes/File.xml msgid "" @@ -26570,6 +27467,9 @@ msgid "" "[b]Note:[/b] The [code]value[/code] must lie in the interval [code][-2^63, " "2^63 - 1][/code] (i.e. be a valid [int] value)." msgstr "" +"Enregistre an entier de 64 bits dans le fichier.\n" +"[b]Note :[/b] La valeur [code]value[/code] doit être dans l'intervalle [code]" +"[-2^63, 2^63 - 1][/code] (être un [int] valide)." #: doc/classes/File.xml msgid "" @@ -26606,6 +27506,8 @@ msgid "" "Appends [code]line[/code] to the file followed by a line return character " "([code]\\n[/code]), encoding the text as UTF-8." msgstr "" +"Ajoute la ligne [code]line[/code] au fichier suivit d'un retour à la ligne " +"([code]\\n[/code]), en encodant le texte en UTF-8." #: doc/classes/File.xml msgid "" @@ -26613,6 +27515,9 @@ msgid "" "store the length of the string).\n" "Text will be encoded as UTF-8." msgstr "" +"Enregistre la [String] donnée dans une nouvelle ligne au format Pascal " +"(enregistre aussi la longueur de la chaine de caractères).\n" +"Le texte sera codé en UTF-8." #: doc/classes/File.xml msgid "Stores a floating-point number in the file." @@ -26678,13 +27583,12 @@ msgstr "" "n’existe pas et tronquer s’il existe." #: doc/classes/File.xml -#, fuzzy msgid "" "Opens the file for read and write operations. Does not truncate the file. " "The cursor is positioned at the beginning of the file." msgstr "" "Ouvre le fichier pour les opérations de lecture et d'écriture. Ne tronque " -"pas le fichier." +"pas le fichier. Le curseur est placé au début du fichier." #: doc/classes/File.xml #, fuzzy @@ -27113,6 +28017,9 @@ msgid "" "actually inheriting from [Object], not a built-in type such as [int], " "[Vector2] or [Dictionary]." msgstr "" +"L'objet contenant la fonction référencée. Cet objet doit hériter de la " +"classe [Object], et non d'un type intégré comme [int], [Vector2] ou " +"[Dictionary]." #: doc/classes/FuncRef.xml msgid "The name of the referenced function." @@ -27122,6 +28029,8 @@ msgstr "Le nom de la fonction référencée." msgid "" "An external library containing functions or script classes to use in Godot." msgstr "" +"Une bibliothèque externe contenant des fonctions et des classes de script à " +"utiliser dans Godot." #: modules/gdnative/doc_classes/GDNativeLibrary.xml msgid "" @@ -27136,6 +28045,8 @@ msgid "" "Returns paths to all dependency libraries for the current platform and " "architecture." msgstr "" +"Retourne les chemines de toutes les bibliothèques nécessaires à la " +"plateforme et l'architecture actuelles." #: modules/gdnative/doc_classes/GDNativeLibrary.xml msgid "" @@ -27148,6 +28059,8 @@ msgid "" "This resource in INI-style [ConfigFile] format, as in [code].gdnlib[/code] " "files." msgstr "" +"Cette ressource est un [ConfigFile] au format style INI, comme dans les " +"fichiers [code].gdnlib[/code]." #: modules/gdnative/doc_classes/GDNativeLibrary.xml msgid "" @@ -27669,11 +28582,11 @@ msgstr "" #: doc/classes/Generic6DOFJoint.xml msgid "If enabled, there is a rotational motor across these axes." -msgstr "" +msgstr "Si actif, il y a un moteur de rotation à travers ces axes." #: doc/classes/Generic6DOFJoint.xml msgid "If enabled, there is a linear motor across these axes." -msgstr "" +msgstr "Si actif, il y a un moteur linéaire à travers ces axes." #: doc/classes/Generic6DOFJoint.xml doc/classes/HingeJoint.xml msgid "Represents the size of the [enum Flag] enum." @@ -27689,6 +28602,9 @@ msgid "" "shapes, compute intersections between shapes, and process various other " "geometric operations." msgstr "" +"Geometry fournit un ensemble de fonctions d'aide pour créer des formes " +"géométrique, calculer les intersections entre les formes, et propose " +"différentes autres opérations géométriques." #: doc/classes/Geometry.xml msgid "" @@ -28196,6 +29112,8 @@ msgstr "" #: doc/classes/GeometryInstance.xml msgid "The generated lightmap texture will be twice as large, on each axis." msgstr "" +"La texture de lumière générée sera deux fois plus grande, selon les deux " +"axes." #: doc/classes/GeometryInstance.xml msgid "The generated lightmap texture will be 4 times as large, on each axis." @@ -28672,9 +29590,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "Toutes les couleurs du dégradé retournées dans un [PoolColorArray]." #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "Toutes les couleurs du dégradé retournées dans un [PoolRealArray]." +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "Texture remplie de gradients." @@ -28742,6 +29673,8 @@ msgid "" "The number of vertical color samples that will be obtained from the " "[Gradient], which also represents the texture's height." msgstr "" +"Le nombre d'échantillons de couleur verticaux qui seront obtenus de ce " +"[Gradient], ce qui représente aussi la hauteur de la texture." #: doc/classes/GradientTexture2D.xml msgid "" @@ -28764,6 +29697,8 @@ msgid "" "The number of horizontal color samples that will be obtained from the " "[Gradient], which also represents the texture's width." msgstr "" +"Le nombre d'échantillons de couleur horizontaux qui seront obtenus de ce " +"[Gradient], ce qui représente aussi la largeur de la texture." #: doc/classes/GradientTexture2D.xml msgid "The colors are linearly interpolated in a straight line." @@ -28784,6 +29719,8 @@ msgid "" "The texture is filled starting from [member fill_from] to [member fill_to] " "offsets, repeating the same pattern in both directions." msgstr "" +"La texture est remplie en partant de la position [member fill_from] jusqu'à " +"[member fill_to], répétant le même motif dans les deux directions." #: doc/classes/GradientTexture2D.xml msgid "" @@ -28836,6 +29773,9 @@ msgid "" "[code]to[/code] GraphNode. If the connection already exists, no connection " "is created." msgstr "" +"Crée une connexion entre le port [code]from_port[/code] du GraphNode " +"[code]from[/code] et le port [code]to_port[/code] du GraphNode [code]to[/" +"code]. Si la connexion existe déjà , aucune nouvelle connexion n'est crée." #: doc/classes/GraphEdit.xml msgid "" @@ -28977,6 +29917,9 @@ msgid "" "code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] " "slot of the [code]to[/code] GraphNode is attempted to be created." msgstr "" +"Émis au GraphEdit lors d'une tentative de créer une connexion entre le port " +"[code]from_port[/code] du GraphNode [code]from[/code] et le port " +"[code]to_port[/code] du GraphNode [code]to[/code]." #: doc/classes/GraphEdit.xml msgid "" @@ -29160,20 +30103,20 @@ msgid "Returns the right (output) type of the slot [code]idx[/code]." msgstr "Retourne le type du nÅ“ud à [code]idx[/code]." #: doc/classes/GraphNode.xml -#, fuzzy msgid "" "Returns [code]true[/code] if left (input) side of the slot [code]idx[/code] " "is enabled." msgstr "" -"Retourne [code]true[/code] si la piste à l'index [code]idx[/code] est active." +"Retourne [code]true[/code] si le côté gauche (entrée) de l'emplacement " +"[code]idx[/code] est actif." #: doc/classes/GraphNode.xml -#, fuzzy msgid "" "Returns [code]true[/code] if right (output) side of the slot [code]idx[/" "code] is enabled." msgstr "" -"Retourne [code]true[/code] si la piste à l'index [code]idx[/code] est active." +"Retourne [code]true[/code] si le côté droit (sortie) de l'emplacement " +"[code]idx[/code] est actif." #: doc/classes/GraphNode.xml msgid "" @@ -29498,12 +30441,17 @@ msgid "" "Returns an array of [Transform] and [Mesh] references corresponding to the " "non-empty cells in the grid. The transforms are specified in world space." msgstr "" +"Retourne une liste de [Transform] et de ressources [Mesh] correspondants aux " +"cellules non vides sur la grille. Les transformations sont définies dans " +"l'espace global." #: modules/gridmap/doc_classes/GridMap.xml msgid "" "Returns an array of [Vector3] with the non-empty cell coordinates in the " "grid map." msgstr "" +"Retourne un tableau de [Vector3] avec les coordonnées des cellules non vides " +"dans la grille." #: modules/gridmap/doc_classes/GridMap.xml #, fuzzy @@ -29739,12 +30687,16 @@ msgid "" "Number of vertices in the depth of the height map. Changing this will resize " "the [member map_data]." msgstr "" +"Le nombre de sommets pour la profondeur de la carte de hauteur. Changer " +"cette valeur redimensionnera [member map_data]." #: doc/classes/HeightMapShape.xml msgid "" "Number of vertices in the width of the height map. Changing this will resize " "the [member map_data]." msgstr "" +"Le nombre de sommets pour la largeur de la carte de hauteur. Changer cette " +"valeur redimensionnera [member map_data]." #: doc/classes/HFlowContainer.xml #, fuzzy @@ -29893,6 +30845,8 @@ msgid "" "Returns the resulting HMAC. If the HMAC failed, an empty [PoolByteArray] is " "returned." msgstr "" +"Retourne le HMAC résultant. Si le HMAC a échoué, un [PoolByteArray] vide est " +"retourné." #: doc/classes/HMACContext.xml msgid "" @@ -30258,6 +31212,8 @@ msgid "" "If [code]true[/code], execution will block until all data is read from the " "response." msgstr "" +"Si [code]true[/code], l'exécution sera bloquée jusqu'à ce que toutes les " +"données de la réponse soit lues." #: doc/classes/HTTPClient.xml msgid "The connection to use for this client." @@ -30276,6 +31232,9 @@ msgid "" "HTTP GET method. The GET method requests a representation of the specified " "resource. Requests using GET should only retrieve data." msgstr "" +"La méthode HTTP GET. La méthode GET demande une représentation de la " +"ressource spécifiée. Les requêtes avec GET ne devrait faire que retourner " +"des données." #: doc/classes/HTTPClient.xml msgid "" @@ -30343,6 +31302,8 @@ msgstr "Statut : Déconnecté du serveur." #: doc/classes/HTTPClient.xml msgid "Status: Currently resolving the hostname for the given URL into an IP." msgstr "" +"Status : Actuellement en train de résoudre l'hôte de l'URL donnée en adresse " +"IP." #: doc/classes/HTTPClient.xml msgid "Status: DNS failure: Can't resolve the hostname for the given URL." @@ -30396,6 +31357,9 @@ msgid "" "server has received and is processing the request, but no response is " "available yet." msgstr "" +"Le code de status HTTP [code]102 Processing[/code] (WebDAV). Indique que le " +"serveur a reçu la requête et la traite, mais aucune réponse n'est disponible " +"pour l'instant." #: doc/classes/HTTPClient.xml msgid "" @@ -30618,6 +31582,10 @@ msgid "" "This code is used in situations where the user might be able to resolve the " "conflict and resubmit the request." msgstr "" +"Le code de status HTTP [code]409 Conflict[/code]. La requête n'a pu être " +"complétée à cause d'un conflit avec l'état actuel de la ressource cible. Ce " +"code est utilisé dans les situations où l'utilisateur peut être capable de " +"résoudre le conflit et de soumettre à nouveau la requête." #: doc/classes/HTTPClient.xml msgid "" @@ -30904,6 +31872,82 @@ msgid "" " texture_rect.texture = texture\n" "[/codeblock]" msgstr "" +"Un nÅ“ud qui permet d'envoyer des requêtes HTTP. Utilise [HTTPClient] en " +"interne.\n" +"Peut permettre d'envoyer des requêtes HTTP, ex. pour envoyer ou télécharger " +"des fichiers ou du contenu web via HTTP.\n" +"[b]Avertissement :[/b] Voir les notes et avertissements du [HTTPClient] pour " +"les limites, notamment concernant la sécurité SSL.\n" +"[b]Exemple pour contacter une API REST et afficher les champs retournés :[/" +"b]\n" +"[codeblock]\n" +"func _ready():\n" +" # Créer un nÅ“ud de requête HTTP et le connecter au signal de " +"complétion.\n" +" var http_request = HTTPRequest.new()\n" +" add_child(http_request)\n" +" http_request.connect(\"request_completed\", self, " +"\"_http_request_completed\")\n" +"\n" +" # Lancer une requête GET. L'URL en-dessous retourne un JSON au moment de " +"l'écriture de ce tutoriel.\n" +" var error = http_request.request(\"https://httpbin.org/get\")\n" +" if error != OK:\n" +" push_error(\"Une erreur est survenue dans la requête HTTP.\")\n" +"\n" +" # Lancer une requête POST. L'URL en-dessous retourne un JSON au moment " +"de l'écriture de ce tutoriel.\n" +" # Note : Don't make simultaneous requests using a single HTTPRequest " +"node.\n" +" # Le code en-dessous est uniquement donné comme exemple.\n" +" var body = {\"nom\": \"Godette\"}\n" +" error = http_request.request(\"https://httpbin.org/post\", [], true, " +"HTTPClient.METHOD_POST, body)\n" +" if error != OK:\n" +" push_error(\"Une erreur est survenue dans la requête HTTP.\")\n" +"\n" +"\n" +"# Appelé quand la requête HTTP est complète.\n" +"func _http_request_completed(result, response_code, headers, body):\n" +" var response = parse_json(body.get_string_from_utf8())\n" +"\n" +" # Affichera le user-agent utilisé par le nÅ“ud HTTPRequest (reconnu par " +"httpbin.org).\n" +" print(response.headers[\"User-Agent\"])\n" +"[/codeblock]\n" +"[b]Un exemple de chargement et d'affichage d'une image récupérée avec une " +"HTTPRequest:[/b]\n" +"[codeblock]\n" +"func _ready():\n" +" # Créer un nÅ“ud de requête HTTP et le connecter au signal de " +"complétion.\n" +" var http_request = HTTPRequest.new()\n" +" add_child(http_request)\n" +" http_request.connect(\"request_completed\", self, " +"\"_http_request_completed\")\n" +"\n" +" # Lancer une requête HTTP. L'URL en-dessous retourne une image PNG au " +"moment de l'écriture de ce tutoriel.\n" +" var error = http_request.request(\"https://via.placeholder.com/512\")\n" +" if error != OK:\n" +" push_error(\"Une erreur est survenue dans la requête HTTP.\")\n" +"\n" +"\n" +"# Appelé quand la requête HTTP est complète.\n" +"func _http_request_completed(result, response_code, headers, body):\n" +" var image = Image.new()\n" +" var error = image.load_png_from_buffer(body)\n" +" if error != OK:\n" +" push_error(\"L'image n'a pu être chargée.\")\n" +"\n" +" var texture = ImageTexture.new()\n" +" texture.create_from_image(image)\n" +"\n" +" # Afficher l'image dans un nÅ“ud TextureRect.\n" +" var texture_rect = TextureRect.new()\n" +" add_child(texture_rect)\n" +" texture_rect.texture = texture\n" +"[/codeblock]" #: doc/classes/HTTPRequest.xml msgid "Cancels the current request." @@ -30974,7 +32018,7 @@ msgstr "" #: doc/classes/HTTPRequest.xml msgid "The file to download into. Will output any received file into it." -msgstr "" +msgstr "Le fichier dans lequel enregistrer le téléchargement." #: doc/classes/HTTPRequest.xml msgid "Maximum number of allowed redirects." @@ -31352,6 +32396,8 @@ msgstr "" msgid "" "Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image." msgstr "" +"Convertit une image RGBE (« Red Green Blue Exponent ») standard en image " +"sRGB." #: doc/classes/Image.xml msgid "" @@ -31405,6 +32451,7 @@ msgstr "Réduit la taille de l'image par 2." #: doc/classes/Image.xml msgid "Converts the raw data from the sRGB colorspace to a linear scale." msgstr "" +"Convertit des données brutes depuis l'espace de couleur sRGB en linéaire." #: doc/classes/Image.xml msgid "Unlocks the data and prevents changes." @@ -31563,6 +32610,12 @@ msgid "" "[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space " "conversion is performed." msgstr "" +"Le format de texture [url=https://en.wikipedia.org/wiki/" +"S3_Texture_Compression]S3TC[/url] qui utiliser une compression de bloc 1, et " +"est une variation plus petite que S3TC, avec seulement 1 bit pour l'alpha et " +"les composants de couleurs étant pré-multitpliés avec l'alpha.\n" +"[b]Note :[/b] À la création d'une [ImageTexture], elle est convertie vers " +"l'espace de couleur linéaire sRGB." #: doc/classes/Image.xml msgid "" @@ -31722,6 +32775,12 @@ msgid "" "[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space " "conversion is performed." msgstr "" +"[url=https://en.wikipedia.org/wiki/" +"Ericsson_Texture_Compression#ETC2_and_EAC]Format de compression Ericsson 2[/" +"url] (variante [code]RGBA8[/code]), qui compresse les données RGBA8888 avec " +"le support complet de l'opacité.\n" +"[b]Note :[/b] Lors de la création d'une [ImageTexture], l'espace de couleur " +"sRGB est convertit en linéaire." #: doc/classes/Image.xml msgid "" @@ -31752,6 +32811,9 @@ msgid "" "This mode is faster than [constant INTERPOLATE_CUBIC], but it results in " "lower quality." msgstr "" +"Fait une interpolation bilinéaire. Si l'image est redimensionnée, elle peut " +"être floue. Ce mode est plus rapide que [constant INTERPOLATE_CUBIC], mais " +"le résultat est moins bon." #: doc/classes/Image.xml msgid "" @@ -31759,6 +32821,9 @@ msgid "" "This mode often gives better results compared to [constant " "INTERPOLATE_BILINEAR], at the cost of being slower." msgstr "" +"Fait une interpolation cubique. Si l'image est redimensionnée, elle peut " +"être floue. Ce mode donne en général de meilleurs résultats que [constant " +"INTERPOLATE_BILINEAR], mais est plus lente." #: doc/classes/Image.xml msgid "" @@ -31882,6 +32947,44 @@ msgid "" "[b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics " "hardware limitations." msgstr "" +"Une [Texture] basée sur une [Image]. Pour qu'une image soit affichée, une " +"[ImageTexture] doit être créée avec la méthode [method create_from_image] :\n" +"[codeblock]\n" +"var texture = ImageTexture.new()\n" +"var image = Image.new()\n" +"image.load(\"res://icon.png\")\n" +"texture.create_from_image(image)\n" +"$Sprite.texture = texture\n" +"[/codeblock]\n" +"De cette façon, les textures peuvent être créées au lancement du jeu en " +"chargent les images depuis l'éditeur ou de manière externe.\n" +"[b]Avertissement :[/b] Préférez charger les texture importées avec [method " +"@GDScript.load] plutôt que depuis le système de fichier avec [method Image." +"load], parce que ça peut ne pas fonctionner dans les projets exportés :\n" +"[codeblock]\n" +"var texture = load(\"res://icon.png\")\n" +"$Sprite.texture = texture\n" +"[/codeblock]\n" +"C'est parce que les images doivent d'abord être importées comme des " +"[StreamTexture] pour être chargées avec [method @GDScript.load]. Si vous " +"préférez charger un fichier image comme n'importe quelle [Resource], " +"importez-là comme ressource [Image] plutôt, et alors chargez-là normalement " +"avec la méthode [method @GDScript.load].\n" +"Il est à noter que les données de l'image peuvent toujours être récupérées à " +"partir d'une texture importée avec la méthode [method Texture.get_data], qui " +"retourne une copie des données de l'image :\n" +"[codeblock]\n" +"var texture = load(\"res://icon.png\")\n" +"var image : Image = texture.get_data()\n" +"[/codeblock]\n" +"Une [ImageTexture] n'est pas prévue pour être gérée directement depuis " +"l'interface de l'éditeur, et est principalement utilisé pour l'affichage " +"d'images à l'écran de manière dynamique par le code. Si vous devez générer " +"des images de manière procédurale depuis l'éditeur, préférez l'enregistrer " +"puis l'importer sous forme de texture personnalisée en implémentant un " +"nouveau [EditorImportPlugin].\n" +"[b]Note :[/b] La taille maximale des textures est de 16384×16384 pixels à " +"cause des limitations des cartes graphiques." #: doc/classes/ImageTexture.xml msgid "" @@ -31890,6 +32993,10 @@ msgid "" "[code]format[/code] is a value from [enum Image.Format], [code]flags[/code] " "is any combination of [enum Texture.Flags]." msgstr "" +"Crée une nouvelle [ImageTexture] avec la largeur [code]width[/code] et la " +"hauteur [code]height[/code].\n" +"Le [code]format[/code] est une valeur parmi [enum Image.Format], " +"[code]flags[/code] est une combinaison de [enum Texture.Flags]." #: doc/classes/ImageTexture.xml msgid "" @@ -32162,6 +33269,8 @@ msgid "" "Receives a [enum JoystickList] axis and returns its equivalent name as a " "string." msgstr "" +"Reçoit un axe [enum JoystickList] et retourne son nom équivalent comme " +"chaine de caractères." #: doc/classes/Input.xml msgid "Returns the index of the provided button name." @@ -32278,13 +33387,12 @@ msgid "" msgstr "" #: doc/classes/Input.xml -#, fuzzy msgid "" "Returns [code]true[/code] if you are pressing the joypad button (see [enum " "JoystickList])." msgstr "" -"Retourne [code]true[/code] (vrai) si la chaîne de caractères finit par la " -"chaîne de caractères donnée." +"Retourne [code]true[/code] si vous êtes en train d'appuyer le bouton de la " +"manette (voir [enum JoystickList])." #: doc/classes/Input.xml msgid "" @@ -33007,6 +34115,10 @@ msgid "" "On a piano, middle C is 60, and A440 is 69, see the \"MIDI note\" column of " "the piano key frequency chart on Wikipedia for more information." msgstr "" +"Le numéro de la hauteur de la note de ce signal MIDI. Cette valeur est entre " +"0 et 127. Sur un piano, le Do du milieu est 60, et le La 440Hz est 69, voir " +"la colonne des \"notes MIDI\" sur la graphique des fréquences du piano sur " +"Wikipédia pour plus d'informations." #: doc/classes/InputEventMIDI.xml msgid "" @@ -33154,6 +34266,8 @@ msgstr "" #: doc/classes/InputEventScreenDrag.xml msgid "The drag event index in the case of a multi-drag event." msgstr "" +"L'index de l'événement de glissage dans le cas d'un événement de plusieurs " +"glissages." #: doc/classes/InputEventScreenDrag.xml msgid "The drag position." @@ -33321,10 +34435,12 @@ msgid "" "Clears all [InputEventAction] in the [InputMap] and load it anew from " "[ProjectSettings]." msgstr "" +"Efface toutes les [InputEventAction] dans le [InputMap] et les rechargent " +"depuis les [ProjectSettings]." #: doc/classes/InstancePlaceholder.xml msgid "Placeholder for the root [Node] of a [PackedScene]." -msgstr "" +msgstr "Le nÅ“ud fictif pour le [Node] racine de la [PackedScene]." #: doc/classes/InstancePlaceholder.xml msgid "" @@ -33448,17 +34564,22 @@ msgid "" "If it is not [member enabled] or does not have a valid target set, " "InterpolatedCamera acts like a normal Camera." msgstr "" +"[i]Obsolète (sera retiré dans Godot 4.0).[/i] InterpolatedCamera est une " +"[Camera] qui se déplace doucement vers la position et rotation de sa cible.\n" +"Si [member enabled] n'est pas activé ou si elle n'a pas de cible valide de " +"définit, InterpolatedCamera se comportement comme une Camera normale." #: doc/classes/InterpolatedCamera.xml msgid "Sets the node to move toward and orient with." msgstr "" #: doc/classes/InterpolatedCamera.xml -#, fuzzy msgid "" "If [code]true[/code], and a target is set, the camera will move " "automatically." -msgstr "Si [code]true[/code], la lecture commence au chargement de la scène." +msgstr "" +"Si [code]true[/code], et que la cible est définie, la caméra se déplacera " +"automatiquement." #: doc/classes/InterpolatedCamera.xml msgid "" @@ -33511,6 +34632,8 @@ msgstr "" #: doc/classes/IP.xml msgid "Returns all the user's current IPv4 and IPv6 addresses as an array." msgstr "" +"Retourne les actuelles adresses IPv4 et IPv6 de l'utilisateur dans un " +"tableau." #: doc/classes/IP.xml msgid "" @@ -33674,12 +34797,16 @@ msgid "" "Returns the custom background color of the item specified by [code]idx[/" "code] index." msgstr "" +"Retourne la couleur d'arrière-plan personnalisée pour l'élément spécifié à " +"l'index [code]idx[/code]." #: doc/classes/ItemList.xml msgid "" "Returns the custom foreground color of the item specified by [code]idx[/" "code] index." msgstr "" +"Retourne la couleur d'avant-plan personnalisée pour l'élément spécifié à " +"l'index [code]idx[/code]." #: doc/classes/ItemList.xml msgid "Returns the icon associated with the specified index." @@ -34204,6 +35331,42 @@ msgid "" "[/codeblock]\n" "[b]Note:[/b] Only available in the HTML5 platform." msgstr "" +"JavaScriptObject est utilisé pour interagir avec les objets JavaScript " +"récupérés ou créés avec [method JavaScript.get_interface], [method " +"JavaScript.create_object], ou [method JavaScript.create_callback].\n" +"Exemple :\n" +"[codeblock]\n" +"extends Node\n" +"\n" +"var _my_js_callback = JavaScript.create_callback(self, \"myCallback\") # " +"Cette référence doit être gardée\n" +"var console = JavaScript.get_interface(\"console\")\n" +"\n" +"func _init():\n" +" var buf = JavaScript.create_object(\"ArrayBuffer\", 10) # un nouveau " +"ArrayBuffer(10)\n" +" print(buf) # affiche [JavaScriptObject:OBJECT_ID]\n" +" var uint8arr = JavaScript.create_object(\"Uint8Array\", buf) # un " +"nouveau Uint8Array(buf)\n" +" uint8arr[1] = 255\n" +" prints(uint8arr[1], uint8arr.byteLength) # affiche 255 10\n" +" console.log(uint8arr) # affiche dans la console du navigateur " +"\"Uint8Array(10) [ 0, 255, 0, 0, 0, 0, 0, 0, 0, 0 ]\"\n" +"\n" +" # Équivalent au code JavaScript: Array.from(uint8arr)." +"forEach(myCallback)\n" +" JavaScript.get_interface(\"Array\").from(uint8arr)." +"forEach(_my_js_callback)\n" +"\n" +"func myCallback(args):\n" +" # Sera appelé avec les paramètres passée à la fonction \"forEach\"\n" +" # [0, 0, [JavaScriptObject:1173]]\n" +" # [255, 1, [JavaScriptObject:1173]]\n" +" # ...\n" +" # [0, 9, [JavaScriptObject:1180]]\n" +" print(args)\n" +"[/codeblock]\n" +"[b]Note :[/b] Uniquement disponible pour la plateforme HTML5." #: doc/classes/JNISingleton.xml msgid "" @@ -34251,11 +35414,11 @@ msgstr "" #: doc/classes/Joint.xml msgid "The node attached to the first side (A) of the joint." -msgstr "" +msgstr "Le nÅ“ud attaché à la première extrémité (A) du joint." #: doc/classes/Joint.xml msgid "The node attached to the second side (B) of the joint." -msgstr "" +msgstr "Le nÅ“ud attaché à la seconde extrémité (B) du joint." #: doc/classes/Joint.xml msgid "" @@ -34285,6 +35448,8 @@ msgstr "" msgid "" "If [code]true[/code], [member node_a] and [member node_b] can not collide." msgstr "" +"Si [code]true[/code], les nÅ“uds [member node_a] et [member node_b] ne peut " +"pas entrer en collision." #: doc/classes/Joint2D.xml msgid "The first body attached to the joint. Must derive from [PhysicsBody2D]." @@ -34472,6 +35637,11 @@ msgid "" "- [code]result[/code]: The return value of the function which was called.\n" "- [code]id[/code]: The ID of the request this response is targeted to." msgstr "" +"Quand un serveur a reçu et traité une requête, il est attendu qu'il envoie " +"une réponse. Si vous ne voulez pas de réponse alors vous devez envoyer une " +"Notification à la place.\n" +"- [code]result[/code] : Le résultat de la fonction appelée.\n" +"- [code]id[/code] : L'identifiant de la requête que cette réponse cible." #: doc/classes/JSONRPC.xml msgid "" @@ -35731,6 +36901,8 @@ msgid "" "Controls the style of the line's last point. Use [enum LineCapMode] " "constants." msgstr "" +"Contrôle le style du dernier point de la ligne. Utilisez une des constantes " +"de [enum LineCapMode]." #: doc/classes/Line2D.xml msgid "" @@ -35862,12 +37034,44 @@ msgid "" "- Command + Right arrow: Like the End key, move the cursor to the end of the " "line" msgstr "" +"LineEdit fournit une éditeur de texte sur une ligne, utilisé pour les champs " +"de texte.\n" +"Il propose de nombreux raccourcis qui sont toujours disponibles ([code]Ctrl[/" +"code] ici correspond à [code]Commande[/code] sous macOS) :\n" +"- Ctrl + C : Copier\n" +"- Ctrl + X : Couper\n" +"- Ctrl + V ou Ctrl + Y : Coller\n" +"- Ctrl + Z : Annuler\n" +"- Ctrl + Mà j + Z : Refaire\n" +"- Ctrl + U : Supprimer le texte du curseur jusqu'au début de la ligne\n" +"- Ctrl + K : Supprimer le texte du curseur jusqu'à la fin de la ligne\n" +"- Ctrl + A : Sélectionner tout le texte\n" +"- Flèche haut/bas : Déplace le curseur au début/fin de la ligne\n" +"Sous macOS, d'autres raccourcis sont disponibles :\n" +"- Ctrl + F : Comme avec la flèche droite, déplace le curseur d'un caractère " +"vers la droite\n" +"- Ctrl + B : Comme avec la flèche gauche, déplace le curseur d'un caractère " +"vers la gauche\n" +"- Ctrl + P : Comme avec la flèche du haut, déplace le curseur à la ligne " +"précédente\n" +"- Ctrl + N : Comme avec la flèche du bas, déplace le curseur à la ligne " +"suivante\n" +"- Ctrl + D : Comme la touche Supprimer, supprime le caractère à droite du " +"curseur\n" +"- Ctrl + H : Comme la touche Backspace, supprime le caractère à gauche du " +"curseur\n" +"- Commande + Flèche gauche : Comme la touche Home, déplacer le curseur au " +"début de la ligne\n" +"- Commande + Flèche droite : Comme la touche Fin, déplacer le curseur au " +"début de la ligne" #: doc/classes/LineEdit.xml msgid "" "Adds [code]text[/code] after the cursor. If the resulting value is longer " "than [member max_length], nothing happens." msgstr "" +"Ajoute [code]text[/code] après le curseur. Si le résultat est plus long que " +"[member max_length], rien ne se passe." #: doc/classes/LineEdit.xml msgid "Erases the [LineEdit]'s [member text]." @@ -36060,6 +37264,8 @@ msgid "" "If [code]false[/code], it's impossible to select the text using mouse nor " "keyboard." msgstr "" +"Si [code]false[/code], il n'est pas possible de sélectionner le texte avec " +"la souris ou le clavier." #: doc/classes/LineEdit.xml msgid "If [code]false[/code], using shortcuts will be disabled." @@ -36167,6 +37373,8 @@ msgstr "Couleur de police par défaut." #: doc/classes/LineEdit.xml msgid "Font color for selected text (inside the selection rectangle)." msgstr "" +"La couleur de la police du texte sélectionné (à l'intérieur du rectangle de " +"sélection)." #: doc/classes/LineEdit.xml msgid "Font color when editing is disabled." @@ -36343,6 +37551,8 @@ msgid "" "Disables the [Listener2D]. If it's not set as current, this method will have " "no effect." msgstr "" +"Désactive le [Listener2D]. S'il n'était pas déjà l'actuel, cette méthode " +"n'aura aucun effet." #: doc/classes/Listener2D.xml msgid "Returns [code]true[/code] if this [Listener2D] is currently active." @@ -36359,7 +37569,7 @@ msgstr "" #: doc/classes/MainLoop.xml msgid "Abstract base class for the game's main loop." -msgstr "" +msgstr "La classe abstraite de base pour la boucle principale du jeu." #: doc/classes/MainLoop.xml msgid "" @@ -36406,6 +37616,50 @@ msgid "" " print(\" Keys typed: %s\" % var2str(keys_typed))\n" "[/codeblock]" msgstr "" +"[MainLoop] une classe abstraite de base pour la boucle de jeu d'un projet " +"Godot. C'est hérité par [SceneTree], qui est l'implémentation de boucle de " +"jeu par défaut dans les projets Godot, mais il est possible d'écrire sa " +"propre boucle en utilisant une sous-classe de [MainLoop] plutôt que celle " +"par défaut.\n" +"Au lancement de l'application, une implémentation d'une [MainLoop] doit être " +"fournieà au système d'exploitation ; sinon, l'application quittera. Elle est " +"fournie automatiquement (un [SceneTree] est créé) sauf si un [Script] " +"principal est fourni depuis les lignes de commande (avec [code]godot -s " +"my_loop.gd[/code], qui doit alors contenir l'implémentation d'une " +"[MainLoop].\n" +"Voici un exemple de script implémentant une simple [MainLoop]:\n" +"[codeblock]\n" +"extends MainLoop\n" +"\n" +"var time_elapsed = 0\n" +"var keys_typed = []\n" +"var quit = false\n" +"\n" +"func _initialize():\n" +" print(\"Initialisé :\")\n" +" print(\" Time de début : %s\" % str(time_elapsed))\n" +"\n" +"func _idle(delta):\n" +" time_elapsed += delta\n" +" # Retourner \"true\" pour quitter la boucle.\n" +" return quit\n" +"\n" +"func _input_event(event):\n" +" # Enregistrer les touches.\n" +" if event is InputEventKey and event.pressed and !event.echo:\n" +" keys_typed.append(OS.get_scancode_string(event.scancode))\n" +" # Quitter quand Échap appuyé.\n" +" if event.scancode == KEY_ESCAPE:\n" +" quit = true\n" +" # Quitter au premier clic de la souris.\n" +" if event is InputEventMouseButton:\n" +" quit = true\n" +"\n" +"func _finalize():\n" +" print(\"Terminé :\")\n" +" print(\" Temps final : %s\" % str(time_elapsed))\n" +" print(\" Touches pressés : %s\" % var2str(keys_typed))\n" +"[/codeblock]" #: doc/classes/MainLoop.xml msgid "" @@ -36423,6 +37677,8 @@ msgid "" "Called when the user performs an action in the system global menu (e.g. the " "Mac OS menu bar)." msgstr "" +"Appelé quand un utilisateur fait une action depuis le menu global du système " +"(par ex. la barre de menu de macOS)." #: doc/classes/MainLoop.xml msgid "" @@ -36480,12 +37736,16 @@ msgid "" "Should not be called manually, override [method _input_event] instead. Will " "be removed in Godot 4.0." msgstr "" +"Ne devrait pas être appelé manuellement, surchargez plutôt [method " +"_input_event]. Sera supprimé dans Godot 4.0." #: doc/classes/MainLoop.xml msgid "" "Should not be called manually, override [method _input_text] instead. Will " "be removed in Godot 4.0." msgstr "" +"Ne devrait pas être appelé manuellement, surchargez plutôt [method " +"_input_text]. Sera supprimé dans Godot 4.0." #: doc/classes/MainLoop.xml msgid "" @@ -36694,6 +37954,8 @@ msgstr "" msgid "" "Returns a Base64-encoded string of the UTF-8 string [code]utf8_str[/code]." msgstr "" +"Retourne une chaine de caractères codée en Base64 de la chaine UTF-8 " +"[code]utf8_str[/code] donnée." #: doc/classes/Marshalls.xml msgid "" @@ -36705,6 +37967,8 @@ msgstr "" #: doc/classes/Material.xml msgid "Abstract base [Resource] for coloring and shading geometry." msgstr "" +"La [Resource] abstraite de base pour la coloration et le rendu des " +"géométries." #: doc/classes/Material.xml msgid "" @@ -37445,7 +38709,7 @@ msgstr "Le [NodePath] vers le [Skeleton] associé à cette instance." #: doc/classes/MeshInstance.xml msgid "Sets the skin to be used by this instance." -msgstr "" +msgstr "Définit la peau à utiliser pour cette instance." #: doc/classes/MeshInstance.xml msgid "" @@ -37540,6 +38804,7 @@ msgstr "Retourne le maillage de navigation de l'élément." #: doc/classes/MeshLibrary.xml msgid "Returns the transform applied to the item's navigation mesh." msgstr "" +"Retourne la transformation appliquée au maillage de navigation de l'élément." #: doc/classes/MeshLibrary.xml msgid "" @@ -37587,6 +38852,7 @@ msgstr "Définit le maillage de navigation de l'élément." #: doc/classes/MeshLibrary.xml msgid "Sets the transform to apply to the item's navigation mesh." msgstr "" +"Définit la transformation appliquée au maillage de navigation de l'élément." #: doc/classes/MeshLibrary.xml msgid "Sets a texture to use as the item's preview icon in the editor." @@ -37621,6 +38887,8 @@ msgstr "Définit la taille de l'image, nécessaire pour garder une référence." #: doc/classes/MeshTexture.xml msgid "Sets the mesh used to draw. It must be a mesh using 2D vertices." msgstr "" +"Définit le maillage à utiliser pour l'affichage. Doit être un maillage avec " +"des sommets en 2D." #: doc/classes/MethodTweener.xml msgid "" @@ -37643,14 +38911,16 @@ msgid "" "Sets the time in seconds after which the [MethodTweener] will start " "interpolating. By default there's no delay." msgstr "" +"Définit le délai en secondes avant que le [MethodTweener] commence son " +"interpolation. Par défaut, il n'y a pas de délai." -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -37855,6 +39125,8 @@ msgstr "" #: doc/classes/MultiMesh.xml msgid "Format of transform used to transform mesh, either 2D or 3D." msgstr "" +"Le format de la transformation utilisée pour le transformation du maillage, " +"soit en 2D ou en 3D." #: doc/classes/MultiMesh.xml msgid "" @@ -37946,6 +39218,9 @@ msgid "" "resource in 2D.\n" "Usage is the same as [MultiMeshInstance]." msgstr "" +"Le [MultiMeshInstance2D] est un nÅ“ud spécialisé pour instancier une " +"ressource [MultiMesh] en 2D.\n" +"L'utilisation est le même que [MultiMeshInstance]." #: doc/classes/MultiMeshInstance2D.xml msgid "The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]." @@ -38390,6 +39665,12 @@ msgid "Creates the agent." msgstr "Crée un agent." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "Renvoie [code]true[/code] si le chemin donné est filtré." @@ -38457,6 +39738,12 @@ msgid "Create a new map." msgstr "Crée une nouvelle carte." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "Retourne la taille des cellules de la carte." @@ -38485,6 +39772,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "Renvoie le traqueur de position à l'identification donnée." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Retourne [code]true[/code] si l'[AABB] est vide." @@ -38508,6 +39801,12 @@ msgid "Creates a new region." msgstr "Crée une nouvelle région." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Retourne la hauteur du contenu." @@ -38556,11 +39855,10 @@ msgid "Returns the path from start to finish in global coordinates." msgstr "Le point de collision, dans les coordonnées globales." #: doc/classes/NavigationAgent.xml -#, fuzzy msgid "" "Returns which index the agent is currently on in the navigation path's " "[PoolVector3Array]." -msgstr "Retourne le cache de points sous forme de [PackedVector3Array]." +msgstr "Retourne le cache de points sous forme de [PoolVector3Array]." #: doc/classes/NavigationAgent.xml msgid "" @@ -38700,7 +39998,7 @@ msgstr "" #: doc/classes/NavigationAgent2D.xml msgid "2D agent used in navigation for collision avoidance." -msgstr "" +msgstr "Un agent 2D utilisé en navigation pour éviter les collisions." #: doc/classes/NavigationAgent2D.xml msgid "" @@ -38713,11 +40011,10 @@ msgid "" msgstr "" #: doc/classes/NavigationAgent2D.xml -#, fuzzy msgid "" "Returns which index the agent is currently on in the navigation path's " "[PoolVector2Array]." -msgstr "Retourne le cache de points sous forme de [PackedVector3Array]." +msgstr "Retourne le cache de points sous forme de [PoolVector2Array]." #: doc/classes/NavigationAgent2D.xml msgid "" @@ -38759,6 +40056,7 @@ msgstr "" msgid "" "Clears the array of polygons, but it doesn't clear the array of vertices." msgstr "" +"Efface le tableau de polygones, mais n'efface pas le tableau de sommets." #: doc/classes/NavigationMesh.xml msgid "" @@ -38778,6 +40076,8 @@ msgid "" "Returns a [PoolIntArray] containing the indices of the vertices of a created " "polygon." msgstr "" +"Retourne un [PoolIntArray] contenant les indices des sommets du polygone " +"créé." #: doc/classes/NavigationMesh.xml #, fuzzy @@ -38789,6 +40089,8 @@ msgid "" "Returns a [PoolVector3Array] containing all the vertices being used to " "create the polygons." msgstr "" +"Retourne un [PoolVector3Array] contenant les indices des sommets du polygone " +"créé." #: doc/classes/NavigationMesh.xml msgid "" @@ -39001,18 +40303,59 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "Représente la taille de l'énumération [enum SourceGeometryMode]." #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." -msgstr "Efface le maillage de navigation." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Supprime l’animation avec la touche [code]name[/code]." #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." @@ -39032,7 +40375,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -39045,7 +40391,7 @@ msgstr "" #: doc/classes/NavigationMeshInstance.xml msgid "Determines if the [NavigationMeshInstance] is enabled or disabled." -msgstr "" +msgstr "Détermine si le [NavigationMeshInstance] est actif ou non." #: doc/classes/NavigationMeshInstance.xml msgid "The [NavigationMesh] resource to use." @@ -39062,7 +40408,7 @@ msgstr "Avertit quand le [NavigationMesh] a changé." #: doc/classes/NavigationObstacle.xml msgid "3D obstacle used in navigation for collision avoidance." -msgstr "" +msgstr "Un obstacle 3D utilisé en navigation pour éviter les collisions." #: doc/classes/NavigationObstacle.xml msgid "" @@ -39079,6 +40425,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Retourne le [RID] de la énième forme d'une zone." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -39098,7 +40449,7 @@ msgstr "" #: doc/classes/NavigationObstacle2D.xml msgid "2D obstacle used in navigation for collision avoidance." -msgstr "" +msgstr "Un obstacle 2D utilisé en navigation pour éviter les collisions." #: doc/classes/NavigationObstacle2D.xml msgid "" @@ -39115,6 +40466,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Retourne le [RID] de la énième forme d'une zone." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -39266,6 +40622,8 @@ msgstr "Renvoie l'inverse de la racine carrée du paramètre." msgid "" "Returns the closest point between the navigation surface and the segment." msgstr "" +"Retourne le point le plus proche de la surface de la navigation et du " +"segment." #: doc/classes/NavigationServer.xml msgid "" @@ -39555,6 +40913,8 @@ msgstr "Compression [url=https://facebook.github.io/zstd/]Zstandard[/url]." #: doc/classes/NetworkedMultiplayerPeer.xml msgid "A high-level network interface to simplify multiplayer interactions." msgstr "" +"Une interface réseau haut-niveau pour simplifier les interactions " +"multijoueurs." #: doc/classes/NetworkedMultiplayerPeer.xml msgid "" @@ -39583,6 +40943,8 @@ msgid "" "Returns the ID of the [NetworkedMultiplayerPeer] who sent the most recent " "packet." msgstr "" +"Retourne l'identifiant du [NetworkedMultiplayerPeer] qui a envoyé le plus " +"récent paquet." #: doc/classes/NetworkedMultiplayerPeer.xml msgid "Returns the ID of this [NetworkedMultiplayerPeer]." @@ -39678,6 +41040,7 @@ msgstr "La tentative de connexion a réussi." #: doc/classes/NetworkedMultiplayerPeer.xml msgid "Packets are sent to the server and then redistributed to other peers." msgstr "" +"Les paquets sont envoyés au serveur puis redistribués aux autres pairs." #: doc/classes/NetworkedMultiplayerPeer.xml msgid "Packets are sent to the server alone." @@ -40350,6 +41713,8 @@ msgid "" "Returns [code]true[/code] if the node is folded (collapsed) in the Scene " "dock." msgstr "" +"Retourne [code]true[/code] si le nÅ“ud est réduit (la descendance est " +"masquée) dans le dock de la scène." #: doc/classes/Node.xml msgid "" @@ -40377,7 +41742,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -40385,8 +41750,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -40428,6 +41793,8 @@ msgid "" "Returns [code]true[/code] if the node is processing unhandled input (see " "[method set_process_unhandled_input])." msgstr "" +"Retourne [code]true[/code] si le nÅ“ud est en train de gérer les entrées non " +"traitées (voir [method set_process_unhandled_input])." #: doc/classes/Node.xml msgid "" @@ -40618,6 +41985,8 @@ msgid "" "Sends a [method rpc] using an unreliable protocol. Returns an empty " "[Variant]." msgstr "" +"Envoie un [method rpc] en utilisant un protocole non fiable. Retourne un " +"[Variant] vide." #: doc/classes/Node.xml msgid "" @@ -40680,14 +42049,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -40817,6 +42178,17 @@ msgstr "" #: doc/classes/Node.xml msgid "Pause mode. How the node will behave if the [SceneTree] is paused." msgstr "" +"Le mode de pause. La façon dont le nÅ“ud se comportera quand le [SceneTree] " +"est en pause." + +#: doc/classes/Node.xml +msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" #: doc/classes/Node.xml msgid "" @@ -40981,6 +42353,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "Dupliquer les signaux du nÅ“ud." @@ -41338,7 +42728,7 @@ msgstr "Hauteur de la texture générée." #: modules/opensimplex/doc_classes/NoiseTexture.xml msgid "The [OpenSimplexNoise] instance used to generate the noise." -msgstr "" +msgstr "L'instance [OpenSimplexNoise] utilisée pour générer le bruit." #: modules/opensimplex/doc_classes/NoiseTexture.xml msgid "" @@ -41401,6 +42791,43 @@ msgid "" "code]. This bug only applies to Object itself, not any of its descendents " "like [Reference]." msgstr "" +"Chaque classe qui n'est pas intégrée hérite de cette classe.\n" +"Vous pouvez construire des Objects depuis les langages de script, avec " +"[code]Object.new()[/code] dans GDScript, [code]new Object[/code] dans C#, ou " +"le nÅ“ud \"Construire un Objet\" dans VisualScript.\n" +"Les objets ne gère pas la mémoire. Si une classe hérite de Object, vous " +"devez manuellement supprimer les instances quand elles ne sont plus " +"utilisées. Pour cela, appelez la méthode [method free] depuis votre script " +"ou supprimez l'instance en C++.\n" +"Certaines classes qui hérite de Object ajoute la gestion de la mémoire. " +"C'est le cas de [Reference], qui contient un compteur de références et se " +"supprime automatiquement quand il n'est pas référencé. [Node], un autre type " +"fondamental, supprime tous ces enfants quand il est libéré de la mémoire.\n" +"Les objet exportent des propriétés, qui sont principalement utilisées pour " +"enregistrement et les modifications, mais pas tant que ça en programmation. " +"Les propriétés sont exportées dans [method _get_property_list] et gérées " +"dans [method _get] et [method _set]. Par contre, les langages de script et C+" +"+ ont un système plus simple pour les exporter.\n" +"L'existence de propriétés peut être directement vérifié dans GDScript avec " +"[code]in[/code]:\n" +"[codeblock]\n" +"var n = Node2D.new()\n" +"print(\"position\" in n) # Affiche \"True\".\n" +"print(\"other_property\" in n) # Affiche \"False\".\n" +"[/codeblock]\n" +"L'opérateur [code]in[/code] sera évalué à [code]true[/code] aussi longtemps " +"que la clé existe, même si sa valeur est [code]null[/code].\n" +"Les objets reçoivent aussi des notifications. Les notifications sont " +"simplement un moyen de notifier à l'objet différents événements, pour qu'ils " +"soient tous traités ensemble. Voir [method _notification].\n" +"[b]Note :[/b] Contrairement aux références aux [Reference], les références " +"aux Object sont stockés dans une variable qui peut devenir invalide sans " +"prévenir. Pour cela, il est recommandé d'utiliser [Reference] pour les " +"classe de données plutôt que [Object].\n" +"[b]Note :[/b] À cause d'un bug, il n'est pas possible de créer un objet avec " +"[code]Object.new()[/code]. Plutôt, utilisez [code]ClassDB." +"instance(\"Object\")[/code]. Ce bug ne s'applique qu'aux Object, et non à sa " +"descendance comme les [Reference]." #: doc/classes/Object.xml doc/classes/Reference.xml doc/classes/Resource.xml msgid "When and how to avoid using nodes for everything" @@ -41408,7 +42835,7 @@ msgstr "Quand et comment éviter d'utiliser des nÅ“uds pour tout" #: doc/classes/Object.xml msgid "Advanced exports using _get_property_list()" -msgstr "" +msgstr "Exports avancés avec _get_property_list()" #: doc/classes/Object.xml msgid "" @@ -41640,13 +43067,12 @@ msgid "" msgstr "" #: doc/classes/Object.xml -#, fuzzy msgid "Returns the object's metadata as a [PoolStringArray]." -msgstr "Retourne le cache d’inclinaisons en tant que [PackedFloat32Array]." +msgstr "Retourne les métadonnées de l'objet en tant que [PoolStringArray]." #: doc/classes/Object.xml msgid "Returns the object's methods and their signatures as an [Array]." -msgstr "" +msgstr "Retourne les méthodes et leur signature de l'objet dans un [Array]." #: doc/classes/Object.xml msgid "" @@ -42140,14 +43566,17 @@ msgstr "" #: modules/opensimplex/doc_classes/OpenSimplexNoise.xml msgid "Returns the 2D noise value [code][-1,1][/code] at the given position." msgstr "" +"Retourne la valeur du bruit 2D [code][-1,1][/code] à la position donnée." #: modules/opensimplex/doc_classes/OpenSimplexNoise.xml msgid "Returns the 3D noise value [code][-1,1][/code] at the given position." msgstr "" +"Retourne la valeur du bruit 3D [code][-1,1][/code] à la position donnée." #: modules/opensimplex/doc_classes/OpenSimplexNoise.xml msgid "Returns the 4D noise value [code][-1,1][/code] at the given position." msgstr "" +"Retourne la valeur du bruit 4D [code][-1,1][/code] à la position donnée." #: modules/opensimplex/doc_classes/OpenSimplexNoise.xml msgid "" @@ -42192,7 +43621,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "Button control that provides selectable options when pressed." -msgstr "" +msgstr "Un bouton qui propose des options à sélectionner quand appuyé." #: doc/classes/OptionButton.xml msgid "" @@ -42249,6 +43678,9 @@ msgid "" "Retrieves the metadata of an item. Metadata may be any type and can be used " "to store extra information about an item, such as an external string ID." msgstr "" +"Retourne les méta-données d'un élément. Les méta-données peuvent être de " +"n'importe quel type et peuvent être utilisées pour enregistrer des " +"informations additionnelles sur un élément, comme un identifiant externe." #: doc/classes/OptionButton.xml doc/classes/PopupMenu.xml msgid "Returns the text of the item at index [code]idx[/code]." @@ -42260,10 +43692,13 @@ msgid "Returns the tooltip of the item at index [code]idx[/code]." msgstr "Retourne le texte de l'élément à l'index [code]idx[/code]." #: doc/classes/OptionButton.xml +#, fuzzy msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" +"Retourne la position de l’élément qui a actuellement le focus. Ou retourne " +"[code]-1[/code] si aucun n'a le focus." #: doc/classes/OptionButton.xml msgid "" @@ -42285,7 +43720,8 @@ msgstr "Retire l'élément à l'index [code]idx[/code]." #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -42413,6 +43849,11 @@ msgid "" "driver, date and time, timers, environment variables, execution of binaries, " "command line, etc." msgstr "" +"Les fonction du système d'exploitation. OS fournit les fonctionnalités les " +"plus courantes pour communiquer avec le système hôte, comme l'accès au " +"presse-papiers, le pilote vidéo, la date et l'heure, les minuteurs, les " +"variables d'environnement, l'exécution de programmes, les lignes de " +"commandes, etc." #: doc/classes/OS.xml msgid "" @@ -42895,6 +44336,9 @@ msgid "" "code] is [code]-1[/code] (the default value), the current screen will be " "used." msgstr "" +"Retourne la position de l'écran spécifié par son index. Si [code]screen[/" +"code] est [code]-1[/code] (la valeur par défaut), l'écran actuel sera " +"utilisé." #: doc/classes/OS.xml msgid "" @@ -42929,16 +44373,21 @@ msgid "" "code] is [code]-1[/code] (the default value), the current screen will be " "used." msgstr "" +"Retourne la dimension en pixel de l'écran spécifié. Si [code]screen[/code] " +"est [code]-1[/code] (la valeur par défaut), l'écran actuel sera utilisé." #: doc/classes/OS.xml msgid "" "Returns the amount of time in milliseconds it took for the boot logo to " "appear." msgstr "" +"Retourne le temps en millisecondes avant que le logo au lancement apparaisse." #: doc/classes/OS.xml msgid "Returns the maximum amount of static memory used (only works in debug)." msgstr "" +"Retourne la quantité maximal de la mémoire statique utilisée (ne fonctionne " +"qu'en débogage)." #: doc/classes/OS.xml msgid "" @@ -42960,12 +44409,12 @@ msgstr "" #: doc/classes/OS.xml #, fuzzy msgid "Returns the epoch time of the operating system in milliseconds." -msgstr "Retourne la position du point à l'index [code]point[/code]." +msgstr "Retourne le temps epoch du système d'exploitation en millisecondes." #: doc/classes/OS.xml #, fuzzy msgid "Returns the epoch time of the operating system in seconds." -msgstr "Retourne la position du point à l'index [code]point[/code]." +msgstr "Retourne le temps epoch du système d'exploitation en secondes." #: doc/classes/OS.xml msgid "" @@ -43645,7 +45094,7 @@ msgstr "" #: doc/classes/OS.xml msgid "The size of the window (without counting window manager decorations)." -msgstr "" +msgstr "La taille de la fenêtre (sans compter ses décorations en haut)." #: doc/classes/OS.xml msgid "" @@ -43749,6 +45198,8 @@ msgid "" "Display handle:\n" "- Linux: [code]X11::Display*[/code] for the display" msgstr "" +"Gestion de l'affichage :\n" +"- Linux : [code]X11::Display*[/code] pour l'écran" #: doc/classes/OS.xml msgid "" @@ -43809,10 +45260,12 @@ msgstr "Inverser l'orientation de l'écran en mode portrait." #: doc/classes/OS.xml msgid "Uses landscape or reverse landscape based on the hardware sensor." msgstr "" +"Utilise le mode paysage ou paysage inversé suivant le capteur matériel." #: doc/classes/OS.xml msgid "Uses portrait or reverse portrait based on the hardware sensor." msgstr "" +"Utilise le mode portrait ou portrait inversé suivant le capteur matériel." #: doc/classes/OS.xml msgid "Uses most suitable orientation based on the hardware sensor." @@ -43923,6 +45376,52 @@ msgid "" " push_error(\"An error occurred while saving the scene to disk.\")\n" "[/codeblock]" msgstr "" +"Une interface simplifiée pour un fichier de scène. Fournit l'accès aux " +"opérations et vérifications que peuvent être faites sur la ressource de " +"scène elle-même.\n" +"Peut être utilisé pour enregistrer un nÅ“ud dans un fichier. à " +"l'enregistrement, le nÅ“ud tout comme tous les nÅ“uds dont il est propriétaire " +"sont enregistrés dans le fichier (voir la propriété [code]owner[/code] de " +"[Node]).\n" +"[b]Note :[/b] Le nÅ“ud n'a pas besoin d'être son propre propriétaire.\n" +"[b]Exemple de chargement d'une scène enregistrée :[/b]\n" +"[codeblock]\n" +"# Utiliser `load()` plutôt que `preload()` si le chemin n'est pas connu à la " +"compilation.\n" +"var scene = preload(\"res://scene.tscn\").instance()\n" +"# Ajouter un nÅ“ud comme enfant du nÅ“ud auquel le script est attaché.\n" +"add_child(scene)\n" +"[/codeblock]\n" +"[b]Exemple d'enregistrement d'un nÅ“ud avec différents propriétaires :[/b] 3 " +"objets sont crées : [code]Node2D[/code] ([code]node[/code]), " +"[code]RigidBody2D[/code] ([code]rigid[/code]) et [code]CollisionObject2D[/" +"code] ([code]collision[/code]). [code]collision[/code] est un enfant de " +"[code]rigid[/code] qui est un enfant de [code]node[/code]. Seul [code]rigid[/" +"code] est la propriété de [code]node[/code] et [code]pack[/code] " +"n'enregistrera alors que ces deux nÅ“uds, mais pas [code]collision[/code].\n" +"[codeblock]\n" +"# Créer les objets.\n" +"var node = Node2D.new()\n" +"var rigid = RigidBody2D.new()\n" +"var collision = CollisionShape2D.new()\n" +"\n" +"# Créer la hiérarchie des objets.\n" +"rigid.add_child(collision)\n" +"node.add_child(rigid)\n" +"\n" +"# Changer le propriétaire de `rigid`, mais pas de `collision`.\n" +"rigid.owner = node\n" +"\n" +"var scene = PackedScene.new()\n" +"# Seulement `node` and `rigid` sont dans le paquet.\n" +"var result = scene.pack(node)\n" +"if result == OK:\n" +" var error = ResourceSaver.save(\"res://chemin/nom.scn\", scene) # Ou " +"\"user://...\"\n" +" if error != OK:\n" +" push_error(\"Une erreur est survenue à l'enregistrement de cette " +"scène sur le disque.\")\n" +"[/codeblock]" #: doc/classes/PackedScene.xml msgid "Returns [code]true[/code] if the scene file has nodes." @@ -44016,6 +45515,8 @@ msgid "" "Returns the error state of the last packet received (via [method get_packet] " "and [method get_var])." msgstr "" +"Retourne un état d'erreur du dernier paquet reçu (via [method get_packet] et " +"[method get_var])." #: doc/classes/PacketPeer.xml #, fuzzy @@ -44133,10 +45634,13 @@ msgstr "" msgid "" "A status representing a [PacketPeerDTLS] that is connected to a remote peer." msgstr "" +"Un status représentant un [PacketPeerDTLS] qui est connecté à un pair " +"distant." #: doc/classes/PacketPeerDTLS.xml msgid "A status representing a [PacketPeerDTLS] in a generic error state." msgstr "" +"Un status représentant un [PacketPeerDTLS] dans un état d'erreur générique." #: doc/classes/PacketPeerDTLS.xml msgid "" @@ -44146,7 +45650,7 @@ msgstr "" #: doc/classes/PacketPeerStream.xml msgid "Wrapper to use a PacketPeer over a StreamPeer." -msgstr "" +msgstr "Une encapsulation pour utiliser un PacketPeer dans une StreamPeer." #: doc/classes/PacketPeerStream.xml msgid "" @@ -44295,7 +45799,7 @@ msgstr "Démo 2D de machine à états finis" #: doc/classes/Panel.xml doc/classes/Skeleton.xml doc/classes/SkeletonIK.xml msgid "3D Inverse Kinematics Demo" -msgstr "" +msgstr "Démo de cinématique inverse en 3D" #: doc/classes/Panel.xml msgid "The style of this [Panel]." @@ -44317,7 +45821,7 @@ msgstr "Le style de l'arrière-plan de [PanelContainer]." #: doc/classes/PanoramaSky.xml msgid "A type of [Sky] used to draw a background texture." -msgstr "" +msgstr "Un type de [Sky] utilisé pour afficher la texture d'arrière-plan." #: doc/classes/PanoramaSky.xml msgid "" @@ -44353,6 +45857,7 @@ msgstr "" #: doc/classes/ParallaxBackground.xml msgid "The base position offset for all [ParallaxLayer] children." msgstr "" +"Le décalage de la position de base pour tous les enfants du [ParallaxLayer]." #: doc/classes/ParallaxBackground.xml msgid "The base motion scale for all [ParallaxLayer] children." @@ -44656,6 +46161,7 @@ msgstr "" #: doc/classes/ParticlesMaterial.xml msgid "Each particle's rotation will be animated along this [CurveTexture]." msgstr "" +"La rotation de chaque particule sera animé suivant cette [CurveTexture]." #: doc/classes/ParticlesMaterial.xml msgid "" @@ -44669,14 +46175,20 @@ msgstr "" #: doc/classes/ParticlesMaterial.xml msgid "Each particle's angular velocity will vary along this [CurveTexture]." msgstr "" +"La vitesse de rotation de chaque particule variera suivant cette " +"[CurveTexture]." #: doc/classes/ParticlesMaterial.xml msgid "Each particle's animation offset will vary along this [CurveTexture]." msgstr "" +"La position de l'animation de chaque particule variera suivant cette " +"[CurveTexture]." #: doc/classes/ParticlesMaterial.xml msgid "Each particle's animation speed will vary along this [CurveTexture]." msgstr "" +"La vitesse d'animation de chaque particule variera suivant cette " +"[CurveTexture]." #: doc/classes/ParticlesMaterial.xml msgid "" @@ -44695,6 +46207,8 @@ msgid "" "The box's extents if [code]emission_shape[/code] is set to [constant " "EMISSION_SHAPE_BOX]." msgstr "" +"La taille de la boite si [code]emission_shape[/code] est à [constant " +"EMISSION_SHAPE_BOX]." #: doc/classes/ParticlesMaterial.xml msgid "" @@ -44778,6 +46292,7 @@ msgstr "La teinte de chaque particule variera suivant cette [CurveTexture]." msgid "" "Each particle's linear acceleration will vary along this [CurveTexture]." msgstr "" +"La vitesse linéaire de chaque particule variera suivant cette [CurveTexture]." #: doc/classes/ParticlesMaterial.xml msgid "" @@ -45040,9 +46555,8 @@ msgid "Forbids the PathFollow to rotate." msgstr "Interdit au PathFollow de pivoter pour suivre le chemin." #: doc/classes/PathFollow.xml -#, fuzzy msgid "Allows the PathFollow to rotate in the Y axis only." -msgstr "Interdit au PathFollow3D de tourner." +msgstr "Autorise le PathFollow à ne pivoter que selon l'axe Y." #: doc/classes/PathFollow.xml msgid "Allows the PathFollow to rotate in both the X, and Y axes." @@ -45113,7 +46627,7 @@ msgstr "" #: doc/classes/PCKPacker.xml msgid "Creates packages that can be loaded into a running project." -msgstr "" +msgstr "Crée des paquets qui peuvent être chargés dans un projet lancé." #: doc/classes/PCKPacker.xml msgid "" @@ -45148,6 +46662,9 @@ msgid "" "code] file extension isn't added automatically, so it should be part of " "[code]pck_name[/code] (even though it's not required)." msgstr "" +"Crée un nouveau fichier PCK nommé [code]pck_name[/code]. L'extension de " +"fichier [code].pck[/code] n'est pas ajoutée automatiquement, dont elle doit " +"être présente dans [code]pck_name[/code] (mais ça n'est pas indispensable)." #: doc/classes/Performance.xml msgid "Exposes performance-related data." @@ -45300,7 +46817,7 @@ msgstr "Le nombre de nÅ“uds [RigidBody2D] actifs dans le jeu." #: doc/classes/Performance.xml msgid "Number of collision pairs in the 2D physics engine." -msgstr "" +msgstr "Le nombre de paires de collision dans le moteur physique 2D." #: doc/classes/Performance.xml msgid "Number of islands in the 2D physics engine." @@ -45308,7 +46825,7 @@ msgstr "Le nombre d'îles dans le moteur physique 2D." #: doc/classes/Performance.xml msgid "Number of active [RigidBody] and [VehicleBody] nodes in the game." -msgstr "Le nombre de nÅ“uds [RigidBody] et [VehicleBody] dans le jeu." +msgstr "Le nombre de nÅ“uds [RigidBody] et [VehicleBody] actifs dans le jeu." #: doc/classes/Performance.xml msgid "Number of collision pairs in the 3D physics engine." @@ -45456,7 +46973,7 @@ msgstr "Retourne la position locale au point de contact." #: doc/classes/Physics2DDirectBodyState.xml #: doc/classes/PhysicsDirectBodyState.xml msgid "Returns the local shape index of the collision." -msgstr "" +msgstr "Retourne l'index de la forme locale de la collision." #: doc/classes/Physics2DDirectBodyState.xml #: doc/classes/PhysicsDirectBodyState.xml @@ -45800,7 +47317,7 @@ msgstr "Désactive une forme donnée dans une zone." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Sets the transform matrix for an area shape." -msgstr "" +msgstr "Définit la matrice de transformation pour la forme de l'aire." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Assigns a space to the area." @@ -45866,6 +47383,8 @@ msgid "" "Returns the [Physics2DDirectBodyState] of the body. Returns [code]null[/" "code] if the body is destroyed or removed from the physics space." msgstr "" +"Retourne le [Physics2DDirectBodyState] du corps. Retourne [code]null[/code] " +"si le corps est détruit ou retiré de l'espace physique." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "" @@ -45899,7 +47418,7 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the transform matrix of a body shape." -msgstr "" +msgstr "Retourne la matrice de transformation pour la forme du corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Returns the [RID] of the space assigned to a body." @@ -45972,18 +47491,24 @@ msgid "" "Sets whether a body uses a callback function to calculate its own physics " "(see [method body_set_force_integration_callback])." msgstr "" +"Définit quand un corps utilise sa propre fonction pour calculer sa physique " +"(voir [method body_set_force_integration_callback])." #: doc/classes/Physics2DServer.xml msgid "" "Sets a body parameter. See [enum BodyParameter] for a list of available " "parameters." msgstr "" +"Définit un paramètre du corps. Voir [enum BodyParameter] pour la liste des " +"paramètres disponibles." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "" "Substitutes a given body shape by another. The old shape is selected by its " "index, the new one by its [RID]." msgstr "" +"Remplace la forme du corps par une autre. L'ancienne forme est choisie par " +"son index, et la nouvelle par son [RID]." #: doc/classes/Physics2DServer.xml msgid "" @@ -46079,6 +47604,8 @@ msgid "" "Sets a joint parameter. See [enum JointParam] for a list of available " "parameters." msgstr "" +"Définit un paramètre du joint. Voir [enum JointParam] pour la liste des " +"paramètres disponibles." #: doc/classes/Physics2DServer.xml msgid "" @@ -46145,6 +47672,8 @@ msgid "" "Sets the value for a space parameter. See [enum SpaceParameter] for a list " "of available parameters." msgstr "" +"Définit la valeur pour le paramètre d'espace. Voir [enum SpaceParameter] " +"pour la liste des paramètres possibles." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "" @@ -46250,11 +47779,11 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get gravity strength in an area." -msgstr "" +msgstr "La constante pour définir/obtenir la force de gravité de l'aire." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get gravity vector/center in an area." -msgstr "" +msgstr "La constante pour définir/obtenir le centre de gravité de l'aire." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "" @@ -46367,10 +47896,14 @@ msgstr "" #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get a body's linear dampening factor." msgstr "" +"La constante pour définir/obtenir la facteur d'amortissement linéaire du " +"corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get a body's angular dampening factor." msgstr "" +"La constante pour définir/obtenir la facteur d'amortissement de rotation du " +"corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Represents the size of the [enum BodyParameter] enum." @@ -46379,6 +47912,8 @@ msgstr "Représente la taille de l'énumération [enum BodyParameter]." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get the current transform matrix of the body." msgstr "" +"La constante pour définir/obtenir la matrice de transformation actuelle du " +"corps." #: doc/classes/Physics2DServer.xml doc/classes/PhysicsServer.xml msgid "Constant to set/get the current linear velocity of the body." @@ -46515,7 +48050,7 @@ msgstr "" #: doc/classes/PhysicsShapeQueryParameters.xml msgid "" "The list of objects or object [RID]s that will be excluded from collisions." -msgstr "" +msgstr "La liste des objets ou [RID] d'objets qui sont exclus des collisions." #: doc/classes/Physics2DShapeQueryParameters.xml #: doc/classes/PhysicsShapeQueryParameters.xml @@ -46529,7 +48064,7 @@ msgstr "Le mouvement de la forme qui a été demandée." #: doc/classes/Physics2DShapeQueryParameters.xml #: doc/classes/PhysicsShapeQueryParameters.xml msgid "The queried shape's [RID]. See also [method set_shape]." -msgstr "" +msgstr "Le [RID] de la forme demandée. Voir aussi [method set_shape]." #: doc/classes/Physics2DShapeQueryParameters.xml #: doc/classes/PhysicsShapeQueryParameters.xml @@ -46774,6 +48309,8 @@ msgid "" "The body's bounciness. Values range from [code]0[/code] (no bounce) to " "[code]1[/code] (full bounciness)." msgstr "" +"Le facteur de rebondissement du corps. L'intervalle est de [code]0[/code] " +"(aucun rebondissement) à [code]1[/code] (rebondissement maximal)." #: doc/classes/PhysicsMaterial.xml msgid "" @@ -46859,6 +48396,8 @@ msgid "" "Returns the [PhysicsDirectBodyState] of the body. Returns [code]null[/code] " "if the body is destroyed or removed from the physics space." msgstr "" +"Retourne le [PhysicsDirectBodyState] du corps. Retourne [code]null[/code] si " +"le corps est détruit ou retiré de l'espace physique." #: doc/classes/PhysicsServer.xml msgid "" @@ -47179,11 +48718,11 @@ msgstr "" #: doc/classes/PhysicsServer.xml doc/classes/SliderJoint.xml msgid "The amount of restitution inside the slider limits." -msgstr "" +msgstr "La quantité de restitution dans les limites du glisseur." #: doc/classes/PhysicsServer.xml doc/classes/SliderJoint.xml msgid "The amount of damping inside the slider limits." -msgstr "" +msgstr "La quantité d'amortissement dans les limites du glisseur." #: doc/classes/PhysicsServer.xml doc/classes/SliderJoint.xml msgid "A factor applied to the movement across axes orthogonal to the slider." @@ -47226,11 +48765,11 @@ msgstr "" #: doc/classes/PhysicsServer.xml doc/classes/SliderJoint.xml msgid "The amount of restitution of the rotation in the limits." -msgstr "" +msgstr "La quantité de restitution de la rotation dans les limites." #: doc/classes/PhysicsServer.xml doc/classes/SliderJoint.xml msgid "The amount of damping of the rotation in the limits." -msgstr "" +msgstr "La quantité d'amortissement de la rotation dans les limites." #: doc/classes/PhysicsServer.xml msgid "" @@ -47453,7 +48992,7 @@ msgstr "" #: doc/classes/Plane.xml msgid "Creates a plane from the normal and the plane's distance to the origin." -msgstr "" +msgstr "Crée un plan à partir d'une normale et de sa distance à l'origine." #: doc/classes/Plane.xml msgid "Returns the center of the plane." @@ -47586,6 +49125,8 @@ msgstr "" #: doc/classes/PlaneMesh.xml msgid "Offset from the origin of the generated plane. Useful for particles." msgstr "" +"Le décalage par rapport à l'origine du plan généré. Utile pour les " +"particules." #: doc/classes/PlaneMesh.xml msgid "Size of the generated plane." @@ -47773,9 +49314,8 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -#, fuzzy msgid "A pooled array of bytes." -msgstr "Un [Array] compacté d'octets." +msgstr "Un tableau compacté d'octets." #: doc/classes/PoolByteArray.xml msgid "" @@ -47783,6 +49323,9 @@ msgid "" "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" +"Un tableau spécialement prévu pour contenir des octets. Optimisé pour " +"l'usage mémoire, elle ne se fragmente pas.\n" +"[b]Note :[/b] Ce type est passé par valeur et non pas référence." #: doc/classes/PoolByteArray.xml msgid "" @@ -47791,9 +49334,8 @@ msgid "" msgstr "" #: doc/classes/PoolByteArray.xml -#, fuzzy msgid "Appends a [PoolByteArray] at the end of this array." -msgstr "Ajoute un [PackedVector3Array] à la fin de ce tableau." +msgstr "Ajoute un [PoolByteArray] à la fin de ce tableau." #: doc/classes/PoolByteArray.xml msgid "" @@ -47853,6 +49395,17 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" +"Retourne [code]true[/code] si l'objet contient la [code]method[/code] donnée." + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -47872,7 +49425,7 @@ msgstr "" #: doc/classes/PoolByteArray.xml doc/classes/PoolRealArray.xml msgid "Appends an element at the end of the array." -msgstr "" +msgstr "Ajoute un élément à la fin du tableau." #: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml #: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml @@ -47901,11 +49454,12 @@ msgid "" "new [PoolByteArray]. Any negative index is considered to be from the end of " "the array." msgstr "" +"Retourne une partie du [PoolByteArray] entre les indices (inclus) dans un " +"nouveau [PoolByteArray]. Chaque index négatif partira de la fin du tableau." #: doc/classes/PoolColorArray.xml -#, fuzzy msgid "A pooled array of [Color]." -msgstr "Un [Array] compacté de [Color]." +msgstr "Un tableau compacté de [Color]." #: doc/classes/PoolColorArray.xml msgid "" @@ -47913,6 +49467,9 @@ msgid "" "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" +"Un tableau spécialement prévu pour contenir des [Color]. Optimisé pour " +"l'usage mémoire, elle ne se fragmente pas.\n" +"[b]Note :[/b] Ce type est passé par valeur et non pas référence." #: doc/classes/PoolColorArray.xml msgid "" @@ -47921,9 +49478,8 @@ msgid "" msgstr "" #: doc/classes/PoolColorArray.xml -#, fuzzy msgid "Appends a [PoolColorArray] at the end of this array." -msgstr "Ajoute un [PackedVector3Array] à la fin de ce tableau." +msgstr "Ajoute un [PoolColorArray] à la fin de ce tableau." #: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml msgid "Appends a value to the array." @@ -47942,9 +49498,8 @@ msgid "Changes the [Color] at the given index." msgstr "Change la [Color] à la position donnée." #: doc/classes/PoolIntArray.xml -#, fuzzy msgid "A pooled array of integers ([int])." -msgstr "Un [Array] compacté d'entier ([int])." +msgstr "Un tableau compacté d'entiers ([int])." #: doc/classes/PoolIntArray.xml msgid "" @@ -47963,26 +49518,29 @@ msgid "" "Constructs a new [PoolIntArray]. Optionally, you can pass in a generic " "[Array] that will be converted." msgstr "" +"Construit un nouvel [PoolIntArray]. En option, il est possible de passer un " +"[Array] générique qui sera converti." #: doc/classes/PoolIntArray.xml -#, fuzzy msgid "Appends a [PoolIntArray] at the end of this array." -msgstr "Ajoute un [PackedVector3Array] à la fin de ce tableau." +msgstr "Ajoute un [PoolIntArray] à la fin de ce tableau." #: doc/classes/PoolIntArray.xml msgid "" "Inserts a new int at a given position in the array. The position must be " "valid, or at the end of the array ([code]idx == size()[/code])." msgstr "" +"Insert un nouvel entier à la position donnée dans le tableau. Cette position " +"doit être valide, ou à la toute fin du tableau (soit [code]idx == size()[/" +"code])." #: doc/classes/PoolIntArray.xml msgid "Changes the int at the given index." msgstr "Modifie le [int] à l’index donné." #: doc/classes/PoolRealArray.xml -#, fuzzy msgid "A pooled array of reals ([float])." -msgstr "Un [Array] compacté de flottants ([float])." +msgstr "Un tableau compacté de flottants ([float])." #: doc/classes/PoolRealArray.xml msgid "" @@ -48003,20 +49561,20 @@ msgid "" "Constructs a new [PoolRealArray]. Optionally, you can pass in a generic " "[Array] that will be converted." msgstr "" +"Construit un nouvel [PoolRealArray]. En option, il est possible de passer un " +"[Array] générique qui sera converti." #: doc/classes/PoolRealArray.xml -#, fuzzy msgid "Appends a [PoolRealArray] at the end of this array." -msgstr "Ajoute un [PackedVector3Array] à la fin de ce tableau." +msgstr "Ajoute un [PoolRealArray] à la fin de ce tableau." #: doc/classes/PoolRealArray.xml msgid "Changes the float at the given index." msgstr "Change la flottant à la position donnée." #: doc/classes/PoolStringArray.xml -#, fuzzy msgid "A pooled array of [String]." -msgstr "Un [Array] compacté de [String]." +msgstr "Un tableau compacté de [String]." #: doc/classes/PoolStringArray.xml msgid "" @@ -48024,17 +49582,21 @@ msgid "" "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" +"Un tableau spécialement prévu pour contenir des [String]. Optimisé pour " +"l'usage mémoire, elle ne se fragmente pas.\n" +"[b]Note :[/b] Ce type est passé par valeur et non pas référence." #: doc/classes/PoolStringArray.xml msgid "" "Constructs a new [PoolStringArray]. Optionally, you can pass in a generic " "[Array] that will be converted." msgstr "" +"Construit un nouvel [PoolStringArray]. En option, il est possible de passer " +"un [Array] générique qui sera converti." #: doc/classes/PoolStringArray.xml -#, fuzzy msgid "Appends a [PoolStringArray] at the end of this array." -msgstr "Ajoute un [PackedVector3Array] à la fin de ce tableau." +msgstr "Ajoute un [PoolStringArray] à la fin de ce tableau." #: doc/classes/PoolStringArray.xml #, fuzzy @@ -48052,9 +49614,8 @@ msgid "Changes the [String] at the given index." msgstr "Change la [String] à la position donnée." #: doc/classes/PoolVector2Array.xml -#, fuzzy msgid "A pooled array of [Vector2]." -msgstr "Un [Array] compacté de [Vector2]." +msgstr "Un tableau compacté de [Vector2]." #: doc/classes/PoolVector2Array.xml msgid "" @@ -48062,22 +49623,26 @@ msgid "" "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" +"Un tableau spécialement prévu pour contenir des [Vector2]. Optimisé pour " +"l'usage mémoire, elle ne se fragmente pas.\n" +"[b]Note :[/b] Ce type est passé par valeur et non pas référence." #: doc/classes/PoolVector2Array.xml doc/classes/TileMap.xml #: doc/classes/TileSet.xml msgid "2D Navigation Astar Demo" -msgstr "" +msgstr "Démo de navigation Astar en 2D" #: doc/classes/PoolVector2Array.xml msgid "" "Constructs a new [PoolVector2Array]. Optionally, you can pass in a generic " "[Array] that will be converted." msgstr "" +"Construit un nouvel [PoolVector2Array]. En option, il est possible de passer " +"un [Array] générique qui sera converti." #: doc/classes/PoolVector2Array.xml -#, fuzzy msgid "Appends a [PoolVector2Array] at the end of this array." -msgstr "Ajoute un [PackedVector3Array] à la fin de ce tableau." +msgstr "Ajoute un [PoolVector2Array] à la fin de ce tableau." #: doc/classes/PoolVector2Array.xml msgid "Inserts a [Vector2] at the end." @@ -48088,9 +49653,8 @@ msgid "Changes the [Vector2] at the given index." msgstr "Change la [Vector2] à la position donnée." #: doc/classes/PoolVector3Array.xml -#, fuzzy msgid "A pooled array of [Vector3]." -msgstr "Un [Array] compacté de [Vector3]." +msgstr "Un tableau compacté de [Vector3]." #: doc/classes/PoolVector3Array.xml msgid "" @@ -48098,17 +49662,21 @@ msgid "" "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" +"Un tableau spécialement prévu pour contenir des [Vector3]. Optimisé pour " +"l'usage mémoire, elle ne se fragmente pas.\n" +"[b]Note :[/b] Ce type est passé par valeur et non pas référence." #: doc/classes/PoolVector3Array.xml msgid "" "Constructs a new [PoolVector3Array]. Optionally, you can pass in a generic " "[Array] that will be converted." msgstr "" +"Construit un nouvel [PoolVector3Array]. En option, il est possible de passer " +"un [Array] générique qui sera converti." #: doc/classes/PoolVector3Array.xml -#, fuzzy msgid "Appends a [PoolVector3Array] at the end of this array." -msgstr "Ajoute un [PackedVector3Array] à la fin de ce tableau." +msgstr "Ajoute un [PoolVector3Array] à la fin de ce tableau." #: doc/classes/PoolVector3Array.xml msgid "Inserts a [Vector3] at the end." @@ -48209,6 +49777,8 @@ msgstr "Classe parente des fenêtres de dialogue." msgid "" "PopupDialog is a base class for popup dialogs, along with [WindowDialog]." msgstr "" +"PopupDialog est la classe de base pour les dialogues contextuels, avec aussi " +"[WindowDialog]." #: doc/classes/PopupDialog.xml #, fuzzy @@ -48289,12 +49859,13 @@ msgstr "" #: doc/classes/PopupMenu.xml msgid "Same as [method add_icon_check_item], but uses a radio check button." -msgstr "" +msgstr "Pareil que [method add_icon_check_item], mais utilise un bouton radio." #: doc/classes/PopupMenu.xml msgid "" "Same as [method add_icon_check_shortcut], but uses a radio check button." msgstr "" +"Pareil que [method add_icon_check_shorcut], mais utilise un bouton radio." #: doc/classes/PopupMenu.xml msgid "" @@ -48535,6 +50106,7 @@ msgstr "" #: doc/classes/PopupMenu.xml msgid "Sets the checkstate status of the item at index [code]idx[/code]." msgstr "" +"Définit le status de la coche pour l'élément à la position [code]idx[/code]." #: doc/classes/PopupMenu.xml msgid "" @@ -48583,6 +50155,8 @@ msgid "" "Sets the [String] tooltip of the item at the specified index [code]idx[/" "code]." msgstr "" +"Définit la [String] de l'infobulle de l'élément à l'index [code]idx[/code] " +"spécifié." #: doc/classes/PopupMenu.xml #, fuzzy @@ -48608,6 +50182,8 @@ msgid "" "If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button " "is selected." msgstr "" +"Si [code]true[/code], masque le [PopupMenu] quand une coche ou un bouton " +"radio est sélectionné." #: doc/classes/PopupMenu.xml msgid "If [code]true[/code], hides the [PopupMenu] when an item is selected." @@ -48684,6 +50260,11 @@ msgid "[Font] used for the menu items." msgstr "La [Font] utilisée pour les éléments du menu." #: doc/classes/PopupMenu.xml +#, fuzzy +msgid "[Font] used for the labeled separator." +msgstr "[Font] utilisée pour le texte du [Label]." + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "La [Texture] de l'icône pour les coches cochées." @@ -49072,6 +50653,8 @@ msgid "" "Font used to draw the fill percentage if [member percent_visible] is " "[code]true[/code]." msgstr "" +"La police utilisée pour afficher le pourcentage de remplissage si [member " +"percent_visible] est [code]true[/code]." #: doc/classes/ProgressBar.xml msgid "The style of the background." @@ -49079,7 +50662,7 @@ msgstr "Le style de l’arrière-plan." #: doc/classes/ProgressBar.xml msgid "The style of the progress (i.e. the part that fills the bar)." -msgstr "" +msgstr "Le style de progression (c'est-à -dire la partie qui remplis la barre)." #: doc/classes/ProjectSettings.xml msgid "Contains global variables accessible from everywhere." @@ -49600,6 +51183,8 @@ msgstr "" msgid "" "If [code]true[/code], enables warnings when a constant is used as a function." msgstr "" +"If [code]true[/code], active les avertissements quand une constante est " +"utilisée comme un fonction." #: doc/classes/ProjectSettings.xml msgid "" @@ -49634,6 +51219,8 @@ msgid "" "If [code]true[/code], enables warnings when a function is declared with the " "same name as a constant." msgstr "" +"Si [code]true[/code], active les avertissements quand une fonction est " +"déclarée avec le même nom qu'une constante." #: doc/classes/ProjectSettings.xml msgid "" @@ -50180,6 +51767,10 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour déplacer l'interface vers le bas.\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50199,6 +51790,12 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour définit le focus au [Control] suivant " +"de la scène. Le comportement du focus peut être configuré avec [member " +"Control.focus_next].\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50208,6 +51805,12 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour définit le focus au [Control] " +"précédent de la scène. Le comportement du focus peut être configuré avec " +"[member Control.focus_previous].\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50226,6 +51829,10 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour déplacer l'interface vers la gauche.\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50236,6 +51843,12 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour descendre d'une page dans un [Control] " +"(dans un [ItemList] ou un [Tree] par exemple), correspondant au comportement " +"de [constant KEY_PAGEDOWN] dans une interface de bureau classique.\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50246,6 +51859,12 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour monter d'une page dans un [Control] " +"(dans un [ItemList] ou un [Tree] par exemple), correspondant au comportement " +"de [constant KEY_PAGEUP] dans une interface de bureau classique.\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50254,6 +51873,10 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour déplacer l'interface vers la droite.\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50263,6 +51886,11 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour sélectionner un élément dans un " +"[Control] (dans un [ItemList] ou un [Tree] par exemple).\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50271,6 +51899,10 @@ msgid "" "necessary for the internal logic of several [Control]s. The events assigned " "to the action can however be modified." msgstr "" +"La [InputEventAction] par défaut pour déplacer l'interface vers le haut.\n" +"[b]Note :[/b] Les actions [code]ui_*[/code] par défaut ne peuvent pas être " +"supprimées car elles sont nécessaires à la logique interne de nombreux " +"[Control]. Mais les événements assignés aux actions peuvent modifiés." #: doc/classes/ProjectSettings.xml msgid "" @@ -50746,6 +52378,8 @@ msgid "" "Path to logs within the project. Using an [code]user://[/code] path is " "recommended." msgstr "" +"Le chemin des journaux dans le projet. L'utilisation de [code]user://[/code] " +"est recommandé." #: doc/classes/ProjectSettings.xml msgid "Specifies the maximum amount of log files allowed (used for rotation)." @@ -50990,6 +52624,9 @@ msgid "" "\"DEFAULT\" and \"GodotPhysics\" are the same, as there is currently no " "alternative 2D physics server implemented." msgstr "" +"Définit le moteur physique 2D à utiliser.\n" +"\"PAR DÉFAUT\" et \"GodotPhysics\" sont pareils, puisqu'il n'existe " +"actuellement pas d'autres serveurs de physique 2D implémentés." #: doc/classes/ProjectSettings.xml msgid "" @@ -52200,9 +53837,8 @@ msgid "" msgstr "" #: doc/classes/PropertyTweener.xml -#, fuzzy msgid "Interpolates an [Object]'s property over time." -msgstr "Anime de manière fluide une propriété d'un nÅ“ud dans le temps." +msgstr "Interpole une propriété d'un [Object] dans le temps." #: doc/classes/PropertyTweener.xml msgid "" @@ -52254,19 +53890,8 @@ msgid "" "Sets the time in seconds after which the [PropertyTweener] will start " "interpolating. By default there's no delay." msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" +"Définit le délai en secondes avant que le [PropertyTweener] commence son " +"interpolation. Par défaut, il n'y a pas de délai." #: doc/classes/ProximityGroup.xml #, fuzzy @@ -52407,7 +54032,7 @@ msgstr "" #: doc/classes/QuadMesh.xml doc/classes/Viewport.xml #: doc/classes/ViewportTexture.xml msgid "2D in 3D Demo" -msgstr "" +msgstr "Démo pour la 2D en 3D" #: doc/classes/QuadMesh.xml msgid "Offset of the generated Quad. Useful for particles." @@ -52795,6 +54420,8 @@ msgid "" "Emitted when [member min_value], [member max_value], [member page], or " "[member step] change." msgstr "" +"Émis quand [member min_value], [member max_value], [member page], ou [member " +"step] change." #: doc/classes/Range.xml msgid "" @@ -52877,7 +54504,7 @@ msgstr "" #: doc/classes/RayCast.xml doc/classes/RayCast2D.xml msgid "" "Returns the normal of the intersecting object's shape at the collision point." -msgstr "" +msgstr "Retourne la normale de la forme de l'objet au point de collision." #: doc/classes/RayCast.xml doc/classes/RayCast2D.xml msgid "" @@ -53503,7 +55130,7 @@ msgstr "" #: modules/regex/doc_classes/RegEx.xml msgid "Returns the original search pattern that was compiled." -msgstr "" +msgstr "Retourne le motif de recherche original qui a été compilé." #: modules/regex/doc_classes/RegEx.xml msgid "Returns whether this object has a valid search pattern assigned." @@ -53639,12 +55266,16 @@ msgid "" "If [code]true[/code], global coordinates are used. If [code]false[/code], " "local coordinates are used." msgstr "" +"Si [code]true[/code], les coordonnées globales sont utilisées. Si " +"[code]false[/code], ce sont les locales." #: doc/classes/RemoteTransform2D.xml msgid "" "RemoteTransform2D pushes its own [Transform2D] to another [CanvasItem] " "derived Node in the scene." msgstr "" +"RemoteTransform2D utilise sa propre [Transform2D] pour un autre nÅ“ud " +"héritant de [CanvasItem] dans la scène." #: doc/classes/RemoteTransform2D.xml msgid "" @@ -53666,6 +55297,8 @@ msgid "" "The [NodePath] to the remote node, relative to the RemoteTransform2D's " "position in the scene." msgstr "" +"Le [NodePath] du nÅ“ud distant, relatif à la position du RemoteTransform2D " +"dans la scène." #: doc/classes/Resource.xml msgid "Base class for all resources." @@ -53826,6 +55459,7 @@ msgstr "" #: doc/classes/ResourceFormatLoader.xml msgid "Gets the list of extensions for files this loader is able to read." msgstr "" +"Retourne la liste des extensions des fichiers que ce chargeur peut lire." #: doc/classes/ResourceFormatLoader.xml msgid "" @@ -54071,6 +55705,8 @@ msgid "" "Changes the behavior on missing sub-resources. The default behavior is to " "abort loading." msgstr "" +"Change le comportement pour les sous-ressources manquantes. Le comportement " +"par défaut est d'annuler le chargement." #: doc/classes/ResourcePreloader.xml msgid "Resource Preloader Node." @@ -54120,6 +55756,8 @@ msgid "" "Renames a resource inside the preloader from [code]name[/code] to " "[code]newname[/code]." msgstr "" +"Renomme une ressource dans le pré-chargeur de [code]name[/code] en " +"[code]newname[/code]." #: doc/classes/ResourceSaver.xml msgid "Singleton for saving Godot-specific resource types." @@ -54139,6 +55777,8 @@ msgid "" "Returns the list of extensions available for saving a resource of a given " "type." msgstr "" +"Retourne la liste des extensions possibles pour enregistrer une ressource de " +"ce type." #: doc/classes/ResourceSaver.xml msgid "" @@ -54152,6 +55792,7 @@ msgstr "" #: doc/classes/ResourceSaver.xml msgid "Save the resource with a path relative to the scene which uses it." msgstr "" +"Enregistre la ressource avec un chemin relatif à la scène qui l'utilise." #: doc/classes/ResourceSaver.xml msgid "Bundles external resources." @@ -54162,12 +55803,16 @@ msgid "" "Changes the [member Resource.resource_path] of the saved resource to match " "its new location." msgstr "" +"Change le chemin [member Resource.resource_path] de la ressource enregistrée " +"pour correspondre à son nouvel emplacement." #: doc/classes/ResourceSaver.xml msgid "" "Do not save editor-specific metadata (identified by their [code]__editor[/" "code] prefix)." msgstr "" +"Ne sauvegarde pas les méta-données spécifiques à l'éditeur (commençant par " +"[code]__editor[/code])." #: doc/classes/ResourceSaver.xml msgid "Save as big endian (see [member File.endian_swap])." @@ -54178,6 +55823,8 @@ msgid "" "Compress the resource on save using [constant File.COMPRESSION_ZSTD]. Only " "available for binary resource types." msgstr "" +"Compresse la ressource quand elle est enregistrée avec [constant File." +"COMPRESSION_ZSTD]. Seulement disponible pour les ressources de type binaire." #: doc/classes/ResourceSaver.xml msgid "" @@ -54187,7 +55834,7 @@ msgstr "" #: doc/classes/RichTextEffect.xml msgid "A custom effect for use with [RichTextLabel]." -msgstr "Un effet personnalisé à utilisé pour ce [RichTextLabel]." +msgstr "Un effet personnalisé à utilisé avec les [RichTextLabel]." #: doc/classes/RichTextEffect.xml msgid "" @@ -54203,6 +55850,18 @@ msgid "" "[RichTextEffect], it will continuously process the effect unless the project " "is paused. This may impact battery life negatively." msgstr "" +"Un effet personnalisé à utiliser avec les [RichTextLabel].\n" +"[b]Note :[/b] Pour qu'un [RichTextEffect] soit utilisable, un marqueur " +"BBCode doit être définit sous forme de variable de membre nommée " +"[code]bbcode[/code] dans le script.\n" +"[codeblock]\n" +"# Le RichTextEffect sera utilisable avec : `[exemple]Some text[/exemple]`\n" +"var bbcode = \"exemple\"\n" +"[/codeblock]\n" +"[b]Note :[/b] Dès qu'un [RichTextLabel] contient au moins un " +"[RichTextEffect], il mettre à jour l'effet en permanence tant que le projet " +"ne sera pas mis en pause. Ceci pour avoir un impact important sur " +"l'autonomie de la batterie." #: doc/classes/RichTextEffect.xml msgid "" @@ -54211,6 +55870,10 @@ msgid "" "successfully. If the method returns [code]false[/code], it will skip " "transformation to avoid displaying broken text." msgstr "" +"Surchargez cette méthode pour modifier les propriétés de [code]char_fx[/" +"code]. Cette méthode doit retourner [code]true[/code] si le caractère peut " +"être transformé avec succès. Si la méthode retourne [code]false[/code], " +"l'effet sera ignoré pour éviter de mal afficher le texte." #: doc/classes/RichTextLabel.xml msgid "Label that displays rich text." @@ -54240,6 +55903,29 @@ msgid "" "emoji) are [i]not[/i] supported on Windows. They will display as unknown " "characters instead. This will be resolved in Godot 4.0." msgstr "" +"Les textes riches peuvent contenir des textes personnalisées, des polices, " +"des images et une mise en page basique. Le label gère ce contenu dans une " +"pile interne de marqueurs. Il peut aussi s'adapter à la taille donnée.\n" +"[b]Note :[/b] Les assignations à [member bbcode_text] efface la pile des " +"marqueurs et la reconstruit à partir du contenu de cette propriété. Chaque " +"modification fait à [member bbcode_text] effacera les modifications " +"précédents faites depuis une autre source manuelle comme [method " +"append_bbcode] et les méthodes [code]push_*[/code] / [method pop].\n" +"[b]Note :[/b] RichTextLabel ne supporte pas les marqueurs intriqués. par " +"exemple, au lieu d'utiliser [code][b]bold[i]bold italic[/b]italic[/i][/" +"code], utilisez [code][b]bold[i]bold italic[/i][/b][i]italic[/i][/code].\n" +"[b]Note :[/b] Les méthodes [code]push_*/pop[/code] ne modifie pas le " +"BBCode.\n" +"[b]Note :[/b] Contrairement à [Label], RichTextLabel n'a pas de " +"[i]propriété[/i] pour aligner le texte horizontalement au center. Utilisez " +"plutôt [member bbcode_enabled] et entourez le texte du marqueur [code]" +"[center][/code] comme suit : [code][center]Exemple[/center][/code]. Il n'y a " +"actuellement aucun moyen intégré pour aligner verticalement le texte non " +"plus, mais il est possible de le faire avec les ancres/conteneurs et la " +"propriété [member fit_content_height].\n" +"[b]Note :[/b] Les caractères Unicode après [code]0xffff[/code] (comme les " +"émojis) [i]ne sont pas[/i] supportés sous Windows. Il sera affiché des " +"caractères inconnus à la place. Ça sera corrigé dans Godot 4.0." #: doc/classes/RichTextLabel.xml msgid "BBCode in RichTextLabel" @@ -54256,6 +55942,11 @@ msgid "" "If [code]width[/code] or [code]height[/code] is set to 0, the image size " "will be adjusted in order to keep the original aspect ratio." msgstr "" +"Ajoute le marqueur ouvrant et fermant d'image à la pile des marqueurs, avec " +"la possibilité de spécifier la largeur [code]width[/code] et la hauteur " +"[code]height[/code] pour redimensionner l'image.\n" +"Si [code]width[/code] ou [code]height[/code] est à 0, la taille de l'image " +"sera ajustée pour garder sont aspect original." #: doc/classes/RichTextLabel.xml msgid "Adds raw non-BBCode-parsed text to the tag stack." @@ -54301,6 +55992,8 @@ msgid "" "Returns the total number of characters from text tags. Does not include " "BBCodes." msgstr "" +"Retourne le nombre total de caractères des marqueurs de texte. N'inclus pas " +"les BBCode." #: doc/classes/RichTextLabel.xml msgid "Returns the number of visible lines." @@ -55297,18 +56990,24 @@ msgstr "" #: doc/classes/RigidBody2D.xml msgid "Static mode. The body behaves like a [StaticBody2D] and does not move." msgstr "" +"Le mode statique. Le corps se comporte comme un [StaticBody2D] et ne bouge " +"pas." #: doc/classes/RigidBody2D.xml msgid "" "Character mode. Similar to [constant MODE_RIGID], but the body can not " "rotate." msgstr "" +"Le mode caractère. Similaire à [constant MODE_RIGID], mais le corps ne peut " +"pas pivoter." #: doc/classes/RigidBody2D.xml msgid "" "Kinematic mode. The body behaves like a [KinematicBody2D], and must be moved " "by code." msgstr "" +"Le mode cinématique. Le corps se comporte comme un [KinematicBody2D], et " +"doit être déplacé par le code." #: doc/classes/RigidBody2D.xml msgid "" @@ -55729,6 +57428,8 @@ msgstr "" msgid "" "Returns the list of bound parameters for the signal at [code]idx[/code]." msgstr "" +"Retourne la liste des paramètres spécifiés pour le signal à la position " +"[code]idx[/code]." #: doc/classes/SceneState.xml msgid "" @@ -55743,6 +57444,8 @@ msgid "" "Returns the connection flags for the signal at [code]idx[/code]. See [enum " "Object.ConnectFlags] constants." msgstr "" +"Retourne les drapeaux de connexion pour le signal à la position [code]idx[/" +"code]. Voir [enum Object.ConnectFlags] pour les constantes." #: doc/classes/SceneState.xml msgid "Returns the method connected to the signal at [code]idx[/code]." @@ -55836,12 +57539,16 @@ msgid "" "Returns the name of the property at [code]prop_idx[/code] for the node at " "[code]idx[/code]." msgstr "" +"Retourne le nom de la propriété à [code]prop_idx[/code] pour le nÅ“ud à " +"[code]idx[/code]." #: doc/classes/SceneState.xml msgid "" "Returns the value of the property at [code]prop_idx[/code] for the node at " "[code]idx[/code]." msgstr "" +"Retourne le valeur de la propriété à [code]prop_idx[/code] pour le nÅ“ud à " +"[code]idx[/code]." #: doc/classes/SceneState.xml msgid "Returns the type of the node at [code]idx[/code]." @@ -55974,19 +57681,23 @@ msgstr "" #: doc/classes/SceneTree.xml msgid "Creates and returns a new [SceneTreeTween]." -msgstr "" +msgstr "Crée et retourne un nouvel [SceneTreeTween]." #: doc/classes/SceneTree.xml msgid "" "Returns the current frame number, i.e. the total frame count since the " "application started." msgstr "" +"Retourne le numéro de la trame actuelle, c'est-à -dire le nombre de trames " +"depuis le lancement de l'application." #: doc/classes/SceneTree.xml msgid "" "Returns the peer IDs of all connected peers of this [SceneTree]'s [member " "network_peer]." msgstr "" +"Retourne les identifiants de tous les pairs connectés au [member " +"network_peer] de ce [SceneTree]." #: doc/classes/SceneTree.xml msgid "Returns the unique peer ID of this [SceneTree]'s [member network_peer]." @@ -56030,6 +57741,8 @@ msgid "" "Returns [code]true[/code] if this [SceneTree]'s [member network_peer] is in " "server mode (listening for connections)." msgstr "" +"Retourne [code]true[/code] si ce [member network_peer] du [SceneTree] est en " +"mode serveur (attend les connexions)." #: doc/classes/SceneTree.xml msgid "Sends the given notification to all members of the [code]group[/code]." @@ -56085,6 +57798,8 @@ msgid "" "Sets the given [code]property[/code] to [code]value[/code] on all members of " "the given group." msgstr "" +"Définit la propriété [code]property[/code] spécifiée à la valeur " +"[code]value[/code] pour tous les membres du groupe donné." #: doc/classes/SceneTree.xml msgid "" @@ -56235,6 +57950,8 @@ msgid "" "Emitted immediately before [method Node._process] is called on every node in " "the [SceneTree]." msgstr "" +"Émis immédiatement avant que [method Node._process] soit appelé sur chaque " +"nÅ“ud de [SceneTree]." #: doc/classes/SceneTree.xml msgid "" @@ -56293,6 +58010,8 @@ msgid "" "Emitted whenever this [SceneTree]'s [member network_peer] disconnected from " "server. Only emitted on clients." msgstr "" +"Émis quand ce [member network_peer] du [SceneTree] se déconnecte du serveur. " +"Seulement émis vers les clients." #: doc/classes/SceneTree.xml msgid "" @@ -56310,7 +58029,7 @@ msgstr "Appelle un groupe dans l'ordre inversé de la scène." #: doc/classes/SceneTree.xml msgid "Call a group immediately (calls are normally made on idle)." -msgstr "" +msgstr "Appelle un groupe immédiatement (au lieu de le faire durant le repos)." #: doc/classes/SceneTree.xml msgid "Call a group only once even if the call is executed many times." @@ -56330,6 +58049,8 @@ msgid "" "Keep the specified display resolution. No interpolation. Content may appear " "pixelated." msgstr "" +"Garde la résolution d'affichage spécifié, sans interpolation. Le contenu " +"peut apparaitre pixelisé." #: doc/classes/SceneTree.xml msgid "" @@ -56578,7 +58299,7 @@ msgstr "" #: doc/classes/SceneTreeTween.xml msgid "Resumes a paused or stopped [SceneTreeTween]." -msgstr "" +msgstr "Reprend un [SceneTreeTween] en pause ou arrêté." #: doc/classes/SceneTreeTween.xml msgid "" @@ -56607,6 +58328,8 @@ msgid "" "If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " "this method will by default run simultaneously, as opposed to sequentially." msgstr "" +"Si [code]parallel[/code] est [code]true[/code], le [Tweener] ajouté après " +"cette méthode se lancera simultanément, et non séquentiellement." #: doc/classes/SceneTreeTween.xml msgid "" @@ -57099,6 +58822,9 @@ msgid "" "immediately and returns [constant ERR_BUSY]. If non-zero, it returns " "[constant OK] to report success." msgstr "" +"Comme [method wait], mais ne bloque pas, donc si la valeur est zéro, ça " +"échoue immédiatement et retourne [constant ERR_BUSY]. Si non zéro, ça " +"retourne [constant OK] pour signaler un succès." #: doc/classes/Semaphore.xml msgid "" @@ -57188,6 +58914,8 @@ msgid "" "Mode used to calculate particle information on a per-particle basis. Not " "used for drawing." msgstr "" +"Le mode utilisé pour calculer les informations pour chaque particule " +"individuellement. N'est pas utilisé pour l'affichage." #: doc/classes/ShaderMaterial.xml msgid "A material that uses a custom [Shader] program." @@ -57266,6 +58994,8 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "Base class for all 2D shapes. All 2D shape types inherit from this." msgstr "" +"La classe de base pour toutes les formes 2D. Tous les types de forme 2D " +"héritent de cette classe." #: doc/classes/Shape2D.xml msgid "" @@ -57278,8 +59008,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -57300,8 +59037,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " @@ -57483,6 +59228,7 @@ msgid "" "Returns the number of [Bone2D] nodes in the node hierarchy parented by " "Skeleton2D." msgstr "" +"Retourne le nombre de nÅ“uds [Bone2D] dans la hiérarchie de ce Skeleton2D." #: doc/classes/Skeleton2D.xml msgid "Returns the [RID] of a Skeleton2D instance." @@ -57858,7 +59604,7 @@ msgstr "La masse du SoftBody." #: doc/classes/Spatial.xml msgid "Most basic 3D game object, parent of all 3D-related nodes." -msgstr "" +msgstr "L'objet 3D de jeu le plus basique, parent de tous les nÅ“uds 3D." #: doc/classes/Spatial.xml msgid "" @@ -57919,6 +59665,8 @@ msgid "" "Scales the global (world) transformation by the given [Vector3] scale " "factors." msgstr "" +"Met à l'échelle la transformation globale par le [Vector3] de facteur " +"d'échelle." #: doc/classes/Spatial.xml msgid "" @@ -58072,12 +59820,16 @@ msgid "" "Transforms [code]local_point[/code] from this node's local space to world " "space." msgstr "" +"Transforme le point [code]local_point[/code] depuis les coordonnées locale " +"de ce nÅ“ud dans l'espace global." #: doc/classes/Spatial.xml msgid "" "Transforms [code]global_point[/code] from world space to this node's local " "space." msgstr "" +"Transforme le point [code]local_point[/code] depuis l'espace global dans les " +"coordonnées local de ce nÅ“ud." #: doc/classes/Spatial.xml msgid "" @@ -58091,7 +59843,7 @@ msgstr "" #: doc/classes/Spatial.xml msgid "" "Changes the node's position by the given offset [Vector3] in local space." -msgstr "" +msgstr "Déplace le nÅ“ud d'un décalage [Vector3] dans les coordonnées locales." #: doc/classes/Spatial.xml msgid "Updates the [SpatialGizmo] of this node." @@ -58133,6 +59885,7 @@ msgstr "" #: doc/classes/Spatial.xml msgid "Local space [Transform] of this node, with respect to the parent node." msgstr "" +"La [Transform] de ce nÅ“ud dans l'espace local, en fonction du nÅ“ud parent." #: doc/classes/Spatial.xml msgid "Local translation of this node." @@ -58261,6 +60014,8 @@ msgid "" "Texture to multiply by [member albedo_color]. Used for basic texturing of " "objects." msgstr "" +"La texture à multiplier par la couleur [member albedo_color]. Utilisé pour " +"l'habillage basique des objets." #: doc/classes/SpatialMaterial.xml msgid "" @@ -58317,6 +60072,8 @@ msgid "" "If [code]true[/code], use [code]UV2[/code] coordinates to look up from the " "[member ao_texture]." msgstr "" +"Si [code]true[/code], utilise les coordonnées [code]UV2[/code] pour la " +"projection de [member ao_texture]." #: doc/classes/SpatialMaterial.xml msgid "" @@ -58522,6 +60279,8 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "Texture that specifies how much surface emits light at a given point." msgstr "" +"La texture qui spécifie quelle quantité de lumière sera émise par la surface " +"à un point donné." #: doc/classes/SpatialMaterial.xml #, fuzzy @@ -58679,7 +60438,7 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "Threshold at which the alpha scissor will discard values." -msgstr "" +msgstr "Le seuil à partir duquel le ciseau alpha ignorera les valeurs." #: doc/classes/SpatialMaterial.xml msgid "" @@ -58730,7 +60489,7 @@ msgstr "Si [code]true[/code], active le drapeau spécifié." #: doc/classes/SpatialMaterial.xml msgid "Grows object vertices in the direction of their normals." -msgstr "" +msgstr "Agrandit les sommets des objets dans la direction de leurs normales." #: doc/classes/SpatialMaterial.xml msgid "Currently unimplemented in Godot." @@ -59106,15 +60865,15 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "The color of the object is added to the background." -msgstr "" +msgstr "La couleur de l'objet est ajoutée à l'arrière-plan." #: doc/classes/SpatialMaterial.xml msgid "The color of the object is subtracted from the background." -msgstr "" +msgstr "La couleur de l'objet est soustraite à l'arrière-plan." #: doc/classes/SpatialMaterial.xml msgid "The color of the object is multiplied by the background." -msgstr "" +msgstr "La couleur de l'objet est multipliée par l'arrière-plan." #: doc/classes/SpatialMaterial.xml msgid "Default depth draw mode. Depth is drawn only for opaque objects." @@ -59173,6 +60932,8 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh." msgstr "" +"Définit [code]ALBEDO[/code] par la couleur définie pour chaque sommet du " +"maillage." #: doc/classes/SpatialMaterial.xml msgid "" @@ -59246,6 +61007,7 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "Forces the shader to convert albedo from sRGB space to linear space." msgstr "" +"Force le shader à convertir l'albedo de l'espace sRGB à celui linéaire." #: doc/classes/SpatialMaterial.xml msgid "Disables receiving shadows from other objects." @@ -59258,6 +61020,8 @@ msgstr "Désactive la réception de la lumière ambiante." #: doc/classes/SpatialMaterial.xml msgid "Ensures that normals appear correct, even with non-uniform scaling." msgstr "" +"S'assure que les normales apparaissent correctement, même pour les " +"proportions non uniformes." #: doc/classes/SpatialMaterial.xml msgid "Enables the shadow to opacity feature." @@ -59313,7 +61077,7 @@ msgstr "L'axe Z de l'objet fera toujours face à la caméra." #: doc/classes/SpatialMaterial.xml msgid "The object's X axis will always face the camera." -msgstr "" +msgstr "L'axe X de l'objet fera toujours face à la caméra." #: doc/classes/SpatialMaterial.xml msgid "" @@ -59325,19 +61089,19 @@ msgstr "" #: doc/classes/SpatialMaterial.xml msgid "Used to read from the red channel of a texture." -msgstr "Utiliser pour lire la texture depuis le canal du rouge." +msgstr "Utilisé pour lire la texture depuis le canal du rouge." #: doc/classes/SpatialMaterial.xml msgid "Used to read from the green channel of a texture." -msgstr "Utiliser pour lire la texture depuis le canal du vert." +msgstr "Utilisé pour lire la texture depuis le canal du vert." #: doc/classes/SpatialMaterial.xml msgid "Used to read from the blue channel of a texture." -msgstr "Utiliser pour lire la texture depuis le canal du bleu." +msgstr "Utilisé pour lire la texture depuis le canal du bleu." #: doc/classes/SpatialMaterial.xml msgid "Used to read from the alpha channel of a texture." -msgstr "Utiliser pour lire la texture depuis le canal de l'alpha." +msgstr "Utilisé pour lire la texture depuis le canal de l'alpha." #: doc/classes/SpatialMaterial.xml msgid "Adds the emission color to the color from the emission texture." @@ -59560,7 +61324,7 @@ msgstr "" #: doc/classes/SpotLight.xml msgid "A spotlight, such as a reflector spotlight or a lantern." -msgstr "" +msgstr "Un projecteur, comme un projecteur de spectacle ou un lanterne." #: doc/classes/SpotLight.xml msgid "" @@ -59741,10 +61505,12 @@ msgid "" "If [code]true[/code], texture is cut from a larger atlas texture. See " "[member region_rect]." msgstr "" +"Si [code]true[/code], la texture est une partie d'une plus grande texture " +"atlas. Voir [member region_rect]." #: doc/classes/Sprite.xml msgid "If [code]true[/code], the outermost pixels get blurred out." -msgstr "" +msgstr "Si [code]true[/code], les pixels les plus à l'extérieur sont floutés." #: doc/classes/Sprite.xml doc/classes/Sprite3D.xml msgid "" @@ -59786,6 +61552,8 @@ msgid "" "If [code]true[/code], texture will be cut from a larger atlas texture. See " "[member region_rect]." msgstr "" +"Si [code]true[/code], la texture sera récupéré d'une plus grande texture " +"atlas. Voir [member region_rect]." #: doc/classes/Sprite3D.xml msgid "" @@ -59849,7 +61617,7 @@ msgstr "" #: doc/classes/SpriteBase3D.xml msgid "The size of one pixel's width on the sprite to scale it in 3D." -msgstr "" +msgstr "La taille d'un des pixels de la sprite pour définir sa taille en 3D." #: doc/classes/SpriteBase3D.xml #, fuzzy @@ -60042,7 +61810,7 @@ msgstr "" #: doc/classes/StreamPeer.xml msgid "Abstraction and base class for stream-based protocols." -msgstr "" +msgstr "Classe abstraite pour la base des protocoles de flux." #: doc/classes/StreamPeer.xml msgid "" @@ -60956,6 +62724,8 @@ msgid "" "Returns a copy of the string with special characters escaped using the JSON " "standard." msgstr "" +"Retourne une copie de cette chaine de caractères avec les caractères " +"spéciaux échappés selon le standard JSON." #: doc/classes/String.xml msgid "Returns a number of characters from the left of the string." @@ -61197,6 +62967,16 @@ msgid "" "print(\"ABC123\".similarity(\"abc123\")) # Prints \"0.4\"\n" "[/codeblock]" msgstr "" +"Retourne l'indice de similarité ([url=https://fr.wikipedia.org/wiki/" +"Indice_de_S%C3%B8rensen-Dice]Sorensen-Dice[/url]) de cette chaine de " +"caractères par rapport à une autre. Un résultat de 1.0 signifie qu'elles " +"sont identiques, alors que 0.0 qu'elles sont complètement différentes.\n" +"[codeblock]\n" +"print(\"ABC123\".similarity(\"ABC123\")) # Affiche \"1\"\n" +"print(\"ABC123\".similarity(\"XYZ456\")) # Affiche \"0\"\n" +"print(\"ABC123\".similarity(\"123ABC\")) # Affiche \"0.8\"\n" +"print(\"ABC123\".similarity(\"abc123\")) # Affiche \"0.4\"\n" +"[/codeblock]" #: doc/classes/String.xml msgid "Returns a simplified canonical path." @@ -61255,18 +63035,16 @@ msgid "" msgstr "" #: doc/classes/String.xml -#, fuzzy msgid "" "Converts the String (which is a character array) to [PoolByteArray] (which " "is an array of bytes). The conversion is faster compared to [method " "to_utf8], as this method assumes that all the characters in the String are " "ASCII characters." msgstr "" -"Convertit la chaîne de caractères (qui est un array (tableau) de caractères) " -"en un [PackedByteArray] (qui est un array de bytes). La conversion est un " -"plus lente que [method to_ascii], mais est compatible avec tous les " -"caractères UTF-8. Par conséquent, il est préférable d'utiliser cette " -"fonction à la place [method to_ascii]." +"Convertit la chaîne de caractères (qui est un tableau de caractères) en un " +"[PoolByteArray] (un tableau de octets). La conversion est un plus rapide que " +"[method to_utf8], car elle assume que tous les caractères de la String sont " +"des caractères ASCII." #: doc/classes/String.xml msgid "" @@ -61302,18 +63080,16 @@ msgid "Returns the string converted to uppercase." msgstr "Retourne la chaîne de caractères convertie en majuscules." #: doc/classes/String.xml -#, fuzzy msgid "" "Converts the String (which is an array of characters) to [PoolByteArray] " "(which is an array of bytes). The conversion is a bit slower than [method " "to_ascii], but supports all UTF-8 characters. Therefore, you should prefer " "this function over [method to_ascii]." msgstr "" -"Convertit la chaîne de caractères (qui est un array (tableau) de caractères) " -"en un [PackedByteArray] (qui est un array de bytes). La conversion est un " -"plus lente que [method to_ascii], mais est compatible avec tous les " -"caractères UTF-8. Par conséquent, il est préférable d'utiliser cette " -"fonction à la place [method to_ascii]." +"Convertit la chaîne de caractères (qui est un tableau de caractères) en un " +"[PoolByteArray] (un tableau d'octets). La conversion est un plus lente que " +"[method to_ascii], mais supporte tous les caractères UTF-8. Par conséquent, " +"il est préférable d'utiliser cette fonction à la place [method to_ascii]." #: doc/classes/String.xml msgid "" @@ -61483,6 +63259,8 @@ msgstr "Stylebox vide (n'affiche vraiment rien)." msgid "" "Customizable [StyleBox] with a given set of parameters (no texture required)." msgstr "" +"Une [StyleBox] personnalisable avec un ensemble de paramètres (où aucune " +"texture n'est obligatoire)." #: doc/classes/StyleBoxFlat.xml msgid "" @@ -61516,7 +63294,7 @@ msgstr "" #: doc/classes/StyleBoxFlat.xml msgid "Returns the smallest border width out of all four borders." -msgstr "" +msgstr "Retourne la plus fine bordure parmi les quatre bordures." #: doc/classes/StyleBoxFlat.xml msgid "" @@ -61566,6 +63344,9 @@ msgid "" "[code]radius_top_right[/code], [code]radius_bottom_right[/code], and " "[code]radius_bottom_left[/code] pixels." msgstr "" +"Définit le rayon de chacun des coins [code]radius_top_left[/code], " +"[code]radius_top_right[/code], [code]radius_bottom_right[/code], et " +"[code]radius_bottom_left[/code] en pixels." #: doc/classes/StyleBoxFlat.xml doc/classes/StyleBoxTexture.xml msgid "" @@ -61578,6 +63359,7 @@ msgstr "" #: doc/classes/StyleBoxFlat.xml doc/classes/StyleBoxTexture.xml msgid "Sets the expand margin to [code]size[/code] pixels for all margins." msgstr "" +"Définit la marge étendue à [code]size[/code] pixels pour toutes les marges." #: doc/classes/StyleBoxFlat.xml doc/classes/StyleBoxTexture.xml msgid "" @@ -61585,6 +63367,9 @@ msgid "" "[code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] " "pixels." msgstr "" +"Définit la marge d'expansion pour chacune des marges [code]size_left[/code], " +"[code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] " +"en pixels." #: doc/classes/StyleBoxFlat.xml msgid "" @@ -61612,6 +63397,8 @@ msgstr "La couleur d'arrière-plan de la stylebox." #: doc/classes/StyleBoxFlat.xml msgid "If [code]true[/code], the border will fade into the background color." msgstr "" +"Si [code]true[/code], la bordure fusionnera avec la couleur de l'arrière-" +"plan." #: doc/classes/StyleBoxFlat.xml msgid "Sets the color of the border." @@ -61793,6 +63580,8 @@ msgid "" "If [code]true[/code], the line will be vertical. If [code]false[/code], the " "line will be horizontal." msgstr "" +"Si [code]true[/code], la ligne sera verticale. Si [code]false[/code], elle " +"sera horizontale." #: doc/classes/StyleBoxTexture.xml msgid "Texture-based nine-patch [StyleBox]." @@ -62081,7 +63870,7 @@ msgstr "" #: doc/classes/SurfaceTool.xml msgid "Clear all information passed into the surface tool so far." -msgstr "" +msgstr "Efface toutes les informations passées à l'outil de surface jusque là ." #: doc/classes/SurfaceTool.xml msgid "" @@ -62177,7 +63966,7 @@ msgstr "Retourne l'index de l'onglet précédemment actif." #: doc/classes/TabContainer.xml msgid "Returns the [Control] node from the tab at index [code]tab_idx[/code]." -msgstr "" +msgstr "Retourne le nÅ“ud [Control] de l'onglet à l'index [code]tab_idx[/code]." #: doc/classes/TabContainer.xml doc/classes/Tabs.xml msgid "Returns the number of tabs." @@ -62313,6 +64102,8 @@ msgid "" "Emitted when the [TabContainer]'s [Popup] button is clicked. See [method " "set_popup] for details." msgstr "" +"Émis quand le bouton [Popup] du [TabContainer] est cliqué. Voir [method " +"set_popup] pour les détails." #: doc/classes/TabContainer.xml doc/classes/Tabs.xml msgid "Emitted when switching to another tab." @@ -62445,6 +64236,7 @@ msgstr "" #: doc/classes/Tabs.xml msgid "Returns [code]true[/code] if select with right mouse button is enabled." msgstr "" +"Retourne [code]true[/code] si la sélection avec le clic-droit est actif." #: doc/classes/Tabs.xml msgid "Returns the number of hidden tabs offsetted to the left." @@ -62455,9 +64247,8 @@ msgid "Returns tab [Rect2] with local position and size." msgstr "Retourne l'onglet [Rect2] avec la position et la taille locales." #: doc/classes/Tabs.xml -#, fuzzy msgid "Returns the title of the tab at index [code]tab_idx[/code]." -msgstr "Retourne le type du nÅ“ud à [code]idx[/code]." +msgstr "Retourne le titre de l'onglet à la position [code]idx[/code]." #: doc/classes/Tabs.xml msgid "Returns the [Tabs]' rearrange group ID." @@ -62525,6 +64316,8 @@ msgid "" "Emitted when the active tab is rearranged via mouse drag. See [member " "drag_to_rearrange_enabled]." msgstr "" +"Émis quand l'onglet actif est réarrangé en glissant la souris. Voir [member " +"drag_to_rearrange_enabled]." #: doc/classes/Tabs.xml msgid "Emitted when a tab is right-clicked." @@ -62949,6 +64742,9 @@ msgid "" "Select all the text.\n" "If [member selecting_enabled] is [code]false[/code], no selection will occur." msgstr "" +"Sélectionne tout le texte.\n" +"Si [member selecting_enabled] est [code]false[/code], aucun sélection ne se " +"fera." #: doc/classes/TextEdit.xml msgid "Sets the text for a specific line." @@ -63069,6 +64865,8 @@ msgid "" "If [code]true[/code], a minimap is shown, providing an outline of your " "source code." msgstr "" +"Si [code]true[/code], une mini-carte sera affichée, fournissant un aperçu de " +"votre code source." #: doc/classes/TextEdit.xml msgid "The width, in pixels, of the minimap." @@ -63079,6 +64877,8 @@ msgid "" "If [code]true[/code], custom [code]font_color_selected[/code] will be used " "for selected text." msgstr "" +"Si [code]true[/code], la couleur [code]font_color_selected[/code] " +"personnalisée sera utilisée pour le texte sélectionné." #: doc/classes/TextEdit.xml msgid "" @@ -63150,6 +64950,7 @@ msgstr "" #: doc/classes/TextEdit.xml msgid "Emitted when a breakpoint is placed via the breakpoint gutter." msgstr "" +"Émis quand un point d'arrêt est ajouté dans le bandeau des points d'arrêt." #: doc/classes/TextEdit.xml msgid "Emitted when the cursor changes." @@ -63254,6 +65055,8 @@ msgid "" "Sets the highlight [Color] of multiple occurrences. [member " "highlight_all_occurrences] has to be enabled." msgstr "" +"Définir la [Color] de surlignage des multiples occurrences. [member " +"highlight_all_occurrences] doit être actif." #: doc/classes/TextEdit.xml msgid "Sets the spacing between the lines." @@ -63417,7 +65220,7 @@ msgstr "" #: doc/classes/TextureArray.xml msgid "Array of textures stored in a single primitive." -msgstr "" +msgstr "Un tableau de textures enregistré dans une seule ressource." #: doc/classes/TextureArray.xml msgid "" @@ -64505,6 +66308,7 @@ msgstr "" #: doc/classes/TileMap.xml msgid "Returns a rectangle enclosing the used (non-empty) tiles of the map." msgstr "" +"Retourne un rectangle englobant les tuiles utilisées (non vides) de la carte." #: doc/classes/TileMap.xml msgid "" @@ -64517,10 +66321,14 @@ msgstr "" #: doc/classes/TileMap.xml msgid "Returns [code]true[/code] if the given cell is flipped in the X axis." msgstr "" +"Retourne [code]true[/code] si la cellule spécifiée est inversée selon l'axe " +"X." #: doc/classes/TileMap.xml msgid "Returns [code]true[/code] if the given cell is flipped in the Y axis." msgstr "" +"Retourne [code]true[/code] si la cellule spécifiée est inversée selon l'axe " +"Y." #: doc/classes/TileMap.xml msgid "" @@ -64616,7 +66424,7 @@ msgstr "Si [code]true[/code], les UV de la cellule seront limités." #: doc/classes/TileMap.xml msgid "The custom [Transform2D] to be applied to the TileMap's cells." -msgstr "" +msgstr "La [Transform2D] personnalisée appliquée aux cellules de la TileMap." #: doc/classes/TileMap.xml msgid "" @@ -64722,6 +66530,8 @@ msgstr "" #: doc/classes/TileMap.xml msgid "The TileMap orientation mode. See [enum Mode] for possible values." msgstr "" +"Le mode d'orientation de la TileMap. Voir [enum Mode] pour les valeurs " +"possibles." #: doc/classes/TileMap.xml msgid "" @@ -65000,7 +66810,7 @@ msgstr "Retourne la texture normale de la carte de la tuile." #: doc/classes/TileSet.xml msgid "Returns the offset of the tile's light occluder." -msgstr "" +msgstr "Retourne le décalage de l'occulteur de lumière de la tuile." #: doc/classes/TileSet.xml msgid "Returns the tile sub-region in the texture." @@ -65059,7 +66869,7 @@ msgstr "Retourne l'index selon Z (le claque d'affichage) de la tuile." #: doc/classes/TileSet.xml msgid "Sets a light occluder for the tile." -msgstr "" +msgstr "Définit l'occulteur de lumière pour la tuile." #: doc/classes/TileSet.xml msgid "Sets the tile's material." @@ -65084,7 +66894,7 @@ msgstr "Définit le polygone de navigation de la tuile." #: doc/classes/TileSet.xml msgid "Sets an offset for the tile's navigation polygon." -msgstr "" +msgstr "Définit le décalage du polygone de navigation de la tuile." #: doc/classes/TileSet.xml msgid "" @@ -65097,7 +66907,7 @@ msgstr "" #: doc/classes/TileSet.xml msgid "Sets an offset for the tile's light occluder." -msgstr "" +msgstr "Définit le décalage de l'occulteur de lumière de la tuile." #: doc/classes/TileSet.xml msgid "" @@ -65122,7 +66932,7 @@ msgstr "Définit la [Transform2D] de la forme de la tuile." #: doc/classes/TileSet.xml msgid "Sets an array of shapes for the tile, enabling collision." -msgstr "" +msgstr "Définit une liste de formes pour la tuile, activant les collisions." #: doc/classes/TileSet.xml msgid "Sets the tile's texture." @@ -65723,6 +67533,8 @@ msgid "" "Constructs a Transform from a [Quat]. The origin will be [code]Vector3(0, 0, " "0)[/code]." msgstr "" +"Construit une Transform à partir d'un [Quat]. L'origine sera " +"[code]Vector3(0, 0, 0)[/code]." #: doc/classes/Transform.xml msgid "" @@ -65779,14 +67591,14 @@ msgstr "" "d’axe normalisé (échelle de 1 ou -1)." #: doc/classes/Transform.xml -#, fuzzy msgid "" "Returns a copy of the transform rotated around the given [code]axis[/code] " "by the given [code]angle[/code] (in radians), using matrix multiplication. " "The [code]axis[/code] must be a normalized vector." msgstr "" -"Pivote ce vecteur autour de l'axe donné par [code]phi[/code] radians. L'axe " -"donné doit être normalisé." +"Retourne une copie de la transformation pivotée autour de l'axe [code]axis[/" +"code] donné de [code]angle[/code] radians, en utilisant la multiplication de " +"matrice. L'axe [code]axis[/code] doit être normalisé." #: doc/classes/Transform.xml #, fuzzy @@ -65822,6 +67634,12 @@ msgid "" "affine transformations (e.g. with scaling) see [method affine_inverse] " "method." msgstr "" +"La transformation inverse du [Vector3], [Plane], [AABB], ou " +"[PoolVector3Array] spécifié, en assumant que la transformation est composée " +"de rotation et translation (aucune mise à l'échelle). Équivalent à appeler " +"[code]inverse().xform(v)[/code] sur cette transformation. Pour les " +"transformations affines (c'est-à -dire avec mise à l'échelle), voir la " +"méthode [method affine_inverse]." #: doc/classes/Transform.xml msgid "" @@ -66213,6 +68031,8 @@ msgstr "Retourne l'index du dernier bouton pressé." msgid "" "Returns the tree's root item, or [code]null[/code] if the tree is empty." msgstr "" +"Retourne l'élément racine de l'arborescence, ou [code]null[/code] si " +"l'arborescence est vide." #: doc/classes/Tree.xml msgid "Returns the current scrolling position." @@ -66312,6 +68132,8 @@ msgid "" "Emitted when a button on the tree was pressed (see [method TreeItem." "add_button])." msgstr "" +"Émis quand le bouton de l'arborescence a été pressé (voir [method TreeItem." +"add_button])." #: doc/classes/Tree.xml msgid "Emitted when a cell is selected." @@ -66349,6 +68171,7 @@ msgstr "Émis quand la label d'un élément est double-cliqué." #: doc/classes/Tree.xml msgid "Emitted when an item is collapsed by a click on the folding arrow." msgstr "" +"Émis quand un élément est réduit via un clic sur le flèche de réduction." #: doc/classes/Tree.xml msgid "" @@ -66387,7 +68210,7 @@ msgstr "" #: doc/classes/Tree.xml msgid "Emitted when a left mouse button click does not select any item." -msgstr "" +msgstr "Émis quand un clic-gauche n'a sélectionné aucun élément." #: doc/classes/Tree.xml msgid "" @@ -66580,7 +68403,7 @@ msgstr "Le [StyleBox] utilisé pour le curseur, quand le [Tree] a le focus." #: doc/classes/Tree.xml msgid "[StyleBox] used for the cursor, when the [Tree] is not being focused." msgstr "" -"Le [StyleBox] utilisé pour le curseur, quand le [Tree] n'a pas le focus." +"La [StyleBox] utilisée pour le curseur, quand le [Tree] n'a pas le focus." #: doc/classes/Tree.xml msgid "" @@ -66616,7 +68439,7 @@ msgstr "" msgid "" "[StyleBox] for the selected items, used when the [Tree] is being focused." msgstr "" -"La [StyleBox] pour les éléments sélectionnés, quand le [Tree] est en focus." +"La [StyleBox] pour les éléments sélectionnés, quand le [Tree] a le focus." #: doc/classes/Tree.xml msgid "[StyleBox] used when the title button is being hovered." @@ -66775,6 +68598,10 @@ msgid "" "visible element in the tree when called on the last visible element, " "otherwise it returns [code]null[/code]." msgstr "" +"Retourne le TreeItem suivant visible dans l'arborescence ou null si aucun.\n" +"Si [code]wrap[/code] est activé, la méthode repartira depuis le premier " +"élément visible de l'arborescence si elle est appelé sur le dernier élément, " +"sinon elle retournera [code]null[/code]." #: doc/classes/TreeItem.xml msgid "Returns the parent TreeItem or a null object if there is none." @@ -66795,6 +68622,11 @@ msgid "" "visible element in the tree when called on the first visible element, " "otherwise it returns [code]null[/code]." msgstr "" +"Retourne le TreeItem précédent visible dans l'arborescence ou null si " +"aucun.\n" +"Si [code]wrap[/code] est activé, la méthode repartira depuis le dernier " +"élément visible de l'arborescence si elle est appelé sur le premier élément, " +"sinon elle retournera [code]null[/code]." #: doc/classes/TreeItem.xml msgid "Returns the value of a [constant CELL_MODE_RANGE] column." @@ -67331,6 +69163,8 @@ msgstr "" msgid "" "The animation is interpolated with elasticity, wiggling around the edges." msgstr "" +"L'animation est interpolée avec un effet élastique, se balançant aux niveaux " +"des bornes." #: doc/classes/Tween.xml msgid "" @@ -67451,6 +69285,60 @@ msgid "" " connected = true\n" "[/codeblock]" msgstr "" +"Un simple serveur qui ouvre un port UDP et retourne les [PacketPeerUDP] " +"connecté pour recevoir de nouveaux paquets. Voir aussi [method PacketPeerUDP." +"connect_to_host].\n" +"Après avoir lancé le serveur (avec [method listen]), vous devez appeler " +"[method poll] régulièrement (ex. à l'intérieur de [method Node._process]) " +"pour qu'il traite les nouveaux paquets, les envoyer aux [PacketPeerUDP] " +"appropriés, ou recevoir de nouvelles connexions.\n" +"Voici une petit exemple sur la façon de l'utiliser :\n" +"[codeblock]\n" +"# server.gd\n" +"extends Node\n" +"\n" +"var server := UDPServer.new()\n" +"var peers = []\n" +"\n" +"func _ready():\n" +" server.listen(4242)\n" +"\n" +"func _process(delta):\n" +" server.poll() # Important !\n" +" if server.is_connection_available():\n" +" var peer : PacketPeerUDP = server.take_connection()\n" +" var pkt = peer.get_packet()\n" +" print(\"Pair accepté : %s:%s\" % [peer.get_packet_ip(), peer." +"get_packet_port()])\n" +" print(\"Données reçues: %s\" % [pkt.get_string_from_utf8()])\n" +" # Répondre pour qu'il sache qu'on a bien reçu le message.\n" +" peer.put_packet(pkt)\n" +" # Garder une référence pour qu'on puisse continuer de contacter le " +"pair distant.\n" +" peers.append(peer)\n" +"\n" +" for i in range(0, peers.size()):\n" +" pass # Faire quelque chose avec les pairs connectés.\n" +"\n" +"[/codeblock]\n" +"[codeblock]\n" +"# client.gd\n" +"extends Node\n" +"\n" +"var udp := PacketPeerUDP.new()\n" +"var connected = false\n" +"\n" +"func _ready():\n" +" udp.connect_to_host(\"127.0.0.1\", 4242)\n" +"\n" +"func _process(delta):\n" +" if !connected:\n" +" # Essai pour contacter le serveur\n" +" udp.put_packet(\"La réponse est... 42 !\".to_utf8())\n" +" if udp.get_available_packet_count() > 0:\n" +" print(\"Connecté : %s\" % udp.get_packet().get_string_from_utf8())\n" +" connected = true\n" +"[/codeblock]" #: doc/classes/UDPServer.xml msgid "" @@ -67464,6 +69352,7 @@ msgstr "" msgid "" "Returns [code]true[/code] if the socket is open and listening on a port." msgstr "" +"Retourne [code]true[/code] si le socket est ouvert et écoute à un port." #: doc/classes/UDPServer.xml msgid "" @@ -67488,6 +69377,9 @@ msgid "" "[PacketPeerUDP] accepted via [method take_connection] (remote peers will not " "be notified)." msgstr "" +"Arrête le serveur, fermant le socket UDP si ouvert. Fermera toutes les " +"connexions [PacketPeerUDP] acceptées avec [method take_connection] (les " +"pairs distantes ne seront pas notifiés)." #: doc/classes/UDPServer.xml msgid "" @@ -67707,6 +69599,60 @@ msgid "" " thread.wait_to_finish()\n" "[/codeblock]" msgstr "" +"Fournis un fonctionnalité UPNP pour découvrir des appareils [UPNPDevice] sur " +"le réseau local et lancer des commandes sur eux, comme la gestion des ports " +"(port forwarding) et requêter les adresses IP locales et distantes. À noter " +"que les méthodes de cette classe sont synchrones et bloquent le fil " +"d'exécution que les appelle.\n" +"Pour le forward d'un port :\n" +"[codeblock]\n" +"const PORT = 7777\n" +"var upnp = UPNP.new()\n" +"upnp.discover(2000, 2, \"InternetGatewayDevice\")\n" +"upnp.add_port_mapping(port)\n" +"[/codeblock]\n" +"Pour fermer le port spécifié (ex. après avoir fini de l'utiliser) :\n" +"[codeblock]\n" +"upnp.delete_port_mapping(port)\n" +"[/codeblock]\n" +"[b]Note :[/b] la découverte UPnP bloque le fil d'exécution que l'appelle. " +"Pour ne pas bloquer le fil d'exécution principal, utilisez les [Thread] " +"comme ceci :\n" +"[codeblock]\n" +"# Émis quand la configuration d'un port UPnP est fini (peu importe si c'est " +"un succès ou un échec).\n" +"signal upnp_completed(error)\n" +"\n" +"# Remplacer ceci avec le port de votre serveur compris entre 1025 et 65535.\n" +"const SERVER_PORT = 3928\n" +"var thread = null\n" +"\n" +"func _upnp_setup(server_port):\n" +" # Les requêtes UPNP prennent un peu de temps\n" +" var upnp = UPNP.new()\n" +" var err = upnp.discover()\n" +"\n" +" if err != OK:\n" +" push_error(str(err))\n" +" emit_signal(\"upnp_completed\", err)\n" +" return\n" +"\n" +" if upnp.get_gateway() and upnp.get_gateway().is_valid_gateway():\n" +" upnp.add_port_mapping(server_port, server_port, ProjectSettings." +"get_setting(\"application/config/name\"), \"UDP\")\n" +" upnp.add_port_mapping(server_port, server_port, ProjectSettings." +"get_setting(\"application/config/name\"), \"TCP\")\n" +" emit_signal(\"upnp_completed\", OK)\n" +"\n" +"func _ready():\n" +" thread = Thread.new()\n" +" thread.start(self, \"_upnp_setup\", SERVER_PORT)\n" +"\n" +"func _exit_tree():\n" +" # Attendre ici que le fil d'exécution se termine avant que le jeu ne " +"quitte.\n" +" thread.wait_to_finish()\n" +"[/codeblock]" #: modules/upnp/doc_classes/UPNP.xml msgid "Adds the given [UPNPDevice] to the list of discovered devices." @@ -68233,6 +70179,9 @@ msgid "" "Returns the vector with a maximum length by limiting its length to " "[code]length[/code]." msgstr "" +"Obsolète, veuillez plutôt utiliser [method limit_length].\n" +"Retourne le vecteur avec sa longueur limitée par la valeur maximale " +"[code]length[/code]." #: doc/classes/Vector2.xml msgid "" @@ -68328,6 +70277,8 @@ msgid "" "Returns the vector with a maximum length by limiting its length to " "[code]length[/code]." msgstr "" +"Retourne le vecteur avec sa longueur maximale limitée par la longueur " +"[code]length[/code]." #: doc/classes/Vector2.xml msgid "" @@ -69027,7 +70978,7 @@ msgstr "" #: modules/theora/doc_classes/VideoStreamTheora.xml msgid "Returns the Ogg Theora video file handled by this [VideoStreamTheora]." -msgstr "" +msgstr "Retourne le fichier vidéo Ogg Theora géré par ce [VideoStreamTheora]." #: modules/theora/doc_classes/VideoStreamTheora.xml msgid "" @@ -69117,12 +71068,16 @@ msgid "" "Returns the first valid [World] for this viewport, searching the [member " "world] property of itself and any Viewport ancestor." msgstr "" +"Retourne le premier [World] valide de cette fenêtre d'affichage, en " +"cherchant dans sa propriété [member world] ainsi que celle de ses parents." #: doc/classes/Viewport.xml msgid "" "Returns the first valid [World2D] for this viewport, searching the [member " "world_2d] property of itself and any Viewport ancestor." msgstr "" +"Retourne le premier [World2D] valide de cette fenêtre d'affichage, en " +"cherchant dans sa propriété [member world] ainsi que celle de ses parents." #: doc/classes/Viewport.xml msgid "Returns the active 3D camera." @@ -69445,6 +71400,8 @@ msgid "" "If [code]true[/code], the viewport should render its background as " "transparent." msgstr "" +"Si [code]true[/code], la fenêtre d'affichage doit faire le rendu de " +"l'arrière-plan de manière transparente." #: doc/classes/Viewport.xml msgid "The rendering mode of viewport." @@ -70018,7 +71975,7 @@ msgstr "Ajoute un signal personnalisé avec le nom spécifié au VisualScript." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Add a function with the specified name to the VisualScript." -msgstr "" +msgstr "Ajoute une fonction avec le nom spécifié au VisualScript." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Add a node to a function of the VisualScript." @@ -70088,7 +72045,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns the position of the center of the screen for a given function." -msgstr "" +msgstr "Retourne la position du centre de l'écran pour la fonction donnée." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Returns a node given its id and its function." @@ -70142,7 +72099,7 @@ msgstr "Supprime un signal personnalisé avec le nom donné." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Remove a specific function and its nodes from the script." -msgstr "" +msgstr "Retirer la fonction spécifiée et ses nÅ“uds du script." #: modules/visual_script/doc_classes/VisualScript.xml msgid "Remove a specific node." @@ -70392,6 +72349,8 @@ msgid "" "Return the result of [code]value[/code] decreased by [code]step[/code] * " "[code]amount[/code]." msgstr "" +"Retourne le résultat de la valeur [code]value[/code] moins [code]step[/code] " +"* [code]amount[/code]." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "" @@ -70413,10 +72372,8 @@ msgid "" msgstr "" #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml -#, fuzzy msgid "Return a random floating-point value between the two inputs." -msgstr "" -"Retourne une valeur aléatoire à virgule flottante entre les deux entrées." +msgstr "Retourne un flottant aléatoire compris entre les deux entrées." #: modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml msgid "Set the seed for the random number generator." @@ -70577,7 +72534,6 @@ msgstr "" "disponibles." #: modules/visual_script/doc_classes/VisualScriptComment.xml -#, fuzzy msgid "A Visual Script node used to annotate the script." msgstr "Un nÅ“ud Visual Script utilisé pour annoter le script." @@ -70614,7 +72570,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScriptCondition.xml msgid "A Visual Script node which branches the flow." -msgstr "" +msgstr "Un nÅ“ud Visual Script qui change le flux." #: modules/visual_script/doc_classes/VisualScriptCondition.xml msgid "" @@ -70654,7 +72610,7 @@ msgstr "La valeur de la constante." #: modules/visual_script/doc_classes/VisualScriptConstructor.xml msgid "A Visual Script node which calls a base type constructor." -msgstr "" +msgstr "Un nÅ“ud Visual Script qui appelle le constructeur du type de base." #: modules/visual_script/doc_classes/VisualScriptConstructor.xml msgid "" @@ -70754,7 +72710,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScriptCustomNode.xml msgid "Return whether the custom node has an input [b]sequence[/b] port." -msgstr "" +msgstr "Retourne si le nÅ“ud personnalisé à un port d'entrée [b]sequence[/b]." #: modules/visual_script/doc_classes/VisualScriptCustomNode.xml msgid "" @@ -71299,7 +73255,7 @@ msgstr "Modifier la valeur par défaut du port spécifié." #: modules/visual_script/doc_classes/VisualScriptNode.xml msgid "Emitted when the available input/output ports are changed." -msgstr "" +msgstr "Émis quand les ports entrants/sortants sont changés." #: modules/visual_script/doc_classes/VisualScriptOperator.xml #, fuzzy @@ -71337,6 +73293,7 @@ msgstr "" #: modules/visual_script/doc_classes/VisualScriptPreload.xml msgid "Creates a new [Resource] or loads one from the filesystem." msgstr "" +"Crée une nouvelle [Resource] ou la charge depuis le système de fichiers." #: modules/visual_script/doc_classes/VisualScriptPreload.xml msgid "" @@ -71904,6 +73861,8 @@ msgid "" "Sets the environment used by this camera. Equivalent to [member Camera." "environment]." msgstr "" +"Définit l'environnement utilisé par cette caméra. Équivalent à [member " +"Camera.environment]." #: doc/classes/VisualServer.xml msgid "" @@ -72137,11 +74096,15 @@ msgid "" "Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are " "drawn first)." msgstr "" +"Définit l'index Z du [CanvasItem], c'est sa position d'affichage (les plus " +"faibles index seront affichés avant les autres)." #: doc/classes/VisualServer.xml msgid "" "Attaches the canvas light to the canvas. Removes it from its previous canvas." msgstr "" +"Attache une lumière de canevas à une instance. Retire la lumière " +"précédemment assignée à cette instance." #: doc/classes/VisualServer.xml #, fuzzy @@ -72164,6 +74127,8 @@ msgstr "" msgid "" "Attaches a light occluder to the canvas. Removes it from its previous canvas." msgstr "" +"Attache un occulteur de lumière à une instance. Retire l'occulteur " +"précédemment assigné à cette instance." #: doc/classes/VisualServer.xml #, fuzzy @@ -72398,6 +74363,7 @@ msgstr "Définit l'intensité de la couleur de l'arrière-plan." #: doc/classes/VisualServer.xml msgid "Sets the maximum layer to use if using Canvas background mode." msgstr "" +"Définit le claque maximal à utiliser si l'arrière-plan utilise un canevas." #: doc/classes/VisualServer.xml msgid "" @@ -72498,11 +74464,12 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Returns the id of the test cube. Creates one if none exists." -msgstr "" +msgstr "Retourne l'identifiant du cube de test. En crée un si aucun n'existe." #: doc/classes/VisualServer.xml msgid "Returns the id of the test texture. Creates one if none exists." msgstr "" +"Retourne l'identifiant de la texture de test. En crée une si aucune n'existe." #: doc/classes/VisualServer.xml msgid "" @@ -72522,6 +74489,7 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Returns the id of a white texture. Creates one if none exists." msgstr "" +"Retourn l'identifiant de la texture blanche. En crée une si aucune n'existe." #: doc/classes/VisualServer.xml #, fuzzy @@ -72742,6 +74710,8 @@ msgid "" "Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method " "ImmediateGeometry.end]." msgstr "" +"Termine la création de la [ImmediateGeometry] et l'affiche. Équivalent à " +"[method ImmediateGeometry.end]." #: doc/classes/VisualServer.xml msgid "Returns the material assigned to the [ImmediateGeometry]." @@ -72808,6 +74778,8 @@ msgid "" "Attaches a skeleton to an instance. Removes the previous skeleton from the " "instance." msgstr "" +"Attache un squelette à une instance. Retire le squelette précédemment " +"assigné à cette instance." #: doc/classes/VisualServer.xml #, fuzzy @@ -72861,6 +74833,8 @@ msgid "" "Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for " "more details." msgstr "" +"Définit le drapeau pour un [enum InstanceFlags] spécifié. Voir [enum " +"InstanceFlags] pour plus de détails." #: doc/classes/VisualServer.xml msgid "" @@ -72923,6 +74897,8 @@ msgid "" "Sets the material of a specific surface. Equivalent to [method MeshInstance." "set_surface_material]." msgstr "" +"Définit le matériau de la surface spécifiée. Équivalent à [method " +"MeshInstance.set_surface_material]." #: doc/classes/VisualServer.xml msgid "" @@ -73397,6 +75373,8 @@ msgstr "" msgid "" "Returns the RID of the mesh that will be used in drawing this multimesh." msgstr "" +"Retourne le RID du maillage qui sera utilisé pour l'affichage de ce " +"multimesh." #: doc/classes/VisualServer.xml msgid "Returns the number of visible instances for this multimesh." @@ -73425,6 +75403,8 @@ msgid "" "Sets the color by which this instance will be modulated. Equivalent to " "[method MultiMesh.set_instance_color]." msgstr "" +"Définit la couleur dans laquelle l'instance sera teintée. Équivalent à " +"[method MultiMesh.set_instance_color]." #: doc/classes/VisualServer.xml msgid "" @@ -73467,6 +75447,8 @@ msgid "" "Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh." "mesh]." msgstr "" +"Définit le maillage à utiliser pour le multimesh. Équivalent à [member " +"MultiMesh.mesh]." #: doc/classes/VisualServer.xml msgid "" @@ -73530,6 +75512,8 @@ msgid "" "Returns [code]true[/code] if particles are not emitting and particles are " "set to inactive." msgstr "" +"Retourne [code]true[/code] si les particules ne sont pas émises et qu'elles " +"sont inactives." #: doc/classes/VisualServer.xml msgid "" @@ -73544,6 +75528,8 @@ msgid "" "Reset the particles on the next update. Equivalent to [method Particles." "restart]." msgstr "" +"Réinitialise les particules à la prochaine mise à jour. Équivalent à [method " +"Particles.restart]." #: doc/classes/VisualServer.xml msgid "" @@ -73583,6 +75569,8 @@ msgstr "" msgid "" "Sets the [Transform] that will be used by the particles when they first emit." msgstr "" +"Définit la [Transform] qui sera utilisée par les particules au début de leur " +"émission." #: doc/classes/VisualServer.xml msgid "" @@ -73799,6 +75787,8 @@ msgid "" "Sets the [enum ScenarioDebugMode] for this scenario. See [enum " "ScenarioDebugMode] for options." msgstr "" +"Définit le [enum ScenarioDebugMode] pour ce scénario. Voir [enum " +"ScenarioDebugMode] pour les options." #: doc/classes/VisualServer.xml msgid "Sets the environment that will be used with this scenario." @@ -73900,6 +75890,7 @@ msgstr "Définit le code d'un shader." #: doc/classes/VisualServer.xml msgid "Sets a shader's default texture. Overwrites the texture given by name." msgstr "" +"Définit la texture par défaut du shader. Écrase la texture donnée en nom." #: doc/classes/VisualServer.xml msgid "Allocates the GPU buffers for this skeleton." @@ -74180,6 +76171,8 @@ msgid "" "Returns a viewport's render information. For options, see the [enum " "ViewportRenderInfo] constants." msgstr "" +"Retourne les informations de rendu de la fenêtre d'affichage. Pour les " +"options, voir les constantes de [enum ViewportRenderInfo]." #: doc/classes/VisualServer.xml msgid "Returns the viewport's last rendered frame." @@ -74210,12 +76203,16 @@ msgstr "Définit la transformation du canevas de la fenêtre d'affichage." msgid "" "Sets the clear mode of a viewport. See [enum ViewportClearMode] for options." msgstr "" +"Définit le mode d'effacement de la fenêtre d'affichage. Voir [enum " +"ViewportClearMode] pour les options." #: doc/classes/VisualServer.xml msgid "" "Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for " "options." msgstr "" +"Définit le mode d'affichage de débogage de la fenêtre d'affichage. Voir " +"[enum ViewportDebugDraw] pour les options." #: doc/classes/VisualServer.xml msgid "If [code]true[/code], a viewport's 3D rendering is disabled." @@ -74243,6 +76240,7 @@ msgstr "Si [code]true[/code], l'interpolation fait une boucle." #: doc/classes/VisualServer.xml msgid "If [code]true[/code], the viewport's canvas is not rendered." msgstr "" +"Si [code]true[/code], le canevas de la fenêtre d'affichage n'est pas rendu." #: doc/classes/VisualServer.xml msgid "Currently unimplemented in Godot 3.x." @@ -74473,6 +76471,8 @@ msgid "" "Default flags. [constant TEXTURE_FLAG_MIPMAPS], [constant " "TEXTURE_FLAG_REPEAT] and [constant TEXTURE_FLAG_FILTER] are enabled." msgstr "" +"Le drapeau par défaut. [constant TEXTURE_FLAG_MIPMAPS], [constant " +"TEXTURE_FLAG_REPEAT] et [constant TEXTURE_FLAG_FILTER] sont actifs." #: doc/classes/VisualServer.xml msgid "Shader is a 3D shader." @@ -74710,11 +76710,11 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Use more detail vertically when computing shadow map." -msgstr "" +msgstr "Utilise plus de détails verticalement lors du calcul des ombres." #: doc/classes/VisualServer.xml msgid "Use more detail horizontally when computing shadow map." -msgstr "" +msgstr "Utilise plus de détails horizontalement lors du calcul des ombres." #: doc/classes/VisualServer.xml msgid "Use orthogonal shadow projection for directional light." @@ -74725,10 +76725,14 @@ msgstr "" #: doc/classes/VisualServer.xml msgid "Use 2 splits for shadow projection when using directional light." msgstr "" +"Utilise 2 divisions pour la projection des ombres pour les lumières " +"directionnelles." #: doc/classes/VisualServer.xml msgid "Use 4 splits for shadow projection when using directional light." msgstr "" +"Utilise 4 divisions pour la projection des ombres pour les lumières " +"directionnelles." #: doc/classes/VisualServer.xml msgid "" @@ -74772,6 +76776,8 @@ msgid "" "The viewport is cleared once, then the clear mode is set to [constant " "VIEWPORT_CLEAR_NEVER]." msgstr "" +"La fenêtre d'affichage sera effacée une seule fois, puis passera en mode " +"[constant VIEWPORT_CLEAR_NEVER]." #: doc/classes/VisualServer.xml msgid "Multisample antialiasing is disabled." @@ -74942,14 +76948,14 @@ msgid "" msgstr "" #: doc/classes/VisualServer.xml -#, fuzzy msgid "Allows the instance to be used in baked lighting." -msgstr "" -"Autorise une instance à pouvoir être utilisé pour le baking des lumières." +msgstr "Autorise l'instance à être utilisée pour le baking des lumières." #: doc/classes/VisualServer.xml msgid "When set, manually requests to draw geometry on next frame." msgstr "" +"Quand définit, demande manuellement l'affichage des géométries lors de la " +"trame suivante." #: doc/classes/VisualServer.xml msgid "Represents the size of the [enum InstanceFlags] enum." @@ -75034,15 +77040,15 @@ msgstr "Utiliser le filtre PCF13 pour lisser les ombres des canevas." #: doc/classes/VisualServer.xml msgid "Culling of the canvas occluder is disabled." -msgstr "" +msgstr "Le culling de l'occulteur du canevas est désactivé." #: doc/classes/VisualServer.xml msgid "Culling of the canvas occluder is clockwise." -msgstr "" +msgstr "Le culling de l'occulteur du canevas est dans le sens horaire." #: doc/classes/VisualServer.xml msgid "Culling of the canvas occluder is counterclockwise." -msgstr "" +msgstr "Le culling de l'occulteur du canevas est dans le sens anti-horaire." #: doc/classes/VisualServer.xml msgid "The amount of objects in the frame." @@ -75140,6 +77146,8 @@ msgid "" "Reflection probe will update each frame. This mode is necessary to capture " "moving objects." msgstr "" +"La sonde de réfléchissement sera mise à jour à chaque trame. Ce mode est " +"nécessaire pour capturer les objets se déplaçant." #: doc/classes/VisualServer.xml msgid "Draw particles in the order that they appear in the particles array." @@ -75181,6 +77189,8 @@ msgid "" "Do not clear the background, use whatever was rendered last frame as the " "background." msgstr "" +"Ne pas nettoyer l'arrière-plan, et utilise ce qui a été rendu lors de trame " +"précédente pour l'arrière-plan." #: doc/classes/VisualServer.xml msgid "Represents the size of the [enum EnvironmentBG] enum." @@ -75199,10 +77209,12 @@ msgstr "Utiliser une qualité de flou médium." #: doc/classes/VisualServer.xml msgid "Used highest blur quality. Looks the best, but is the slowest." msgstr "" +"Le meilleur niveau de qualité de flou. Apparait comme le meilleur, mais " +"c'est aussi le plus lent." #: doc/classes/VisualServer.xml msgid "Add the effect of the glow on top of the scene." -msgstr "" +msgstr "Ajoute un effet de lueur sur la scène." #: doc/classes/VisualServer.xml msgid "" @@ -75341,6 +77353,8 @@ msgid "" "Returns the shader node instance with specified [code]type[/code] and " "[code]id[/code]." msgstr "" +"Retourne l'instance de nÅ“ud de shader avec le [code]type[/code] et " +"l'identifiant [code]id[/code] spécifiés." #: doc/classes/VisualShader.xml msgid "Returns the list of connected nodes with the specified type." @@ -75358,6 +77372,8 @@ msgstr "Retourne la position du nÅ“ud spécifié dans le graphique du nuanceur." msgid "" "Returns [code]true[/code] if the specified node and port connection exist." msgstr "" +"Retourne [code]true[/code] si le nÅ“ud et le port de connexion spécifiés " +"existent." #: doc/classes/VisualShader.xml msgid "Removes the specified node from the shader." @@ -75488,7 +77504,7 @@ msgstr "" #: doc/classes/VisualShaderNodeBooleanConstant.xml msgid "A boolean constant which represents a state of this node." -msgstr "" +msgstr "Un booléen constant qui représente l'état de ce nÅ“ud." #: doc/classes/VisualShaderNodeBooleanUniform.xml msgid "A boolean uniform to be used within the visual shader graph." @@ -75530,7 +77546,7 @@ msgstr "" #: doc/classes/VisualShaderNodeColorConstant.xml msgid "A [Color] constant which represents a state of this node." -msgstr "" +msgstr "Une [Color] constante qui représente l'état de ce nÅ“ud." #: doc/classes/VisualShaderNodeColorFunc.xml msgid "A [Color] function to be used within the visual shader graph." @@ -75541,11 +77557,15 @@ msgid "" "Accept a [Color] to the input port and transform it according to [member " "function]." msgstr "" +"Accepte une [Color] pour le port d'entrée et la transforme en fonction de " +"[member function]." #: doc/classes/VisualShaderNodeColorFunc.xml msgid "" "A function to be applied to the input color. See [enum Function] for options." msgstr "" +"Une fonction à appliquer à la couleur d'entrée. Voir [enum Function] pour " +"les options." #: doc/classes/VisualShaderNodeColorFunc.xml msgid "" @@ -75558,6 +77578,14 @@ msgid "" "return vec3(max3, max3, max3);\n" "[/codeblock]" msgstr "" +"Convertit une couleur en niveau de gris à partir de la formule suivante :\n" +"[codeblock]\n" +"vec3 c = input;\n" +"float max1 = max(c.r, c.g);\n" +"float max2 = max(max1, c.b);\n" +"float max3 = max(max1, max2);\n" +"return vec3(max3, max3, max3);\n" +"[/codeblock]" #: doc/classes/VisualShaderNodeColorFunc.xml msgid "" @@ -75570,6 +77598,14 @@ msgid "" "return vec3(r, g, b);\n" "[/codeblock]" msgstr "" +"Applique un effet sépia à partir de la formule suivante :\n" +"[codeblock]\n" +"vec3 c = input;\n" +"float r = (c.r * 0.393) + (c.g * 0.769) + (c.b * 0.189);\n" +"float g = (c.r * 0.349) + (c.g * 0.686) + (c.b * 0.168);\n" +"float b = (c.r * 0.272) + (c.g * 0.534) + (c.b * 0.131);\n" +"return vec3(r, g, b);\n" +"[/codeblock]" #: doc/classes/VisualShaderNodeColorOp.xml msgid "A [Color] operator to be used within the visual shader graph." @@ -75609,6 +77645,10 @@ msgid "" "result = min(a, b);\n" "[/codeblock]" msgstr "" +"Produit un effet d'assombrissement à partir de la formule suivante :\n" +"[codeblock]\n" +"result = min(a, b);\n" +"[/codeblock]" #: doc/classes/VisualShaderNodeColorOp.xml msgid "" @@ -75617,6 +77657,10 @@ msgid "" "result = max(a, b);\n" "[/codeblock]" msgstr "" +"Produit un effet d'éclaircissement à partir de la formule suivante :\n" +"[codeblock]\n" +"result = max(a, b);\n" +"[/codeblock]" #: doc/classes/VisualShaderNodeColorOp.xml msgid "" @@ -75708,6 +77752,8 @@ msgid "" "Extra condition which is applied if [member type] is set to [constant " "CTYPE_VECTOR]." msgstr "" +"Une condition supplémentaire qui sera appliquée si [member type] est à " +"[constant CTYPE_VECTOR]." #: doc/classes/VisualShaderNodeCompare.xml msgid "A comparison function. See [enum Function] for options." @@ -76185,6 +78231,9 @@ msgid "" "Returns a [String] description of the output ports as a colon-separated list " "using the format [code]id,type,name;[/code] (see [method add_output_port])." msgstr "" +"Retourne une [String] de description des ports sortants sous forme de liste " +"séparée par une virgule avec le format [code]identifiant,type,nom;[/code] " +"(voir [method add_output_port])." #: doc/classes/VisualShaderNodeGroupBase.xml msgid "Returns [code]true[/code] if the specified input port exists." @@ -76250,7 +78299,7 @@ msgstr "" #: doc/classes/VisualShaderNodeGroupBase.xml msgid "The size of the node in the visual shader graph." -msgstr "" +msgstr "La taille du nÅ“ud dans le graphe du visual shader." #: doc/classes/VisualShaderNodeInput.xml msgid "" @@ -76342,12 +78391,13 @@ msgstr "" #: doc/classes/VisualShaderNodeScalarDerivativeFunc.xml msgid "The derivative type. See [enum Function] for options." -msgstr "" +msgstr "Le type de dérivation. Voir [enum Function] pour les options.." #: doc/classes/VisualShaderNodeScalarDerivativeFunc.xml #: doc/classes/VisualShaderNodeVectorDerivativeFunc.xml msgid "Sum of absolute derivative in [code]x[/code] and [code]y[/code]." msgstr "" +"La somme d'une dérivation absolue dans [code]x[/code] et [code]y[/code]." #: doc/classes/VisualShaderNodeScalarDerivativeFunc.xml #: doc/classes/VisualShaderNodeVectorDerivativeFunc.xml @@ -76363,6 +78413,8 @@ msgstr "Dérive selon [code]y[/code] par différenciation locale." msgid "" "Linearly interpolates between two scalars within the visual shader graph." msgstr "" +"Produit une interpolation linéaire entre deux scalaires dans le graphe du " +"visual shader." #: doc/classes/VisualShaderNodeScalarInterp.xml msgid "Translates to [code]mix(a, b, weight)[/code] in the shader language." @@ -76391,6 +78443,8 @@ msgid "" "Returns an associated scalar if the provided boolean value is [code]true[/" "code] or [code]false[/code]." msgstr "" +"Retourne le scalaire associé si le booléen donné est [code]true[/code] ou " +"[code]false[/code]." #: doc/classes/VisualShaderNodeScalarUniform.xml msgid "" @@ -76447,6 +78501,8 @@ msgid "" "Returns an associated vector if the provided boolean value is [code]true[/" "code] or [code]false[/code]." msgstr "" +"Retourne le vecteur associé si le booléen donné est [code]true[/code] ou " +"[code]false[/code]." #: doc/classes/VisualShaderNodeTexture.xml msgid "Performs a texture lookup within the visual shader graph." @@ -76747,7 +78803,7 @@ msgstr "Un [Vector3] constant à utiliser dans le graphe de shader visuel." #: doc/classes/VisualShaderNodeVec3Constant.xml msgid "A constant [Vector3], which can be used as an input node." -msgstr "" +msgstr "Un [Vector3] constant, qui peut être utilisé comme un nÅ“ud d'entrée." #: doc/classes/VisualShaderNodeVec3Constant.xml msgid "A [Vector3] constant which represents the state of this node." @@ -76775,6 +78831,8 @@ msgstr "" #: doc/classes/VisualShaderNodeVectorCompose.xml msgid "Composes a [Vector3] from three scalars within the visual shader graph." msgstr "" +"Construit un [Vector3] à partir de trois scalaires dans le graphe de visual " +"shader." #: doc/classes/VisualShaderNodeVectorCompose.xml msgid "" @@ -76802,7 +78860,7 @@ msgstr "" #: doc/classes/VisualShaderNodeVectorDerivativeFunc.xml msgid "A derivative type. See [enum Function] for options." -msgstr "" +msgstr "Un type de dérivation. Voir [enum Function] pour les options.." #: doc/classes/VisualShaderNodeVectorDistance.xml msgid "" @@ -76823,6 +78881,8 @@ msgstr "" #: doc/classes/VisualShaderNodeVectorFunc.xml msgid "A vector function to be used within the visual shader graph." msgstr "" +"Une fonction vectorielle qui peut être utilisée dans le graphe de visual " +"shader." #: doc/classes/VisualShaderNodeVectorFunc.xml msgid "A visual shader node able to perform different functions using vectors." @@ -77009,6 +79069,7 @@ msgstr "Sera traduit en [code]length(p0)[/code] dans le code du shader." #: doc/classes/VisualShaderNodeVectorOp.xml msgid "A vector operator to be used within the visual shader graph." msgstr "" +"Un opérateur vectoriel qui peut être utilisé dans le graphe de visual shader." #: doc/classes/VisualShaderNodeVectorOp.xml msgid "" @@ -77502,6 +79563,10 @@ msgid "" "[b]Note:[/b] You cannot reuse this object for a new connection unless you " "call [method initialize]." msgstr "" +"Ferme la connexion de ce pair et tous les canaux de données lui étant " +"associés.\n" +"[b]Note :[/b] Vous ne pouvez pas réutiliser cet objet pour une nouvelle " +"connexion sans appeler [method initialize]." #: modules/webrtc/doc_classes/WebRTCPeerConnection.xml msgid "" @@ -77540,6 +79605,43 @@ msgid "" "[b]Note:[/b] You must keep a reference to channels created this way, or it " "will be closed." msgstr "" +"Retourne un nouveau [WebRTCDataChannel] (ou [code]null[/code] en cas " +"d'échec) avec le [code]label[/code] spécifié et avec le dictionnaire de " +"configuration [code]options[/code] facultatif. Cette méthode ne peut être " +"uniquement appelée quand la connexion est à l'état [constant STATE_NEW].\n" +"Il y a deux façon de créer un canal de données fonctionnant : soit appeler " +"[method create_data_channel] sur seulement un des pairs et écouter [signal " +"data_channel_received] sur les autres, ou alors appeler [method " +"create_data_channel] sur les deux pairs, avec les mêmes valeurs, et avec " +"l'option [code]negotiated[/code] à [code]true[/code].\n" +"Les [code]options[/code] valides sont :\n" +"[codeblock]\n" +"{\n" +" \"negotiated\": true, # Quand à \"true\" (désactivé par défaut), le " +"canal est négocié en dehors de la bande. \"id\" doit aussi être défini. " +"\"data_channel_received\" ne sera pas appelé.\n" +" \"id\": 1, # Quand \"negotiated\" est \"true\", cette valeur doit aussi " +"être définie avec la même valeur pour les deux pairs.\n" +"\n" +" # Seulement un des deux de maxRetransmits ou maxPacketLifeTime peut être " +"spécifié. Ils font que le canal est moins fiable (mais meilleur pour le " +"temps réel).\n" +" \"maxRetransmits\": 1, # Spécifie le nombre maximal de tentative que le " +"pair fera pour renvoyer les paquets qui n'ont pas été acceptés.\n" +" \"maxPacketLifeTime\": 100, # Spécifie le temps maximal avant " +"d'abandonner le fait de renvoyer les paquets qui n'ont pas été acceptés (in " +"milliseconds).\n" +" \"ordered\": true, # Quand un mode non fiable (que soit " +"\"maxRetransmits\" ou \"maxPacketLifetime\" est défini), " +"\"ordered\" (\"true\" par défaut) spécifie si l'ordre des paquets doit être " +"respecté.\n" +"\n" +" \"protocol\": \"my-custom-protocol\", # Un sous-protocol personnalisé " +"pour ce canal.\n" +"}\n" +"[/codeblock]\n" +"[b]Note :[/b] Vous devez garder une référence aux canaux créés de cette " +"manière, ou alors ils sont fermés." #: modules/webrtc/doc_classes/WebRTCPeerConnection.xml msgid "" @@ -77586,6 +79688,28 @@ msgid "" "}\n" "[/codeblock]" msgstr "" +"Ré-initialise la connection de ce pair, fermant une précédente connexion " +"active, et retourne à l'état [constant STATE_NEW]. Un dictionnaire de " +"[code]options[/code] peut être passé pour configurer la connexion du pair.\n" +"Les [code]options[/code] valides sont :\n" +"[codeblock]\n" +"{\n" +" \"iceServers\": [\n" +" {\n" +" \"urls\": [ \"stun:stun.example.com:3478\" ], # Un ou plusieurs " +"serveurs STUN.\n" +" },\n" +" {\n" +" \"urls\": [ \"turn:turn.example.com:3478\" ], # Un ou plusieurs " +"serveurs TURN.\n" +" \"username\": \"a_username\", # Le nom d'utilisateur facultatif " +"pour le serveur TURN.\n" +" \"credential\": \"a_password\", # Le mot de passe facultatif " +"pour le serveur TURN.\n" +" }\n" +" ]\n" +"}\n" +"[/codeblock]" #: modules/webrtc/doc_classes/WebRTCPeerConnection.xml msgid "" @@ -78630,6 +80754,8 @@ msgstr "" #: doc/classes/XMLParser.xml msgid "Gets the current line in the parsed file (currently not implemented)." msgstr "" +"Retourne l'actuelle ligne du fichier interprété (actuellement non " +"implémenté)." #: doc/classes/XMLParser.xml msgid "" diff --git a/doc/translations/gl.po b/doc/translations/gl.po index ae1ecf4fb4..65371b9f89 100644 --- a/doc/translations/gl.po +++ b/doc/translations/gl.po @@ -935,11 +935,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -983,37 +984,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4108,17 +4108,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4146,9 +4153,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4172,8 +4179,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4225,6 +4235,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4740,11 +4760,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5779,7 +5799,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6969,7 +6992,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7014,10 +7040,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7155,11 +7185,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8294,7 +8328,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8516,7 +8550,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11627,17 +11661,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13886,7 +13920,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13982,7 +14018,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22388,6 +22426,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25969,9 +26011,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34493,13 +34548,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35205,6 +35260,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35268,6 +35329,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35294,6 +35361,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35315,6 +35388,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35787,17 +35866,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35818,7 +35937,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35864,6 +35986,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35900,6 +36026,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37084,7 +37214,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37092,8 +37222,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37387,14 +37517,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37527,6 +37649,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37688,6 +37819,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38928,7 +39077,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38950,7 +39099,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44277,6 +44427,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45070,6 +45229,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48515,19 +48678,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53357,8 +53507,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53379,8 +53536,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/hi.po b/doc/translations/hi.po index 7d82f6cba4..5131f43244 100644 --- a/doc/translations/hi.po +++ b/doc/translations/hi.po @@ -934,11 +934,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -982,37 +983,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4107,17 +4107,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4145,9 +4152,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4171,8 +4178,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4224,6 +4234,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4739,11 +4759,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5778,7 +5798,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6968,7 +6991,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7013,10 +7039,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7154,11 +7184,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8293,7 +8327,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8515,7 +8549,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11626,17 +11660,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13885,7 +13919,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13981,7 +14017,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22387,6 +22425,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25968,9 +26010,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34492,13 +34547,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35204,6 +35259,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35267,6 +35328,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35293,6 +35360,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35314,6 +35387,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35786,17 +35865,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35817,7 +35936,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35863,6 +35985,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35899,6 +36025,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37083,7 +37213,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37091,8 +37221,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37386,14 +37516,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37526,6 +37648,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37687,6 +37818,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38927,7 +39076,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38949,7 +39098,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44276,6 +44426,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45069,6 +45228,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48514,19 +48677,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53356,8 +53506,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53378,8 +53535,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/hu.po b/doc/translations/hu.po index 24b9a5c93d..f6383a95dd 100644 --- a/doc/translations/hu.po +++ b/doc/translations/hu.po @@ -952,11 +952,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1000,37 +1001,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4125,17 +4125,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4163,9 +4170,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4189,8 +4196,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4242,6 +4252,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4757,11 +4777,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5796,7 +5816,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6986,7 +7009,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7031,10 +7057,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7172,11 +7202,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8311,7 +8345,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8533,7 +8567,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11644,17 +11678,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13903,7 +13937,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13999,7 +14035,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22405,6 +22443,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25986,9 +26028,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34510,13 +34565,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35222,6 +35277,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35285,6 +35346,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35311,6 +35378,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35332,6 +35405,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35804,17 +35883,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35835,7 +35954,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35881,6 +36003,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35917,6 +36043,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37101,7 +37231,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37109,8 +37239,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37404,14 +37534,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37544,6 +37666,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37705,6 +37836,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38945,7 +39094,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38967,7 +39116,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44294,6 +44444,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45087,6 +45246,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48532,19 +48695,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53374,8 +53524,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53396,8 +53553,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/id.po b/doc/translations/id.po index 8c9d0937bf..c2b6000173 100644 --- a/doc/translations/id.po +++ b/doc/translations/id.po @@ -14,12 +14,13 @@ # zephyroths <ridho.hikaru@gmail.com>, 2022. # ProgrammerIndonesia 44 <elo.jhy@gmail.com>, 2022. # Reza Almanda <rezaalmanda27@gmail.com>, 2022. +# Tsaqib Fadhlurrahman Soka <sokatsaqib@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-04-08 07:11+0000\n" -"Last-Translator: Reza Almanda <rezaalmanda27@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:38+0000\n" +"Last-Translator: Tsaqib Fadhlurrahman Soka <sokatsaqib@gmail.com>\n" "Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/id/>\n" "Language: id\n" @@ -27,7 +28,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -43,7 +44,7 @@ msgstr "Properti" #: doc/tools/make_rst.py msgid "Methods" -msgstr "Metode" +msgstr "Method" #: doc/tools/make_rst.py msgid "Theme Properties" @@ -59,7 +60,7 @@ msgstr "Enumerasi" #: doc/tools/make_rst.py msgid "Constants" -msgstr "Konstanta" +msgstr "konstan" #: doc/tools/make_rst.py msgid "Property Descriptions" @@ -91,7 +92,7 @@ msgstr "Bawaan" #: doc/tools/make_rst.py msgid "Setter" -msgstr "" +msgstr "Setter" #: doc/tools/make_rst.py msgid "value" @@ -99,7 +100,7 @@ msgstr "nilai" #: doc/tools/make_rst.py msgid "Getter" -msgstr "" +msgstr "Pengumpul" #: doc/tools/make_rst.py msgid "" @@ -1322,11 +1323,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml #, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Rentang acak, setiap nilai floating point antara [code]from[/code] dan " "[code]to[/code].\n" @@ -1380,37 +1382,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4518,17 +4519,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4556,9 +4564,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4582,8 +4590,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4635,6 +4646,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5150,11 +5171,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -6190,7 +6211,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7380,7 +7404,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7425,10 +7452,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7566,11 +7597,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8705,7 +8740,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8927,7 +8962,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12038,17 +12073,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14298,7 +14333,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14394,7 +14431,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22800,6 +22839,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26387,9 +26430,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34912,13 +34968,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35630,6 +35686,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35696,6 +35758,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Mengembalikan nilai hiperbolik tangen dari parameter." @@ -35723,6 +35791,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35744,6 +35818,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Mengembalikan nilai hiperbolik tangen dari parameter." @@ -36218,17 +36298,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36249,7 +36369,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36295,6 +36418,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36331,6 +36458,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37070,7 +37201,7 @@ msgstr "" #: doc/classes/Node.xml msgid "Nodes and Scenes" -msgstr "" +msgstr "Node dan Scene" #: doc/classes/Node.xml msgid "All Demos" @@ -37517,7 +37648,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37525,8 +37656,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37820,14 +37951,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37960,6 +38083,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38121,6 +38253,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39362,7 +39512,7 @@ msgstr "Mengembalikan nilai hiperbolik tangen dari parameter." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39384,7 +39534,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44728,6 +44879,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45522,6 +45682,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48967,19 +49131,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53810,8 +53961,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53832,8 +53990,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/is.po b/doc/translations/is.po index 90fb6e951b..59dc923b45 100644 --- a/doc/translations/is.po +++ b/doc/translations/is.po @@ -934,11 +934,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -982,37 +983,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4107,17 +4107,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4145,9 +4152,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4171,8 +4178,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4224,6 +4234,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4739,11 +4759,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5778,7 +5798,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6968,7 +6991,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7013,10 +7039,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7154,11 +7184,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8293,7 +8327,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8515,7 +8549,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11626,17 +11660,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13885,7 +13919,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13981,7 +14017,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22387,6 +22425,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25968,9 +26010,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34492,13 +34547,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35204,6 +35259,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35267,6 +35328,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35293,6 +35360,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35314,6 +35387,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35786,17 +35865,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35817,7 +35936,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35863,6 +35985,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35899,6 +36025,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37083,7 +37213,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37091,8 +37221,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37386,14 +37516,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37526,6 +37648,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37687,6 +37818,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38927,7 +39076,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38949,7 +39098,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44276,6 +44426,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45069,6 +45228,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48514,19 +48677,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53356,8 +53506,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53378,8 +53535,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/it.po b/doc/translations/it.po index f5f588a6ae..31cfb31aca 100644 --- a/doc/translations/it.po +++ b/doc/translations/it.po @@ -1508,12 +1508,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Un range casuale, un qualsiasi numero in virgola mobile tra [code]from[/" "code] e [code]to[/code]\n" @@ -1588,37 +1590,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -5100,17 +5101,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -5138,9 +5146,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -5164,8 +5172,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -5217,6 +5228,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5733,12 +5754,12 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml #, fuzzy msgid "Linear interpolation." msgstr "Interpolazione lineare." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml #, fuzzy msgid "Cubic interpolation." msgstr "Interpolazione cubica." @@ -6775,7 +6796,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7981,7 +8005,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -8026,10 +8053,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -8167,11 +8198,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -9310,7 +9345,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -9532,7 +9567,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12654,17 +12689,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14924,7 +14959,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -15021,7 +15058,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -23531,6 +23570,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Ritorna [code]true[/code] se [Rect2i] è piano o vuoto." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -27129,9 +27173,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -35686,13 +35743,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -36405,6 +36462,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "Ritorna [code]true[/code] se [Rect2i] contiene un punto." @@ -36475,6 +36538,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Restituisce l'arco-seno del parametro." @@ -36502,6 +36571,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Ritorna [code]true[/code] se [Rect2i] è piano o vuoto." @@ -36525,6 +36600,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Restituisce il seno del parametro." @@ -37010,19 +37091,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Calcola il prodotto vettoriale di questo vettore e [code]with[/code]." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -37041,7 +37163,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -37088,6 +37213,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Restituisce il seno del parametro." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -37124,6 +37254,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Restituisce il seno del parametro." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -38313,7 +38448,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -38321,8 +38456,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -38616,14 +38751,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -38756,6 +38883,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38917,6 +39053,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -40165,7 +40319,7 @@ msgstr "Calcola il prodotto vettoriale di questo vettore e [code]b[/code]." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -40187,7 +40341,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -45558,6 +45713,16 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "Ritorna [code]true[/code] se [code]s[/code] è zero o quasi zero." + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -46354,6 +46519,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -49800,19 +49969,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -54653,8 +54809,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -54675,8 +54838,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/ja.po b/doc/translations/ja.po index 463133444e..1b5c884316 100644 --- a/doc/translations/ja.po +++ b/doc/translations/ja.po @@ -1463,12 +1463,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "[code]from[/code] ã‹ã‚‰ [code]to[/code] ã¾ã§ã®é–“ã§ã€ãƒ©ãƒ³ãƒ€ãƒ ãªå€¤ã‚’æµ®å‹•å°æ•°ç‚¹æ•°" "ã¨ã—ã¦ç”Ÿæˆã—ã¾ã™ã€‚\n" @@ -1538,39 +1540,37 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml -#, fuzzy msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -1579,45 +1579,6 @@ msgid "" "3\n" "[/codeblock]" msgstr "" -"与ãˆã‚‰ã‚ŒãŸç¯„囲ã§ã®é…列を返ã—ã¾ã™ã€‚ ç¯„å›²ã®æŒ‡å®šã«ã¯1ã¤ã®å¼•æ•° [code]N[/code] (0 " -"ã‹ã‚‰ [code]N[/code] - 1 ã¾ã§) ã€2ã¤ã®å¼•æ•°([code]initial[/code], [code]final " -"- 1[/code]) ã¾ãŸã¯3ã¤ã®å¼•æ•°([code]initial[/code], [code]final - 1[/code], " -"[code]increment[/code]) ãŒã‚りã¾ã™ã€‚ã‚‚ã—範囲ãŒä¸æ£ãªå€¤ (例ãˆã° " -"[code]range(2, 5, -1)[/code] ã‚„ [code]range(5, 5, 1)[/code]) ã ã£ãŸå ´åˆã¯ç©ºã®" -"é…列ãŒè¿”ã•れã¾ã™ã€‚\n" -"与ãˆã‚‰ã‚ŒãŸç¯„囲ã§ã®é…列を返ã—ã¾ã™ã€‚ [code]range()[/code] ã¯1ã¤ã®å¼•æ•°N " -"([code]0[/code] ã‹ã‚‰ [code]N - 1[/code] ã¾ã§) ã€äºŒã¤ã®å¼•æ•° ([code]initial[/" -"code], [code]final - 1[/code]) ã¾ãŸã¯3ã¤ã®å¼•æ•° ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]) ã‚’ã‚‚ã¡ã¾ã™ã€‚ " -"[code]increment[/code] ã¯è² ã®å€¤ã«ã‚‚ãªã‚Šã¾ã™ã€‚ã‚‚ã— [code]increment[/code] ãŒè² " -"ã®å€¤ãªã‚‰ã°ã€ [code]final - 1[/code] 㯠[code]final + 1[/code] ã«ãªã‚Šã¾ã™ã€‚ã¾" -"ãŸã€ãã® initial ã®å€¤ã‚‚ループを実行ã™ã‚‹ãŸã‚ã« final ã®å€¤ã‚ˆã‚Šå¤§ãããªã‘れã°ã„" -"ã‘ã¾ã›ã‚“。\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"出力:\n" -"[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" -"[/codeblock]\n" -"[Array] ã‚’é€†é †ã§å‡ºåŠ›ã™ã‚‹ã«ã¯ã€ã“ã®ã‚ˆã†ã«ä½¿ç”¨ã—ã¦ãã ã•ã„:\n" -"[codeblock]\n" -"var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" -"[/codeblock]\n" -"出力:\n" -"[codeblock]\n" -"9\n" -"6\n" -"3\n" -"[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -5269,17 +5230,25 @@ msgid "Maximum value for the mode enum." msgstr "モード用enumã®æœ€å¤§å€¤ã€‚" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +#, fuzzy +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "アニメーション用ã«è¤‡æ•°ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’使用ã§ãã‚‹Spriteノード。" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -5311,9 +5280,10 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "ç¾åœ¨ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’åœæ¢ã—ã¾ã™ (frameカウンターã¯ãƒªã‚»ãƒƒãƒˆã•れãªã„)。" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml +#, fuzzy msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" "[code]frames[/code] リソースã‹ã‚‰ã®ç¾åœ¨ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã€‚ã“ã®å€¤ãŒå¤‰ã‚ã‚‹ã¨ã€" @@ -5339,9 +5309,12 @@ msgstr "[code]true[/code] ã§ã‚れã°ã€ãƒ†ã‚¯ã‚¹ãƒãƒ£ã¯åž‚ç›´ã«å転ã•れ msgid "The displayed animation frame's index." msgstr "表示ã•れã¦ã„るアニメーションフレームã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ [SpriteFrames] リソース。" +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -5401,6 +5374,18 @@ msgstr "" "[code]anim[/code] ã¨ã„ã†åå‰ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’å†ç”Ÿã—ã¾ã™ã€‚[code]anim[/code] " "ãŒæŒ‡å®šã•れã¦ã„ãªã„å ´åˆã¯ã€ç¾åœ¨ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’å†ç”Ÿã—ã¾ã™ã€‚" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" +"[code]frames[/code] リソースã‹ã‚‰ã®ç¾åœ¨ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã€‚ã“ã®å€¤ãŒå¤‰ã‚ã‚‹ã¨ã€" +"[code]frame[/code] カウンタã¯ãƒªã‚»ãƒƒãƒˆã•れã¾ã™ã€‚" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ [SpriteFrames] リソース。" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "シンプルãªãƒ•レームベース アニメーションã®ãŸã‚ã®ãƒ—ãƒã‚ã‚· テクスãƒãƒ£ã€‚" @@ -6112,11 +6097,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "補間ãªã— (ç›´è¿‘ã®å€¤) 。" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "線形補間。" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "ã‚ュービック補間。" @@ -7413,11 +7398,15 @@ msgstr "" "code] ã«å¤‰æ›´ã—ã¾ã™ã€‚" #: doc/classes/AnimationPlayer.xml +#, fuzzy msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" "アニメーションを [code]seconds[/code] (ç§’) 時点ã¾ã§ã‚·ãƒ¼ã‚¯ã—ã¾ã™ã€‚ã‚‚ã— " "[code]update[/code] ㌠[code]true[/code] ã§ã‚れã°ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚‚åŒæ™‚æ›´æ–°ã•" @@ -9056,7 +9045,10 @@ msgstr "" "é…列をクリアã—ã¾ã™ã€‚ã“れã¯ã€[code]0[/code]ã®ã‚µã‚¤ã‚ºã§[method resize]を使用ã™ã‚‹" "ã®ã¨åŒã˜ã§ã™ã€‚" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "è¦ç´ ã®é…列内ã§ã®å‡ºç¾å›žæ•°ã‚’è¿”ã—ã¾ã™ã€‚" @@ -9107,10 +9099,15 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" "é…列ã®å€¤ã‚’検索ã—ã€ãã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’è¿”ã™ã‹ã€è¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯ [code]-1[/" "code] ã‚’è¿”ã—ã¾ã™ã€‚オプションã§ã€æ¤œç´¢ã®é–‹å§‹ä½ç½®ã‚’渡ã›ã¾ã™ã€‚" @@ -9278,11 +9275,16 @@ msgstr "" "ãã™ã‚Œã°ã€è¦ç´ ã¯é™¤åŽ»ã•れã€å¤§ããã™ã‚Œã°ã€æ–°ã—ã„è¦ç´ ã¯[code]null[/code]ã«ãªã‚Šã¾" "ã™ã€‚" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" "é…åˆ—ã‚’é€†é †ã«æ¤œç´¢ã—ã¾ã™ã€‚オプションã§ã€æ¤œç´¢é–‹å§‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’渡ã™ã“ã¨ãŒã§ãã¾" "ã™ã€‚è² ã®å€¤ã‚’指定ã—ãŸå ´åˆã€é–‹å§‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯é…åˆ—ã®æœ«å°¾ã‹ã‚‰ã®ç›¸å¯¾çš„ãªã‚‚ã®ã¨ã¿" @@ -10592,7 +10594,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -10912,7 +10914,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -14611,17 +14613,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -16949,7 +16951,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -17046,7 +17050,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -25561,6 +25567,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "[code]true[/code]ã®å ´åˆã€ãƒ•ィードãƒãƒƒã‚¯ãŒæœ‰åйã«ãªã‚Šã¾ã™ã€‚" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -29186,9 +29197,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -37805,13 +37829,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -38529,6 +38553,15 @@ msgstr "指定ã•れãŸãƒŽãƒ¼ãƒ‰ã®åå‰ã‚’変ãˆã¾ã™ã€‚" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" +"ã‚ー [code]name[/code] ã‚’æŒã¤ [Animation] ã‚’è¿”ã™ã‹ã€è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã¯ " +"[code]null[/code] ã‚’è¿”ã—ã¾ã™ã€‚" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +#, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "与ãˆã‚‰ã‚ŒãŸãƒŽãƒ¼ãƒ‰ã‚’å«ã‚€ã‚°ãƒ©ãƒ•ã®å ´åˆã€[code]true[/code] ã‚’è¿”ã—ã¾ã™ã€‚" @@ -38599,6 +38632,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "グラフã®çµ‚端ノードを返ã—ã¾ã™ã€‚" @@ -38629,6 +38668,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "é…列ãŒç©ºã®å ´åˆã¯[code]true[/code]ã‚’è¿”ã—ã¾ã™ã€‚" @@ -38652,6 +38697,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "行列ã®é€†è¡Œåˆ—ã‚’è¿”ã—ã¾ã™ã€‚" @@ -39144,19 +39195,59 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "[enum Feature] enum ã®ã‚µã‚¤ã‚ºã‚’表ã—ã¾ã™ã€‚" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml #, fuzzy -msgid "Clears the navigation mesh." -msgstr "ã™ã¹ã¦ã®ç‚¹ãŠã‚ˆã³ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã‚’クリアã—ã¾ã™ã€‚" +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "ã‚ーå [code]name[/code] ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’削除ã—ã¾ã™ã€‚" #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." @@ -39176,7 +39267,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -39226,6 +39320,11 @@ msgid "" msgstr "指定ã•れãŸåå‰ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãƒŽãƒ¼ãƒ‰ã‚’è¿”ã—ã¾ã™ã€‚" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "アニメーションã®ãƒˆãƒ©ãƒƒã‚¯æ•°ã‚’è¿”ã—ã¾ã™ã€‚" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -39262,6 +39361,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "アニメーションã®ãƒˆãƒ©ãƒƒã‚¯æ•°ã‚’è¿”ã—ã¾ã™ã€‚" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -40455,7 +40559,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -40463,8 +40567,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -40758,14 +40862,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -40898,6 +40994,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -41059,6 +41164,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -42307,10 +42430,13 @@ msgid "Returns the tooltip of the item at index [code]idx[/code]." msgstr "インデックス [code]bus_idx[/code] ã®ãƒã‚¹ã®éŸ³é‡ã‚’ dB ã§è¿”ã—ã¾ã™ã€‚" #: doc/classes/OptionButton.xml +#, fuzzy msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" +"é…åˆ—ã®æœ€åˆã®è¦ç´ を削除ã—ã¦è¿”ã—ã¾ã™ã€‚é…列ãŒç©ºã®å ´åˆã¯[code]null[/code]ã‚’è¿”ã—ã¾" +"ã™ã€‚" #: doc/classes/OptionButton.xml msgid "" @@ -42330,7 +42456,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -47719,6 +47846,17 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" +"æ–‡å—列ã®é•·ã•㌠[code]0[/code] ã«ç‰ã—ã‘れ㰠[code]true[/code] ã‚’è¿”ã—ã¾ã™ã€‚" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -48532,6 +48670,11 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +#, fuzzy +msgid "[Font] used for the labeled separator." +msgstr "編集済ã¿ãƒ—ãƒãƒ‘ティ用ã®ãƒ’ントãªã—。" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -51997,19 +52140,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -56876,8 +57006,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -56898,8 +57035,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/ko.po b/doc/translations/ko.po index c6e5552649..f567ed125c 100644 --- a/doc/translations/ko.po +++ b/doc/translations/ko.po @@ -13,12 +13,13 @@ # dewcked <dewcked@protonmail.ch>, 2021. # ì‹ ë™ê·œ <rlsl0422@gmail.com>, 2021. # whatthesamuel <alex01763@gmail.com>, 2021. +# 한수현 <shh1473@ajou.ac.kr>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2021-11-19 08:44+0000\n" -"Last-Translator: Myeongjin Lee <aranet100@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:38+0000\n" +"Last-Translator: 한수현 <shh1473@ajou.ac.kr>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/ko/>\n" "Language: ko\n" @@ -26,11 +27,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.9.1-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" -msgstr "설명" +msgstr "ì„œìˆ " #: doc/tools/make_rst.py msgid "Tutorials" @@ -50,7 +51,7 @@ msgstr "테마 ì†ì„±ë“¤" #: doc/tools/make_rst.py msgid "Signals" -msgstr "시그ë„" +msgstr "ì‹ í˜¸" #: doc/tools/make_rst.py msgid "Enumerations" @@ -91,7 +92,7 @@ msgstr "" #: doc/tools/make_rst.py msgid "Setter" -msgstr "" +msgstr "Setter" #: doc/tools/make_rst.py msgid "value" @@ -99,7 +100,7 @@ msgstr "" #: doc/tools/make_rst.py msgid "Getter" -msgstr "" +msgstr "Getter" #: doc/tools/make_rst.py msgid "" @@ -1046,11 +1047,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1103,37 +1105,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4234,17 +4235,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4272,9 +4280,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4298,8 +4306,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4351,6 +4362,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4867,11 +4888,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5907,7 +5928,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7098,7 +7122,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7143,10 +7170,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7284,11 +7315,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8423,7 +8458,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8645,7 +8680,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11759,17 +11794,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14022,7 +14057,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14118,7 +14155,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22624,6 +22663,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26212,9 +26256,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34751,13 +34808,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35469,6 +35526,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35538,6 +35601,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì•„í¬ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." @@ -35565,6 +35634,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì½”ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." @@ -35588,6 +35663,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." @@ -36066,19 +36147,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -36097,7 +36219,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36143,6 +36268,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36179,6 +36309,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -36971,7 +37106,7 @@ msgstr "" #: doc/classes/Node.xml msgid "Nodes and Scenes" -msgstr "" +msgstr "노드와 씬" #: doc/classes/Node.xml msgid "All Demos" @@ -37492,7 +37627,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37500,8 +37635,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37795,14 +37930,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37935,6 +38062,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38096,6 +38232,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39338,7 +39492,7 @@ msgstr "ë§¤ê°œë³€ìˆ˜ì˜ ì‚¬ì¸ ê°’ì„ ë°˜í™˜í•©ë‹ˆë‹¤." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39360,7 +39514,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44712,6 +44867,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45506,6 +45670,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48952,19 +49120,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53796,8 +53951,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53818,8 +53980,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/lv.po b/doc/translations/lv.po index d77a24b111..1c5f5ef158 100644 --- a/doc/translations/lv.po +++ b/doc/translations/lv.po @@ -949,11 +949,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -997,37 +998,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4122,17 +4122,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4160,9 +4167,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4186,8 +4193,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4239,6 +4249,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4754,11 +4774,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5793,7 +5813,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6983,7 +7006,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7028,10 +7054,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7169,11 +7199,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8308,7 +8342,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8530,7 +8564,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11641,17 +11675,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13900,7 +13934,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13996,7 +14032,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22402,6 +22440,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25986,9 +26028,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34510,13 +34565,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35222,6 +35277,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35285,6 +35346,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35311,6 +35378,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35332,6 +35405,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35804,17 +35883,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35835,7 +35954,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35881,6 +36003,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35917,6 +36043,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37101,7 +37231,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37109,8 +37239,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37404,14 +37534,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37544,6 +37666,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37705,6 +37836,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38945,7 +39094,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38967,7 +39116,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44294,6 +44444,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45087,6 +45246,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48532,19 +48695,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53374,8 +53524,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53396,8 +53553,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/mr.po b/doc/translations/mr.po index 2e152e7774..fcd595473b 100644 --- a/doc/translations/mr.po +++ b/doc/translations/mr.po @@ -932,11 +932,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -980,37 +981,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4105,17 +4105,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4143,9 +4150,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4169,8 +4176,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4222,6 +4232,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4737,11 +4757,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5776,7 +5796,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6966,7 +6989,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7011,10 +7037,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7152,11 +7182,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8291,7 +8325,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8513,7 +8547,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11624,17 +11658,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13883,7 +13917,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13979,7 +14015,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22385,6 +22423,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25966,9 +26008,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34490,13 +34545,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35202,6 +35257,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35265,6 +35326,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35291,6 +35358,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35312,6 +35385,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35784,17 +35863,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35815,7 +35934,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35861,6 +35983,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35897,6 +36023,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37081,7 +37211,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37089,8 +37219,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37384,14 +37514,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37524,6 +37646,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37685,6 +37816,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38925,7 +39074,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38947,7 +39096,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44274,6 +44424,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45067,6 +45226,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48512,19 +48675,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53354,8 +53504,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53376,8 +53533,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/nb.po b/doc/translations/nb.po index d52cdc0ce9..a4f62d1b5e 100644 --- a/doc/translations/nb.po +++ b/doc/translations/nb.po @@ -944,11 +944,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -992,37 +993,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4117,17 +4117,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4155,9 +4162,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4181,8 +4188,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4234,6 +4244,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4749,11 +4769,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5788,7 +5808,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6978,7 +7001,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7023,10 +7049,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7164,11 +7194,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8303,7 +8337,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8525,7 +8559,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11636,17 +11670,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13895,7 +13929,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13991,7 +14027,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22397,6 +22435,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25978,9 +26020,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34502,13 +34557,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35214,6 +35269,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35277,6 +35338,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35303,6 +35370,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35324,6 +35397,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35796,17 +35875,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35827,7 +35946,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35873,6 +35995,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35909,6 +36035,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37093,7 +37223,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37101,8 +37231,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37396,14 +37526,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37536,6 +37658,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37697,6 +37828,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38937,7 +39086,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38959,7 +39108,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44286,6 +44436,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45079,6 +45238,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48524,19 +48687,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53366,8 +53516,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53388,8 +53545,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/ne.po b/doc/translations/ne.po index a40402dd10..9335bf559b 100644 --- a/doc/translations/ne.po +++ b/doc/translations/ne.po @@ -932,11 +932,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -980,37 +981,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4105,17 +4105,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4143,9 +4150,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4169,8 +4176,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4222,6 +4232,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4737,11 +4757,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5776,7 +5796,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6966,7 +6989,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7011,10 +7037,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7152,11 +7182,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8291,7 +8325,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8513,7 +8547,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11624,17 +11658,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13883,7 +13917,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13979,7 +14015,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22385,6 +22423,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25966,9 +26008,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34490,13 +34545,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35202,6 +35257,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35265,6 +35326,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35291,6 +35358,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35312,6 +35385,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35784,17 +35863,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35815,7 +35934,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35861,6 +35983,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35897,6 +36023,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37081,7 +37211,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37089,8 +37219,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37384,14 +37514,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37524,6 +37646,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37685,6 +37816,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38925,7 +39074,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38947,7 +39096,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44274,6 +44424,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45067,6 +45226,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48512,19 +48675,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53354,8 +53504,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53376,8 +53533,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/nl.po b/doc/translations/nl.po index 943cbddb4c..15e800dda5 100644 --- a/doc/translations/nl.po +++ b/doc/translations/nl.po @@ -993,11 +993,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1041,37 +1042,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4174,17 +4174,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4212,9 +4219,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4238,8 +4245,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4291,6 +4301,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4806,11 +4826,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5845,7 +5865,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7035,7 +7058,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7080,10 +7106,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7221,11 +7251,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8360,7 +8394,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8582,7 +8616,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11693,17 +11727,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13952,7 +13986,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14048,7 +14084,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22454,6 +22492,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26038,9 +26080,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34562,13 +34617,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35274,6 +35329,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35337,6 +35398,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35363,6 +35430,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35384,6 +35457,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35856,17 +35935,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35887,7 +36006,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35933,6 +36055,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35969,6 +36095,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37153,7 +37283,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37161,8 +37291,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37456,14 +37586,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37596,6 +37718,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37757,6 +37888,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38997,7 +39146,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39019,7 +39168,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44346,6 +44496,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45139,6 +45298,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48584,19 +48747,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53427,8 +53577,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53449,8 +53606,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/pl.po b/doc/translations/pl.po index 64e182ff82..a484bd7e22 100644 --- a/doc/translations/pl.po +++ b/doc/translations/pl.po @@ -22,12 +22,14 @@ # lewando54 <lewando54@gmail.com>, 2022. # Katarzyna Twardowska <katarina.twardowska@gmail.com>, 2022. # Mateusz ZdrzaÅ‚ek <matjozohd@gmail.com>, 2022. +# Pixel Zone - Godot Engine Tutorials <karoltomaszewskimusic@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-03-21 22:22+0000\n" -"Last-Translator: Mateusz ZdrzaÅ‚ek <matjozohd@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 20:00+0000\n" +"Last-Translator: Pixel Zone - Godot Engine Tutorials " +"<karoltomaszewskimusic@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/pl/>\n" "Language: pl\n" @@ -36,7 +38,7 @@ msgstr "" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -258,7 +260,6 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml -#, fuzzy msgid "" "Asserts that the [code]condition[/code] is [code]true[/code]. If the " "[code]condition[/code] is [code]false[/code], an error is generated. When " @@ -518,6 +519,23 @@ msgid "" "want a true content-aware comparison, you have to use [code]deep_equal[/" "code]." msgstr "" +"Porównuje dwie wartoÅ›ci, sprawdzajÄ…c ich rzeczywistÄ… zawartość, przechodzÄ…c " +"do dowolnej „tablicy†lub „sÅ‚ownika†aż do najgłębszego poziomu.\n" +"Można to porównać do [code]==[/code] na kilka sposobów:\n" +"— Dla [kod]null[/code], [kod]int[/code], [code]float[/code], [code]String[/" +"code], [code]Object[/code] i [code] RID[/code] zarówno [code]deep_equal[/" +"code], jak i [code]==[/code] dziaÅ‚ajÄ… tak samo.\n" +"— W przypadku [code]SÅ‚ownik[/code] [code]==[/code] uwzglÄ™dnia równość wtedy " +"i tylko wtedy, gdy obie zmienne wskazujÄ… ten sam [code]SÅ‚ownik[/code], bez " +"rekurencji lub Å›wiadomoÅ›ci zawartość w ogóle.\n" +"— W przypadku [kod]Tablica[/kod] [kod]==[/kod] uwzglÄ™dnia równość wtedy i " +"tylko wtedy, gdy każdy element w pierwszej [kod]Tablica[/kod] jest równy " +"swojemu odpowiednikowi w drugiej [ kod]Tablica[/kod], jak mówi sam [kod]==[/" +"kod]. Oznacza to, że [code]==[/code] jest rekursywny w [code]Tablicy[/code], " +"ale nie w [code]SÅ‚owniku[/code].\n" +"Krótko mówiÄ…c, za każdym razem, gdy potencjalnie zaangażowany jest " +"[code]SÅ‚ownik[/code], jeÅ›li chcesz prawdziwego porównania uwzglÄ™dniajÄ…cego " +"zawartość, musisz użyć [code]deep_equal[/code]." #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -1379,11 +1397,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1427,37 +1446,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4583,17 +4601,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4621,9 +4646,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4647,8 +4672,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4700,6 +4728,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5216,11 +5254,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -6257,7 +6295,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7454,7 +7495,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7499,10 +7543,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7640,11 +7688,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8779,7 +8831,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -9001,7 +9053,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12116,17 +12168,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14387,7 +14439,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14483,7 +14537,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22909,6 +22965,13 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "" +"JeÅ›li [code]true[/code], potomne wÄ™zÅ‚y sÄ… sortowane. W innym przypadku jest " +"wyłączone." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26500,9 +26563,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -35058,13 +35134,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35777,6 +35853,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35849,6 +35931,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Zwraca arcus sinus parametru." @@ -35876,6 +35964,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35901,6 +35995,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Zwraca sinus parametru." @@ -36389,19 +36489,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Liczy iloczyn wektorowy tego wektora oraz [code]with[/code]." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -36420,7 +36561,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36467,6 +36611,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Zwraca sinus parametru." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36503,6 +36652,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Zwraca sinus parametru." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37691,7 +37845,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37699,8 +37853,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37994,14 +38148,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -38134,6 +38280,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38295,6 +38450,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39536,7 +39709,7 @@ msgstr "Liczy iloczyn wektorowy tego wektora oraz [code]b[/code]." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39558,7 +39731,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44932,6 +45106,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45726,6 +45909,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -49172,19 +49359,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -54027,8 +54201,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -54049,8 +54230,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/pt.po b/doc/translations/pt.po index a755e40906..7ed938659a 100644 --- a/doc/translations/pt.po +++ b/doc/translations/pt.po @@ -1439,12 +1439,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Intervalo aleatório, retorna qualquer número real entre [code]from[/code] e " "[code]to[/code].\n" @@ -1517,37 +1519,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4878,17 +4879,25 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +#, fuzzy +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "Nó Sprite que pode usar várias texturas para animação." #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4916,9 +4925,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4942,9 +4951,12 @@ msgstr "Se [code]true[/code], a textura será invertida verticalmente." msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "O recurso [SpriteFrames] que contém a(s) animação(ões)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -4997,6 +5009,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "O recurso [SpriteFrames] que contém a(s) animação(ões)." + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5515,11 +5537,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "Interpolação linear." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "Interpolação cúbica." @@ -6564,7 +6586,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7755,7 +7780,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7800,10 +7828,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7941,11 +7973,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -9080,7 +9116,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -9302,7 +9338,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12418,17 +12454,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14703,7 +14739,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14800,7 +14838,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -23230,6 +23270,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Se [code]true[/code], o áudio está sendo reproduzido." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26819,9 +26864,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -35350,13 +35408,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -36063,6 +36121,12 @@ msgid "Creates the agent." msgstr "Retorna a escala." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "Retorna [code]true[/code] se o script pode ser instanciado." @@ -36133,6 +36197,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Retorna o tamanho da textura." @@ -36160,6 +36230,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Retorna [code]true[/code] se o script pode ser instanciado." @@ -36183,6 +36259,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Define a cor da borda." @@ -36661,19 +36743,59 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml #, fuzzy -msgid "Clears the navigation mesh." -msgstr "Limpa a seleção." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Retorna o nome do nó em [code]idx[/code]." #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." @@ -36693,7 +36815,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36741,6 +36866,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Retorna o RID do ecrã usada por essa camada." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36777,6 +36907,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Retorna o RID do ecrã usada por essa camada." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37964,7 +38099,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37972,8 +38107,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -38267,14 +38402,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -38407,6 +38534,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38568,6 +38704,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39809,7 +39963,7 @@ msgstr "Retorna o tipo do nó em at [code]idx[/code]." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39831,7 +39985,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -45162,6 +45317,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45956,6 +46120,11 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +#, fuzzy +msgid "[Font] used for the labeled separator." +msgstr "Não há sugestão para a propriedade editada." + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -49402,19 +49571,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -54248,8 +54404,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -54270,8 +54433,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po index ffaf1abbfa..ed65c38cda 100644 --- a/doc/translations/pt_BR.po +++ b/doc/translations/pt_BR.po @@ -1495,12 +1495,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Intervalo aleatório, retorna qualquer número real entre [code]from[/code] e " "[code]to[/code].\n" @@ -1573,39 +1575,37 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml -#, fuzzy msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -1614,21 +1614,6 @@ msgid "" "3\n" "[/codeblock]" msgstr "" -"o intervalo fornecido. Rar tcodeJNt / codec (O tO tcodejNt / codec- 1), dois " -"argumentos (tcodelinitiall / codec, Retu rns ana rrz pode ser I arg " -"jcodejtinal- iUc. JcodeJfinat- IUcodeJ, lco adel). Retorna uma matriz vazia " -"se o intervalo não for ou três argumentos (lcc 5, -1) t / codel ou £ code s, " -"i) t / codel »ji: ode pode ter I argumento N tfcodejol / codec ta jcodeJN - " -"iUcadel) , dois argumentos (jcadejinitiat Retorna uma matriz com o intervalo " -"fornecido. lcoi Ucadel, jcodeJrinat- tUcodel) ou três argumentos Cjcode " -"tcodelfinal - ll / (pode ser negativo, tcodelfinal - it / codec se tornará " -"lco nal + ll / codec. Além disso, o init negativo. Se jcode! deve ser maior " -"que o valor final para o loop ser executado.ii [codeblockljPi print (range " -"(4)) ii print (range (2, S)) ii print (range (o, 6, 2)) ii [/ codeblocklji " -"OUtPUt: ipi [codeblockljPi to, i, 2, 3li.i to, 2, 4lij [/ codeblocklji Td " -"iterar sobre um tArrayl para trás, use: g [codeblockljPi va ra rray: t3, 6, " -"0J + va ri :: a rray.size0 - enquanto i): Oÿ11 r \"Sprint (arraytil) ii [/ " -"codeblocklji OUtPUt: ipi [codeblockljPi [/ codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -5133,17 +5118,25 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +#, fuzzy +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "Nó Sprite que pode usar várias texturas para animação." #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -5171,9 +5164,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -5197,9 +5190,12 @@ msgstr "Se [code]true[/code], a textura será invertida verticalmente." msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "O recurso [SpriteFrames] que contém a(s) animação(ões)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -5252,6 +5248,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "O recurso [SpriteFrames] que contém a(s) animação(ões)." + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5771,11 +5777,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "Interpolação linear." -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "Interpolação cúbica." @@ -6819,7 +6825,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -8025,7 +8034,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -8070,10 +8082,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -8211,11 +8227,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -9350,7 +9370,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -9572,7 +9592,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12692,17 +12712,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14984,7 +15004,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -15081,7 +15103,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -23551,6 +23575,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Retorna [code]true[/code] se o script pode ser instanciado." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -27150,9 +27179,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -35718,13 +35760,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -36438,6 +36480,12 @@ msgid "Creates the agent." msgstr "Retorna a escala." #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "Retorna [code]true[/code] se o script pode ser instanciado." @@ -36509,6 +36557,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Retorna o tamanho da textura." @@ -36536,6 +36590,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Retorna [code]true[/code] se o script pode ser instanciado." @@ -36559,6 +36619,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Define a cor da borda." @@ -37046,19 +37112,59 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml #, fuzzy -msgid "Clears the navigation mesh." -msgstr "Limpa a seleção." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Retorna o nome do nó em [code]idx[/code]." #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." @@ -37078,7 +37184,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -37127,6 +37236,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Retorna o número de nós nesta [SceneTree]." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -37163,6 +37277,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Retorna o número de nós nesta [SceneTree]." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -38351,7 +38470,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -38359,8 +38478,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -38654,14 +38773,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -38794,6 +38905,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38955,6 +39075,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -40196,7 +40334,7 @@ msgstr "Retorna o tipo do nó em at [code]idx[/code]." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -40218,7 +40356,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -45594,6 +45733,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -46390,6 +46538,11 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +#, fuzzy +msgid "[Font] used for the labeled separator." +msgstr "Nenhuma dica para a propriedade editada." + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -49837,19 +49990,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -54693,8 +54833,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -54715,8 +54862,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/ro.po b/doc/translations/ro.po index 26a7c6b2a6..eb20518c24 100644 --- a/doc/translations/ro.po +++ b/doc/translations/ro.po @@ -8,12 +8,13 @@ # Pierre Stempin <pierre.stempin@gmail.com>, 2020. # FlooferLand <yunaflarf@gmail.com>, 2021. # N3mEee <n3mebusiness@gmail.com>, 2021. +# Psynt <nichita@cadvegra.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2021-12-14 15:28+0000\n" -"Last-Translator: N3mEee <n3mebusiness@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:39+0000\n" +"Last-Translator: Psynt <nichita@cadvegra.com>\n" "Language-Team: Romanian <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/ro/>\n" "Language: ro\n" @@ -22,7 +23,7 @@ msgstr "" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\n" -"X-Generator: Weblate 4.10-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -65,73 +66,74 @@ msgid "Method Descriptions" msgstr "Descrierile Metodei" #: doc/tools/make_rst.py -#, fuzzy msgid "Theme Property Descriptions" -msgstr "Descrieri Proprietate" +msgstr "Descrieri Proprietate Tema" #: doc/tools/make_rst.py msgid "Inherits:" -msgstr "" +msgstr "Mosteneste:" #: doc/tools/make_rst.py msgid "Inherited By:" -msgstr "" +msgstr "Mostenit de:" #: doc/tools/make_rst.py msgid "(overrides %s)" -msgstr "" +msgstr "(suprascrie %s)" #: doc/tools/make_rst.py msgid "Default" -msgstr "" +msgstr "Implicit" #: doc/tools/make_rst.py msgid "Setter" -msgstr "" +msgstr "setter" #: doc/tools/make_rst.py msgid "value" -msgstr "" +msgstr "valoare" #: doc/tools/make_rst.py msgid "Getter" -msgstr "" +msgstr "getter" #: doc/tools/make_rst.py msgid "" "This method should typically be overridden by the user to have any effect." -msgstr "" +msgstr "Pentru a avea efectul dorit, metoda trebuie suprascrisa de utilizator." #: doc/tools/make_rst.py msgid "" "This method has no side effects. It doesn't modify any of the instance's " "member variables." -msgstr "" +msgstr "Metoda nu are efecte adverse. Nu modifica niciun camp al obiectului." #: doc/tools/make_rst.py msgid "" "This method accepts any number of arguments after the ones described here." -msgstr "" +msgstr "Metoda accepta oricate argumente in urma celor definite aici." #: doc/tools/make_rst.py msgid "This method is used to construct a type." -msgstr "" +msgstr "Metoda folosita la construirea unui tip." #: doc/tools/make_rst.py msgid "" "This method doesn't need an instance to be called, so it can be called " "directly using the class name." msgstr "" +"Nu e nevoie de o instanta. Metoda asta poate fi apelata direct folosind " +"numele clasei." #: doc/tools/make_rst.py msgid "" "This method describes a valid operator to use with this type as left-hand " "operand." -msgstr "" +msgstr "Operator cu tipul descris la stanga." #: modules/gdscript/doc_classes/@GDScript.xml msgid "Built-in GDScript functions." -msgstr "FuncÈ›iile incorporate GDScript." +msgstr "FuncÈ›ii incorporate GDScript." #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -156,6 +158,16 @@ msgid "" "red = Color8(255, 0, 0)\n" "[/codeblock]" msgstr "" +"Returnează o culoare construită din canalele cu valori întregi roÈ™u, verde, " +"albastru, È™i alpha. Fiecare canal ar trebui să aibă 8 biÈ›i de informaÈ›ie de " +"la 0 la 255.\n" +"[code] r8 [/code] canalul roÈ™u\n" +"[code] g8 [/code] canalul verde\n" +"[code] b8 [/code] canalul albastru\n" +"[code] a8 [/code] canalul alpha\n" +"[codeblock]\n" +"roÈ™u = Color8(255, 0 0)\n" +"[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -948,11 +960,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -996,37 +1009,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4125,17 +4137,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4163,9 +4182,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4189,8 +4208,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4242,6 +4264,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4757,11 +4789,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5796,7 +5828,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6986,7 +7021,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7031,10 +7069,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7172,11 +7214,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8311,7 +8357,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8533,7 +8579,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11644,17 +11690,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13903,7 +13949,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13999,7 +14047,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22405,6 +22455,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25989,9 +26043,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34513,13 +34580,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35225,6 +35292,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35288,6 +35361,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35314,6 +35393,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35335,6 +35420,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35807,17 +35898,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35838,7 +35969,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35884,6 +36018,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35920,6 +36058,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37104,7 +37246,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37112,8 +37254,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37407,14 +37549,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37547,6 +37681,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37708,6 +37851,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38948,7 +39109,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38970,7 +39131,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44297,6 +44459,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45090,6 +45261,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48535,19 +48710,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53377,8 +53539,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53399,8 +53568,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/ru.po b/doc/translations/ru.po index 2f27837f28..8add961f54 100644 --- a/doc/translations/ru.po +++ b/doc/translations/ru.po @@ -1531,12 +1531,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "Случайное значение Ñ Ð¿Ð»Ð°Ð²Ð°ÑŽÑ‰ÐµÐ¹ запÑтой между [code]from[/code] и [code]to[/" "code].\n" @@ -1612,37 +1614,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -1651,45 +1652,6 @@ msgid "" "3\n" "[/codeblock]" msgstr "" -"Возвращает маÑÑив Ñ Ð·Ð°Ð´Ð°Ð½Ð½Ñ‹Ð¼ диапазоном. Диапазон может быть одним " -"аргументом [code]N[/code] (от [code]0[code] до [code]N - 1[/code]), Ð´Ð²ÑƒÐ¼Ñ " -"аргументами ([code]начальное[/code], [code]поÑледнее - 1[/code]) или Ñ‚Ñ€ÐµÐ¼Ñ " -"аргументами ([code]начальное[/code], [code]поÑледнее - 1[/code], [code]шаг[/" -"code]). ЕÑли диапазон не допуÑтим, возвращает пуÑтой маÑÑив (например " -"[code]range(2, 5, -1)[/code] или [code]range(5, 5, 1)[/code]).\n" -"Возвращает маÑÑив Ñ Ð·Ð°Ð´Ð°Ð½Ð½Ñ‹Ð¼ диапазоном. Диапазон [code]range()[/code] может " -"быть одним аргументом [code]N[/code] (от [code]0[code] до [code]N - 1[/" -"code]), Ð´Ð²ÑƒÐ¼Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð°Ð¼Ð¸ ([code]начальное[/code], [code]поÑледнее - 1[/" -"code]) или Ñ‚Ñ€ÐµÐ¼Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð°Ð¼Ð¸ ([code]начальное[/code], [code]поÑледнее - 1[/" -"code], [code]шаг[/code]). [code]Шаг[/code] может быть отрицательным. ЕÑли " -"[code]шаг[/code] отрицателен, [code]поÑледний - 1[/code] Ñтанет " -"[code]поÑледний + 1[/code]. Также, чтобы цикл запуÑтилÑÑ, начальное значение " -"должно быть больше поÑледнего.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Вывод:\n" -"[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" -"[/codeblock]\n" -"Ð”Ð»Ñ Ð¿ÐµÑ€ÐµÐ±Ð¾Ñ€Ð° маÑÑива [Array] в обратном порÑдке, иÑпользуйте:\n" -"[codeblock]\n" -"var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" -"[/codeblock]\n" -"Вывод:\n" -"[codeblock]\n" -"9\n" -"6\n" -"3\n" -"[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -5411,18 +5373,27 @@ msgid "Maximum value for the mode enum." msgstr "МакÑимальное значение Ð´Ð»Ñ Ñ€ÐµÐ¶Ð¸Ð¼Ð° перечиÑлениÑ." #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +#, fuzzy +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" "Узел Sprite, который может иÑпользовать неÑколько текÑтур Ð´Ð»Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ð¸." #: doc/classes/AnimatedSprite.xml +#, fuzzy msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" "ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ ÑоздаетÑÑ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ реÑурÑа [SpriteFrames], который можно наÑтроить " "в редакторе Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ панели SpriteFrames.\n" @@ -5460,9 +5431,10 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "ОÑтанавливает текущую анимацию (не ÑбраÑывает Ñчётчик кадров)." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml +#, fuzzy msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" "Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð¸Ð· реÑурÑа [code]frames[/code]. ЕÑли изменить Ñто значение, " @@ -5488,9 +5460,12 @@ msgstr "ЕÑли [code]true[/code], текÑтура отражена по Ð²ÐµÑ msgid "The displayed animation frame's index." msgstr "Ð˜Ð½Ð´ÐµÐºÑ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÐµÐ¼Ð¾Ð³Ð¾ кадра анимации." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "РеÑÑƒÑ€Ñ [SpriteFrames], Ñодержащий анимацию(Ñ‹)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -5553,6 +5528,18 @@ msgstr "" "ВоÑпроизводит анимацию Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ [code]anim[/code]. ЕÑли [code]anim[/code] не " "указан, воÑпроизводитÑÑ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ." +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" +"Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð¸Ð· реÑурÑа [code]frames[/code]. ЕÑли изменить Ñто значение, " +"Ñчетчик кадров [code]frame[/code] ÑбраÑываетÑÑ." + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "РеÑÑƒÑ€Ñ [SpriteFrames], Ñодержащий анимацию(Ñ‹)." + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "ПрокÑи-текÑтура Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñтых покадровых анимаций." @@ -6186,11 +6173,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -7272,7 +7259,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -8535,7 +8525,10 @@ msgstr "" "Очищает маÑÑив. Ðто Ñквивалентно иÑпользованию [method resize] Ñ Ñ€Ð°Ð·Ð¼ÐµÑ€Ð¾Ð¼ " "[code]0[/code]." -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "Возвращает количеÑтво раз когда Ñлемент вÑтречаетÑÑ Ð² маÑÑиве." @@ -8587,10 +8580,15 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" "ОÑущеÑтвлÑет поиÑк Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð² маÑÑиве и возвращает Ð¸Ð½Ð´ÐµÐºÑ Ñлемента или " "[code]-1[/code] еÑли он не был найден. Дополнительно, может быть передан " @@ -8760,11 +8758,16 @@ msgstr "" "размер маÑÑива уменьшен, Ñлементы будут очищены, еÑли больший, новые " "Ñлементы уÑтановÑÑ‚ÑÑ Ð² [code]null[/code]." -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" "ОÑущеÑтвлÑет поиÑк Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ маÑÑиву в обратном порÑдке. Дополнительно, " "может быть передан начальный Ð¸Ð½Ð´ÐµÐºÑ Ð¿Ð¾Ð¸Ñка. ЕÑли он будет отрицательный " @@ -9941,7 +9944,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -10163,7 +10166,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -13298,17 +13301,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -15585,7 +15588,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -15681,7 +15686,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -24222,6 +24229,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "ЕÑли [code]true[/code], текÑтура будет центрирована." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -27821,9 +27833,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -36399,13 +36424,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -37119,6 +37144,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "Возвращает [code]true[/code] еÑли маÑÑив пуÑтой." @@ -37189,6 +37220,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Возвращает значение задержки данного кадра." @@ -37219,6 +37256,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Возвращает [code]true[/code] еÑли маÑÑив пуÑтой." @@ -37242,6 +37285,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Возвращает ÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." @@ -37728,19 +37777,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "ПредÑтавлÑет размер перечиÑÐ»ÐµÐ½Ð¸Ñ [enum Variant.Type]." #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Возвращает ÑкалÑрное произведение Ñ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð¾Ð¼ [code]b[/code]." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -37759,7 +37849,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -37806,6 +37899,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Возвращает количеÑтво дорожек в анимации." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -37842,6 +37940,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Возвращает количеÑтво дорожек в анимации." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -39113,7 +39216,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -39121,8 +39224,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -39416,14 +39519,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -39556,6 +39651,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -39717,6 +39821,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -40962,10 +41084,13 @@ msgid "Returns the tooltip of the item at index [code]idx[/code]." msgstr "Возвращает ÑкалÑрное произведение Ñ Ð²ÐµÐºÑ‚Ð¾Ñ€Ð¾Ð¼ [code]b[/code]." #: doc/classes/OptionButton.xml +#, fuzzy msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" +"УдалÑет и возвращает первый Ñлемент маÑÑива. Возвращает [code]null[/code] " +"еÑли маÑÑив пуÑтой." #: doc/classes/OptionButton.xml msgid "" @@ -40985,7 +41110,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -46367,6 +46493,18 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" +"Возвращает [code]true[/code] еÑли [code]a[/code] и [code]b[/code] " +"приблизительно равны друг другу." + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -47180,6 +47318,11 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +#, fuzzy +msgid "[Font] used for the labeled separator." +msgstr "Ðет подÑказки Ð´Ð»Ñ Ð¾Ñ‚Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ð¾Ð³Ð¾ ÑвойÑтва." + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -50639,19 +50782,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -55541,8 +55671,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -55563,8 +55700,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/sk.po b/doc/translations/sk.po index 380af3d949..0175bba4cc 100644 --- a/doc/translations/sk.po +++ b/doc/translations/sk.po @@ -935,11 +935,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -983,37 +984,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4108,17 +4108,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4146,9 +4153,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4172,8 +4179,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4225,6 +4235,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4740,11 +4760,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5779,7 +5799,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6969,7 +6992,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7014,10 +7040,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7155,11 +7185,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8294,7 +8328,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8516,7 +8550,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11627,17 +11661,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13886,7 +13920,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13982,7 +14018,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22388,6 +22426,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25972,9 +26014,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34496,13 +34551,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35208,6 +35263,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35271,6 +35332,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35297,6 +35364,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35318,6 +35391,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35790,17 +35869,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35821,7 +35940,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35867,6 +35989,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35903,6 +36029,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37087,7 +37217,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37095,8 +37225,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37390,14 +37520,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37530,6 +37652,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37691,6 +37822,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38931,7 +39080,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38953,7 +39102,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44280,6 +44430,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45073,6 +45232,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48518,19 +48681,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53360,8 +53510,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53382,8 +53539,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po index b3af766f44..da384b07a7 100644 --- a/doc/translations/sr_Cyrl.po +++ b/doc/translations/sr_Cyrl.po @@ -946,11 +946,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -994,37 +995,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4119,17 +4119,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4157,9 +4164,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4183,8 +4190,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4236,6 +4246,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4751,11 +4771,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5790,7 +5810,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6980,7 +7003,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7025,10 +7051,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7166,11 +7196,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8305,7 +8339,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8527,7 +8561,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11638,17 +11672,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13897,7 +13931,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13993,7 +14029,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22399,6 +22437,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25983,9 +26025,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34507,13 +34562,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35219,6 +35274,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35282,6 +35343,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35308,6 +35375,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35329,6 +35402,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35801,17 +35880,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35832,7 +35951,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35878,6 +36000,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35914,6 +36040,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37098,7 +37228,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37106,8 +37236,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37401,14 +37531,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37541,6 +37663,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37702,6 +37833,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38942,7 +39091,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38964,7 +39113,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44291,6 +44441,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45084,6 +45243,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48529,19 +48692,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53371,8 +53521,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53393,8 +53550,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/sv.po b/doc/translations/sv.po index 8da5285250..3a8da5d2c5 100644 --- a/doc/translations/sv.po +++ b/doc/translations/sv.po @@ -935,11 +935,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -983,37 +984,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4108,17 +4108,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4146,9 +4153,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4172,8 +4179,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4225,6 +4235,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4740,11 +4760,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5779,7 +5799,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -6969,7 +6992,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7014,10 +7040,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7155,11 +7185,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8294,7 +8328,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8516,7 +8550,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11627,17 +11661,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13886,7 +13920,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -13982,7 +14018,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22388,6 +22426,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -25969,9 +26011,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34493,13 +34548,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35205,6 +35260,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35268,6 +35329,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35294,6 +35361,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35315,6 +35388,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35787,17 +35866,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35818,7 +35937,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35864,6 +35986,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35900,6 +36026,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37084,7 +37214,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37092,8 +37222,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37387,14 +37517,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37527,6 +37649,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37688,6 +37819,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -38928,7 +39077,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -38950,7 +39099,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44277,6 +44427,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45070,6 +45229,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48515,19 +48678,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53357,8 +53507,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53379,8 +53536,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/th.po b/doc/translations/th.po index c3e896aba7..d6e08f2985 100644 --- a/doc/translations/th.po +++ b/doc/translations/th.po @@ -1020,11 +1020,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1068,37 +1069,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4209,17 +4209,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4247,9 +4254,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4273,8 +4280,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4326,6 +4336,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4841,11 +4861,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5883,7 +5903,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7074,7 +7097,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7119,10 +7145,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7260,11 +7290,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8399,7 +8433,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8621,7 +8655,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11733,17 +11767,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13994,7 +14028,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14090,7 +14126,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22497,6 +22535,10 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +msgid "If [code]true[/code], the slider is hidden." +msgstr "" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26083,9 +26125,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34662,13 +34717,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35374,6 +35429,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35440,6 +35501,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "คืนค่าà¸à¸²à¸£à¸à¸³à¸«à¸™à¸”ค่าขà¸à¸‡à¸¥à¸³à¹‚พง" @@ -35467,6 +35534,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35489,6 +35562,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "คืนค่าà¸à¸²à¸£à¸à¸³à¸«à¸™à¸”ค่าขà¸à¸‡à¸¥à¸³à¹‚พง" @@ -35963,17 +36042,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35994,7 +36113,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36040,6 +36162,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36076,6 +36202,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37313,7 +37443,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37321,8 +37451,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37616,14 +37746,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37756,6 +37878,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37917,6 +38048,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39158,7 +39307,7 @@ msgstr "คืนค่าà¸à¸²à¸£à¸à¸³à¸«à¸™à¸”ค่าขà¸à¸‡à¸¥à¸³à¹‚พ #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39180,7 +39329,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44515,6 +44665,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45309,6 +45468,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48759,19 +48922,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml #, fuzzy msgid "General-purpose 3D proximity detection node." @@ -53604,8 +53754,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53626,8 +53783,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/tl.po b/doc/translations/tl.po index 701e32eba7..938734c910 100644 --- a/doc/translations/tl.po +++ b/doc/translations/tl.po @@ -1011,11 +1011,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1059,37 +1060,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4184,17 +4184,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4222,9 +4229,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4248,8 +4255,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4301,6 +4311,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4816,11 +4836,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5855,7 +5875,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7045,7 +7068,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7090,10 +7116,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7231,11 +7261,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8370,7 +8404,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8592,7 +8626,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11707,17 +11741,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -13969,7 +14003,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14065,7 +14101,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22471,6 +22509,13 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "" +"Kung [code]true[/code], ang mga child nodes ay inaayos, kung hindi ang pag-" +"so-sort ay hindi pinapagana." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26052,9 +26097,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34579,13 +34637,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35291,6 +35349,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35357,6 +35421,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "" @@ -35383,6 +35453,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -35407,6 +35483,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "" @@ -35879,17 +35961,57 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35910,7 +36032,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -35956,6 +36081,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -35992,6 +36121,10 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37176,7 +37309,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37184,8 +37317,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37479,14 +37612,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37619,6 +37744,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37780,6 +37914,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39020,7 +39172,7 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39042,7 +39194,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44372,6 +44525,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45165,6 +45327,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48610,19 +48776,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53452,8 +53605,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53474,8 +53634,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/tr.po b/doc/translations/tr.po index 43add1da92..1ce6082001 100644 --- a/doc/translations/tr.po +++ b/doc/translations/tr.po @@ -1440,12 +1440,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "[code]from[/code] ve [code]to[/code] deÄŸerleri arasında rastgele bir kayan " "noktalı sayı üretir.\n" @@ -1523,37 +1525,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4879,17 +4880,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4917,9 +4925,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4943,8 +4951,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4996,6 +5007,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5512,11 +5533,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -6552,7 +6573,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7742,7 +7766,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7787,10 +7814,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7928,11 +7959,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -9067,7 +9102,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -9289,7 +9324,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12403,17 +12438,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14673,7 +14708,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14769,7 +14806,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -23189,6 +23228,12 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "" +"EÄŸer [code]true[/code] ise düğümler sıraya sokulur, yoksa sıraya sokulmaz." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26782,9 +26827,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -35321,13 +35379,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -36039,6 +36097,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -36110,6 +36174,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Verilen bir deÄŸerin ark-sinüsünü döndürür." @@ -36137,6 +36207,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "" @@ -36161,6 +36237,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Verilen deÄŸerin sinüsünü döndürür." @@ -36641,19 +36723,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Verilen deÄŸerin sinüsünü döndürür." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -36672,7 +36795,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36719,6 +36845,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Verilen deÄŸerin sinüsünü döndürür." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36755,6 +36886,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Verilen deÄŸerin sinüsünü döndürür." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37943,7 +38079,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37951,8 +38087,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -38246,14 +38382,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -38386,6 +38514,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38547,6 +38684,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39788,7 +39943,7 @@ msgstr "Verilen deÄŸerin sinüsünü döndürür." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39810,7 +39965,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -45173,6 +45329,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45967,6 +46132,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -49413,19 +49582,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -54264,8 +54420,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -54286,8 +54449,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/uk.po b/doc/translations/uk.po index 9ec0d5c89f..4122854441 100644 --- a/doc/translations/uk.po +++ b/doc/translations/uk.po @@ -17,8 +17,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-04-08 07:11+0000\n" -"Last-Translator: Гліб Соколов <ramithes@i.ua>\n" +"PO-Revision-Date: 2022-05-15 09:39+0000\n" +"Last-Translator: МироÑлав <hlopukmyroslav@gmail.com>\n" "Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/" "godot-class-reference/uk/>\n" "Language: uk\n" @@ -27,7 +27,7 @@ msgstr "" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -1078,11 +1078,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1126,37 +1127,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4258,17 +4258,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4296,9 +4303,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4322,8 +4329,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4375,6 +4385,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4891,11 +4911,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5931,7 +5951,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7127,7 +7150,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7172,10 +7198,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7313,11 +7343,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8452,7 +8486,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8674,7 +8708,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11789,17 +11823,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14054,7 +14088,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14150,7 +14186,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -18042,7 +18080,7 @@ msgstr "" #: modules/csg/doc_classes/CSGShape.xml modules/csg/doc_classes/CSGSphere.xml #: modules/csg/doc_classes/CSGTorus.xml msgid "Prototyping levels with CSG" -msgstr "" +msgstr "ÐŸÑ€Ð¾Ñ‚Ð¾Ñ‚Ð¸Ð¿ÑƒÐ²Ð°Ð½Ð½Ñ Ñ€Ñ–Ð²Ð½Ñ–Ð² з CSG" #: modules/csg/doc_classes/CSGBox.xml msgid "Depth of the box measured from the center of the box." @@ -22566,6 +22604,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Повертає коÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26151,9 +26194,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34690,13 +34746,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35409,6 +35465,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35478,6 +35540,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Повертає аркÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." @@ -35505,6 +35573,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Повертає коÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." @@ -35528,6 +35602,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Повертає ÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." @@ -36007,19 +36087,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "ОбчиÑлює векторний добуток двох векторів та [code]with[/code]." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -36038,7 +36159,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36084,6 +36208,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Повертає ÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36120,6 +36249,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Повертає ÑÐ¸Ð½ÑƒÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37308,7 +37442,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37316,8 +37450,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37611,14 +37745,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37751,6 +37877,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37912,6 +38047,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39153,7 +39306,7 @@ msgstr "ОбчиÑлює векторний добуток цього векто #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39175,7 +39328,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44529,6 +44683,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45323,6 +45486,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48769,19 +48936,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53613,8 +53767,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53635,8 +53796,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/vi.po b/doc/translations/vi.po index ab2fc3dc93..524c18e6c9 100644 --- a/doc/translations/vi.po +++ b/doc/translations/vi.po @@ -1295,11 +1295,12 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1343,37 +1344,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4544,17 +4544,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4582,9 +4589,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4608,9 +4615,12 @@ msgstr "Nếu [code]true[/code] thì láºt dá»c há»a tiết." msgid "The displayed animation frame's index." msgstr "Số thứ tá»± khung hình cá»§a hoạt ảnh Ä‘ang chạy." -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "Tà i nguyên [SpriteFrames] chứa (các) hoạt ảnh." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -4665,6 +4675,16 @@ msgstr "" "Chạy hoạt ảnh tên là [code]anim[/code]. Nếu không cung cấp [code]anim[/code] " "nà o, thì chạy hoạt ảnh hiện tại." +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "Tà i nguyên [SpriteFrames] chứa (các) hoạt ảnh." + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -5191,11 +5211,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -6231,7 +6251,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7422,7 +7445,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7467,10 +7493,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7608,11 +7638,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8747,7 +8781,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8969,7 +9003,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -12084,17 +12118,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14350,7 +14384,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14446,7 +14482,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22866,6 +22904,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "Nếu [code]true[/code], há»a tiết sẽ được căn ở trung tâm." + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26452,9 +26495,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34988,13 +35044,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35706,6 +35762,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "Nếu [code]true[/code], há»a tiết sẽ được căn ở trung tâm." @@ -35776,6 +35838,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "Trả vá» [Texture2D] cá»§a khung hình được cho." @@ -35803,6 +35871,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "Nếu [code]true[/code], há»a tiết sẽ được căn ở trung tâm." @@ -35826,6 +35900,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "Trả vá» sin cá»§a tham số." @@ -36306,19 +36386,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "Trả vá» sin cá»§a tham số." + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -36337,7 +36458,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36384,6 +36508,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "Trả vá» sin cá»§a tham số." + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36420,6 +36549,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "Trả vá» sin cá»§a tham số." + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37608,7 +37742,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37616,8 +37750,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37911,14 +38045,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -38051,6 +38177,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -38212,6 +38347,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39453,7 +39606,7 @@ msgstr "Trả vá» sin cá»§a tham số." #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39475,7 +39628,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44837,6 +44991,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45632,6 +45795,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -49081,19 +49248,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53930,8 +54084,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53952,8 +54113,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/doc/translations/zh_CN.po b/doc/translations/zh_CN.po index 984600883d..cbef0b9212 100644 --- a/doc/translations/zh_CN.po +++ b/doc/translations/zh_CN.po @@ -62,7 +62,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine class reference\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-05-04 09:18+0000\n" +"PO-Revision-Date: 2022-05-14 20:22+0000\n" "Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n" "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/" "godot-engine/godot-class-reference/zh_Hans/>\n" @@ -71,7 +71,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: doc/tools/make_rst.py msgid "Description" @@ -957,7 +957,6 @@ msgstr "" "值,请将其与 [method ease] 或 [method smoothstep] 组åˆã€‚" #: modules/gdscript/doc_classes/@GDScript.xml -#, fuzzy msgid "" "Linearly interpolates between two angles (in radians) by a normalized " "value.\n" @@ -992,7 +991,12 @@ msgstr "" " var max_angle = deg2rad(90.0)\n" " rotation = lerp_angle(min_angle, max_angle, elapsed)\n" " elapsed += delta\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]注æ„:[/b]这个方法会通过 [code]from[/code] å’Œ [code]to[/code] 之间的最çŸè·¯" +"径进行线性æ’值。然而,当这两个角度相è·å¤§è‡´ [code]PI + k * TAU[/code] å…¶ä¸ " +"[code]k[/code] ä¸ºä»»æ„æ•´æ•°æ—¶ï¼Œç”±äºŽæµ®ç‚¹æ•°ç²¾åº¦è¯¯å·®çš„缘故,è¦å¯¹æ’值的方å‘进行判æ–" +"是很难的。例如,[code]lerp_angle(0, PI, weight)[/code] 会逆时针æ’值,而 " +"[code]lerp_angle(0, PI + 5 * TAU, weight)[/code] 则会顺时针æ’值。" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -1444,12 +1448,14 @@ msgstr "" "[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml +#, fuzzy msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" "éšæœºèŒƒå›´ï¼Œ[code]from[/code] å’Œ [code]to[/code] 之间的任何浮点值。\n" "[codeblock]\n" @@ -1517,37 +1523,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -1556,43 +1561,6 @@ msgid "" "3\n" "[/codeblock]" msgstr "" -"返回一个具有给定范围的数组。范围å¯ä»¥æ˜¯ä¸€ä¸ªå‚æ•°[code]N[/code](0 到 [code]N[/" -"code] - 1ï¼‰ï¼Œä¸¤ä¸ªå‚æ•°ï¼ˆåˆå§‹ [code]initial[/code]ã€æœ€ç»ˆ [code]final -1[/" -"code]ï¼‰æˆ–ä¸‰ä¸ªå‚æ•°ï¼ˆåˆå§‹ [code]initial[/code]ã€æœ€ç»ˆ [code]final -1[/code]ã€å¢ž" -"é‡ [code]increment[/code]ï¼‰ã€‚èŒƒå›´æ— æ•ˆæ—¶è¿”å›žä¸€ä¸ªç©ºæ•°ç»„ï¼ˆä¾‹å¦‚ [code]range(2, " -"5, -1)[/code] 或 [code]range(5, 5, 1)[/code])。\n" -"返回一个具有给定范围的数组。[code]range()[/code] å¯ä»¥æ˜¯ä¸€ä¸ªå‚æ•° [code]N[/" -"code](0 到 [code]N[/code] - 1ï¼‰ï¼Œä¸¤ä¸ªå‚æ•°ï¼ˆåˆå§‹ [code]initial[/code]ã€æœ€ç»ˆ " -"[code]final -1[/code]ï¼‰æˆ–ä¸‰ä¸ªå‚æ•°ï¼ˆåˆå§‹[code]initial[/code]ã€æœ€ç»ˆ " -"[code]final -1[/code]ã€å¢žé‡ [code]increment[/code]ï¼‰ã€‚å¢žé‡ [code]increment[/" -"code] å¯ä»¥æ˜¯è´Ÿæ•°ã€‚å¦‚æžœå¢žé‡ [code]increment[/code] 是负的,[code]final-1[/" -"code] å°†å˜æˆ [code]final+1[/code]。å¦å¤–,åˆå§‹å€¼å¿…须大于最终值,循环æ‰èƒ½è¿" -"行。\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"输出:\n" -"[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" -"[/codeblock]\n" -"è¦å¯¹ä¸€ä¸ªæ•°ç»„ [Array] 进行逆åºè¿ä»£ï¼Œè¯·ä½¿ç”¨ï¼š\n" -"[codeblock]\n" -"var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" -"[/codeblock]\n" -"输出:\n" -"[codeblock]\n" -"9\n" -"6\n" -"3\n" -"[/codeblock]" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" @@ -5086,17 +5054,26 @@ msgid "Maximum value for the mode enum." msgstr "模å¼åˆ—举的最大值。" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +#, fuzzy +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "å¯ä»¥ä½¿ç”¨å¤šä¸ªçº¹ç†è¿›è¡ŒåŠ¨ç”»å¤„ç†çš„ç²¾çµèŠ‚ç‚¹ã€‚" #: doc/classes/AnimatedSprite.xml +#, fuzzy msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" "动画通过一个 [SpriteFrames] 资æºåˆ›å»ºï¼Œè€Œè¯¥èµ„æºå¯ä»¥é€šè¿‡åŠ¨ç”»å¸§é¢æ¿åœ¨ç¼–辑器ä¸é…" "置。\n" @@ -5133,9 +5110,10 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "åœæ¢æ’放当å‰åŠ¨ç”»ï¼ˆä¸ä¼šé‡ç½®å¸§è®¡æ•°å™¨ï¼‰ã€‚" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml +#, fuzzy msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" "æ¥è‡ª [code]frames[/code] 资æºçš„当å‰åŠ¨ç”»ã€‚å¦‚æžœè¿™ä¸ªå€¼å‘生å˜åŒ–,[code]frame[/" @@ -5161,9 +5139,12 @@ msgstr "为 [code]true[/code] 时纹ç†å°†è¢«åž‚直翻转。" msgid "The displayed animation frame's index." msgstr "显示的动画帧的索引。" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." -msgstr "包å«åŠ¨ç”»çš„ [SpriteFrames] 资æºã€‚" +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." +msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml #: doc/classes/SpriteBase3D.xml @@ -5219,6 +5200,18 @@ msgstr "" "æ’æ”¾å为 [code]anim[/code] 的动画。如果没有æä¾› [code]anim[/code]ï¼Œåˆ™æ’æ”¾å½“å‰" "动画。" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" +"æ¥è‡ª [code]frames[/code] 资æºçš„当å‰åŠ¨ç”»ã€‚å¦‚æžœè¿™ä¸ªå€¼å‘生å˜åŒ–,[code]frame[/" +"code] 计数器会被é‡ç½®ã€‚" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "包å«åŠ¨ç”»çš„ [SpriteFrames] 资æºã€‚" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "基于简å•帧动画的代ç†çº¹ç†ã€‚" @@ -5860,11 +5853,11 @@ msgstr "动画轨é“会在其他 [AnimationPlayer] èŠ‚ç‚¹ä¸æ’放动画。" msgid "No interpolation (nearest value)." msgstr "æ— æ’值(最邻近的值)。" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "线性æ’值。" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "三次æ’值。" @@ -7076,11 +7069,15 @@ msgid "" msgstr "将键值为[code]name[/code]的现有动画é‡å‘½å为[code]newname[/code]。" #: doc/classes/AnimationPlayer.xml +#, fuzzy msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" "将动画寻é“到时间点 [code]seconds[/code](å•ä½ä¸ºç§’)。[code]update[/code] 为 " "[code]true[/code] æ—¶ä¼šåŒæ—¶æ›´æ–°åŠ¨ç”»ï¼Œå¦åˆ™ä¼šåœ¨å¤„ç†æ—¶æ›´æ–°ã€‚当å‰å¸§å’Œ " @@ -8614,7 +8611,10 @@ msgid "" "[code]0[/code]." msgstr "清空数组。与调用 [method resize] 时指定大å°ä¸º [code]0[/code] ç‰ä»·ã€‚" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "è¿”å›žå…ƒç´ åœ¨æ•°ç»„ä¸å‡ºçŽ°çš„æ¬¡æ•°ã€‚" @@ -8667,11 +8667,23 @@ msgid "" "array.fill(0) # Initialize the 10 elements to 0.\n" "[/codeblock]" msgstr "" +"将该数组ä¸çš„æ‰€æœ‰å…ƒç´ 都设置为给定的值。通常与 [method resize] 一起使用,用于创" +"å»ºç»™å®šå¤§å°æ•°ç»„å¹¶å¯¹å…¶å…ƒç´ è¿›è¡Œåˆå§‹åŒ–:\n" +"[codeblock]\n" +"var array = []\n" +"array.resize(10)\n" +"array.fill(0) # å°† 10 ä¸ªå…ƒç´ éƒ½åˆå§‹åŒ–为 0。\n" +"[/codeblock]" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" "åœ¨æ•°ç»„ä¸æŸ¥æ‰¾æŒ‡å®šçš„值,返回对应的索引,未找到时返回 [code]-1[/code]。还å¯ä»¥ä¼ " "å…¥æœç´¢èµ·å§‹ä½ç½®çš„索引。" @@ -8865,11 +8877,16 @@ msgstr "" "调整数组至包å«ä¸åŒæ•°é‡çš„å…ƒç´ ã€‚å¦‚æžœæ•°ç»„å˜å°åˆ™æ¸…é™¤å¤šä½™å…ƒç´ ï¼Œå˜å¤§åˆ™æ–°å…ƒç´ 为 " "[code]null[/code]。" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml +#, fuzzy msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" "é€†åºæœç´¢æ•°ç»„。还å¯ä»¥ä¼ å…¥æœç´¢èµ·å§‹ä½ç½®çš„索引,如果为负数,则起始ä½ç½®ä»Žæ•°ç»„的末" "尾开始计算。" @@ -10107,9 +10124,8 @@ msgstr "" #: doc/classes/PanelContainer.xml doc/classes/ScrollContainer.xml #: doc/classes/SplitContainer.xml doc/classes/TabContainer.xml #: doc/classes/VBoxContainer.xml doc/classes/VSplitContainer.xml -#, fuzzy msgid "GUI containers" -msgstr "选项å¡å®¹å™¨ã€‚" +msgstr "GUI 容器" #: doc/classes/AspectRatioContainer.xml msgid "Specifies the horizontal relative position of child controls." @@ -10275,10 +10291,11 @@ msgstr "" "注æ„这个函数éšè—在默认的 [code]AStar[/code] ç±»ä¸ã€‚" #: doc/classes/AStar.xml +#, fuzzy msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -10582,10 +10599,11 @@ msgstr "" "请注æ„,这个函数éšè—在默认的 [code]AStar2D[/code] ç±»ä¸ã€‚" #: doc/classes/AStar2D.xml +#, fuzzy msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -13418,14 +13436,13 @@ msgstr "" "å¯ä»¥è€ƒè™‘使用 [Quat] æž„é€ å‡½æ•°ä»£æ›¿ï¼Œå®ƒä½¿ç”¨å››å…ƒç»„ä»£æ›¿æ¬§æ‹‰è§’ã€‚" #: doc/classes/Basis.xml -#, fuzzy msgid "" "Constructs a pure rotation basis matrix, rotated around the given " "[code]axis[/code] by [code]angle[/code] (in radians). The axis must be a " "normalized vector." msgstr "" -"æž„é€ ä¸€ä¸ªçº¯æ—‹è½¬çš„åŸºçŸ©é˜µï¼Œå›´ç»•ç»™å®šçš„ [code]axis[/code] 旋转 [code]phi[/code] 个" -"弧度。轴必须是归一化å‘é‡ã€‚" +"æž„é€ ä¸€ä¸ªçº¯æ—‹è½¬çš„åŸºçŸ©é˜µï¼Œå›´ç»•ç»™å®šçš„è½´ [code]axis[/code] 旋转 [code]angle[/" +"code](å•ä½ä¸ºå¼§åº¦ï¼‰ã€‚该轴必须是归一化å‘é‡ã€‚" #: doc/classes/Basis.xml msgid "Constructs a basis matrix from 3 axis vectors (matrix columns)." @@ -13509,12 +13526,12 @@ msgstr "" "的)。这将在矩阵的基上执行 Gram-Schmidt æ£äº¤åŒ–。" #: doc/classes/Basis.xml -#, fuzzy msgid "" "Introduce an additional rotation around the given axis by [code]angle[/code] " "(in radians). The axis must be a normalized vector." msgstr "" -"围绕给定轴线引入一个é¢å¤–的旋转phi(弧度)。该轴必须是一个归一化的å‘é‡ã€‚" +"围绕给定轴线引入一个é¢å¤–的旋转 [code]angle[/code](å•ä½ä¸ºå¼§åº¦ï¼‰ã€‚该轴必须是一" +"个归一化的å‘é‡ã€‚" #: doc/classes/Basis.xml msgid "" @@ -14234,9 +14251,8 @@ msgid "Emitted when one of the buttons of the group is pressed." msgstr "当该组ä¸çš„一个按钮被按下时触å‘。" #: doc/classes/CallbackTweener.xml -#, fuzzy msgid "Calls the specified method after optional delay." -msgstr "é”定指定的线性或旋转轴。" +msgstr "在å¯é€‰çš„延迟之åŽè°ƒç”¨æŒ‡å®šçš„æ–¹æ³•。" #: doc/classes/CallbackTweener.xml msgid "" @@ -14246,6 +14262,10 @@ msgid "" "to create [CallbackTweener]. Any [CallbackTweener] created manually will not " "function correctly." msgstr "" +"[CallbackTweener] å¯ç”¨äºŽåœ¨è¡¥é—´åºåˆ—ä¸è°ƒç”¨æ–¹æ³•。更多用法信æ¯è¯·å‚阅 [method " +"SceneTreeTween.tween_callback]。\n" +"[b]注æ„:[/b]创建 [CallbackTweener] 的唯一æ£ç¡®æ–¹æ³•是 [method SceneTreeTween." +"tween_callback]。任何手动创建的 [CallbackTweener] éƒ½æ— æ³•æ£å¸¸å·¥ä½œã€‚" #: doc/classes/CallbackTweener.xml msgid "" @@ -14256,6 +14276,12 @@ msgid "" "after 2 seconds\n" "[/codeblock]" msgstr "" +"让该回调延迟给定的时间,å•ä½ä¸ºç§’。示例:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback(queue_free).set_delay(2) # 会在 2 ç§’åŽè°ƒç”¨ " +"queue_free()\n" +"[/codeblock]" #: doc/classes/Camera.xml msgid "Camera node, displays from a point of view." @@ -14354,21 +14380,23 @@ msgstr "" "å¹³é¢è·ç¦»ç›¸æœºçš„场景为给定的 [code]z_depth[/code] è·ç¦»ã€‚" #: doc/classes/Camera.xml +#, fuzzy msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" "返回世界空间ä¸çš„æ³•线å‘é‡ï¼Œå³ç›¸æœºæŠ•影在[Viewport]矩形上投影一个点的结果。这对" "äºŽä»¥åŽŸç‚¹ã€æ³•线,投射光线形å¼ç”¨äºŽå¯¹è±¡ç›¸äº¤æˆ–拾å–很有用。" #: doc/classes/Camera.xml +#, fuzzy msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" "返回世界空间ä¸çš„ 3D åæ ‡ï¼Œå³ç›¸æœºæŠ•影在 [Viewport] 矩形上投影一个点的结果。这" "å¯¹äºŽä»¥åŽŸç‚¹ã€æ³•线,投射光线形å¼ç”¨äºŽå¯¹è±¡ç›¸äº¤æˆ–拾å–很有用。" @@ -15191,6 +15219,15 @@ msgid "" "mipmaps to perform antialiasing. 2D batching is also still supported with " "those antialiased lines." msgstr "" +"在给定的角度之间绘制未填充的弧形。[code]point_count[/code] 的值越大,曲线越平" +"滑。å¦è¯·å‚阅 [method draw_circle]。\n" +"[b]注æ„:[/b]如果 [code]antialiased[/code] 为 [code]true[/code],那么线段的绘" +"制就ä¸ä¼šè¢«åˆ†æ‰¹åŠ é€Ÿã€‚\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedRegularPolygon2D 节点。该节点的抗锯齿是使用带有自定义 mipmap " +"的纹ç†è¿›è¡Œçš„。这些抗锯齿线段ä»ç„¶æ”¯æŒ 2D 分批。" #: doc/classes/CanvasItem.xml msgid "" @@ -15210,6 +15247,13 @@ msgid "" "create an AntialiasedRegularPolygon2D node. That node relies on a texture " "with custom mipmaps to perform antialiasing." msgstr "" +"绘制未填充的彩色圆形。å¦è¯·å‚阅 [method draw_arc]ã€[method draw_polyline]ã€" +"[method draw_polygon]。\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedRegularPolygon2D 节点。该节点的抗锯齿是使用带有自定义 mipmap " +"的纹ç†è¿›è¡Œçš„。" #: doc/classes/CanvasItem.xml msgid "" @@ -15223,6 +15267,13 @@ msgid "" "AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " "to perform antialiasing." msgstr "" +"ç»˜åˆ¶ä»»æ„æ•°é‡é¡¶ç‚¹çš„彩色多边形,凹凸å‡å¯ã€‚与 [method draw_polygon] ä¸åŒï¼Œæ•´ä¸ªå¤š" +"边形åªèƒ½æŒ‡å®šä¸€ç§é¢œè‰²ã€‚\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedPolygon2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†" +"进行的。" #: doc/classes/CanvasItem.xml msgid "" @@ -15239,6 +15290,15 @@ msgid "" "perform antialiasing. 2D batching is also still supported with those " "antialiased lines." msgstr "" +"在两个 2D 点之间绘制给定颜色和宽度的线段。å¯ä»¥æ‰“开抗锯齿。å¦è¯·å‚阅 [method " +"draw_multiline] å’Œ [method draw_polyline]。\n" +"[b]注æ„:[/b]如果 [code]antialiased[/code] 为 [code]true[/code],那么线段的绘" +"制就ä¸ä¼šè¢«åˆ†æ‰¹åŠ é€Ÿã€‚\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedLine2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†è¿›è¡Œ" +"的。这些抗锯齿线段ä»ç„¶æ”¯æŒ 2D 分批。" #: doc/classes/CanvasItem.xml msgid "" @@ -15248,7 +15308,6 @@ msgstr "" "使用所æä¾›çš„纹ç†ä»¥ 2D æ–¹å¼ç»˜åˆ¶ä¸€ä¸ª [Mesh]。相关文档请å‚阅 [MeshInstance2D]。" #: doc/classes/CanvasItem.xml -#, fuzzy msgid "" "Draws multiple disconnected lines with a uniform [code]color[/code]. When " "drawing large amounts of lines, this is faster than using individual [method " @@ -15265,11 +15324,13 @@ msgstr "" "使用å•一颜色 [code]color[/code] 绘制多æ¡ä¸ç›¸è¿žçš„直线。绘制大é‡ç›´çº¿æ—¶ï¼Œæ¯”å•独" "调用 [method draw_line] è¦å¿«ã€‚è¦ç»˜åˆ¶ç›¸è¿žçš„直线,请æ¢ç”¨ [method " "draw_polyline]。\n" -"[b]注æ„:[/b]ç›®å‰æœªå®žçް [code]width[/code] å’Œ [code]antialiased[/code],没有" -"效果。" +"[b]注æ„:[/b]ç›®å‰å°šæœªå®žçް [code]width[/code] å’Œ [code]antialiased[/code],ä¸" +"会产生任何效果。作为替代方案,请安装[url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’件并创建 " +"AntialiasedLine2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†è¿›è¡Œçš„。" +"这些抗锯齿线段ä»ç„¶æ”¯æŒ 2D 分批。" #: doc/classes/CanvasItem.xml -#, fuzzy msgid "" "Draws multiple disconnected lines with a uniform [code]width[/code] and " "segment-by-segment coloring. Colors assigned to line segments match by index " @@ -15289,8 +15350,11 @@ msgstr "" "线段的颜色使用 [code]points[/code] å’Œ [code]colors[/code] 的索引进行匹é…。绘" "制大é‡ç›´çº¿æ—¶ï¼Œæ¯”å•独调用 [method draw_line] è¦å¿«ã€‚è¦ç»˜åˆ¶ç›¸è¿žçš„直线,请æ¢ç”¨ " "[method draw_polyline_colors]。\n" -"[b]注æ„:[/b]ç›®å‰æœªå®žçް [code]width[/code] å’Œ [code]antialiased[/code],没有" -"效果。" +"[b]注æ„:[/b]ç›®å‰å°šæœªå®žçް [code]width[/code] å’Œ [code]antialiased[/code],ä¸" +"会产生任何效果。作为替代方案,请安装[url=https://github.com/godot-extended-" +"libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’件并创建 " +"AntialiasedLine2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†è¿›è¡Œçš„。" +"这些抗锯齿线段ä»ç„¶æ”¯æŒ 2D 分批。" #: doc/classes/CanvasItem.xml msgid "" @@ -15313,9 +15377,16 @@ msgid "" "AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " "to perform antialiasing." msgstr "" +"ç»˜åˆ¶ä»»æ„æ•°é‡é¡¶ç‚¹çš„彩色多边形,凹凸å‡å¯ã€‚与 [method draw_colored_polygon] ä¸" +"åŒï¼Œå¯ä»¥å•独修改å„个顶点的颜色。å¦è¯·å‚阅 [method draw_polyline] å’Œ [method " +"draw_polyline_colors]。\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedPolygon2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†" +"进行的。" #: doc/classes/CanvasItem.xml -#, fuzzy msgid "" "Draws interconnected line segments with a uniform [code]color[/code] and " "[code]width[/code] and optional antialiasing. When drawing large amounts of " @@ -15332,10 +15403,14 @@ msgstr "" "使用å•一颜色 [code]color[/code] 和宽度 [code]width[/code] 绘制多æ¡ç›¸è¿žçš„线" "段,还å¯ä»¥é€‰æ‹©æŠ—锯齿。绘制大é‡ç›´çº¿æ—¶ï¼Œæ¯”å•独调用 [method draw_line] è¦å¿«ã€‚è¦" "绘制ä¸ç›¸è¿žçš„直线,请æ¢ç”¨ [method draw_multiline]。å¦è¯·å‚阅 [method " -"draw_polygon]。" +"draw_polygon]。\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedPolygon2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†" +"进行的。" #: doc/classes/CanvasItem.xml -#, fuzzy msgid "" "Draws interconnected line segments with a uniform [code]width[/code] and " "segment-by-segment coloring, and optional antialiasing. Colors assigned to " @@ -15353,7 +15428,12 @@ msgstr "" "使用å•一宽度 [code]width[/code] 绘制多æ¡ç›¸è¿žçš„直线,ä¸åŒçº¿æ®µé¢œè‰²å¯ä»¥ä¸åŒã€‚线" "段的颜色使用 [code]points[/code] å’Œ [code]colors[/code] 的索引进行匹é…。绘制" "大é‡ç›´çº¿æ—¶ï¼Œæ¯”å•独调用 [method draw_line] è¦å¿«ã€‚è¦ç»˜åˆ¶ä¸ç›¸è¿žçš„直线,请æ¢ç”¨ " -"[method draw_multiline_colors]。å¦è¯·å‚阅 [method draw_polygon]。" +"[method draw_multiline_colors]。å¦è¯·å‚阅 [method draw_polygon]。\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedPolygon2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†" +"进行的。" #: doc/classes/CanvasItem.xml msgid "" @@ -15369,7 +15449,6 @@ msgstr "" "draw_polygon]ã€[method draw_rect]。" #: doc/classes/CanvasItem.xml -#, fuzzy msgid "" "Draws a rectangle. If [code]filled[/code] is [code]true[/code], the " "rectangle will be filled with the [code]color[/code] specified. If " @@ -15391,7 +15470,12 @@ msgstr "" "[code]color[/code]å’Œ[code]width[/code]指定的笔画形å¼ç»˜åˆ¶ã€‚如果" "[code]antialiased[/code]是[code]true[/code]ï¼Œçº¿æ¡æŠ—é”¯é½¿ã€‚\n" "[b]注æ„:[/b][code]width[/code]å’Œ[code]antialiased[/code]åªæœ‰åœ¨[code]filled[/" -"code]是[code]false[/code] æ—¶æ‰æœ‰æ•ˆã€‚" +"code]是[code]false[/code] æ—¶æ‰æœ‰æ•ˆã€‚\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedPolygon2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†" +"进行的。" #: doc/classes/CanvasItem.xml msgid "" @@ -17059,9 +17143,12 @@ msgid "If [code]true[/code], no collisions will be detected." msgstr "如果[code]true[/code],将ä¸ä¼šæ£€æµ‹åˆ°ç¢°æ’žã€‚" #: doc/classes/CollisionPolygon2D.xml +#, fuzzy msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" "如果[code]true[/code],相对于[CollisionPolygon2D]çš„æ—‹è½¬è€Œè¨€ï¼Œåªæœ‰é¢æœä¸Šçš„边缘" "æ‰ä¼šä¸Žå…¶ä»–对象å‘生碰撞。" @@ -17171,9 +17258,12 @@ msgstr "" "改å˜ã€‚" #: doc/classes/CollisionShape2D.xml +#, fuzzy msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "设置æ¤ç¢°æ’žå½¢çŠ¶æ˜¯å¦ä»…应检测到一侧(顶部或底部)的碰撞。" #: doc/classes/CollisionShape2D.xml @@ -19735,6 +19825,9 @@ msgid "" "[method Viewport.gui_is_drag_successful].\n" "Best used with [constant Node.NOTIFICATION_DRAG_END]." msgstr "" +"如果拖放æ“作æˆåŠŸåˆ™è¿”å›ž [code]true[/code],是 [method Viewport." +"gui_is_drag_successful] 的替代方案。\n" +"建议与 [constant Node.NOTIFICATION_DRAG_END] é…åˆä½¿ç”¨ã€‚" #: doc/classes/Control.xml msgid "" @@ -20636,7 +20729,7 @@ msgid "" "an item, like a node in the Scene dock." msgstr "" "当用户悬åœåœ¨èŠ‚ç‚¹ä¸Šæ—¶ï¼Œæ˜¾ç¤ºç³»ç»Ÿçš„æ‹–åŠ¨é¼ æ ‡å…‰æ ‡ï¼Œé€šå¸¸æ˜¯ä¸€ä¸ªé—åˆçš„æ‹³å¤´æˆ–åå—符" -"å·ã€‚å®ƒå‘Šè¯‰ç”¨æˆ·ä»–ä»¬å½“å‰æ£åœ¨æ‹–动一个项目,就åƒåœºæ™¯ç 头ä¸çš„èŠ‚ç‚¹ä¸€æ ·ã€‚" +"å·ã€‚å®ƒå‘Šè¯‰ç”¨æˆ·ä»–ä»¬å½“å‰æ£åœ¨æ‹–åŠ¨ä¸€ä¸ªé¡¹ç›®ï¼Œä¾‹å¦‚åœºæ™¯é¢æ¿ä¸çš„节点。" #: doc/classes/Control.xml msgid "" @@ -24385,7 +24478,6 @@ msgstr "" "返回[enum Error]代ç 常é‡ä¹‹ä¸€ï¼ˆæˆåŠŸæ—¶è¿”å›ž [code]OK[/code])。" #: doc/classes/Directory.xml -#, fuzzy msgid "" "Permanently deletes the target file or an empty directory. The argument can " "be relative to the current directory, or an absolute path. If the target " @@ -24394,9 +24486,10 @@ msgid "" "move_to_trash] instead.\n" "Returns one of the [enum Error] code constants ([code]OK[/code] on success)." msgstr "" -"åˆ é™¤ç›®æ ‡æ–‡ä»¶æˆ–ç©ºç›®å½•ã€‚å‚æ•°å¯ä»¥æ˜¯ç›¸å¯¹äºŽå½“å‰ç›®å½•的,也å¯ä»¥æ˜¯ç»å¯¹è·¯å¾„ã€‚å¦‚æžœç›®æ ‡" -"ç›®å½•ä¸æ˜¯ç©ºçš„,æ“作将失败。\n" -"返回[enum Error]代ç 常é‡ä¹‹ä¸€(æˆåŠŸæ—¶è¿”å›ž [code]OK[/code])。" +"æ°¸ä¹…åˆ é™¤ç›®æ ‡æ–‡ä»¶æˆ–ç©ºç›®å½•ã€‚å‚æ•°å¯ä»¥æ˜¯ç›¸å¯¹äºŽå½“å‰ç›®å½•的,也å¯ä»¥æ˜¯ç»å¯¹è·¯å¾„。如果" +"ç›®æ ‡ç›®å½•ä¸æ˜¯ç©ºçš„,æ“作将失败。\n" +"å¦‚æžœä½ ä¸æƒ³æ°¸ä¹…åˆ é™¤è¯¥æ–‡ä»¶/目录,请使用 [method OS.move_to_trash] 代替。\n" +"返回 [enum Error] 代ç 常é‡ä¹‹ä¸€ï¼ˆæˆåŠŸæ—¶è¿”å›ž [code]OK[/code])。" #: doc/classes/Directory.xml msgid "" @@ -25330,7 +25423,7 @@ msgstr "釿–°å¯¼å…¥èµ„æºæ—¶è§¦å‘。" #: doc/classes/EditorFileSystem.xml msgid "" "Emitted if at least one resource is reloaded when the filesystem is scanned." -msgstr "å¦‚æžœåœ¨æ‰«ææ–‡ä»¶ç³»ç»Ÿçš„æ—¶å€™å‘现至少一个资æºè¢«é‡è½½é‚£ä¹ˆè§¦å‘ä¿¡å·ã€‚" +msgstr "å¦‚æžœåœ¨æ‰«ææ–‡ä»¶ç³»ç»Ÿçš„æ—¶å€™ï¼Œè‡³å°‘有一个资æºè¢«é‡æ–°åŠ è½½ï¼Œåˆ™è§¦å‘该信å·ã€‚" #: doc/classes/EditorFileSystem.xml msgid "Emitted if the source of any imported file changed." @@ -28036,6 +28129,11 @@ msgstr "" "这个 [Control] èŠ‚ç‚¹åœ¨ç¼–è¾‘å™¨çš„æ£€æŸ¥å™¨é¢æ¿ä¸ä½¿ç”¨ï¼Œå…许编辑数值。å¯ä»¥ä¸Ž " "[EditorInspectorPlugin] ä¸€èµ·ä½¿ç”¨ï¼Œä»¥é‡æ–°åˆ›å»ºç›¸åŒçš„行为。" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "如果[code]true[/code],éšè—折å ç®å¤´ã€‚" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -28575,7 +28673,6 @@ msgid "" msgstr "如果游æˆåœ¨æ¸¸æˆå¾ªçŽ¯çš„å›ºå®šè¿‡ç¨‹å’Œç‰©ç†é˜¶æ®µå†…,返回 [code]true[/code]。" #: doc/classes/Engine.xml -#, fuzzy msgid "" "If [code]true[/code], the script is currently running inside the editor. " "This is useful for [code]tool[/code] scripts to conditionally draw editor " @@ -28605,8 +28702,8 @@ msgstr "" "else:\n" " simulate_physics()\n" "[/codeblock]\n" -"更多信æ¯è¯·å‚阅文档[url=$DOCS_URL/tutorials/misc/running_code_in_the_editor." -"html]《在编辑器ä¸è¿è¡Œä»£ç 》[/url]。\n" +"更多信æ¯è¯·å‚阅文档[url=$DOCS_URL/tutorials/plugins/" +"running_code_in_the_editor.html]《在编辑器ä¸è¿è¡Œä»£ç 》[/url]。\n" "[b]注æ„:[/b]è¦æ£€æµ‹è„šæœ¬æ˜¯å¦ä»Žç¼–辑器[i]构建[/i]ä¸è¿è¡Œï¼ˆä¾‹å¦‚按 [code]F5[/code] " "时),请使用带有 [code]\"editor\"[/code] 傿•°çš„ [method OS.has_feature] 代" "替。[code]OS.has_feature(\"editor\")[/code] 当代ç 在编辑器ä¸è¿è¡Œå’Œä»Žç¼–辑器ä¸" @@ -29445,23 +29542,24 @@ msgstr "" "屿¨¡ç³Šæ•ˆæžœï¼Œä½¿å…¶ä¸ŽåŽŸå§‹å›¾åƒçš„亮度相匹é…。" #: doc/classes/Environment.xml -#, fuzzy msgid "" "Linear tonemapper operator. Reads the linear data and passes it on " "unmodified. This can cause bright lighting to look blown out, with " "noticeable clipping in the output colors." -msgstr "çº¿æ€§éŸ³é¢‘æ˜ å°„å™¨æ“作者。读å–线性数æ®å¹¶ä¸åŠ ä¿®æ”¹åœ°ä¼ é€’ã€‚" +msgstr "" +"çº¿æ€§è‰²è°ƒæ˜ å°„è¿ç®—å。读å–线性数æ®å¹¶å°†å…¶åŽŸæ ·ä¼ é€’ã€‚è¾ƒäº®çš„å…‰ç…§ä¼šå¯¼è‡´è¿‡æ›ã€è¾“出的" +"颜色ä¸ä¼šæœ‰å¯è§çš„æˆªæ–。" #: doc/classes/Environment.xml -#, fuzzy msgid "" "Reinhardt tonemapper operator. Performs a variation on rendered pixels' " "colors by this formula: [code]color = color / (1 + color)[/code]. This " "avoids clipping bright highlights, but the resulting image can look a bit " "dull." msgstr "" -"Reinhardt tonemapperè¿ç®—器。通过这个公å¼å¯¹æ¸²æŸ“åƒç´ 的颜色进行å˜åŒ–。" -"[code]color = color / (1 + color)[/code]." +"Reinhardt è‰²è°ƒæ˜ å°„è¿ç®—å。对渲染åŽçš„åƒç´ 颜色进行调整,使用的是这个公å¼ï¼š" +"[code]color = color / (1 + color)[/code]。å¯ä»¥é¿å…对高光的截æ–,但最终的图åƒ" +"å¯èƒ½çœ‹ä¸ŠåŽ»æœ‰äº›å¯¡æ·¡ã€‚" #: doc/classes/Environment.xml msgid "" @@ -29469,6 +29567,8 @@ msgid "" "resulting image that usually looks more vivid than [constant " "TONE_MAPPER_REINHARDT]." msgstr "" +"ç”µå½±çº§è‰²è°ƒæ˜ å°„å™¨è¿ç®—å。å¯ä»¥é¿å…对高光处的截æ–,最终图åƒé€šå¸¸æ¯” [constant " +"TONE_MAPPER_REINHARDT] 更鲜艳。" #: doc/classes/Environment.xml msgid "" @@ -29480,6 +29580,12 @@ msgid "" "[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " "of the more accurate [constant TONE_MAPPER_ACES_FITTED]." msgstr "" +"使用旧有的 Godot 版本的å¦é™¢è‰²å½©ç¼–ç 系统(Academy Color Encoding System)色调" +"æ˜ å°„å™¨ã€‚ä¸Ž [constant TONE_MAPPER_ACES_FITTED] ä¸åŒï¼Œè¿™ä¸ªç‰ˆæœ¬çš„ ACES 对较亮的" +"光照的处ç†ä»Žç‰©ç†è§’度看并ä¸ç²¾ç¡®ã€‚ACES 的输出在对比度方é¢é€šå¸¸æ¯” [constant " +"TONE_MAPPER_REINHARDT] å’Œ [constant TONE_MAPPER_FILMIC] 更高。\n" +"[b]注æ„:[/b]Godot 4.0 ä¸ä¼šç§»é™¤è¿™ä¸ªè‰²è°ƒæ˜ å°„è¿ç®—å,使用更精确的 [constant " +"TONE_MAPPER_ACES_FITTED]。" #: doc/classes/Environment.xml msgid "" @@ -29489,6 +29595,10 @@ msgid "" "has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] " "and [constant TONE_MAPPER_FILMIC]." msgstr "" +"使用å¦é™¢è‰²å½©ç¼–ç 系统(Academy Color Encoding Systemï¼‰è‰²è°ƒæ˜ å°„å™¨ã€‚ä¸Žå…¶ä»–é€‰é¡¹ç›¸" +"比,ACES çš„æ¶ˆè€—ç•¥é«˜ï¼Œä½†å¯¹äºŽè¾ƒäº®çš„å…‰ç…§çš„å¤„ç†æ›´çœŸå®žï¼Œè¶Šäº®é¥±å’Œåº¦è¶Šä½Žã€‚ACES 的输" +"出在对比度方é¢é€šå¸¸æ¯” [constant TONE_MAPPER_REINHARDT] å’Œ [constant " +"TONE_MAPPER_FILMIC] 更高。" #: doc/classes/Environment.xml msgid "Low depth-of-field blur quality (fastest)." @@ -32533,9 +32643,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "æ¸å˜çš„颜色,以 [PoolColorArray] 返回。" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "æ¸å˜çš„åç§»é‡ï¼Œä»¥ [PoolRealArray] 返回。" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "æ¸å˜å¡«å……纹ç†ã€‚" @@ -35426,7 +35549,6 @@ msgid "Importing images" msgstr "导入图åƒ" #: doc/classes/Image.xml -#, fuzzy msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " "at coordinates [code]dest[/code], clipped accordingly to both image bounds. " @@ -35434,13 +35556,11 @@ msgid "" "[code]src_rect[/code] with not positive size is treated as empty." msgstr "" "å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] å¤åˆ¶åˆ°æœ¬å›¾åƒä»Žå" -"æ ‡ [code]dst[/code] 起的区域。如果é®ç½©å›¾ [code]mask[/code] 上æŸä¸ªåƒç´ çš„ " -"Alpha å€¼éž 0,就会把 [code]src[/code] 上对应的åƒç´ å¤åˆ¶åˆ° [code]dst[/code] " -"上。[code]src[/code] 图åƒå’Œ [code]mask[/code] 图åƒçš„大å°ï¼ˆå®½åº¦å’Œé«˜åº¦ï¼‰[b]å¿…é¡»" -"[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚" +"æ ‡ [code]dst[/code] èµ·çš„åŒºåŸŸï¼Œä¼šæ ¹æ®ä¸¤è€…的图åƒåŒºåŸŸè¿›è¡Œè£å‰ªã€‚è¿™å¼ å›¾åƒå’Œ " +"[code]src[/code] 图åƒçš„æ ¼å¼[b]å¿…é¡»[/b]一致。[code]src_rect[/code] 的大å°å¦‚æžœ" +"éžæ£ï¼Œåˆ™ä¼šä½œä¸ºç©ºçŸ©å½¢å¤„ç†ã€‚" #: doc/classes/Image.xml -#, fuzzy msgid "" "Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image " "using [code]mask[/code] image at coordinates [code]dst[/code], clipped " @@ -35453,14 +35573,15 @@ msgid "" "[code]src_rect[/code] with not positive size is treated as empty." msgstr "" "å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] 与本图åƒä»Žåæ ‡ " -"[code]dst[/code] èµ·çš„åŒºåŸŸæ ¹æ®é®ç½©å›¾åƒ [code]mask[/code] 进行 Alpha æ··åˆã€‚" -"[code]src[/code] å’Œ [code]mask[/code] éƒ½éœ€è¦æœ‰ Alpha 通é“。如果æŸä¸ªé®ç½©åƒç´ " -"çš„ Alpha å€¼éž 0,在 [code]dst[/code] å’Œ [code]src[/code] 上对应的åƒç´ 就会进行" -"æ··åˆã€‚[code]src[/code] 图åƒå’Œ [code]mask[/code] 图åƒçš„大å°ï¼ˆå®½åº¦å’Œé«˜åº¦ï¼‰[b]å¿…" -"é¡»[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚" +"[code]dst[/code] èµ·çš„åŒºåŸŸæ ¹æ®é®ç½©å›¾åƒ [code]mask[/code] 进行 Alpha æ··åˆï¼Œä¼šæ ¹" +"æ®ä¸¤è€…的图åƒåŒºåŸŸè¿›è¡Œè£å‰ªã€‚[code]src[/code] å’Œ [code]mask[/code] éƒ½éœ€è¦æœ‰ " +"Alpha 通é“。如果æŸä¸ªé®ç½©åƒç´ çš„ Alpha å€¼éž 0,在 [code]dst[/code] å’Œ " +"[code]src[/code] 上对应的åƒç´ 就会进行混åˆã€‚è¿™å¼ å›¾åƒä¸Ž [code]src[/code] 图åƒçš„" +"æ ¼å¼[b]å¿…é¡»[/b]一致。[code]src[/code] 图åƒå’Œ [code]mask[/code] 图åƒçš„大å°ï¼ˆå®½" +"度和高度)[b]å¿…é¡»[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚[code]src_rect[/code] 的大å°å¦‚æžœéž" +"æ£ï¼Œåˆ™ä¼šä½œä¸ºç©ºçŸ©å½¢å¤„ç†ã€‚" #: doc/classes/Image.xml -#, fuzzy msgid "" "Copies [code]src_rect[/code] from [code]src[/code] image to this image at " "coordinates [code]dst[/code], clipped accordingly to both image bounds. This " @@ -35468,13 +35589,11 @@ msgid "" "[code]src_rect[/code] with not positive size is treated as empty." msgstr "" "å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] å¤åˆ¶åˆ°æœ¬å›¾åƒä»Žå" -"æ ‡ [code]dst[/code] 起的区域。如果é®ç½©å›¾ [code]mask[/code] 上æŸä¸ªåƒç´ çš„ " -"Alpha å€¼éž 0,就会把 [code]src[/code] 上对应的åƒç´ å¤åˆ¶åˆ° [code]dst[/code] " -"上。[code]src[/code] 图åƒå’Œ [code]mask[/code] 图åƒçš„大å°ï¼ˆå®½åº¦å’Œé«˜åº¦ï¼‰[b]å¿…é¡»" -"[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚" +"æ ‡ [code]dst[/code] èµ·çš„åŒºåŸŸï¼Œä¼šæ ¹æ®ä¸¤è€…的图åƒåŒºåŸŸè¿›è¡Œè£å‰ªã€‚è¿™å¼ å›¾åƒå’Œ " +"[code]src[/code] 图åƒçš„æ ¼å¼[b]å¿…é¡»[/b]一致。[code]src_rect[/code] 的大å°å¦‚æžœ" +"éžæ£ï¼Œåˆ™ä¼šä½œä¸ºç©ºçŸ©å½¢å¤„ç†ã€‚" #: doc/classes/Image.xml -#, fuzzy msgid "" "Blits [code]src_rect[/code] area from [code]src[/code] image to this image " "at the coordinates given by [code]dst[/code], clipped accordingly to both " @@ -35486,10 +35605,12 @@ msgid "" "positive size is treated as empty." msgstr "" "å°†æºå›¾åƒ [code]src[/code] 上的矩形区域 [code]src_rect[/code] å¤åˆ¶åˆ°æœ¬å›¾åƒä»Žå" -"æ ‡ [code]dst[/code] 起的区域。如果é®ç½©å›¾ [code]mask[/code] 上æŸä¸ªåƒç´ çš„ " -"Alpha å€¼éž 0,就会把 [code]src[/code] 上对应的åƒç´ å¤åˆ¶åˆ° [code]dst[/code] " -"上。[code]src[/code] 图åƒå’Œ [code]mask[/code] 图åƒçš„大å°ï¼ˆå®½åº¦å’Œé«˜åº¦ï¼‰[b]å¿…é¡»" -"[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚" +"æ ‡ [code]dst[/code] èµ·çš„åŒºåŸŸï¼Œä¼šæ ¹æ®ä¸¤è€…的图åƒåŒºåŸŸè¿›è¡Œè£å‰ªã€‚如果é®ç½©å›¾ " +"[code]mask[/code] 上æŸä¸ªåƒç´ çš„ Alpha å€¼éž 0,就会把 [code]src[/code] 上对应的" +"åƒç´ å¤åˆ¶åˆ° [code]dst[/code] ä¸Šã€‚è¿™å¼ å›¾åƒå’Œ [code]src[/code] 图åƒçš„æ ¼å¼[b]å¿…é¡»" +"[/b]一致。[code]src[/code] 图åƒå’Œ [code]mask[/code] 图åƒçš„大å°ï¼ˆå®½åº¦å’Œé«˜åº¦ï¼‰" +"[b]å¿…é¡»[/b]相åŒï¼Œæ ¼å¼å¯ä»¥ä¸åŒã€‚[code]src_rect[/code] 的大å°å¦‚æžœéžæ£ï¼Œåˆ™ä¼šä½œä¸º" +"空矩形处ç†ã€‚" #: doc/classes/Image.xml msgid "" @@ -37186,7 +37307,6 @@ msgid "Stops the vibration of the joypad." msgstr "åœæ¢æ¸¸æˆæ‰‹æŸ„的振动。" #: doc/classes/Input.xml -#, fuzzy msgid "" "Vibrate Android and iOS devices.\n" "[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] " @@ -37196,7 +37316,8 @@ msgid "" msgstr "" "振动 Android å’Œ iOS 设备。\n" "[b]注æ„:[/b]Android 需è¦å¯¼å‡ºè®¾ç½®ä¸çš„ [code]VIBRATE[/code] æƒé™ã€‚ iOS 䏿”¯æŒ" -"æŒç»æ—¶é—´ã€‚" +"æŒç»æ—¶é—´ã€‚\n" +"[b]注æ„:[/b]在 iOS å¹³å°ä¸Šï¼ŒiOS 13 åŠä¹‹åŽçš„ç‰ˆæœ¬æ‰æ”¯æŒæŒ‡å®šæŒç»æ—¶é—´ã€‚" #: doc/classes/Input.xml msgid "" @@ -38162,6 +38283,10 @@ msgid "" "your project's input binds from the editor, read the [code]input/*[/code] " "settings from [ProjectSettings]." msgstr "" +"返回与给定动作关è”çš„ [InputEvent] 的数组。\n" +"[b]注æ„:[/b]在编辑器ä¸ä½¿ç”¨æ—¶ï¼ˆä¾‹å¦‚在工具脚本或 [EditorPlugin] ä¸ä½¿ç”¨ï¼‰ï¼Œè¿™ä¸ª" +"æ–¹æ³•è¿”å›žçš„æ˜¯ç¼–è¾‘å™¨åŠ¨ä½œå¯¹åº”çš„äº‹ä»¶ã€‚å¦‚æžœä½ æƒ³è¦åœ¨ç¼–辑器ä¸è®¿é—®ä½ 的项目的输入绑" +"å®šï¼Œè¯·è¯»å– [ProjectSettings] çš„ [code]input/*[/code] 设置。" #: doc/classes/InputMap.xml msgid "Returns an array of all actions in the [InputMap]." @@ -38349,7 +38474,7 @@ msgstr "ç›®æ ‡çš„[NodePath]。" #: doc/classes/IntervalTweener.xml msgid "Creates an idle interval in a [SceneTreeTween] animation." -msgstr "" +msgstr "在 [SceneTreeTween] 动画ä¸åˆ›å»ºç©ºé—²é—´éš”。" #: doc/classes/IntervalTweener.xml msgid "" @@ -38359,6 +38484,10 @@ msgid "" "to create [IntervalTweener]. Any [IntervalTweener] created manually will not " "function correctly." msgstr "" +"[IntervalTweener] å¯ç”¨äºŽåœ¨è¡¥é—´åºåˆ—ä¸åˆ¶ä½œå»¶è¿Ÿã€‚更多用法信æ¯è¯·å‚阅 [method " +"SceneTreeTween.tween_interval]。\n" +"[b]注æ„:[/b]创建 [IntervalTweener] 的唯一æ£ç¡®æ–¹æ³•是 [method SceneTreeTween." +"tween_interval]。任何手动创建的 [IntervalTweener] éƒ½æ— æ³•æ£å¸¸å·¥ä½œã€‚" #: doc/classes/IP.xml msgid "Internet protocol (IP) support functions such as DNS resolution." @@ -40886,7 +41015,6 @@ msgid "A 2D line." msgstr "ä¸€æ¡ 2D 线。" #: doc/classes/Line2D.xml -#, fuzzy msgid "" "A line through several points in 2D space. Supports varying width and color " "over the line's length, texturing, and several cap/joint types.\n" @@ -40896,9 +41024,10 @@ msgid "" "[member ProjectSettings.rendering/limits/buffers/" "canvas_polygon_index_buffer_size_kb]." msgstr "" -"在 2D 空间ä¸é€šè¿‡å‡ 个点的线。\n" -"[b]注æ„:[/b]默认情况下,Godot一次最多åªèƒ½ç»˜åˆ¶ 4,096 个多边形点。è¦å¢žåŠ è¿™ä¸ªé™" -"åˆ¶ï¼Œè¯·æ‰“å¼€é¡¹ç›®è®¾ç½®ï¼Œå¢žåŠ [member ProjectSettings.rendering/limits/buffers/" +"在 2D 空间ä¸é€šè¿‡å‡ 个点的线。支æŒå®½åº¦å’Œé¢œè‰²æ²¿ç€çº¿æ®µé•¿åº¦å˜åŒ–,支æŒçº¹ç†åŠè‹¥å¹²ç«¯" +"点/交点类型。\n" +"[b]注æ„:[/b]默认情况下,Godot 一次最多åªèƒ½ç»˜åˆ¶ 4,096 个多边形点。è¦å¢žåŠ è¿™ä¸ª" +"é™åˆ¶ï¼Œè¯·æ‰“å¼€é¡¹ç›®è®¾ç½®ï¼Œå¢žåŠ [member ProjectSettings.rendering/limits/buffers/" "canvas_polygon_buffer_size_kb] å’Œ [member ProjectSettings.rendering/limits/" "buffers/canvas_polygon_index_buffer_size_kb]。" @@ -40956,6 +41085,15 @@ msgid "" "perform antialiasing. 2D batching is also still supported with those " "antialiased lines." msgstr "" +"为 [code]true[/code] 时,会å°è¯•对线段的边缘进行抗锯齿处ç†ï¼Œæ–¹æ³•是在边缘绘制一" +"薄层 OpenGL 平滑线段。\n" +"[b]注æ„:[/b]如果 [member antialiased] 为 [code]true[/code],那么 Line2D å°±ä¸" +"ä¼šè¢«åˆ†æ‰¹åŠ é€Ÿã€‚\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedLine2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†è¿›è¡Œ" +"的。这些抗锯齿线段ä»ç„¶æ”¯æŒ 2D 分批。" #: doc/classes/Line2D.xml msgid "" @@ -43174,7 +43312,7 @@ msgstr "è®¾ç½®ç”¨äºŽç»˜åˆ¶çš„ç½‘æ ¼ï¼Œè¯¥ç½‘æ ¼å¿…é¡»ä½¿ç”¨2D顶点。" #: doc/classes/MethodTweener.xml msgid "" "Interpolates an abstract value and supplies it to a method called over time." -msgstr "" +msgstr "对抽象值进行æ’值,并将其æä¾›ç»™ä¸€ä¸ªæŒç»è°ƒç”¨çš„æ–¹æ³•。" #: doc/classes/MethodTweener.xml msgid "" @@ -43186,25 +43324,34 @@ msgid "" "create [MethodTweener]. Any [MethodTweener] created manually will not " "function correctly." msgstr "" +"[MethodTweener] 类似于 [CallbackTweener] å’Œ [PropertyTweener] 的组åˆï¼Œä¼šå°†æ’" +"值åŽçš„å€¼ä½œä¸ºè°ƒç”¨æ–¹æ³•æ—¶çš„å‚æ•°ã€‚更多用法信æ¯è¯·å‚阅 [method SceneTreeTween." +"tween_method]。\n" +"[b]注æ„:[/b]创建 [MethodTweener] 的唯一æ£ç¡®æ–¹æ³•是 [method SceneTreeTween." +"tween_method]。任何手动创建的 [MethodTweener] éƒ½æ— æ³•æ£å¸¸å·¥ä½œã€‚" #: doc/classes/MethodTweener.xml msgid "" "Sets the time in seconds after which the [MethodTweener] will start " "interpolating. By default there's no delay." -msgstr "" +msgstr "设置该 [MethodTweener] 开始æ’值的时间,å•ä½ä¸ºç§’ã€‚é»˜è®¤æ— å»¶è¿Ÿã€‚" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" +"设置所使用的缓动类型 [enum Tween.EaseType]。如果没有设置,则使用包å«è¿™ä¸ª " +"Tweener çš„ [SceneTreeTween] 的默认缓动类型。" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " "this Tweener." msgstr "" +"设置所使用的过渡类型 [enum Tween.TransitionType]。如果没有设置,则使用包å«è¿™" +"个 Tweener çš„ [SceneTreeTween] 的默认过渡类型。" #: modules/mobile_vr/doc_classes/MobileVRInterface.xml msgid "Generic mobile VR implementation." @@ -43757,8 +43904,8 @@ msgid "" "method or property for all RPC calls, making it unavailable. Default for all " "methods." msgstr "" -"与[method Node.rpc_config]或[method Node.rset_config]一起使用,å¯ä»¥åœ¨æ‰€æœ‰RPC" -"调用ä¸ç¦ç”¨æŸä¸ªæ–¹æ³•或属性,使其ä¸å¯ç”¨ã€‚所有方法的默认值。" +"与 [method Node.rpc_config] 或 [method Node.rset_config] 一起使用,å¯ä»¥åœ¨æ‰€" +"有 RPC 调用ä¸ç¦ç”¨æŸä¸ªæ–¹æ³•或属性,使其ä¸å¯ç”¨ã€‚所有方法的默认值。" #: doc/classes/MultiplayerAPI.xml msgid "" @@ -43768,9 +43915,10 @@ msgid "" "changes are accepted from all remote peers, no matter if they are node's " "master or puppets." msgstr "" -"与[method Node.rpc_config]或[method Node.rset_config]一起使用,用于设置åªåœ¨è¿œ" -"程端调用æŸä¸ªæ–¹æ³•æˆ–æ”¹å˜æŸä¸ªå±žæ€§ï¼Œè€Œä¸æ˜¯åœ¨æœ¬åœ°ã€‚类似于[code]remote[/code]关键" -"å—。所有远程对ç‰ä½“的调用和属性改å˜éƒ½è¢«æŽ¥å—,ä¸ç®¡å®ƒä»¬æ˜¯èŠ‚ç‚¹çš„ä¸»æŽ§è¿˜æ˜¯å‚€å„¡ã€‚" +"与 [method Node.rpc_config] 或 [method Node.rset_config] 一起使用,用于设置åª" +"在远程端调用æŸä¸ªæ–¹æ³•æˆ–æ”¹å˜æŸä¸ªå±žæ€§ï¼Œè€Œä¸æ˜¯åœ¨æœ¬åœ°ã€‚类似于 [code]remote[/code] " +"关键å—。所有远程对ç‰ä½“的调用和属性改å˜éƒ½è¢«æŽ¥å—,ä¸ç®¡å®ƒä»¬æ˜¯èŠ‚ç‚¹çš„ä¸»æŽ§è¿˜æ˜¯å‚€" +"儡。" #: doc/classes/MultiplayerAPI.xml msgid "" @@ -43782,7 +43930,7 @@ msgid "" msgstr "" "与 [method Node.rpc_config] 或 [method Node.rset_config] 一起用于设置è¦è°ƒç”¨çš„" "方法或仅在æ¤èŠ‚ç‚¹çš„ç½‘ç»œä¸»æœºä¸Šæ›´æ”¹çš„å±žæ€§ã€‚ç±»ä¼¼äºŽ [code]master[/code] 关键å—。仅" -"接å—节点网络傀儡的方法调用或属性更改,请å‚阅[method Node." +"接å—节点网络傀儡的方法调用或属性更改,请å‚阅 [method Node." "set_network_master]。" #: doc/classes/MultiplayerAPI.xml @@ -43795,7 +43943,7 @@ msgid "" msgstr "" "与 [method Node.rpc_config] 或 [method Node.rset_config] 一起使用,以设置仅在" "æ¤èŠ‚ç‚¹çš„å‚€å„¡ä¸Šè°ƒç”¨çš„æ–¹æ³•æˆ–æ”¹å˜çš„属性。类似于 [code]puppet[/code] 关键å—ã€‚åªæŽ¥" -"å—æ¥è‡ªèŠ‚ç‚¹çš„ç½‘ç»œä¸»ç«™çš„è°ƒç”¨æˆ–å±žæ€§æ›´æ”¹ï¼Œè§[method Node.set_network_master]。" +"å—æ¥è‡ªèŠ‚ç‚¹çš„ç½‘ç»œä¸»ç«™çš„è°ƒç”¨æˆ–å±žæ€§æ›´æ”¹ï¼Œè§ [method Node.set_network_master]。" #: doc/classes/MultiplayerAPI.xml msgid "" @@ -44097,6 +44245,15 @@ msgid "Creates the agent." msgstr "创建代ç†ã€‚" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +#, fuzzy +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" +"返回键为 [code]name[/code] çš„ [Animation] 动画,未找到时为 [code]null[/" +"code]。" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "如果地图在上一帧å‘生了改å˜ï¼Œåˆ™è¿”回 [code]true[/code]。" @@ -44167,6 +44324,12 @@ msgid "Create a new map." msgstr "åˆ›å»ºä¸€å¼ æ–°åœ°å›¾ã€‚" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns the map cell size." msgstr "返回地图的å•å…ƒæ ¼å¤§å°ã€‚" @@ -44193,6 +44356,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "返回从原点到终点的导航路径。" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map is active." msgstr "如果地图处于活动状æ€ï¼Œåˆ™è¿”回 [code]true[/code]。" @@ -44214,6 +44383,12 @@ msgid "Creates a new region." msgstr "创建一个新的地区。" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Sets the map for the region." msgstr "设置该地区的地图。" @@ -44764,18 +44939,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "表示 [enum SourceGeometryMode] 枚举的大å°ã€‚" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +#, fuzzy +msgid "Helper class for creating and clearing navigation meshes." msgstr "è¿™ä¸ªç±»è´Ÿè´£å¯¼èˆªç½‘æ ¼çš„åˆ›å»ºå’Œæ¸…ç†ã€‚" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." -msgstr "çƒ˜ç„™å¯¼èˆªç½‘æ ¼ã€‚å¯ä»¥ç”¨äºŽå¯¼èˆªç³»ç»Ÿä¸çš„寻路。" +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." +msgstr "" + +#: doc/classes/NavigationMeshGenerator.xml +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." +msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." -msgstr "æ¸…é™¤å¯¼èˆªç½‘æ ¼ã€‚" +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "移除å为 [code]name[/code] çš„ä¸»é¢˜å›¾æ ‡è¦†ç›–é¡¹ã€‚" #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." @@ -44791,14 +45008,23 @@ msgstr "" "[Navigation] 节点什么å¯ä»¥å¯¼èˆªã€ä»€ä¹ˆä¸å¯ä»¥ã€‚应该是 [Navigation] 节点的å节点。" #: doc/classes/NavigationMeshInstance.xml +#, fuzzy msgid "" "Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/" "code] (default), the baking is done on a separate thread. Baking on separate " "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." -msgstr "" +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." +msgstr "" +"烘焙该 [NavigationMesh]。如果 [code]on_thread[/code] 为 [code]true[/code](默" +"认),就会在å•独的线程ä¸è¿›è¡Œçƒ˜ç„™ã€‚å•å¼€çº¿ç¨‹çƒ˜ç„™å¾ˆæœ‰ç”¨ï¼Œå› ä¸ºå¯¼èˆªçƒ˜ç„™æ“作的消耗" +"å¹¶ä¸ä½Žã€‚烘焙完æˆåŽä¼šè‡ªåŠ¨è®¾ç½®æ–°çš„ [NavigationMesh]。请注æ„ï¼Œå¦‚æžœå‡ ä½•ä½“æ˜¯ä»Žç½‘æ ¼" +"è§£æžè€Œæ¥çš„,那么å•开线程烘焙å¯èƒ½ä¼šéžå¸¸æ…¢ï¼Œå› ä¸ºå¯¹ç½‘æ ¼çš„å¼‚æ¥è®¿é—®æ¶‰åŠåˆ°å¤§é‡åŒæ¥" +"æ“作。" #: doc/classes/NavigationMeshInstance.xml msgid "" @@ -44807,6 +45033,9 @@ msgid "" "identify the [NavigationMeshInstance] closest to a point on the merged " "navigation map." msgstr "" +"返回这个区域在 [NavigationServer] 上的 [RID]。å¯ä»¥å’Œ [method " +"NavigationServer.map_get_closest_point_owner] 组åˆä½¿ç”¨ï¼ŒèŽ·å–åˆå¹¶åŽçš„导航图ä¸" +"与æŸä¸ªç‚¹æœ€æŽ¥è¿‘çš„ [NavigationMeshInstance]。" #: doc/classes/NavigationMeshInstance.xml msgid "Determines if the [NavigationMeshInstance] is enabled or disabled." @@ -44846,6 +45075,11 @@ msgid "" msgstr "返回该障ç¢ç‰©çš„导航系统所使用的 [Navigation] 节点。" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "返回区域的第n个形状的[RID]。" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -44888,6 +45122,11 @@ msgid "" msgstr "返回该障ç¢ç‰©çš„导航系统所使用的 [Navigation2D] 节点。" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "返回区域的第n个形状的[RID]。" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -45028,6 +45267,9 @@ msgid "" "identify the [NavigationPolygonInstance] closest to a point on the merged " "navigation map." msgstr "" +"返回这个区域在 [Navigation2DServer] 上的 [RID]。å¯ä»¥å’Œ [method " +"Navigation2DServer.map_get_closest_point_owner] 组åˆä½¿ç”¨ï¼ŒèŽ·å–åˆå¹¶åŽçš„导航图" +"ä¸ä¸ŽæŸä¸ªç‚¹æœ€æŽ¥è¿‘çš„ [NavigationPolygonInstance]。" #: doc/classes/NavigationServer.xml msgid "Server interface for low-level 3D navigation access." @@ -46055,7 +46297,6 @@ msgstr "" "是“å¤å„¿â€ï¼‰ã€‚" #: doc/classes/Node.xml -#, fuzzy msgid "" "Adds a child node. Nodes can have any number of children, but every child " "must have a unique name. Child nodes are automatically deleted when the " @@ -46095,7 +46336,7 @@ msgstr "" "[/codeblock]\n" "[b]注æ„:[/b]如果想è¦å°†å节点æŒä¹…化进 [PackedScene],除了调用 [method " "add_child] ä¹‹å¤–ä½ è¿˜å¿…é¡»è®¾ç½® [member owner]。通常在[url=$DOCS_URL/tutorials/" -"misc/running_code_in_the_editor.html]工具脚本[/url]å’Œ[url=$DOCS_URL/" +"plugins/running_code_in_the_editor.html]工具脚本[/url]å’Œ[url=$DOCS_URL/" "tutorials/plugins/editor/index.html]编辑器æ’ä»¶[/url]ä¸ä¼šç”¨åˆ°ã€‚如果调用了 " "[method add_child] 但没有设置 [member owner],那么新建的这个 [Node] åœ¨åœºæ™¯æ ‘" "ä¸ä¸å¯è§ï¼Œä½†åœ¨ 2D/3D 视图ä¸å¯è§ã€‚" @@ -46154,6 +46395,10 @@ msgid "" "get_tree().create_tween().bind_node(self)\n" "[/codeblock]" msgstr "" +"新建 [SceneTreeTween] 并将其绑定到这个节点。与如下æ“作ç‰ä»·ï¼š\n" +"[codeblock]\n" +"get_tree().create_tween().bind_node(self)\n" +"[/codeblock]" #: doc/classes/Node.xml msgid "" @@ -46497,9 +46742,10 @@ msgstr "" "如果本地系统是æ¤èŠ‚ç‚¹çš„ä¸»ç³»ç»Ÿï¼ˆç”¨äºŽå¤šäººæ¸¸æˆï¼‰ï¼Œåˆ™è¿”回 [code]true[/code]。" #: doc/classes/Node.xml +#, fuzzy msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -46510,9 +46756,10 @@ msgstr "" "å¯ç”¨æ’值。å¯ä»¥ä½¿ç”¨ [method is_physics_interpolated_and_enabled] 进行检查。" #: doc/classes/Node.xml +#, fuzzy msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -46805,7 +47052,7 @@ msgstr "" "å¯é€‰æ‹©å°†æ‰€æœ‰é™„åŠ å‚æ•°ä½œä¸ºå‚æ•°å‘é€ç»™ RPC 调用的方法。调用请求将åªè¢«å…·æœ‰ç›¸åŒ " "[NodePath] 的节点接收,包括完全相åŒçš„节点å称。行为å–决于给定方法的 RPC é…" "ç½®ï¼Œè§ [method rpc_config]。方法在默认情况下ä¸ä¼šæš´éœ²ç»™ RPC。å‚阅 [method " -"rset] å’Œ[ method rset_config] 的属性。返回一个空的 [Variant]。\n" +"rset] å’Œ[method rset_config] 的属性。返回一个空的 [Variant]。\n" "[b]注æ„:[/b]åªæœ‰åœ¨ä½ 从 [SceneTree] 收到 [code]connected_to_server[/code] ä¿¡" "å·ä¹‹åŽï¼Œä½ æ‰èƒ½å®‰å…¨åœ°åœ¨å®¢æˆ·ç«¯ä½¿ç”¨ RPCã€‚ä½ è¿˜éœ€è¦è·Ÿè¸ªè¿žæŽ¥çжæ€ï¼Œå¯ä»¥é€šè¿‡ " "[code]server_disconnected[/code] ç‰ [SceneTree] ä¿¡å·æˆ–者检查 [code]SceneTree." @@ -46860,9 +47107,9 @@ msgid "" "rset_config]. See also [method rpc] for RPCs for methods, most information " "applies to this method as well." msgstr "" -"在其他对ç‰ä½“上远程改å˜ä¸€ä¸ªå±žæ€§çš„值(和本地)。行为å–决于给定属性的RPCé…置,è§" -"[method rset_config]。关于方法的RPC,也请å‚阅[method rpc],大多数信æ¯ä¹Ÿé€‚用于" -"这个方法。" +"在其他对ç‰ä½“上远程改å˜ä¸€ä¸ªå±žæ€§çš„值(和本地)。行为å–决于给定属性的RPCé…置," +"è§ [method rset_config]。关于方法的RPC,也请å‚阅 [method rpc],大多数信æ¯ä¹Ÿé€‚" +"用于这个方法。" #: doc/classes/Node.xml msgid "" @@ -46925,16 +47172,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" -"å¯ç”¨æˆ–ç¦ç”¨è¯¥èŠ‚ç‚¹çš„ç‰©ç†æ’值,å¯ä»¥åœ¨å¼€å…³å…¨å±€ç‰©ç†æ’值的基础上进行微调。\n" -"[b]注æ„:[/b]对 [Camera] 尤其有用,自定义æ’å€¼æœ‰æ—¶ä¼šå¸¦æ¥æ›´å¥½çš„æ•ˆæžœã€‚" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -47018,9 +47255,9 @@ msgid "" "(usually by a [Control]). Enabled automatically if [method _unhandled_input] " "is overridden. Any calls to this before [method _ready] will be ignored." msgstr "" -"å¯ç”¨æœªå¤„ç†çš„输入处ç†ã€‚这对GUI控件æ¥è¯´æ˜¯ä¸éœ€è¦çš„! å®ƒä½¿èŠ‚ç‚¹èƒ½å¤ŸæŽ¥æ”¶æ‰€æœ‰ä»¥å‰æ²¡æœ‰" -"处ç†çš„输入(通常是由[Control]处ç†çš„)。如果[method _unhandled_input]被é‡è½½ï¼Œ" -"则自动å¯ç”¨ã€‚在[method _ready]之å‰å¯¹å®ƒçš„任何调用都将被忽略。" +"å¯ç”¨æœªå¤„ç†çš„输入处ç†ã€‚这对 GUI 控件æ¥è¯´æ˜¯ä¸éœ€è¦çš„ï¼å®ƒä½¿èŠ‚ç‚¹èƒ½å¤ŸæŽ¥æ”¶æ‰€æœ‰ä»¥å‰æ²¡" +"有处ç†çš„输入(通常是由 [Control] 处ç†çš„)。如果 [method _unhandled_input] 被" +"覆盖,则自动å¯ç”¨ã€‚在 [method _ready] 之å‰å¯¹å®ƒçš„任何调用都将被忽略。" #: doc/classes/Node.xml msgid "" @@ -47088,7 +47325,6 @@ msgstr "" "code]。" #: doc/classes/Node.xml -#, fuzzy msgid "" "The node owner. A node can have any other node as owner (as long as it is a " "valid parent, grandparent, etc. ascending in the tree). When saving a node " @@ -47109,7 +47345,7 @@ msgstr "" "之ä¿å˜ã€‚è¿™æ ·å°±å¯ä»¥åˆ›å»ºå¤æ‚çš„ [SceneTree],能够进行实例化与次实例化。\n" "[b]注æ„:[/b]如果想è¦å°†å节点æŒä¹…化进 [PackedScene],除了调用 [method " "add_child] ä¹‹å¤–ä½ è¿˜å¿…é¡»è®¾ç½® [member owner]。通常在[url=$DOCS_URL/tutorials/" -"misc/running_code_in_the_editor.html]工具脚本[/url]å’Œ[url=$DOCS_URL/" +"plugins/running_code_in_the_editor.html]工具脚本[/url]å’Œ[url=$DOCS_URL/" "tutorials/plugins/editor/index.html]编辑器æ’ä»¶[/url]ä¸ä¼šç”¨åˆ°ã€‚如果调用了 " "[method add_child] 但没有设置 [member owner],那么新建的这个 [Node] åœ¨åœºæ™¯æ ‘" "ä¸ä¸å¯è§ï¼Œä½†åœ¨ 2D/3D 视图ä¸å¯è§ã€‚" @@ -47119,6 +47355,18 @@ msgid "Pause mode. How the node will behave if the [SceneTree] is paused." msgstr "æš‚åœæ¨¡å¼ã€‚æš‚åœ [SceneTree] 时该节点的行为。" #: doc/classes/Node.xml +#, fuzzy +msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" +"å¯ç”¨æˆ–ç¦ç”¨è¯¥èŠ‚ç‚¹çš„ç‰©ç†æ’值,å¯ä»¥åœ¨å¼€å…³å…¨å±€ç‰©ç†æ’值的基础上进行微调。\n" +"[b]注æ„:[/b]对 [Camera] 尤其有用,自定义æ’å€¼æœ‰æ—¶ä¼šå¸¦æ¥æ›´å¥½çš„æ•ˆæžœã€‚" + +#: doc/classes/Node.xml msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " @@ -47138,6 +47386,10 @@ msgid "" "If another node with the same owner already had that name declared as " "unique, that other node's name will no longer be set as having a unique name." msgstr "" +"将这个节点的å称设置为其 [member owner] ä¸çš„唯一åç§°ã€‚è¿™æ ·å°±å¯ä»¥ä»Žè¯¥åœºæ™¯ä¸çš„" +"ä»»æ„节点处使用 [code]%åç§°[/code] æ¥è®¿é—®è¿™ä¸ªèŠ‚ç‚¹ï¼Œæ— éœ€ä½¿ç”¨å®Œæ•´è·¯å¾„ã€‚\n" +"如果所有者相åŒçš„å¦ä¸€ä¸ªèŠ‚ç‚¹å·²ç»å°†è¯¥åç§°å£°æ˜Žä¸ºå”¯ä¸€ï¼Œé‚£ä¹ˆå…¶ä»–èŠ‚ç‚¹å°±æ— æ³•å†å°†æ¤å" +"称设置为唯一å称。" #: doc/classes/Node.xml msgid "" @@ -47244,12 +47496,19 @@ msgid "" "[method Control.get_drag_data]) or using [method Control.force_drag].\n" "Use [method Viewport.gui_get_drag_data] to get the dragged data." msgstr "" +"当拖拽æ“作开始时收到的通知。所有节点都会收到这个通知,ä¸ä»…仅是被拖拽的那" +"个。\n" +"å¯ä»¥é€šè¿‡æ‹–拽æä¾›æ‹–拽数æ®çš„ [Control] 触å‘ï¼ˆè§ [method Control." +"get_drag_data]),也å¯ä»¥é€šè¿‡ä½¿ç”¨ [method Control.force_drag] 触å‘。\n" +"请使用 [method Viewport.gui_get_drag_data] èŽ·å–æ‹–拽数æ®ã€‚" #: doc/classes/Node.xml msgid "" "Notification received when a drag operation ends.\n" "Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded." msgstr "" +"当拖拽æ“ä½œç»“æŸæ—¶æ”¶åˆ°çš„通知。\n" +"请使用 [method Viewport.gui_is_drag_successful] æ£€æŸ¥æ‹–æ”¾æ˜¯å¦æˆåŠŸã€‚" #: doc/classes/Node.xml msgid "Notification received when the node's [NodePath] changed." @@ -47305,6 +47564,27 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "ä¸ç®¡ [SceneTree] 的暂åœçжæ€å¦‚ä½•ï¼Œç»§ç» process。" #: doc/classes/Node.xml +#, fuzzy +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" +"ç»§æ‰¿èŠ‚ç‚¹çš„çˆ¶èŠ‚ç‚¹çš„æš‚åœæ¨¡å¼ã€‚å¯¹äºŽæ ¹èŠ‚ç‚¹ï¼Œå®ƒç›¸å½“äºŽ[constant PAUSE_MODE_STOP]。" +"默认值。" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "å¤åˆ¶è¯¥èŠ‚ç‚¹çš„ä¿¡å·ã€‚" @@ -47889,8 +48169,9 @@ msgid "" "Returns the given property. Returns [code]null[/code] if the [code]property[/" "code] does not exist." msgstr "" -"虚方法,å¯ä»¥è¢«é‡è½½ä»¥å®šåˆ¶ [method get] 的返回值。\n" -"返回给定的属性。如果 [code]property[/code] ä¸å˜åœ¨ï¼Œè¿”回 [code]null[/code]。" +"虚方法。å¯å¯¹å…¶è¿›è¡Œè¦†ç›–,定制 [method get] 的返回值。\n" +"返回给定的属性。如果该 [code]property[/code] ä¸å˜åœ¨ï¼Œåˆ™è¿”回 [code]null[/" +"code]。" #: doc/classes/Object.xml msgid "" @@ -47903,12 +48184,13 @@ msgid "" "[code]hint_string: String[/code], and [code]usage: int[/code] (see [enum " "PropertyUsageFlags])." msgstr "" -"虚方法,å¯ä»¥è¢«é‡è½½ä»¥å®šåˆ¶ [method get_property_list] 的返回值。\n" -"返回对象的属性列表为一个 [Array] çš„å—典。\n" -"æ¯ä¸ªå±žæ€§çš„ [Dictionary] å¿…é¡»è‡³å°‘åŒ…å« [code]name: String[/code] å’Œ " -"[code]type: int[/code](è§[enum Variant.Type])æ¡ç›®ã€‚å¦å¤–,它还å¯ä»¥åŒ…括 " -"[code]hint: int[/code]ï¼ˆè§ [enum PropertyHint])ã€[code]hint_string: String[/" -"code]ï¼Œä»¥åŠ [code]usage: int[/code]ï¼ˆè§ [enum PropertyUsageFlags])。" +"虚方法。å¯å¯¹å…¶è¿›è¡Œè¦†ç›–,定制 [method get_property_list] 的返回值。\n" +"返回一个 [Array],表示该对象的属性列表,其ä¸çš„å…ƒç´ ä¸ºå—典类型。\n" +"æ¯ä¸ªå±žæ€§çš„ [Dictionary] 必须至少包å«åç§° [code]name: String[/code] 和类型 " +"[code]type: int[/code]ï¼ˆè§ [enum Variant.Type])æ¡ç›®ã€‚å¦å¤–,它还å¯ä»¥åŒ…括æç¤º " +"[code]hint: int[/code]ï¼ˆè§ [enum PropertyHint]ï¼‰ã€æç¤ºå—符串 " +"[code]hint_string: String[/code],以åŠç”¨æ³• [code]usage: int[/code]ï¼ˆè§ [enum " +"PropertyUsageFlags])。" #: doc/classes/Object.xml msgid "" @@ -47945,8 +48227,8 @@ msgid "" "Sets a property. Returns [code]true[/code] if the [code]property[/code] " "exists." msgstr "" -"虚方法,å¯ä»¥è¢«é‡è½½ä»¥å®šåˆ¶ [method set] 的返回值。\n" -"设置一个属性。如果 [code]property[/code] å˜åœ¨ï¼Œè¿”回 [code]true[/code]。" +"虚方法。å¯å¯¹å…¶è¿›è¡Œè¦†ç›–,定制 [method set] 的返回值。\n" +"设置属性。如果该 [code]property[/code] å˜åœ¨ï¼Œåˆ™è¿”回 [code]true[/code]。" #: doc/classes/Object.xml msgid "" @@ -47956,8 +48238,8 @@ msgid "" "Returns a [String] representing the object. If not overridden, defaults to " "[code]\"[ClassName:RID]\"[/code]." msgstr "" -"虚方法,å¯ä»¥è¢«é‡è½½ä»¥å®šåˆ¶ [method to_string] 的返回值,从而在对象被转æ¢ä¸ºå—符" -"串的地方,例如用 [code]print(obj)[/code] 表示。\n" +"虚方法。å¯å¯¹å…¶è¿›è¡Œè¦†ç›–,定制 [method to_string] 的返回值,从而在对象被转æ¢ä¸º" +"å—符串的地方,例如用 [code]print(obj)[/code] 表示。\n" "返回一个代表该对象的 [String] å—符串。如果没有被覆盖,默认为 " "[code]\"[ClassName:RID]\"[/code]。" @@ -48039,7 +48321,6 @@ msgstr "" "set_message_translation]å’Œ[method tr]。" #: doc/classes/Object.xml -#, fuzzy msgid "" "Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/" "code] object. Pass optional [code]binds[/code] to the call as an [Array] of " @@ -48079,7 +48360,7 @@ msgstr "" "ConnectFlags] 常é‡ã€‚\n" "ä¸€ä¸ªä¿¡å· [code]signal[/code] 与åŒä¸€æ–¹æ³• [code]method[/code] åªèƒ½è¿žæŽ¥ä¸€æ¬¡ã€‚除" "éžä¹‹å‰åœ¨è¿žæŽ¥ä¿¡å·æ—¶ä½¿ç”¨äº† [constant CONNECT_REFERENCE_COUNTED],å¦åˆ™åœ¨è¿›è¡Œé‡å¤" -"连接时会抛出错误。为é¿å…è¿™ç§æƒ…况,首先使用 [method is_connected] 检查是å¦å·²æœ‰" +"连接时会打å°é”™è¯¯ã€‚为é¿å…è¿™ç§æƒ…况,首先使用 [method is_connected] 检查是å¦å·²æœ‰" "连接。\n" "如果 [code]target[/code] 在游æˆç”Ÿå‘½å‘¨æœŸä¸è¢«é”€æ¯ï¼Œè¿žæŽ¥å°†ä¸¢å¤±ã€‚\n" "例å:\n" @@ -48102,7 +48383,6 @@ msgstr "" "[/codeblock]" #: doc/classes/Object.xml -#, fuzzy msgid "" "Disconnects a [code]signal[/code] from a [code]method[/code] on the given " "[code]target[/code].\n" @@ -48111,7 +48391,7 @@ msgid "" "exists." msgstr "" "å°† [code]ä¿¡å·[/code] 与给定 [code]ç›®æ ‡[/code] 上的 [code]方法[/code] æ–开。\n" -"如果您å°è¯•æ–å¼€ä¸å˜åœ¨çš„连接,该方法将引å‘错误。使用 [method is_connected] ç¡®ä¿" +"如果您å°è¯•æ–å¼€ä¸å˜åœ¨çš„连接,该方法将打å°é”™è¯¯ã€‚使用 [method is_connected] ç¡®ä¿" "连接å˜åœ¨ã€‚" #: doc/classes/Object.xml @@ -48969,8 +49249,9 @@ msgid "Returns the tooltip of the item at index [code]idx[/code]." msgstr "返回索引 [code]idx[/code] 处项目的工具æç¤ºã€‚" #: doc/classes/OptionButton.xml +#, fuzzy msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "返回所选项目的ID,如果没有选择项目,则返回 [code]0[/code]。" @@ -48990,9 +49271,11 @@ msgid "Removes the item at index [code]idx[/code]." msgstr "移除索引[code]idx[/code]处的项目。" #: doc/classes/OptionButton.xml +#, fuzzy msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "按索引选择项并使其为当å‰é€‰ä¸é¡¹ã€‚å³ä½¿è¯¥é¡¹æ˜¯ç¦ç”¨çš„,这也将起作用。" #: doc/classes/OptionButton.xml @@ -49521,6 +49804,11 @@ msgid "" "[b]Note:[/b] Currently only implemented on Android. Other platforms will " "return an empty array even if they do have display cutouts or notches." msgstr "" +"[Rect2] çš„ [Array] æ•°ç»„ï¼Œå…ƒç´ æ˜¯æ˜¾ç¤ºå™¨è£åˆ‡æˆ–刘海的包围矩形。它们是全é¢å±ä¸Šè¢«ç›¸" +"æœºå’Œä¼ æ„Ÿå™¨æ‰€å 用的éžåŠŸèƒ½æ€§åŒºåŸŸã€‚å¦‚æžœè¯¥è®¾å¤‡æ²¡æœ‰è£åˆ‡åˆ™è¿”回空数组。å¦è¯·å‚阅 " +"[method get_window_safe_area]。\n" +"[b]注æ„:[/b]ç›®å‰ä»…在 Android 上实现。其他平å°å³ä¾¿å˜åœ¨æ˜¾ç¤ºå™¨è£åˆ‡æˆ–刘海,也会" +"返回空数组。" #: doc/classes/OS.xml msgid "Returns the total amount of dynamic memory used (only works in debug)." @@ -50190,7 +50478,6 @@ msgstr "" "code]。" #: doc/classes/OS.xml -#, fuzzy msgid "" "Returns [code]true[/code] if the child process ID ([code]pid[/code]) is " "still running or [code]false[/code] if it has terminated.\n" @@ -50198,9 +50485,9 @@ msgid "" "[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and " "Windows." msgstr "" -"æ€æ»ï¼ˆç»ˆæ¢ï¼‰ç”±ç»™å®šçš„进程 ID([code]pid[/code]ï¼‰æ ‡è¯†çš„è¿›ç¨‹ï¼Œä¾‹å¦‚ï¼Œåœ¨éžé˜»å¡žæ¨¡å¼" -"下由 [method execute] 返回的进程。å¦è¯·å‚阅 [method crash]。\n" -"[b]注æ„:[/b]这个方法也å¯ä»¥ç”¨æ¥æ€æ»ä¸æ˜¯ç”±æ¸¸æˆäº§ç”Ÿçš„进程。\n" +"如果该å进程 ID([code]pid[/code])ä»åœ¨è¿è¡Œåˆ™è¿”回 [code]true[/code],如果已ç»" +"终æ¢åˆ™è¿”回 [code]false[/code]。\n" +"必须是由 [method execute] 生æˆçš„æœ‰æ•ˆ ID。\n" "[b]注æ„:[/b]这个方法在 Androidã€iOSã€Linuxã€macOS å’Œ Windows 上实现。" #: doc/classes/OS.xml @@ -50317,6 +50604,8 @@ msgid "" "[b]Note:[/b] If the user has disabled the recycle bin on their system, the " "file will be permanently deleted instead." msgstr "" +"将文件或目录移动到系统的回收站。å¦è¯·å‚阅 [method Directory.remove]。\n" +"[b]注æ„:[/b]如果用户ç¦ç”¨äº†ç³»ç»Ÿçš„å›žæ”¶ç«™ï¼Œé‚£ä¹ˆè¿™ä¸ªæ–‡ä»¶å°±ä¼šè¢«æ°¸ä¹…åˆ é™¤ã€‚" #: doc/classes/OS.xml msgid "" @@ -55370,6 +55659,13 @@ msgid "" "AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps " "to perform antialiasing." msgstr "" +"为 [code]true[/code] 时,会å°è¯•对多边形的边缘进行抗锯齿处ç†ï¼Œæ–¹æ³•是在边缘绘制" +"一薄层 OpenGL 平滑线段。\n" +"[b]注æ„:[/b]ç”±äºŽå®žçŽ°çš„åŽŸå› ï¼Œå†…ç½®çš„æŠ—é”¯é½¿æ— æ³•åœ¨é€æ˜Žå¤šè¾¹å½¢ä¸Šå¾—到æ£ç¡®çš„æ•ˆæžœï¼Œå¹¶" +"且å¯èƒ½æ— 法在æŸäº›å¹³å°ä¸Šæ£å¸¸å·¥ä½œã€‚作为替代方案,请安装[url=https://github.com/" +"godot-extended-libraries/godot-antialiased-line2d]抗锯齿 Line2D[/url] æ’ä»¶å¹¶" +"创建 AntialiasedPolygon2D 节点。该节点的抗锯齿是使用带有自定义 mipmap 的纹ç†" +"进行的。" #: doc/classes/Polygon2D.xml msgid "" @@ -55459,18 +55755,16 @@ msgstr "" "如果数é‡å°‘,则未定义的顶点将使用[code]color[/code]." #: doc/classes/PoolByteArray.xml -#, fuzzy msgid "A pooled array of bytes." -msgstr "[Array] å—节集åˆã€‚" +msgstr "å—èŠ‚æ± æ•°ç»„ã€‚" #: doc/classes/PoolByteArray.xml -#, fuzzy msgid "" "An array specifically designed to hold bytes. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" -"专门设计用于ä¿å˜å—节的 [Array]。针对内å˜ä½¿ç”¨è¿›è¡Œäº†ä¼˜åŒ–,ä¸ä¼šé€ æˆå†…å˜ç¢Žç‰‡ã€‚\n" +"专门设计用于ä¿å˜å—节的数组。针对内å˜ä½¿ç”¨è¿›è¡Œäº†ä¼˜åŒ–,ä¸ä¼šé€ æˆå†…å˜ç¢Žç‰‡ã€‚\n" "[b]注æ„:[/b]è¿™ç§ç±»åž‹æ˜¯æŒ‰å€¼ä¼ é€’è€Œä¸æ˜¯æŒ‰å¼•ç”¨ä¼ é€’ã€‚" #: doc/classes/PoolByteArray.xml @@ -55536,6 +55830,8 @@ msgid "" "used together with [method resize] to create an array with a given size and " "initialized elements." msgstr "" +"将数组ä¸çš„æ‰€æœ‰å…ƒç´ 都设为给定的值。通常与 [method resize] 一起使用,创建给定大" +"å°çš„æ•°ç»„å¹¶åˆå§‹åŒ–å…ƒç´ ã€‚" #: doc/classes/PoolByteArray.xml msgid "" @@ -55561,6 +55857,16 @@ msgstr "" "ä½†æ”¯æŒ UTF-8 ç¼–ç 的数æ®ã€‚如果ä¸ç¡®å®šæ•°æ®çš„æ¥æºï¼Œè¯·ä½¿ç”¨æ¤å‡½æ•°ã€‚对于用户输入,应" "该始终首选æ¤å‡½æ•°ã€‚" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +#, fuzzy +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "如果对象包å«ç»™å®šçš„æ–¹æ³• [code]method[/code],则返回 [code]true[/code]。" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -55623,18 +55929,16 @@ msgstr "" "负的索引都被认为是从数组的末端开始的。" #: doc/classes/PoolColorArray.xml -#, fuzzy msgid "A pooled array of [Color]." -msgstr "[Color]çš„[Array]的集åˆã€‚" +msgstr "[Color] æ± æ•°ç»„ã€‚" #: doc/classes/PoolColorArray.xml -#, fuzzy msgid "" "An array specifically designed to hold [Color]. Optimized for memory usage, " "does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" -"专门用于ä¿å˜ [Color] çš„ [Array]。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡åŒ–。\n" +"专门用于ä¿å˜ [Color] 的数组。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡åŒ–。\n" "[b]注æ„:[/b]è¿™ç§ç±»åž‹æ˜¯é€šè¿‡å€¼ä¼ é€’çš„ï¼Œè€Œä¸æ˜¯å¼•用。" #: doc/classes/PoolColorArray.xml @@ -55667,12 +55971,10 @@ msgid "Changes the [Color] at the given index." msgstr "更改给定索引处的[Color]。" #: doc/classes/PoolIntArray.xml -#, fuzzy msgid "A pooled array of integers ([int])." -msgstr "æ•´æ•°[int]çš„[Array]的集åˆã€‚" +msgstr "整数([int]ï¼‰æ± æ•°ç»„ã€‚" #: doc/classes/PoolIntArray.xml -#, fuzzy msgid "" "An array specifically designed to hold integer values ([int]). Optimized for " "memory usage, does not fragment the memory.\n" @@ -55683,7 +55985,7 @@ msgid "" "around. In comparison, [int] uses signed 64-bit integers which can hold much " "larger values." msgstr "" -"专门用于ä¿å˜æ•´æ•°å€¼ï¼ˆ[int])的 [Array]。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡" +"专门用于ä¿å˜æ•´æ•°å€¼ï¼ˆ[int])的数组。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡" "化。\n" "[b]注æ„:[/b]è¿™ç§ç±»åž‹æ˜¯é€šè¿‡å€¼ä¼ é€’çš„ï¼Œè€Œä¸æ˜¯å¼•用。\n" "[b]注æ„:[/b]这个类型仅é™äºŽæœ‰ç¬¦å·çš„ 32 使•´æ•°ï¼Œè¿™æ„味ç€å®ƒåªèƒ½åœ¨ [code]" @@ -55714,12 +56016,10 @@ msgid "Changes the int at the given index." msgstr "更改给定索引处的 int。" #: doc/classes/PoolRealArray.xml -#, fuzzy msgid "A pooled array of reals ([float])." -msgstr "实数 [float] çš„[Array]集åˆã€‚" +msgstr "实数([float]ï¼‰æ± æ•°ç»„ã€‚" #: doc/classes/PoolRealArray.xml -#, fuzzy msgid "" "An array specifically designed to hold floating-point values. Optimized for " "memory usage, does not fragment the memory.\n" @@ -55732,8 +56032,7 @@ msgid "" "store [float]s will use roughly 6 times more memory compared to a " "[PoolRealArray]." msgstr "" -"专门设计用于ä¿å˜æµ®ç‚¹å€¼çš„ [Array] 。针对内å˜ä½¿ç”¨è¿›è¡Œäº†ä¼˜åŒ–,ä¸ä¼šé€ æˆå†…å˜ç¢Ž" -"片。\n" +"专门设计用于ä¿å˜æµ®ç‚¹å€¼çš„æ•°ç»„。针对内å˜ä½¿ç”¨è¿›è¡Œäº†ä¼˜åŒ–,ä¸ä¼šé€ æˆå†…å˜ç¢Žç‰‡ã€‚\n" "[b]注æ„:[/b]è¿™ç§ç±»åž‹æ˜¯æŒ‰å€¼ä¼ é€’è€Œä¸æ˜¯æŒ‰å¼•ç”¨ä¼ é€’ã€‚\n" "[b]注æ„:[/b]与 64 ä½åŽŸå§‹ [float] ä¸åŒï¼Œå˜å‚¨åœ¨ [PoolRealArray] ä¸çš„æ•°å—是 32 " "使µ®ç‚¹æ•°ã€‚è¿™æ„味ç€ä¸ŽåŽŸå§‹ [float] 相比,å˜å‚¨åœ¨ [PoolRealArray] ä¸çš„值具有较低" @@ -55756,18 +56055,16 @@ msgid "Changes the float at the given index." msgstr "更改给定索引处的浮点数。" #: doc/classes/PoolStringArray.xml -#, fuzzy msgid "A pooled array of [String]." -msgstr "[String] çš„ [Array] 集åˆã€‚" +msgstr "[String] æ± æ•°ç»„ã€‚" #: doc/classes/PoolStringArray.xml -#, fuzzy msgid "" "An array specifically designed to hold [String]s. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" -"[Array] 专门设计用于ä¿å˜ [String]。针对内å˜ä½¿ç”¨è¿›è¡Œäº†ä¼˜åŒ–,ä¸ä¼šé€ æˆå†…å˜ç¢Ž" +"专门设计用于ä¿å˜ [String] 的数组。针对内å˜ä½¿ç”¨è¿›è¡Œäº†ä¼˜åŒ–,ä¸ä¼šé€ æˆå†…å˜ç¢Ž" "片。\n" "[b]注æ„:[/b]è¿™ç§ç±»åž‹æ˜¯æŒ‰å€¼ä¼ é€’ï¼Œè€Œä¸æ˜¯å¼•ç”¨ä¼ é€’ã€‚" @@ -55798,18 +56095,16 @@ msgid "Changes the [String] at the given index." msgstr "更改给定索引处的[String]。" #: doc/classes/PoolVector2Array.xml -#, fuzzy msgid "A pooled array of [Vector2]." -msgstr "[Vector2] çš„ [Array] 集åˆã€‚" +msgstr "[Vector2] æ± æ•°ç»„ã€‚" #: doc/classes/PoolVector2Array.xml -#, fuzzy msgid "" "An array specifically designed to hold [Vector2]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" -"专门用æ¥ä¿å˜[Vector2]çš„[Array]。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡åŒ–。\n" +"专门用æ¥ä¿å˜ [Vector2] 的数组。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡åŒ–。\n" "[b]注æ„:[/b]è¿™ç§ç±»åž‹æ˜¯é€šè¿‡å€¼ä¼ é€’çš„ï¼Œè€Œä¸æ˜¯å¼•用。" #: doc/classes/PoolVector2Array.xml doc/classes/TileMap.xml @@ -55837,19 +56132,16 @@ msgid "Changes the [Vector2] at the given index." msgstr "更改给定索引处的 [Vector2]。" #: doc/classes/PoolVector3Array.xml -#, fuzzy msgid "A pooled array of [Vector3]." -msgstr "[Vector3] çš„ [Array] 集åˆã€‚" +msgstr "[Vector3] æ± æ•°ç»„ã€‚" #: doc/classes/PoolVector3Array.xml -#, fuzzy msgid "" "An array specifically designed to hold [Vector3]. Optimized for memory " "usage, does not fragment the memory.\n" "[b]Note:[/b] This type is passed by value and not by reference." msgstr "" -"专门设计æ¥å®¹çº³[Vector3]çš„[Array]。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡" -"化。\n" +"专门设计æ¥å®¹çº³ [Vector3] 的数组。对内å˜çš„使用进行了优化,ä¸ä¼šä½¿å†…å˜ç¢Žç‰‡åŒ–。\n" "[b]注æ„:[/b]è¿™ç§ç±»åž‹æ˜¯é€šè¿‡å€¼ä¼ é€’çš„ï¼Œè€Œä¸æ˜¯å¼•用。" #: doc/classes/PoolVector3Array.xml @@ -56551,6 +56843,11 @@ msgid "[Font] used for the menu items." msgstr "用于èœå•项的 [Font] å—体。" #: doc/classes/PopupMenu.xml +#, fuzzy +msgid "[Font] used for the labeled separator." +msgstr "ç”¨äºŽæ ‡ç¾[Label]文本的å—体[Font]。" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "å¤é€‰èœå•项被勾选时使用的 [Texture] å›¾æ ‡ã€‚" @@ -57947,6 +58244,10 @@ msgid "" "during [method Node._physics_process] (during a physics tick) rather than " "[method Node._process] (during a frame)." msgstr "" +"为 [code]true[/code] 时,å¯ç”¨åˆ©äºŽå®šä½ä¸æ£ç¡®æ›´æ–°çš„节点的è¦å‘Šï¼Œä¸æ£ç¡®çš„æ›´æ–°ä¼šå¯¼" +"è‡´ä¸æ£ç¡®çš„æ’å€¼å’Œç”»é¢é—®é¢˜ã€‚\n" +"对节点进行æ’值时,在 [method Node._physics_process](ä½äºŽç‰©ç†å‘¨æœŸï¼‰è€Œä¸æ˜¯ " +"[method Node._process](ä½äºŽå¸§ï¼‰ä¸æ›´æ–°å˜æ¢éžå¸¸å…³é”®ã€‚" #: doc/classes/ProjectSettings.xml msgid "Maximum amount of functions per frame allowed when profiling." @@ -60911,9 +61212,8 @@ msgid "" msgstr "对象å¯ä»¥åˆ©ç”¨è¯¥ä¿¡å·ï¼Œåªåœ¨å‘生修改时æ‰è¯»å–设置。" #: doc/classes/PropertyTweener.xml -#, fuzzy msgid "Interpolates an [Object]'s property over time." -msgstr "ä½¿èŠ‚ç‚¹çš„å±žæ€§éšæ—¶é—´å¹³æ»‘地å˜åŒ–。" +msgstr "éšæ—¶é—´å¯¹ [Object] 的属性进行æ’值。" #: doc/classes/PropertyTweener.xml msgid "" @@ -60923,6 +61223,10 @@ msgid "" "to create [PropertyTweener]. Any [PropertyTweener] created manually will not " "function correctly." msgstr "" +"[PropertyTweener] å¯ç”¨äºŽå¯¹æŸä¸ªå¯¹è±¡çš„æŸä¸ªå±žæ€§è¿›è¡Œæ’值。更多用法信æ¯è¯·å‚阅 " +"[method SceneTreeTween.tween_property]。\n" +"[b]注æ„:[/b]创建 [PropertyTweener] 的唯一æ£ç¡®æ–¹æ³•是 [method SceneTreeTween." +"tween_property]。任何手动创建的 [PropertyTweener] éƒ½æ— æ³•æ£å¸¸å·¥ä½œã€‚" #: doc/classes/PropertyTweener.xml msgid "" @@ -60934,6 +61238,12 @@ msgid "" "as_relative() #the node will move by 100 pixels to the right\n" "[/codeblock]" msgstr "" +"调用åŽï¼Œæœ€ç»ˆå€¼ä¼šè¢«ä½œä¸ºç›¸å¯¹å€¼ä½¿ç”¨ã€‚示例:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1)." +"as_relative() # 该节点会å‘å³ç§»åЍ 100 个åƒç´ \n" +"[/codeblock]" #: doc/classes/PropertyTweener.xml msgid "" @@ -60945,6 +61255,12 @@ msgid "" "(200, 100)\n" "[/codeblock]" msgstr "" +"设置该 [PropertyTweener] 的自定义åˆå§‹å€¼ã€‚示例:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(Vector2(100, 100) # 会将该节点从 (100, 100) 移动到 (200, 100)\n" +"[/codeblock]" #: doc/classes/PropertyTweener.xml msgid "" @@ -60959,30 +61275,24 @@ msgid "" "from_current()\n" "[/codeblock]" msgstr "" +"让该 [PropertyTweener] 使用当å‰å±žæ€§å€¼ä½œä¸ºèµ·ç‚¹ï¼ˆå³åˆ›å»ºè¿™ä¸ª [PropertyTweener] " +"时的值)。与使用当å‰å€¼è°ƒç”¨ [method from] ç‰ä»·ã€‚以下两ç§è°ƒç”¨æ–¹æ³•效果相åŒï¼š\n" +"[codeblock]\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from(position)\n" +"tween.tween_property(self, \"position\", Vector2(200, 100), 1)." +"from_current()\n" +"[/codeblock]" #: doc/classes/PropertyTweener.xml msgid "" "Sets the time in seconds after which the [PropertyTweener] will start " "interpolating. By default there's no delay." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" +msgstr "设置该 [PropertyTweener] 开始æ’值的时间,å•ä½ä¸ºç§’ã€‚é»˜è®¤æ— å»¶è¿Ÿã€‚" #: doc/classes/ProximityGroup.xml -#, fuzzy msgid "General-purpose 3D proximity detection node." -msgstr "通用的é 近检测节点。" +msgstr "通用的 3D 邻近检测节点。" #: doc/classes/ProximityGroup.xml msgid "" @@ -61048,6 +61358,55 @@ msgid "" "[method Vector3.distance_to] or [method Vector3.distance_squared_to] are " "fast enough too, especially if you call them less often using a [Timer] node." msgstr "" +"通用邻近检测节点。[ProximityGroup] å¯ç”¨äºŽ[i]大致的[/i]è·ç¦»æ£€æŸ¥ï¼Œæ¯”使用 " +"[method Vector3.distance_to] 或 [method Vector3.distance_squared_to] 进行精确" +"检查è¦å¿«ã€‚\n" +"[member group_name] 相åŒçš„ [ProximityGroup] 节点如果相交,就会自动组åˆã€‚ä½ å¯" +"以通过调用 [method broadcast] æ¥å¯¹æ‰€æœ‰ç›¸äº¤çš„æˆå‘˜è°ƒç”¨ç‰¹å®šçš„æ–¹æ³•ï¼Œå‚æ•°ä»»æ„。\n" +"[ProximityGroup] 是立方体形状的,包å«ä¸€ç»„ [Vector3] åæ ‡ã€‚è¿™äº›åæ ‡æ˜¯è‡ªåŠ¨è°ƒç”¨ " +"[member grid_radius] 计算的。è¦è®© [ProximityGroup] 找到其对ç‰ä½“(并进行自动组" +"åˆï¼‰ï¼Œä½ 需è¦å°†å…¶ [member group_name] 设为éžç©ºçš„ [String]。当这个对象的形状与" +"å¦ä¸€ä¸ª [ProximityGroup] 对象的形状相交时,如果它们的 [member group_name] 一" +"致,就会被组åˆåœ¨ä¸€èµ·ï¼Œç›´åˆ°ä¸å†ç›¸äº¤ã€‚\n" +"å› ä¸º [ProximityGroup] ä¸ä¾èµ–于物ç†å¼•æ“Žï¼Œä½ ä¸éœ€è¦ä¸ºå…¶æ·»åР任何其他å节点(ä¸åŒ" +"于 [PhysicsBody])。\n" +"[ProximityGroup] 实际使用的是 [SceneTree] 的分组,会在内部调用 [method Node." +"add_to_group]。[SceneTree] 分组å称是通过将 [member group_name] åŠå…¶åæ ‡ç»„åˆ" +"而æ¥çš„,其ä¸çš„åæ ‡åˆ™æ˜¯æ ¹æ®ä½ 事先定义的 [member grid_radius] 计算而æ¥çš„。\n" +"[b]示例:[/b]å为 [code]\"PlanetEarth\"[/code] çš„ [ProximityGroup] 节点ä½äºŽ " +"[code]Vector3(6, 6, 6)[/code],其 [member group_name] 为 [code]\"planets\"[/" +"code],[member grid_radius] 为 [code]Vector3(1, 2, 3)[/code],那么就会创建下" +"列 [SceneTree] 分组å:\n" +"[codeblock]\n" +"- \"planets|5|4|3\"\n" +"- \"planets|5|4|4\"\n" +"- \"planets|5|4|5\"\n" +"- \"planets|5|4|6\"\n" +"- \"planets|5|4|7\"\n" +"- \"planets|5|4|8\"\n" +"- \"planets|5|4|9\"\n" +"- ...\n" +"[/codeblock]\n" +"如果有å¦ä¸€ä¸ªåå« [code]\"PlanetMars\"[/code] çš„ [ProximityGroup],分组å为 " +"[code]\"planets\"[/code]ï¼ŒåŒ…å« [code]Vector3(5, 4, 7)[/code] åæ ‡ï¼Œé‚£ä¹ˆæ£å¸¸å°±" +"会创建一个åå« [code]\"planets|5|4|7\"[/code] çš„ [SceneTree] åˆ†ç»„ã€‚ç„¶è€Œï¼Œå› ä¸º" +"这个分组åå·²å˜åœ¨ï¼Œè¿™ä¸ª [ProximityGroup] 对象就会[i]åŠ å…¥[/i]这个现有的分组。" +"[code]\"PlanetEarth\"[/code] å·²ç»å˜åœ¨äºŽè¿™ä¸ªåˆ†ç»„ä¸ã€‚åªè¦è¿™ä¸¤ä¸ªèŠ‚ç‚¹éƒ½ä¸æ”¹å˜å…¶å˜" +"æ¢ã€ä¸åœæ¢ç›¸äº¤ï¼ˆæˆ–è€…é€€å‡ºåœºæ™¯æ ‘ï¼‰ï¼Œé‚£ä¹ˆå®ƒä»¬å°±ä¼šè¢«ç»„åˆåœ¨ä¸€èµ·ã€‚相交时,任何 " +"[method broadcast] 都会影å“到[i]这两个[/i] [ProximityGroup] 节点。\n" +"使用 [ProximityGroup] 时有 3 个需è¦è®°ä½çš„缺陷:\n" +"- ç½‘æ ¼åŠå¾„è¶Šå¤§ï¼Œåæ ‡æ•°é‡è¶Šå¤šï¼Œåˆ›å»ºçš„ [SceneTree] 分组也越多。如果创建了太多的" +"åˆ†ç»„ï¼Œå°±ä¼šå½±å“æ€§èƒ½ã€‚\n" +"- 如果通过任何手段改å˜äº† [ProximityGroup] èŠ‚ç‚¹çš„å˜æ¢ï¼ˆæˆ–è€…ä»Žåœºæ™¯æ ‘ä¸ç§»é™¤ï¼‰ï¼Œ" +"就需è¦é‡æ–°è®¡ç®—åˆ†ç»„ï¼Œä¹Ÿä¼šå½±å“æ€§èƒ½ã€‚\n" +"- å¦‚æžœä½ çš„ [member grid_radius] 比 [code]Vector3(1, 1, 1)[/code] å°ï¼Œå°±ä¼šè¢«èˆ" +"入到 [code]Vector3(1, 1, 1)[/code]ã€‚å› æ¤ï¼Œè¾ƒå°çš„ç½‘æ ¼åŠå¾„å¯èƒ½ä¼šå¯¼è‡´æ„外的分" +"组。\n" +"[/codeblock]\n" +"[b]注æ„:[/b]Godot 4.0 会移除 [ProximityGroup],使用更高效ã€å¿«é€Ÿçš„ " +"[VisibilityNotifier] 功能。对于大多数情况,[method Vector3.distance_to] å’Œ " +"[method Vector3.distance_squared_to] 都足够快了,尤其是在使用 [Timer] 节点å‡" +"少调用次数时。" #: doc/classes/ProximityGroup.xml msgid "" @@ -61055,11 +61414,14 @@ msgid "" "If the [member dispatch_mode] is set to [constant MODE_PROXY] (the default), " "all calls are delegated to their respective parent [Node]." msgstr "" +"对所有相交的 [ProximityGroup] ä½¿ç”¨ç»™å®šçš„å‚æ•°è°ƒç”¨ç»™å®šçš„æ–¹æ³•。\n" +"如果 [member dispatch_mode] 为 [constant MODE_PROXY](默认值),这些调用会被" +"代ç†åˆ°å®ƒä»¬å„自的父级 [Node] 上。" #: doc/classes/ProximityGroup.xml msgid "" "Specifies which node gets contacted on a call of method [method broadcast]." -msgstr "" +msgstr "指定调用 [method broadcast] 方法时è”系到的节点。" #: doc/classes/ProximityGroup.xml msgid "" @@ -61069,6 +61431,9 @@ msgid "" "proximity checks at the cost of performance, since more groups will be " "created." msgstr "" +"空间的大å°ï¼Œä½¿ç”¨ 3D å•ä½ã€‚åŒæ—¶è¿˜ä¼šè®¾ç½®åæ ‡çš„æ•°é‡ï¼Œç”¨äºŽè®¡ç®—两个 " +"[ProximityGroup] 节点是å¦ç›¸äº¤ã€‚较å°çš„ [member grid_radius] 会牺牲性能实现更精" +"ç¡®çš„ä¸´è¿‘æ£€æµ‹ï¼Œå› ä¸ºä¼šåˆ›å»ºæ›´å¤šçš„åˆ†ç»„ã€‚" #: doc/classes/ProximityGroup.xml msgid "" @@ -61081,6 +61446,12 @@ msgid "" "significantly larger [member grid_radius] than their actual radius, position " "them close enough and they'll be automatically grouped." msgstr "" +"指定共用的分组å称,其它 [ProximityGroup] 节点å¯ä»¥å€Ÿæ¤å¾—知相交时是å¦åº”该与这" +"个节点自动组åˆã€‚\n" +"例如,å‡è®¾ä½ 有一个å为 [code]\"地çƒ\"[/code] çš„ [ProximityGroup] 节点,å¦ä¸€ä¸ª" +"åå« [code]\"ç«æ˜Ÿ\"[/code],这两个节点的 [member group_name] éƒ½å« [code]\"星" +"çƒ\"[/code]。如果为这两个星çƒè®¾ç½®æ¯”它们实际åŠå¾„更大的 [member grid_radius]," +"那么åªè¦å°†å®ƒä»¬æ”¾å¾—足够近,就会自动组åˆåˆ°ä¸€èµ·ã€‚" #: doc/classes/ProximityGroup.xml msgid "" @@ -61092,16 +61463,24 @@ msgid "" "[b]Note:[/b] This signal is [i]not[/i] emitted by default, as the default " "[member dispatch_mode] is [constant MODE_PROXY]." msgstr "" +"当用户调用 [method broadcast] 方法且 [member dispatch_mode] 为 [constant " +"MODE_SIGNAL] 时触å‘。\n" +"ç»™å®šçš„æ–¹æ³•å’Œå‚æ•°ä¼šä¼ 递给连接到这个信å·çš„监å¬è€…ï¼Œæ— è®ºæ˜¯è¿™ä¸ªå¯¹è±¡çš„ä¿¡å·ï¼Œè¿˜æ˜¯ä¸Ž" +"这个节点组åˆçš„ [ProximityGroup] 节点的信å·ã€‚\n" +"[b]注æ„:[/b]这个信å·é»˜è®¤[i]ä¸ä¼š[/i]触å‘ï¼Œå› ä¸º [member dispatch_mode] 默认为 " +"[constant MODE_PROXY]。" #: doc/classes/ProximityGroup.xml msgid "This [ProximityGroup]'s parent will be target of [method broadcast]." -msgstr "" +msgstr "这个 [ProximityGroup] 的父级会æˆä¸º [method broadcast] çš„ç›®æ ‡ã€‚" #: doc/classes/ProximityGroup.xml msgid "" "This [ProximityGroup] will emit the [signal broadcast] [i]signal[/i] when " "calling the [method broadcast] [i]method[/i]." msgstr "" +"这个 [ProximityGroup] 会在调用 [method broadcast] [i]方法[/i]æ—¶å‘出 [signal " +"broadcast] [i]ä¿¡å·[/i]。" #: doc/classes/QuadMesh.xml msgid "Class representing a square mesh." @@ -63424,7 +63803,6 @@ msgid "Adds raw non-BBCode-parsed text to the tag stack." msgstr "å°†éž BBCode è§£æžçš„åŽŸå§‹æ–‡æœ¬æ·»åŠ åˆ°æ ‡ç¾æ ˆä¸ã€‚" #: doc/classes/RichTextLabel.xml -#, fuzzy msgid "" "Parses [code]bbcode[/code] and adds tags to the tag stack as needed.\n" "[b]Note:[/b] Using this method, you can't close a tag that was opened in a " @@ -63436,12 +63814,13 @@ msgid "" "[b]Note:[/b] This method internals' can't possibly fail, but an error code " "is returned for backwards compatibility, which will always be [constant OK]." msgstr "" -"è§£æž [code]bbcode[/code] å¹¶æ ¹æ®éœ€è¦å°†æ ‡ç¾æ·»åŠ åˆ°æ ‡ç¾å †æ ˆä¸ã€‚返回解æžç»“果,æˆåŠŸ" -"则返回 [constant OK]。\n" +"è§£æž [code]bbcode[/code] å¹¶æ ¹æ®éœ€è¦å°†æ ‡ç¾æ·»åŠ åˆ°æ ‡ç¾å †æ ˆä¸ã€‚\n" "[b]注æ„:[/b]ä½¿ç”¨æ¤æ–¹æ³•ï¼Œæ‚¨æ— æ³•å…³é—在之å‰çš„ [method append_bbcode] è°ƒç”¨ä¸æ‰“å¼€" "çš„æ ‡ç¾ã€‚è¿™æ ·åšæ˜¯ä¸ºäº†æé«˜æ€§èƒ½ï¼Œç‰¹åˆ«æ˜¯åœ¨æ›´æ–°å¤§åž‹ RichTextLabel æ—¶ï¼Œå› ä¸ºæ¯æ¬¡é‡å»º" "整个 BBCode 会更慢。如果您ç»å¯¹éœ€è¦åœ¨å°†æ¥çš„æ–¹æ³•调用ä¸å…³é—æ ‡ç¾ï¼Œè¯·é™„åŠ [member " -"bbcode_text] è€Œä¸æ˜¯ä½¿ç”¨ [method append_bbcode]。" +"bbcode_text] è€Œä¸æ˜¯ä½¿ç”¨ [method append_bbcode]。\n" +"[b]注æ„:[/b]这个方法内部是ä¸å¯èƒ½å¤±è´¥çš„ï¼Œè¿”å›žé”™è¯¯ç æ˜¯ä¸ºäº†å‘åŽå…¼å®¹ï¼Œå§‹ç»ˆä¸º " +"[constant OK]。" #: doc/classes/RichTextLabel.xml msgid "Clears the tag stack and sets [member bbcode_text] to an empty string." @@ -63483,14 +63862,13 @@ msgid "Adds a newline tag to the tag stack." msgstr "åœ¨æ ‡ç¾å †ä¸æ·»åŠ ä¸€ä¸ªæ¢è¡Œæ ‡ç¾ã€‚" #: doc/classes/RichTextLabel.xml -#, fuzzy msgid "" "The assignment version of [method append_bbcode]. Clears the tag stack and " "inserts the new content.\n" "[b]Note:[/b] This method internals' can't possibly fail, but an error code " "is returned for backwards compatibility, which will always be [constant OK]." msgstr "" -"ç‰å¾…该 [Semaphore],如果其值为零,则阻塞至éžé›¶ã€‚\n" +"[method append_bbcode] çš„èµ‹å€¼ç‰ˆæœ¬ã€‚ä¼šæ¸…é™¤æ ‡ç¾æ ˆå¹¶æ’入新内容。\n" "[b]注æ„:[/b]这个方法内部是ä¸å¯èƒ½å¤±è´¥çš„ï¼Œè¿”å›žé”™è¯¯ç æ˜¯ä¸ºäº†å‘åŽå…¼å®¹ï¼Œå§‹ç»ˆä¸º " "[constant OK]。" @@ -64400,18 +64778,18 @@ msgid "" "The center of mass is always located at the node's origin without taking " "into account the [CollisionShape2D] centroid offsets." msgstr "" -"该节点实现了模拟的2D物ç†ã€‚ä½ ä¸èƒ½ç›´æŽ¥æŽ§åˆ¶ä¸€ä¸ªRigidBody2Dã€‚è€Œæ˜¯ï¼Œä½ å¯¹å®ƒæ–½åŠ åŠ›" +"该节点实现了模拟的 2D 物ç†ã€‚ä½ ä¸èƒ½ç›´æŽ¥æŽ§åˆ¶ RigidBody2Dã€‚è€Œæ˜¯ï¼Œä½ å¯¹å®ƒæ–½åŠ åŠ›" "(é‡åŠ›ã€å†²åŠ›ç‰ï¼‰ï¼Œç‰©ç†æ¨¡æ‹Ÿä¼šæ ¹æ®å®ƒçš„è´¨é‡ã€æ‘©æ“¦åŠ›å’Œå…¶ä»–ç‰©ç†å±žæ€§æ¥è®¡ç®—出è¿åŠ¨ç»“" "果。\n" -"RigidBody2D有4ç§è¡Œä¸º[member mode]。刚性ã€é™æ€ã€è§’色和è¿åŠ¨ã€‚\n" -"[b]注æ„:[/b]ä½ ä¸åº”该æ¯ä¸€å¸§æˆ–ç»å¸¸æ”¹å˜RigidBody2Dçš„[code]position[/code]或" -"[code]linear_velocity[/code]。如果需è¦ç›´æŽ¥å½±å“物体的状æ€ï¼Œè¯·ä½¿ç”¨[method " +"RigidBody2D 有 4 ç§è¡Œä¸º [member mode]。刚性ã€é™æ€ã€è§’色和è¿åŠ¨ã€‚\n" +"[b]注æ„:[/b]ä½ ä¸åº”该æ¯ä¸€å¸§æˆ–ç»å¸¸æ”¹å˜ RigidBody2D çš„ [code]position[/code] " +"或 [code]linear_velocity[/code]。如果需è¦ç›´æŽ¥å½±å“物体的状æ€ï¼Œè¯·ä½¿ç”¨ [method " "_integrate_forces],它å…è®¸ä½ ç›´æŽ¥è®¿é—®ç‰©ç†çжæ€ã€‚\n" "è¦è®°ä½ï¼Œç‰©ç†ç‰©ä½“在自己管ç†å˜æ¢ï¼Œå®ƒä¼šè¦†ç›–ä½ çš„å˜æ¢è®¾ç½®ã€‚所以任何直接或间接的å˜" "æ¢ï¼ˆåŒ…括节点或其父级的缩放)将åªåœ¨ç¼–辑器ä¸å¯è§ï¼Œå¹¶åœ¨è¿è¡Œæ—¶ç«‹å³é‡ç½®ã€‚\n" -"å¦‚æžœä½ éœ€è¦é‡è½½é»˜è®¤çš„物ç†è¡Œä¸ºæˆ–者在è¿è¡Œæ—¶æ·»åŠ å˜æ¢ï¼Œä½ å¯ä»¥å†™ä¸€ä¸ªè‡ªå®šä¹‰çš„åˆåŠ›ã€‚" -"å‚阅[member custom_integrator]。\n" -"è´¨é‡ä¸å¿ƒæ€»æ˜¯ä½äºŽèŠ‚ç‚¹çš„åŽŸç‚¹ï¼Œè€Œä¸è€ƒè™‘[CollisionShape2D]ä¸å¿ƒç‚¹çš„å移。" +"å¦‚æžœä½ éœ€è¦è¦†ç›–默认的物ç†è¡Œä¸ºæˆ–者在è¿è¡Œæ—¶æ·»åŠ å˜æ¢ï¼Œä½ å¯ä»¥å†™ä¸€ä¸ªè‡ªå®šä¹‰çš„åˆåŠ›ã€‚" +"å‚阅 [member custom_integrator]。\n" +"è´¨é‡ä¸å¿ƒæ€»æ˜¯ä½äºŽèŠ‚ç‚¹çš„åŽŸç‚¹ï¼Œè€Œä¸è€ƒè™‘ [CollisionShape2D] ä¸å¿ƒç‚¹çš„å移。" #: doc/classes/RigidBody2D.xml msgid "2D Physics Platformer Demo" @@ -65637,7 +66015,7 @@ msgstr "" #: doc/classes/SceneTree.xml msgid "Creates and returns a new [SceneTreeTween]." -msgstr "" +msgstr "创建并返回一个新的 [SceneTreeTween]。" #: doc/classes/SceneTree.xml msgid "" @@ -65669,6 +66047,8 @@ msgid "" "Returns an array of currently existing [SceneTreeTween]s in the [SceneTree] " "(both running and paused)." msgstr "" +"返回当å‰åœ¨è¯¥ [SceneTree] ä¸å˜åœ¨çš„ [SceneTreeTween] çš„æ•°ç»„ï¼ˆåŒ…å«æ£åœ¨æ‰§è¡Œçš„和已" +"æš‚åœçš„)。" #: doc/classes/SceneTree.xml msgid "Returns the sender's peer ID for the most recently received RPC call." @@ -66113,7 +66493,7 @@ msgstr "当计时器到 0 æ—¶å‘出。" msgid "" "Lightweight object used for general-purpose animation via script, using " "[Tweener]s." -msgstr "" +msgstr "通过脚本进行通用动画的轻é‡çº§å¯¹è±¡ï¼Œä½¿ç”¨ [Tweener]。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66188,6 +66568,64 @@ msgid "" "prevent a [SceneTreeTween] from autostarting, you can call [method stop] " "immediately after it was created." msgstr "" +"[SceneTreeTween] æ˜¯ç”±åœºæ™¯æ ‘ç®¡ç†çš„补间动画。与 [Tween] 相对,ä¸éœ€è¦å®žä¾‹åŒ–节" +"点。\n" +"[SceneTreeTween] 比 [AnimationPlayer] æ›´è½»é‡ï¼Œéžå¸¸é€‚åˆç®€å•的动画,以åŠä¸éœ€è¦" +"编辑器å¯è§†åŒ–æ“作的通用任务。å¯ä»¥å³å‘å³å¼ƒï¼Œæ— 需å†ç¼–写é¢å¤–的代ç ã€‚ä¾‹å¦‚ï¼Œä½ å¯ä»¥" +"循环使用带延迟的 [CallbackTweener],让æŸäº›å¯¹è±¡ä¸æ–地进行射击。\n" +"å¯ä»¥ä½¿ç”¨ [method SceneTree.create_tween] 或 [method Node.create_tween] æ¥åˆ›" +"建 [SceneTreeTween]。手动创建的 [SceneTreeTween](å³ä½¿ç”¨ [code]Tween.new()[/" +"code]ï¼‰æ˜¯æ— æ•ˆçš„ï¼Œä¸èƒ½ç”¨äºŽå¯¹å€¼è¿›è¡Œè¡¥é—´ï¼Œä½†ä½ å¯ä»¥ç”¨ [method interpolate_value] " +"æ¥æ‰‹åЍæ’值。\n" +"[SceneTreeTween] 动画是由 [Tweener] åºåˆ—æž„æˆçš„,默认串行执行。å‘该 " +"[SceneTreeTween] è¿½åŠ [Tweener] å³å¯åˆ›å»ºåºåˆ—。使用 [Tweener] æ¥åšåŠ¨ç”»å°±å«åšè¡¥" +"间(Tweening)。示例补间åºåˆ—æ˜¯ç±»ä¼¼è¿™æ ·çš„ï¼š\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"这个åºåˆ—会让 [code]$Sprite[/code] å˜çº¢ï¼Œç„¶åŽç¼©å°ï¼Œæœ€åŽè°ƒç”¨ [method Node." +"queue_free] æ¥ç§»é™¤ç²¾çµã€‚更多用法信æ¯è¯·å‚阅 [method tween_property]ã€[method " +"tween_interval]ã€[method tween_callback]ã€[method tween_method] 方法。\n" +"使用 [code]tween_*[/code] 方法创建 [Tweener] åŽï¼Œå¯ä»¥ä½¿ç”¨é“¾å¼æ–¹æ³•调用æ¥è°ƒæ•´" +"该 [Tweener] çš„å±žæ€§ã€‚ä¾‹å¦‚ï¼Œå¦‚æžœä½ æƒ³è¦åœ¨ä¸Šé¢çš„例åä¸è®¾ç½®ä¸åŒçš„è¿‡æ¸¡ç±»åž‹ï¼Œé‚£ä¹ˆä½ " +"å¯ä»¥ï¼š\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1).set_trans(Tween." +"TRANS_SINE)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1).set_trans(Tween." +"TRANS_BOUNCE)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"[SceneTreeTween] 的大部分方法都å¯ä»¥ç”¨è¿™ç§æ–¹æ³•进行链å¼è°ƒç”¨ã€‚在这个示例ä¸ï¼Œæˆ‘们" +"对该 [SceneTreeTween] 进行了绑定,并设置了默认的过渡:\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().bind_node(self).set_trans(Tween." +"TRANS_ELASTIC)\n" +"tween.tween_property($Sprite, \"modulate\", Color.red, 1)\n" +"tween.tween_property($Sprite, \"scale\", Vector2(), 1)\n" +"tween.tween_callback($Sprite, \"queue_free\")\n" +"[/codeblock]\n" +"[SceneTreeTween] è¿˜æœ‰ä¸€ç§æœ‰æ„æ€çš„用法,å¯ä»¥å¯¹ä»»æ„一组对象进行动画:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"for sprite in get_children():\n" +" tween.tween_property(sprite, \"position\", Vector2(), 1)\n" +"[/codeblock]\n" +"上é¢çš„示例ä¸ï¼Œè¯¥èŠ‚ç‚¹çš„æ‰€æœ‰åèŠ‚ç‚¹éƒ½ä¼šä¾æ¬¡è¢«ç§»åŠ¨åˆ° (0, 0)。\n" +"一些 [Tweener] 会用到过渡和缓动。å‰è€…æŽ¥å— [enum Tween.TransitionType] 常é‡ï¼Œ" +"指的是如何处ç†è¯¥åŠ¨ç”»çš„æ—¶é—´ï¼ˆç¤ºä¾‹è§ [url=https://easings.net/]easings.net[/" +"url])。第二个接å—的是 [enum Tween.EaseType] 常é‡ï¼ŒæŽ§åˆ¶ [code]trans_type[/" +"code] 应用到æ’值ä¸çš„ä½ç½®ï¼ˆå¼€å¤´ã€ç»“å°¾ã€å¤´å°¾å‡æœ‰ï¼‰ã€‚å¦‚æžœä½ ä¸çŸ¥é“该选用哪ç§è¿‡æ¸¡" +"和缓动,å¯ä»¥ä½¿ç”¨ [constant Tween.EASE_IN_OUT] é…åˆå°è¯•ä¸åŒçš„ [enum Tween." +"TransitionType],然åŽé€‰ç”¨çœ‹ä¸ŠåŽ»æœ€å¥½çš„é‚£ç§ã€‚\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"tween_cheatsheet.png]补间缓动与过渡类型速查表[/url]\n" +"[b]注æ„:[/b]所有 [SceneTreeTween] 都默认会自动å¯åŠ¨ã€‚å¦‚æžœè¦é˜»æ¢æŸä¸ª " +"[SceneTreeTween] 自动å¯åŠ¨ï¼Œä½ å¯ä»¥åœ¨åˆ›å»ºåŽç«‹å³è°ƒç”¨ [method stop]。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66201,6 +66639,12 @@ msgid "" "For a shorter way to create and bind a [SceneTreeTween], you can use [method " "Node.create_tween]." msgstr "" +"将这个 [SceneTreeTween] 绑定到给定的 [code]node[/code] 上。[SceneTreeTween] " +"是由 [SceneTree] 直接处ç†çš„,所以ä¸ä¾èµ–被动画的节点è¿è¡Œã€‚将该 " +"[SceneTreeTween] 绑定到æŸä¸ª [Node] åŽï¼Œè¯¥å¯¹è±¡ä¸åœ¨æ ‘䏿—¶è¯¥ [SceneTreeTween] å°±" +"会暂åœåŠ¨ç”»ï¼Œç»‘å®šå¯¹è±¡è¢«é‡Šæ”¾æ—¶è¯¥ [SceneTreeTween] 会被自动销æ¯ã€‚å¦å¤–," +"[constant TWEEN_PAUSE_BOUND] 会让暂åœè¡Œä¸ºä¾èµ–于绑定的节点。\n" +"使用 [method Node.create_tween] æ¥åˆ›å»ºå¹¶ç»‘定 [SceneTreeTween] 更简å•。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66213,6 +66657,14 @@ msgid "" "tween.chain().tween_property(...) # Will run after two above are finished.\n" "[/codeblock]" msgstr "" +"用于在使用 [code]true[/code] 调用 [method set_parallel] åŽï¼Œå°†ä¸¤ä¸ª [Tweener] " +"串è”。\n" +"[codeblock]\n" +"var tween = create_tween().set_parallel(true)\n" +"tween.tween_property(...)\n" +"tween.tween_property(...) # 会和上一æ¡å¹¶è¡Œæ‰§è¡Œã€‚\n" +"tween.chain().tween_property(...) # 会在å‰ä¸¤æ¡å®ŒæˆåŽæ‰§è¡Œã€‚\n" +"[/codeblock]" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66225,6 +66677,13 @@ msgid "" "[b]Note:[/b] The [SceneTreeTween] will become invalid after finished, but " "you can call [method stop] after the step, to keep it and reset." msgstr "" +"使用给定的增é‡ç§’æ•° [code]delta[/code] 处ç†è¯¥ [SceneTreeTween]。最常è§çš„用法是" +"在该 [SceneTreeTween] æš‚åœæ—¶å¯¹å…¶è¿›è¡Œæ‰‹åŠ¨æŽ§åˆ¶ã€‚ä¹Ÿå¯ç”¨äºŽç«‹å³åœæ¢è¯¥ " +"[SceneTreeTween] 的动画,使用比完整长度更大的 [code]delta[/code] å³å¯ã€‚\n" +"如果该 [SceneTreeTween] ä»ç„¶æœ‰æœªå®Œæˆçš„ [Tweener],则返回 [code]true[/" +"code]。\n" +"[b]注æ„:[/b]该 [SceneTreeTween] 在完æˆåŽä¼šå¤±æ•ˆï¼Œä½†ä½ å¯ä»¥åœ¨ step åŽè°ƒç”¨ " +"[method stop] 将其ä¿ç•™å¹¶é‡ç½®ã€‚" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66235,6 +66694,11 @@ msgid "" "after the [SceneTreeTween] has finished animating will be slightly greater " "than the actual [SceneTreeTween] duration." msgstr "" +"返回该 [SceneTreeTween] 已进行动画的总时长(å³è‡ªå¼€å§‹ä»¥æ¥ç»è¿‡çš„æ—¶é—´ï¼Œä¸è®¡ç®—æš‚" +"åœç‰æ—¶é—´ï¼‰ï¼Œå•ä½ä¸ºç§’。时长会å—到 [method set_speed_scale] å½±å“,[method " +"stop] 会将其é‡ç½®ä¸º [code]0[/code]。\n" +"[b]注æ„:[/b]ç”±äºŽæ—¶é•¿æ˜¯ç”±å¸§çš„å¢žé‡æ—¶é—´ç´¯è®¡è€Œæ¥çš„,该 [SceneTreeTween] 完æˆåŠ¨ç”»" +"åŽæ‰€è¿”回的时长会比 [SceneTreeTween] 的实际时长略大。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66255,12 +66719,23 @@ msgid "" "will always return the final value, regardless of [code]elapsed_time[/code] " "provided." msgstr "" +"䏿ƒ³ä½¿ç”¨ [SceneTreeTween] 进行动画时,å¯ä»¥ä½¿ç”¨è¿™ä¸ªæ–¹æ³•进行手动æ’值。与 " +"[method @GDScript.lerp] 类似,但支æŒè‡ªå®šä¹‰è¿‡æ¸¡å’Œç¼“动。\n" +"[code]initial_value[/code] 为æ’值的起始值。\n" +"[code]delta_value[/code] 为æ’值的å˜åŒ–值,å³ç‰äºŽ [code]final_value - " +"initial_value[/code]。\n" +"[code]elapsed_time[/code] 为æ’å€¼å¼€å§‹åŽæ‰€ç»è¿‡çš„秒数,用于控制æ’值的ä½ç½®ã€‚例" +"如,ç‰äºŽ [code]duration[/code] çš„ä¸€åŠæ—¶ï¼Œæ’值åŽçš„值ä½äºŽåˆå§‹å€¼å’Œæœ€ç»ˆå€¼çš„一åŠã€‚" +"这个值也å¯ä»¥æ¯” [code]duration[/code] 大或者比 0 å°ï¼Œæ¤æ—¶ä¼šè¿›è¡Œå¤–æ’。\n" +"[code]duration[/code] 为æ’值的总时长。\n" +"[b]注æ„:[/b]如果 [code]duration[/code] ç‰äºŽ [code]0[/code]ï¼Œé‚£ä¹ˆæ— è®ºæä¾›çš„ " +"[code]elapsed_time[/code] 为多少,该方法返回的始终是最终值。" #: doc/classes/SceneTreeTween.xml msgid "" "Returns whether the [SceneTreeTween] is currently running, i.e. it wasn't " "paused and it's not finished." -msgstr "" +msgstr "返回该 [SceneTreeTween] ç›®å‰æ˜¯å¦æ£åœ¨æ‰§è¡Œï¼Œå³æœªæš‚åœä¸”未完æˆã€‚" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66272,10 +66747,15 @@ msgid "" "[SceneTreeTween] can't have [Tweener]s appended, because it can't animate " "them. You can however still use [method interpolate_value]." msgstr "" +"返回该 [SceneTreeTween] æ˜¯å¦æœ‰æ•ˆã€‚有效的 [SceneTreeTween] æ˜¯ç”±åœºæ™¯æ ‘åŒ…å«çš„ " +"[SceneTreeTween]ï¼ˆå³ [method SceneTree.get_processed_tweens] 返回的数组ä¸åŒ…å«" +"这个 [SceneTreeTween])。[SceneTreeTween] 失效的情况有:补间完æˆã€è¢«é”€æ¯ã€ä½¿" +"用 [code]Tween.new()[/code] åˆ›å»ºã€‚æ— æ•ˆçš„ [SceneTreeTween] ä¸èƒ½è¿½åŠ " +"[Tweener]ï¼Œå› ä¸ºæ— æ³•è¿›è¡ŒåŠ¨ç”»ã€‚ä¸è¿‡ [method interpolate_value] 还是å¯ä»¥ä½¿ç”¨çš„。" #: doc/classes/SceneTreeTween.xml msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]." -msgstr "" +msgstr "ç»ˆæ¢æ‰€æœ‰è¡¥é—´æ“作并将该 [SceneTreeTween] ç½®ä¸ºæ— æ•ˆã€‚" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66290,21 +66770,32 @@ msgid "" "You can make the [SceneTreeTween] parallel by default by using [method " "set_parallel]." msgstr "" +"让下一个 [Tweener] 与上一个并行执行。示例:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"tween.parallel().tween_property(...)\n" +"[/codeblock]\n" +"该示例ä¸çš„æ‰€æœ‰ [Tweener] éƒ½ä¼šåŒæ—¶æ‰§è¡Œã€‚\n" +"ä½ å¯ä»¥é€šè¿‡ä½¿ç”¨ [method set_parallel] 让该 [SceneTreeTween] 默认并行。" #: doc/classes/SceneTreeTween.xml msgid "" "Pauses the tweening. The animation can be resumed by using [method play]." -msgstr "" +msgstr "æš‚åœè¡¥é—´ã€‚å¯ä»¥ä½¿ç”¨ [method play] æ¢å¤åŠ¨ç”»ã€‚" #: doc/classes/SceneTreeTween.xml msgid "Resumes a paused or stopped [SceneTreeTween]." -msgstr "" +msgstr "æ¢å¤æš‚åœæˆ–åœæ¢çš„ [SceneTreeTween]。" #: doc/classes/SceneTreeTween.xml msgid "" "Sets the default ease type for [PropertyTweener]s and [MethodTweener]s " "animated by this [SceneTreeTween]." msgstr "" +"设置由这个 [SceneTreeTween] 进行动画的 [PropertyTweener] å’Œ [MethodTweener] " +"的默认缓动类型。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66321,12 +66812,22 @@ msgid "" "[SceneTreeTween]'s lifetime depends on some node, always use [method " "bind_node]." msgstr "" +"è¿™åªè¯¥è¡¥é—´åºåˆ—çš„é‡å¤æ¬¡æ•°ï¼Œå³ [code]set_loops(2)[/code] 会让动画执行两次。\n" +"调用这个方法时如果ä¸å¸¦å‚数,那么该 [SceneTreeTween] ä¼šæ— é™æ‰§è¡Œï¼Œç›´åˆ°è¢« " +"[method kill] 销æ¯ã€ç»‘å®šèŠ‚ç‚¹è¢«é‡Šæ”¾ã€æˆ–è€…æ‰€æœ‰è¿›è¡ŒåŠ¨ç”»çš„å¯¹è±¡éƒ½è¢«é‡Šæ”¾ï¼ˆæ— æ³•å†è¿›" +"行任何动画)。\n" +"[b]è¦å‘Šï¼š[/b]ä½¿ç”¨æ— é™å¾ªçŽ¯æ—¶è¯·ä¸€å®šè¦åŠ å…¥ä¸€äº›æ—¶é•¿/延迟。0 时长的循环动画(例如" +"å•个ä¸å¸¦å»¶è¿Ÿçš„ [CallbackTweener] æˆ–è€…èŠ‚ç‚¹æ— æ•ˆçš„ [PropertyTweener]ï¼‰å’Œæ— é™ " +"[code]while[/code] å¾ªçŽ¯æ˜¯ä¸€æ ·çš„ï¼Œä¼šå¯¼è‡´æ¸¸æˆå†»ç»“。如果 [SceneTreeTween] 的生命" +"期ä¾èµ–于æŸä¸ªèŠ‚ç‚¹ï¼Œè¯·ä¸€å®šä½¿ç”¨ [method bind_node]。" #: doc/classes/SceneTreeTween.xml msgid "" "If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after " "this method will by default run simultaneously, as opposed to sequentially." msgstr "" +"如果 [code]parallel[/code] 为 [code]true[/code],那么在这个方法之åŽè¿½åŠ çš„ " +"[Tweener] å°†é»˜è®¤åŒæ—¶æ‰§è¡Œï¼Œè€Œä¸æ˜¯é¡ºåºæ‰§è¡Œã€‚" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66334,6 +66835,9 @@ msgid "" "paused. Check [enum TweenPauseMode] for options.\n" "Default value is [constant TWEEN_PAUSE_BOUND]." msgstr "" +"决定该 [SceneTreeTween] 在 [SceneTree] æš‚åœæ—¶çš„行为。å¯é€‰é¡¹è¯·æŸ¥çœ‹ [enum " +"TweenPauseMode]。\n" +"默认值为 [constant TWEEN_PAUSE_BOUND]。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66342,23 +66846,30 @@ msgid "" "_physics_process].\n" "Default value is [constant Tween.TWEEN_PROCESS_IDLE]." msgstr "" +"决定该 [SceneTreeTween] åº”å½“åœ¨ç©ºé—²å¸§ï¼ˆè§ [method Node._process])还是物ç†å¸§" +"ï¼ˆè§ [method Node._physics_process])执行。\n" +"默认值为 [constant Tween.TWEEN_PROCESS_IDLE]。" #: doc/classes/SceneTreeTween.xml msgid "" "Scales the speed of tweening. This affects all [Tweener]s and their delays." -msgstr "" +msgstr "è¡¥é—´çš„é€Ÿåº¦ç¼©æ”¾ã€‚å½±å“æ‰€æœ‰ [Tweener] åŠå…¶å»¶è¿Ÿã€‚" #: doc/classes/SceneTreeTween.xml msgid "" "Sets the default transition type for [PropertyTweener]s and [MethodTweener]s " "animated by this [SceneTreeTween]." msgstr "" +"设置由这个 [SceneTreeTween] 进行动画的 [PropertyTweener] å’Œ [MethodTweener] " +"的默认过渡类型。" #: doc/classes/SceneTreeTween.xml msgid "" "Stops the tweening and resets the [SceneTreeTween] to its initial state. " "This will not remove any appended [Tweener]s." msgstr "" +"åœæ¢è¡¥é—´ï¼Œå¹¶å°†è¯¥ [SceneTreeTween] é‡ç½®ä¸ºåˆå§‹çжæ€ã€‚ä¸ä¼šç§»é™¤å·²è¿½åŠ çš„ " +"[Tweener]。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66377,6 +66888,19 @@ msgid "" "tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" "[/codeblock]" msgstr "" +"åˆ›å»ºå¹¶è¿½åŠ ä¸€ä¸ª [CallbackTweener]。这个方法å¯ç”¨äºŽè°ƒç”¨ä»»æ„å¯¹è±¡çš„ä»»æ„æ–¹æ³•。请使" +"用 [code]binds[/code] 绑定é¢å¤–çš„è°ƒç”¨å‚æ•°ã€‚\n" +"示例:总是æ¯éš” 1 秒射击一次的对象。\n" +"[codeblock]\n" +"var tween = get_tree().create_tween().set_loops()\n" +"tween.tween_callback(self, \"shoot\").set_delay(1)\n" +"[/codeblock]\n" +"示例:将精çµå˜çº¢ç„¶åŽå˜è“,带有 2 秒延迟。\n" +"[codeblock]\n" +"var tween = get_tree().create_tween()\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\n" +"tween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n" +"[/codeblock]" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66403,6 +66927,25 @@ msgid "" "tween.tween_interval(2)\n" "[/codeblock]" msgstr "" +"åˆ›å»ºå¹¶è¿½åŠ ä¸€ä¸ª [IntervalTweener]。这个方法å¯ç”¨äºŽåœ¨è¡¥é—´åŠ¨ç”»ä¸åˆ›å»ºå»¶è¿Ÿï¼Œå¯ä»¥æ›¿" +"代在其他 [Tweener] ä¸ä½¿ç”¨å»¶è¿Ÿï¼Œæˆ–æ— åŠ¨ç”»çš„æƒ…å†µï¼ˆæ¤æ—¶ [SceneTreeTween] 充当计时" +"器的角色)。[code]time[/code] 为间隔时间,å•ä½ä¸ºç§’。\n" +"ç¤ºä¾‹ï¼šåˆ›å»ºä»£ç æ‰§è¡Œçš„间隔。\n" +"[codeblock]\n" +"# ... 一些代ç \n" +"yield(create_tween().tween_interval(2), \"finished\")\n" +"# ... 更多代ç \n" +"[/codeblock]\n" +"示例:创建æ¯éš”å‡ ç§’å°±æ¥å›žç§»åŠ¨å¹¶è·³è·ƒçš„å¯¹è±¡ã€‚\n" +"[codeblock]\n" +"var tween = create_tween().set_loops()\n" +"tween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"tween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\n" +"tween.tween_callback(self, \"jump\")\n" +"tween.tween_interval(2)\n" +"[/codeblock]" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66432,6 +66975,28 @@ msgid "" " $Label.text = \"Counting \" + str(value)\n" "[/codeblock]" msgstr "" +"åˆ›å»ºå¹¶è¿½åŠ ä¸€ä¸ª [MethodTweener]。这个方法与 [method tween_callback] å’Œ " +"[method tween_property] 的组åˆç±»ä¼¼ï¼Œä¼šä½¿ç”¨è¡¥é—´åŽçš„å€¼ä½œä¸ºå‚æ•°åŽ»æŒç»è°ƒç”¨æŸä¸ªæ–¹" +"法。该值是从 [code]from[/code] 到 [code]to[/code] 进行补间的,时长为 " +"[code]duration[/code] 秒。请使用 [code]binds[/code] 绑定é¢å¤–çš„è°ƒç”¨å‚æ•°ã€‚ä½ å¯" +"以使用 [method MethodTweener.set_ease] å’Œ [method MethodTweener.set_trans] æ¥" +"调整该值的缓动和过渡,å¯ä»¥ä½¿ç”¨ [method MethodTweener.set_delay] æ¥å»¶è¿Ÿè¡¥" +"间。\n" +"示例:让 3D 对象é¢å‘å¦ä¸€ä¸ªç‚¹ã€‚\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), " +"1, [Vector3.UP]) # look_at() æ–¹æ³•çš„ç¬¬äºŒä¸ªå‚æ•°æŽ¥å—的是上å‘é‡ã€‚\n" +"[/codeblock]\n" +"示例:在一段延迟åŽï¼Œä½¿ç”¨ä¸é—´æ–¹æ³•æ¥è®¾ç½® [Label] 的文本。\n" +"[codeblock]\n" +"func _ready():\n" +" var tween = create_tween()\n" +" tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n" +"\n" +"func set_label_text(value: int):\n" +" $Label.text = \"Counting \" + str(value)\n" +"[/codeblock]" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66464,6 +67029,29 @@ msgid "" "as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" "[/codeblock]" msgstr "" +"åˆ›å»ºå¹¶è¿½åŠ ä¸€ä¸ª [PropertyTweener]。这个方法会将 [code]object[/code] 对象的 " +"[code]property[/code] 属性在åˆå§‹å€¼å’Œæœ€ç»ˆå€¼ [code]final_val[/code] 之间进行补" +"间,æŒç»æ—¶é—´ä¸º [code]duration[/code] 秒。åˆå§‹å€¼é»˜è®¤ä¸ºè¯¥ [PropertyTweener] å¯" +"动时的值。例如:\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\n" +"tween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n" +"[/codeblock]\n" +"会将该精çµç§»åŠ¨åˆ° (100, 200) ç„¶åŽå†ç§»åŠ¨åˆ° (200, 300)ã€‚å¦‚æžœä½ ä½¿ç”¨äº† [method " +"PropertyTweener.from] 或 [method PropertyTweener.from_current],那么起始ä½ç½®" +"就会被给定的值所覆盖。更多调整项请å‚阅 [PropertyTweener] ä¸çš„其他方法。\n" +"[b]注æ„:[/b]é¼ æ ‡æ‚¬åœåœ¨æ£€æŸ¥å™¨ä¸çš„属性上å³å¯æŸ¥çœ‹æ£ç¡®çš„属性åç§°ã€‚ä½ è¿˜å¯ä»¥ç”¨ " +"[code]\"属性:组件\"[/code] çš„å½¢å¼æä¾›å±žæ€§ä¸çš„组件(例如 [code]position:x[/" +"code]ï¼‰ï¼Œè¿™æ ·å°±åªä¼šä¿®æ”¹è¿™ä¸ªç‰¹å®šçš„组件。\n" +"示例:使用ä¸åŒçš„过渡类型从åŒä¸€ä½ç½®å¼€å§‹ç§»åŠ¨ä¸¤æ¬¡ã€‚\n" +"[codeblock]\n" +"var tween = create_tween()\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().set_trans(Tween.TRANS_SINE)\n" +"tween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1)." +"as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n" +"[/codeblock]" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66475,6 +67063,11 @@ msgid "" "frame. Calling [method stop] inside the signal callback will preserve the " "[SceneTreeTween]." msgstr "" +"在该 [SceneTreeTween] å®Œæˆæ‰€æœ‰è¡¥é—´æ—¶è§¦å‘。该 [SceneTreeTween] è¢«è®¾ä¸ºæ— é™å¾ªçޝ" +"æ—¶ä¸ä¼šè§¦å‘ï¼ˆè§ [method set_loops])。\n" +"[b]注æ„:[/b]触å‘这个信å·åŽï¼Œè¯¥ [SceneTreeTween] ä¼šè¢«ç§»é™¤ï¼ˆç½®ä¸ºæ— æ•ˆï¼‰ï¼Œä½†ä¸æ˜¯" +"ç«‹å³å‘生的,而是在下一个处ç†å¸§ä¸å‘生。在该信å·çš„回调ä¸è°ƒç”¨ [method stop] 会ä¿" +"留该 [SceneTreeTween]。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66482,6 +67075,8 @@ msgid "" "loop index. This signal is not emitted after final loop, use [signal " "finished] instead for this case." msgstr "" +"完æˆä¸€æ¬¡å¾ªçŽ¯æ—¶è§¦å‘ï¼ˆè§ [method set_loops]),会æä¾›è¯¥å¾ªçŽ¯çš„ç´¢å¼•å·ã€‚这个信å·ä¸" +"会在最åŽä¸€æ¬¡å¾ªçޝåŽè§¦å‘ï¼Œè¿™ç§æƒ…况请使用 [signal finished] 代替。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66489,6 +67084,8 @@ msgid "" "step index. One step is either a single [Tweener] or a group of [Tweener]s " "running parallelly." msgstr "" +"完æˆè¯¥ [SceneTreeTween] 的一æ¥å®ŒæˆåŽè§¦å‘,会æä¾›è¿™ä¸€æ¥çš„索引å·ã€‚ä¸€æ¥æŒ‡çš„æ˜¯å•" +"个 [Tweener] 或一组并行执行的 [Tweener]。" #: doc/classes/SceneTreeTween.xml msgid "" @@ -66496,17 +67093,18 @@ msgid "" "process (see [member Node.pause_mode]). Otherwise it's the same as [constant " "TWEEN_PAUSE_STOP]." msgstr "" +"如果该 [SceneTreeTween] ç»‘å®šäº†èŠ‚ç‚¹ï¼Œä¼šåœ¨è¯¥èŠ‚ç‚¹èƒ½å¤Ÿå¤„ç†æ—¶è¿›è¡Œå¤„ç†ï¼ˆè§ [member " +"Node.pause_mode])。å¦åˆ™ä¸Ž [constant TWEEN_PAUSE_STOP] 相åŒã€‚" #: doc/classes/SceneTreeTween.xml msgid "If [SceneTree] is paused, the [SceneTreeTween] will also pause." -msgstr "" +msgstr "如果 [SceneTree] æš‚åœäº†ï¼Œåˆ™è¯¥ [SceneTreeTween] 也会暂åœã€‚" #: doc/classes/SceneTreeTween.xml -#, fuzzy msgid "" "The [SceneTreeTween] will process regardless of whether [SceneTree] is " "paused." -msgstr "ä¸ç®¡ [SceneTree] 的暂åœçжæ€å¦‚ä½•ï¼Œç»§ç» process。" +msgstr "æ— è®º [SceneTree] æ˜¯å¦æš‚åœï¼Œè¯¥ [SceneTreeTween] 都会进行处ç†ã€‚" #: doc/classes/Script.xml msgid "A class stored as a resource." @@ -67077,17 +67675,20 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " "([code]shape_xform[/code])." msgstr "" -"返回这个形状与å¦ä¸€ä¸ªå½¢çŠ¶ç›¸æŽ¥è§¦çš„ç‚¹çš„åˆ—è¡¨ã€‚å¦‚æžœæ²¡æœ‰ç¢°æ’žï¼Œåˆ™åˆ—è¡¨ä¸ºç©ºã€‚\n" -"这个方法需è¦è¿™ä¸ªå½¢çŠ¶çš„å˜æ¢çŸ©é˜µï¼ˆ[code]local_xform[/code]ï¼‰ï¼Œè¦æ£€æŸ¥ç¢°æ’žçš„形状" -"([code]with_shape[/code]),以åŠé‚£ä¸ªå½¢çŠ¶çš„å˜æ¢çŸ©é˜µï¼ˆ[code]shape_xform[/" -"code])。" #: doc/classes/Shape2D.xml msgid "" @@ -67107,9 +67708,18 @@ msgstr "" "çš„è¿åŠ¨ï¼ˆ[code]shape_motion[/code])。" #: doc/classes/Shape2D.xml +#, fuzzy msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " @@ -72083,7 +72693,6 @@ msgstr "" "[code]size_right[/code] å’Œ [code]size_bottom[/code] åƒç´ 。" #: doc/classes/StyleBoxFlat.xml -#, fuzzy msgid "" "Antialiasing draws a small ring around the edges, which fades to " "transparency. As a result, edges look much smoother. This is only noticeable " @@ -72094,7 +72703,7 @@ msgid "" "glitches." msgstr "" "抗锯齿会在边缘周围绘制一个æ¸å˜åˆ°é€æ˜Žçš„å°çŽ¯ã€‚å› æ¤è¾¹ç¼˜çœ‹èµ·æ¥ä¼šæ›´åŠ å¹³æ»‘ã€‚è¿™ä»…åœ¨" -"ä½¿ç”¨åœ†è§’æ—¶æ‰æ˜Žæ˜¾ã€‚\n" +"使用圆角或 [member skew] æ—¶æ‰æ˜Žæ˜¾ã€‚\n" "[b]注æ„:[/b]使用 45 度倒角([member corner_detail] = 1)时,建议将 [member " "anti_aliasing] 设为 [code]false[/code]ï¼Œè¿™æ ·å¯ä»¥ä¿è¯ç”»é¢é”利ã€é¿å…一些显示问" "题。" @@ -72188,6 +72797,12 @@ msgid "" "user may try to click an area of the StyleBox that cannot actually receive " "clicks." msgstr "" +"å°†è¯¥æ ·å¼ç›’扩展到该控件矩形的底边。å¯ä»¥ä¸Ž [member border_width_bottom] 组åˆï¼Œ" +"在该控件矩形之外绘制边框。\n" +"[b]注æ„:[/b]与 [member StyleBox.content_margin_bottom] ä¸åŒï¼Œ[member " +"expand_margin_bottom] [i]å¹¶ä¸ä¼š[/i]å½±å“ [Control] çš„å¯ç‚¹å‡»åŒºåŸŸã€‚错误使用时会" +"对å¯ç”¨æ€§é€ æˆè´Ÿé¢å½±å“ï¼Œå› ä¸ºç”¨æˆ·å¯èƒ½ä¼šç‚¹å‡»è¯¥ StyleBox ä¸Šå®žé™…æ— æ³•æŽ¥å—点击的区" +"域。" #: doc/classes/StyleBoxFlat.xml msgid "" @@ -72200,6 +72815,11 @@ msgid "" "user may try to click an area of the StyleBox that cannot actually receive " "clicks." msgstr "" +"å°†è¯¥æ ·å¼ç›’扩展到该控件矩形的左边。å¯ä»¥ä¸Ž [member border_width_left] 组åˆï¼Œåœ¨" +"该控件矩形之外绘制边框。\n" +"[b]注æ„:[/b]与 [member StyleBox.content_margin_left] ä¸åŒï¼Œ[member " +"expand_margin_left] [i]å¹¶ä¸ä¼š[/i]å½±å“ [Control] çš„å¯ç‚¹å‡»åŒºåŸŸã€‚错误使用时会对" +"å¯ç”¨æ€§é€ æˆè´Ÿé¢å½±å“ï¼Œå› ä¸ºç”¨æˆ·å¯èƒ½ä¼šç‚¹å‡»è¯¥ StyleBox ä¸Šå®žé™…æ— æ³•æŽ¥å—点击的区域。" #: doc/classes/StyleBoxFlat.xml msgid "" @@ -72212,6 +72832,11 @@ msgid "" "user may try to click an area of the StyleBox that cannot actually receive " "clicks." msgstr "" +"å°†è¯¥æ ·å¼ç›’扩展到该控件矩形的å³è¾¹ã€‚å¯ä»¥ä¸Ž [member border_width_right] 组åˆï¼Œåœ¨" +"该控件矩形之外绘制边框。\n" +"[b]注æ„:[/b]与 [member StyleBox.content_margin_right] ä¸åŒï¼Œ[member " +"expand_margin_right] [i]å¹¶ä¸ä¼š[/i]å½±å“ [Control] çš„å¯ç‚¹å‡»åŒºåŸŸã€‚错误使用时会对" +"å¯ç”¨æ€§é€ æˆè´Ÿé¢å½±å“ï¼Œå› ä¸ºç”¨æˆ·å¯èƒ½ä¼šç‚¹å‡»è¯¥ StyleBox ä¸Šå®žé™…æ— æ³•æŽ¥å—点击的区域。" #: doc/classes/StyleBoxFlat.xml msgid "" @@ -72223,6 +72848,11 @@ msgid "" "[Control]s. This can negatively impact usability if used wrong, as the user " "may try to click an area of the StyleBox that cannot actually receive clicks." msgstr "" +"å°†è¯¥æ ·å¼ç›’扩展到该控件矩形的顶边。å¯ä»¥ä¸Ž [member border_width_top] 组åˆï¼Œåœ¨è¯¥" +"控件矩形之外绘制边框。\n" +"[b]注æ„:[/b]与 [member StyleBox.content_margin_top] ä¸åŒï¼Œ[member " +"expand_margin_top] [i]å¹¶ä¸ä¼š[/i]å½±å“ [Control] çš„å¯ç‚¹å‡»åŒºåŸŸã€‚错误使用时会对å¯" +"ç”¨æ€§é€ æˆè´Ÿé¢å½±å“ï¼Œå› ä¸ºç”¨æˆ·å¯èƒ½ä¼šç‚¹å‡»è¯¥ StyleBox ä¸Šå®žé™…æ— æ³•æŽ¥å—点击的区域。" #: doc/classes/StyleBoxFlat.xml msgid "" @@ -72254,6 +72884,13 @@ msgid "" "increasing the expand margin does not increase the size of the clickable " "area for [Control]s." msgstr "" +"如果任何轴被设为了éžé›¶å€¼ï¼Œ[member skew] 就会将该 StyleBox 进行横å‘å’Œ/或纵å‘å˜" +"形。å¯ç”¨äºŽå®žçŽ°â€œæœªæ¥é£Žâ€çš„ UI。æ£å€¼ä¼šè®©è¯¥ StyleBox æœå³ï¼ˆX 轴)上(Y è½´ï¼‰åæ–œï¼Œ" +"负值会让该 StyleBox æœå·¦ï¼ˆX 轴)下(Y è½´ï¼‰åæ–œã€‚\n" +"[b]注æ„:[/b]为了让文本ä¸è§¦ç¢°åˆ°è¯¥ StyleBox 的边缘,请考虑增大该 [StyleBox] çš„" +"内容边è·ï¼ˆè§ [member StyleBox.content_margin_bottom]ï¼‰ã€‚å¢žå¤§å†…å®¹è¾¹è·æ¯”增大扩" +"展边è·ï¼ˆè§ [member expand_margin_bottom]ï¼‰æ›´å¥½ï¼Œå› ä¸ºå¢žå¤§æ‰©å±•è¾¹è·å¹¶ä¸ä¼šå¢žå¤§ " +"[Control] çš„å¯ç‚¹å‡»åŒºåŸŸã€‚" #: doc/classes/StyleBoxLine.xml msgid "[StyleBox] that displays a single line." @@ -76181,7 +76818,6 @@ msgid "" msgstr "将给定的 Unix 时间戳转æ¢ä¸º ISO 8601 日期å—符串(YYYY-MM-DD)。" #: doc/classes/Time.xml -#, fuzzy msgid "" "Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a " "dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], " @@ -76196,7 +76832,8 @@ msgstr "" "为:[code]year[/code]ã€[code]month[/code]ã€[code]day[/code]ã€[code]weekday[/" "code]ã€[code]hour[/code]ã€[code]minute[/code]ã€[code]second[/code]。\n" "[code]weekday[/code] ä¸ºå‡æ—¶ï¼Œä¸åŒ…å« [code]weekday[/code] 记录(计算花费相对较" -"大)。" +"大)。\n" +"[b]注æ„:[/b]æ—¶é—´å—符串ä¸çš„å°æ•°ä¼šè¢«é™é»˜å¿½ç•¥ã€‚" #: doc/classes/Time.xml msgid "" @@ -76367,7 +77004,6 @@ msgstr "" "时区与给定的日期时间å—典相åŒã€‚" #: doc/classes/Time.xml -#, fuzzy msgid "" "Converts the given ISO 8601 date and/or time string to a Unix timestamp. The " "string can contain a date only, a time only, or both.\n" @@ -76380,10 +77016,10 @@ msgstr "" "将给定的 ISO 8601 日期和/或时间å—符串转æ¢ä¸º Unix 时间戳。å—符串ä¸å¯ä»¥åªåŒ…嫿—¥" "期ã€åªåŒ…嫿—¶é—´ï¼Œä¹Ÿå¯ä»¥ä¸¤è€…都包å«ã€‚\n" "[b]注æ„:[/b]Unix 时间戳通常是 UTC 的。本方法ä¸ä¼šåšä»»ä½•时区转æ¢ï¼Œæ‰€ä»¥æ—¶é—´æˆ³çš„" -"时区与给定的日期时间å—符串相åŒã€‚" +"时区与给定的日期时间å—符串相åŒã€‚\n" +"[b]注æ„:[/b]æ—¶é—´å—符串ä¸çš„å°æ•°ä¼šè¢«é™é»˜å¿½ç•¥ã€‚" #: doc/classes/Time.xml -#, fuzzy msgid "" "Returns the current Unix timestamp in seconds based on the system time in " "UTC. This method is implemented by the operating system and always returns " @@ -76392,7 +77028,9 @@ msgid "" "returns the timestamp as a [float] for sub-second precision." msgstr "" "返回当å‰çš„ Unix 时间戳,以秒为å•ä½ï¼ŒåŸºäºŽ UTC 系统时间。本方法由æ“作系统实现," -"返回的时间总是 UTC 的。" +"返回的时间总是 UTC 的。\n" +"[b]注æ„:[/b]与其他使用整数时间戳的方法ä¸åŒï¼Œè¿™ä¸ªæ–¹æ³•返回的是 [float] 类型的" +"时间戳,å¯ä»¥è¡¨ç¤ºæ¯”秒更高的精度。" #: doc/classes/Time.xml msgid "The month of January, represented numerically as [code]01[/code]." @@ -76846,31 +77484,32 @@ msgid "" msgstr "返回使用æ£äº¤åŸºï¼ˆ90 度)以åŠå½’一化的轴å‘é‡ï¼ˆç¼©æ”¾ä¸º 1 或 -1ï¼‰çš„å˜æ¢ã€‚" #: doc/classes/Transform.xml -#, fuzzy msgid "" "Returns a copy of the transform rotated around the given [code]axis[/code] " "by the given [code]angle[/code] (in radians), using matrix multiplication. " "The [code]axis[/code] must be a normalized vector." msgstr "" -"ä½¿ç”¨çŸ©é˜µä¹˜æ³•ï¼Œå°†å˜æ¢å›´ç»•给定的轴旋转给定的角度(å•ä½ä¸ºå¼§åº¦ï¼‰ã€‚轴必须是归一化" -"çš„å‘é‡ã€‚" +"è¿”å›žè¯¥å˜æ¢çš„副本,使用矩阵乘法将其围绕给定的轴 [code]axis[/code] 旋转给定的角" +"度 [code]angle[/code](å•ä½ä¸ºå¼§åº¦ï¼‰ã€‚è½´ [code]axis[/code] 必须是归一化的å‘" +"é‡ã€‚" #: doc/classes/Transform.xml -#, fuzzy msgid "" "Returns a copy of the transform with its basis and origin scaled by the " "given [code]scale[/code] factor, using matrix multiplication." -msgstr "ä½¿ç”¨çŸ©é˜µä¹˜æ³•ï¼Œé€šè¿‡ç»™å®šçš„ç¼©æ”¾ç³»æ•°ï¼Œå¯¹å˜æ¢çš„基和原点进行缩放。" +msgstr "" +"è¿”å›žè¯¥å˜æ¢çš„副本,使用矩阵乘法,通过给定的缩放系数 [code]scale[/code],对它的" +"基和原点进行缩放。" #: doc/classes/Transform.xml doc/classes/Transform2D.xml -#, fuzzy msgid "" "Returns a copy of the transform translated by the given [code]offset[/code], " "relative to the transform's basis vectors.\n" "Unlike [method rotated] and [method scaled], this does not use matrix " "multiplication." msgstr "" -"ç›¸å¯¹äºŽå˜æ¢çš„基å‘é‡ï¼Œå°†å˜æ¢æŒ‰ç»™å®šçš„åç§»é‡è¿›è¡Œå¹³ç§»ã€‚\n" +"è¿”å›žè¯¥å˜æ¢çš„å‰¯æœ¬ï¼Œå°†å…¶ç›¸å¯¹äºŽè¯¥å˜æ¢çš„基å‘釿Œ‰ç»™å®šçš„åç§»é‡ [code]offset[/code] " +"进行平移。\n" "与 [method rotated] å’Œ [method scaled] ä¸åŒï¼Œå®ƒä¸ä½¿ç”¨çŸ©é˜µä¹˜æ³•。" #: doc/classes/Transform.xml @@ -76992,18 +77631,20 @@ msgid "Returns the scale." msgstr "返回缩放。" #: doc/classes/Transform2D.xml -#, fuzzy msgid "" "Returns a copy of the transform rotated by the given [code]angle[/code] (in " "radians), using matrix multiplication." -msgstr "ä½¿ç”¨çŸ©é˜µä¹˜æ³•ï¼Œå°†å˜æ¢æ—‹è½¬ç»™å®šçš„角度,å³å¼§åº¦ã€‚" +msgstr "" +"è¿”å›žè¯¥å˜æ¢çš„副本,使用矩阵乘法将其旋转给定的角度 [code]angle[/code](å•ä½ä¸ºå¼§" +"度)。" #: doc/classes/Transform2D.xml -#, fuzzy msgid "" "Returns a copy of the transform scaled by the given [code]scale[/code] " "factor, using matrix multiplication." -msgstr "使用矩阵乘法,用给定的缩放系数æ¥ç¼©æ”¾å˜æ¢ã€‚" +msgstr "" +"è¿”å›žè¯¥å˜æ¢çš„副本,使用矩阵乘法将其用给定的缩放系数 [code]scale[/code] 进行缩" +"放。" #: doc/classes/Transform2D.xml msgid "" @@ -77279,7 +77920,6 @@ msgstr "" "è¦èŽ·å¾—è¿”å›žçš„æ”¾ç½®éƒ¨åˆ†ç›¸å¯¹é¡¹ï¼Œè¯·ä½¿ç”¨[method get_item_at_position]。" #: doc/classes/Tree.xml -#, fuzzy msgid "" "Returns the currently edited item. Can be used with [signal item_edited] to " "get the item that was modified.\n" @@ -77291,13 +77931,13 @@ msgid "" " print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" "[/codeblock]" msgstr "" -"返回当å‰è¢«ç¼–辑的项。å¯ä»¥å’Œ[signal item_edited]一起使用,获得被修改的项。\n" +"返回当å‰è¢«ç¼–辑的项。å¯ä»¥å’Œ [signal item_edited] 一起使用,获得被修改的项。\n" "[codeblock]\n" "func _ready():\n" -" $Tree.item_edited.connect(on_Tree_item_edited)\n" +" $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n" "\n" "func on_Tree_item_edited():\n" -" print($Tree.get_edited()) # This item just got edited (e.g. checked).\n" +" print($Tree.get_edited()) # 这个项目刚刚被编辑(例如勾选)。\n" "[/codeblock]" #: doc/classes/Tree.xml @@ -78191,7 +78831,6 @@ msgid "Smoothly animates a node's properties over time." msgstr "ä½¿èŠ‚ç‚¹çš„å±žæ€§éšæ—¶é—´å¹³æ»‘地å˜åŒ–。" #: doc/classes/Tween.xml -#, fuzzy msgid "" "Tweens are useful for animations requiring a numerical property to be " "interpolated over a range of values. The name [i]tween[/i] comes from [i]in-" @@ -78258,7 +78897,9 @@ msgstr "" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" "tween_cheatsheet.png]Tween 缓动与过渡类型速查表[/url]\n" "[b]注æ„:[/b]å¦‚æžœæ— æ³•å®Œæˆæ‰€è¯·æ±‚çš„æ“作,Tween 的方法会返回 [code]false[/" -"code]。" +"code]。\n" +"[b]注æ„:[/b]如果想è¦ä½¿ç”¨å¦ä¸€ç§å½¢å¼çš„ä¸éœ€è¦ä½¿ç”¨èŠ‚ç‚¹çš„è¡¥é—´åŠ¨ç”»ï¼Œè¯·å‚阅 " +"[SceneTreeTween]。" #: doc/classes/Tween.xml msgid "" @@ -78599,7 +79240,7 @@ msgstr "[constant EASE_IN] and [constant EASE_OUT]的组åˆã€‚两端的æ’值最 #: doc/classes/Tweener.xml msgid "Abstract class for all Tweeners used by [SceneTreeTween]." -msgstr "" +msgstr "[SceneTreeTween] 所使用的所有 Tweener(补间器)的抽象类。" #: doc/classes/Tweener.xml msgid "" @@ -78608,11 +79249,12 @@ msgid "" "can't be created manually, you need to use a dedicated method from " "[SceneTreeTween]." msgstr "" +"Tweener 是执行特定动画任务的对象,例如对属性进行æ’值ã€åœ¨ç»™å®šçš„æ—¶åˆ»è°ƒç”¨æŸä¸ªæ–¹" +"法。[Tweener] æ— æ³•æ‰‹åŠ¨åˆ›å»ºï¼Œä½ éœ€è¦ä½¿ç”¨ [SceneTreeTween] ä¸çš„专用方法。" #: doc/classes/Tweener.xml -#, fuzzy msgid "Emitted when the [Tweener] has just finished its job." -msgstr "å½“èŠ‚ç‚¹è¿›å…¥æ ‘æ—¶è§¦å‘。" +msgstr "当该 [Tweener] 刚刚完æˆå…¶ä»»åŠ¡æ—¶è§¦å‘。" #: doc/classes/UDPServer.xml msgid "Helper class to implement a UDP server." @@ -79693,15 +80335,14 @@ msgstr "" "vector2_angle_to.png]返回角度的说明。[/url]" #: doc/classes/Vector2.xml -#, fuzzy msgid "" "Returns the angle between the line connecting the two points and the X axis, " "in radians.\n" "[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]Illustration of the returned angle.[/url]" msgstr "" -"返回连接两点的直线与X轴的夹角,å•ä½ä¸ºå¼§åº¦ã€‚\n" -"[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/" +"返回连接两点的直线与 X 轴的夹角,å•ä½ä¸ºå¼§åº¦ã€‚\n" +"[url=https://raw.githubusercontent.com/godotengine/godot-docs/stable/img/" "vector2_angle_to_point.png]返回角度的图示。[/url]" #: doc/classes/Vector2.xml @@ -79897,11 +80538,12 @@ msgstr "" "é‡ã€‚" #: doc/classes/Vector2.xml -#, fuzzy msgid "" "Returns the vector rotated by [code]angle[/code] (in radians). See also " "[method @GDScript.deg2rad]." -msgstr "返回旋转了[code]phi[/code]弧度的å‘é‡ã€‚å‚阅[method @GDScript.deg2rad]。" +msgstr "" +"返回旋转了 [code]angle[/code] çš„å‘é‡ï¼ˆå•ä½ä¸ºå¼§åº¦ï¼‰ã€‚å¦è¯·å‚阅 [method " +"@GDScript.deg2rad]。" #: doc/classes/Vector2.xml doc/classes/Vector3.xml msgid "" @@ -80004,7 +80646,6 @@ msgid "Vector used for 3D math." msgstr "用于 3D æ•°å¦çš„å‘é‡ã€‚" #: doc/classes/Vector3.xml -#, fuzzy msgid "" "3-element structure that can be used to represent positions in 3D space or " "any other triplet of numeric values.\n" @@ -80012,7 +80653,7 @@ msgid "" "code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 " "will always evaluate to [code]true[/code]." msgstr "" -"å¯ç”¨äºŽè¡¨ç¤º 3D 空间ä¸çš„ä½ç½®æˆ–任何其他数值对的 3 å…ƒç´ ç»“æž„ã€‚\n" +"3 å…ƒç´ ç»“æž„ï¼Œå¯ç”¨äºŽè¡¨ç¤º 3D 空间ä¸çš„ä½ç½®æˆ–任何其他数值三元组。\n" "[b]注æ„:[/b]在布尔上下文ä¸ï¼Œå¦‚æžœ Vector3 ç‰äºŽ [code]Vector3(0, 0, 0)[/" "code],将评估为 [code]false[/code]。å¦åˆ™ï¼Œ Vector3 将始终评估为 [code]true[/" "code]。" @@ -80110,11 +80751,12 @@ msgid "Returns this vector reflected from a plane defined by the given normal." msgstr "返回从给定法线定义的平é¢ä¸Šåå°„çš„å‘é‡ã€‚" #: doc/classes/Vector3.xml -#, fuzzy msgid "" "Rotates this vector around a given axis by [code]angle[/code] (in radians). " "The axis must be a normalized vector." -msgstr "å°†æ¤å‘é‡ç»•给定的轴旋转 [code]phi[/code] 弧度。该轴必须是归一化的å‘é‡ã€‚" +msgstr "" +"å°†æ¤å‘é‡ç»•给定的轴旋转 [code]angle[/code](å•ä½ä¸ºå¼§åº¦ï¼‰ã€‚该轴必须是归一化的å‘" +"é‡ã€‚" #: doc/classes/Vector3.xml msgid "" @@ -80849,6 +81491,9 @@ msgid "" "Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node." "NOTIFICATION_DRAG_END] when you prefer polling the value." msgstr "" +"å¦‚æžœè¯¥è§†åŒºç›®å‰æ£åœ¨æ‰§è¡Œæ‹–拽æ“作,则返回 [code]true[/code]。\n" +"å¦‚æžœä½ æ›´å€¾å‘于对其进行轮询,那么就å¯ä»¥ä½œä¸º [constant Node." +"NOTIFICATION_DRAG_BEGIN] å’Œ [constant Node.NOTIFICATION_DRAG_END] 的替代å“。" #: doc/classes/Viewport.xml msgid "" @@ -86071,6 +86716,26 @@ msgid "" " $TextureRect.texture = proxy_texture\n" "[/codeblock]" msgstr "" +"在两个纹ç†ä¹‹é—´åˆ›å»ºæ›´æ–°é“¾ï¼Œä¸Ž [ViewportTexture] 的原ç†ç±»ä¼¼ã€‚基础纹ç†ä¸º " +"[Viewport] çš„çº¹ç†æ—¶ï¼Œè§†åŒºæ¯æ–°æ¸²æŸ“一帧,代ç†çº¹ç†å°±ä¼šè‡ªåŠ¨æ”¶åˆ°æ›´æ–°ã€‚\n" +"例如,æ¤å¤„的代ç 会利用 VisualServer API å°†ä¸€å¼ é€šç”¨çš„ [ImageTexture] 链接到 " +"[Viewport] 的纹ç†è¾“出上:\n" +"[codeblock]\n" +"func _ready():\n" +" var viewport_rid = get_viewport().get_viewport_rid()\n" +" var viewport_texture_rid = VisualServer." +"viewport_get_texture(viewport_rid)\n" +"\n" +" var proxy_texture = ImageTexture.new()\n" +" var viewport_texture_image_data = VisualServer." +"texture_get_data(viewport_texture_rid)\n" +"\n" +" proxy_texture.create_from_image(viewport_texture_image_data)\n" +" var proxy_texture_rid = proxy_texture.get_rid()\n" +" VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n" +"\n" +" $TextureRect.texture = proxy_texture\n" +"[/codeblock]" #: doc/classes/VisualServer.xml msgid "" @@ -87193,16 +87858,17 @@ msgid "" "Output color as they came in. This can cause bright lighting to look blown " "out, with noticeable clipping in the output colors." msgstr "" +"æŒ‰ç…§è¾“å…¥åŽŸæ ·è¾“å‡ºé¢œè‰²ã€‚è¾ƒäº®çš„å…‰ç…§ä¼šå¯¼è‡´è¿‡æ›ã€è¾“出的颜色ä¸ä¼šæœ‰å¯è§çš„æˆªæ–。" #: doc/classes/VisualServer.xml -#, fuzzy msgid "" "Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors " "by this formula: [code]color = color / (1 + color)[/code]. This avoids " "clipping bright highlights, but the resulting image can look a bit dull." msgstr "" -"Reinhardt tonemapperè¿ç®—器。通过这个公å¼å¯¹æ¸²æŸ“åƒç´ 的颜色进行å˜åŒ–。" -"[code]color = color / (1 + color)[/code]." +"使用 Reinhard è‰²è°ƒæ˜ å°„å™¨ã€‚å¯¹æ¸²æŸ“åŽçš„åƒç´ 颜色进行调整,使用的是这个公å¼ï¼š" +"[code]color = color / (1 + color)[/code]。å¯ä»¥é¿å…对高光的截æ–,但最终的图åƒ" +"å¯èƒ½çœ‹ä¸ŠåŽ»æœ‰äº›å¯¡æ·¡ã€‚" #: doc/classes/VisualServer.xml msgid "" @@ -87210,6 +87876,8 @@ msgid "" "resulting image that usually looks more vivid than [constant " "ENV_TONE_MAPPER_REINHARD]." msgstr "" +"ä½¿ç”¨ç”µå½±çº§è‰²è°ƒæ˜ å°„å™¨ã€‚å¯ä»¥é¿å…对高光的截æ–,最终的图åƒä¸€èˆ¬æ¯” [constant " +"ENV_TONE_MAPPER_REINHARD] 看上去更鲜艳。" #: doc/classes/VisualServer.xml msgid "" @@ -87221,6 +87889,12 @@ msgid "" "[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor " "of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED]." msgstr "" +"使用旧有的 Godot 版本的å¦é™¢è‰²å½©ç¼–ç 系统(Academy Color Encoding System)色调" +"æ˜ å°„å™¨ã€‚ä¸Ž [constant ENV_TONE_MAPPER_ACES_FITTED] ä¸åŒï¼Œè¿™ä¸ªç‰ˆæœ¬çš„ ACES 对较" +"亮的光照的处ç†ä»Žç‰©ç†è§’度看并ä¸ç²¾ç¡®ã€‚ACES 的输出在对比度方é¢é€šå¸¸æ¯” [constant " +"ENV_TONE_MAPPER_REINHARD] å’Œ [constant ENV_TONE_MAPPER_FILMIC] 更高。\n" +"[b]注æ„:[/b]Godot 4.0 ä¸ä¼šç§»é™¤è¿™ä¸ªè‰²è°ƒæ˜ å°„è¿ç®—å,使用更精确的 [constant " +"ENV_TONE_MAPPER_ACES_FITTED]。" #: doc/classes/VisualServer.xml msgid "" @@ -87230,6 +87904,10 @@ msgid "" "has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] " "and [constant ENV_TONE_MAPPER_FILMIC]." msgstr "" +"使用å¦é™¢è‰²å½©ç¼–ç 系统(Academy Color Encoding Systemï¼‰è‰²è°ƒæ˜ å°„å™¨ã€‚ä¸Žå…¶ä»–é€‰é¡¹ç›¸" +"比,ACES çš„æ¶ˆè€—ç•¥é«˜ï¼Œä½†å¯¹äºŽè¾ƒäº®çš„å…‰ç…§çš„å¤„ç†æ›´çœŸå®žï¼Œè¶Šäº®é¥±å’Œåº¦è¶Šä½Žã€‚ACES 的输" +"出在对比度方é¢é€šå¸¸æ¯” [constant ENV_TONE_MAPPER_REINHARD] å’Œ [constant " +"ENV_TONE_MAPPER_FILMIC] 更高。" #: doc/classes/VisualServer.xml msgid "Lowest quality of screen space ambient occlusion." diff --git a/doc/translations/zh_TW.po b/doc/translations/zh_TW.po index 72e6532ad3..4b40723235 100644 --- a/doc/translations/zh_TW.po +++ b/doc/translations/zh_TW.po @@ -1035,11 +1035,12 @@ msgstr "aasd" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Random range, any floating point value between [code]from[/code] and " -"[code]to[/code].\n" +"Returns a random floating point value between [code]from[/code] and " +"[code]to[/code] (both endpoints inclusive).\n" "[codeblock]\n" "prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263\n" -"[/codeblock]" +"[/codeblock]\n" +"[b]Note:[/b] This is equivalent to [code]randf() * (to - from) + from[/code]." msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml @@ -1083,37 +1084,36 @@ msgstr "" #: modules/gdscript/doc_classes/@GDScript.xml msgid "" -"Returns an array with the given range. Range can be 1 argument [code]N[/" -"code] (0 to [code]N[/code] - 1), two arguments ([code]initial[/code], " -"[code]final - 1[/code]) or three arguments ([code]initial[/code], " -"[code]final - 1[/code], [code]increment[/code]). Returns an empty array if " -"the range isn't valid (e.g. [code]range(2, 5, -1)[/code] or [code]range(5, " -"5, 1)[/code]).\n" -"Returns an array with the given range. [code]range()[/code] can have 1 " -"argument N ([code]0[/code] to [code]N - 1[/code]), two arguments " -"([code]initial[/code], [code]final - 1[/code]) or three arguments " -"([code]initial[/code], [code]final - 1[/code], [code]increment[/code]). " -"[code]increment[/code] can be negative. If [code]increment[/code] is " -"negative, [code]final - 1[/code] will become [code]final + 1[/code]. Also, " -"the initial value must be greater than the final value for the loop to run.\n" -"[codeblock]\n" -"print(range(4))\n" -"print(range(2, 5))\n" -"print(range(0, 6, 2))\n" -"[/codeblock]\n" -"Output:\n" +"Returns an array with the given range. [method range] can be called in three " +"ways:\n" +"[code]range(n: int)[/code]: Starts from 0, increases by steps of 1, and " +"stops [i]before[/i] [code]n[/code]. The argument [code]n[/code] is " +"[b]exclusive[/b].\n" +"[code]range(b: int, n: int)[/code]: Starts from [code]b[/code], increases by " +"steps of 1, and stops [i]before[/i] [code]n[/code]. The arguments [code]b[/" +"code] and [code]n[/code] are [b]inclusive[/b] and [b]exclusive[/b], " +"respectively.\n" +"[code]range(b: int, n: int, s: int)[/code]: Starts from [code]b[/code], " +"increases/decreases by steps of [code]s[/code], and stops [i]before[/i] " +"[code]n[/code]. The arguments [code]b[/code] and [code]n[/code] are " +"[b]inclusive[/b] and [b]exclusive[/b], respectively. The argument [code]s[/" +"code] [b]can[/b] be negative, but not [code]0[/code]. If [code]s[/code] is " +"[code]0[/code], an error message is printed.\n" +"[method range] converts all arguments to [int] before processing.\n" +"[b]Note:[/b] Returns an empty array if no value meets the value constraint " +"(e.g. [code]range(2, 5, -1)[/code] or [code]range(5, 5, 1)[/code]).\n" +"Examples:\n" "[codeblock]\n" -"[0, 1, 2, 3]\n" -"[2, 3, 4]\n" -"[0, 2, 4]\n" +"print(range(4)) # Prints [0, 1, 2, 3]\n" +"print(range(2, 5)) # Prints [2, 3, 4]\n" +"print(range(0, 6, 2)) # Prints [0, 2, 4]\n" +"print(range(4, 1, -1)) # Prints [4, 3, 2]\n" "[/codeblock]\n" "To iterate over an [Array] backwards, use:\n" "[codeblock]\n" "var array = [3, 6, 9]\n" -"var i := array.size() - 1\n" -"while i >= 0:\n" -" print(array[i])\n" -" i -= 1\n" +"for i in range(array.size(), 0, -1):\n" +" print(array[i - 1])\n" "[/codeblock]\n" "Output:\n" "[codeblock]\n" @@ -4215,17 +4215,24 @@ msgid "Maximum value for the mode enum." msgstr "" #: doc/classes/AnimatedSprite.xml -msgid "Sprite node that can use multiple textures for animation." +msgid "" +"Sprite node that contains multiple textures as frames to play for animation." msgstr "" #: doc/classes/AnimatedSprite.xml msgid "" -"Animations are created using a [SpriteFrames] resource, which can be " -"configured in the editor via the SpriteFrames panel.\n" -"[b]Note:[/b] You can associate a set of normal maps by creating additional " -"[SpriteFrames] resources with a [code]_normal[/code] suffix. For example, " -"having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/" -"code] will make it so the [code]run[/code] animation uses the normal map." +"[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple " +"textures as animation frames. Animations are created using a [SpriteFrames] " +"resource, which allows you to import image files (or a folder containing " +"said files) to provide the animation frames for the sprite. The " +"[SpriteFrames] resource can be configured in the editor via the SpriteFrames " +"bottom panel.\n" +"[b]Note:[/b] You can associate a set of normal or specular maps by creating " +"additional [SpriteFrames] resources with a [code]_normal[/code] or " +"[code]_specular[/code] suffix. For example, having 3 [SpriteFrames] " +"resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/" +"code] will make it so the [code]run[/code] animation uses normal and " +"specular maps." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/AnimationPlayer.xml @@ -4253,9 +4260,9 @@ msgstr "" msgid "Stops the current animation (does not reset the frame counter)." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml +#: doc/classes/AnimatedSprite.xml msgid "" -"The current animation from the [code]frames[/code] resource. If this value " +"The current animation from the [member frames] resource. If this value " "changes, the [code]frame[/code] counter is reset." msgstr "" @@ -4279,8 +4286,11 @@ msgstr "" msgid "The displayed animation frame's index." msgstr "" -#: doc/classes/AnimatedSprite.xml doc/classes/AnimatedSprite3D.xml -msgid "The [SpriteFrames] resource containing the animation(s)." +#: doc/classes/AnimatedSprite.xml +msgid "" +"The [SpriteFrames] resource containing the animation(s). Allows you the " +"option to load, edit, clear, make unique and save the states of the " +"[SpriteFrames] resource." msgstr "" #: doc/classes/AnimatedSprite.xml doc/classes/Sprite.xml @@ -4332,6 +4342,16 @@ msgid "" "provided, the current animation is played." msgstr "" +#: doc/classes/AnimatedSprite3D.xml +msgid "" +"The current animation from the [code]frames[/code] resource. If this value " +"changes, the [code]frame[/code] counter is reset." +msgstr "" + +#: doc/classes/AnimatedSprite3D.xml +msgid "The [SpriteFrames] resource containing the animation(s)." +msgstr "" + #: doc/classes/AnimatedTexture.xml msgid "Proxy texture for simple frame-based animations." msgstr "" @@ -4848,11 +4868,11 @@ msgstr "" msgid "No interpolation (nearest value)." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Linear interpolation." msgstr "" -#: doc/classes/Animation.xml +#: doc/classes/Animation.xml doc/classes/Gradient.xml msgid "Cubic interpolation." msgstr "" @@ -5888,7 +5908,10 @@ msgid "" "Seeks the animation to the [code]seconds[/code] point in time (in seconds). " "If [code]update[/code] is [code]true[/code], the animation updates too, " "otherwise it updates at process time. Events between the current frame and " -"[code]seconds[/code] are skipped." +"[code]seconds[/code] are skipped.\n" +"[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal " +"animation_finished]. If you want to skip animation and emit the signal, use " +"[method advance]." msgstr "" #: doc/classes/AnimationPlayer.xml @@ -7081,7 +7104,10 @@ msgid "" "[code]0[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "Returns the number of times an element is in the array." msgstr "" @@ -7126,10 +7152,14 @@ msgid "" "[/codeblock]" msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array for a value and returns its index or [code]-1[/code] if " -"not found. Optionally, the initial search index can be passed." +"not found. Optionally, the initial search index can be passed. Returns " +"[code]-1[/code] if [code]from[/code] is out of bounds." msgstr "" #: doc/classes/Array.xml @@ -7267,11 +7297,15 @@ msgid "" "[code]null[/code]." msgstr "" -#: doc/classes/Array.xml +#: doc/classes/Array.xml doc/classes/PoolByteArray.xml +#: doc/classes/PoolColorArray.xml doc/classes/PoolIntArray.xml +#: doc/classes/PoolRealArray.xml doc/classes/PoolStringArray.xml +#: doc/classes/PoolVector2Array.xml doc/classes/PoolVector3Array.xml msgid "" "Searches the array in reverse order. Optionally, a start search index can be " "passed. If negative, the start index is considered relative to the end of " -"the array." +"the array. If the adjusted start index is out of bounds, this method " +"searches from the end of the array." msgstr "" #: doc/classes/Array.xml @@ -8406,7 +8440,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -8628,7 +8662,7 @@ msgstr "" msgid "" "Adds a new point at the given position with the given identifier. The " "[code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must " -"be 1 or larger.\n" +"be 0.0 or greater.\n" "The [code]weight_scale[/code] is multiplied by the result of [method " "_compute_cost] when determining the overall cost of traveling across a " "segment from a neighboring point to this point. Thus, all else being equal, " @@ -11743,17 +11777,17 @@ msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a normal vector in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml msgid "" "Returns a 3D position in world space, that is the result of projecting a " -"point on the [Viewport] rectangle by the camera projection. This is useful " -"for casting rays in the form of (origin, normal) for object intersection or " -"picking." +"point on the [Viewport] rectangle by the inverse camera projection. This is " +"useful for casting rays in the form of (origin, normal) for object " +"intersection or picking." msgstr "" #: doc/classes/Camera.xml @@ -14008,7 +14042,9 @@ msgstr "" #: doc/classes/CollisionPolygon2D.xml msgid "" "If [code]true[/code], only edges that face up, relative to " -"[CollisionPolygon2D]'s rotation, will collide with other objects." +"[CollisionPolygon2D]'s rotation, will collide with other objects.\n" +"[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionPolygon2D.xml @@ -14104,7 +14140,9 @@ msgstr "" #: doc/classes/CollisionShape2D.xml msgid "" "Sets whether this collision shape should only detect collision on one side " -"(top or bottom)." +"(top or bottom).\n" +"[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a " +"child of an [Area2D] node." msgstr "" #: doc/classes/CollisionShape2D.xml @@ -22520,6 +22558,11 @@ msgid "" "same behavior." msgstr "" +#: doc/classes/EditorSpinSlider.xml +#, fuzzy +msgid "If [code]true[/code], the slider is hidden." +msgstr "å›žå‚³åƒæ•¸çš„餘弦值。" + #: doc/classes/EditorVCSInterface.xml msgid "" "Version Control System (VCS) interface, which reads and writes to the local " @@ -26108,9 +26151,22 @@ msgid "Gradient's colors returned as a [PoolColorArray]." msgstr "" #: doc/classes/Gradient.xml +msgid "" +"Defines how the colors between points of the gradient are interpolated. See " +"[enum InterpolationMode] for available modes." +msgstr "" + +#: doc/classes/Gradient.xml msgid "Gradient's offsets returned as a [PoolRealArray]." msgstr "" +#: doc/classes/Gradient.xml +msgid "" +"Constant interpolation, color changes abruptly at each point and stays " +"uniform between. This might cause visible aliasing when used for a gradient " +"texture in some cases." +msgstr "" + #: doc/classes/GradientTexture.xml msgid "Gradient-filled texture." msgstr "" @@ -34647,13 +34703,13 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used easing from [enum Tween.EaseType]. If not set, the " "default easing is used from the [SceneTreeTween] that contains this Tweener." msgstr "" -#: doc/classes/MethodTweener.xml +#: doc/classes/MethodTweener.xml doc/classes/PropertyTweener.xml msgid "" "Sets the type of used transition from [enum Tween.TransitionType]. If not " "set, the default transition is used from the [SceneTreeTween] that contains " @@ -35365,6 +35421,12 @@ msgid "Creates the agent." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]agent[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml msgid "Returns [code]true[/code] if the map got changed the previous frame." msgstr "" @@ -35434,6 +35496,12 @@ msgid "Create a new map." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation agents [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns the map cell size." msgstr "å›žå‚³åƒæ•¸çš„åæ£å¼¦å€¼ã€‚" @@ -35461,6 +35529,12 @@ msgid "Returns the navigation path to reach the destination from the origin." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns all navigation regions [RID]s that are currently assigned to the " +"requested navigation [code]map[/code]." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Returns [code]true[/code] if the map is active." msgstr "å›žå‚³åƒæ•¸çš„餘弦值。" @@ -35484,6 +35558,12 @@ msgid "Creates a new region." msgstr "" #: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml +msgid "" +"Returns the navigation map [RID] the requested [code]region[/code] is " +"currently assigned to." +msgstr "" + +#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml #, fuzzy msgid "Sets the map for the region." msgstr "å›žå‚³åƒæ•¸çš„æ£å¼¦å€¼ã€‚" @@ -35963,19 +36043,60 @@ msgid "Represents the size of the [enum SourceGeometryMode] enum." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "This class is responsible for creating and clearing navigation meshes." +msgid "Helper class for creating and clearing navigation meshes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml msgid "" -"Bakes the navigation mesh. This will allow you to use pathfinding with the " -"navigation system." +"This class is responsible for creating and clearing 3D navigation meshes " +"used as [NavigationMesh] resources inside [NavigationMeshInstance]. The " +"[NavigationMeshGenerator] has very limited to no use for 2D as the " +"navigation mesh baking process expects 3D node types and 3D source geometry " +"to parse.\n" +"The entire navigation mesh baking is best done in a separate thread as the " +"voxelization, collision tests and mesh optimization steps involved are very " +"performance and time hungry operations.\n" +"Navigation mesh baking happens in multiple steps and the result depends on " +"3D source geometry and properties of the [NavigationMesh] resource. In the " +"first step, starting from a root node and depending on [NavigationMesh] " +"properties all valid 3D source geometry nodes are collected from the " +"[SceneTree]. Second, all collected nodes are parsed for their relevant 3D " +"geometry data and a combined 3D mesh is build. Due to the many different " +"types of parsable objects, from normal [MeshInstance]s to [CSGShape]s or " +"various [CollisionObject]s, some operations to collect geometry data can " +"trigger [VisualServer] and [PhysicsServer] synchronizations. Server " +"synchronization can have a negative effect on baking time or framerate as it " +"often involves [Mutex] locking for thread security. Many parsable objects " +"and the continuous synchronization with other threaded Servers can increase " +"the baking time significantly. On the other hand only a few but very large " +"and complex objects will take some time to prepare for the Servers which can " +"noticeably stall the next frame render. As a general rule the total amount " +"of parsable objects and their individual size and complexity should be " +"balanced to avoid framerate issues or very long baking times. The combined " +"mesh is then passed to the Recast Navigation Object to test the source " +"geometry for walkable terrain suitable to [NavigationMesh] agent properties " +"by creating a voxel world around the meshes bounding area.\n" +"The finalized navigation mesh is then returned and stored inside the " +"[NavigationMesh] for use as a resource inside [NavigationMeshInstance] nodes." msgstr "" #: doc/classes/NavigationMeshGenerator.xml -msgid "Clears the navigation mesh." +msgid "" +"Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child " +"nodes under the provided [code]root_node[/code] or a specific group of nodes " +"for potential source geometry. The parse behavior can be controlled with the " +"[member NavigationMesh.geometry/parsed_geometry_type] and [member " +"NavigationMesh.geometry/source_geometry_mode] properties on the " +"[NavigationMesh] resource." msgstr "" +#: doc/classes/NavigationMeshGenerator.xml +#, fuzzy +msgid "" +"Removes all polygons and vertices from the provided [code]nav_mesh[/code] " +"resource." +msgstr "計算兩個å‘é‡çš„外ç©ã€‚" + #: doc/classes/NavigationMeshInstance.xml msgid "An instance of a [NavigationMesh]." msgstr "" @@ -35994,7 +36115,10 @@ msgid "" "thread is useful because navigation baking is not a cheap operation. When it " "is completed, it automatically sets the new [NavigationMesh]. Please note " "that baking on separate thread may be very slow if geometry is parsed from " -"meshes as async access to each mesh involves heavy synchronization." +"meshes as async access to each mesh involves heavy synchronization. Also, " +"please note that baking on a separate thread is automatically disabled on " +"operating systems that cannot use threads (such as HTML5 with threads " +"disabled)." msgstr "" #: doc/classes/NavigationMeshInstance.xml @@ -36040,6 +36164,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [NavigationServer]." +msgstr "å›žå‚³åƒæ•¸çš„æ£å¼¦å€¼ã€‚" + +#: doc/classes/NavigationObstacle.xml msgid "" "Sets the [Navigation] node used by the obstacle. Useful when you don't want " "to make the obstacle a child of a [Navigation] node." @@ -36076,6 +36205,11 @@ msgid "" msgstr "" #: doc/classes/NavigationObstacle2D.xml +#, fuzzy +msgid "Returns the [RID] of this obstacle on the [Navigation2DServer]." +msgstr "å›žå‚³åƒæ•¸çš„æ£å¼¦å€¼ã€‚" + +#: doc/classes/NavigationObstacle2D.xml msgid "" "Sets the [Navigation2D] node used by the obstacle. Useful when you don't " "want to make the obstacle a child of a [Navigation2D] node." @@ -37264,7 +37398,7 @@ msgstr "" #: doc/classes/Node.xml msgid "" "Returns [code]true[/code] if the physics interpolated flag is set for this " -"Node (see [method set_physics_interpolated]).\n" +"Node (see [member physics_interpolation_mode]).\n" "[b]Note:[/b] Interpolation will only be active is both the flag is set " "[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can " "be tested using [method is_physics_interpolated_and_enabled]." @@ -37272,8 +37406,8 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Returns [code]true[/code] if physics interpolation is enabled (see [method " -"set_physics_interpolated]) [b]and[/b] enabled in the [SceneTree].\n" +"Returns [code]true[/code] if physics interpolation is enabled (see [member " +"physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree].\n" "This is a convenience version of [method is_physics_interpolated] that also " "checks whether physics interpolation is enabled globally.\n" "See [member SceneTree.physics_interpolation] and [member ProjectSettings." @@ -37567,14 +37701,6 @@ msgstr "" #: doc/classes/Node.xml msgid "" -"Enables or disables physics interpolation per node, offering a finer grain " -"of control than turning physics interpolation on and off globally.\n" -"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " -"interpolation can sometimes give superior results." -msgstr "" - -#: doc/classes/Node.xml -msgid "" "Enables or disables physics (i.e. fixed framerate) processing. When a node " "is being processed, it will receive a [constant " "NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine." @@ -37707,6 +37833,15 @@ msgstr "" #: doc/classes/Node.xml msgid "" +"Allows enabling or disabling physics interpolation per node, offering a " +"finer grain of control than turning physics interpolation on and off " +"globally.\n" +"[b]Note:[/b] This can be especially useful for [Camera]s, where custom " +"interpolation can sometimes give superior results." +msgstr "" + +#: doc/classes/Node.xml +msgid "" "The node's priority in the execution order of the enabled processing " "callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant " "NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose " @@ -37868,6 +38003,24 @@ msgid "Continue to process regardless of the [SceneTree] pause state." msgstr "" #: doc/classes/Node.xml +msgid "" +"Inherits physics interpolation mode from the node's parent. For the root " +"node, it is equivalent to [constant PHYSICS_INTERPOLATION_MODE_ON]. Default." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn off physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml +msgid "" +"Turn on physics interpolation in this node and children set to [constant " +"PHYSICS_INTERPOLATION_MODE_INHERIT]." +msgstr "" + +#: doc/classes/Node.xml msgid "Duplicate the node's signals." msgstr "" @@ -39109,7 +39262,7 @@ msgstr "計算兩個å‘é‡çš„外ç©ã€‚" #: doc/classes/OptionButton.xml msgid "" -"Returns the ID of the selected item, or [code]0[/code] if no item is " +"Returns the ID of the selected item, or [code]-1[/code] if no item is " "selected." msgstr "" @@ -39131,7 +39284,8 @@ msgstr "" #: doc/classes/OptionButton.xml msgid "" "Selects an item by index and makes it the current item. This will work even " -"if the item is disabled." +"if the item is disabled.\n" +"Passing [code]-1[/code] as the index deselects any currently selected item." msgstr "" #: doc/classes/OptionButton.xml @@ -44483,6 +44637,15 @@ msgid "" "should always be preferred." msgstr "" +#: doc/classes/PoolByteArray.xml doc/classes/PoolColorArray.xml +#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml +#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml +#: doc/classes/PoolVector3Array.xml +msgid "" +"Returns [code]true[/code] if the array contains the given value.\n" +"[b]Note:[/b] This is equivalent to using the [code]in[/code] operator." +msgstr "" + #: doc/classes/PoolByteArray.xml msgid "" "Returns a hexadecimal representation of this array as a [String].\n" @@ -45277,6 +45440,10 @@ msgid "[Font] used for the menu items." msgstr "" #: doc/classes/PopupMenu.xml +msgid "[Font] used for the labeled separator." +msgstr "" + +#: doc/classes/PopupMenu.xml msgid "[Texture] icon for the checked checkbox items." msgstr "" @@ -48723,19 +48890,6 @@ msgid "" "interpolating. By default there's no delay." msgstr "" -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used easing from [enum Tween.EaseType]. If not set, the " -"default easing is used from the [Tween] that contains this Tweener." -msgstr "" - -#: doc/classes/PropertyTweener.xml -msgid "" -"Sets the type of used transition from [enum Tween.TransitionType]. If not " -"set, the default transition is used from the [Tween] that contains this " -"Tweener." -msgstr "" - #: doc/classes/ProximityGroup.xml msgid "General-purpose 3D proximity detection node." msgstr "" @@ -53567,8 +53721,15 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape touches another. If there are " -"no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape touches another.\n" +"If there are no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the shape to check collisions with " "([code]with_shape[/code]), and the transformation matrix of that shape " @@ -53589,8 +53750,16 @@ msgstr "" #: doc/classes/Shape2D.xml msgid "" -"Returns a list of the points where this shape would touch another, if a " -"given movement was applied. If there are no collisions the list is empty.\n" +"Returns a list of contact point pairs where this shape would touch another, " +"if a given movement was applied.\n" +"If there would be no collisions, the returned list is empty. Otherwise, the " +"returned list contains contact points arranged in pairs, with entries " +"alternating between points on the boundary of this shape and points on the " +"boundary of [code]with_shape[/code].\n" +"A collision pair A, B can be used to calculate the collision normal with " +"[code](B - A).normalized()[/code], and the collision depth with [code](B - " +"A).length()[/code]. This information is typically used to separate shapes, " +"particularly in collision solvers.\n" "This method needs the transformation matrix for this shape " "([code]local_xform[/code]), the movement to test on this shape " "([code]local_motion[/code]), the shape to check collisions with " diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 68657b9152..7937090862 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -30,11 +30,26 @@ #include "rasterizer_scene_gles3.h" #include "core/config/project_settings.h" +#include "core/templates/sort_array.h" #include "servers/rendering/rendering_server_default.h" #include "storage/config.h" #ifdef GLES3_ENABLED +void glTexStorage2DCustom(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type) { +#ifdef GLES_OVER_GL + + for (int i = 0; i < levels; i++) { + glTexImage2D(target, i, internalformat, width, height, 0, format, type, nullptr); + width = MAX(1, (width / 2)); + height = MAX(1, (height / 2)); + } + +#else + glTexStorage2D(target, levels, internalformat, width, height); +#endif +} + uint64_t RasterizerSceneGLES3::auto_exposure_counter = 2; RasterizerSceneGLES3 *RasterizerSceneGLES3::singleton = nullptr; @@ -196,16 +211,39 @@ void RasterizerSceneGLES3::geometry_instance_set_cast_double_sided_shadows(Geome } uint32_t RasterizerSceneGLES3::geometry_instance_get_pair_mask() { - return 0; //(1 << RS::INSTANCE_LIGHT); - // For now, nothing is paired + return (1 << RS::INSTANCE_LIGHT); } void RasterizerSceneGLES3::geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) { GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance); ERR_FAIL_COND(!ginstance); + GLES3::Config *config = GLES3::Config::get_singleton(); + ginstance->omni_light_count = 0; ginstance->spot_light_count = 0; + ginstance->omni_lights.clear(); + ginstance->spot_lights.clear(); + + for (uint32_t i = 0; i < p_light_instance_count; i++) { + RS::LightType type = light_instance_get_type(p_light_instances[i]); + switch (type) { + case RS::LIGHT_OMNI: { + if (ginstance->omni_light_count < (uint32_t)config->max_lights_per_object) { + ginstance->omni_lights.push_back(p_light_instances[i]); + ginstance->omni_light_count++; + } + } break; + case RS::LIGHT_SPOT: { + if (ginstance->spot_light_count < (uint32_t)config->max_lights_per_object) { + ginstance->spot_lights.push_back(p_light_instances[i]); + ginstance->spot_light_count++; + } + } break; + default: + break; + } + } } void RasterizerSceneGLES3::geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) { @@ -495,8 +533,6 @@ void RasterizerSceneGLES3::_geometry_instance_update(GeometryInstance *p_geometr } } - //Fill push constant - bool store_transform = true; ginstance->base_flags = 0; @@ -556,12 +592,12 @@ void RasterizerSceneGLES3::set_directional_shadow_count(int p_count) { /* SKY API */ -void RasterizerSceneGLES3::Sky::free() { - if (radiance != 0) { - glDeleteTextures(1, &radiance); - radiance = 0; - glDeleteFramebuffers(1, &radiance_framebuffer); - radiance_framebuffer = 0; +void RasterizerSceneGLES3::_free_sky_data(Sky *p_sky) { + if (p_sky->radiance != 0) { + glDeleteTextures(1, &p_sky->radiance); + p_sky->radiance = 0; + glDeleteFramebuffers(1, &p_sky->radiance_framebuffer); + p_sky->radiance_framebuffer = 0; } } @@ -584,7 +620,8 @@ void RasterizerSceneGLES3::sky_set_radiance_size(RID p_sky, int p_radiance_size) sky->radiance_size = p_radiance_size; - sky->free(); + _free_sky_data(sky); + _invalidate_sky(sky); } void RasterizerSceneGLES3::sky_set_mode(RID p_sky, RS::SkyMode p_mode) { @@ -596,10 +633,7 @@ void RasterizerSceneGLES3::sky_set_mode(RID p_sky, RS::SkyMode p_mode) { } sky->mode = p_mode; - - if (sky->mode == RS::SKY_MODE_REALTIME) { - WARN_PRINT_ONCE("The OpenGL renderer does not support the Real Time Sky Update Mode yet. Please use High Quality Mode instead"); - } + _invalidate_sky(sky); } void RasterizerSceneGLES3::sky_set_material(RID p_sky, RID p_material) { @@ -611,6 +645,7 @@ void RasterizerSceneGLES3::sky_set_material(RID p_sky, RID p_material) { } sky->material = p_material; + _invalidate_sky(sky); } void RasterizerSceneGLES3::_invalidate_sky(Sky *p_sky) { @@ -626,13 +661,57 @@ void RasterizerSceneGLES3::_update_dirty_skys() { while (sky) { if (sky->radiance == 0) { - //int mipmaps = Image::get_image_required_mipmaps(sky->radiance_size, sky->radiance_size, Image::FORMAT_RGBAH) + 1; + sky->mipmap_count = Image::get_image_required_mipmaps(sky->radiance_size, sky->radiance_size, Image::FORMAT_RGBA8) + 1; - //uint32_t w = sky->radiance_size, h = sky->radiance_size; - //int layers = sky_globals.roughness_layers; + // Left uninitialized, will attach a texture at render time glGenFramebuffers(1, &sky->radiance_framebuffer); + GLenum internal_format = GL_RGB10_A2; + glGenTextures(1, &sky->radiance); + glBindTexture(GL_TEXTURE_CUBE_MAP, sky->radiance); + +#ifdef GLES_OVER_GL + GLenum format = GL_RGBA; + GLenum type = GL_UNSIGNED_INT_2_10_10_10_REV; + //TODO, on low-end compare this to allocating each face of each mip individually + // see: https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexStorage2D.xhtml + for (int i = 0; i < 6; i++) { + glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, internal_format, sky->radiance_size, sky->radiance_size, 0, format, type, nullptr); + } + + glGenerateMipmap(GL_TEXTURE_CUBE_MAP); +#else + glTexStorage2D(GL_TEXTURE_CUBE_MAP, sky->mipmap_count, internal_format, sky->radiance_size, sky->radiance_size); +#endif + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, 0); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, sky->mipmap_count); + + glGenTextures(1, &sky->raw_radiance); + glBindTexture(GL_TEXTURE_CUBE_MAP, sky->raw_radiance); + +#ifdef GLES_OVER_GL + //TODO, on low-end compare this to allocating each face of each mip individually + // see: https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexStorage2D.xhtml + for (int i = 0; i < 6; i++) { + glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, internal_format, sky->radiance_size, sky->radiance_size, 0, format, type, nullptr); + } + + glGenerateMipmap(GL_TEXTURE_CUBE_MAP); +#else + glTexStorage2D(GL_TEXTURE_CUBE_MAP, sky->mipmap_count, internal_format, sky->radiance_size, sky->radiance_size); +#endif + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, 0); + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, sky->mipmap_count); + glBindTexture(GL_TEXTURE_CUBE_MAP, 0); } sky->reflection_dirty = true; @@ -647,6 +726,152 @@ void RasterizerSceneGLES3::_update_dirty_skys() { dirty_sky_list = nullptr; } +void RasterizerSceneGLES3::_setup_sky(Environment *p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const CameraMatrix &p_projection, const Transform3D &p_transform, const Size2i p_screen_size) { + GLES3::LightStorage *light_storage = GLES3::LightStorage::get_singleton(); + GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); + ERR_FAIL_COND(!p_env); + + GLES3::SkyMaterialData *material = nullptr; + Sky *sky = sky_owner.get_or_null(p_env->sky); + + RID sky_material; + + GLES3::SkyShaderData *shader_data = nullptr; + + if (sky) { + sky_material = sky->material; + + if (sky_material.is_valid()) { + material = static_cast<GLES3::SkyMaterialData *>(material_storage->material_get_data(sky_material, RS::SHADER_SKY)); + if (!material || !material->shader_data->valid) { + material = nullptr; + } + } + + if (!material) { + sky_material = sky_globals.default_material; + material = static_cast<GLES3::SkyMaterialData *>(material_storage->material_get_data(sky_material, RS::SHADER_SKY)); + } + + ERR_FAIL_COND(!material); + + shader_data = material->shader_data; + + ERR_FAIL_COND(!shader_data); + + if (shader_data->uses_time && time - sky->prev_time > 0.00001) { + sky->prev_time = time; + sky->reflection_dirty = true; + RenderingServerDefault::redraw_request(); + } + + if (material != sky->prev_material) { + sky->prev_material = material; + sky->reflection_dirty = true; + } + + if (material->uniform_set_updated) { + material->uniform_set_updated = false; + sky->reflection_dirty = true; + } + + if (!p_transform.origin.is_equal_approx(sky->prev_position) && shader_data->uses_position) { + sky->prev_position = p_transform.origin; + sky->reflection_dirty = true; + } + + if (shader_data->uses_light) { + sky_globals.directional_light_count = 0; + for (int i = 0; i < (int)p_lights.size(); i++) { + LightInstance *li = light_instance_owner.get_or_null(p_lights[i]); + if (!li) { + continue; + } + RID base = li->light; + + ERR_CONTINUE(base.is_null()); + + RS::LightType type = light_storage->light_get_type(base); + if (type == RS::LIGHT_DIRECTIONAL && light_storage->light_directional_get_sky_mode(base) != RS::LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY) { + DirectionalLightData &sky_light_data = sky_globals.directional_lights[sky_globals.directional_light_count]; + Transform3D light_transform = li->transform; + Vector3 world_direction = light_transform.basis.xform(Vector3(0, 0, 1)).normalized(); + + sky_light_data.direction[0] = world_direction.x; + sky_light_data.direction[1] = world_direction.y; + sky_light_data.direction[2] = world_direction.z; + + float sign = light_storage->light_is_negative(base) ? -1 : 1; + sky_light_data.energy = sign * light_storage->light_get_param(base, RS::LIGHT_PARAM_ENERGY); + + Color linear_col = light_storage->light_get_color(base); + sky_light_data.color[0] = linear_col.r; + sky_light_data.color[1] = linear_col.g; + sky_light_data.color[2] = linear_col.b; + + sky_light_data.enabled = true; + + float angular_diameter = light_storage->light_get_param(base, RS::LIGHT_PARAM_SIZE); + if (angular_diameter > 0.0) { + angular_diameter = Math::tan(Math::deg2rad(angular_diameter)); + } else { + angular_diameter = 0.0; + } + sky_light_data.size = angular_diameter; + sky_globals.directional_light_count++; + if (sky_globals.directional_light_count >= sky_globals.max_directional_lights) { + break; + } + } + } + // Check whether the directional_light_buffer changes + bool light_data_dirty = false; + + // Light buffer is dirty if we have fewer or more lights + // If we have fewer lights, make sure that old lights are disabled + if (sky_globals.directional_light_count != sky_globals.last_frame_directional_light_count) { + light_data_dirty = true; + for (uint32_t i = sky_globals.directional_light_count; i < sky_globals.max_directional_lights; i++) { + sky_globals.directional_lights[i].enabled = false; + } + } + + if (!light_data_dirty) { + for (uint32_t i = 0; i < sky_globals.directional_light_count; i++) { + if (sky_globals.directional_lights[i].direction[0] != sky_globals.last_frame_directional_lights[i].direction[0] || + sky_globals.directional_lights[i].direction[1] != sky_globals.last_frame_directional_lights[i].direction[1] || + sky_globals.directional_lights[i].direction[2] != sky_globals.last_frame_directional_lights[i].direction[2] || + sky_globals.directional_lights[i].energy != sky_globals.last_frame_directional_lights[i].energy || + sky_globals.directional_lights[i].color[0] != sky_globals.last_frame_directional_lights[i].color[0] || + sky_globals.directional_lights[i].color[1] != sky_globals.last_frame_directional_lights[i].color[1] || + sky_globals.directional_lights[i].color[2] != sky_globals.last_frame_directional_lights[i].color[2] || + sky_globals.directional_lights[i].enabled != sky_globals.last_frame_directional_lights[i].enabled || + sky_globals.directional_lights[i].size != sky_globals.last_frame_directional_lights[i].size) { + light_data_dirty = true; + break; + } + } + } + + if (light_data_dirty) { + glBindBufferBase(GL_UNIFORM_BUFFER, SKY_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, sky_globals.directional_light_buffer); + glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(DirectionalLightData) * sky_globals.directional_light_count, sky_globals.directional_lights); + glBindBuffer(GL_UNIFORM_BUFFER, 0); + + DirectionalLightData *temp = sky_globals.last_frame_directional_lights; + sky_globals.last_frame_directional_lights = sky_globals.directional_lights; + sky_globals.directional_lights = temp; + sky_globals.last_frame_directional_light_count = sky_globals.directional_light_count; + sky->reflection_dirty = true; + } + } + + if (!sky->radiance) { + _update_dirty_skys(); + } + } +} + void RasterizerSceneGLES3::_draw_sky(Environment *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform) { GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); ERR_FAIL_COND(!p_env); @@ -686,8 +911,6 @@ void RasterizerSceneGLES3::_draw_sky(Environment *p_env, const CameraMatrix &p_p ERR_FAIL_COND(!shader_data); - //glBindBufferBase(GL_UNIFORM_BUFFER, 2, p_sky.directional light data); // Directional light data - // Camera CameraMatrix camera; @@ -709,11 +932,178 @@ void RasterizerSceneGLES3::_draw_sky(Environment *p_env, const CameraMatrix &p_p GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::PROJECTION, camera.matrix[2][0], camera.matrix[0][0], camera.matrix[2][1], camera.matrix[1][1], shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::POSITION, p_transform.origin, shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::TIME, time, shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); - // Bind a vertex array or else OpenGL complains. We won't actually use it - glBindVertexArray(sky_globals.quad_array); + + glBindVertexArray(sky_globals.screen_triangle_array); glDrawArrays(GL_TRIANGLES, 0, 3); } +void RasterizerSceneGLES3::_update_sky_radiance(Environment *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform) { + GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); + ERR_FAIL_COND(!p_env); + + Sky *sky = sky_owner.get_or_null(p_env->sky); + ERR_FAIL_COND(!sky); + + GLES3::SkyMaterialData *material_data = nullptr; + RID sky_material; + + RS::EnvironmentBG background = p_env->background; + + if (sky) { + ERR_FAIL_COND(!sky); + sky_material = sky->material; + + if (sky_material.is_valid()) { + material_data = static_cast<GLES3::SkyMaterialData *>(material_storage->material_get_data(sky_material, RS::SHADER_SKY)); + if (!material_data || !material_data->shader_data->valid) { + material_data = nullptr; + } + } + + if (!material_data) { + sky_material = sky_globals.default_material; + material_data = static_cast<GLES3::SkyMaterialData *>(material_storage->material_get_data(sky_material, RS::SHADER_SKY)); + } + } else if (background == RS::ENV_BG_CLEAR_COLOR || background == RS::ENV_BG_COLOR) { + sky_material = sky_globals.fog_material; + material_data = static_cast<GLES3::SkyMaterialData *>(material_storage->material_get_data(sky_material, RS::SHADER_SKY)); + } + + ERR_FAIL_COND(!material_data); + material_data->bind_uniforms(); + + GLES3::SkyShaderData *shader_data = material_data->shader_data; + + ERR_FAIL_COND(!shader_data); + + bool update_single_frame = sky->mode == RS::SKY_MODE_REALTIME || sky->mode == RS::SKY_MODE_QUALITY; + RS::SkyMode sky_mode = sky->mode; + + if (sky_mode == RS::SKY_MODE_AUTOMATIC) { + if (shader_data->uses_time || shader_data->uses_position) { + update_single_frame = true; + sky_mode = RS::SKY_MODE_REALTIME; + } else if (shader_data->uses_light || shader_data->ubo_size > 0) { + update_single_frame = false; + sky_mode = RS::SKY_MODE_INCREMENTAL; + } else { + update_single_frame = true; + sky_mode = RS::SKY_MODE_QUALITY; + } + } + + if (sky->processing_layer == 0 && sky_mode == RS::SKY_MODE_INCREMENTAL) { + // On the first frame after creating sky, rebuild in single frame + update_single_frame = true; + sky_mode = RS::SKY_MODE_QUALITY; + } + + int max_processing_layer = sky->mipmap_count; + + // Update radiance cubemap + if (sky->reflection_dirty && (sky->processing_layer >= max_processing_layer || update_single_frame)) { + static const Vector3 view_normals[6] = { + Vector3(+1, 0, 0), + Vector3(-1, 0, 0), + Vector3(0, +1, 0), + Vector3(0, -1, 0), + Vector3(0, 0, +1), + Vector3(0, 0, -1) + }; + static const Vector3 view_up[6] = { + Vector3(0, -1, 0), + Vector3(0, -1, 0), + Vector3(0, 0, +1), + Vector3(0, 0, -1), + Vector3(0, -1, 0), + Vector3(0, -1, 0) + }; + + CameraMatrix cm; + cm.set_perspective(90, 1, 0.01, 10.0); + CameraMatrix correction; + correction.set_depth_correction(true); + cm = correction * cm; + + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_bind_shader(shader_data->version, SkyShaderGLES3::MODE_CUBEMAP); + + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::POSITION, p_transform.origin, shader_data->version, SkyShaderGLES3::MODE_CUBEMAP); + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::TIME, time, shader_data->version, SkyShaderGLES3::MODE_CUBEMAP); + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::PROJECTION, cm.matrix[2][0], cm.matrix[0][0], cm.matrix[2][1], cm.matrix[1][1], shader_data->version, SkyShaderGLES3::MODE_CUBEMAP); + + // Bind a vertex array or else OpenGL complains. We won't actually use it + glBindVertexArray(sky_globals.screen_triangle_array); + + glViewport(0, 0, sky->radiance_size, sky->radiance_size); + glBindFramebuffer(GL_FRAMEBUFFER, sky->radiance_framebuffer); + + for (int i = 0; i < 6; i++) { + Basis local_view = Basis::looking_at(view_normals[i], view_up[i]); + GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_set_uniform(SkyShaderGLES3::ORIENTATION, local_view, shader_data->version, SkyShaderGLES3::MODE_CUBEMAP); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, sky->raw_radiance, 0); + glDrawArrays(GL_TRIANGLES, 0, 3); + } + + if (update_single_frame) { + for (int i = 0; i < max_processing_layer; i++) { + _filter_sky_radiance(sky, i); + } + } else { + _filter_sky_radiance(sky, 0); //Just copy over the first mipmap + } + sky->processing_layer = 1; + + sky->reflection_dirty = false; + } else { + if (sky_mode == RS::SKY_MODE_INCREMENTAL && sky->processing_layer < max_processing_layer) { + _filter_sky_radiance(sky, sky->processing_layer); + sky->processing_layer++; + } + } +} + +void RasterizerSceneGLES3::_filter_sky_radiance(Sky *p_sky, int p_base_layer) { + GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_CUBE_MAP, p_sky->raw_radiance); + glBindFramebuffer(GL_FRAMEBUFFER, p_sky->radiance_framebuffer); + + CubemapFilterShaderGLES3::ShaderVariant mode = CubemapFilterShaderGLES3::MODE_DEFAULT; + + if (p_base_layer == 0) { + glGenerateMipmap(GL_TEXTURE_CUBE_MAP); + mode = CubemapFilterShaderGLES3::MODE_COPY; + + //Copy over base layer + } + glActiveTexture(GL_TEXTURE1); + glBindTexture(GL_TEXTURE_2D, sky_globals.radical_inverse_vdc_cache_tex); + + int size = p_sky->radiance_size >> p_base_layer; + glViewport(0, 0, size, size); + glBindVertexArray(sky_globals.screen_triangle_array); + + material_storage->shaders.cubemap_filter_shader.version_bind_shader(scene_globals.cubemap_filter_shader_version, mode); + material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::SAMPLE_COUNT, sky_globals.ggx_samples, scene_globals.cubemap_filter_shader_version, mode); + material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::ROUGHNESS, float(p_base_layer) / (p_sky->mipmap_count - 1.0), scene_globals.cubemap_filter_shader_version, mode); + material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::FACE_SIZE, float(size), scene_globals.cubemap_filter_shader_version, mode); + + for (int i = 0; i < 6; i++) { + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, p_sky->radiance, p_base_layer); +#ifdef DEBUG_ENABLED + GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + ERR_CONTINUE(status != GL_FRAMEBUFFER_COMPLETE); +#endif + material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::FACE_ID, i, scene_globals.cubemap_filter_shader_version, mode); + + glDrawArrays(GL_TRIANGLES, 0, 3); + } + glBindVertexArray(0); + glViewport(0, 0, p_sky->screen_size.x, p_sky->screen_size.y); + glBindFramebuffer(GL_FRAMEBUFFER, 0); +} + Ref<Image> RasterizerSceneGLES3::sky_bake_panorama(RID p_sky, float p_energy, bool p_bake_irradiance, const Size2i &p_size) { return Ref<Image>(); } @@ -941,13 +1331,29 @@ void RasterizerSceneGLES3::directional_shadow_quality_set(RS::ShadowQuality p_qu } RID RasterizerSceneGLES3::light_instance_create(RID p_light) { - return RID(); + RID li = light_instance_owner.make_rid(LightInstance()); + + LightInstance *light_instance = light_instance_owner.get_or_null(li); + + light_instance->self = li; + light_instance->light = p_light; + light_instance->light_type = RSG::light_storage->light_get_type(p_light); + + return li; } void RasterizerSceneGLES3::light_instance_set_transform(RID p_light_instance, const Transform3D &p_transform) { + LightInstance *light_instance = light_instance_owner.get_or_null(p_light_instance); + ERR_FAIL_COND(!light_instance); + + light_instance->transform = p_transform; } void RasterizerSceneGLES3::light_instance_set_aabb(RID p_light_instance, const AABB &p_aabb) { + LightInstance *light_instance = light_instance_owner.get_or_null(p_light_instance); + ERR_FAIL_COND(!light_instance); + + light_instance->aabb = p_aabb; } void RasterizerSceneGLES3::light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform3D &p_transform, float p_far, float p_split, int p_pass, float p_shadow_texel_size, float p_bias_scale, float p_range_begin, const Vector2 &p_uv_scale) { @@ -1090,8 +1496,22 @@ void RasterizerSceneGLES3::_fill_render_list(RenderListType p_render_list, const flags |= INSTANCE_DATA_FLAGS_NON_UNIFORM_SCALE; } - //Process lights here, determine if they need extra passes + // Sets the index values for lookup in the shader + // This has to be done after _setup_lights was called this frame + // TODO, check shadow status of lights here, if using shadows, skip here and add below if (p_pass_mode == PASS_MODE_COLOR) { + if (inst->omni_light_count) { + inst->omni_light_gl_cache.resize(inst->omni_light_count); + for (uint32_t j = 0; j < inst->omni_light_count; j++) { + inst->omni_light_gl_cache[j] = light_instance_get_gl_id(inst->omni_lights[j]); + } + } + if (inst->spot_light_count) { + inst->spot_light_gl_cache.resize(inst->spot_light_count); + for (uint32_t j = 0; j < inst->spot_light_count; j++) { + inst->spot_light_gl_cache[j] = light_instance_get_gl_id(inst->spot_lights[j]); + } + } } inst->flags_cache = flags; @@ -1197,6 +1617,7 @@ void RasterizerSceneGLES3::_fill_render_list(RenderListType p_render_list, const } } +// Needs to be called after _setup_lights so that directional_light_count is accurate. void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_data, bool p_no_fog, const Size2i &p_screen_size, bool p_flip_y, const Color &p_default_bg_color, bool p_pancake_shadows) { CameraMatrix correction; correction.set_depth_correction(p_flip_y); @@ -1205,15 +1626,13 @@ void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_da RasterizerStorageGLES3::store_camera(projection, scene_state.ubo.projection_matrix); RasterizerStorageGLES3::store_camera(projection.inverse(), scene_state.ubo.inv_projection_matrix); RasterizerStorageGLES3::store_transform(p_render_data->cam_transform, scene_state.ubo.inv_view_matrix); - RasterizerStorageGLES3::store_transform(p_render_data->cam_transform.affine_inverse(), scene_state.ubo.view_matrix); + RasterizerStorageGLES3::store_transform(p_render_data->inv_cam_transform, scene_state.ubo.view_matrix); - scene_state.ubo.directional_light_count = 1; + scene_state.ubo.directional_light_count = p_render_data->directional_light_count; scene_state.ubo.z_far = p_render_data->z_far; scene_state.ubo.z_near = p_render_data->z_near; - scene_state.ubo.pancake_shadows = p_pancake_shadows; - scene_state.ubo.viewport_size[0] = p_screen_size.x; scene_state.ubo.viewport_size[1] = p_screen_size.y; @@ -1242,6 +1661,8 @@ void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_da scene_state.ubo.ambient_light_color_energy[0] = color.r * bg_energy; scene_state.ubo.ambient_light_color_energy[1] = color.g * bg_energy; scene_state.ubo.ambient_light_color_energy[2] = color.b * bg_energy; + scene_state.ubo.use_ambient_light = true; + scene_state.ubo.use_ambient_cubemap = false; } else { float energy = env->ambient_light_energy; Color color = env->ambient_light; @@ -1253,6 +1674,16 @@ void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_da Basis sky_transform = env->sky_orientation; sky_transform = sky_transform.inverse() * p_render_data->cam_transform.basis; RasterizerStorageGLES3::store_transform_3x3(sky_transform, scene_state.ubo.radiance_inverse_xform); + scene_state.ubo.use_ambient_cubemap = (ambient_src == RS::ENV_AMBIENT_SOURCE_BG && env_bg == RS::ENV_BG_SKY) || ambient_src == RS::ENV_AMBIENT_SOURCE_SKY; + scene_state.ubo.use_ambient_light = scene_state.ubo.use_ambient_cubemap || ambient_src == RS::ENV_AMBIENT_SOURCE_COLOR; + } + + //specular + RS::EnvironmentReflectionSource ref_src = env->reflection_source; + if ((ref_src == RS::ENV_REFLECTION_SOURCE_BG && env_bg == RS::ENV_BG_SKY) || ref_src == RS::ENV_REFLECTION_SOURCE_SKY) { + scene_state.ubo.use_reflection_cubemap = true; + } else { + scene_state.ubo.use_reflection_cubemap = false; } scene_state.ubo.fog_enabled = env->fog_enabled; @@ -1281,6 +1712,210 @@ void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_da glBindBuffer(GL_UNIFORM_BUFFER, 0); } +// Puts lights into Uniform Buffers. Needs to be called before _fill_list as this caches the index of each light in the Uniform Buffer +void RasterizerSceneGLES3::_setup_lights(const RenderDataGLES3 *p_render_data, bool p_using_shadows, uint32_t &r_directional_light_count, uint32_t &r_omni_light_count, uint32_t &r_spot_light_count) { + GLES3::LightStorage *light_storage = GLES3::LightStorage::get_singleton(); + GLES3::Config *config = GLES3::Config::get_singleton(); + + const Transform3D inverse_transform = p_render_data->inv_cam_transform; + + const PagedArray<RID> &lights = *p_render_data->lights; + + r_directional_light_count = 0; + r_omni_light_count = 0; + r_spot_light_count = 0; + + int num_lights = lights.size(); + + for (int i = 0; i < num_lights; i++) { + LightInstance *li = light_instance_owner.get_or_null(lights[i]); + if (!li) { + continue; + } + RID base = li->light; + + ERR_CONTINUE(base.is_null()); + + RS::LightType type = light_storage->light_get_type(base); + switch (type) { + case RS::LIGHT_DIRECTIONAL: { + if (r_directional_light_count >= RendererSceneRender::MAX_DIRECTIONAL_LIGHTS || light_storage->light_directional_get_sky_mode(base) == RS::LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY) { + continue; + } + + DirectionalLightData &light_data = scene_state.directional_lights[r_directional_light_count]; + + Transform3D light_transform = li->transform; + + Vector3 direction = inverse_transform.basis.xform(light_transform.basis.xform(Vector3(0, 0, 1))).normalized(); + + light_data.direction[0] = direction.x; + light_data.direction[1] = direction.y; + light_data.direction[2] = direction.z; + + float sign = light_storage->light_is_negative(base) ? -1 : 1; + + light_data.energy = sign * light_storage->light_get_param(base, RS::LIGHT_PARAM_ENERGY) * Math_PI; + + Color linear_col = light_storage->light_get_color(base).srgb_to_linear(); + light_data.color[0] = linear_col.r; + light_data.color[1] = linear_col.g; + light_data.color[2] = linear_col.b; + + float size = light_storage->light_get_param(base, RS::LIGHT_PARAM_SIZE); + light_data.size = 1.0 - Math::cos(Math::deg2rad(size)); //angle to cosine offset + + light_data.specular = light_storage->light_get_param(base, RS::LIGHT_PARAM_SPECULAR); + + r_directional_light_count++; + } break; + case RS::LIGHT_OMNI: { + if (r_omni_light_count >= (uint32_t)config->max_renderable_lights) { + continue; + } + + const real_t distance = p_render_data->cam_transform.origin.distance_to(li->transform.origin); + + if (light_storage->light_is_distance_fade_enabled(li->light)) { + const float fade_begin = light_storage->light_get_distance_fade_begin(li->light); + const float fade_length = light_storage->light_get_distance_fade_length(li->light); + + if (distance > fade_begin) { + if (distance > fade_begin + fade_length) { + // Out of range, don't draw this light to improve performance. + continue; + } + } + } + + li->gl_id = r_omni_light_count; + + scene_state.omni_light_sort[r_omni_light_count].instance = li; + scene_state.omni_light_sort[r_omni_light_count].depth = distance; + r_omni_light_count++; + } break; + case RS::LIGHT_SPOT: { + if (r_spot_light_count >= (uint32_t)config->max_renderable_lights) { + continue; + } + + const real_t distance = p_render_data->cam_transform.origin.distance_to(li->transform.origin); + + if (light_storage->light_is_distance_fade_enabled(li->light)) { + const float fade_begin = light_storage->light_get_distance_fade_begin(li->light); + const float fade_length = light_storage->light_get_distance_fade_length(li->light); + + if (distance > fade_begin) { + if (distance > fade_begin + fade_length) { + // Out of range, don't draw this light to improve performance. + continue; + } + } + } + + li->gl_id = r_spot_light_count; + + scene_state.spot_light_sort[r_spot_light_count].instance = li; + scene_state.spot_light_sort[r_spot_light_count].depth = distance; + r_spot_light_count++; + } break; + } + } + + if (r_omni_light_count) { + SortArray<InstanceSort<LightInstance>> sorter; + sorter.sort(scene_state.omni_light_sort, r_omni_light_count); + } + + if (r_spot_light_count) { + SortArray<InstanceSort<LightInstance>> sorter; + sorter.sort(scene_state.spot_light_sort, r_spot_light_count); + } + + for (uint32_t i = 0; i < (r_omni_light_count + r_spot_light_count); i++) { + uint32_t index = (i < r_omni_light_count) ? i : i - (r_omni_light_count); + LightData &light_data = (i < r_omni_light_count) ? scene_state.omni_lights[index] : scene_state.spot_lights[index]; + //RS::LightType type = (i < omni_light_count) ? RS::LIGHT_OMNI : RS::LIGHT_SPOT; + LightInstance *li = (i < r_omni_light_count) ? scene_state.omni_light_sort[index].instance : scene_state.spot_light_sort[index].instance; + RID base = li->light; + + Transform3D light_transform = li->transform; + Vector3 pos = inverse_transform.xform(light_transform.origin); + + light_data.position[0] = pos.x; + light_data.position[1] = pos.y; + light_data.position[2] = pos.z; + + float radius = MAX(0.001, light_storage->light_get_param(base, RS::LIGHT_PARAM_RANGE)); + light_data.inv_radius = 1.0 / radius; + + Vector3 direction = inverse_transform.basis.xform(light_transform.basis.xform(Vector3(0, 0, -1))).normalized(); + + light_data.direction[0] = direction.x; + light_data.direction[1] = direction.y; + light_data.direction[2] = direction.z; + + float size = light_storage->light_get_param(base, RS::LIGHT_PARAM_SIZE); + + light_data.size = size; + + float sign = light_storage->light_is_negative(base) ? -1 : 1; + Color linear_col = light_storage->light_get_color(base).srgb_to_linear(); + + // Reuse fade begin, fade length and distance for shadow LOD determination later. + float fade_begin = 0.0; + float fade_length = 0.0; + real_t distance = 0.0; + + float fade = 1.0; + if (light_storage->light_is_distance_fade_enabled(li->light)) { + fade_begin = light_storage->light_get_distance_fade_begin(li->light); + fade_length = light_storage->light_get_distance_fade_length(li->light); + distance = p_render_data->cam_transform.origin.distance_to(li->transform.origin); + + if (distance > fade_begin) { + // Use `smoothstep()` to make opacity changes more gradual and less noticeable to the player. + fade = Math::smoothstep(0.0f, 1.0f, 1.0f - float(distance - fade_begin) / fade_length); + } + } + + float energy = sign * light_storage->light_get_param(base, RS::LIGHT_PARAM_ENERGY) * Math_PI * fade; + + light_data.color[0] = linear_col.r * energy; + light_data.color[1] = linear_col.g * energy; + light_data.color[2] = linear_col.b * energy; + + light_data.attenuation = light_storage->light_get_param(base, RS::LIGHT_PARAM_ATTENUATION); + + light_data.inv_spot_attenuation = 1.0f / light_storage->light_get_param(base, RS::LIGHT_PARAM_SPOT_ATTENUATION); + + float spot_angle = light_storage->light_get_param(base, RS::LIGHT_PARAM_SPOT_ANGLE); + light_data.cos_spot_angle = Math::cos(Math::deg2rad(spot_angle)); + + light_data.specular_amount = light_storage->light_get_param(base, RS::LIGHT_PARAM_SPECULAR) * 2.0; + + light_data.shadow_enabled = false; + } + + // TODO, to avoid stalls, should rotate between 3 buffers based on frame index. + // TODO, consider mapping the buffer as in 2D + if (r_omni_light_count) { + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_OMNILIGHT_UNIFORM_LOCATION, scene_state.omni_light_buffer); + glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(LightData) * r_omni_light_count, scene_state.omni_lights); + } + + if (r_spot_light_count) { + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_SPOTLIGHT_UNIFORM_LOCATION, scene_state.spot_light_buffer); + glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(LightData) * r_spot_light_count, scene_state.spot_lights); + } + + if (r_directional_light_count) { + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, scene_state.directional_light_buffer); + glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(DirectionalLightData) * r_directional_light_count, scene_state.directional_lights); + } + glBindBuffer(GL_UNIFORM_BUFFER, 0); +} + void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *p_camera_data, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data, RendererScene::RenderInfo *r_render_info) { GLES3::TextureStorage *texture_storage = GLES3::TextureStorage::get_singleton(); GLES3::Config *config = GLES3::Config::get_singleton(); @@ -1300,6 +1935,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * render_data.transparent_bg = rb->is_transparent; // Our first camera is used by default render_data.cam_transform = p_camera_data->main_transform; + render_data.inv_cam_transform = render_data.cam_transform.affine_inverse(); render_data.cam_projection = p_camera_data->main_projection; render_data.view_projection[0] = p_camera_data->main_projection; render_data.cam_orthogonal = p_camera_data->is_orthogonal; @@ -1317,8 +1953,6 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * render_data.reflection_probes = &p_reflection_probes; render_data.environment = p_environment; render_data.camera_effects = p_camera_effects; - render_data.shadow_atlas = p_shadow_atlas; - render_data.reflection_atlas = p_reflection_atlas; render_data.reflection_probe = p_reflection_probe; render_data.reflection_probe_pass = p_reflection_probe_pass; @@ -1365,8 +1999,10 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * screen_size.x = rb->width; screen_size.y = rb->height; + bool use_wireframe = get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME; + SceneState::TonemapUBO tonemap_ubo; - if (is_environment(p_environment)) { + if (env) { tonemap_ubo.exposure = env->exposure; tonemap_ubo.white = env->white; tonemap_ubo.tonemapper = int32_t(env->tone_mapper); @@ -1379,12 +2015,79 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_TONEMAP_UNIFORM_LOCATION, scene_state.tonemap_buffer); glBufferData(GL_UNIFORM_BUFFER, sizeof(SceneState::TonemapUBO), &tonemap_ubo, GL_STREAM_DRAW); + _setup_lights(&render_data, false, render_data.directional_light_count, render_data.omni_light_count, render_data.spot_light_count); _setup_environment(&render_data, render_data.reflection_probe.is_valid(), screen_size, !render_data.reflection_probe.is_valid(), clear_color, false); _fill_render_list(RENDER_LIST_OPAQUE, &render_data, PASS_MODE_COLOR); render_list[RENDER_LIST_OPAQUE].sort_by_key(); render_list[RENDER_LIST_ALPHA].sort_by_reverse_depth_and_priority(); + bool draw_sky = false; + bool draw_sky_fog_only = false; + bool keep_color = false; + + if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_OVERDRAW) { + clear_color = Color(0, 0, 0, 1); //in overdraw mode, BG should always be black + } else if (env) { + RS::EnvironmentBG bg_mode = env->background; + float bg_energy = env->bg_energy; + switch (bg_mode) { + case RS::ENV_BG_CLEAR_COLOR: { + clear_color.r *= bg_energy; + clear_color.g *= bg_energy; + clear_color.b *= bg_energy; + if (env->fog_enabled) { + draw_sky_fog_only = true; + GLES3::MaterialStorage::get_singleton()->material_set_param(sky_globals.fog_material, "clear_color", Variant(clear_color)); + } + } break; + case RS::ENV_BG_COLOR: { + clear_color = env->bg_color; + clear_color.r *= bg_energy; + clear_color.g *= bg_energy; + clear_color.b *= bg_energy; + if (env->fog_enabled) { + draw_sky_fog_only = true; + GLES3::MaterialStorage::get_singleton()->material_set_param(sky_globals.fog_material, "clear_color", Variant(clear_color)); + } + } break; + case RS::ENV_BG_SKY: { + draw_sky = true; + } break; + case RS::ENV_BG_CANVAS: { + keep_color = true; + } break; + case RS::ENV_BG_KEEP: { + keep_color = true; + } break; + case RS::ENV_BG_CAMERA_FEED: { + } break; + default: { + } + } + // setup sky if used for ambient, reflections, or background + if (draw_sky || draw_sky_fog_only || env->reflection_source == RS::ENV_REFLECTION_SOURCE_SKY || env->ambient_source == RS::ENV_AMBIENT_SOURCE_SKY) { + RENDER_TIMESTAMP("Setup Sky"); + CameraMatrix projection = render_data.cam_projection; + if (render_data.reflection_probe.is_valid()) { + CameraMatrix correction; + correction.set_depth_correction(true); + projection = correction * render_data.cam_projection; + } + + _setup_sky(env, p_render_buffers, *render_data.lights, projection, render_data.cam_transform, screen_size); + + if (env->sky.is_valid()) { + if (env->reflection_source == RS::ENV_REFLECTION_SOURCE_SKY || env->ambient_source == RS::ENV_AMBIENT_SOURCE_SKY || (env->reflection_source == RS::ENV_REFLECTION_SOURCE_BG && env->background == RS::ENV_BG_SKY)) { + _update_sky_radiance(env, projection, render_data.cam_transform); + } + } else { + // do not try to draw sky if invalid + draw_sky = false; + } + } + } + glBindFramebuffer(GL_FRAMEBUFFER, rb->framebuffer); glViewport(0, 0, rb->width, rb->height); @@ -1395,6 +2098,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * use_depth_prepass = use_depth_prepass && get_debug_draw_mode() != RS::VIEWPORT_DEBUG_DRAW_OVERDRAW; if (use_depth_prepass) { + RENDER_TIMESTAMP("Depth Prepass"); //pre z pass glDisable(GL_BLEND); @@ -1410,9 +2114,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * glClearDepth(1.0f); glClear(GL_DEPTH_BUFFER_BIT); - uint32_t spec_constant_base_flags = 0; - - RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), reverse_cull, spec_constant_base_flags, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, render_data.lod_camera_plane, render_data.lod_distance_multiplier, render_data.screen_mesh_lod_threshold); + RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), reverse_cull, 0, use_wireframe); _render_list_template<PASS_MODE_DEPTH>(&render_list_params, &render_data, 0, render_list[RENDER_LIST_OPAQUE].elements.size()); glColorMask(1, 1, 1, 1); @@ -1429,7 +2131,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); } else { - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ZERO, GL_ONE); glDisable(GL_BLEND); } scene_state.current_blend_mode = GLES3::SceneShaderData::BLEND_MODE_MIX; @@ -1445,54 +2147,29 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * glClear(GL_DEPTH_BUFFER_BIT); } - bool draw_sky = false; - bool keep_color = false; - - if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_OVERDRAW) { - clear_color = Color(0, 0, 0, 1); //in overdraw mode, BG should always be black - } else if (is_environment(p_environment)) { - RS::EnvironmentBG bg_mode = environment_get_background(p_environment); - float bg_energy = env->bg_energy; //environment_get_bg_energy(p_environment); - switch (bg_mode) { - case RS::ENV_BG_CLEAR_COLOR: { - clear_color.r *= bg_energy; - clear_color.g *= bg_energy; - clear_color.b *= bg_energy; - } break; - case RS::ENV_BG_COLOR: { - clear_color = env->bg_color; //environment_get_bg_color(p_environment); - clear_color.r *= bg_energy; - clear_color.g *= bg_energy; - clear_color.b *= bg_energy; - } break; - case RS::ENV_BG_SKY: { - draw_sky = true; - } break; - case RS::ENV_BG_CANVAS: { - keep_color = true; - } break; - case RS::ENV_BG_KEEP: { - keep_color = true; - } break; - case RS::ENV_BG_CAMERA_FEED: { - } break; - default: { - } - } - // Draw sky cubemap - } - if (!keep_color) { glClearBufferfv(GL_COLOR, 0, clear_color.components); } - + RENDER_TIMESTAMP("Render Opaque Pass"); uint32_t spec_constant_base_flags = 0; - //Render Opaque Objects - RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), reverse_cull, spec_constant_base_flags, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, render_data.lod_camera_plane, render_data.lod_distance_multiplier, render_data.screen_mesh_lod_threshold); + + { + // Specialization Constants that apply for entire rendering pass. + if (render_data.directional_light_count == 0) { + spec_constant_base_flags |= 1 << SPEC_CONSTANT_DISABLE_DIRECTIONAL_LIGHTS; + } + + if (!env || (env && !env->fog_enabled)) { + spec_constant_base_flags |= 1 << SPEC_CONSTANT_DISABLE_FOG; + } + } + // Render Opaque Objects. + RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), reverse_cull, spec_constant_base_flags, use_wireframe); _render_list_template<PASS_MODE_COLOR>(&render_list_params, &render_data, 0, render_list[RENDER_LIST_OPAQUE].elements.size()); if (draw_sky) { + RENDER_TIMESTAMP("Render Sky"); if (scene_state.current_depth_test != GLES3::SceneShaderData::DEPTH_TEST_ENABLED) { glEnable(GL_DEPTH_TEST); scene_state.current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_ENABLED; @@ -1509,19 +2186,15 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * _draw_sky(env, render_data.cam_projection, render_data.cam_transform); } + RENDER_TIMESTAMP("Render 3D Transparent Pass"); glEnable(GL_BLEND); //Render transparent pass - RenderListParameters render_list_params_alpha(render_list[RENDER_LIST_ALPHA].elements.ptr(), render_list[RENDER_LIST_ALPHA].elements.size(), reverse_cull, spec_constant_base_flags, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, render_data.lod_camera_plane, render_data.lod_distance_multiplier, render_data.screen_mesh_lod_threshold); + RenderListParameters render_list_params_alpha(render_list[RENDER_LIST_ALPHA].elements.ptr(), render_list[RENDER_LIST_ALPHA].elements.size(), reverse_cull, spec_constant_base_flags, use_wireframe); _render_list_template<PASS_MODE_COLOR_TRANSPARENT>(&render_list_params_alpha, &render_data, 0, render_list[RENDER_LIST_ALPHA].elements.size(), true); if (p_render_buffers.is_valid()) { - /* - RENDER_TIMESTAMP("Tonemap"); - _render_buffers_post_process_and_tonemap(&render_data); - */ - _render_buffers_debug_draw(p_render_buffers, p_shadow_atlas, p_occluder_debug_tex); } glDisable(GL_BLEND); @@ -1531,12 +2204,16 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData * template <PassMode p_pass_mode> void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params, const RenderDataGLES3 *p_render_data, uint32_t p_from_element, uint32_t p_to_element, bool p_alpha_pass) { GLES3::MeshStorage *mesh_storage = GLES3::MeshStorage::get_singleton(); + GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); + GLES3::TextureStorage *texture_storage = GLES3::TextureStorage::get_singleton(); + GLES3::Config *config = GLES3::Config::get_singleton(); GLuint prev_vertex_array_gl = 0; GLuint prev_index_array_gl = 0; GLES3::SceneMaterialData *prev_material_data = nullptr; GLES3::SceneShaderData *prev_shader = nullptr; + GeometryInstanceGLES3 *prev_inst = nullptr; SceneShaderGLES3::ShaderVariant shader_variant = SceneShaderGLES3::MODE_COLOR; // Assigned to silence wrong -Wmaybe-initialized. @@ -1553,9 +2230,23 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params, } break; } + if (p_pass_mode == PASS_MODE_COLOR || p_pass_mode == PASS_MODE_COLOR_TRANSPARENT) { + Environment *env = environment_owner.get_or_null(p_render_data->environment); + glActiveTexture(GL_TEXTURE0 + config->max_texture_image_units - 2); + GLuint texture_to_bind = texture_storage->get_texture(texture_storage->texture_gl_get_default(GLES3::DEFAULT_GL_TEXTURE_CUBEMAP_BLACK))->tex_id; + if (env) { + Sky *sky = sky_owner.get_or_null(env->sky); + if (sky && sky->radiance != 0) { + texture_to_bind = sky->radiance; + // base_spec_constant |= USE_RADIANCE_MAP; + } + glBindTexture(GL_TEXTURE_CUBE_MAP, texture_to_bind); + } + } + for (uint32_t i = p_from_element; i < p_to_element; i++) { const GeometryInstanceSurface *surf = p_params->elements[i]; - const GeometryInstanceGLES3 *inst = surf->owner; + GeometryInstanceGLES3 *inst = surf->owner; if (p_pass_mode == PASS_MODE_COLOR && !(surf->flags & GeometryInstanceSurface::FLAG_PASS_OPAQUE)) { continue; // Objects with "Depth-prepass" transparency are included in both render lists, but should only be rendered in the transparent pass @@ -1627,7 +2318,7 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params, if (p_render_data->transparent_bg) { glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } else { - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ZERO, GL_ONE); } } break; @@ -1639,6 +2330,7 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params, case GLES3::SceneShaderData::BLEND_MODE_SUB: { glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); glBlendFunc(GL_SRC_ALPHA, GL_ONE); + } break; case GLES3::SceneShaderData::BLEND_MODE_MUL: { glBlendEquation(GL_FUNC_ADD); @@ -1718,8 +2410,6 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params, prev_index_array_gl = index_array_gl; } - // Update pipeline information here - Transform3D world_transform; if (inst->store_transform_cache) { world_transform = inst->transform; @@ -1727,13 +2417,40 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params, if (prev_material_data != material_data) { material_data->bind_uniforms(); + prev_material_data = material_data; } if (prev_shader != shader) { - GLES3::MaterialStorage::get_singleton()->shaders.scene_shader.version_bind_shader(shader->version, shader_variant); + material_storage->shaders.scene_shader.version_bind_shader(shader->version, shader_variant); + float opaque_prepass_threshold = 0.0; + if (p_pass_mode == PASS_MODE_DEPTH) { + opaque_prepass_threshold = 0.99; + } else if (p_pass_mode == PASS_MODE_SHADOW) { + opaque_prepass_threshold = 0.1; + } + + material_storage->shaders.scene_shader.version_set_uniform(SceneShaderGLES3::OPAQUE_PREPASS_THRESHOLD, opaque_prepass_threshold, shader->version, shader_variant); + + prev_shader = shader; + } + + if (prev_inst != inst) { + // Rebind the light indices. + material_storage->shaders.scene_shader.version_set_uniform(SceneShaderGLES3::OMNI_LIGHT_COUNT, inst->omni_light_count, shader->version, shader_variant); + material_storage->shaders.scene_shader.version_set_uniform(SceneShaderGLES3::SPOT_LIGHT_COUNT, inst->spot_light_count, shader->version, shader_variant); + + if (inst->omni_light_count) { + glUniform1uiv(material_storage->shaders.scene_shader.version_get_uniform(SceneShaderGLES3::OMNI_LIGHT_INDICES, shader->version, shader_variant), inst->omni_light_count, inst->omni_light_gl_cache.ptr()); + } + + if (inst->spot_light_count) { + glUniform1uiv(material_storage->shaders.scene_shader.version_get_uniform(SceneShaderGLES3::SPOT_LIGHT_INDICES, shader->version, shader_variant), inst->spot_light_count, inst->spot_light_gl_cache.ptr()); + } + + prev_inst = inst; } - GLES3::MaterialStorage::get_singleton()->shaders.scene_shader.version_set_uniform(SceneShaderGLES3::WORLD_TRANSFORM, world_transform, shader->version, shader_variant); + material_storage->shaders.scene_shader.version_set_uniform(SceneShaderGLES3::WORLD_TRANSFORM, world_transform, shader->version, shader_variant); if (use_index_buffer) { glDrawElements(primitive_gl, mesh_storage->mesh_surface_get_vertices_drawn_count(mesh_surface), mesh_storage->mesh_surface_get_index_type(mesh_surface), 0); @@ -1976,7 +2693,7 @@ bool RasterizerSceneGLES3::free(RID p_rid) { } else if (sky_owner.owns(p_rid)) { Sky *sky = sky_owner.get_or_null(p_rid); ERR_FAIL_COND_V(!sky, false); - sky->free(); + _free_sky_data(sky); sky_owner.free(p_rid); } else if (render_buffers_owner.owns(p_rid)) { RenderBuffers *rb = render_buffers_owner.get_or_null(p_rid); @@ -1984,6 +2701,10 @@ bool RasterizerSceneGLES3::free(RID p_rid) { _free_render_buffer_data(rb); render_buffers_owner.free(p_rid); + } else if (light_instance_owner.owns(p_rid)) { + LightInstance *light_instance = light_instance_owner.get_or_null(p_rid); + ERR_FAIL_COND_V(!light_instance, false); + light_instance_owner.free(p_rid); } else { return false; } @@ -2005,11 +2726,55 @@ void RasterizerSceneGLES3::light_projectors_set_filter(RS::LightProjectorFilter RasterizerSceneGLES3::RasterizerSceneGLES3(RasterizerStorageGLES3 *p_storage) { GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton(); + GLES3::Config *config = GLES3::Config::get_singleton(); + storage = p_storage; { + // Setup Lights + + config->max_renderable_lights = MIN(config->max_renderable_lights, config->max_uniform_buffer_size / (int)sizeof(RasterizerSceneGLES3::LightData)); + config->max_lights_per_object = MIN(config->max_lights_per_object, config->max_renderable_lights); + + uint32_t light_buffer_size = config->max_renderable_lights * sizeof(LightData); + scene_state.omni_lights = memnew_arr(LightData, config->max_renderable_lights); + scene_state.omni_light_sort = memnew_arr(InstanceSort<LightInstance>, config->max_renderable_lights); + glGenBuffers(1, &scene_state.omni_light_buffer); + glBindBuffer(GL_UNIFORM_BUFFER, scene_state.omni_light_buffer); + glBufferData(GL_UNIFORM_BUFFER, light_buffer_size, nullptr, GL_STREAM_DRAW); + + scene_state.spot_lights = memnew_arr(LightData, config->max_renderable_lights); + scene_state.spot_light_sort = memnew_arr(InstanceSort<LightInstance>, config->max_renderable_lights); + glGenBuffers(1, &scene_state.spot_light_buffer); + glBindBuffer(GL_UNIFORM_BUFFER, scene_state.spot_light_buffer); + glBufferData(GL_UNIFORM_BUFFER, light_buffer_size, nullptr, GL_STREAM_DRAW); + + uint32_t directional_light_buffer_size = MAX_DIRECTIONAL_LIGHTS * sizeof(DirectionalLightData); + scene_state.directional_lights = memnew_arr(DirectionalLightData, MAX_DIRECTIONAL_LIGHTS); + glGenBuffers(1, &scene_state.directional_light_buffer); + glBindBuffer(GL_UNIFORM_BUFFER, scene_state.directional_light_buffer); + glBufferData(GL_UNIFORM_BUFFER, directional_light_buffer_size, nullptr, GL_STREAM_DRAW); + glBindBuffer(GL_UNIFORM_BUFFER, 0); + } + + { + sky_globals.max_directional_lights = 4; + uint32_t directional_light_buffer_size = sky_globals.max_directional_lights * sizeof(DirectionalLightData); + sky_globals.directional_lights = memnew_arr(DirectionalLightData, sky_globals.max_directional_lights); + sky_globals.last_frame_directional_lights = memnew_arr(DirectionalLightData, sky_globals.max_directional_lights); + sky_globals.last_frame_directional_light_count = sky_globals.max_directional_lights + 1; + glGenBuffers(1, &sky_globals.directional_light_buffer); + glBindBuffer(GL_UNIFORM_BUFFER, sky_globals.directional_light_buffer); + glBufferData(GL_UNIFORM_BUFFER, directional_light_buffer_size, nullptr, GL_STREAM_DRAW); + glBindBuffer(GL_UNIFORM_BUFFER, 0); + } + + { String global_defines; global_defines += "#define MAX_GLOBAL_VARIABLES 256\n"; // TODO: this is arbitrary for now + global_defines += "\n#define MAX_LIGHT_DATA_STRUCTS " + itos(config->max_renderable_lights) + "\n"; + global_defines += "\n#define MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS " + itos(MAX_DIRECTIONAL_LIGHTS) + "\n"; + global_defines += "\n#define MAX_FORWARD_LIGHTS " + itos(config->max_lights_per_object) + "\n"; material_storage->shaders.scene_shader.initialize(global_defines); scene_globals.shader_default_version = material_storage->shaders.scene_shader.version_create(); material_storage->shaders.scene_shader.version_bind_shader(scene_globals.shader_default_version, SceneShaderGLES3::MODE_COLOR); @@ -2050,6 +2815,10 @@ void fragment() { material_storage->shaders.sky_shader.initialize(global_defines); sky_globals.shader_default_version = material_storage->shaders.sky_shader.version_create(); material_storage->shaders.sky_shader.version_bind_shader(sky_globals.shader_default_version, SkyShaderGLES3::MODE_BACKGROUND); + + material_storage->shaders.cubemap_filter_shader.initialize(); + scene_globals.cubemap_filter_shader_version = material_storage->shaders.cubemap_filter_shader.version_create(); + material_storage->shaders.cubemap_filter_shader.version_bind_shader(scene_globals.cubemap_filter_shader_version, CubemapFilterShaderGLES3::MODE_DEFAULT); } { @@ -2091,59 +2860,95 @@ void sky() { material_storage->material_set_shader(sky_globals.fog_material, sky_globals.fog_shader); } + { - { - //quad buffers - - glGenBuffers(1, &sky_globals.quad); - glBindBuffer(GL_ARRAY_BUFFER, sky_globals.quad); - { - const float qv[16] = { - -1, - -1, - 0, - 0, - -1, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - -1, - 1, - 0, - }; - - glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 16, qv, GL_STATIC_DRAW); - } + glGenBuffers(1, &sky_globals.screen_triangle); + glBindBuffer(GL_ARRAY_BUFFER, sky_globals.screen_triangle); + + const float qv[6] = { + -1.0f, + -1.0f, + 3.0f, + -1.0f, + -1.0f, + 3.0f, + }; + + glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 6, qv, GL_STATIC_DRAW); + glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind + + glGenVertexArrays(1, &sky_globals.screen_triangle_array); + glBindVertexArray(sky_globals.screen_triangle_array); + glBindBuffer(GL_ARRAY_BUFFER, sky_globals.screen_triangle); + glVertexAttribPointer(RS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 2, nullptr); + glEnableVertexAttribArray(RS::ARRAY_VERTEX); + glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind + } + + // Radical inverse vdc cache texture used for cubemap filtering. + { + glGenTextures(1, &sky_globals.radical_inverse_vdc_cache_tex); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, sky_globals.radical_inverse_vdc_cache_tex); + + uint8_t radical_inverse[512]; - glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind + for (uint32_t i = 0; i < 512; i++) { + uint32_t bits = i; - glGenVertexArrays(1, &sky_globals.quad_array); - glBindVertexArray(sky_globals.quad_array); - glBindBuffer(GL_ARRAY_BUFFER, sky_globals.quad); - glVertexAttribPointer(RS::ARRAY_VERTEX, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, nullptr); - glEnableVertexAttribArray(RS::ARRAY_VERTEX); - glVertexAttribPointer(RS::ARRAY_TEX_UV, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, CAST_INT_TO_UCHAR_PTR(8)); - glEnableVertexAttribArray(RS::ARRAY_TEX_UV); - glBindVertexArray(0); - glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind + bits = (bits << 16) | (bits >> 16); + bits = ((bits & 0x55555555) << 1) | ((bits & 0xAAAAAAAA) >> 1); + bits = ((bits & 0x33333333) << 2) | ((bits & 0xCCCCCCCC) >> 2); + bits = ((bits & 0x0F0F0F0F) << 4) | ((bits & 0xF0F0F0F0) >> 4); + bits = ((bits & 0x00FF00FF) << 8) | ((bits & 0xFF00FF00) >> 8); + + float value = float(bits) * 2.3283064365386963e-10; + radical_inverse[i] = uint8_t(CLAMP(value * 255.0, 0, 255)); } + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, 512, 1, 0, GL_RED, GL_UNSIGNED_BYTE, radical_inverse); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); //need this for proper sampling + + glBindTexture(GL_TEXTURE_2D, 0); } +#ifdef GLES_OVER_GL + glEnable(_EXT_TEXTURE_CUBE_MAP_SEAMLESS); +#endif } RasterizerSceneGLES3::~RasterizerSceneGLES3() { + glDeleteBuffers(1, &scene_state.directional_light_buffer); + glDeleteBuffers(1, &scene_state.omni_light_buffer); + glDeleteBuffers(1, &scene_state.spot_light_buffer); + memdelete_arr(scene_state.directional_lights); + memdelete_arr(scene_state.omni_lights); + memdelete_arr(scene_state.spot_lights); + memdelete_arr(scene_state.omni_light_sort); + memdelete_arr(scene_state.spot_light_sort); + + // Scene Shader GLES3::MaterialStorage::get_singleton()->shaders.scene_shader.version_free(scene_globals.shader_default_version); + GLES3::MaterialStorage::get_singleton()->shaders.cubemap_filter_shader.version_free(scene_globals.cubemap_filter_shader_version); storage->free(scene_globals.default_material); storage->free(scene_globals.default_shader); + + // Sky Shader GLES3::MaterialStorage::get_singleton()->shaders.sky_shader.version_free(sky_globals.shader_default_version); storage->free(sky_globals.default_material); storage->free(sky_globals.default_shader); storage->free(sky_globals.fog_material); storage->free(sky_globals.fog_shader); + glDeleteBuffers(1, &sky_globals.screen_triangle); + glDeleteVertexArrays(1, &sky_globals.screen_triangle_array); + glDeleteTextures(1, &sky_globals.radical_inverse_vdc_cache_tex); + glDeleteBuffers(1, &sky_globals.directional_light_buffer); + memdelete_arr(sky_globals.directional_lights); + memdelete_arr(sky_globals.last_frame_directional_lights); } #endif // GLES3_ENABLED diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h index ac2f3c932a..d9a848c0f6 100644 --- a/drivers/gles3/rasterizer_scene_gles3.h +++ b/drivers/gles3/rasterizer_scene_gles3.h @@ -43,6 +43,7 @@ #include "servers/rendering/renderer_scene_render.h" #include "servers/rendering_server.h" #include "shader_gles3.h" +#include "shaders/cubemap_filter.glsl.gen.h" #include "shaders/sky.glsl.gen.h" enum RenderListType { @@ -66,17 +67,26 @@ enum SceneUniformLocation { SCENE_GLOBALS_UNIFORM_LOCATION, SCENE_DATA_UNIFORM_LOCATION, SCENE_MATERIAL_UNIFORM_LOCATION, - SCENE_RADIANCE_UNIFORM_LOCATION, + SCENE_EMPTY, // Unused, put here to avoid conflicts with SKY_DIRECTIONAL_LIGHT_UNIFORM_LOCATION. SCENE_OMNILIGHT_UNIFORM_LOCATION, SCENE_SPOTLIGHT_UNIFORM_LOCATION, + SCENE_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, }; enum SkyUniformLocation { SKY_TONEMAP_UNIFORM_LOCATION, SKY_GLOBALS_UNIFORM_LOCATION, - SKY_SCENE_DATA_UNIFORM_LOCATION, - SKY_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, + SKY_EMPTY, // Unused, put here to avoid conflicts with SCENE_DATA_UNIFORM_LOCATION. SKY_MATERIAL_UNIFORM_LOCATION, + SKY_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, +}; + +enum { + SPEC_CONSTANT_DISABLE_LIGHTMAP = 0, + SPEC_CONSTANT_DISABLE_DIRECTIONAL_LIGHTS = 1, + SPEC_CONSTANT_DISABLE_OMNI_LIGHTS = 2, + SPEC_CONSTANT_DISABLE_SPOT_LIGHTS = 3, + SPEC_CONSTANT_DISABLE_FOG = 4, }; struct RenderDataGLES3 { @@ -84,6 +94,7 @@ struct RenderDataGLES3 { bool transparent_bg = false; Transform3D cam_transform = Transform3D(); + Transform3D inv_cam_transform = Transform3D(); CameraMatrix cam_projection = CameraMatrix(); bool cam_orthogonal = false; @@ -97,14 +108,8 @@ struct RenderDataGLES3 { const PagedArray<RendererSceneRender::GeometryInstance *> *instances = nullptr; const PagedArray<RID> *lights = nullptr; const PagedArray<RID> *reflection_probes = nullptr; - //const PagedArray<RID> *voxel_gi_instances = nullptr; - //const PagedArray<RID> *decals = nullptr; - //const PagedArray<RID> *lightmaps = nullptr; - //const PagedArray<RID> *fog_volumes = nullptr; RID environment = RID(); RID camera_effects = RID(); - RID shadow_atlas = RID(); - RID reflection_atlas = RID(); RID reflection_probe = RID(); int reflection_probe_pass = 0; @@ -113,6 +118,8 @@ struct RenderDataGLES3 { float screen_mesh_lod_threshold = 0.0; uint32_t directional_light_count = 0; + uint32_t spot_light_count = 0; + uint32_t omni_light_count = 0; RendererScene::RenderInfo *render_info = nullptr; }; @@ -126,90 +133,81 @@ private: RS::ViewportDebugDraw debug_draw = RS::VIEWPORT_DEBUG_DRAW_DISABLED; uint64_t scene_pass = 0; - struct SkyGlobals { - RID shader_default_version; - RID default_material; - RID default_shader; - RID fog_material; - RID fog_shader; - GLuint quad = 0; - GLuint quad_array = 0; - uint32_t max_directional_lights = 4; - uint32_t roughness_layers = 8; - uint32_t ggx_samples = 128; - } sky_globals; + template <class T> + struct InstanceSort { + float depth; + T *instance = nullptr; + bool operator<(const InstanceSort &p_sort) const { + return depth < p_sort.depth; + } + }; struct SceneGlobals { RID shader_default_version; RID default_material; RID default_shader; + RID cubemap_filter_shader_version; } scene_globals; - struct SceneState { - struct UBO { - float projection_matrix[16]; - float inv_projection_matrix[16]; - float inv_view_matrix[16]; - float view_matrix[16]; + /* LIGHT INSTANCE */ - float viewport_size[2]; - float screen_pixel_size[2]; + struct LightData { + float position[3]; + float inv_radius; - float ambient_light_color_energy[4]; + float direction[3]; // Only used by SpotLight + float size; - float ambient_color_sky_mix; - uint32_t ambient_flags; - uint32_t material_uv2_mode; - float opaque_prepass_threshold; - //bool use_ambient_light; - //bool use_ambient_cubemap; - //bool use_reflection_cubemap; + float color[3]; + float attenuation; - float radiance_inverse_xform[12]; + float inv_spot_attenuation; + float cos_spot_angle; + float specular_amount; + uint32_t shadow_enabled; + }; + static_assert(sizeof(LightData) % 16 == 0, "LightData size must be a multiple of 16 bytes"); - uint32_t directional_light_count; - float z_far; - float z_near; - uint32_t pancake_shadows; + struct DirectionalLightData { + float direction[3]; + float energy; - uint32_t fog_enabled; - float fog_density; - float fog_height; - float fog_height_density; + float color[3]; + float size; - float fog_light_color[3]; - float fog_sun_scatter; + uint32_t enabled; // For use by SkyShaders + float pad[2]; + float specular; + }; + static_assert(sizeof(DirectionalLightData) % 16 == 0, "DirectionalLightData size must be a multiple of 16 bytes"); - float fog_aerial_perspective; - float time; - uint32_t pad[2]; - }; - static_assert(sizeof(UBO) % 16 == 0, "Scene UBO size must be a multiple of 16 bytes"); + struct LightInstance { + RS::LightType light_type = RS::LIGHT_DIRECTIONAL; - struct TonemapUBO { - float exposure = 1.0; - float white = 1.0; - int32_t tonemapper = 0; - int32_t pad = 0; - }; - static_assert(sizeof(TonemapUBO) % 16 == 0, "Tonemap UBO size must be a multiple of 16 bytes"); + AABB aabb; + RID self; + RID light; + Transform3D transform; - UBO ubo; - GLuint ubo_buffer = 0; - GLuint tonemap_buffer = 0; + Vector3 light_vector; + Vector3 spot_vector; + float linear_att = 0.0; - bool used_depth_prepass = false; + uint64_t shadow_pass = 0; + uint64_t last_scene_pass = 0; + uint64_t last_scene_shadow_pass = 0; + uint64_t last_pass = 0; + uint32_t cull_mask = 0; + uint32_t light_directional_index = 0; - GLES3::SceneShaderData::BlendMode current_blend_mode = GLES3::SceneShaderData::BLEND_MODE_MIX; - GLES3::SceneShaderData::DepthDraw current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_OPAQUE; - GLES3::SceneShaderData::DepthTest current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_DISABLED; - GLES3::SceneShaderData::Cull cull_mode = GLES3::SceneShaderData::CULL_BACK; + Rect2 directional_rect; - bool texscreen_copied = false; - bool used_screen_texture = false; - bool used_normal_texture = false; - bool used_depth_texture = false; - } scene_state; + uint32_t gl_id = -1; + + LightInstance() {} + }; + + mutable RID_Owner<LightInstance> light_instance_owner; struct GeometryInstanceGLES3; @@ -295,9 +293,11 @@ private: float parent_fade_alpha = 1.0; uint32_t omni_light_count = 0; - uint32_t omni_lights[8]; + LocalVector<RID> omni_lights; uint32_t spot_light_count = 0; - uint32_t spot_lights[8]; + LocalVector<RID> spot_lights; + LocalVector<uint32_t> omni_light_gl_cache; + LocalVector<uint32_t> spot_light_gl_cache; //used during setup uint32_t base_flags = 0; @@ -360,25 +360,96 @@ private: void _geometry_instance_update(GeometryInstance *p_geometry_instance); void _update_dirty_geometry_instances(); + struct SceneState { + struct UBO { + float projection_matrix[16]; + float inv_projection_matrix[16]; + float inv_view_matrix[16]; + float view_matrix[16]; + + float viewport_size[2]; + float screen_pixel_size[2]; + + float ambient_light_color_energy[4]; + + float ambient_color_sky_mix; + uint32_t material_uv2_mode; + float pad2; + uint32_t use_ambient_light = 0; + + uint32_t use_ambient_cubemap = 0; + uint32_t use_reflection_cubemap = 0; + float fog_aerial_perspective; + float time; + + float radiance_inverse_xform[12]; + + uint32_t directional_light_count; + float z_far; + float z_near; + float pad1; + + uint32_t fog_enabled; + float fog_density; + float fog_height; + float fog_height_density; + + float fog_light_color[3]; + float fog_sun_scatter; + }; + static_assert(sizeof(UBO) % 16 == 0, "Scene UBO size must be a multiple of 16 bytes"); + + struct TonemapUBO { + float exposure = 1.0; + float white = 1.0; + int32_t tonemapper = 0; + int32_t pad = 0; + }; + static_assert(sizeof(TonemapUBO) % 16 == 0, "Tonemap UBO size must be a multiple of 16 bytes"); + + UBO ubo; + GLuint ubo_buffer = 0; + GLuint tonemap_buffer = 0; + + bool used_depth_prepass = false; + + GLES3::SceneShaderData::BlendMode current_blend_mode = GLES3::SceneShaderData::BLEND_MODE_MIX; + GLES3::SceneShaderData::DepthDraw current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_OPAQUE; + GLES3::SceneShaderData::DepthTest current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_DISABLED; + GLES3::SceneShaderData::Cull cull_mode = GLES3::SceneShaderData::CULL_BACK; + + bool texscreen_copied = false; + bool used_screen_texture = false; + bool used_normal_texture = false; + bool used_depth_texture = false; + + LightData *omni_lights = nullptr; + LightData *spot_lights = nullptr; + + InstanceSort<LightInstance> *omni_light_sort; + InstanceSort<LightInstance> *spot_light_sort; + GLuint omni_light_buffer = 0; + GLuint spot_light_buffer = 0; + uint32_t omni_light_count = 0; + uint32_t spot_light_count = 0; + + DirectionalLightData *directional_lights = nullptr; + GLuint directional_light_buffer = 0; + } scene_state; + struct RenderListParameters { GeometryInstanceSurface **elements = nullptr; int element_count = 0; bool reverse_cull = false; uint32_t spec_constant_base_flags = 0; bool force_wireframe = false; - Plane lod_plane; - float lod_distance_multiplier = 0.0; - float screen_mesh_lod_threshold = 0.0; - RenderListParameters(GeometryInstanceSurface **p_elements, int p_element_count, bool p_reverse_cull, uint32_t p_spec_constant_base_flags, bool p_force_wireframe = false, const Plane &p_lod_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_mesh_lod_threshold = 0.0) { + RenderListParameters(GeometryInstanceSurface **p_elements, int p_element_count, bool p_reverse_cull, uint32_t p_spec_constant_base_flags, bool p_force_wireframe = false) { elements = p_elements; element_count = p_element_count; reverse_cull = p_reverse_cull; spec_constant_base_flags = p_spec_constant_base_flags; force_wireframe = p_force_wireframe; - lod_plane = p_lod_plane; - lod_distance_multiplier = p_lod_distance_multiplier; - screen_mesh_lod_threshold = p_screen_mesh_lod_threshold; } }; @@ -438,6 +509,7 @@ private: RenderList render_list[RENDER_LIST_MAX]; + void _setup_lights(const RenderDataGLES3 *p_render_data, bool p_using_shadows, uint32_t &r_directional_light_count, uint32_t &r_omni_light_count, uint32_t &r_spot_light_count); void _setup_environment(const RenderDataGLES3 *p_render_data, bool p_no_fog, const Size2i &p_screen_size, bool p_flip_y, const Color &p_default_bg_color, bool p_pancake_shadows); void _fill_render_list(RenderListType p_render_list, const RenderDataGLES3 *p_render_data, PassMode p_pass_mode, bool p_append = false); @@ -637,6 +709,33 @@ protected: /* Sky */ + struct SkyGlobals { + float fog_aerial_perspective = 0.0; + Color fog_light_color; + float fog_sun_scatter = 0.0; + bool fog_enabled = false; + float fog_density = 0.0; + float z_far = 0.0; + uint32_t directional_light_count = 0; + + DirectionalLightData *directional_lights = nullptr; + DirectionalLightData *last_frame_directional_lights = nullptr; + uint32_t last_frame_directional_light_count = 0; + GLuint directional_light_buffer = 0; + + RID shader_default_version; + RID default_material; + RID default_shader; + RID fog_material; + RID fog_shader; + GLuint screen_triangle = 0; + GLuint screen_triangle_array = 0; + GLuint radical_inverse_vdc_cache_tex = 0; + uint32_t max_directional_lights = 4; + uint32_t roughness_layers = 8; + uint32_t ggx_samples = 128; + } sky_globals; + struct Sky { // Screen Buffers GLuint half_res_pass = 0; @@ -648,11 +747,13 @@ protected: // Radiance Cubemap GLuint radiance = 0; GLuint radiance_framebuffer = 0; + GLuint raw_radiance = 0; RID material; - RID uniform_buffer; + GLuint uniform_buffer; int radiance_size = 256; + int mipmap_count = 1; RS::SkyMode mode = RS::SKY_MODE_AUTOMATIC; @@ -666,20 +767,18 @@ protected: GLES3::SkyMaterialData *prev_material; Vector3 prev_position = Vector3(0.0, 0.0, 0.0); float prev_time = 0.0f; - - void free(); - bool set_radiance_size(int p_radiance_size); - bool set_mode(RS::SkyMode p_mode); - bool set_material(RID p_material); - Ref<Image> bake_panorama(float p_energy, int p_roughness_layers, const Size2i &p_size); }; Sky *dirty_sky_list = nullptr; mutable RID_Owner<Sky, true> sky_owner; + void _setup_sky(Environment *p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const CameraMatrix &p_projection, const Transform3D &p_transform, const Size2i p_screen_size); void _invalidate_sky(Sky *p_sky); void _update_dirty_skys(); + void _update_sky_radiance(Environment *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform); + void _filter_sky_radiance(Sky *p_sky, int p_base_layer); void _draw_sky(Environment *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform); + void _free_sky_data(Sky *p_sky); public: RasterizerStorageGLES3 *storage; @@ -808,6 +907,15 @@ public: void light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform3D &p_transform, float p_far, float p_split, int p_pass, float p_shadow_texel_size, float p_bias_scale = 1.0, float p_range_begin = 0, const Vector2 &p_uv_scale = Vector2()) override; void light_instance_mark_visible(RID p_light_instance) override; + _FORCE_INLINE_ RS::LightType light_instance_get_type(RID p_light_instance) { + LightInstance *li = light_instance_owner.get_or_null(p_light_instance); + return li->light_type; + } + _FORCE_INLINE_ uint32_t light_instance_get_gl_id(RID p_light_instance) { + LightInstance *li = light_instance_owner.get_or_null(p_light_instance); + return li->gl_id; + } + RID fog_volume_instance_create(RID p_fog_volume) override; void fog_volume_instance_set_transform(RID p_fog_volume_instance, const Transform3D &p_transform) override; void fog_volume_instance_set_active(RID p_fog_volume_instance, bool p_active) override; diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 3c28289bd0..8046a18f05 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -39,6 +39,19 @@ #include "servers/rendering/shader_language.h" void RasterizerStorageGLES3::base_update_dependency(RID p_base, DependencyTracker *p_instance) { + if (GLES3::MeshStorage::get_singleton()->owns_mesh(p_base)) { + GLES3::Mesh *mesh = GLES3::MeshStorage::get_singleton()->get_mesh(p_base); + p_instance->update_dependency(&mesh->dependency); + } else if (GLES3::MeshStorage::get_singleton()->owns_multimesh(p_base)) { + GLES3::MultiMesh *multimesh = GLES3::MeshStorage::get_singleton()->get_multimesh(p_base); + p_instance->update_dependency(&multimesh->dependency); + if (multimesh->mesh.is_valid()) { + base_update_dependency(multimesh->mesh, p_instance); + } + } else if (GLES3::LightStorage::get_singleton()->owns_light(p_base)) { + GLES3::Light *l = GLES3::LightStorage::get_singleton()->get_light(p_base); + p_instance->update_dependency(&l->dependency); + } } /* VOXEL GI API */ diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index b3f37207da..33d5494837 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -585,7 +585,7 @@ void ShaderGLES3::_initialize_version(Version *p_version) { } } -void ShaderGLES3::version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines, const Vector<StringName> &p_texture_uniforms, bool p_initialize) { +void ShaderGLES3::version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines, const Vector<StringName> &p_texture_uniforms, bool p_initialize) { Version *version = version_owner.get_or_null(p_version); ERR_FAIL_COND(!version); diff --git a/drivers/gles3/shader_gles3.h b/drivers/gles3/shader_gles3.h index 763d3bfa8b..228bed6f9b 100644 --- a/drivers/gles3/shader_gles3.h +++ b/drivers/gles3/shader_gles3.h @@ -35,7 +35,7 @@ #include "core/string/string_builder.h" #include "core/templates/hash_map.h" #include "core/templates/local_vector.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/rid_owner.h" #include "core/variant/variant.h" #include "servers/rendering_server.h" @@ -83,7 +83,7 @@ private: CharString uniforms; CharString vertex_globals; CharString fragment_globals; - Map<StringName, CharString> code_sections; + HashMap<StringName, CharString> code_sections; Vector<CharString> custom_defines; struct Specialization { @@ -92,7 +92,7 @@ private: GLuint frag_id; LocalVector<GLint> uniform_location; LocalVector<GLint> texture_uniform_locations; - Map<StringName, GLint> custom_uniform_locations; + HashMap<StringName, GLint> custom_uniform_locations; bool build_queued = false; bool ok = false; Specialization() { @@ -219,7 +219,10 @@ protected: Version *version = version_owner.get_or_null(p_version); ERR_FAIL_COND_V(!version, -1); ERR_FAIL_INDEX_V(p_variant, int(version->variants.size()), -1); - return version->variants[p_variant].lookup_ptr(p_specialization)->uniform_location[p_which]; + Version::Specialization *spec = version->variants[p_variant].lookup_ptr(p_specialization); + ERR_FAIL_COND_V(!spec, -1); + ERR_FAIL_INDEX_V(p_which, int(spec->uniform_location.size()), -1); + return spec->uniform_location[p_which]; } virtual void _init() = 0; @@ -227,7 +230,7 @@ protected: public: RID version_create(); - void version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines, const Vector<StringName> &p_texture_uniforms, bool p_initialize = false); + void version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines, const Vector<StringName> &p_texture_uniforms, bool p_initialize = false); bool version_is_valid(RID p_version); diff --git a/drivers/gles3/shaders/SCsub b/drivers/gles3/shaders/SCsub index ec32badc19..d8dd573f57 100644 --- a/drivers/gles3/shaders/SCsub +++ b/drivers/gles3/shaders/SCsub @@ -2,11 +2,18 @@ Import("env") -env.Depends("#drivers/gles3/shaders/copy.glsl.gen.h", "#core/math/basis.h") -env.Depends("#drivers/gles3/shaders/copy.glsl.gen.h", "#core/math/transform_2d.h") - if "GLES3_GLSL" in env["BUILDERS"]: + # find all include files + gl_include_files = [str(f) for f in Glob("*_inc.glsl")] + + # find all shader code(all glsl files excluding our include files) + glsl_files = [str(f) for f in Glob("*.glsl") if str(f) not in gl_include_files] + + # make sure we recompile shaders if include files change + env.Depends([f + ".gen.h" for f in glsl_files], gl_include_files) + env.GLES3_GLSL("canvas.glsl") env.GLES3_GLSL("copy.glsl") env.GLES3_GLSL("scene.glsl") env.GLES3_GLSL("sky.glsl") + env.GLES3_GLSL("cubemap_filter.glsl") diff --git a/drivers/gles3/shaders/cubemap_filter.glsl b/drivers/gles3/shaders/cubemap_filter.glsl index 2081abfef6..81e66c956c 100644 --- a/drivers/gles3/shaders/cubemap_filter.glsl +++ b/drivers/gles3/shaders/cubemap_filter.glsl @@ -1,136 +1,102 @@ /* clang-format off */ -[vertex] +#[modes] -#ifdef USE_GLES_OVER_GL -#define lowp -#define mediump -#define highp -#else -precision highp float; -precision highp int; -#endif +mode_default = +mode_copy = #define MODE_DIRECT_WRITE + +#[specializations] -layout(location = 0) in highp vec2 vertex; +#[vertex] + +layout(location = 0) in highp vec2 vertex_attrib; /* clang-format on */ -layout(location = 4) in highp vec2 uv; out highp vec2 uv_interp; void main() { - uv_interp = uv; - gl_Position = vec4(vertex, 0, 1); + uv_interp = vertex_attrib; + gl_Position = vec4(uv_interp, 0.0, 1.0); } /* clang-format off */ -[fragment] +#[fragment] -#ifdef USE_GLES_OVER_GL -#define lowp -#define mediump -#define highp -#else -#if defined(USE_HIGHP_PRECISION) -precision highp float; -precision highp int; -#else -precision mediump float; -precision mediump int; -#endif -#endif +#define M_PI 3.14159265359 -#ifdef USE_SOURCE_PANORAMA -uniform sampler2D source_panorama; //texunit:0 -#else uniform samplerCube source_cube; //texunit:0 -#endif + /* clang-format on */ uniform int face_id; uniform float roughness; -in highp vec2 uv_interp; - -uniform sampler2D radical_inverse_vdc_cache; // texunit:1 - -#define M_PI 3.14159265359 - -#ifdef LOW_QUALITY - -#define SAMPLE_COUNT 64 - -#else - -#define SAMPLE_COUNT 512 +uniform float face_size; +uniform int sample_count; +//Todo, profile on low end hardware to see if fixed loop is faster +#ifdef USE_FIXED_SAMPLES +#define FIXED_SAMPLE_COUNT 32 #endif -#ifdef USE_SOURCE_PANORAMA +in highp vec2 uv_interp; -vec4 texturePanorama(sampler2D pano, vec3 normal) { - vec2 st = vec2( - atan(normal.x, normal.z), - acos(normal.y)); +uniform sampler2D radical_inverse_vdc_cache; // texunit:1 - if (st.x < 0.0) - st.x += M_PI * 2.0; +layout(location = 0) out vec4 frag_color; - st /= vec2(M_PI * 2.0, M_PI); +#define M_PI 3.14159265359 - return textureLod(pano, st, 0.0); +// Don't include tonemap_inc.glsl because all we want is these functions, we don't want the uniforms +vec3 linear_to_srgb(vec3 color) { + return max(vec3(1.055) * pow(color, vec3(0.416666667)) - vec3(0.055), vec3(0.0)); } -#endif +vec3 srgb_to_linear(vec3 color) { + return color * (color * (color * 0.305306011 + 0.682171111) + 0.012522878); +} vec3 texelCoordToVec(vec2 uv, int faceID) { mat3 faceUvVectors[6]; // -x - faceUvVectors[0][0] = vec3(0.0, 0.0, 1.0); // u -> +z - faceUvVectors[0][1] = vec3(0.0, -1.0, 0.0); // v -> -y - faceUvVectors[0][2] = vec3(-1.0, 0.0, 0.0); // -x face + faceUvVectors[1][0] = vec3(0.0, 0.0, 1.0); // u -> +z + faceUvVectors[1][1] = vec3(0.0, -1.0, 0.0); // v -> -y + faceUvVectors[1][2] = vec3(-1.0, 0.0, 0.0); // -x face // +x - faceUvVectors[1][0] = vec3(0.0, 0.0, -1.0); // u -> -z - faceUvVectors[1][1] = vec3(0.0, -1.0, 0.0); // v -> -y - faceUvVectors[1][2] = vec3(1.0, 0.0, 0.0); // +x face + faceUvVectors[0][0] = vec3(0.0, 0.0, -1.0); // u -> -z + faceUvVectors[0][1] = vec3(0.0, -1.0, 0.0); // v -> -y + faceUvVectors[0][2] = vec3(1.0, 0.0, 0.0); // +x face // -y - faceUvVectors[2][0] = vec3(1.0, 0.0, 0.0); // u -> +x - faceUvVectors[2][1] = vec3(0.0, 0.0, -1.0); // v -> -z - faceUvVectors[2][2] = vec3(0.0, -1.0, 0.0); // -y face + faceUvVectors[3][0] = vec3(1.0, 0.0, 0.0); // u -> +x + faceUvVectors[3][1] = vec3(0.0, 0.0, -1.0); // v -> -z + faceUvVectors[3][2] = vec3(0.0, -1.0, 0.0); // -y face // +y - faceUvVectors[3][0] = vec3(1.0, 0.0, 0.0); // u -> +x - faceUvVectors[3][1] = vec3(0.0, 0.0, 1.0); // v -> +z - faceUvVectors[3][2] = vec3(0.0, 1.0, 0.0); // +y face + faceUvVectors[2][0] = vec3(1.0, 0.0, 0.0); // u -> +x + faceUvVectors[2][1] = vec3(0.0, 0.0, 1.0); // v -> +z + faceUvVectors[2][2] = vec3(0.0, 1.0, 0.0); // +y face // -z - faceUvVectors[4][0] = vec3(-1.0, 0.0, 0.0); // u -> -x - faceUvVectors[4][1] = vec3(0.0, -1.0, 0.0); // v -> -y - faceUvVectors[4][2] = vec3(0.0, 0.0, -1.0); // -z face + faceUvVectors[5][0] = vec3(-1.0, 0.0, 0.0); // u -> -x + faceUvVectors[5][1] = vec3(0.0, -1.0, 0.0); // v -> -y + faceUvVectors[5][2] = vec3(0.0, 0.0, -1.0); // -z face // +z - faceUvVectors[5][0] = vec3(1.0, 0.0, 0.0); // u -> +x - faceUvVectors[5][1] = vec3(0.0, -1.0, 0.0); // v -> -y - faceUvVectors[5][2] = vec3(0.0, 0.0, 1.0); // +z face + faceUvVectors[4][0] = vec3(1.0, 0.0, 0.0); // u -> +x + faceUvVectors[4][1] = vec3(0.0, -1.0, 0.0); // v -> -y + faceUvVectors[4][2] = vec3(0.0, 0.0, 1.0); // +z face // out = u * s_faceUv[0] + v * s_faceUv[1] + s_faceUv[2]. - vec3 result; - for (int i = 0; i < 6; i++) { - if (i == faceID) { - result = (faceUvVectors[i][0] * uv.x) + (faceUvVectors[i][1] * uv.y) + faceUvVectors[i][2]; - break; - } - } + vec3 result = (faceUvVectors[faceID][0] * uv.x) + (faceUvVectors[faceID][1] * uv.y) + faceUvVectors[faceID][2]; return normalize(result); } -vec3 ImportanceSampleGGX(vec2 Xi, float Roughness, vec3 N) { - float a = Roughness * Roughness; // DISNEY'S ROUGHNESS [see Burley'12 siggraph] - +vec3 ImportanceSampleGGX(vec2 xi, float roughness4) { // Compute distribution direction - float Phi = 2.0 * M_PI * Xi.x; - float CosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a * a - 1.0) * Xi.y)); + float Phi = 2.0 * M_PI * xi.x; + float CosTheta = sqrt((1.0 - xi.y) / (1.0 + (roughness4 - 1.0) * xi.y)); float SinTheta = sqrt(1.0 - CosTheta * CosTheta); // Convert to spherical direction @@ -139,12 +105,26 @@ vec3 ImportanceSampleGGX(vec2 Xi, float Roughness, vec3 N) { H.y = SinTheta * sin(Phi); H.z = CosTheta; - vec3 UpVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); - vec3 TangentX = normalize(cross(UpVector, N)); - vec3 TangentY = cross(N, TangentX); + return H; +} + +float DistributionGGX(float NdotH, float roughness4) { + float NdotH2 = NdotH * NdotH; + float denom = (NdotH2 * (roughness4 - 1.0) + 1.0); + denom = M_PI * denom * denom; + + return roughness4 / denom; +} + +// https://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html +float GGX(float NdotV, float a) { + float k = a / 2.0; + return NdotV / (NdotV * (1.0 - k) + k); +} - // Tangent to world space - return TangentX * H.x + TangentY * H.y + N * H.z; +// https://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html +float G_Smith(float a, float nDotV, float nDotL) { + return GGX(nDotL, a * a) * GGX(nDotV, a * a); } float radical_inverse_VdC(int i) { @@ -155,60 +135,54 @@ vec2 Hammersley(int i, int N) { return vec2(float(i) / float(N), radical_inverse_VdC(i)); } -uniform bool z_flip; - -layout(location = 0) out vec4 frag_color; - void main() { vec3 color = vec3(0.0); - - vec2 uv = (uv_interp * 2.0) - 1.0; + vec2 uv = uv_interp; vec3 N = texelCoordToVec(uv, face_id); -#ifdef USE_DIRECT_WRITE - -#ifdef USE_SOURCE_PANORAMA - - frag_color = vec4(texturePanorama(source_panorama, N).rgb, 1.0); -#else - - frag_color = vec4(textureCube(source_cube, N).rgb, 1.0); -#endif //USE_SOURCE_PANORAMA - +#ifdef MODE_DIRECT_WRITE + frag_color = vec4(textureCubeLod(source_cube, N, 0.0).rgb, 1.0); #else vec4 sum = vec4(0.0); + float solid_angle_texel = 4.0 * M_PI / (6.0 * face_size * face_size); + float roughness2 = roughness * roughness; + float roughness4 = roughness2 * roughness2; + vec3 UpVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); + mat3 T; + T[0] = normalize(cross(UpVector, N)); + T[1] = cross(N, T[0]); + T[2] = N; - for (int sample_num = 0; sample_num < SAMPLE_COUNT; sample_num++) { - vec2 xi = Hammersley(sample_num, SAMPLE_COUNT); + for (int sample_num = 0; sample_num < sample_count; sample_num++) { + vec2 xi = Hammersley(sample_num, sample_count); - vec3 H = ImportanceSampleGGX(xi, roughness, N); - vec3 V = N; - vec3 L = (2.0 * dot(V, H) * H - V); + vec3 H = T * ImportanceSampleGGX(xi, roughness4); + float NdotH = dot(N, H); + vec3 L = (2.0 * NdotH * H - N); float NdotL = clamp(dot(N, L), 0.0, 1.0); if (NdotL > 0.0) { + float D = DistributionGGX(NdotH, roughness4); + float pdf = D * NdotH / (4.0 * NdotH) + 0.0001; -#ifdef USE_SOURCE_PANORAMA - vec3 val = texturePanorama(source_panorama, L).rgb; -#else - vec3 val = textureCubeLod(source_cube, L, 0.0).rgb; -#endif - //mix using Linear, to approximate high end back-end - val = mix(pow((val + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), val * (1.0 / 12.92), vec3(lessThan(val, vec3(0.04045)))); + float solid_angle_sample = 1.0 / (float(sample_count) * pdf + 0.0001); - sum.rgb += val * NdotL; + float mipLevel = roughness == 0.0 ? 0.0 : 0.5 * log2(solid_angle_sample / solid_angle_texel); + + vec3 val = textureCubeLod(source_cube, L, mipLevel).rgb; + // Mix using linear + val = srgb_to_linear(val); + sum.rgb += val * NdotL; sum.a += NdotL; } } sum /= sum.a; - vec3 a = vec3(0.055); - sum.rgb = mix((vec3(1.0) + a) * pow(sum.rgb, vec3(1.0 / 2.4)) - a, 12.92 * sum.rgb, vec3(lessThan(sum.rgb, vec3(0.0031308)))); - + sum.rgb = linear_to_srgb(sum.rgb); frag_color = vec4(sum.rgb, 1.0); #endif } diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index ea28685be7..198d1d9ec7 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -7,9 +7,12 @@ mode_depth = #define MODE_RENDER_DEPTH #[specializations] -USE_LIGHTMAP = false -USE_LIGHT_DIRECTIONAL = false -USE_LIGHT_POSITIONAL = false +DISABLE_LIGHTMAP = false +DISABLE_LIGHT_DIRECTIONAL = false +DISABLE_LIGHT_OMNI = false +DISABLE_LIGHT_SPOT = false +DISABLE_FOG = false +USE_RADIANCE_MAP = true #[vertex] @@ -109,12 +112,14 @@ layout(std140) uniform SceneData { // ubo:2 mediump vec4 ambient_light_color_energy; mediump float ambient_color_sky_mix; - uint ambient_flags; bool material_uv2_mode; - float opaque_prepass_threshold; - //bool use_ambient_light; - //bool use_ambient_cubemap; - //bool use_reflection_cubemap; + float pad2; + bool use_ambient_light; + bool use_ambient_cubemap; + bool use_reflection_cubemap; + + float fog_aerial_perspective; + float time; mat3 radiance_inverse_xform; @@ -130,13 +135,6 @@ layout(std140) uniform SceneData { // ubo:2 vec3 fog_light_color; float fog_sun_scatter; - - float fog_aerial_perspective; - - float time; - float reflection_multiplier; // one normally, zero when rendering reflections - - bool pancake_shadows; } scene_data; @@ -169,7 +167,7 @@ out vec2 uv2_interp; #endif #endif -#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) out vec3 tangent_interp; out vec3 binormal_interp; #endif @@ -191,9 +189,6 @@ layout(std140) uniform MaterialUniforms { // ubo:3 #GLOBALS /* clang-format on */ - -out highp vec4 position_interp; - invariant gl_Position; void main() { @@ -206,21 +201,16 @@ void main() { #endif highp mat3 model_normal_matrix = mat3(model_matrix); -#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) - vec3 tangent; - float binormalf; - tangent = normal_tangent_attrib.xyz; - binormalf = normal_tangent_attrib.a; +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) + vec3 tangent = tangent_attrib.xyz * 2.0 - 1.0; + float binormalf = tangent_attrib.a * 2.0 - 1.0; + vec3 binormal = normalize(cross(normal, tangent) * binormalf); #endif #if defined(COLOR_USED) color_interp = color_attrib; #endif -#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) - vec3 binormal = normalize(cross(normal, tangent) * binormalf); -#endif - #if defined(UV_USED) uv_interp = uv_attrib; #endif @@ -306,7 +296,7 @@ void main() { normal_interp = normal; #endif -#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) tangent_interp = tangent; binormal_interp = binormal; #endif @@ -316,16 +306,6 @@ void main() { #else gl_Position = projection_matrix * vec4(vertex_interp, 1.0); #endif - -#ifdef MODE_RENDER_DEPTH - if (scene_data.pancake_shadows) { - if (gl_Position.z <= 0.00001) { - gl_Position.z = 0.00001; - } - } -#endif - - position_interp = gl_Position; } /* clang-format off */ @@ -357,10 +337,9 @@ void main() { */ -uniform highp mat4 world_transform; +#define M_PI 3.14159265359 /* clang-format on */ -#define M_PI 3.14159265359 #define SHADER_IS_SRGB true /* Varyings */ @@ -381,7 +360,7 @@ in vec2 uv2_interp; #endif #endif -#if defined(TANGENT_USED) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) +#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED) in vec3 tangent_interp; in vec3 binormal_interp; #endif @@ -392,29 +371,11 @@ in vec3 normal_interp; in highp vec3 vertex_interp; -/* PBR CHANNELS */ - #ifdef USE_RADIANCE_MAP -layout(std140) uniform Radiance { // ubo:4 - - mat4 radiance_inverse_xform; - float radiance_ambient_contribution; -}; - #define RADIANCE_MAX_LOD 5.0 -uniform sampler2D radiance_map; // texunit:-2 - -vec3 textureDualParaboloid(sampler2D p_tex, vec3 p_vec, float p_roughness) { - vec3 norm = normalize(p_vec); - norm.xy /= 1.0 + abs(norm.z); - norm.xy = norm.xy * vec2(0.5, 0.25) + vec2(0.5, 0.25); - if (norm.z > 0.0) { - norm.y = 0.5 - norm.y + 0.5; - } - return textureLod(p_tex, norm.xy, p_roughness * RADIANCE_MAX_LOD).xyz; -} +uniform samplerCube radiance_map; // texunit:-2 #endif @@ -448,12 +409,14 @@ layout(std140) uniform SceneData { // ubo:2 mediump vec4 ambient_light_color_energy; mediump float ambient_color_sky_mix; - uint ambient_flags; bool material_uv2_mode; - float opaque_prepass_threshold; - //bool use_ambient_light; - //bool use_ambient_cubemap; - //bool use_reflection_cubemap; + float pad2; + bool use_ambient_light; + bool use_ambient_cubemap; + bool use_reflection_cubemap; + + float fog_aerial_perspective; + float time; mat3 radiance_inverse_xform; @@ -469,13 +432,6 @@ layout(std140) uniform SceneData { // ubo:2 vec3 fog_light_color; float fog_sun_scatter; - - float fog_aerial_perspective; - - float time; - float reflection_multiplier; // one normally, zero when rendering reflections - - bool pancake_shadows; } scene_data; @@ -487,7 +443,7 @@ scene_data; //directional light data -#ifdef USE_LIGHT_DIRECTIONAL +#ifndef DISABLE_LIGHT_DIRECTIONAL struct DirectionalLightData { mediump vec3 direction; @@ -498,10 +454,14 @@ struct DirectionalLightData { mediump float specular; }; +layout(std140) uniform DirectionalLights { // ubo:7 + DirectionalLightData directional_lights[MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS]; +}; + #endif // omni and spot -#ifdef USE_LIGHT_POSITIONAL +#if !defined(DISABLE_LIGHT_OMNI) && !defined(DISABLE_LIGHT_SPOT) struct LightData { //this structure needs to be as packed as possible highp vec3 position; highp float inv_radius; @@ -517,36 +477,38 @@ struct LightData { //this structure needs to be as packed as possible mediump float specular_amount; bool shadow_enabled; }; - +#ifndef DISABLE_LIGHT_OMNI layout(std140) uniform OmniLightData { // ubo:5 LightData omni_lights[MAX_LIGHT_DATA_STRUCTS]; }; +uniform uint omni_light_indices[MAX_FORWARD_LIGHTS]; +uniform int omni_light_count; +#endif + +#ifndef DISABLE_LIGHT_SPOT layout(std140) uniform SpotLightData { // ubo:6 LightData spot_lights[MAX_LIGHT_DATA_STRUCTS]; }; - -uniform highp samplerCubeShadow positional_shadow; // texunit:-6 - -uniform int omni_light_indices[MAX_FORWARD_LIGHTS]; -uniform int omni_light_count; - -uniform int spot_light_indices[MAX_FORWARD_LIGHTS]; +uniform uint spot_light_indices[MAX_FORWARD_LIGHTS]; uniform int spot_light_count; +#endif -uniform int reflection_indices[MAX_FORWARD_LIGHTS]; -uniform int reflection_count; - +#ifdef USE_ADDITIVE_LIGHTING +uniform highp samplerCubeShadow positional_shadow; // texunit:-4 #endif +#endif // !defined(DISABLE_LIGHT_OMNI) && !defined(DISABLE_LIGHT_SPOT) + uniform highp sampler2D screen_texture; // texunit:-5 uniform highp sampler2D depth_buffer; // texunit:-6 -layout(location = 0) out vec4 frag_color; +uniform highp mat4 world_transform; +uniform mediump float opaque_prepass_threshold; -in highp vec4 position_interp; +layout(location = 0) out vec4 frag_color; vec3 F0(float metallic, float specular, vec3 albedo) { float dielectric = 0.16 * specular * specular; @@ -555,7 +517,7 @@ vec3 F0(float metallic, float specular, vec3 albedo) { return mix(vec3(dielectric), albedo, vec3(metallic)); } -#if defined(USE_LIGHT_DIRECTIONAL) || defined(USE_LIGHT_POSITIONAL) +#if !defined(DISABLE_LIGHT_DIRECTIONAL) || !defined(DISABLE_LIGHT_OMNI) || !defined(DISABLE_LIGHT_SPOT) float D_GGX(float cos_theta_m, float alpha) { float a = cos_theta_m * alpha; float k = alpha / (1.0 - cos_theta_m * cos_theta_m + a * a); @@ -588,7 +550,7 @@ float SchlickFresnel(float u) { return m2 * m2 * m; // pow(m,5) } -void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float attenuation, vec3 f0, uint orms, float specular_amount, vec3 albedo, inout float alpha, +void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float attenuation, vec3 f0, float roughness, float metallic, float specular_amount, vec3 albedo, inout float alpha, #ifdef LIGHT_BACKLIGHT_USED vec3 backlight, #endif @@ -603,11 +565,6 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float atte #endif inout vec3 diffuse_light, inout vec3 specular_light) { - vec4 orms_unpacked = unpackUnorm4x8(orms); - - float roughness = orms_unpacked.y; - float metallic = orms_unpacked.z; - #if defined(USE_LIGHT_SHADER_CODE) // light is written by the light shader @@ -626,7 +583,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float atte float NdotL = min(A + dot(N, L), 1.0); float cNdotL = max(NdotL, 0.0); // clamped NdotL float NdotV = dot(N, V); - float cNdotV = max(NdotV, 0.0); + float cNdotV = max(NdotV, 1e-4); #if defined(DIFFUSE_BURLEY) || defined(SPECULAR_SCHLICK_GGX) || defined(LIGHT_CLEARCOAT_USED) vec3 H = normalize(V + L); @@ -752,15 +709,10 @@ float get_omni_attenuation(float distance, float inv_range, float decay) { return nd * pow(max(distance, 0.0001), -decay); } -void light_process_omni(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f0, uint orms, float shadow, vec3 albedo, inout float alpha, +void light_process_omni(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f0, float roughness, float metallic, float shadow, vec3 albedo, inout float alpha, #ifdef LIGHT_BACKLIGHT_USED vec3 backlight, #endif -#ifdef LIGHT_TRANSMITTANCE_USED - vec4 transmittance_color, - float transmittance_depth, - float transmittance_boost, -#endif #ifdef LIGHT_RIM_USED float rim, float rim_tint, #endif @@ -774,16 +726,15 @@ void light_process_omni(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f vec3 light_rel_vec = omni_lights[idx].position - vertex; float light_length = length(light_rel_vec); float omni_attenuation = get_omni_attenuation(light_length, omni_lights[idx].inv_radius, omni_lights[idx].attenuation); - vec3 light_attenuation = vec3(omni_attenuation); vec3 color = omni_lights[idx].color; float size_A = 0.0; - if (omni_lights.data[idx].size > 0.0) { + if (omni_lights[idx].size > 0.0) { float t = omni_lights[idx].size / max(0.001, light_length); size_A = max(0.0, 1.0 - 1 / sqrt(1 + t * t)); } - light_compute(normal, normalize(light_rel_vec), eye_vec, size_A, color, light_attenuation, f0, orms, omni_lights[idx].specular_amount, albedo, alpha, + light_compute(normal, normalize(light_rel_vec), eye_vec, size_A, color, omni_attenuation, f0, roughness, metallic, omni_lights[idx].specular_amount, albedo, alpha, #ifdef LIGHT_BACKLIGHT_USED backlight, #endif @@ -800,7 +751,7 @@ void light_process_omni(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f specular_light); } -void light_process_spot(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f0, uint orms, float shadow, vec3 albedo, inout float alpha, +void light_process_spot(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f0, float roughness, float metallic, float shadow, vec3 albedo, inout float alpha, #ifdef LIGHT_BACKLIGHT_USED vec3 backlight, #endif @@ -823,17 +774,16 @@ void light_process_spot(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f float scos = max(dot(-normalize(light_rel_vec), spot_dir), spot_lights[idx].cone_angle); float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - spot_lights[idx].cone_angle)); spot_attenuation *= 1.0 - pow(spot_rim, spot_lights[idx].cone_attenuation); - float light_attenuation = spot_attenuation; vec3 color = spot_lights[idx].color; float size_A = 0.0; - if (spot_lights.data[idx].size > 0.0) { - float t = spot_lights.data[idx].size / max(0.001, light_length); + if (spot_lights[idx].size > 0.0) { + float t = spot_lights[idx].size / max(0.001, light_length); size_A = max(0.0, 1.0 - 1 / sqrt(1 + t * t)); } - light_compute(normal, normalize(light_rel_vec), eye_vec, size_A, color, light_attenuation, f0, orms, spot_lights[idx].specular_amount, albedo, alpha, + light_compute(normal, normalize(light_rel_vec), eye_vec, size_A, color, spot_attenuation, f0, roughness, metallic, spot_lights[idx].specular_amount, albedo, alpha, #ifdef LIGHT_BACKLIGHT_USED backlight, #endif @@ -848,7 +798,56 @@ void light_process_spot(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 f #endif diffuse_light, specular_light); } -#endif // defined(USE_LIGHT_DIRECTIONAL) || defined(USE_LIGHT_POSITIONAL) +#endif // !defined(DISABLE_LIGHT_DIRECTIONAL) || !defined(DISABLE_LIGHT_OMNI) && !defined(DISABLE_LIGHT_SPOT) + +#ifndef MODE_RENDER_DEPTH +vec4 fog_process(vec3 vertex) { + vec3 fog_color = scene_data.fog_light_color; + +#ifdef USE_RADIANCE_MAP +/* + if (scene_data.fog_aerial_perspective > 0.0) { + vec3 sky_fog_color = vec3(0.0); + vec3 cube_view = scene_data.radiance_inverse_xform * vertex; + // mip_level always reads from the second mipmap and higher so the fog is always slightly blurred + float mip_level = mix(1.0 / MAX_ROUGHNESS_LOD, 1.0, 1.0 - (abs(vertex.z) - scene_data.z_near) / (scene_data.z_far - scene_data.z_near)); + + sky_fog_color = textureCubeLod(radiance_map, cube_view, mip_level * RADIANCE_MAX_LOD).rgb; + + fog_color = mix(fog_color, sky_fog_color, scene_data.fog_aerial_perspective); + } + */ +#endif + +#ifndef DISABLE_LIGHT_DIRECTIONAL + if (scene_data.fog_sun_scatter > 0.001) { + vec4 sun_scatter = vec4(0.0); + float sun_total = 0.0; + vec3 view = normalize(vertex); + for (uint i = uint(0); i < scene_data.directional_light_count; i++) { + vec3 light_color = directional_lights[i].color * directional_lights[i].energy; + float light_amount = pow(max(dot(view, directional_lights[i].direction), 0.0), 8.0); + fog_color += light_color * light_amount * scene_data.fog_sun_scatter; + } + } +#endif // !DISABLE_LIGHT_DIRECTIONAL + + float fog_amount = 1.0 - exp(min(0.0, -length(vertex) * scene_data.fog_density)); + + if (abs(scene_data.fog_height_density) >= 0.0001) { + float y = (scene_data.inv_view_matrix * vec4(vertex, 1.0)).y; + + float y_dist = y - scene_data.fog_height; + + float vfog_amount = 1.0 - exp(min(0.0, y_dist * scene_data.fog_height_density)); + + fog_amount = max(vfog_amount, fog_amount); + } + + return vec4(fog_color, fog_amount); +} + +#endif // !MODE_RENDER_DEPTH void main() { //lay out everything, whatever is unused is optimized away anyway @@ -920,7 +919,7 @@ void main() { float normal_map_depth = 1.0; - vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size + scene_data.screen_pixel_size * 0.5; //account for center + vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size; float sss_strength = 0.0; @@ -951,7 +950,7 @@ void main() { #ifdef USE_OPAQUE_PREPASS #if !defined(ALPHA_SCISSOR_USED) - if (alpha < scene_data.opaque_prepass_threshold) { + if (alpha < opaque_prepass_threshold) { discard; } @@ -982,9 +981,31 @@ void main() { #endif #ifndef MODE_RENDER_DEPTH + +#ifndef CUSTOM_FOG_USED +#ifndef DISABLE_FOG + // fog must be processed as early as possible and then packed. + // to maximize VGPR usage + + if (scene_data.fog_enabled) { + fog = fog_process(vertex); + } +#endif // !DISABLE_FOG +#endif //!CUSTOM_FOG_USED + + uint fog_rg = packHalf2x16(fog.rg); + uint fog_ba = packHalf2x16(fog.ba); + +#endif //!MODE_RENDER_DEPTH + +#ifndef MODE_RENDER_DEPTH + + // Convert colors to linear + albedo = srgb_to_linear(albedo); + emission = srgb_to_linear(emission); + // TODO Backlight and transmittance when used +#ifndef MODE_UNSHADED vec3 f0 = F0(metallic, specular, albedo); - // Convert albedo to linear. Approximation from: http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html - albedo = albedo * (albedo * (albedo * 0.305306011 + 0.682171111) + 0.012522878); vec3 specular_light = vec3(0.0, 0.0, 0.0); vec3 diffuse_light = vec3(0.0, 0.0, 0.0); vec3 ambient_light = vec3(0.0, 0.0, 0.0); @@ -996,15 +1017,58 @@ void main() { float ndotv = clamp(dot(normal, view), 0.0, 1.0); vec3 F = f0 + (max(vec3(1.0 - roughness), f0) - f0) * pow(1.0 - ndotv, 5.0); - // Calculate IBL +#ifdef USE_RADIANCE_MAP + if (scene_data.use_reflection_cubemap) { +#ifdef LIGHT_ANISOTROPY_USED + // https://google.github.io/filament/Filament.html#lighting/imagebasedlights/anisotropy + vec3 anisotropic_direction = anisotropy >= 0.0 ? binormal : tangent; + vec3 anisotropic_tangent = cross(anisotropic_direction, view); + vec3 anisotropic_normal = cross(anisotropic_tangent, anisotropic_direction); + vec3 bent_normal = normalize(mix(normal, anisotropic_normal, abs(anisotropy) * clamp(5.0 * roughness, 0.0, 1.0))); + vec3 ref_vec = reflect(-view, bent_normal); +#else + vec3 ref_vec = reflect(-view, normal); +#endif + float horizon = min(1.0 + dot(ref_vec, normal), 1.0); + ref_vec = scene_data.radiance_inverse_xform * ref_vec; + specular_light = textureCubeLod(radiance_map, ref_vec, roughness * RADIANCE_MAX_LOD).rgb; + specular_light = srgb_to_linear(specular_light); + specular_light *= horizon * horizon; + specular_light *= scene_data.ambient_light_color_energy.a; + } +#endif + // Calculate Reflection probes - // Caclculate Lightmaps + // Calculate Lightmaps - float specular_blob_intensity = 1.0; +#if defined(CUSTOM_RADIANCE_USED) + specular_light = mix(specular_light, custom_radiance.rgb, custom_radiance.a); +#endif // CUSTOM_RADIANCE_USED -#if defined(SPECULAR_TOON) - specular_blob_intensity *= specular * 2.0; +#ifndef USE_LIGHTMAP + //lightmap overrides everything + if (scene_data.use_ambient_light) { + ambient_light = scene_data.ambient_light_color_energy.rgb; +#ifdef USE_RADIANCE_MAP + if (scene_data.use_ambient_cubemap) { + vec3 ambient_dir = scene_data.radiance_inverse_xform * normal; + vec3 cubemap_ambient = textureCubeLod(radiance_map, ambient_dir, RADIANCE_MAX_LOD).rgb; + cubemap_ambient = srgb_to_linear(cubemap_ambient); + ambient_light = mix(ambient_light, cubemap_ambient * scene_data.ambient_light_color_energy.a, scene_data.ambient_color_sky_mix); + } #endif + } +#endif // USE_LIGHTMAP + +#if defined(CUSTOM_IRRADIANCE_USED) + ambient_light = mix(ambient_light, custom_irradiance.rgb, custom_irradiance.a); +#endif // CUSTOM_IRRADIANCE_USED + ambient_light *= albedo.rgb; + + ambient_light *= ao; + + // convert ao to direct light ao + ao = mix(1.0, ao, ao_light_affect); { #if defined(DIFFUSE_TOON) @@ -1029,36 +1093,34 @@ void main() { #endif // BASE_PASS - //this saves some VGPRs - uint orms = packUnorm4x8(vec4(ao, roughness, metallic, specular)); - -#ifdef USE_LIGHT_DIRECTIONAL - - float size_A = directional_lights[i].size; - - light_compute(normal, directional_lights[i].direction, normalize(view), size_A, directional_lights[i].color * directional_lights[i].energy, shadow, f0, orms, 1.0, albedo, alpha, +#ifndef DISABLE_LIGHT_DIRECTIONAL + //diffuse_light = normal; // + for (uint i = uint(0); i < scene_data.directional_light_count; i++) { + light_compute(normal, normalize(directional_lights[i].direction), normalize(view), directional_lights[i].size, directional_lights[i].color * directional_lights[i].energy, 1.0, f0, roughness, metallic, 1.0, albedo, alpha, #ifdef LIGHT_BACKLIGHT_USED - backlight, + backlight, #endif #ifdef LIGHT_RIM_USED - rim, rim_tint, + rim, rim_tint, #endif #ifdef LIGHT_CLEARCOAT_USED - clearcoat, clearcoat_roughness, normalize(normal_interp), + clearcoat, clearcoat_roughness, normalize(normal_interp), #endif #ifdef LIGHT_ANISOTROPY_USED - binormal, - tangent, anisotropy, + binormal, + tangent, anisotropy, #endif - diffuse_light, - specular_light); - -#endif //#USE_LIGHT_DIRECTIONAL + diffuse_light, + specular_light); + } +#endif //!DISABLE_LIGHT_DIRECTIONAL -#ifdef USE_LIGHT_POSITIONAL - float shadow = 0.0; - for (int i = 0; i < omni_light_count; i++) { - light_process_omni(omni_light_indices[i], vertex, view, normal, f0, orms, shadow, albedo, alpha, +#ifndef DISABLE_LIGHT_OMNI + for (int i = 0; i < MAX_FORWARD_LIGHTS; i++) { + if (i >= omni_light_count) { + break; + } + light_process_omni(omni_light_indices[i], vertex, view, normal, f0, roughness, metallic, 0.0, albedo, alpha, #ifdef LIGHT_BACKLIGHT_USED backlight, #endif @@ -1070,13 +1132,18 @@ void main() { clearcoat, clearcoat_roughness, normalize(normal_interp), #endif #ifdef LIGHT_ANISOTROPY_USED - tangent, binormal, anisotropy, + binormal, tangent, anisotropy, #endif diffuse_light, specular_light); } +#endif // !DISABLE_LIGHT_OMNI - for (int i = 0; i < spot_light_count; i++) { - light_process_spot(spot_light_indices[i], vertex, view, normal, f0, orms, shadow, albedo, alpha, +#ifndef DISABLE_LIGHT_SPOT + for (int i = 0; i < MAX_FORWARD_LIGHTS; i++) { + if (i >= spot_light_count) { + break; + } + light_process_spot(spot_light_indices[i], vertex, view, normal, f0, roughness, metallic, 0.0, albedo, alpha, #ifdef LIGHT_BACKLIGHT_USED backlight, #endif @@ -1094,8 +1161,9 @@ void main() { diffuse_light, specular_light); } -#endif // USE_LIGHT_POSITIONAL -#endif //!MODE_RENDER_DEPTH +#endif // !DISABLE_LIGHT_SPOT +#endif // !MODE_UNSHADED +#endif // !MODE_RENDER_DEPTH #if defined(USE_SHADOW_TO_OPACITY) alpha = min(alpha, clamp(length(ambient_light), 0.0, 1.0)); @@ -1122,21 +1190,31 @@ void main() { //nothing happens, so a tree-ssa optimizer will result in no fragment shader :) #else // !MODE_RENDER_DEPTH - specular_light *= scene_data.reflection_multiplier; - ambient_light *= albedo; //ambient must be multiplied by albedo at the end +#ifdef MODE_UNSHADED + frag_color = vec4(albedo, alpha); +#else + + diffuse_light *= albedo; - // base color remapping diffuse_light *= 1.0 - metallic; ambient_light *= 1.0 - metallic; -#ifdef MODE_UNSHADED - frag_color = vec4(albedo, alpha); -#else - frag_color = vec4(ambient_light + diffuse_light + specular_light, alpha); + frag_color = vec4(diffuse_light + specular_light, alpha); #ifdef BASE_PASS - frag_color.rgb += emission; + frag_color.rgb += emission + ambient_light; #endif #endif //MODE_UNSHADED + fog = vec4(unpackHalf2x16(fog_rg), unpackHalf2x16(fog_ba)); + +#ifndef DISABLE_FOG + if (scene_data.fog_enabled) { +#ifdef BASE_PASS + frag_color.rgb = mix(frag_color.rgb, fog.rgb, fog.a); +#else + frag_color.rgb *= (1.0 - fog.a); +#endif // BASE_PASS + } +#endif // Tonemap before writing as we are writing to an sRGB framebuffer frag_color.rgb *= exposure; diff --git a/drivers/gles3/shaders/sky.glsl b/drivers/gles3/shaders/sky.glsl index 3a1bcd3b28..50ab38bc31 100644 --- a/drivers/gles3/shaders/sky.glsl +++ b/drivers/gles3/shaders/sky.glsl @@ -12,13 +12,13 @@ mode_cubemap_quarter_res = #define USE_CUBEMAP_PASS \n#define USE_QUARTER_RES_PA #[vertex] +layout(location = 0) in vec2 vertex_attrib; + out vec2 uv_interp; /* clang-format on */ void main() { - // One big triangle to cover the whole screen - vec2 base_arr[3] = vec2[](vec2(-1.0, -1.0), vec2(3.0, -1.0), vec2(-1.0, 3.0)); - uv_interp = base_arr[gl_VertexID]; + uv_interp = vertex_attrib; gl_Position = vec4(uv_interp, 1.0, 1.0); } @@ -46,18 +46,13 @@ layout(std140) uniform GlobalVariableData { //ubo:1 vec4 global_variables[MAX_GLOBAL_VARIABLES]; }; -layout(std140) uniform SceneData { //ubo:2 - float pad1; - float pad2; -}; - struct DirectionalLightData { vec4 direction_energy; vec4 color_size; bool enabled; }; -layout(std140) uniform DirectionalLights { //ubo:3 +layout(std140) uniform DirectionalLights { //ubo:4 DirectionalLightData data[MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS]; } directional_lights; @@ -65,7 +60,7 @@ directional_lights; /* clang-format off */ #ifdef MATERIAL_UNIFORMS_USED -layout(std140) uniform MaterialUniforms{ //ubo:4 +layout(std140) uniform MaterialUniforms{ //ubo:3 #MATERIAL_UNIFORMS @@ -98,6 +93,14 @@ uniform vec4 projection; uniform vec3 position; uniform float time; +uniform float fog_aerial_perspective; +uniform vec3 fog_light_color; +uniform float fog_sun_scatter; +uniform bool fog_enabled; +uniform float fog_density; +uniform float z_far; +uniform uint directional_light_count; + layout(location = 0) out vec4 frag_color; void main() { @@ -106,12 +109,11 @@ void main() { cube_normal.x = (uv_interp.x + projection.x) / projection.y; cube_normal.y = (-uv_interp.y - projection.z) / projection.w; cube_normal = mat3(orientation) * cube_normal; - cube_normal.z = -cube_normal.z; cube_normal = normalize(cube_normal); vec2 uv = gl_FragCoord.xy; // uv_interp * 0.5 + 0.5; - vec2 panorama_coords = vec2(atan(cube_normal.x, cube_normal.z), acos(cube_normal.y)); + vec2 panorama_coords = vec2(atan(cube_normal.x, -cube_normal.z), acos(cube_normal.y)); if (panorama_coords.x < 0.0) { panorama_coords.x += M_PI * 2.0; @@ -126,13 +128,11 @@ void main() { vec4 custom_fog = vec4(0.0); #ifdef USE_CUBEMAP_PASS - vec3 inverted_cube_normal = cube_normal; - inverted_cube_normal.z *= -1.0; #ifdef USES_HALF_RES_COLOR - half_res_color = texture(samplerCube(half_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal); + half_res_color = texture(samplerCube(half_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), cube_normal); #endif #ifdef USES_QUARTER_RES_COLOR - quarter_res_color = texture(samplerCube(quarter_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal); + quarter_res_color = texture(samplerCube(quarter_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), cube_normal); #endif #else #ifdef USES_HALF_RES_COLOR @@ -149,7 +149,8 @@ void main() { } - // Tonemap before writing as we are writing to an sRGB framebuffer + // Convert to Linear for tonemapping so color matches scene shader better + color = srgb_to_linear(color); color *= exposure; color = apply_tonemapping(color, white); color = linear_to_srgb(color); diff --git a/drivers/gles3/shaders/stdlib_inc.glsl b/drivers/gles3/shaders/stdlib_inc.glsl index 6cce6c12bd..d5051760d7 100644 --- a/drivers/gles3/shaders/stdlib_inc.glsl +++ b/drivers/gles3/shaders/stdlib_inc.glsl @@ -42,11 +42,11 @@ vec2 unpackSnorm2x16(uint p) { uint packUnorm4x8(vec4 v) { uvec4 uv = uvec4(round(clamp(v, vec4(0.0), vec4(1.0)) * 255.0)); - return uv.x | uv.y << uint(8) | uv.z << uint(16) | uv.w << uint(24); + return uv.x | (uv.y << uint(8)) | (uv.z << uint(16)) | (uv.w << uint(24)); } vec4 unpackUnorm4x8(uint p) { - return vec4(float(p & uint(0xffff)), float((p >> uint(8)) & uint(0xffff)), float((p >> uint(16)) & uint(0xffff)), float(p >> uint(24))) * 0.00392156862; // 1.0 / 255.0 + return vec4(float(p & uint(0xff)), float((p >> uint(8)) & uint(0xff)), float((p >> uint(16)) & uint(0xff)), float(p >> uint(24))) * 0.00392156862; // 1.0 / 255.0 } uint packSnorm4x8(vec4 v) { @@ -55,6 +55,6 @@ uint packSnorm4x8(vec4 v) { } vec4 unpackSnorm4x8(uint p) { - vec4 v = vec4(float(p & uint(0xffff)), float((p >> uint(8)) & uint(0xffff)), float((p >> uint(16)) & uint(0xffff)), float(p >> uint(24))); + vec4 v = vec4(float(p & uint(0xff)), float((p >> uint(8)) & uint(0xff)), float((p >> uint(16)) & uint(0xff)), float(p >> uint(24))); return clamp((v - vec4(127.0)) * vec4(0.00787401574), vec4(-1.0), vec4(1.0)); } diff --git a/drivers/gles3/shaders/tonemap.glsl b/drivers/gles3/shaders/tonemap.glsl index 4f962626a3..a478cf9170 100644 --- a/drivers/gles3/shaders/tonemap.glsl +++ b/drivers/gles3/shaders/tonemap.glsl @@ -231,10 +231,10 @@ vec3 apply_fxaa(vec3 color, vec2 uv_interp, vec2 pixel_size) { } void main() { - vec3 color = textureLod(source, uv_interp, 0.0).rgb; + vec4 color = textureLod(source, uv_interp, 0.0); #ifdef USE_FXAA - color = apply_fxaa(color, uv_interp, pixel_size); + color.rgb = apply_fxaa(color.rgb, uv_interp, pixel_size); #endif // Glow @@ -296,18 +296,18 @@ void main() { #endif //USE_MULTI_TEXTURE_GLOW glow *= glow_intensity; - color = apply_glow(color, glow); + color.rgb = apply_glow(color.rgb, glow); #endif // Additional effects #ifdef USE_BCS - color = apply_bcs(color, bcs); + color.rgb = apply_bcs(color.rgb, bcs); #endif #ifdef USE_COLOR_CORRECTION - color = apply_color_correction(color, color_correction); + color.rgb = apply_color_correction(color.rgb, color_correction); #endif - frag_color = vec4(color, 1.0); + frag_color = color; } diff --git a/drivers/gles3/shaders/tonemap_inc.glsl b/drivers/gles3/shaders/tonemap_inc.glsl index ea15c05359..f8f12760ec 100644 --- a/drivers/gles3/shaders/tonemap_inc.glsl +++ b/drivers/gles3/shaders/tonemap_inc.glsl @@ -92,11 +92,19 @@ vec3 tonemap_reinhard(vec3 color, float p_white) { return (p_white * color + color) / (color * p_white + p_white); } +// This expects 0-1 range input. vec3 linear_to_srgb(vec3 color) { - //if going to srgb, clamp from 0 to 1. - color = clamp(color, vec3(0.0), vec3(1.0)); - const vec3 a = vec3(0.055f); - return mix((vec3(1.0f) + a) * pow(color.rgb, vec3(1.0f / 2.4f)) - a, 12.92f * color.rgb, lessThan(color.rgb, vec3(0.0031308f))); + //color = clamp(color, vec3(0.0), vec3(1.0)); + //const vec3 a = vec3(0.055f); + //return mix((vec3(1.0f) + a) * pow(color.rgb, vec3(1.0f / 2.4f)) - a, 12.92f * color.rgb, lessThan(color.rgb, vec3(0.0031308f))); + // Approximation from http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html + return max(vec3(1.055) * pow(color, vec3(0.416666667)) - vec3(0.055), vec3(0.0)); +} + +// This expects 0-1 range input, outside that range it behaves poorly. +vec3 srgb_to_linear(vec3 color) { + // Approximation from http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html + return color * (color * (color * 0.305306011 + 0.682171111) + 0.012522878); } #define TONEMAPPER_LINEAR 0 diff --git a/drivers/gles3/storage/config.h b/drivers/gles3/storage/config.h index 7e143c1c1e..975508b555 100644 --- a/drivers/gles3/storage/config.h +++ b/drivers/gles3/storage/config.h @@ -34,7 +34,7 @@ #ifdef GLES3_ENABLED #include "core/string/ustring.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" // This must come first to avoid windows.h mess #include "platform_config.h" @@ -65,7 +65,7 @@ public: // TODO implement wireframe in OpenGL // bool generate_wireframes; - Set<String> extensions; + RBSet<String> extensions; bool float_texture_supported = false; bool s3tc_supported = false; diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index c1122ccc07..7b18376a2a 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -922,7 +922,7 @@ static const GLenum target_from_type[ShaderLanguage::TYPE_MAX] = { GL_TEXTURE_2D, // TYPE_STRUCT }; -void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Map<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color) { +void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const HashMap<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color) { MaterialStorage *material_storage = MaterialStorage::get_singleton(); bool uses_global_buffer = false; @@ -969,11 +969,11 @@ void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::S ERR_CONTINUE(offset + size > p_buffer_size); #endif uint8_t *data = &p_buffer[offset]; - const Map<StringName, Variant>::Element *V = p_parameters.find(E.key); + HashMap<StringName, Variant>::ConstIterator V = p_parameters.find(E.key); if (V) { //user provided - _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, V->get(), data); + _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, V->value, data); } else if (E.value.default_value.size()) { //default value @@ -1024,10 +1024,11 @@ MaterialData::~MaterialData() { if (uniform_buffer) { glDeleteBuffers(1, &uniform_buffer); + uniform_buffer = 0; } } -void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, const Map<StringName, Map<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color) { +void MaterialData::update_textures(const HashMap<StringName, Variant> &p_parameters, const HashMap<StringName, HashMap<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color) { TextureStorage *texture_storage = TextureStorage::get_singleton(); MaterialStorage *material_storage = MaterialStorage::get_singleton(); @@ -1055,12 +1056,12 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it changed type and is no longer a texture!."); } else { - Map<StringName, uint64_t>::Element *E = used_global_textures.find(uniform_name); + HashMap<StringName, uint64_t>::Iterator E = used_global_textures.find(uniform_name); if (!E) { E = used_global_textures.insert(uniform_name, global_textures_pass); v->texture_materials.insert(self); } else { - E->get() = global_textures_pass; + E->value = global_textures_pass; } textures.push_back(v->override.get_type() != Variant::NIL ? v->override : v->value); @@ -1070,10 +1071,10 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it was removed at some point. Material will not display correctly."); } } else { - const Map<StringName, Variant>::Element *V = p_parameters.find(uniform_name); + HashMap<StringName, Variant>::ConstIterator V = p_parameters.find(uniform_name); if (V) { - if (V->get().is_array()) { - Array array = (Array)V->get(); + if (V->value.is_array()) { + Array array = (Array)V->value; if (uniform_array_size > 0) { for (int j = 0; j < array.size(); j++) { textures.push_back(array[j]); @@ -1084,25 +1085,25 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } } } else { - textures.push_back(V->get()); + textures.push_back(V->value); } } if (uniform_array_size > 0) { if (textures.size() < uniform_array_size) { - const Map<StringName, Map<int, RID>>::Element *W = p_default_textures.find(uniform_name); + HashMap<StringName, HashMap<int, RID>>::ConstIterator W = p_default_textures.find(uniform_name); for (int j = textures.size(); j < uniform_array_size; j++) { - if (W && W->get().has(j)) { - textures.push_back(W->get()[j]); + if (W && W->value.has(j)) { + textures.push_back(W->value[j]); } else { textures.push_back(RID()); } } } } else if (textures.is_empty()) { - const Map<StringName, Map<int, RID>>::Element *W = p_default_textures.find(uniform_name); - if (W && W->get().has(0)) { - textures.push_back(W->get()[0]); + HashMap<StringName, HashMap<int, RID>>::ConstIterator W = p_default_textures.find(uniform_name); + if (W && W->value.has(0)) { + textures.push_back(W->value[0]); } } } @@ -1221,12 +1222,12 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } { //for textures no longer used, unregister them - List<Map<StringName, uint64_t>::Element *> to_delete; - for (Map<StringName, uint64_t>::Element *E = used_global_textures.front(); E; E = E->next()) { - if (E->get() != global_textures_pass) { - to_delete.push_back(E); + List<StringName> to_delete; + for (KeyValue<StringName, uint64_t> &E : used_global_textures) { + if (E.value != global_textures_pass) { + to_delete.push_back(E.key); - GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E->key()); + GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E.key); if (v) { v->texture_materials.erase(self); } @@ -1249,7 +1250,7 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } } -void MaterialData::update_parameters_internal(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const Map<StringName, Map<int, RID>> &p_default_texture_params, uint32_t p_ubo_size) { +void MaterialData::update_parameters_internal(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const HashMap<StringName, HashMap<int, RID>> &p_default_texture_params, uint32_t p_ubo_size) { if ((uint32_t)ubo_data.size() != p_ubo_size) { p_uniform_dirty = true; if (!uniform_buffer) { @@ -1677,9 +1678,6 @@ ShaderCompiler::DefaultIdentifierActions actions; //shaders.copy.initialize(); //shaders.copy_version = shaders.copy.version_create(); //TODO //shaders.copy.version_bind_shader(shaders.copy_version, CopyShaderGLES3::MODE_COPY_SECTION); - //shaders.cubemap_filter.init(); - //bool ggx_hq = GLOBAL_GET("rendering/quality/reflections/high_quality_ggx"); - //shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::LOW_QUALITY, !ggx_hq); } MaterialStorage::~MaterialStorage() { @@ -2093,8 +2091,8 @@ void MaterialStorage::global_variable_set(const StringName &p_name, const Varian } else { //texture MaterialStorage *material_storage = MaterialStorage::get_singleton(); - for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { - Material *material = material_storage->get_material(E->get()); + for (const RID &E : gv.texture_materials) { + Material *material = material_storage->get_material(E); ERR_CONTINUE(!material); material_storage->_material_queue_update(material, false, true); } @@ -2125,8 +2123,8 @@ void MaterialStorage::global_variable_set_override(const StringName &p_name, con } else { //texture MaterialStorage *material_storage = MaterialStorage::get_singleton(); - for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { - Material *material = material_storage->get_material(E->get()); + for (const RID &E : gv.texture_materials) { + Material *material = material_storage->get_material(E); ERR_CONTINUE(!material); material_storage->_material_queue_update(material, false, true); } @@ -2423,8 +2421,8 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->data = nullptr; } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { - Material *material = E->get(); + for (Material *E : shader->owners) { + Material *material = E; material->shader_mode = new_mode; if (material->data) { memdelete(material->data); @@ -2440,8 +2438,8 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->mode = RS::SHADER_MAX; //invalid } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { - Material *material = E->get(); + for (Material *E : shader->owners) { + Material *material = E; if (shader->data) { material->data = material_data_request_func[new_mode](shader->data); material->data->self = material->self; @@ -2452,7 +2450,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { } if (shader->data) { - for (const KeyValue<StringName, Map<int, RID>> &E : shader->default_texture_parameter) { + for (const KeyValue<StringName, HashMap<int, RID>> &E : shader->default_texture_parameter) { for (const KeyValue<int, RID> &E2 : E.value) { shader->data->set_default_texture_param(E.key, E2.value, E2.key); } @@ -2464,8 +2462,8 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->data->set_code(p_code); } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { - Material *material = E->get(); + for (Material *E : shader->owners) { + Material *material = E; material->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MATERIAL); _material_queue_update(material, true, true); } @@ -2491,7 +2489,7 @@ void MaterialStorage::shader_set_default_texture_param(RID p_shader, const Strin if (p_texture.is_valid() && TextureStorage::get_singleton()->owns_texture(p_texture)) { if (!shader->default_texture_parameter.has(p_name)) { - shader->default_texture_parameter[p_name] = Map<int, RID>(); + shader->default_texture_parameter[p_name] = HashMap<int, RID>(); } shader->default_texture_parameter[p_name][p_index] = p_texture; } else { @@ -2506,8 +2504,8 @@ void MaterialStorage::shader_set_default_texture_param(RID p_shader, const Strin if (shader->data) { shader->data->set_default_texture_param(p_name, p_texture, p_index); } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { - Material *material = E->get(); + for (Material *E : shader->owners) { + Material *material = E; _material_queue_update(material, false, true); } } @@ -2820,14 +2818,14 @@ void CanvasShaderData::set_default_texture_param(const StringName &p_name, RID p } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void CanvasShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -2908,7 +2906,7 @@ GLES3::ShaderData *GLES3::_create_canvas_shader_func() { return shader_data; } -void CanvasMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +void CanvasMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { return update_parameters_internal(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size); } @@ -3042,14 +3040,14 @@ void SkyShaderData::set_default_texture_param(const StringName &p_name, RID p_te } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void SkyShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + RBMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { @@ -3132,7 +3130,8 @@ GLES3::ShaderData *GLES3::_create_sky_shader_func() { //////////////////////////////////////////////////////////////////////////////// // Sky material -void SkyMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +void SkyMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { + uniform_set_updated = true; return update_parameters_internal(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size); } @@ -3351,14 +3350,14 @@ void SceneShaderData::set_default_texture_param(const StringName &p_name, RID p_ } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void SceneShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + RBMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -3447,7 +3446,7 @@ void SceneMaterialData::set_next_pass(RID p_pass) { next_pass = p_pass; } -void SceneMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +void SceneMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { return update_parameters_internal(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size); } diff --git a/drivers/gles3/storage/material_storage.h b/drivers/gles3/storage/material_storage.h index aa36dda4e6..6a11a10d76 100644 --- a/drivers/gles3/storage/material_storage.h +++ b/drivers/gles3/storage/material_storage.h @@ -45,6 +45,7 @@ #include "drivers/gles3/shaders/copy.glsl.gen.h" #include "../shaders/canvas.glsl.gen.h" +#include "../shaders/cubemap_filter.glsl.gen.h" #include "../shaders/scene.glsl.gen.h" #include "../shaders/sky.glsl.gen.h" @@ -56,6 +57,7 @@ struct Shaders { CanvasShaderGLES3 canvas_shader; SkyShaderGLES3 sky_shader; SceneShaderGLES3 scene_shader; + CubemapFilterShaderGLES3 cubemap_filter_shader; ShaderCompiler compiler_canvas; ShaderCompiler compiler_scene; @@ -86,24 +88,24 @@ struct Shader { ShaderData *data = nullptr; String code; RS::ShaderMode mode; - Map<StringName, Map<int, RID>> default_texture_parameter; - Set<Material *> owners; + HashMap<StringName, HashMap<int, RID>> default_texture_parameter; + RBSet<Material *> owners; }; /* Material structs */ struct MaterialData { - void update_uniform_buffer(const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Map<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color); - void update_textures(const Map<StringName, Variant> &p_parameters, const Map<StringName, Map<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color); + void update_uniform_buffer(const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const HashMap<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color); + void update_textures(const HashMap<StringName, Variant> &p_parameters, const HashMap<StringName, HashMap<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color); virtual void set_render_priority(int p_priority) = 0; virtual void set_next_pass(RID p_pass) = 0; - virtual void update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) = 0; + virtual void update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) = 0; virtual void bind_uniforms() = 0; virtual ~MaterialData(); // Used internally by all Materials - void update_parameters_internal(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const Map<StringName, Map<int, RID>> &p_default_texture_params, uint32_t p_ubo_size); + void update_parameters_internal(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const HashMap<StringName, HashMap<int, RID>> &p_default_texture_params, uint32_t p_ubo_size); protected: Vector<uint8_t> ubo_data; @@ -116,7 +118,7 @@ private: List<RID>::Element *global_buffer_E = nullptr; List<RID>::Element *global_texture_E = nullptr; uint64_t global_textures_pass = 0; - Map<StringName, uint64_t> used_global_textures; + HashMap<StringName, uint64_t> used_global_textures; //internally by update_parameters_internal }; @@ -132,7 +134,7 @@ struct Material { uint32_t shader_id = 0; bool uniform_dirty = false; bool texture_dirty = false; - Map<StringName, Variant> params; + HashMap<StringName, Variant> params; int32_t priority = 0; RID next_pass; SelfList<Material> update_element; @@ -160,14 +162,14 @@ struct CanvasShaderData : public ShaderData { //PipelineVariants pipeline_variants; String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; uint32_t ubo_size; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; bool uses_screen_texture = false; bool uses_sdf = false; @@ -195,7 +197,7 @@ struct CanvasMaterialData : public MaterialData { virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual void update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual void update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual void bind_uniforms(); virtual ~CanvasMaterialData(); }; @@ -208,7 +210,7 @@ struct SkyShaderData : public ShaderData { bool valid; RID version; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; @@ -216,7 +218,7 @@ struct SkyShaderData : public ShaderData { String path; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; bool uses_time; bool uses_position; @@ -241,10 +243,11 @@ ShaderData *_create_sky_shader_func(); struct SkyMaterialData : public MaterialData { SkyShaderData *shader_data = nullptr; + bool uniform_set_updated = false; virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual void update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual void update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual void bind_uniforms(); virtual ~SkyMaterialData(); }; @@ -290,14 +293,14 @@ struct SceneShaderData : public ShaderData { String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; uint32_t ubo_size; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; BlendMode blend_mode; AlphaAntiAliasing alpha_antialiasing_mode; @@ -368,7 +371,7 @@ struct SceneMaterialData : public MaterialData { uint8_t priority = 0; virtual void set_render_priority(int p_priority); virtual void set_next_pass(RID p_pass); - virtual void update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual void update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual void bind_uniforms(); virtual ~SceneMaterialData(); }; @@ -381,7 +384,7 @@ struct GlobalVariables { BUFFER_DIRTY_REGION_SIZE = 1024 }; struct Variable { - Set<RID> texture_materials; // materials using this + RBSet<RID> texture_materials; // materials using this RS::GlobalVariableType type; Variant value; @@ -458,8 +461,6 @@ private: SelfList<Material>::List material_update_list; - //static void _material_uniform_set_erased(void *p_material); - public: static MaterialStorage *get_singleton(); diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp index a2b9cb6a62..3be1792868 100644 --- a/drivers/gles3/storage/mesh_storage.cpp +++ b/drivers/gles3/storage/mesh_storage.cpp @@ -68,8 +68,8 @@ void MeshStorage::mesh_free(RID p_rid) { ERR_PRINT("deleting mesh with active instances"); } if (mesh->shadow_owners.size()) { - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { - Mesh *shadow_owner = E->get(); + for (Mesh *E : mesh->shadow_owners) { + Mesh *shadow_owner = E; shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); } @@ -268,8 +268,8 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { - Mesh *shadow_owner = E->get(); + for (Mesh *E : mesh->shadow_owners) { + Mesh *shadow_owner = E; shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); } @@ -570,24 +570,29 @@ void MeshStorage::mesh_clear(RID p_mesh) { if (s.vertex_buffer != 0) { glDeleteBuffers(1, &s.vertex_buffer); + s.vertex_buffer = 0; } if (s.version_count != 0) { for (uint32_t j = 0; j < s.version_count; j++) { glDeleteVertexArrays(1, &s.versions[j].vertex_array); + s.versions[j].vertex_array = 0; } } if (s.attribute_buffer != 0) { glDeleteBuffers(1, &s.attribute_buffer); + s.attribute_buffer = 0; } if (s.skin_buffer != 0) { glDeleteBuffers(1, &s.skin_buffer); + s.skin_buffer = 0; } if (s.index_buffer != 0) { glDeleteBuffers(1, &s.index_buffer); + s.index_buffer = 0; } memdelete(mesh->surfaces[i]); } @@ -605,8 +610,8 @@ void MeshStorage::mesh_clear(RID p_mesh) { mesh->has_bone_weights = false; mesh->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { - Mesh *shadow_owner = E->get(); + for (Mesh *E : mesh->shadow_owners) { + Mesh *shadow_owner = E; shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); } @@ -804,17 +809,20 @@ void MeshStorage::_mesh_instance_clear(MeshInstance *mi) { if (mi->surfaces[i].version_count != 0) { for (uint32_t j = 0; j < mi->surfaces[i].version_count; j++) { glDeleteVertexArrays(1, &mi->surfaces[i].versions[j].vertex_array); + mi->surfaces[i].versions[j].vertex_array = 0; } memfree(mi->surfaces[i].versions); } if (mi->surfaces[i].vertex_buffer != 0) { glDeleteBuffers(1, &mi->surfaces[i].vertex_buffer); + mi->surfaces[i].vertex_buffer = 0; } } mi->surfaces.clear(); if (mi->blend_weights_buffer != 0) { glDeleteBuffers(1, &mi->blend_weights_buffer); + mi->blend_weights_buffer = 0; } mi->blend_weights.clear(); mi->weights_dirty = false; diff --git a/drivers/gles3/storage/mesh_storage.h b/drivers/gles3/storage/mesh_storage.h index dfb9046e7b..856463d45e 100644 --- a/drivers/gles3/storage/mesh_storage.h +++ b/drivers/gles3/storage/mesh_storage.h @@ -123,7 +123,7 @@ struct Mesh { List<MeshInstance *> instances; RID shadow_mesh; - Set<Mesh *> shadow_owners; + RBSet<Mesh *> shadow_owners; RendererStorage::Dependency dependency; }; diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp index 4396ca4f93..f932fa8bad 100644 --- a/drivers/gles3/storage/texture_storage.cpp +++ b/drivers/gles3/storage/texture_storage.cpp @@ -554,7 +554,7 @@ Ref<Image> TextureStorage::_get_gl_image_and_format(const Ref<Image> &p_image, I } break; */ default: { - ERR_FAIL_V(Ref<Image>()); + ERR_FAIL_V_MSG(Ref<Image>(), "Image Format: " + itos(p_format) + " is not supported by the OpenGL3 Renderer"); } } @@ -968,7 +968,7 @@ void TextureStorage::texture_set_data(RID p_texture, const Ref<Image> &p_image, Image::Format real_format; Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), 0, real_format, format, internal_format, type, compressed, texture->resize_to_po2); - + ERR_FAIL_COND(img.is_null()); if (texture->resize_to_po2) { if (p_image->is_compressed()) { ERR_PRINT("Texture '" + texture->path + "' is required to be a power of 2 because it uses either mipmaps or repeat, so it was decompressed. This will hurt performance and memory usage."); @@ -1325,6 +1325,7 @@ void TextureStorage::_update_render_target(RenderTarget *rt) { rt->color_internal_format = rt->flags[RENDER_TARGET_TRANSPARENT] ? GL_RGBA8 : GL_RGB10_A2; rt->color_format = GL_RGBA; + rt->color_type = rt->flags[RENDER_TARGET_TRANSPARENT] ? GL_BYTE : GL_UNSIGNED_INT_2_10_10_10_REV; rt->image_format = Image::FORMAT_RGBA8; glDisable(GL_SCISSOR_TEST); diff --git a/drivers/gles3/storage/texture_storage.h b/drivers/gles3/storage/texture_storage.h index 8281b8c596..b092a009c1 100644 --- a/drivers/gles3/storage/texture_storage.h +++ b/drivers/gles3/storage/texture_storage.h @@ -249,7 +249,10 @@ struct Texture { [[fallthrough]]; case RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: { pmag = GL_NEAREST; - if (config->use_nearest_mip_filter) { + if (mipmaps <= 1) { + pmin = GL_NEAREST; + max_lod = 0; + } else if (config->use_nearest_mip_filter) { pmin = GL_NEAREST_MIPMAP_NEAREST; } else { pmin = GL_NEAREST_MIPMAP_LINEAR; @@ -261,9 +264,11 @@ struct Texture { [[fallthrough]]; case RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: { pmag = GL_LINEAR; - if (config->use_nearest_mip_filter) { + if (mipmaps <= 1) { + pmin = GL_LINEAR; + max_lod = 0; + } else if (config->use_nearest_mip_filter) { pmin = GL_LINEAR_MIPMAP_NEAREST; - } else { pmin = GL_LINEAR_MIPMAP_LINEAR; } diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index d442e521bf..2deeb79957 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -128,7 +128,7 @@ void IPUnix::_resolve_hostname(List<IPAddress> &r_addresses, const String &p_hos #if defined(UWP_ENABLED) -void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const { +void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const { using namespace Windows::Networking; using namespace Windows::Networking::Connectivity; @@ -143,7 +143,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con } String name = hostname->RawName->Data(); - Map<String, Interface_Info>::Element *E = r_interfaces->find(name); + HashMap<String, Interface_Info>::Element *E = r_interfaces->find(name); if (!E) { Interface_Info info; info.name = name; @@ -162,7 +162,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con #else -void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const { +void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const { ULONG buf_size = 1024; IP_ADAPTER_ADDRESSES *addrs; @@ -212,7 +212,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con #else // UNIX -void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const { +void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const { struct ifaddrs *ifAddrStruct = nullptr; struct ifaddrs *ifa = nullptr; int family; @@ -230,7 +230,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con continue; } - Map<String, Interface_Info>::Element *E = r_interfaces->find(ifa->ifa_name); + HashMap<String, Interface_Info>::Iterator E = r_interfaces->find(ifa->ifa_name); if (!E) { Interface_Info info; info.name = ifa->ifa_name; @@ -240,7 +240,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con ERR_CONTINUE(!E); } - Interface_Info &info = E->get(); + Interface_Info &info = E->value; info.ip_addresses.push_front(_sockaddr2ip(ifa->ifa_addr)); } diff --git a/drivers/unix/ip_unix.h b/drivers/unix/ip_unix.h index f0ad01d248..06fcdb6e17 100644 --- a/drivers/unix/ip_unix.h +++ b/drivers/unix/ip_unix.h @@ -43,7 +43,7 @@ class IPUnix : public IP { static IP *_create_unix(); public: - virtual void get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const override; + virtual void get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const override; static void make_default(); IPUnix(); diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index 3130d5cae2..f172f31b24 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -256,7 +256,7 @@ _FORCE_INLINE_ Error NetSocketPosix::_change_multicast_group(IPAddress p_ip, Str IPAddress if_ip; uint32_t if_v6id = 0; - Map<String, IP::Interface_Info> if_info; + HashMap<String, IP::Interface_Info> if_info; IP::get_singleton()->get_local_interfaces(&if_info); for (KeyValue<String, IP::Interface_Info> &E : if_info) { IP::Interface_Info &c = E.value; diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 5102eab979..1a60ca0647 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -132,13 +132,13 @@ static void update_external_dependency_for_store(VkSubpassDependency &dependency void RenderingDeviceVulkan::_add_dependency(RID p_id, RID p_depends_on) { if (!dependency_map.has(p_depends_on)) { - dependency_map[p_depends_on] = Set<RID>(); + dependency_map[p_depends_on] = RBSet<RID>(); } dependency_map[p_depends_on].insert(p_id); if (!reverse_dependency_map.has(p_id)) { - reverse_dependency_map[p_id] = Set<RID>(); + reverse_dependency_map[p_id] = RBSet<RID>(); } reverse_dependency_map[p_id].insert(p_depends_on); @@ -147,26 +147,26 @@ void RenderingDeviceVulkan::_add_dependency(RID p_id, RID p_depends_on) { void RenderingDeviceVulkan::_free_dependencies(RID p_id) { //direct dependencies must be freed - Map<RID, Set<RID>>::Element *E = dependency_map.find(p_id); + HashMap<RID, RBSet<RID>>::Iterator E = dependency_map.find(p_id); if (E) { - while (E->get().size()) { - free(E->get().front()->get()); + while (E->value.size()) { + free(E->value.front()->get()); } - dependency_map.erase(E); + dependency_map.remove(E); } //reverse dependencies must be unreferenced E = reverse_dependency_map.find(p_id); if (E) { - for (Set<RID>::Element *F = E->get().front(); F; F = F->next()) { - Map<RID, Set<RID>>::Element *G = dependency_map.find(F->get()); + for (const RID &F : E->value) { + HashMap<RID, RBSet<RID>>::Iterator G = dependency_map.find(F); ERR_CONTINUE(!G); - ERR_CONTINUE(!G->get().has(p_id)); - G->get().erase(p_id); + ERR_CONTINUE(!G->value.has(p_id)); + G->value.erase(p_id); } - reverse_dependency_map.erase(E); + reverse_dependency_map.remove(E); } } @@ -3856,7 +3856,7 @@ RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::framebuffer_format_c key.passes = p_passes; key.view_count = p_view_count; - const Map<FramebufferFormatKey, FramebufferFormatID>::Element *E = framebuffer_format_cache.find(key); + const RBMap<FramebufferFormatKey, FramebufferFormatID>::Element *E = framebuffer_format_cache.find(key); if (E) { //exists, return return E->get(); @@ -3884,7 +3884,7 @@ RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::framebuffer_format_c FramebufferFormatKey key; key.passes.push_back(FramebufferPass()); - const Map<FramebufferFormatKey, FramebufferFormatID>::Element *E = framebuffer_format_cache.find(key); + const RBMap<FramebufferFormatKey, FramebufferFormatID>::Element *E = framebuffer_format_cache.find(key); if (E) { //exists, return return E->get(); @@ -3935,11 +3935,11 @@ RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::framebuffer_format_c } RenderingDevice::TextureSamples RenderingDeviceVulkan::framebuffer_format_get_texture_samples(FramebufferFormatID p_format, uint32_t p_pass) { - Map<FramebufferFormatID, FramebufferFormat>::Element *E = framebuffer_formats.find(p_format); + HashMap<FramebufferFormatID, FramebufferFormat>::Iterator E = framebuffer_formats.find(p_format); ERR_FAIL_COND_V(!E, TEXTURE_SAMPLES_1); - ERR_FAIL_COND_V(p_pass >= uint32_t(E->get().pass_samples.size()), TEXTURE_SAMPLES_1); + ERR_FAIL_COND_V(p_pass >= uint32_t(E->value.pass_samples.size()), TEXTURE_SAMPLES_1); - return E->get().pass_samples[p_pass]; + return E->value.pass_samples[p_pass]; } /***********************/ @@ -4138,7 +4138,7 @@ RenderingDevice::VertexFormatID RenderingDeviceVulkan::vertex_format_create(cons vdcache.bindings = memnew_arr(VkVertexInputBindingDescription, p_vertex_formats.size()); vdcache.attributes = memnew_arr(VkVertexInputAttributeDescription, p_vertex_formats.size()); - Set<int> used_locations; + RBSet<int> used_locations; for (int i = 0; i < p_vertex_formats.size(); i++) { ERR_CONTINUE(p_vertex_formats[i].format >= DATA_FORMAT_MAX); ERR_FAIL_COND_V(used_locations.has(p_vertex_formats[i].location), INVALID_ID); @@ -5292,7 +5292,7 @@ RID RenderingDeviceVulkan::shader_create_from_bytecode(const Vector<uint8_t> &p_ //has data, needs an actual format; UniformSetFormat usformat; usformat.uniform_info = set.uniform_info; - Map<UniformSetFormat, uint32_t>::Element *E = uniform_set_format_cache.find(usformat); + RBMap<UniformSetFormat, uint32_t>::Element *E = uniform_set_format_cache.find(usformat); if (E) { format = E->get(); } else { @@ -5468,14 +5468,14 @@ RID RenderingDeviceVulkan::texture_buffer_create(uint32_t p_size_elements, DataF RenderingDeviceVulkan::DescriptorPool *RenderingDeviceVulkan::_descriptor_pool_allocate(const DescriptorPoolKey &p_key) { if (!descriptor_pools.has(p_key)) { - descriptor_pools[p_key] = Set<DescriptorPool *>(); + descriptor_pools[p_key] = RBSet<DescriptorPool *>(); } DescriptorPool *pool = nullptr; - for (Set<DescriptorPool *>::Element *E = descriptor_pools[p_key].front(); E; E = E->next()) { - if (E->get()->usage < max_descriptors_per_pool) { - pool = E->get(); + for (DescriptorPool *E : descriptor_pools[p_key]) { + if (E->usage < max_descriptors_per_pool) { + pool = E; break; } } @@ -8349,31 +8349,31 @@ void RenderingDeviceVulkan::compute_list_end(uint32_t p_post_barrier) { uint32_t barrier_idx = 0; - for (Set<Texture *>::Element *E = compute_list->state.textures_to_sampled_layout.front(); E; E = E->next()) { + for (Texture *E : compute_list->state.textures_to_sampled_layout) { VkImageMemoryBarrier &image_memory_barrier = image_barriers[barrier_idx++]; image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; image_memory_barrier.pNext = nullptr; image_memory_barrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; image_memory_barrier.dstAccessMask = access_flags; - image_memory_barrier.oldLayout = E->get()->layout; + image_memory_barrier.oldLayout = E->layout; image_memory_barrier.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; image_memory_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; image_memory_barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - image_memory_barrier.image = E->get()->image; - image_memory_barrier.subresourceRange.aspectMask = E->get()->read_aspect_mask; - image_memory_barrier.subresourceRange.baseMipLevel = E->get()->base_mipmap; - image_memory_barrier.subresourceRange.levelCount = E->get()->mipmaps; - image_memory_barrier.subresourceRange.baseArrayLayer = E->get()->base_layer; - image_memory_barrier.subresourceRange.layerCount = E->get()->layers; + image_memory_barrier.image = E->image; + image_memory_barrier.subresourceRange.aspectMask = E->read_aspect_mask; + image_memory_barrier.subresourceRange.baseMipLevel = E->base_mipmap; + image_memory_barrier.subresourceRange.levelCount = E->mipmaps; + image_memory_barrier.subresourceRange.baseArrayLayer = E->base_layer; + image_memory_barrier.subresourceRange.layerCount = E->layers; - E->get()->layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + E->layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; - if (E->get()->used_in_frame != frames_drawn) { - E->get()->used_in_transfer = false; - E->get()->used_in_raster = false; - E->get()->used_in_compute = false; - E->get()->used_in_frame = frames_drawn; + if (E->used_in_frame != frames_drawn) { + E->used_in_transfer = false; + E->used_in_raster = false; + E->used_in_compute = false; + E->used_in_frame = frames_drawn; } } @@ -9477,21 +9477,21 @@ void RenderingDeviceVulkan::finalize() { vmaDestroyBuffer(allocator, staging_buffer_blocks[i].buffer, staging_buffer_blocks[i].allocation); } while (small_allocs_pools.size()) { - Map<uint32_t, VmaPool>::Element *E = small_allocs_pools.front(); - vmaDestroyPool(allocator, E->get()); - small_allocs_pools.erase(E); + HashMap<uint32_t, VmaPool>::Iterator E = small_allocs_pools.begin(); + vmaDestroyPool(allocator, E->value); + small_allocs_pools.remove(E); } vmaDestroyAllocator(allocator); while (vertex_formats.size()) { - Map<VertexFormatID, VertexDescriptionCache>::Element *temp = vertex_formats.front(); - memdelete_arr(temp->get().bindings); - memdelete_arr(temp->get().attributes); - vertex_formats.erase(temp); + HashMap<VertexFormatID, VertexDescriptionCache>::Iterator temp = vertex_formats.begin(); + memdelete_arr(temp->value.bindings); + memdelete_arr(temp->value.attributes); + vertex_formats.remove(temp); } - for (int i = 0; i < framebuffer_formats.size(); i++) { - vkDestroyRenderPass(device, framebuffer_formats[i].render_pass, nullptr); + for (KeyValue<FramebufferFormatID, FramebufferFormat> &E : framebuffer_formats) { + vkDestroyRenderPass(device, E.value.render_pass, nullptr); } framebuffer_formats.clear(); diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h index 236742c15d..601c44c728 100644 --- a/drivers/vulkan/rendering_device_vulkan.h +++ b/drivers/vulkan/rendering_device_vulkan.h @@ -101,8 +101,8 @@ class RenderingDeviceVulkan : public RenderingDevice { VkDevice device = VK_NULL_HANDLE; - Map<RID, Set<RID>> dependency_map; //IDs to IDs that depend on it - Map<RID, Set<RID>> reverse_dependency_map; //same as above, but in reverse + HashMap<RID, RBSet<RID>> dependency_map; //IDs to IDs that depend on it + HashMap<RID, RBSet<RID>> reverse_dependency_map; //same as above, but in reverse void _add_dependency(RID p_id, RID p_depends_on); void _free_dependencies(RID p_id); @@ -349,15 +349,15 @@ class RenderingDeviceVulkan : public RenderingDevice { VkRenderPass _render_pass_create(const Vector<AttachmentFormat> &p_attachments, const Vector<FramebufferPass> &p_passes, InitialAction p_initial_action, FinalAction p_final_action, InitialAction p_initial_depth_action, FinalAction p_final_depth_action, uint32_t p_view_count = 1, Vector<TextureSamples> *r_samples = nullptr); // This is a cache and it's never freed, it ensures // IDs for a given format are always unique. - Map<FramebufferFormatKey, FramebufferFormatID> framebuffer_format_cache; + RBMap<FramebufferFormatKey, FramebufferFormatID> framebuffer_format_cache; struct FramebufferFormat { - const Map<FramebufferFormatKey, FramebufferFormatID>::Element *E; + const RBMap<FramebufferFormatKey, FramebufferFormatID>::Element *E; VkRenderPass render_pass = VK_NULL_HANDLE; //here for constructing shaders, never used, see section (7.2. Render Pass Compatibility from Vulkan spec) Vector<TextureSamples> pass_samples; uint32_t view_count = 1; // number of views }; - Map<FramebufferFormatID, FramebufferFormat> framebuffer_formats; + HashMap<FramebufferFormatID, FramebufferFormat> framebuffer_formats; struct Framebuffer { FramebufferFormatID format_id = 0; @@ -398,7 +398,7 @@ class RenderingDeviceVulkan : public RenderingDevice { uint32_t subpass_count = 1; }; - Map<VersionKey, Version> framebuffers; + RBMap<VersionKey, Version> framebuffers; Size2 size; uint32_t view_count; }; @@ -488,7 +488,7 @@ class RenderingDeviceVulkan : public RenderingDevice { VkPipelineVertexInputStateCreateInfo create_info; }; - Map<VertexFormatID, VertexDescriptionCache> vertex_formats; + HashMap<VertexFormatID, VertexDescriptionCache> vertex_formats; struct VertexArray { RID buffer; @@ -592,7 +592,7 @@ class RenderingDeviceVulkan : public RenderingDevice { // Always grows, never shrinks, ensuring unique IDs, but we assume // the amount of formats will never be a problem, as the amount of shaders // in a game is limited. - Map<UniformSetFormat, uint32_t> uniform_set_format_cache; + RBMap<UniformSetFormat, uint32_t> uniform_set_format_cache; // Shaders in Vulkan are just pretty much // precompiled blocks of SPIR-V bytecode. They @@ -702,7 +702,7 @@ class RenderingDeviceVulkan : public RenderingDevice { uint32_t usage; }; - Map<DescriptorPoolKey, Set<DescriptorPool *>> descriptor_pools; + RBMap<DescriptorPoolKey, RBSet<DescriptorPool *>> descriptor_pools; uint32_t max_descriptors_per_pool = 0; DescriptorPool *_descriptor_pool_allocate(const DescriptorPoolKey &p_key); @@ -923,7 +923,7 @@ class RenderingDeviceVulkan : public RenderingDevice { }; struct State { - Set<Texture *> textures_to_sampled_layout; + RBSet<Texture *> textures_to_sampled_layout; SetState sets[MAX_UNIFORM_SETS]; uint32_t set_count = 0; RID pipeline; @@ -1016,7 +1016,7 @@ class RenderingDeviceVulkan : public RenderingDevice { void _free_pending_resources(int p_frame); VmaAllocator allocator = nullptr; - Map<uint32_t, VmaPool> small_allocs_pools; + HashMap<uint32_t, VmaPool> small_allocs_pools; VmaPool _find_or_create_small_allocs_pool(uint32_t p_mem_type_index); VulkanContext *context = nullptr; diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h index 6858eb7524..236e3bf35f 100644 --- a/drivers/vulkan/vulkan_context.h +++ b/drivers/vulkan/vulkan_context.h @@ -34,7 +34,7 @@ #include "core/error/error_list.h" #include "core/os/mutex.h" #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/rid_owner.h" #include "servers/display_server.h" #include "servers/rendering/rendering_device.h" @@ -161,7 +161,7 @@ private: RID_Owner<LocalDevice, true> local_device_owner; - Map<DisplayServer::WindowID, Window> windows; + HashMap<DisplayServer::WindowID, Window> windows; uint32_t swapchainImageCount = 0; // Commands. diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 9c8fec26a7..c5f800b17a 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -62,7 +62,7 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) { int right_limit = get_size().width; //selection may have altered the order of keys - Map<float, int> key_order; + RBMap<float, int> key_order; for (int i = 0; i < animation->track_get_key_count(p_track); i++) { float ofs = animation->track_get_key_time(p_track, i); @@ -73,7 +73,7 @@ void AnimationBezierTrackEdit::_draw_track(int p_track, const Color &p_color) { key_order[ofs] = i; } - for (Map<float, int>::Element *E = key_order.front(); E; E = E->next()) { + for (RBMap<float, int>::Element *E = key_order.front(); E; E = E->next()) { int i = E->get(); if (!E->next()) { @@ -262,12 +262,12 @@ void AnimationBezierTrackEdit::_notification(int p_what) { int vofs = vsep; int margin = 0; - Map<int, Color> subtrack_colors; + RBMap<int, Color> subtrack_colors; Color selected_track_color; subtracks.clear(); subtrack_icons.clear(); - Map<String, Vector<int>> track_indices; + RBMap<String, Vector<int>> track_indices; int track_count = animation->get_track_count(); for (int i = 0; i < track_count; ++i) { if (animation->track_get_type(i) != Animation::TrackType::TYPE_BEZIER) { @@ -432,7 +432,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) { Rect2 solo_rect = Rect2(solo_hpos, icon_start_height - solo->get_height() / 2, solo->get_width(), solo->get_height()); draw_texture(solo, solo_rect.position); - Map<int, Rect2> track_icons; + RBMap<int, Rect2> track_icons; track_icons[REMOVE_ICON] = remove_rect; track_icons[LOCK_ICON] = lock_rect; track_icons[VISIBILITY_ICON] = visible_rect; @@ -747,8 +747,8 @@ void AnimationBezierTrackEdit::_update_locked_tracks_after(int p_track) { } Vector<int> updated_locked_tracks; - for (Set<int>::Element *E = locked_tracks.front(); E; E = E->next()) { - updated_locked_tracks.push_back(E->get()); + for (const int &E : locked_tracks) { + updated_locked_tracks.push_back(E); } locked_tracks.clear(); for (int i = 0; i < updated_locked_tracks.size(); ++i) { @@ -766,8 +766,8 @@ void AnimationBezierTrackEdit::_update_hidden_tracks_after(int p_track) { } Vector<int> updated_hidden_tracks; - for (Set<int>::Element *E = hidden_tracks.front(); E; E = E->next()) { - updated_hidden_tracks.push_back(E->get()); + for (const int &E : hidden_tracks) { + updated_hidden_tracks.push_back(E); } hidden_tracks.clear(); for (int i = 0; i < updated_hidden_tracks.size(); ++i) { @@ -963,9 +963,9 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) { } } - for (const KeyValue<int, Map<int, Rect2>> &E : subtrack_icons) { + for (const KeyValue<int, RBMap<int, Rect2>> &E : subtrack_icons) { int track = E.key; - Map<int, Rect2> track_icons = E.value; + RBMap<int, Rect2> track_icons = E.value; for (const KeyValue<int, Rect2> &I : track_icons) { if (I.value.has_point(mb->get_position())) { if (I.key == REMOVE_ICON) { diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h index f228f66771..cbbc3cc32a 100644 --- a/editor/animation_bezier_editor.h +++ b/editor/animation_bezier_editor.h @@ -61,7 +61,7 @@ class AnimationBezierTrackEdit : public Control { Ref<Texture2D> bezier_handle_icon; Ref<Texture2D> selected_icon; - Map<int, Rect2> subtracks; + RBMap<int, Rect2> subtracks; enum { REMOVE_ICON, @@ -70,9 +70,9 @@ class AnimationBezierTrackEdit : public Control { VISIBILITY_ICON }; - Map<int, Map<int, Rect2>> subtrack_icons; - Set<int> locked_tracks; - Set<int> hidden_tracks; + RBMap<int, RBMap<int, Rect2>> subtrack_icons; + RBSet<int> locked_tracks; + RBSet<int> hidden_tracks; int solo_track = -1; bool is_filtered = false; @@ -152,7 +152,7 @@ class AnimationBezierTrackEdit : public Control { } }; - typedef Set<IntPair, SelectionCompare> SelectionSet; + typedef RBSet<IntPair, SelectionCompare> SelectionSet; SelectionSet selection; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index a70e7011fd..ad4b7b7d95 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -560,30 +560,30 @@ public: if (use_fps && animation->get_step() > 0) { float max_frame = animation->get_length() / animation->get_step(); - p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("frame"), PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1")); } else { - p_list->push_back(PropertyInfo(Variant::FLOAT, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("time"), PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01")); } switch (animation->track_get_type(track)) { case Animation::TYPE_POSITION_3D: { - p_list->push_back(PropertyInfo(Variant::VECTOR3, "position")); + p_list->push_back(PropertyInfo(Variant::VECTOR3, PNAME("position"))); } break; case Animation::TYPE_ROTATION_3D: { - p_list->push_back(PropertyInfo(Variant::QUATERNION, "rotation")); + p_list->push_back(PropertyInfo(Variant::QUATERNION, PNAME("rotation"))); } break; case Animation::TYPE_SCALE_3D: { - p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale")); + p_list->push_back(PropertyInfo(Variant::VECTOR3, PNAME("scale"))); } break; case Animation::TYPE_BLEND_SHAPE: { - p_list->push_back(PropertyInfo(Variant::FLOAT, "value")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("value"))); } break; case Animation::TYPE_VALUE: { Variant v = animation->track_get_key_value(track, key); if (hint.type != Variant::NIL) { PropertyInfo pi = hint; - pi.name = "value"; + pi.name = PNAME("value"); p_list->push_back(pi); } else { PropertyHint val_hint = PROPERTY_HINT_NONE; @@ -599,14 +599,14 @@ public: } if (v.get_type() != Variant::NIL) { - p_list->push_back(PropertyInfo(v.get_type(), "value", val_hint, val_hint_string)); + p_list->push_back(PropertyInfo(v.get_type(), PNAME("value"), val_hint, val_hint_string)); } } } break; case Animation::TYPE_METHOD: { - p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name")); - p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,32,1,or_greater")); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("name"))); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("arg_count"), PROPERTY_HINT_RANGE, "0,32,1,or_greater")); Dictionary d = animation->track_get_key_value(track, key); ERR_FAIL_COND(!d.has("args")); @@ -620,24 +620,24 @@ public: } for (int i = 0; i < args.size(); i++) { - p_list->push_back(PropertyInfo(Variant::INT, "args/" + itos(i) + "/type", PROPERTY_HINT_ENUM, vtypes)); + p_list->push_back(PropertyInfo(Variant::INT, vformat("%s/%d/%s", PNAME("args"), i, PNAME("type")), PROPERTY_HINT_ENUM, vtypes)); if (args[i].get_type() != Variant::NIL) { - p_list->push_back(PropertyInfo(args[i].get_type(), "args/" + itos(i) + "/value")); + p_list->push_back(PropertyInfo(args[i].get_type(), vformat("%s/%d/%s", PNAME("args"), i, PNAME("value")))); } } } break; case Animation::TYPE_BEZIER: { - p_list->push_back(PropertyInfo(Variant::FLOAT, "value")); - p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle")); - p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle")); - p_list->push_back(PropertyInfo(Variant::INT, "handle_mode", PROPERTY_HINT_ENUM, "Free,Balanced")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("value"))); + p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("in_handle"))); + p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("out_handle"))); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("handle_mode"), PROPERTY_HINT_ENUM, "Free,Balanced")); } break; case Animation::TYPE_AUDIO: { - p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); + p_list->push_back(PropertyInfo(Variant::OBJECT, PNAME("stream"), PROPERTY_HINT_RESOURCE_TYPE, "AudioStream")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("start_offset"), PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("end_offset"), PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater")); } break; case Animation::TYPE_ANIMATION: { @@ -663,13 +663,13 @@ public: } animations += "[stop]"; - p_list->push_back(PropertyInfo(Variant::STRING_NAME, "animation", PROPERTY_HINT_ENUM, animations)); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("animation"), PROPERTY_HINT_ENUM, animations)); } break; } if (animation->track_get_type(track) == Animation::TYPE_VALUE) { - p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING)); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("easing"), PROPERTY_HINT_EXP_EASING)); } } @@ -1353,8 +1353,8 @@ public: Ref<Animation> animation; - Map<int, List<float>> key_ofs_map; - Map<int, NodePath> base_map; + RBMap<int, List<float>> key_ofs_map; + RBMap<int, NodePath> base_map; PropertyInfo hint; Node *root_path = nullptr; @@ -1417,14 +1417,14 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) { void AnimationTimelineEdit::_anim_loop_pressed() { undo_redo->create_action(TTR("Change Animation Loop")); switch (animation->get_loop_mode()) { - case Animation::LoopMode::LOOP_NONE: { - undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_LINEAR); + case Animation::LOOP_NONE: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LOOP_LINEAR); } break; - case Animation::LoopMode::LOOP_LINEAR: { - undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_PINGPONG); + case Animation::LOOP_LINEAR: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LOOP_PINGPONG); } break; - case Animation::LoopMode::LOOP_PINGPONG: { - undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LoopMode::LOOP_NONE); + case Animation::LOOP_PINGPONG: { + undo_redo->add_do_method(animation.ptr(), "set_loop_mode", Animation::LOOP_NONE); } break; default: break; @@ -1724,15 +1724,15 @@ void AnimationTimelineEdit::update_values() { } switch (animation->get_loop_mode()) { - case Animation::LoopMode::LOOP_NONE: { + case Animation::LOOP_NONE: { loop->set_icon(get_theme_icon(SNAME("Loop"), SNAME("EditorIcons"))); loop->set_pressed(false); } break; - case Animation::LoopMode::LOOP_LINEAR: { + case Animation::LOOP_LINEAR: { loop->set_icon(get_theme_icon(SNAME("Loop"), SNAME("EditorIcons"))); loop->set_pressed(true); } break; - case Animation::LoopMode::LOOP_PINGPONG: { + case Animation::LOOP_PINGPONG: { loop->set_icon(get_theme_icon(SNAME("PingPongLoop"), SNAME("EditorIcons"))); loop->set_pressed(true); } break; @@ -4382,7 +4382,7 @@ void AnimationTrackEditor::_update_tracks() { return; } - Map<String, VBoxContainer *> group_sort; + RBMap<String, VBoxContainer *> group_sort; bool use_grouping = !view_group->is_pressed(); bool use_filter = selected_filter->is_pressed(); @@ -5199,8 +5199,8 @@ void AnimationTrackEditor::_update_key_edit() { multi_key_edit = memnew(AnimationMultiTrackKeyEdit); multi_key_edit->animation = animation; - Map<int, List<float>> key_ofs_map; - Map<int, NodePath> base_map; + RBMap<int, List<float>> key_ofs_map; + RBMap<int, NodePath> base_map; int first_track = -1; for (const KeyValue<SelectedKey, KeyInfo> &E : selection) { int track = E.key.track; @@ -5261,11 +5261,11 @@ void AnimationTrackEditor::_move_selection_commit() { float motion = moving_selection_offset; // 1 - remove the keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key); } // 2 - Remove overlapped keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newtime = snap_time(E->get().pos + motion); int idx = animation->track_find_key(E->key().track, newtime, true); if (idx == -1) { @@ -5290,19 +5290,19 @@ void AnimationTrackEditor::_move_selection_commit() { } // 3 - Move the keys (Reinsert them). - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = snap_time(E->get().pos + motion); undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } // 4 - (Undo) Remove inserted keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = snap_time(E->get().pos + motion); undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", E->key().track, newpos); } // 5 - (Undo) Reinsert keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } @@ -5315,7 +5315,7 @@ void AnimationTrackEditor::_move_selection_commit() { undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation); // 7 - Reselect. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float oldpos = E->get().pos; float newpos = snap_time(oldpos + motion); @@ -5488,7 +5488,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { if (selection.size() && animation.is_valid() && (!transpose || (_get_track_selected() >= 0 && _get_track_selected() < animation->get_track_count()))) { int top_track = 0x7FFFFFFF; float top_time = 1e10; - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { const SelectedKey &sk = E->key(); float t = animation->track_get_key_time(sk.track, sk.key); @@ -5509,7 +5509,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { List<Pair<int, float>> new_selection_values; - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { const SelectedKey &sk = E->key(); float t = animation->track_get_key_time(sk.track, sk.key); @@ -5544,7 +5544,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { // Reselect duplicated. - Map<SelectedKey, KeyInfo> new_selection; + RBMap<SelectedKey, KeyInfo> new_selection; for (const Pair<int, float> &E : new_selection_values) { int track = E.first; float time = E.second; @@ -5822,11 +5822,11 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { List<_AnimMoveRestore> to_restore; // 1 - Remove the keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key); } // 2 - Remove overlapped keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newtime = (E->get().pos - from_t) * s + from_t; int idx = animation->track_find_key(E->key().track, newtime, true); if (idx == -1) { @@ -5852,19 +5852,19 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { #define NEW_POS(m_ofs) (((s > 0) ? m_ofs : from_t + (len - (m_ofs - from_t))) - pivot) * ABS(s) + from_t // 3 - Move the keys (re insert them). - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = NEW_POS(E->get().pos); undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } // 4 - (Undo) Remove inserted keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float newpos = NEW_POS(E->get().pos); undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", E->key().track, newpos); } // 5 - (Undo) Reinsert keys. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } @@ -5877,7 +5877,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation); // 7-reselect. - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { float oldpos = E->get().pos; float newpos = NEW_POS(oldpos); if (newpos >= 0) { @@ -5906,7 +5906,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { undo_redo->create_action(TTR("Anim Add RESET Keys")); Ref<Animation> reset = _create_and_get_reset_animation(); int reset_tracks = reset->get_track_count(); - Set<int> tracks_added; + RBSet<int> tracks_added; for (const KeyValue<SelectedKey, KeyInfo> &E : selection) { const SelectedKey &sk = E.key; @@ -5960,7 +5960,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { if (selection.size()) { undo_redo->create_action(TTR("Anim Delete Keys")); - for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { + for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key); undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key)); } diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 2773b48082..55c3bd922a 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -410,7 +410,7 @@ class AnimationTrackEditor : public VBoxContainer { float pos = 0; }; - Map<SelectedKey, KeyInfo> selection; + RBMap<SelectedKey, KeyInfo> selection; void _key_selected(int p_key, bool p_single, int p_track); void _key_deselected(int p_key, int p_track); @@ -478,10 +478,10 @@ class AnimationTrackEditor : public VBoxContainer { struct TrackClipboard { NodePath full_path; NodePath base_path; - Animation::TrackType track_type = Animation::TrackType::TYPE_ANIMATION; - Animation::InterpolationType interp_type = Animation::InterpolationType::INTERPOLATION_CUBIC; - Animation::UpdateMode update_mode = Animation::UpdateMode::UPDATE_CAPTURE; - Animation::LoopMode loop_mode = Animation::LoopMode::LOOP_LINEAR; + Animation::TrackType track_type = Animation::TYPE_ANIMATION; + Animation::InterpolationType interp_type = Animation::INTERPOLATION_CUBIC; + Animation::UpdateMode update_mode = Animation::UPDATE_CAPTURE; + Animation::LoopMode loop_mode = Animation::LOOP_LINEAR; bool loop_wrap = false; bool enabled = false; diff --git a/editor/audio_stream_preview.h b/editor/audio_stream_preview.h index bcd80a7c03..307dd93b34 100644 --- a/editor/audio_stream_preview.h +++ b/editor/audio_stream_preview.h @@ -85,7 +85,7 @@ class AudioStreamPreviewGenerator : public Node { Preview() {} }; - Map<ObjectID, Preview> previews; + HashMap<ObjectID, Preview> previews; static void _preview_thread(void *p_preview); diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 5526181c13..4cff0ffd3d 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -1029,27 +1029,27 @@ void ConnectionsDock::update_tree() { String descr; bool found = false; - Map<StringName, Map<StringName, String>>::Element *G = descr_cache.find(base); + HashMap<StringName, HashMap<StringName, String>>::Iterator G = descr_cache.find(base); if (G) { - Map<StringName, String>::Element *F = G->get().find(signal_name); + HashMap<StringName, String>::Iterator F = G->value.find(signal_name); if (F) { found = true; - descr = F->get(); + descr = F->value; } } if (!found) { DocTools *dd = EditorHelp::get_doc_data(); - Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(base); + HashMap<String, DocData::ClassDoc>::Iterator F = dd->class_list.find(base); while (F && descr.is_empty()) { - for (int i = 0; i < F->get().signals.size(); i++) { - if (F->get().signals[i].name == signal_name.operator String()) { - descr = DTR(F->get().signals[i].description); + for (int i = 0; i < F->value.signals.size(); i++) { + if (F->value.signals[i].name == signal_name.operator String()) { + descr = DTR(F->value.signals[i].description); break; } } - if (!F->get().inherits.is_empty()) { - F = dd->class_list.find(F->get().inherits); + if (!F->value.inherits.is_empty()) { + F = dd->class_list.find(F->value.inherits); } else { break; } diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index f8f15b32af..88d52c83f2 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -197,7 +197,7 @@ class ConnectionsDock : public VBoxContainer { UndoRedo *undo_redo = nullptr; LineEdit *search_box = nullptr; - Map<StringName, Map<StringName, String>> descr_cache; + HashMap<StringName, HashMap<StringName, String>> descr_cache; void _filter_changed(const String &p_text); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index b064f6aec7..3469e96a0a 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -138,8 +138,8 @@ bool CreateDialog::_should_hide_type(const String &p_type) const { return true; // Wrong inheritance. } - for (Set<StringName>::Element *E = type_blacklist.front(); E; E = E->next()) { - if (ClassDB::is_parent_class(p_type, E->get())) { + for (const StringName &E : type_blacklist) { + if (ClassDB::is_parent_class(p_type, E)) { return true; // Parent type is blacklisted. } } diff --git a/editor/create_dialog.h b/editor/create_dialog.h index 31761be6fe..6526116b09 100644 --- a/editor/create_dialog.h +++ b/editor/create_dialog.h @@ -64,7 +64,7 @@ class CreateDialog : public ConfirmationDialog { HashMap<String, String> custom_type_parents; HashMap<String, int> custom_type_indices; List<StringName> type_list; - Set<StringName> type_blacklist; + RBSet<StringName> type_blacklist; void _update_search(); bool _should_hide_type(const String &p_type) const; diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp index e7baeeeded..0caeb90108 100644 --- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp @@ -381,12 +381,12 @@ Dictionary DebugAdapterParser::req_scopes(const Dictionary &p_params) const { DAP::StackFrame frame; frame.id = frame_id; - Map<DAP::StackFrame, List<int>>::Element *E = DebugAdapterProtocol::get_singleton()->stackframe_list.find(frame); + HashMap<DAP::StackFrame, List<int>, DAP::StackFrame>::Iterator E = DebugAdapterProtocol::get_singleton()->stackframe_list.find(frame); if (E) { - ERR_FAIL_COND_V(E->value().size() != 3, prepare_error_response(p_params, DAP::ErrorType::UNKNOWN)); + ERR_FAIL_COND_V(E->value.size() != 3, prepare_error_response(p_params, DAP::ErrorType::UNKNOWN)); for (int i = 0; i < 3; i++) { DAP::Scope scope; - scope.variablesReference = E->value()[i]; + scope.variablesReference = E->value[i]; switch (i) { case 0: scope.name = "Locals"; @@ -424,16 +424,16 @@ Dictionary DebugAdapterParser::req_variables(const Dictionary &p_params) const { Dictionary args = p_params["arguments"]; int variable_id = args["variablesReference"]; - Map<int, Array>::Element *E = DebugAdapterProtocol::get_singleton()->variable_list.find(variable_id); + HashMap<int, Array>::Iterator E = DebugAdapterProtocol::get_singleton()->variable_list.find(variable_id); if (E) { if (!DebugAdapterProtocol::get_singleton()->get_current_peer()->supportsVariableType) { - for (int i = 0; i < E->value().size(); i++) { - Dictionary variable = E->value()[i]; + for (int i = 0; i < E->value.size(); i++) { + Dictionary variable = E->value[i]; variable.erase("type"); } } - body["variables"] = E ? E->value() : Array(); + body["variables"] = E ? E->value : Array(); return response; } else { return Dictionary(); diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp index fea4c2b156..92ea0f15e9 100644 --- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp @@ -918,11 +918,11 @@ void DebugAdapterProtocol::on_debug_stack_frame_vars(const int &p_size) { DAP::StackFrame frame; frame.id = _current_frame; ERR_FAIL_COND(!stackframe_list.has(frame)); - List<int> scope_ids = stackframe_list.find(frame)->value(); + List<int> scope_ids = stackframe_list.find(frame)->value; for (List<int>::Element *E = scope_ids.front(); E; E = E->next()) { int variable_id = E->get(); if (variable_list.has(variable_id)) { - variable_list.find(variable_id)->value().clear(); + variable_list.find(variable_id)->value.clear(); } else { variable_list.insert(variable_id, Array()); } @@ -937,7 +937,7 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) { DAP::StackFrame frame; frame.id = _current_frame; - List<int> scope_ids = stackframe_list.find(frame)->value(); + List<int> scope_ids = stackframe_list.find(frame)->value; ERR_FAIL_COND(scope_ids.size() != 3); ERR_FAIL_INDEX(stack_var.type, 3); int variable_id = scope_ids[stack_var.type]; @@ -949,7 +949,7 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) { variable.type = Variant::get_type_name(stack_var.value.get_type()); variable.variablesReference = parse_variant(stack_var.value); - variable_list.find(variable_id)->value().push_back(variable.to_json()); + variable_list.find(variable_id)->value.push_back(variable.to_json()); _remaining_vars--; } diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.h b/editor/debugger/debug_adapter/debug_adapter_protocol.h index 66db75c634..a17e550dfc 100644 --- a/editor/debugger/debug_adapter/debug_adapter_protocol.h +++ b/editor/debugger/debug_adapter/debug_adapter_protocol.h @@ -115,8 +115,8 @@ private: int stackframe_id = 0; int variable_id = 0; List<DAP::Breakpoint> breakpoint_list; - Map<DAP::StackFrame, List<int>> stackframe_list; - Map<int, Array> variable_list; + HashMap<DAP::StackFrame, List<int>, DAP::StackFrame> stackframe_list; + HashMap<int, Array> variable_list; public: friend class DebugAdapterServer; diff --git a/editor/debugger/debug_adapter/debug_adapter_types.h b/editor/debugger/debug_adapter/debug_adapter_types.h index 77b70909b3..4d77b6d51c 100644 --- a/editor/debugger/debug_adapter/debug_adapter_types.h +++ b/editor/debugger/debug_adapter/debug_adapter_types.h @@ -219,8 +219,11 @@ struct StackFrame { int line; int column; - bool operator<(const StackFrame &p_other) const { - return id < p_other.id; + static uint32_t hash(const StackFrame &p_frame) { + return hash_djb2_one_32(p_frame.id); + } + bool operator==(const StackFrame &p_other) const { + return id == p_other.id; } _FORCE_INLINE_ void from_json(const Dictionary &p_params) { diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp index 854c050793..0dd7b44b68 100644 --- a/editor/debugger/editor_debugger_inspector.cpp +++ b/editor/debugger/editor_debugger_inspector.cpp @@ -146,7 +146,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { debugObj->prop_list.clear(); int new_props_added = 0; - Set<String> changed; + RBSet<String> changed; for (int i = 0; i < obj.properties.size(); i++) { PropertyInfo &pinfo = obj.properties[i].first; Variant &var = obj.properties[i].second; @@ -193,8 +193,8 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { if (old_prop_size == debugObj->prop_list.size() && new_props_added == 0) { //only some may have changed, if so, then update those, if exist - for (Set<String>::Element *E = changed.front(); E; E = E->next()) { - emit_signal(SNAME("object_property_updated"), debugObj->remote_object_id, E->get()); + for (const String &E : changed) { + emit_signal(SNAME("object_property_updated"), debugObj->remote_object_id, E); } } else { //full update, because props were added or removed @@ -276,8 +276,8 @@ void EditorDebuggerInspector::clear_stack_variables() { } String EditorDebuggerInspector::get_stack_variable(const String &p_var) { - for (Map<StringName, Variant>::Element *E = variables->prop_values.front(); E; E = E->next()) { - String v = E->key().operator String(); + for (KeyValue<StringName, Variant> &E : variables->prop_values) { + String v = E.key.operator String(); if (v.get_slice("/", 1) == p_var) { return variables->get_variant(v); } diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h index 2bf5bf3419..72b259c8b5 100644 --- a/editor/debugger/editor_debugger_inspector.h +++ b/editor/debugger/editor_debugger_inspector.h @@ -46,7 +46,7 @@ public: ObjectID remote_object_id; String type_name; List<PropertyInfo> prop_list; - Map<StringName, Variant> prop_values; + HashMap<StringName, Variant> prop_values; ObjectID get_remote_object_id() { return remote_object_id; }; String get_title(); @@ -68,8 +68,8 @@ class EditorDebuggerInspector : public EditorInspector { private: ObjectID inspected_object_id; - Map<ObjectID, EditorDebuggerRemoteObject *> remote_objects; - Set<Ref<Resource>> remote_dependencies; + HashMap<ObjectID, EditorDebuggerRemoteObject *> remote_objects; + RBSet<Ref<Resource>> remote_dependencies; EditorDebuggerRemoteObject *variables = nullptr; void _object_selected(ObjectID p_object); diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index c0685af572..bc28b11a71 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -118,8 +118,8 @@ ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() { } if (!debugger_plugins.is_empty()) { - for (Set<Ref<Script>>::Element *i = debugger_plugins.front(); i; i = i->next()) { - node->add_debugger_plugin(i->get()); + for (const Ref<Script> &i : debugger_plugins) { + node->add_debugger_plugin(i); } } diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h index b4fbb90301..40e9cf47f9 100644 --- a/editor/debugger/editor_debugger_node.h +++ b/editor/debugger/editor_debugger_node.h @@ -70,6 +70,14 @@ private: String source; int line = 0; + static uint32_t hash(const Breakpoint &p_val) { + uint32_t h = HashMapHasherDefault::hash(p_val.source); + return hash_djb2_one_32(p_val.line, h); + } + bool operator==(const Breakpoint &p_b) const { + return (line == p_b.line && source == p_b.source); + } + bool operator<(const Breakpoint &p_b) const { if (line == p_b.line) { return source < p_b.source; @@ -102,9 +110,9 @@ private: bool debug_with_external_editor = false; bool hide_on_stop = true; CameraOverride camera_override = OVERRIDE_NONE; - Map<Breakpoint, bool> breakpoints; + HashMap<Breakpoint, bool, Breakpoint> breakpoints; - Set<Ref<Script>> debugger_plugins; + RBSet<Ref<Script>> debugger_plugins; ScriptEditorDebugger *_add_debugger(); EditorDebuggerRemoteObject *get_inspected_remote_object(); diff --git a/editor/debugger/editor_debugger_server.cpp b/editor/debugger/editor_debugger_server.cpp index bce131a5fe..63390825c6 100644 --- a/editor/debugger/editor_debugger_server.cpp +++ b/editor/debugger/editor_debugger_server.cpp @@ -122,7 +122,7 @@ Ref<RemoteDebuggerPeer> EditorDebuggerServerTCP::take_connection() { } /// EditorDebuggerServer -Map<StringName, EditorDebuggerServer::CreateServerFunc> EditorDebuggerServer::protocols; +HashMap<StringName, EditorDebuggerServer::CreateServerFunc> EditorDebuggerServer::protocols; EditorDebuggerServer *EditorDebuggerServer::create(const String &p_protocol) { ERR_FAIL_COND_V(!protocols.has(p_protocol), nullptr); diff --git a/editor/debugger/editor_debugger_server.h b/editor/debugger/editor_debugger_server.h index bda4a1ce7d..adf9a27c71 100644 --- a/editor/debugger/editor_debugger_server.h +++ b/editor/debugger/editor_debugger_server.h @@ -39,7 +39,7 @@ public: typedef EditorDebuggerServer *(*CreateServerFunc)(const String &p_uri); private: - static Map<StringName, CreateServerFunc> protocols; + static HashMap<StringName, CreateServerFunc> protocols; public: static void initialize(); diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h index 58af52b01f..8ba03367c9 100644 --- a/editor/debugger/editor_debugger_tree.h +++ b/editor/debugger/editor_debugger_tree.h @@ -48,7 +48,7 @@ private: ObjectID inspected_object_id; int debugger_id = 0; bool updating_scene_tree = false; - Set<ObjectID> unfold_cache; + RBSet<ObjectID> unfold_cache; PopupMenu *item_menu = nullptr; EditorFileDialog *file_dialog = nullptr; String last_filter; diff --git a/editor/debugger/editor_network_profiler.h b/editor/debugger/editor_network_profiler.h index 3a604f5564..d2e70a083d 100644 --- a/editor/debugger/editor_network_profiler.h +++ b/editor/debugger/editor_network_profiler.h @@ -50,7 +50,7 @@ private: Timer *frame_delay = nullptr; - Map<ObjectID, SceneDebugger::RPCNodeInfo> nodes_data; + HashMap<ObjectID, SceneDebugger::RPCNodeInfo> nodes_data; void _update_frame(); diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp index 87cbd9423c..897c5ae7da 100644 --- a/editor/debugger/editor_performance_profiler.cpp +++ b/editor/debugger/editor_performance_profiler.cpp @@ -203,7 +203,7 @@ void EditorPerformanceProfiler::_monitor_draw() { } void EditorPerformanceProfiler::_build_monitor_tree() { - Set<StringName> monitor_checked; + RBSet<StringName> monitor_checked; for (KeyValue<StringName, Monitor> &E : monitors) { if (E.value.item && E.value.item->is_checked(0)) { monitor_checked.insert(E.key); diff --git a/editor/debugger/editor_performance_profiler.h b/editor/debugger/editor_performance_profiler.h index 21d2a52820..607de5a134 100644 --- a/editor/debugger/editor_performance_profiler.h +++ b/editor/debugger/editor_performance_profiler.h @@ -32,7 +32,7 @@ #define EDITOR_PERFORMANCE_PROFILER_H #include "core/templates/hash_map.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "main/performance.h" #include "scene/gui/control.h" #include "scene/gui/label.h" @@ -61,7 +61,7 @@ private: HashMap<StringName, Monitor> monitors; - Map<StringName, TreeItem *> base_map; + HashMap<StringName, TreeItem *> base_map; Tree *monitor_tree = nullptr; Control *monitor_draw = nullptr; Label *info_message = nullptr; diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index 50f3b19cc2..9899e91c5a 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -198,18 +198,18 @@ void EditorProfiler::_update_plot() { for (int i = 0; i < total_metrics; i++) { const Metric &m = _get_frame_metric(i); - for (Set<StringName>::Element *E = plot_sigs.front(); E; E = E->next()) { - const Map<StringName, Metric::Category *>::Element *F = m.category_ptrs.find(E->get()); + for (const StringName &E : plot_sigs) { + HashMap<StringName, Metric::Category *>::ConstIterator F = m.category_ptrs.find(E); if (F) { - highest = MAX(F->get()->total_time, highest); + highest = MAX(F->value->total_time, highest); } - const Map<StringName, Metric::Category::Item *>::Element *G = m.item_ptrs.find(E->get()); + HashMap<StringName, Metric::Category::Item *>::ConstIterator G = m.item_ptrs.find(E); if (G) { if (use_self) { - highest = MAX(G->get()->self, highest); + highest = MAX(G->value->self, highest); } else { - highest = MAX(G->get()->total, highest); + highest = MAX(G->value->total, highest); } } } @@ -225,7 +225,7 @@ void EditorProfiler::_update_plot() { int *column = columnv.ptrw(); - Map<StringName, int> prev_plots; + HashMap<StringName, int> prev_plots; for (int i = 0; i < total_metrics * w / frame_metrics.size() - 1; i++) { for (int j = 0; j < h * 4; j++) { @@ -234,34 +234,34 @@ void EditorProfiler::_update_plot() { int current = i * frame_metrics.size() / w; - for (Set<StringName>::Element *E = plot_sigs.front(); E; E = E->next()) { + for (const StringName &E : plot_sigs) { const Metric &m = _get_frame_metric(current); float value = 0; - const Map<StringName, Metric::Category *>::Element *F = m.category_ptrs.find(E->get()); + HashMap<StringName, Metric::Category *>::ConstIterator F = m.category_ptrs.find(E); if (F) { - value = F->get()->total_time; + value = F->value->total_time; } - const Map<StringName, Metric::Category::Item *>::Element *G = m.item_ptrs.find(E->get()); + HashMap<StringName, Metric::Category::Item *>::ConstIterator G = m.item_ptrs.find(E); if (G) { if (use_self) { - value = G->get()->self; + value = G->value->self; } else { - value = G->get()->total; + value = G->value->total; } } int plot_pos = CLAMP(int(value * h / highest), 0, h - 1); int prev_plot = plot_pos; - Map<StringName, int>::Element *H = prev_plots.find(E->get()); + HashMap<StringName, int>::Iterator H = prev_plots.find(E); if (H) { - prev_plot = H->get(); - H->get() = plot_pos; + prev_plot = H->value; + H->value = plot_pos; } else { - prev_plots[E->get()] = plot_pos; + prev_plots[E] = plot_pos; } plot_pos = h - plot_pos - 1; @@ -271,7 +271,7 @@ void EditorProfiler::_update_plot() { SWAP(prev_plot, plot_pos); } - Color col = _get_color_from_signature(E->get()); + Color col = _get_color_from_signature(E); for (int j = prev_plot; j <= plot_pos; j++) { column[j * 4 + 0] += Math::fast_ftoi(CLAMP(col.r * 255, 0, 255)); @@ -515,7 +515,7 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const { } // Different metrics may contain different number of categories. - Set<StringName> possible_signatures; + RBSet<StringName> possible_signatures; for (int i = 0; i < frame_metrics.size(); i++) { const Metric &m = frame_metrics[i]; if (!m.valid) { @@ -530,13 +530,13 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const { } // Generate CSV header and cache indices. - Map<StringName, int> sig_map; + HashMap<StringName, int> sig_map; Vector<String> signatures; signatures.resize(possible_signatures.size()); int sig_index = 0; - for (const Set<StringName>::Element *E = possible_signatures.front(); E; E = E->next()) { - signatures.write[sig_index] = E->get(); - sig_map[E->get()] = sig_index; + for (const StringName &E : possible_signatures) { + signatures.write[sig_index] = E; + sig_map[E] = sig_index; sig_index++; } res.push_back(signatures); diff --git a/editor/debugger/editor_profiler.h b/editor/debugger/editor_profiler.h index 2aef654a2f..77fbb254dc 100644 --- a/editor/debugger/editor_profiler.h +++ b/editor/debugger/editor_profiler.h @@ -73,8 +73,8 @@ public: Vector<Category> categories; - Map<StringName, Category *> category_ptrs; - Map<StringName, Category::Item *> item_ptrs; + HashMap<StringName, Category *> category_ptrs; + HashMap<StringName, Category::Item *> item_ptrs; }; enum DisplayMode { @@ -98,7 +98,7 @@ private: Tree *variables = nullptr; HSplitContainer *h_split = nullptr; - Set<StringName> plot_sigs; + RBSet<StringName> plot_sigs; OptionButton *display_mode = nullptr; OptionButton *display_time = nullptr; diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 90679657ba..44a7aade09 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -742,9 +742,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da bool parsed = false; const String cap = p_msg.substr(0, colon_index); - Map<StringName, Callable>::Element *element = captures.find(cap); + HashMap<StringName, Callable>::Iterator element = captures.find(cap); if (element) { - Callable &c = element->value(); + Callable &c = element->value; ERR_FAIL_COND_MSG(c.is_null(), "Invalid callable registered: " + cap); Variant cmd = p_msg.substr(colon_index + 1), data = p_data; const Variant *args[2] = { &cmd, &data }; @@ -1050,10 +1050,10 @@ int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) { } int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) { - Map<String, int>::Element *E = res_path_cache.find(p_path); + HashMap<String, int>::Iterator E = res_path_cache.find(p_path); if (E) { - return E->get(); + return E->value; } last_path_id++; diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index ad90e63c16..d445fe48d1 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -131,7 +131,7 @@ private: // Each debugger should have it's tree in the future I guess. const Tree *editor_remote_tree = nullptr; - Map<int, String> profiler_signature; + HashMap<int, String> profiler_signature; Tree *vmem_tree = nullptr; Button *vmem_refresh = nullptr; @@ -147,7 +147,7 @@ private: HashMap<NodePath, int> node_path_cache; int last_path_id; - Map<String, int> res_path_cache; + HashMap<String, int> res_path_cache; EditorProfiler *profiler = nullptr; EditorVisualProfiler *visual_profiler = nullptr; @@ -163,9 +163,9 @@ private: EditorDebuggerNode::CameraOverride camera_override; - Map<Ref<Script>, EditorDebuggerPlugin *> debugger_plugins; + HashMap<Ref<Script>, EditorDebuggerPlugin *> debugger_plugins; - Map<StringName, Callable> captures; + HashMap<StringName, Callable> captures; void _stack_dump_frame_selected(); diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index 54655f53b5..5b5e0203a3 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -40,7 +40,7 @@ #include "scene/gui/margin_container.h" void DependencyEditor::_searched(const String &p_path) { - Map<String, String> dep_rename; + HashMap<String, String> dep_rename; dep_rename[replacing] = p_path; ResourceLoader::rename_dependencies(editing, dep_rename); @@ -64,7 +64,7 @@ void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) { search->popup_file_dialog(); } -void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates) { +void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, HashMap<String, HashMap<String, String>> &candidates) { for (int i = 0; i < efsd->get_subdir_count(); i++) { _fix_and_find(efsd->get_subdir(i), candidates); } @@ -121,12 +121,12 @@ void DependencyEditor::_fix_all() { return; } - Map<String, Map<String, String>> candidates; + HashMap<String, HashMap<String, String>> candidates; for (const String &E : missing) { String base = E.get_file(); if (!candidates.has(base)) { - candidates[base] = Map<String, String>(); + candidates[base] = HashMap<String, String>(); } candidates[base][E] = ""; @@ -134,9 +134,9 @@ void DependencyEditor::_fix_all() { _fix_and_find(EditorFileSystem::get_singleton()->get_filesystem(), candidates); - Map<String, String> remaps; + HashMap<String, String> remaps; - for (KeyValue<String, Map<String, String>> &E : candidates) { + for (KeyValue<String, HashMap<String, String>> &E : candidates) { for (const KeyValue<String, String> &F : E.value) { if (!F.value.is_empty()) { remaps[F.key] = F.value; @@ -414,7 +414,7 @@ void DependencyRemoveDialog::_build_removed_dependency_tree(const Vector<Removed owners->clear(); owners->create_item(); // root - Map<String, TreeItem *> tree_items; + HashMap<String, TreeItem *> tree_items; for (int i = 0; i < p_removed.size(); i++) { RemovedDependency rd = p_removed[i]; diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h index ea86f98193..585143fe0a 100644 --- a/editor/dependency_editor.h +++ b/editor/dependency_editor.h @@ -51,7 +51,7 @@ class DependencyEditor : public AcceptDialog { String editing; List<String> missing; - void _fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates); + void _fix_and_find(EditorFileSystemDirectory *efsd, HashMap<String, HashMap<String, String>> &candidates); void _searched(const String &p_path); void _load_pressed(Object *p_item, int p_cell, int p_button); @@ -98,7 +98,7 @@ class DependencyRemoveDialog : public ConfirmationDialog { Label *text = nullptr; Tree *owners = nullptr; - Map<String, String> all_remove_files; + HashMap<String, String> all_remove_files; Vector<String> dirs_to_delete; Vector<String> files_to_delete; diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index 16cbc0f34d..65216d7664 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -331,7 +331,7 @@ void DocTools::generate(bool p_basic_types) { bool skip_setter_getter_methods = true; while (classes.size()) { - Set<StringName> setters_getters; + RBSet<StringName> setters_getters; String name = classes.front()->get(); if (!ClassDB::is_class_exposed(name)) { @@ -1337,7 +1337,7 @@ static void _write_method_doc(Ref<FileAccess> f, const String &p_name, Vector<Do } } -Error DocTools::save_classes(const String &p_default_path, const Map<String, String> &p_class_path) { +Error DocTools::save_classes(const String &p_default_path, const HashMap<String, String> &p_class_path) { for (KeyValue<String, DocData::ClassDoc> &E : class_list) { DocData::ClassDoc &c = E.value; diff --git a/editor/doc_tools.h b/editor/doc_tools.h index 6c3a93de59..843cdf87a6 100644 --- a/editor/doc_tools.h +++ b/editor/doc_tools.h @@ -36,7 +36,7 @@ class DocTools { public: String version; - Map<String, DocData::ClassDoc> class_list; + HashMap<String, DocData::ClassDoc> class_list; static Error erase_classes(const String &p_dir); @@ -47,7 +47,7 @@ public: bool has_doc(const String &p_class_name); void generate(bool p_basic_types = false); Error load_classes(const String &p_dir); - Error save_classes(const String &p_default_path, const Map<String, String> &p_class_path); + Error save_classes(const String &p_default_path, const HashMap<String, String> &p_class_path); Error _load(Ref<XMLParser> parser); Error load_compressed(const uint8_t *p_data, int p_compressed_size, int p_uncompressed_size); diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index cd5a4f16e4..8e2aa3b35c 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -196,6 +196,7 @@ EditorAbout::EditorAbout() { // License _license_text = memnew(RichTextLabel); + _license_text->set_threaded(true); _license_text->set_name(TTR("License")); _license_text->set_h_size_flags(Control::SIZE_EXPAND_FILL); _license_text->set_v_size_flags(Control::SIZE_EXPAND_FILL); @@ -272,6 +273,7 @@ EditorAbout::EditorAbout() { tpl_hbc->add_child(_tpl_tree); _tpl_text = memnew(RichTextLabel); + _tpl_text->set_threaded(true); _tpl_text->set_h_size_flags(Control::SIZE_EXPAND_FILL); _tpl_text->set_v_size_flags(Control::SIZE_EXPAND_FILL); tpl_hbc->add_child(_tpl_text); diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index f60dcade82..b696bc3ac6 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -62,7 +62,7 @@ void EditorAssetInstaller::_check_propagated_to_item(Object *p_obj, int column) void EditorAssetInstaller::open(const String &p_path, int p_depth) { package_path = p_path; - Set<String> files_sorted; + RBSet<String> files_sorted; Ref<FileAccess> io_fa; zlib_filefunc_def io = zipio_create_io(&io_fa); @@ -87,7 +87,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { ret = unzGoToNextFile(pkg); } - Map<String, Ref<Texture2D>> extension_guess; + HashMap<String, Ref<Texture2D>> extension_guess; { extension_guess["bmp"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons")); extension_guess["dds"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons")); @@ -150,12 +150,12 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { root->set_icon(0, tree->get_theme_icon(SNAME("folder"), SNAME("FileDialog"))); root->set_text(0, "res://"); root->set_editable(0, true); - Map<String, TreeItem *> dir_map; + HashMap<String, TreeItem *> dir_map; int num_file_conflicts = 0; - for (Set<String>::Element *E = files_sorted.front(); E; E = E->next()) { - String path = E->get(); + for (const String &E : files_sorted) { + String path = E; int depth = p_depth; bool skip = false; while (depth > 0) { @@ -224,7 +224,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { ti->set_metadata(0, res_path); } - status_map[E->get()] = ti; + status_map[E] = ti; } if (num_file_conflicts >= 1) { diff --git a/editor/editor_asset_installer.h b/editor/editor_asset_installer.h index deb320e7fa..c44f4c5d22 100644 --- a/editor/editor_asset_installer.h +++ b/editor/editor_asset_installer.h @@ -41,7 +41,7 @@ class EditorAssetInstaller : public ConfirmationDialog { String package_path; String asset_name; AcceptDialog *error = nullptr; - Map<String, TreeItem *> status_map; + HashMap<String, TreeItem *> status_map; bool updating = false; void _item_edited(); void _check_propagated_to_item(Object *p_obj, int column); diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 3b38ff9163..4c73e36269 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -428,7 +428,7 @@ void EditorAutoloadSettings::update_autoload() { updating_autoload = true; - Map<String, AutoloadInfo> to_remove; + HashMap<String, AutoloadInfo> to_remove; List<AutoloadInfo *> to_add; for (const AutoloadInfo &info : autoload_cache) { diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp index bb82da6666..e3cbd8ad50 100644 --- a/editor/editor_command_palette.cpp +++ b/editor/editor_command_palette.cpp @@ -59,7 +59,7 @@ float EditorCommandPalette::_score_path(const String &p_search, const String &p_ void EditorCommandPalette::_update_command_search(const String &search_text) { ERR_FAIL_COND(commands.size() == 0); - Map<String, TreeItem *> sections; + HashMap<String, TreeItem *> sections; TreeItem *first_section = nullptr; // Filter possible candidates. diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index f770af8100..0bb48db09e 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -468,12 +468,12 @@ Variant EditorData::instance_custom_type(const String &p_type, const String &p_i } void EditorData::remove_custom_type(const String &p_type) { - for (Map<String, Vector<CustomType>>::Element *E = custom_types.front(); E; E = E->next()) { - for (int i = 0; i < E->get().size(); i++) { - if (E->get()[i].name == p_type) { - E->get().remove_at(i); - if (E->get().is_empty()) { - custom_types.erase(E->key()); + for (KeyValue<String, Vector<CustomType>> &E : custom_types) { + for (int i = 0; i < E.value.size(); i++) { + if (E.value[i].name == p_type) { + E.value.remove_at(i); + if (E.value.is_empty()) { + custom_types.erase(E.key); } return; } @@ -549,7 +549,7 @@ void EditorData::remove_scene(int p_idx) { edited_scene.remove_at(p_idx); } -bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set<String> &checked_paths) { +bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, RBSet<String> &checked_paths) { Ref<SceneState> ss; if (p_node == p_root) { @@ -587,7 +587,7 @@ bool EditorData::check_and_update_scene(int p_idx) { return false; } - Set<String> checked_scenes; + RBSet<String> checked_scenes; bool must_reload = _find_updated_instances(edited_scene[p_idx].root, edited_scene[p_idx].root, checked_scenes); @@ -1154,7 +1154,7 @@ List<Node *> EditorSelection::get_full_selected_node_list() { void EditorSelection::clear() { while (!selection.is_empty()) { - remove_node(selection.front()->key()); + remove_node(selection.begin()->key); } changed = true; diff --git a/editor/editor_data.h b/editor/editor_data.h index 1e9b8af490..b9eb199c37 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -129,17 +129,17 @@ private: String name; Variant value; }; - Map<String, Vector<CustomType>> custom_types; + HashMap<String, Vector<CustomType>> custom_types; List<PropertyData> clipboard; UndoRedo undo_redo; Vector<Callable> undo_redo_callbacks; - Map<StringName, Callable> move_element_functions; + HashMap<StringName, Callable> move_element_functions; Vector<EditedScene> edited_scene; int current_edited_scene; - bool _find_updated_instances(Node *p_root, Node *p_node, Set<String> &checked_paths); + bool _find_updated_instances(Node *p_root, Node *p_node, RBSet<String> &checked_paths); HashMap<StringName, String> _script_class_icon_paths; HashMap<String, StringName> _script_class_file_to_path; @@ -181,7 +181,7 @@ public: void add_custom_type(const String &p_type, const String &p_inherits, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon); Variant instance_custom_type(const String &p_type, const String &p_inherits); void remove_custom_type(const String &p_type); - const Map<String, Vector<CustomType>> &get_custom_types() const { return custom_types; } + const HashMap<String, Vector<CustomType>> &get_custom_types() const { return custom_types; } void instantiate_object_properties(Object *p_object); @@ -247,7 +247,7 @@ class EditorSelection : public Object { // Contains the selected nodes and corresponding metadata. // Metadata objects come from calling _get_editor_data on the editor_plugins, passing the selected node. - Map<Node *, Object *> selection; + HashMap<Node *, Object *> selection; // Tracks whether the selection change signal has been emitted. // Prevents multiple signals being called in one frame. @@ -296,7 +296,7 @@ public: // Returns all the selected nodes (list version of "get_selected_nodes"). List<Node *> get_full_selected_node_list(); // Returns the map of selected objects and their metadata. - Map<Node *, Object *> &get_selection() { return selection; } + HashMap<Node *, Object *> &get_selection() { return selection; } EditorSelection(); ~EditorSelection(); diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h index 9baa37793b..60abfeb66f 100644 --- a/editor/editor_dir_dialog.h +++ b/editor/editor_dir_dialog.h @@ -44,7 +44,7 @@ class EditorDirDialog : public ConfirmationDialog { AcceptDialog *mkdirerr = nullptr; Button *makedir = nullptr; - Set<String> opened_paths; + RBSet<String> opened_paths; Tree *tree = nullptr; bool updating = false; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index ef99425f68..586ffa418c 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -95,9 +95,9 @@ Ref<EditorExportPlatform> EditorExportPreset::get_platform() const { void EditorExportPreset::update_files_to_export() { Vector<String> to_remove; - for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) { - if (!FileAccess::exists(E->get())) { - to_remove.push_back(E->get()); + for (const String &E : selected_files) { + if (!FileAccess::exists(E)) { + to_remove.push_back(E); } } for (int i = 0; i < to_remove.size(); ++i) { @@ -107,8 +107,8 @@ void EditorExportPreset::update_files_to_export() { Vector<String> EditorExportPreset::get_files_to_export() const { Vector<String> files; - for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) { - files.push_back(E->get()); + for (const String &E : selected_files) { + files.push_back(E); } return files; } @@ -446,7 +446,7 @@ Ref<EditorExportPreset> EditorExportPlatform::create_preset() { return preset; } -void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_dir, Set<String> &p_paths) { +void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_dir, RBSet<String> &p_paths) { for (int i = 0; i < p_dir->get_subdir_count(); i++) { _export_find_resources(p_dir->get_subdir(i), p_paths); } @@ -459,7 +459,7 @@ void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_d } } -void EditorExportPlatform::_export_find_dependencies(const String &p_path, Set<String> &p_paths) { +void EditorExportPlatform::_export_find_dependencies(const String &p_path, RBSet<String> &p_paths) { if (p_paths.has(p_path)) { return; } @@ -480,7 +480,7 @@ void EditorExportPlatform::_export_find_dependencies(const String &p_path, Set<S } } -void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, Set<String> &r_list, bool exclude) { +void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, RBSet<String> &r_list, bool exclude) { da->list_dir_begin(); String cur_dir = da->get_current_dir().replace("\\", "/"); if (!cur_dir.ends_with("/")) { @@ -528,7 +528,7 @@ void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vec } } -void EditorExportPlatform::_edit_filter_list(Set<String> &r_list, const String &p_filter, bool exclude) { +void EditorExportPlatform::_edit_filter_list(RBSet<String> &r_list, const String &p_filter, bool exclude) { if (p_filter.is_empty()) { return; } @@ -648,10 +648,10 @@ void EditorExportPlugin::_export_end_script() { GDVIRTUAL_CALL(_export_end); } -void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) { +void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) { } -void EditorExportPlugin::_export_begin(const Set<String> &p_features, bool p_debug, const String &p_path, int p_flags) { +void EditorExportPlugin::_export_begin(const RBSet<String> &p_features, bool p_debug, const String &p_path, int p_flags) { } void EditorExportPlugin::skip() { @@ -739,7 +739,7 @@ EditorExportPlatform::ExportNotifier::~ExportNotifier() { Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &p_preset, bool p_debug, EditorExportSaveFunction p_func, void *p_udata, EditorExportSaveSharedObject p_so_func) { //figure out paths of files that will be exported - Set<String> paths; + RBSet<String> paths; Vector<String> path_remaps; if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_ALL_RESOURCES) { @@ -872,15 +872,15 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> & } FeatureContainers feature_containers = get_feature_containers(p_preset, p_debug); - Set<String> &features = feature_containers.features; + RBSet<String> &features = feature_containers.features; Vector<String> &features_pv = feature_containers.features_pv; //store everything in the export medium int idx = 0; int total = paths.size(); - for (Set<String>::Element *E = paths.front(); E; E = E->next()) { - String path = E->get(); + for (const String &E : paths) { + String path = E; String type = ResourceLoader::get_resource_type(path); if (FileAccess::exists(path + ".import")) { @@ -910,7 +910,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> & List<String> remaps; config->get_section_keys("remap", &remaps); - Set<String> remap_features; + RBSet<String> remap_features; for (const String &F : remaps) { String remap = F; @@ -1669,7 +1669,7 @@ void EditorExport::load_config() { } void EditorExport::update_export_presets() { - Map<StringName, List<EditorExportPlatform::ExportOption>> platform_options; + HashMap<StringName, List<EditorExportPlatform::ExportOption>> platform_options; for (int i = 0; i < export_platforms.size(); i++) { Ref<EditorExportPlatform> platform = export_platforms[i]; @@ -1691,7 +1691,7 @@ void EditorExport::update_export_presets() { List<EditorExportPlatform::ExportOption> options = platform_options[preset->get_platform()->get_name()]; // Copy the previous preset values - Map<StringName, Variant> previous_values = preset->values; + HashMap<StringName, Variant> previous_values = preset->values; // Clear the preset properties and values prior to reloading preset->properties.clear(); @@ -1934,7 +1934,7 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) { r_features->push_back(get_os_name().to_lower()); //OS name is a feature } -void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) { +void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) { if (p_features.has("bptc")) { if (p_preset->has("texture_format/no_bptc_fallbacks")) { p_features.erase("s3tc"); @@ -1952,7 +1952,7 @@ void EditorExportPlatformPC::set_chmod_flags(int p_flags) { /////////////////////// -void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) { +void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) { String extension = p_path.get_extension().to_lower(); if (extension != "tres" && extension != "tscn") { return; diff --git a/editor/editor_export.h b/editor/editor_export.h index 1aca140e79..3b8ff0f686 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -66,14 +66,14 @@ private: String export_path; String exporter; - Set<String> selected_files; + RBSet<String> selected_files; bool runnable = false; friend class EditorExport; friend class EditorExportPlatform; List<PropertyInfo> properties; - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; String name; @@ -196,19 +196,19 @@ private: }; struct FeatureContainers { - Set<String> features; + RBSet<String> features; Vector<String> features_pv; }; - void _export_find_resources(EditorFileSystemDirectory *p_dir, Set<String> &p_paths); - void _export_find_dependencies(const String &p_path, Set<String> &p_paths); + void _export_find_resources(EditorFileSystemDirectory *p_dir, RBSet<String> &p_paths); + void _export_find_dependencies(const String &p_path, RBSet<String> &p_paths); void gen_debug_flags(Vector<String> &r_flags, int p_flags); static Error _save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key); static Error _save_zip_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key); - void _edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, Set<String> &r_list, bool exclude); - void _edit_filter_list(Set<String> &r_list, const String &p_filter, bool exclude); + void _edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, RBSet<String> &r_list, bool exclude); + void _edit_filter_list(RBSet<String> &r_list, const String &p_filter, bool exclude); static Error _add_shared_object(void *p_userdata, const SharedObject &p_so); @@ -242,7 +242,7 @@ public: virtual void get_export_options(List<ExportOption> *r_options) = 0; virtual bool should_update_export_options() { return false; } - virtual bool get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { return true; } + virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } virtual String get_os_name() const = 0; virtual String get_name() const = 0; @@ -279,7 +279,7 @@ public: virtual Error export_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0); virtual Error export_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0); virtual void get_platform_features(List<String> *r_features) = 0; - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) = 0; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) = 0; virtual String get_debug_protocol() const { return "tcp://"; } EditorExportPlatform(); @@ -349,8 +349,8 @@ protected: void skip(); - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features); - virtual void _export_begin(const Set<String> &p_features, bool p_debug, const String &p_path, int p_flags); + virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features); + virtual void _export_begin(const RBSet<String> &p_features, bool p_debug, const String &p_path, int p_flags); static void _bind_methods(); @@ -454,7 +454,7 @@ public: void add_platform_feature(const String &p_feature); virtual void get_platform_features(List<String> *r_features) override; - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override; int get_chmod_flags() const; void set_chmod_flags(int p_flags); @@ -468,7 +468,7 @@ class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin { GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin); public: - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features) override; + virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) override; EditorExportTextSceneToBinaryPlugin(); }; diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp index a20f112b2a..670f193326 100644 --- a/editor/editor_feature_profile.cpp +++ b/editor/editor_feature_profile.cpp @@ -101,7 +101,7 @@ bool EditorFeatureProfile::is_class_editor_disabled(const StringName &p_class) c void EditorFeatureProfile::set_disable_class_property(const StringName &p_class, const StringName &p_property, bool p_disabled) { if (p_disabled) { if (!disabled_properties.has(p_class)) { - disabled_properties[p_class] = Set<StringName>(); + disabled_properties[p_class] = RBSet<StringName>(); } disabled_properties[p_class].insert(p_property); @@ -166,24 +166,24 @@ Error EditorFeatureProfile::save_to_file(const String &p_path) { Dictionary data; data["type"] = "feature_profile"; Array dis_classes; - for (Set<StringName>::Element *E = disabled_classes.front(); E; E = E->next()) { - dis_classes.push_back(String(E->get())); + for (const StringName &E : disabled_classes) { + dis_classes.push_back(String(E)); } dis_classes.sort(); data["disabled_classes"] = dis_classes; Array dis_editors; - for (Set<StringName>::Element *E = disabled_editors.front(); E; E = E->next()) { - dis_editors.push_back(String(E->get())); + for (const StringName &E : disabled_editors) { + dis_editors.push_back(String(E)); } dis_editors.sort(); data["disabled_editors"] = dis_editors; Array dis_props; - for (KeyValue<StringName, Set<StringName>> &E : disabled_properties) { - for (Set<StringName>::Element *F = E.value.front(); F; F = F->next()) { - dis_props.push_back(String(E.key) + ":" + String(F->get())); + for (KeyValue<StringName, RBSet<StringName>> &E : disabled_properties) { + for (const StringName &F : E.value) { + dis_props.push_back(String(E.key) + ":" + String(F)); } } @@ -556,9 +556,9 @@ void EditorFeatureProfileManager::_class_list_item_selected() { String class_description; DocTools *dd = EditorHelp::get_doc_data(); - Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_name); + HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(class_name); if (E) { - class_description = DTR(E->get().brief_description); + class_description = DTR(E->value.brief_description); } description_bit->set_text(class_description); diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h index 19df8a9686..479baf5205 100644 --- a/editor/editor_feature_profile.h +++ b/editor/editor_feature_profile.h @@ -56,11 +56,11 @@ public: }; private: - Set<StringName> disabled_classes; - Set<StringName> disabled_editors; - Map<StringName, Set<StringName>> disabled_properties; + RBSet<StringName> disabled_classes; + RBSet<StringName> disabled_editors; + HashMap<StringName, RBSet<StringName>> disabled_properties; - Set<StringName> collapsed_classes; + RBSet<StringName> collapsed_classes; bool features_disabled[FEATURE_MAX]; static const char *feature_names[FEATURE_MAX]; diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 099dfe69d5..e37bfa32bc 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -514,7 +514,7 @@ bool EditorFileSystem::_scan_import_support(Vector<String> reimports) { if (import_support_queries.size() == 0) { return false; } - Map<String, int> import_support_test; + HashMap<String, int> import_support_test; Vector<bool> import_support_tested; import_support_tested.resize(import_support_queries.size()); for (int i = 0; i < import_support_queries.size(); i++) { @@ -532,9 +532,9 @@ bool EditorFileSystem::_scan_import_support(Vector<String> reimports) { } for (int i = 0; i < reimports.size(); i++) { - Map<String, int>::Element *E = import_support_test.find(reimports[i].get_extension()); + HashMap<String, int>::Iterator E = import_support_test.find(reimports[i].get_extension()); if (E) { - import_support_tested.write[E->get()] = true; + import_support_tested.write[E->value] = true; } } @@ -1458,8 +1458,8 @@ void EditorFileSystem::_save_late_updated_files() { String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_update4"); Ref<FileAccess> f = FileAccess::open(fscache, FileAccess::WRITE); ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file '" + fscache + "'. Check user write permissions."); - for (Set<String>::Element *E = late_update_files.front(); E; E = E->next()) { - f->store_line(E->get()); + for (const String &E : late_update_files) { + f->store_line(E); } } @@ -1636,15 +1636,15 @@ void EditorFileSystem::update_file(const String &p_file) { _queue_update_script_classes(); } -Set<String> EditorFileSystem::get_valid_extensions() const { +RBSet<String> EditorFileSystem::get_valid_extensions() const { return valid_extensions; } Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector<String> &p_files) { String importer_name; - Map<String, Map<StringName, Variant>> source_file_options; - Map<String, String> base_paths; + HashMap<String, HashMap<StringName, Variant>> source_file_options; + HashMap<String, String> base_paths; for (int i = 0; i < p_files.size(); i++) { Ref<ConfigFile> config; config.instantiate(); @@ -1659,7 +1659,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector ERR_FAIL_V(ERR_FILE_CORRUPT); } - source_file_options[p_files[i]] = Map<StringName, Variant>(); + source_file_options[p_files[i]] = HashMap<StringName, Variant>(); importer_name = file_importer_name; if (importer_name == "keep") { @@ -1699,7 +1699,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector Error err = importer->import_group_file(p_group_file, source_file_options, base_paths); //all went well, overwrite config files with proper remaps and md5s - for (const KeyValue<String, Map<StringName, Variant>> &E : source_file_options) { + for (const KeyValue<String, HashMap<StringName, Variant>> &E : source_file_options) { const String &file = E.key; String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file); Vector<String> dest_paths; @@ -1808,7 +1808,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector return err; } -void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName, Variant> *p_custom_options, const String &p_custom_importer) { +void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<StringName, Variant> *p_custom_options, const String &p_custom_importer) { EditorFileSystemDirectory *fs = nullptr; int cpos = -1; bool found = _find_file(p_file, &fs, cpos); @@ -1816,7 +1816,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName //try to obtain existing params - Map<StringName, Variant> params; + HashMap<StringName, Variant> params; String importer_name; //empty by default though if (!p_custom_importer.is_empty()) { @@ -2047,7 +2047,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName EditorResourcePreview::get_singleton()->check_for_invalidation(p_file); } -void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport) { +void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, RBSet<String> &groups_to_reimport) { int fc = efd->files.size(); const EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptr(); for (int i = 0; i < fc; i++) { @@ -2064,7 +2064,7 @@ void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<Str } } -void EditorFileSystem::reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const Map<StringName, Variant> &p_custom_params) { +void EditorFileSystem::reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const HashMap<StringName, Variant> &p_custom_params) { _reimport_file(p_file, &p_custom_params, p_importer); } @@ -2079,7 +2079,7 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { Vector<ImportFile> reimport_files; - Set<String> groups_to_reimport; + RBSet<String> groups_to_reimport; for (int i = 0; i < p_files.size(); i++) { String file = p_files[i]; @@ -2165,7 +2165,7 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { //reimport groups if (groups_to_reimport.size()) { - Map<String, Vector<String>> group_files; + HashMap<String, Vector<String>> group_files; _find_group_files(filesystem, group_files, groups_to_reimport); for (const KeyValue<String, Vector<String>> &E : group_files) { Error err = _reimport_group(E.key, E.value); @@ -2290,7 +2290,7 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const } } -static void _scan_extensions_dir(EditorFileSystemDirectory *d, Set<String> &extensions) { +static void _scan_extensions_dir(EditorFileSystemDirectory *d, RBSet<String> &extensions) { int fc = d->get_file_count(); for (int i = 0; i < fc; i++) { if (d->get_file_type(i) == SNAME("NativeExtension")) { @@ -2304,7 +2304,7 @@ static void _scan_extensions_dir(EditorFileSystemDirectory *d, Set<String> &exte } bool EditorFileSystem::_scan_extensions() { EditorFileSystemDirectory *d = get_filesystem(); - Set<String> extensions; + RBSet<String> extensions; _scan_extensions_dir(d, extensions); @@ -2372,6 +2372,7 @@ void EditorFileSystem::_bind_methods() { ClassDB::bind_method(D_METHOD("get_filesystem_path", "path"), &EditorFileSystem::get_filesystem_path); ClassDB::bind_method(D_METHOD("get_file_type", "path"), &EditorFileSystem::get_file_type); ClassDB::bind_method(D_METHOD("update_script_classes"), &EditorFileSystem::update_script_classes); + ClassDB::bind_method(D_METHOD("reimport_files", "files"), &EditorFileSystem::reimport_files); ADD_SIGNAL(MethodInfo("filesystem_changed")); ADD_SIGNAL(MethodInfo("sources_changed", PropertyInfo(Variant::BOOL, "exist"))); diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index 81811d2eb0..743684a9ca 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -34,8 +34,8 @@ #include "core/io/dir_access.h" #include "core/os/thread.h" #include "core/os/thread_safe.h" +#include "core/templates/rb_set.h" #include "core/templates/safe_refcount.h" -#include "core/templates/set.h" #include "core/templates/thread_work_pool.h" #include "scene/main/node.h" @@ -180,7 +180,7 @@ class EditorFileSystem : public Node { void _scan_filesystem(); - Set<String> late_update_files; + RBSet<String> late_update_files; void _save_late_updated_files(); @@ -221,9 +221,9 @@ class EditorFileSystem : public Node { void _delete_internal_files(String p_file); - Set<String> textfile_extensions; - Set<String> valid_extensions; - Set<String> import_extensions; + RBSet<String> textfile_extensions; + RBSet<String> valid_extensions; + RBSet<String> import_extensions; void _scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAccess> &da, const ScanProgress &p_progress); @@ -240,7 +240,7 @@ class EditorFileSystem : public Node { void _update_extensions(); - void _reimport_file(const String &p_file, const Map<StringName, Variant> *p_custom_options = nullptr, const String &p_custom_importer = String()); + void _reimport_file(const String &p_file, const HashMap<StringName, Variant> *p_custom_options = nullptr, const String &p_custom_importer = String()); Error _reimport_group(const String &p_group_file, const Vector<String> &p_files); bool _test_for_reimport(const String &p_path, bool p_only_imported_files); @@ -269,11 +269,11 @@ class EditorFileSystem : public Node { bool using_fat32_or_exfat; // Workaround for projects in FAT32 or exFAT filesystem (pendrives, most of the time) - void _find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport); + void _find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, RBSet<String> &groups_to_reimport); void _move_group_files(EditorFileSystemDirectory *efd, const String &p_group_file, const String &p_new_location); - Set<String> group_file_cache; + RBSet<String> group_file_cache; ThreadWorkPool import_threads; @@ -306,7 +306,7 @@ public: void scan(); void scan_changes(); void update_file(const String &p_file); - Set<String> get_valid_extensions() const; + RBSet<String> get_valid_extensions() const; EditorFileSystemDirectory *get_filesystem_path(const String &p_path); String get_file_type(const String &p_file) const; @@ -314,7 +314,7 @@ public: void reimport_files(const Vector<String> &p_files); - void reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const Map<StringName, Variant> &p_custom_params); + void reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const HashMap<StringName, Variant> &p_custom_params); void update_script_classes(); diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 76c7023b46..ad8aaf324c 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -40,8 +40,8 @@ Vector<String> EditorFolding::_get_unfolds(const Object *p_object) { if (sections.size()) { String *w = sections.ptrw(); int idx = 0; - for (const Set<String>::Element *E = p_object->editor_get_section_folding().front(); E; E = E->next()) { - w[idx++] = E->get(); + for (const String &E : p_object->editor_get_section_folding()) { + w[idx++] = E; } } @@ -87,7 +87,7 @@ void EditorFolding::load_resource_folding(Ref<Resource> p_resource, const String _set_unfolds(p_resource.ptr(), unfolds); } -void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, Set<Ref<Resource>> &resources) { +void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, RBSet<Ref<Resource>> &resources) { if (p_root != p_node) { if (!p_node->get_owner()) { return; //not owned, bye @@ -140,7 +140,7 @@ void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path config.instantiate(); Array unfolds, res_unfolds; - Set<Ref<Resource>> resources; + RBSet<Ref<Resource>> resources; Array nodes_folded; _fill_folds(p_scene, p_scene, unfolds, res_unfolds, nodes_folded, resources); @@ -220,13 +220,13 @@ bool EditorFolding::has_folding_data(const String &p_path) { return FileAccess::exists(file); } -void EditorFolding::_do_object_unfolds(Object *p_object, Set<Ref<Resource>> &resources) { +void EditorFolding::_do_object_unfolds(Object *p_object, RBSet<Ref<Resource>> &resources) { List<PropertyInfo> plist; p_object->get_property_list(&plist); String group_base; String group; - Set<String> unfold_group; + RBSet<String> unfold_group; for (const PropertyInfo &E : plist) { if (E.usage & PROPERTY_USAGE_CATEGORY) { @@ -270,12 +270,12 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<Ref<Resource>> &res } } - for (Set<String>::Element *E = unfold_group.front(); E; E = E->next()) { - p_object->editor_set_section_unfold(E->get(), true); + for (const String &E : unfold_group) { + p_object->editor_set_section_unfold(E, true); } } -void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, Set<Ref<Resource>> &resources) { +void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, RBSet<Ref<Resource>> &resources) { if (p_root != p_node) { if (!p_node->get_owner()) { return; //not owned, bye @@ -293,7 +293,7 @@ void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, Set<Ref<Resourc } void EditorFolding::unfold_scene(Node *p_scene) { - Set<Ref<Resource>> resources; + RBSet<Ref<Resource>> resources; _do_node_unfolds(p_scene, p_scene, resources); } diff --git a/editor/editor_folding.h b/editor/editor_folding.h index 86f4643ed8..22df06280a 100644 --- a/editor/editor_folding.h +++ b/editor/editor_folding.h @@ -37,10 +37,10 @@ class EditorFolding { Vector<String> _get_unfolds(const Object *p_object); void _set_unfolds(Object *p_object, const Vector<String> &p_unfolds); - void _fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, Set<Ref<Resource>> &resources); + void _fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, RBSet<Ref<Resource>> &resources); - void _do_object_unfolds(Object *p_object, Set<Ref<Resource>> &resources); - void _do_node_unfolds(Node *p_root, Node *p_node, Set<Ref<Resource>> &resources); + void _do_object_unfolds(Object *p_object, RBSet<Ref<Resource>> &resources); + void _do_node_unfolds(Node *p_root, Node *p_node, RBSet<Ref<Resource>> &resources); public: void save_resource_folding(const Ref<Resource> &p_resource, const String &p_path); diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp index 3e18499b97..51d4d474c5 100644 --- a/editor/editor_fonts.cpp +++ b/editor/editor_fonts.cpp @@ -110,6 +110,32 @@ m_name->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE); \ MAKE_FALLBACKS(m_name); +#define MAKE_DEFAULT_FONT_MSDF(m_name, m_variations) \ + Ref<Font> m_name; \ + m_name.instantiate(); \ + if (CustomFont.is_valid()) { \ + m_name->add_data(CustomFontMSDF); \ + m_name->add_data(DefaultFontMSDF); \ + } else { \ + m_name->add_data(DefaultFontMSDF); \ + } \ + { \ + Dictionary variations; \ + if (!m_variations.is_empty()) { \ + Vector<String> variation_tags = m_variations.split(","); \ + for (int i = 0; i < variation_tags.size(); i++) { \ + Vector<String> tokens = variation_tags[i].split("="); \ + if (tokens.size() == 2) { \ + variations[tokens[0]] = tokens[1].to_float(); \ + } \ + } \ + } \ + m_name->set_variation_coordinates(variations); \ + } \ + m_name->set_spacing(TextServer::SPACING_TOP, -EDSCALE); \ + m_name->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE); \ + MAKE_FALLBACKS(m_name); + #define MAKE_SLANTED_FONT(m_name, m_variations) \ Ref<Font> m_name; \ m_name.instantiate(); \ @@ -163,6 +189,32 @@ m_name->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE); \ MAKE_FALLBACKS_BOLD(m_name); +#define MAKE_BOLD_FONT_MSDF(m_name, m_variations) \ + Ref<Font> m_name; \ + m_name.instantiate(); \ + if (CustomFontBold.is_valid()) { \ + m_name->add_data(CustomFontBoldMSDF); \ + m_name->add_data(DefaultFontBoldMSDF); \ + } else { \ + m_name->add_data(DefaultFontBoldMSDF); \ + } \ + { \ + Dictionary variations; \ + if (!m_variations.is_empty()) { \ + Vector<String> variation_tags = m_variations.split(","); \ + for (int i = 0; i < variation_tags.size(); i++) { \ + Vector<String> tokens = variation_tags[i].split("="); \ + if (tokens.size() == 2) { \ + variations[tokens[0]] = tokens[1].to_float(); \ + } \ + } \ + } \ + m_name->set_variation_coordinates(variations); \ + } \ + m_name->set_spacing(TextServer::SPACING_TOP, -EDSCALE); \ + m_name->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE); \ + MAKE_FALLBACKS_BOLD(m_name); + #define MAKE_SOURCE_FONT(m_name, m_variations) \ Ref<Font> m_name; \ m_name.instantiate(); \ @@ -189,13 +241,14 @@ m_name->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE); \ MAKE_FALLBACKS(m_name); -Ref<FontData> load_cached_external_font(const String &p_path, TextServer::Hinting p_hinting, bool p_aa, bool p_autohint, TextServer::SubpixelPositioning p_font_subpixel_positioning) { +Ref<FontData> load_cached_external_font(const String &p_path, TextServer::Hinting p_hinting, bool p_aa, bool p_autohint, TextServer::SubpixelPositioning p_font_subpixel_positioning, bool p_msdf = false) { Ref<FontData> font; font.instantiate(); Vector<uint8_t> data = FileAccess::get_file_as_array(p_path); font->set_data(data); + font->set_multichannel_signed_distance_field(p_msdf); font->set_antialiased(p_aa); font->set_hinting(p_hinting); font->set_force_autohinter(p_autohint); @@ -204,11 +257,12 @@ Ref<FontData> load_cached_external_font(const String &p_path, TextServer::Hintin return font; } -Ref<FontData> load_cached_internal_font(const uint8_t *p_data, size_t p_size, TextServer::Hinting p_hinting, bool p_aa, bool p_autohint, TextServer::SubpixelPositioning p_font_subpixel_positioning) { +Ref<FontData> load_cached_internal_font(const uint8_t *p_data, size_t p_size, TextServer::Hinting p_hinting, bool p_aa, bool p_autohint, TextServer::SubpixelPositioning p_font_subpixel_positioning, bool p_msdf = false) { Ref<FontData> font; font.instantiate(); font->set_data_ptr(p_data, p_size); + font->set_multichannel_signed_distance_field(p_msdf); font->set_antialiased(p_aa); font->set_hinting(p_hinting); font->set_force_autohinter(p_autohint); @@ -261,6 +315,13 @@ void editor_register_fonts(Ref<Theme> p_theme) { EditorSettings::get_singleton()->set_manually("interface/editor/main_font", ""); } + Ref<FontData> CustomFontMSDF; + if (custom_font_path.length() > 0 && dir->file_exists(custom_font_path)) { + CustomFontMSDF = load_cached_external_font(custom_font_path, font_hinting, font_antialiased, true, font_subpixel_positioning, true); + } else { + EditorSettings::get_singleton()->set_manually("interface/editor/main_font", ""); + } + Ref<FontData> CustomFontSlanted; if (CustomFont.is_valid()) { CustomFontSlanted = CustomFont->duplicate(); @@ -282,6 +343,13 @@ void editor_register_fonts(Ref<Theme> p_theme) { CustomFontBold->set_embolden(embolden_strength); } + Ref<FontData> CustomFontBoldMSDF; + if (custom_font_path.length() > 0 && dir->file_exists(custom_font_path)) { + CustomFontBoldMSDF = load_cached_external_font(custom_font_path, font_hinting, font_antialiased, true, font_subpixel_positioning, true); + } else { + EditorSettings::get_singleton()->set_manually("interface/editor/main_font_bold", ""); + } + /* Custom source code font */ String custom_font_path_source = EditorSettings::get_singleton()->get("interface/editor/code_font"); @@ -295,7 +363,9 @@ void editor_register_fonts(Ref<Theme> p_theme) { /* Noto Sans */ Ref<FontData> DefaultFont = load_cached_internal_font(_font_NotoSans_Regular, _font_NotoSans_Regular_size, font_hinting, font_antialiased, true, font_subpixel_positioning); + Ref<FontData> DefaultFontMSDF = load_cached_internal_font(_font_NotoSans_Regular, _font_NotoSans_Regular_size, font_hinting, font_antialiased, true, font_subpixel_positioning, true); Ref<FontData> DefaultFontBold = load_cached_internal_font(_font_NotoSans_Bold, _font_NotoSans_Bold_size, font_hinting, font_antialiased, true, font_subpixel_positioning); + Ref<FontData> DefaultFontBoldMSDF = load_cached_internal_font(_font_NotoSans_Bold, _font_NotoSans_Bold_size, font_hinting, font_antialiased, true, font_subpixel_positioning, true); Ref<FontData> FontArabic = load_cached_internal_font(_font_NotoNaskhArabicUI_Regular, _font_NotoNaskhArabicUI_Regular_size, font_hinting, font_antialiased, true, font_subpixel_positioning); Ref<FontData> FontArabicBold = load_cached_internal_font(_font_NotoNaskhArabicUI_Bold, _font_NotoNaskhArabicUI_Bold_size, font_hinting, font_antialiased, true, font_subpixel_positioning); Ref<FontData> FontBengali = load_cached_internal_font(_font_NotoSansBengaliUI_Regular, _font_NotoSansBengaliUI_Regular_size, font_hinting, font_antialiased, true, font_subpixel_positioning); @@ -347,12 +417,18 @@ void editor_register_fonts(Ref<Theme> p_theme) { p_theme->set_font_size("main_size", "EditorFonts", default_font_size); p_theme->set_font("main", "EditorFonts", df); + MAKE_DEFAULT_FONT_MSDF(df_msdf, String()); + p_theme->set_font("main_msdf", "EditorFonts", df_msdf); + // Bold font MAKE_BOLD_FONT(df_bold, String()); MAKE_SLANTED_FONT(df_italic, String()); p_theme->set_font_size("bold_size", "EditorFonts", default_font_size); p_theme->set_font("bold", "EditorFonts", df_bold); + MAKE_BOLD_FONT_MSDF(df_bold_msdf, String()); + p_theme->set_font("main_bold_msdf", "EditorFonts", df_bold_msdf); + // Title font p_theme->set_font_size("title_size", "EditorFonts", default_font_size + 1 * EDSCALE); p_theme->set_font("title", "EditorFonts", df_bold); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index b24268ade7..d6278a63fe 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -99,7 +99,7 @@ void EditorHelp::_class_desc_select(const String &p_select) { String link = p_select.substr(tag_end + 1, p_select.length()).lstrip(" "); String topic; - Map<String, int> *table = nullptr; + HashMap<String, int> *table = nullptr; if (tag == "method") { topic = "class_method"; @@ -235,7 +235,7 @@ String EditorHelp::_fix_constant(const String &p_constant) const { } void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview) { - method_line[p_method.name] = class_desc->get_line_count() - 2; //gets overridden if description + method_line[p_method.name] = class_desc->get_paragraph_count() - 2; //gets overridden if description const bool is_vararg = p_method.qualifiers.contains("vararg"); @@ -593,8 +593,8 @@ void EditorHelp::_update_doc() { // Class description if (!cd.description.is_empty()) { - section_line.push_back(Pair<String, int>(TTR("Description"), class_desc->get_line_count() - 2)); - description_line = class_desc->get_line_count() - 2; + section_line.push_back(Pair<String, int>(TTR("Description"), class_desc->get_paragraph_count() - 2)); + description_line = class_desc->get_paragraph_count() - 2; class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Description")); @@ -648,7 +648,7 @@ void EditorHelp::_update_doc() { } // Properties overview - Set<String> skip_methods; + RBSet<String> skip_methods; bool property_descr = false; bool has_properties = cd.properties.size() != 0; @@ -664,7 +664,7 @@ void EditorHelp::_update_doc() { } if (has_properties) { - section_line.push_back(Pair<String, int>(TTR("Properties"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Properties"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Properties")); @@ -682,7 +682,7 @@ void EditorHelp::_update_doc() { if (cd.properties[i].name.begins_with("_") && cd.properties[i].description.is_empty()) { continue; } - property_line[cd.properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description + property_line[cd.properties[i].name] = class_desc->get_paragraph_count() - 2; //gets overridden if description // Property type. class_desc->push_cell(); @@ -828,7 +828,7 @@ void EditorHelp::_update_doc() { cd.constructors.sort(); } - section_line.push_back(Pair<String, int>(TTR("Constructors"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Constructors"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Constructors")); @@ -839,7 +839,7 @@ void EditorHelp::_update_doc() { if (sort_methods) { methods.sort(); } - section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Methods")); @@ -851,7 +851,7 @@ void EditorHelp::_update_doc() { cd.operators.sort(); } - section_line.push_back(Pair<String, int>(TTR("Operators"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Operators"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Operators")); @@ -860,7 +860,7 @@ void EditorHelp::_update_doc() { // Theme properties if (!cd.theme_properties.is_empty()) { - section_line.push_back(Pair<String, int>(TTR("Theme Properties"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Theme Properties"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Theme Properties")); @@ -873,7 +873,7 @@ void EditorHelp::_update_doc() { class_desc->push_indent(1); String theme_data_type; - Map<String, String> data_type_names; + HashMap<String, String> data_type_names; data_type_names["color"] = TTR("Colors"); data_type_names["constant"] = TTR("Constants"); data_type_names["font"] = TTR("Fonts"); @@ -882,7 +882,7 @@ void EditorHelp::_update_doc() { data_type_names["style"] = TTR("Styles"); for (int i = 0; i < cd.theme_properties.size(); i++) { - theme_property_line[cd.theme_properties[i].name] = class_desc->get_line_count() - 2; // Gets overridden if description. + theme_property_line[cd.theme_properties[i].name] = class_desc->get_paragraph_count() - 2; // Gets overridden if description. if (theme_data_type != cd.theme_properties[i].data_type) { theme_data_type = cd.theme_properties[i].data_type; @@ -954,7 +954,7 @@ void EditorHelp::_update_doc() { cd.signals.sort(); } - section_line.push_back(Pair<String, int>(TTR("Signals"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Signals"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Signals")); @@ -967,7 +967,7 @@ void EditorHelp::_update_doc() { class_desc->push_indent(1); for (int i = 0; i < cd.signals.size(); i++) { - signal_line[cd.signals[i].name] = class_desc->get_line_count() - 2; // Gets overridden if description. + signal_line[cd.signals[i].name] = class_desc->get_paragraph_count() - 2; // Gets overridden if description. class_desc->push_font(doc_code_font); // monofont class_desc->push_color(headline_color); @@ -1019,7 +1019,7 @@ void EditorHelp::_update_doc() { // Constants and enums if (!cd.constants.is_empty()) { - Map<String, Vector<DocData::ConstantDoc>> enums; + HashMap<String, Vector<DocData::ConstantDoc>> enums; Vector<DocData::ConstantDoc> constants; for (int i = 0; i < cd.constants.size(); i++) { @@ -1040,7 +1040,7 @@ void EditorHelp::_update_doc() { // Enums if (enums.size()) { - section_line.push_back(Pair<String, int>(TTR("Enumerations"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Enumerations"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Enumerations")); @@ -1051,7 +1051,7 @@ void EditorHelp::_update_doc() { class_desc->add_newline(); for (KeyValue<String, Vector<DocData::ConstantDoc>> &E : enums) { - enum_line[E.key] = class_desc->get_line_count() - 2; + enum_line[E.key] = class_desc->get_paragraph_count() - 2; class_desc->push_font(doc_code_font); class_desc->push_color(title_color); @@ -1089,7 +1089,7 @@ void EditorHelp::_update_doc() { class_desc->push_indent(1); Vector<DocData::ConstantDoc> enum_list = E.value; - Map<String, int> enumValuesContainer; + HashMap<String, int> enumValuesContainer; int enumStartingLine = enum_line[E.key]; for (int i = 0; i < enum_list.size(); i++) { @@ -1098,7 +1098,7 @@ void EditorHelp::_update_doc() { } // Add the enum constant line to the constant_line map so we can locate it as a constant. - constant_line[enum_list[i].name] = class_desc->get_line_count() - 2; + constant_line[enum_list[i].name] = class_desc->get_paragraph_count() - 2; class_desc->push_font(doc_code_font); class_desc->push_color(headline_color); @@ -1144,7 +1144,7 @@ void EditorHelp::_update_doc() { // Constants if (constants.size()) { - section_line.push_back(Pair<String, int>(TTR("Constants"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Constants"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Constants")); @@ -1155,7 +1155,7 @@ void EditorHelp::_update_doc() { class_desc->add_newline(); for (int i = 0; i < constants.size(); i++) { - constant_line[constants[i].name] = class_desc->get_line_count() - 2; + constant_line[constants[i].name] = class_desc->get_paragraph_count() - 2; class_desc->push_font(doc_code_font); if (constants[i].value.begins_with("Color(") && constants[i].value.ends_with(")")) { @@ -1205,7 +1205,7 @@ void EditorHelp::_update_doc() { // Property descriptions if (property_descr) { - section_line.push_back(Pair<String, int>(TTR("Property Descriptions"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Property Descriptions"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Property Descriptions")); @@ -1220,7 +1220,7 @@ void EditorHelp::_update_doc() { continue; } - property_line[cd.properties[i].name] = class_desc->get_line_count() - 2; + property_line[cd.properties[i].name] = class_desc->get_paragraph_count() - 2; class_desc->push_table(2); class_desc->set_table_column_expand(1, true); @@ -1285,7 +1285,7 @@ void EditorHelp::_update_doc() { // Script doc doesn't have setter, getter. if (!cd.is_script_doc) { - Map<String, DocData::MethodDoc> method_map; + HashMap<String, DocData::MethodDoc> method_map; for (int j = 0; j < methods.size(); j++) { method_map[methods[j].name] = methods[j]; } @@ -1371,7 +1371,7 @@ void EditorHelp::_update_doc() { // Constructor descriptions if (constructor_descriptions) { - section_line.push_back(Pair<String, int>(TTR("Constructor Descriptions"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Constructor Descriptions"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Constructor Descriptions")); @@ -1380,7 +1380,7 @@ void EditorHelp::_update_doc() { // Method descriptions if (method_descriptions) { - section_line.push_back(Pair<String, int>(TTR("Method Descriptions"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Method Descriptions"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Method Descriptions")); @@ -1389,7 +1389,7 @@ void EditorHelp::_update_doc() { // Operator descriptions if (operator_descriptions) { - section_line.push_back(Pair<String, int>(TTR("Operator Descriptions"), class_desc->get_line_count() - 2)); + section_line.push_back(Pair<String, int>(TTR("Operator Descriptions"), class_desc->get_paragraph_count() - 2)); class_desc->push_color(title_color); class_desc->push_font(doc_title_font); class_desc->add_text(TTR("Operator Descriptions")); @@ -1450,15 +1450,15 @@ void EditorHelp::_help_callback(const String &p_topic) { } else if (method_line.has(name)) { line = method_line[name]; } else { - Map<String, Map<String, int>>::Element *iter = enum_values_line.front(); + HashMap<String, HashMap<String, int>>::Iterator iter = enum_values_line.begin(); while (true) { - if (iter->value().has(name)) { - line = iter->value()[name]; + if (iter->value.has(name)) { + line = iter->value[name]; break; - } else if (iter == enum_values_line.back()) { + } else if (iter == enum_values_line.last()) { break; } else { - iter = iter->next(); + ++iter; } } } @@ -1868,6 +1868,7 @@ EditorHelp::EditorHelp() { class_desc = memnew(RichTextLabel); add_child(class_desc); + class_desc->set_threaded(true); class_desc->set_v_size_flags(SIZE_EXPAND_FILL); class_desc->add_theme_color_override("selection_color", get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.4)); diff --git a/editor/editor_help.h b/editor/editor_help.h index e289f91414..b5410f6880 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -105,13 +105,13 @@ class EditorHelp : public VBoxContainer { String edited_class; Vector<Pair<String, int>> section_line; - Map<String, int> method_line; - Map<String, int> signal_line; - Map<String, int> property_line; - Map<String, int> theme_property_line; - Map<String, int> constant_line; - Map<String, int> enum_line; - Map<String, Map<String, int>> enum_values_line; + HashMap<String, int> method_line; + HashMap<String, int> signal_line; + HashMap<String, int> property_line; + HashMap<String, int> theme_property_line; + HashMap<String, int> constant_line; + HashMap<String, int> enum_line; + HashMap<String, HashMap<String, int>> enum_values_line; int description_line = 0; RichTextLabel *class_desc = nullptr; diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index c747ae326f..b85147fddf 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -313,7 +313,7 @@ bool EditorHelpSearch::Runner::_slice() { } bool EditorHelpSearch::Runner::_phase_match_classes_init() { - iterator_doc = EditorHelp::get_doc_data()->class_list.front(); + iterator_doc = EditorHelp::get_doc_data()->class_list.begin(); matches.clear(); matched_item = nullptr; match_highest_score = 0; @@ -322,11 +322,12 @@ bool EditorHelpSearch::Runner::_phase_match_classes_init() { } bool EditorHelpSearch::Runner::_phase_match_classes() { - DocData::ClassDoc &class_doc = iterator_doc->value(); + DocData::ClassDoc &class_doc = iterator_doc->value; + if (class_doc.name.is_empty()) { + return false; + } if (!_is_class_disabled_by_feature_profile(class_doc.name)) { - matches[class_doc.name] = ClassMatch(); - ClassMatch &match = matches[class_doc.name]; - + ClassMatch match; match.doc = &class_doc; // Match class name. @@ -400,16 +401,17 @@ bool EditorHelpSearch::Runner::_phase_match_classes() { } } } + matches[class_doc.name] = match; } matches[class_doc.name] = match; } - iterator_doc = iterator_doc->next(); + ++iterator_doc; return !iterator_doc; } bool EditorHelpSearch::Runner::_phase_class_items_init() { - iterator_match = matches.front(); + iterator_match = matches.begin(); results_tree->clear(); root_item = results_tree->create_item(); @@ -419,7 +421,10 @@ bool EditorHelpSearch::Runner::_phase_class_items_init() { } bool EditorHelpSearch::Runner::_phase_class_items() { - ClassMatch &match = iterator_match->value(); + if (!iterator_match) { + return false; + } + ClassMatch &match = iterator_match->value; if (search_flags & SEARCH_SHOW_HIERARCHY) { if (match.required()) { @@ -431,18 +436,25 @@ bool EditorHelpSearch::Runner::_phase_class_items() { } } - iterator_match = iterator_match->next(); + ++iterator_match; return !iterator_match; } bool EditorHelpSearch::Runner::_phase_member_items_init() { - iterator_match = matches.front(); + iterator_match = matches.begin(); return true; } bool EditorHelpSearch::Runner::_phase_member_items() { - ClassMatch &match = iterator_match->value(); + ClassMatch &match = iterator_match->value; + + if (!match.doc) { + return false; + } + if (match.doc->name.is_empty()) { + return false; + } TreeItem *parent = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item; bool constructor_created = false; @@ -473,7 +485,7 @@ bool EditorHelpSearch::Runner::_phase_member_items() { _create_theme_property_item(parent, match.doc, match.theme_properties[i]); } - iterator_match = iterator_match->next(); + ++iterator_match; return !iterator_match; } @@ -511,6 +523,9 @@ void EditorHelpSearch::Runner::_match_item(TreeItem *p_item, const String &p_tex } TreeItem *EditorHelpSearch::Runner::_create_class_hierarchy(const ClassMatch &p_match) { + if (p_match.doc->name.is_empty()) { + return nullptr; + } if (class_items.has(p_match.doc->name)) { return class_items[p_match.doc->name]; } @@ -522,7 +537,9 @@ TreeItem *EditorHelpSearch::Runner::_create_class_hierarchy(const ClassMatch &p_ parent = class_items[p_match.doc->inherits]; } else { ClassMatch &base_match = matches[p_match.doc->inherits]; - parent = _create_class_hierarchy(base_match); + if (base_match.doc) { + parent = _create_class_hierarchy(base_match); + } } } diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h index 14a8c46a79..3f17c992ac 100644 --- a/editor/editor_help_search.h +++ b/editor/editor_help_search.h @@ -31,7 +31,7 @@ #ifndef EDITOR_HELP_SEARCH_H #define EDITOR_HELP_SEARCH_H -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "editor/code_editor.h" #include "editor/editor_help.h" #include "editor/editor_plugin.h" @@ -99,7 +99,7 @@ class EditorHelpSearch::Runner : public RefCounted { int phase = 0; struct ClassMatch { - DocData::ClassDoc *doc; + DocData::ClassDoc *doc = nullptr; bool name = false; Vector<DocData::MethodDoc *> constructors; Vector<DocData::MethodDoc *> methods; @@ -122,11 +122,11 @@ class EditorHelpSearch::Runner : public RefCounted { Ref<Texture2D> empty_icon; Color disabled_color; - Map<String, DocData::ClassDoc>::Element *iterator_doc = nullptr; - Map<String, ClassMatch> matches; - Map<String, ClassMatch>::Element *iterator_match = nullptr; + HashMap<String, DocData::ClassDoc>::Iterator iterator_doc; + HashMap<String, ClassMatch> matches; + HashMap<String, ClassMatch>::Iterator iterator_match; TreeItem *root_item = nullptr; - Map<String, TreeItem *> class_items; + HashMap<String, TreeItem *> class_items; TreeItem *matched_item = nullptr; float match_highest_score = 0; diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 5db1ef4b2b..f534130735 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -839,7 +839,7 @@ void EditorProperty::_update_pin_flags() { } pin_hidden = false; { - Set<StringName> storable_properties; + RBSet<StringName> storable_properties; node->get_storable_properties(storable_properties); if (storable_properties.has(node->get_property_store_alias(property))) { can_pin = true; @@ -2445,8 +2445,8 @@ void EditorInspector::update_tree() { object->get_property_list(&plist, true); _update_script_class_properties(*object, plist); - Map<VBoxContainer *, HashMap<String, VBoxContainer *>> vbox_per_path; - Map<String, EditorInspectorArray *> editor_inspector_array_per_prefix; + HashMap<VBoxContainer *, HashMap<String, VBoxContainer *>> vbox_per_path; + HashMap<String, EditorInspectorArray *> editor_inspector_array_per_prefix; Color sscolor = get_theme_color(SNAME("prop_subsection"), SNAME("Editor")); @@ -2563,9 +2563,9 @@ void EditorInspector::update_tree() { if (!class_descr_cache.has(type2)) { String descr; DocTools *dd = EditorHelp::get_doc_data(); - Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(type2); + HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(type2); if (E) { - descr = DTR(E->get().brief_description); + descr = DTR(E->value.brief_description); } class_descr_cache[type2] = descr; } @@ -2607,9 +2607,9 @@ void EditorInspector::update_tree() { // First check if we have an array that fits the prefix. String array_prefix = ""; int array_index = -1; - for (Map<String, EditorInspectorArray *>::Element *E = editor_inspector_array_per_prefix.front(); E; E = E->next()) { - if (p.name.begins_with(E->key()) && E->key().length() > array_prefix.length()) { - array_prefix = E->key(); + for (KeyValue<String, EditorInspectorArray *> &E : editor_inspector_array_per_prefix) { + if (p.name.begins_with(E.key) && E.key.length() > array_prefix.length()) { + array_prefix = E.key; } } @@ -2851,39 +2851,39 @@ void EditorInspector::update_tree() { bool found = false; // Search for the property description in the cache. - Map<StringName, Map<StringName, String>>::Element *E = descr_cache.find(classname); + HashMap<StringName, HashMap<StringName, String>>::Iterator E = descr_cache.find(classname); if (E) { - Map<StringName, String>::Element *F = E->get().find(propname); + HashMap<StringName, String>::Iterator F = E->value.find(propname); if (F) { found = true; - descr = F->get(); + descr = F->value; } } if (!found) { // Build the property description String and add it to the cache. DocTools *dd = EditorHelp::get_doc_data(); - Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(classname); + HashMap<String, DocData::ClassDoc>::Iterator F = dd->class_list.find(classname); while (F && descr.is_empty()) { - for (int i = 0; i < F->get().properties.size(); i++) { - if (F->get().properties[i].name == propname.operator String()) { - descr = DTR(F->get().properties[i].description); + for (int i = 0; i < F->value.properties.size(); i++) { + if (F->value.properties[i].name == propname.operator String()) { + descr = DTR(F->value.properties[i].description); break; } } Vector<String> slices = propname.operator String().split("/"); if (slices.size() == 2 && slices[0].begins_with("theme_override_")) { - for (int i = 0; i < F->get().theme_properties.size(); i++) { - if (F->get().theme_properties[i].name == slices[1]) { - descr = DTR(F->get().theme_properties[i].description); + for (int i = 0; i < F->value.theme_properties.size(); i++) { + if (F->value.theme_properties[i].name == slices[1]) { + descr = DTR(F->value.theme_properties[i].description); break; } } } - if (!F->get().inherits.is_empty()) { - F = dd->class_list.find(F->get().inherits); + if (!F->value.inherits.is_empty()) { + F = dd->class_list.find(F->value.inherits); } else { break; } @@ -3638,7 +3638,7 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li break; } - Set<StringName> added; + RBSet<StringName> added; for (const Ref<Script> &s : classes) { String path = s->get_path(); String name = EditorNode::get_editor_data().script_class_get_name(path); diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 75536a5a24..7609f4fdcc 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -117,7 +117,7 @@ private: mutable String tooltip_text; - Map<StringName, Variant> cache; + HashMap<StringName, Variant> cache; GDVIRTUAL0(_update_property) void _update_pin_flags(); @@ -435,9 +435,9 @@ class EditorInspector : public ScrollContainer { VBoxContainer *main_vbox = nullptr; //map use to cache the instantiated editors - Map<StringName, List<EditorProperty *>> editor_property_map; + HashMap<StringName, List<EditorProperty *>> editor_property_map; List<EditorInspectorSection *> sections; - Set<StringName> pending; + RBSet<StringName> pending; void _clear(); Object *object = nullptr; @@ -468,11 +468,11 @@ class EditorInspector : public ScrollContainer { int property_focusable; int update_scroll_request; - Map<StringName, Map<StringName, String>> descr_cache; - Map<StringName, String> class_descr_cache; - Set<StringName> restart_request_props; + HashMap<StringName, HashMap<StringName, String>> descr_cache; + HashMap<StringName, String> class_descr_cache; + RBSet<StringName> restart_request_props; - Map<ObjectID, int> scroll_cache; + HashMap<ObjectID, int> scroll_cache; String property_prefix; //used for sectioned inspector String object_class; @@ -496,7 +496,7 @@ class EditorInspector : public ScrollContainer { void _node_removed(Node *p_node); - Map<StringName, int> per_array_page; + HashMap<StringName, int> per_array_page; void _page_change_request(int p_new_page, const StringName &p_array_prefix); void _changed_callback(); diff --git a/editor/editor_log.h b/editor/editor_log.h index 267ad406d4..de0368501c 100644 --- a/editor/editor_log.h +++ b/editor/editor_log.h @@ -115,7 +115,7 @@ private: Vector<LogMessage> messages; // Maps MessageTypes to LogFilters for convenient access and storage (don't need 1 member per filter). - Map<MessageType, LogFilter *> type_filter_map; + HashMap<MessageType, LogFilter *> type_filter_map; RichTextLabel *log = nullptr; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f31ad3a68d..f2baaf8b5c 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -215,12 +215,12 @@ static const String META_TEXT_TO_COPY = "text_to_copy"; void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vector<String> &r_filenames) { // Keep track of a list of "index sets," i.e. sets of indices // within disambiguated_scene_names which contain the same name. - Vector<Set<int>> index_sets; - Map<String, int> scene_name_to_set_index; + Vector<RBSet<int>> index_sets; + HashMap<String, int> scene_name_to_set_index; for (int i = 0; i < r_filenames.size(); i++) { String scene_name = r_filenames[i]; if (!scene_name_to_set_index.has(scene_name)) { - index_sets.append(Set<int>()); + index_sets.append(RBSet<int>()); scene_name_to_set_index.insert(r_filenames[i], index_sets.size() - 1); } index_sets.write[scene_name_to_set_index[scene_name]].insert(i); @@ -228,11 +228,11 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto // For each index set with a size > 1, we need to disambiguate. for (int i = 0; i < index_sets.size(); i++) { - Set<int> iset = index_sets[i]; + RBSet<int> iset = index_sets[i]; while (iset.size() > 1) { // Append the parent folder to each scene name. - for (Set<int>::Element *E = iset.front(); E; E = E->next()) { - int set_idx = E->get(); + for (const int &E : iset) { + int set_idx = E; String scene_name = r_filenames[set_idx]; String full_path = p_full_paths[set_idx]; @@ -266,22 +266,22 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto // Loop back through scene names and remove non-ambiguous names. bool can_proceed = false; - Set<int>::Element *E = iset.front(); + RBSet<int>::Element *E = iset.front(); while (E) { String scene_name = r_filenames[E->get()]; bool duplicate_found = false; - for (Set<int>::Element *F = iset.front(); F; F = F->next()) { - if (E->get() == F->get()) { + for (const int &F : iset) { + if (E->get() == F) { continue; } - String other_scene_name = r_filenames[F->get()]; + String other_scene_name = r_filenames[F]; if (other_scene_name == scene_name) { duplicate_found = true; break; } } - Set<int>::Element *to_erase = duplicate_found ? nullptr : E; + RBSet<int>::Element *to_erase = duplicate_found ? nullptr : E; // We need to check that we could actually append anymore names // if we wanted to for disambiguation. If we can't, then we have @@ -800,7 +800,7 @@ void EditorNode::_notification(int p_what) { main_editor_buttons.write[i]->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("main_button_font_size"), SNAME("EditorFonts"))); } - Set<String> updated_textfile_extensions; + RBSet<String> updated_textfile_extensions; bool extensions_match = true; const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false); for (const String &E : textfile_ext) { @@ -907,12 +907,12 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) { } void EditorNode::_fs_changed() { - for (Set<FileDialog *>::Element *E = file_dialogs.front(); E; E = E->next()) { - E->get()->invalidate(); + for (FileDialog *E : file_dialogs) { + E->invalidate(); } - for (Set<EditorFileDialog *>::Element *E = editor_file_dialogs.front(); E; E = E->next()) { - E->get()->invalidate(); + for (EditorFileDialog *E : editor_file_dialogs) { + E->invalidate(); } _mark_unsaved_scenes(); @@ -1185,8 +1185,8 @@ Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_d if (!p_ignore_broken_deps && dependency_errors.has(p_resource)) { Vector<String> errors; - for (Set<String>::Element *E = dependency_errors[p_resource].front(); E; E = E->next()) { - errors.push_back(E->get()); + for (const String &E : dependency_errors[p_resource]) { + errors.push_back(E); } dependency_error->show(DependencyErrorDialog::MODE_RESOURCE, p_resource, errors); dependency_errors.erase(p_resource); @@ -1417,7 +1417,7 @@ void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) { ERR_FAIL_COND_MSG(err != OK, "Cannot save config file to '" + path + "'."); } -bool EditorNode::_find_and_save_resource(Ref<Resource> p_res, Map<Ref<Resource>, bool> &processed, int32_t flags) { +bool EditorNode::_find_and_save_resource(Ref<Resource> p_res, HashMap<Ref<Resource>, bool> &processed, int32_t flags) { if (p_res.is_null()) { return false; } @@ -1443,7 +1443,7 @@ bool EditorNode::_find_and_save_resource(Ref<Resource> p_res, Map<Ref<Resource>, } } -bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<Ref<Resource>, bool> &processed, int32_t flags) { +bool EditorNode::_find_and_save_edited_subresources(Object *obj, HashMap<Ref<Resource>, bool> &processed, int32_t flags) { bool ret_changed = false; List<PropertyInfo> pi; obj->get_property_list(&pi); @@ -1493,7 +1493,7 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<Ref<Resourc return ret_changed; } -void EditorNode::_save_edited_subresources(Node *scene, Map<Ref<Resource>, bool> &processed, int32_t flags) { +void EditorNode::_save_edited_subresources(Node *scene, HashMap<Ref<Resource>, bool> &processed, int32_t flags) { _find_and_save_edited_subresources(scene, processed, flags); for (int i = 0; i < scene->get_child_count(); i++) { @@ -1622,7 +1622,7 @@ bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_nod return false; } -static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource>> &edited_resources) { +static bool _find_edited_resources(const Ref<Resource> &p_resource, RBSet<Ref<Resource>> &edited_resources) { if (p_resource->is_edited()) { edited_resources.insert(p_resource); return true; @@ -1659,7 +1659,7 @@ int EditorNode::_save_external_resources() { } flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS; - Set<Ref<Resource>> edited_subresources; + RBSet<Ref<Resource>> edited_subresources; int saved = 0; List<Ref<Resource>> cached; ResourceCache::get_cached_resources(&cached); @@ -1677,8 +1677,8 @@ int EditorNode::_save_external_resources() { // Clear later, because user may have put the same subresource in two different resources, // which will be shared until the next reload. - for (Set<Ref<Resource>>::Element *E = edited_subresources.front(); E; E = E->next()) { - Ref<Resource> res = E->get(); + for (const Ref<Resource> &E : edited_subresources) { + Ref<Resource> res = E; res->set_edited(false); } @@ -2125,7 +2125,7 @@ void EditorNode::_save_default_environment() { Ref<Environment> fallback = get_tree()->get_root()->get_world_3d()->get_fallback_environment(); if (fallback.is_valid() && fallback->get_path().is_resource_file()) { - Map<Ref<Resource>, bool> processed; + HashMap<Ref<Resource>, bool> processed; _find_and_save_edited_subresources(fallback.ptr(), processed, 0); save_resource_in_path(fallback, fallback->get_path()); } @@ -3663,8 +3663,8 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b if (!p_ignore_broken_deps && dependency_errors.has(lpath)) { current_menu_option = -1; Vector<String> errors; - for (Set<String>::Element *E = dependency_errors[lpath].front(); E; E = E->next()) { - errors.push_back(E->get()); + for (const String &E : dependency_errors[lpath]) { + errors.push_back(E); } dependency_error->show(DependencyErrorDialog::MODE_SCENE, lpath, errors); opening_prev = false; @@ -3678,10 +3678,10 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b dependency_errors.erase(lpath); // At least not self path. - for (KeyValue<String, Set<String>> &E : dependency_errors) { + for (KeyValue<String, RBSet<String>> &E : dependency_errors) { String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E.key) + "\n"; - for (Set<String>::Element *F = E.value.front(); F; F = F->next()) { - txt += "\t" + F->get() + "\n"; + for (const String &F : E.value) { + txt += "\t" + F + "\n"; } add_io_error(txt); } @@ -4143,7 +4143,7 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p } } - const Map<String, Vector<EditorData::CustomType>> &p_map = EditorNode::get_editor_data().get_custom_types(); + const HashMap<String, Vector<EditorData::CustomType>> &p_map = EditorNode::get_editor_data().get_custom_types(); for (const KeyValue<String, Vector<EditorData::CustomType>> &E : p_map) { const Vector<EditorData::CustomType> &ct = E.value; for (int i = 0; i < ct.size(); ++i) { diff --git a/editor/editor_node.h b/editor/editor_node.h index 0d154123b3..9cd96050e3 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -273,7 +273,7 @@ private: Vector<EditorPlugin *> editor_plugins; bool _initializing_plugins = false; - Map<String, EditorPlugin *> addon_name_to_plugin; + HashMap<String, EditorPlugin *> addon_name_to_plugin; PanelContainer *scene_root_parent = nullptr; Control *theme_base = nullptr; @@ -394,7 +394,7 @@ private: BackgroundProgress *progress_hb = nullptr; DependencyErrorDialog *dependency_error = nullptr; - Map<String, Set<String>> dependency_errors; + HashMap<String, RBSet<String>> dependency_errors; DependencyEditor *dependency_fixer = nullptr; OrphanResourcesDialog *orphan_resources = nullptr; ConfirmationDialog *open_imported = nullptr; @@ -470,15 +470,15 @@ private: String import_reload_fn; - Set<String> textfile_extensions; - Set<FileDialog *> file_dialogs; - Set<EditorFileDialog *> editor_file_dialogs; + RBSet<String> textfile_extensions; + RBSet<FileDialog *> file_dialogs; + RBSet<EditorFileDialog *> editor_file_dialogs; Vector<Ref<EditorResourceConversionPlugin>> resource_conversion_plugins; PrintHandlerList print_handler; - Map<String, Ref<Texture2D>> icon_type_cache; - Map<Ref<Script>, Ref<Texture>> script_icon_cache; + HashMap<String, Ref<Texture2D>> icon_type_cache; + HashMap<Ref<Script>, Ref<Texture>> script_icon_cache; static EditorBuildCallback build_callbacks[MAX_BUILD_CALLBACKS]; static EditorPluginInitializeCallback plugin_init_callbacks[MAX_INIT_CALLBACKS]; @@ -489,7 +489,7 @@ private: static void _dependency_error_report(void *ud, const String &p_path, const String &p_dep, const String &p_type) { EditorNode *en = static_cast<EditorNode *>(ud); if (!en->dependency_errors.has(p_path)) { - en->dependency_errors[p_path] = Set<String>(); + en->dependency_errors[p_path] = RBSet<String>(); } en->dependency_errors[p_path].insert(p_dep + "::" + p_type); } @@ -594,9 +594,9 @@ private: void _remove_edited_scene(bool p_change_tab = true); void _remove_scene(int index, bool p_change_tab = true); - bool _find_and_save_resource(Ref<Resource> p_res, Map<Ref<Resource>, bool> &processed, int32_t flags); - bool _find_and_save_edited_subresources(Object *obj, Map<Ref<Resource>, bool> &processed, int32_t flags); - void _save_edited_subresources(Node *scene, Map<Ref<Resource>, bool> &processed, int32_t flags); + bool _find_and_save_resource(Ref<Resource> p_res, HashMap<Ref<Resource>, bool> &processed, int32_t flags); + bool _find_and_save_edited_subresources(Object *obj, HashMap<Ref<Resource>, bool> &processed, int32_t flags); + void _save_edited_subresources(Node *scene, HashMap<Ref<Resource>, bool> &processed, int32_t flags); void _mark_unsaved_scenes(); void _find_node_types(Node *p_node, int &count_2d, int &count_3d); diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 9541033fe8..880e51660b 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2229,8 +2229,8 @@ void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); - spin[i]->set_suffix(p_suffix); } + spin[3]->set_suffix(p_suffix); } EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) { @@ -2322,6 +2322,8 @@ void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); + // Quaternion is inherently unitless, however someone may want to use it as + // a generic way to store 4 values, so we'll still respect the suffix. spin[i]->set_suffix(p_suffix); } } @@ -2506,7 +2508,9 @@ void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); - spin[i]->set_suffix(p_suffix); + if (i % 3 == 2) { + spin[i]->set_suffix(p_suffix); + } } } @@ -2596,6 +2600,8 @@ void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); + // Basis is inherently unitless, however someone may want to use it as + // a generic way to store 9 values, so we'll still respect the suffix. spin[i]->set_suffix(p_suffix); } } @@ -2692,7 +2698,9 @@ void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, spin[i]->set_hide_slider(p_no_slider); spin[i]->set_allow_greater(true); spin[i]->set_allow_lesser(true); - spin[i]->set_suffix(p_suffix); + if (i % 4 == 3) { + spin[i]->set_suffix(p_suffix); + } } } @@ -2752,7 +2760,13 @@ void EditorPropertyColor::_picker_opening() { last_color = picker->get_pick_color(); } -void EditorPropertyColor::_bind_methods() { +void EditorPropertyColor::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case NOTIFICATION_THEME_CHANGED: { + picker->set_custom_minimum_size(Size2(0, get_theme_constant(SNAME("color_picker_button_height"), SNAME("Editor")))); + } break; + } } void EditorPropertyColor::update_property() { @@ -3346,7 +3360,6 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Varian } struct EditorPropertyRangeHint { - bool angle_in_degrees = false; bool greater = true; bool lesser = true; double min = -99999.0; diff --git a/editor/editor_properties.h b/editor/editor_properties.h index ebac984bbd..5ee0ba1a6d 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -667,7 +667,7 @@ class EditorPropertyColor : public EditorProperty { protected: virtual void _set_read_only(bool p_read_only) override; - static void _bind_methods(); + void _notification(int p_what); public: virtual void update_property() override; diff --git a/editor/editor_property_name_processor.cpp b/editor/editor_property_name_processor.cpp index 1e222c02a3..ba6585dfcc 100644 --- a/editor/editor_property_name_processor.cpp +++ b/editor/editor_property_name_processor.cpp @@ -57,16 +57,16 @@ bool EditorPropertyNameProcessor::is_localization_available() { } String EditorPropertyNameProcessor::_capitalize_name(const String &p_name) const { - const Map<String, String>::Element *cached = capitalize_string_cache.find(p_name); + HashMap<String, String>::ConstIterator cached = capitalize_string_cache.find(p_name); if (cached) { - return cached->value(); + return cached->value; } Vector<String> parts = p_name.split("_", false); for (int i = 0; i < parts.size(); i++) { - const Map<String, String>::Element *remap = capitalize_string_remaps.find(parts[i]); + HashMap<String, String>::ConstIterator remap = capitalize_string_remaps.find(parts[i]); if (remap) { - parts.write[i] = remap->get(); + parts.write[i] = remap->value; } else { parts.write[i] = parts[i].capitalize(); } @@ -207,6 +207,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() { capitalize_string_remaps["ssh"] = "SSH"; capitalize_string_remaps["ssil"] = "SSIL"; capitalize_string_remaps["ssl"] = "SSL"; + capitalize_string_remaps["sss"] = "SSS"; capitalize_string_remaps["stderr"] = "stderr"; capitalize_string_remaps["stdout"] = "stdout"; capitalize_string_remaps["sv"] = "SV"; diff --git a/editor/editor_property_name_processor.h b/editor/editor_property_name_processor.h index 351736550f..37d905c806 100644 --- a/editor/editor_property_name_processor.h +++ b/editor/editor_property_name_processor.h @@ -38,8 +38,8 @@ class EditorPropertyNameProcessor : public Node { static EditorPropertyNameProcessor *singleton; - mutable Map<String, String> capitalize_string_cache; - Map<String, String> capitalize_string_remaps; + mutable HashMap<String, String> capitalize_string_cache; + HashMap<String, String> capitalize_string_remaps; // Capitalizes property path segments. String _capitalize_name(const String &p_name) const; diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 3158c03dcc..cb3000ee88 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -240,7 +240,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { ResourceLoader::get_recognized_extensions_for_type(base, &extensions); } - Set<String> valid_extensions; + RBSet<String> valid_extensions; for (const String &E : extensions) { valid_extensions.insert(E); } @@ -253,8 +253,8 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { } file_dialog->clear_filters(); - for (Set<String>::Element *E = valid_extensions.front(); E; E = E->next()) { - file_dialog->add_filter("*." + E->get() + " ; " + E->get().to_upper()); + for (const String &E : valid_extensions) { + file_dialog->add_filter("*." + E + " ; " + E.to_upper()); } file_dialog->popup_file_dialog(); @@ -409,7 +409,7 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) { if (!base_type.is_empty()) { int idx = 0; - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(false, &allowed_types); Vector<EditorData::CustomType> custom_resources; @@ -417,8 +417,8 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) { custom_resources = EditorNode::get_editor_data().get_custom_types()["Resource"]; } - for (Set<String>::Element *E = allowed_types.front(); E; E = E->next()) { - const String &t = E->get(); + for (const String &E : allowed_types) { + const String &t = E; bool is_custom_resource = false; Ref<Texture2D> icon; @@ -491,7 +491,7 @@ void EditorResourcePicker::_button_input(const Ref<InputEvent> &p_event) { } } -void EditorResourcePicker::_get_allowed_types(bool p_with_convert, Set<String> *p_vector) const { +void EditorResourcePicker::_get_allowed_types(bool p_with_convert, RBSet<String> *p_vector) const { Vector<String> allowed_types = base_type.split(","); int size = allowed_types.size(); @@ -568,7 +568,7 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const { res = drag_data["resource"]; } - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(true, &allowed_types); if (res.is_valid() && _is_type_valid(res->get_class(), allowed_types)) { @@ -598,9 +598,9 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const { return false; } -bool EditorResourcePicker::_is_type_valid(const String p_type_name, Set<String> p_allowed_types) const { - for (Set<String>::Element *E = p_allowed_types.front(); E; E = E->next()) { - String at = E->get().strip_edges(); +bool EditorResourcePicker::_is_type_valid(const String p_type_name, RBSet<String> p_allowed_types) const { + for (const String &E : p_allowed_types) { + String at = E.strip_edges(); if (p_type_name == at || ClassDB::is_parent_class(p_type_name, at) || EditorNode::get_editor_data().script_class_is_parent(p_type_name, at)) { return true; } @@ -646,13 +646,13 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_ } if (dropped_resource.is_valid()) { - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(false, &allowed_types); // If the accepted dropped resource is from the extended list, it requires conversion. if (!_is_type_valid(dropped_resource->get_class(), allowed_types)) { - for (Set<String>::Element *E = allowed_types.front(); E; E = E->next()) { - String at = E->get().strip_edges(); + for (const String &E : allowed_types) { + String at = E.strip_edges(); if (at == "BaseMaterial3D" && Ref<Texture2D>(dropped_resource).is_valid()) { // Use existing resource if possible and only replace its data. @@ -768,7 +768,7 @@ void EditorResourcePicker::set_base_type(const String &p_base_type) { // There is a possibility that the new base type is conflicting with the existing value. // Keep the value, but warn the user that there is a potential mistake. if (!base_type.is_empty() && edited_resource.is_valid()) { - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(true, &allowed_types); StringName custom_class; @@ -784,7 +784,7 @@ void EditorResourcePicker::set_base_type(const String &p_base_type) { } } else { // Call the method to build the cache immediately. - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(false, &allowed_types); } } @@ -794,7 +794,7 @@ String EditorResourcePicker::get_base_type() const { } Vector<String> EditorResourcePicker::get_allowed_types() const { - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(false, &allowed_types); Vector<String> types; @@ -802,7 +802,7 @@ Vector<String> EditorResourcePicker::get_allowed_types() const { int i = 0; String *w = types.ptrw(); - for (Set<String>::Element *E = allowed_types.front(); E; E = E->next(), i++) { + for (RBSet<String>::Element *E = allowed_types.front(); E; E = E->next(), i++) { w[i] = E->get(); } @@ -817,7 +817,7 @@ void EditorResourcePicker::set_edited_resource(Ref<Resource> p_resource) { } if (!base_type.is_empty()) { - Set<String> allowed_types; + RBSet<String> allowed_types; _get_allowed_types(true, &allowed_types); StringName custom_class; diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h index e63280e3b6..f2dc45513d 100644 --- a/editor/editor_resource_picker.h +++ b/editor/editor_resource_picker.h @@ -89,9 +89,9 @@ class EditorResourcePicker : public HBoxContainer { void _button_draw(); void _button_input(const Ref<InputEvent> &p_event); - void _get_allowed_types(bool p_with_convert, Set<String> *p_vector) const; + void _get_allowed_types(bool p_with_convert, RBSet<String> *p_vector) const; bool _is_drop_valid(const Dictionary &p_drag_data) const; - bool _is_type_valid(const String p_type_name, Set<String> p_allowed_types) const; + bool _is_type_valid(const String p_type_name, RBSet<String> p_allowed_types) const; Variant get_drag_data_fw(const Point2 &p_point, Control *p_from); bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h index 4e91df8e08..820e22bdc8 100644 --- a/editor/editor_resource_preview.h +++ b/editor/editor_resource_preview.h @@ -91,7 +91,7 @@ class EditorResourcePreview : public Node { int order; - Map<String, Item> cache; + HashMap<String, Item> cache; void _preview_ready(const String &p_str, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud); void _generate_preview(Ref<ImageTexture> &r_texture, Ref<ImageTexture> &r_small_texture, const QueueItem &p_item, const String &cache_base); diff --git a/editor/editor_run_native.h b/editor/editor_run_native.h index 4cb5779350..798a0371a4 100644 --- a/editor/editor_run_native.h +++ b/editor/editor_run_native.h @@ -37,7 +37,7 @@ class EditorRunNative : public HBoxContainer { GDCLASS(EditorRunNative, HBoxContainer); - Map<int, MenuButton *> menus; + HashMap<int, MenuButton *> menus; bool first = true; int resume_idx; diff --git a/editor/editor_sectioned_inspector.h b/editor/editor_sectioned_inspector.h index 0ccffa0048..babd11eb69 100644 --- a/editor/editor_sectioned_inspector.h +++ b/editor/editor_sectioned_inspector.h @@ -45,7 +45,7 @@ class SectionedInspector : public HSplitContainer { Tree *sections = nullptr; SectionedInspectorFilter *filter = nullptr; - Map<String, TreeItem *> section_map; + HashMap<String, TreeItem *> section_map; EditorInspector *inspector = nullptr; LineEdit *search_box = nullptr; diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 5d846028c5..1eaf60cda3 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -244,7 +244,7 @@ struct _EVCSort { void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const { _THREAD_SAFE_METHOD_ - Set<_EVCSort> vclist; + RBSet<_EVCSort> vclist; for (const KeyValue<String, VariantContainer> &E : props) { const VariantContainer *v = &E.value; @@ -268,25 +268,25 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const { vclist.insert(vc); } - for (Set<_EVCSort>::Element *E = vclist.front(); E; E = E->next()) { + for (const _EVCSort &E : vclist) { uint32_t pusage = PROPERTY_USAGE_NONE; - if (E->get().save || !optimize_save) { + if (E.save || !optimize_save) { pusage |= PROPERTY_USAGE_STORAGE; } - if (!E->get().name.begins_with("_") && !E->get().name.begins_with("projects/")) { + if (!E.name.begins_with("_") && !E.name.begins_with("projects/")) { pusage |= PROPERTY_USAGE_EDITOR; } else { pusage |= PROPERTY_USAGE_STORAGE; //hiddens must always be saved } - PropertyInfo pi(E->get().type, E->get().name); + PropertyInfo pi(E.type, E.name); pi.usage = pusage; - if (hints.has(E->get().name)) { - pi = hints[E->get().name]; + if (hints.has(E.name)) { + pi = hints[E.name]; } - if (E->get().restart_if_changed) { + if (E.restart_if_changed) { pi.usage |= PROPERTY_USAGE_RESTART_IF_CHANGED; } @@ -609,9 +609,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Use a lower default FOV for the 3D camera compared to the // Camera3D node as the 3D viewport doesn't span the whole screen. // This means it's technically viewed from a further distance, which warrants a narrower FOV. - EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_fov", 70.0, "1,179,0.1") - EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_z_near", 0.05, "0.01,10,0.01,or_greater") - EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_z_far", 4000.0, "0.1,4000,0.1,or_greater") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_fov", 70.0, "1,179,0.1,degrees") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_z_near", 0.05, "0.01,10,0.01,or_greater,suffix:m") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_z_far", 4000.0, "0.1,4000,0.1,or_greater,suffix:m") // 3D: Navigation _initial_set("editors/3d/navigation/invert_x_axis", false); @@ -681,6 +681,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Visual editors EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/visual_editors/minimap_opacity", 0.85, "0.0,1.0,0.01") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/visual_editors/visualshader/port_preview_size", 160, "100,400,0.01") /* Run */ @@ -1399,32 +1400,32 @@ void EditorSettings::add_shortcut(const String &p_name, const Ref<Shortcut> &p_s } bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const { - const Map<String, Ref<Shortcut>>::Element *E = shortcuts.find(p_name); + HashMap<String, Ref<Shortcut>>::ConstIterator E = shortcuts.find(p_name); ERR_FAIL_COND_V_MSG(!E, false, "Unknown Shortcut: " + p_name + "."); - return E->get()->matches_event(p_event); + return E->value->matches_event(p_event); } Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const { - const Map<String, Ref<Shortcut>>::Element *SC = shortcuts.find(p_name); + HashMap<String, Ref<Shortcut>>::ConstIterator SC = shortcuts.find(p_name); if (SC) { - return SC->get(); + return SC->value; } // If no shortcut with the provided name is found in the list, check the built-in shortcuts. // Use the first item in the action list for the shortcut event, since a shortcut can only have 1 linked event. Ref<Shortcut> sc; - const Map<String, List<Ref<InputEvent>>>::Element *builtin_override = builtin_action_overrides.find(p_name); + HashMap<String, List<Ref<InputEvent>>>::ConstIterator builtin_override = builtin_action_overrides.find(p_name); if (builtin_override) { sc.instantiate(); - sc->set_events_list(&builtin_override->get()); + sc->set_events_list(&builtin_override->value); sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name)); } // If there was no override, check the default builtins to see if it has an InputEvent for the provided name. if (sc.is_null()) { - const HashMap<String, List<Ref<InputEvent>>>::ConstIterator builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name); + HashMap<String, List<Ref<InputEvent>>>::ConstIterator builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name); if (builtin_default) { sc.instantiate(); sc->set_events_list(&builtin_default->value); @@ -1606,11 +1607,11 @@ void EditorSettings::set_builtin_action_override(const String &p_name, const Arr } const Array EditorSettings::get_builtin_action_overrides(const String &p_name) const { - const Map<String, List<Ref<InputEvent>>>::Element *AO = builtin_action_overrides.find(p_name); + HashMap<String, List<Ref<InputEvent>>>::ConstIterator AO = builtin_action_overrides.find(p_name); if (AO) { Array event_array; - List<Ref<InputEvent>> events_list = AO->get(); + List<Ref<InputEvent>> events_list = AO->value; for (const Ref<InputEvent> &E : events_list) { event_array.push_back(E); } diff --git a/editor/editor_settings.h b/editor/editor_settings.h index d1b9cabfb7..e270a882e2 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -77,15 +77,15 @@ private: static Ref<EditorSettings> singleton; - Set<String> changed_settings; + RBSet<String> changed_settings; HashMap<String, PropertyInfo> hints; HashMap<String, VariantContainer> props; int last_order; Ref<Resource> clipboard; - mutable Map<String, Ref<Shortcut>> shortcuts; - Map<String, List<Ref<InputEvent>>> builtin_action_overrides; + mutable HashMap<String, Ref<Shortcut>> shortcuts; + HashMap<String, List<Ref<InputEvent>>> builtin_action_overrides; String config_file_path; diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp index 94775f8c76..fd578bd365 100644 --- a/editor/editor_settings_dialog.cpp +++ b/editor/editor_settings_dialog.cpp @@ -327,7 +327,7 @@ void EditorSettingsDialog::_create_shortcut_treeitem(TreeItem *p_parent, const S void EditorSettingsDialog::_update_shortcuts() { // Before clearing the tree, take note of which categories are collapsed so that this state can be maintained when the tree is repopulated. - Map<String, bool> collapsed; + HashMap<String, bool> collapsed; if (shortcuts->get_root() && shortcuts->get_root()->get_first_child()) { TreeItem *ti = shortcuts->get_root()->get_first_child(); @@ -359,7 +359,7 @@ void EditorSettingsDialog::_update_shortcuts() { shortcuts->clear(); TreeItem *root = shortcuts->create_item(); - Map<String, TreeItem *> sections; + HashMap<String, TreeItem *> sections; // Set up section for Common/Built-in actions TreeItem *common_section = shortcuts->create_item(root); diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index ec8130e862..09e407de57 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -627,10 +627,14 @@ void EditorSpinSlider::_bind_methods() { ClassDB::bind_method(D_METHOD("set_flat", "flat"), &EditorSpinSlider::set_flat); ClassDB::bind_method(D_METHOD("is_flat"), &EditorSpinSlider::is_flat); + ClassDB::bind_method(D_METHOD("set_hide_slider", "hide_slider"), &EditorSpinSlider::set_hide_slider); + ClassDB::bind_method(D_METHOD("is_hiding_slider"), &EditorSpinSlider::is_hiding_slider); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "label"), "set_label", "get_label"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "suffix"), "set_suffix", "get_suffix"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flat"), "set_flat", "is_flat"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_slider"), "set_hide_slider", "is_hiding_slider"); } void EditorSpinSlider::_ensure_input_popup() { diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 0400aa74b5..567865d4f1 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -148,7 +148,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = // The names of the icons to never convert, even if one of their colors // are contained in the dictionary above. - Set<StringName> exceptions; + RBSet<StringName> exceptions; // Some of the colors below are listed for completeness sake. // This can be a basis for proper palette validation later. @@ -290,7 +290,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = // Use the accent color for some icons (checkbox, radio, toggle, etc.). Dictionary accent_color_icon_color_dictionary; - Set<StringName> accent_color_icons; + RBSet<StringName> accent_color_icons; const Color accent_color = p_theme->get_color(SNAME("accent_color"), SNAME("Editor")); accent_color_icon_color_dictionary[Color::html("699ce8")] = accent_color; @@ -535,6 +535,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("scale", "Editor", EDSCALE); theme->set_constant("thumb_size", "Editor", thumb_size); theme->set_constant("dark_theme", "Editor", dark_theme); + theme->set_constant("color_picker_button_height", "Editor", 28 * EDSCALE); // Register icons + font @@ -741,17 +742,28 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("pressed", "EditorLogFilterButton", editor_log_button_pressed); // OptionButton - theme->set_stylebox("focus", "OptionButton", style_widget_focus); - + Ref<StyleBoxFlat> style_option_button_focus = style_widget_focus->duplicate(); + Ref<StyleBoxFlat> style_option_button_normal = style_widget->duplicate(); + Ref<StyleBoxFlat> style_option_button_hover = style_widget_hover->duplicate(); + Ref<StyleBoxFlat> style_option_button_pressed = style_widget_pressed->duplicate(); + Ref<StyleBoxFlat> style_option_button_disabled = style_widget_disabled->duplicate(); + + style_option_button_focus->set_default_margin(SIDE_RIGHT, 4 * EDSCALE); + style_option_button_normal->set_default_margin(SIDE_RIGHT, 4 * EDSCALE); + style_option_button_hover->set_default_margin(SIDE_RIGHT, 4 * EDSCALE); + style_option_button_pressed->set_default_margin(SIDE_RIGHT, 4 * EDSCALE); + style_option_button_disabled->set_default_margin(SIDE_RIGHT, 4 * EDSCALE); + + theme->set_stylebox("focus", "OptionButton", style_option_button_focus); theme->set_stylebox("normal", "OptionButton", style_widget); theme->set_stylebox("hover", "OptionButton", style_widget_hover); theme->set_stylebox("pressed", "OptionButton", style_widget_pressed); theme->set_stylebox("disabled", "OptionButton", style_widget_disabled); - theme->set_stylebox("normal_mirrored", "OptionButton", style_widget); - theme->set_stylebox("hover_mirrored", "OptionButton", style_widget_hover); - theme->set_stylebox("pressed_mirrored", "OptionButton", style_widget_pressed); - theme->set_stylebox("disabled_mirrored", "OptionButton", style_widget_disabled); + theme->set_stylebox("normal_mirrored", "OptionButton", style_option_button_normal); + theme->set_stylebox("hover_mirrored", "OptionButton", style_option_button_hover); + theme->set_stylebox("pressed_mirrored", "OptionButton", style_option_button_pressed); + theme->set_stylebox("disabled_mirrored", "OptionButton", style_option_button_disabled); theme->set_color("font_color", "OptionButton", font_color); theme->set_color("font_hover_color", "OptionButton", font_hover_color); @@ -1435,7 +1447,6 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_minimap_node = make_flat_stylebox(Color(0, 0, 0), 0, 0, 0, 0); } style_minimap_camera->set_border_width_all(1); - style_minimap_node->set_corner_radius_all(1); theme->set_stylebox("camera", "GraphEditMinimap", style_minimap_camera); theme->set_stylebox("node", "GraphEditMinimap", style_minimap_node); @@ -1450,20 +1461,26 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("resizer_color", "GraphEditMinimap", minimap_resizer_color); // GraphNode - const int gn_margin_side = 28; + const int gn_margin_side = 2; + const int gn_margin_bottom = 2; - Ref<StyleBoxFlat> graphsb = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.7), gn_margin_side, 24, gn_margin_side, 5, corner_width); + Color graphnode_bg = dark_color_3; + if (!dark_theme) { + graphnode_bg = prop_section_color; + } + + Ref<StyleBoxFlat> graphsb = make_flat_stylebox(graphnode_bg.lerp(style_tree_bg->get_bg_color(), 0.3), gn_margin_side, 24, gn_margin_side, gn_margin_bottom, corner_width); graphsb->set_border_width_all(border_width); - graphsb->set_border_color(dark_color_3); - Ref<StyleBoxFlat> graphsbselected = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.9), gn_margin_side, 24, gn_margin_side, 5, corner_width); + graphsb->set_border_color(graphnode_bg); + Ref<StyleBoxFlat> graphsbselected = make_flat_stylebox(graphnode_bg * Color(1, 1, 1, 1), gn_margin_side, 24, gn_margin_side, gn_margin_bottom, corner_width); graphsbselected->set_border_width_all(2 * EDSCALE + border_width); - graphsbselected->set_border_color(Color(accent_color.r, accent_color.g, accent_color.b, 0.9)); - Ref<StyleBoxFlat> graphsbcomment = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.3), gn_margin_side, 24, gn_margin_side, 5, corner_width); + graphsbselected->set_border_color(Color(accent_color.r, accent_color.g, accent_color.b, 0.6)); + Ref<StyleBoxFlat> graphsbcomment = make_flat_stylebox(graphnode_bg * Color(1, 1, 1, 0.3), gn_margin_side, 24, gn_margin_side, gn_margin_bottom, corner_width); graphsbcomment->set_border_width_all(border_width); - graphsbcomment->set_border_color(dark_color_3); - Ref<StyleBoxFlat> graphsbcommentselected = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.4), gn_margin_side, 24, gn_margin_side, 5, corner_width); + graphsbcomment->set_border_color(graphnode_bg); + Ref<StyleBoxFlat> graphsbcommentselected = make_flat_stylebox(graphnode_bg * Color(1, 1, 1, 0.4), gn_margin_side, 24, gn_margin_side, gn_margin_bottom, corner_width); graphsbcommentselected->set_border_width_all(border_width); - graphsbcommentselected->set_border_color(dark_color_3); + graphsbcommentselected->set_border_color(graphnode_bg); Ref<StyleBoxFlat> graphsbbreakpoint = graphsbselected->duplicate(); graphsbbreakpoint->set_draw_center(false); graphsbbreakpoint->set_border_color(warning_color); @@ -1472,10 +1489,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { graphsbposition->set_draw_center(false); graphsbposition->set_border_color(error_color); graphsbposition->set_shadow_color(error_color * Color(1.0, 1.0, 1.0, 0.2)); - Ref<StyleBoxFlat> smgraphsb = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.7), gn_margin_side, 24, gn_margin_side, 5, corner_width); + Ref<StyleBoxEmpty> graphsbslot = make_empty_stylebox(12, 0, 12, 0); + Ref<StyleBoxFlat> smgraphsb = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.7), gn_margin_side, 24, gn_margin_side, gn_margin_bottom, corner_width); smgraphsb->set_border_width_all(border_width); - smgraphsb->set_border_color(dark_color_3); - Ref<StyleBoxFlat> smgraphsbselected = make_flat_stylebox(dark_color_3 * Color(1, 1, 1, 0.9), gn_margin_side, 24, gn_margin_side, 5, corner_width); + smgraphsb->set_border_color(graphnode_bg); + Ref<StyleBoxFlat> smgraphsbselected = make_flat_stylebox(graphnode_bg * Color(1, 1, 1, 0.9), gn_margin_side, 24, gn_margin_side, gn_margin_bottom, corner_width); smgraphsbselected->set_border_width_all(2 * EDSCALE + border_width); smgraphsbselected->set_border_color(Color(accent_color.r, accent_color.g, accent_color.b, 0.9)); smgraphsbselected->set_shadow_size(8 * EDSCALE); @@ -1492,19 +1510,20 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("comment_focus", "GraphNode", graphsbcommentselected); theme->set_stylebox("breakpoint", "GraphNode", graphsbbreakpoint); theme->set_stylebox("position", "GraphNode", graphsbposition); + theme->set_stylebox("slot", "GraphNode", graphsbslot); theme->set_stylebox("state_machine_frame", "GraphNode", smgraphsb); theme->set_stylebox("state_machine_selected_frame", "GraphNode", smgraphsbselected); - Color default_node_color = dark_color_1.inverted(); - theme->set_color("title_color", "GraphNode", default_node_color); - default_node_color.a = 0.7; - theme->set_color("close_color", "GraphNode", default_node_color); - theme->set_color("resizer_color", "GraphNode", default_node_color); + Color node_decoration_color = dark_color_1.inverted(); + theme->set_color("title_color", "GraphNode", node_decoration_color); + node_decoration_color.a = 0.7; + theme->set_color("close_color", "GraphNode", node_decoration_color); + theme->set_color("resizer_color", "GraphNode", node_decoration_color); - theme->set_constant("port_offset", "GraphNode", 14 * EDSCALE); - theme->set_constant("title_h_offset", "GraphNode", -16 * EDSCALE); - theme->set_constant("title_offset", "GraphNode", 20 * EDSCALE); - theme->set_constant("close_h_offset", "GraphNode", 20 * EDSCALE); + theme->set_constant("port_offset", "GraphNode", 0); + theme->set_constant("title_h_offset", "GraphNode", 12 * EDSCALE); + theme->set_constant("title_offset", "GraphNode", 21 * EDSCALE); + theme->set_constant("close_h_offset", "GraphNode", -2 * EDSCALE); theme->set_constant("close_offset", "GraphNode", 20 * EDSCALE); theme->set_constant("separation", "GraphNode", 1 * EDSCALE); @@ -1512,6 +1531,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("resizer", "GraphNode", theme->get_icon(SNAME("GuiResizer"), SNAME("EditorIcons"))); theme->set_icon("port", "GraphNode", theme->get_icon(SNAME("GuiGraphNodePort"), SNAME("EditorIcons"))); + theme->set_font("title_font", "GraphNode", theme->get_font(SNAME("main_bold_msdf"), SNAME("EditorFonts"))); + // GridContainer theme->set_constant("v_separation", "GridContainer", Math::round(widget_default_margin.y - 2 * EDSCALE)); diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h index 791a146a8d..39db518258 100644 --- a/editor/editor_toaster.h +++ b/editor/editor_toaster.h @@ -80,7 +80,7 @@ private: String tooltip; int count = 0; }; - Map<Control *, Toast> toasts; + HashMap<Control *, Toast> toasts; bool is_processing_error = false; // Makes sure that we don't handle errors that are triggered within the EditorToaster error processing. diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp index 27b8c3fd5d..ddb084e19b 100644 --- a/editor/editor_translation_parser.cpp +++ b/editor/editor_translation_parser.cpp @@ -33,7 +33,7 @@ #include "core/error/error_macros.h" #include "core/io/file_access.h" #include "core/object/script_language.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" EditorTranslationParser *EditorTranslationParser::singleton = nullptr; @@ -84,7 +84,7 @@ void EditorTranslationParserPlugin::_bind_methods() { ///////////////////////// void EditorTranslationParser::get_recognized_extensions(List<String> *r_extensions) const { - Set<String> extensions; + RBSet<String> extensions; List<String> temp; for (int i = 0; i < standard_parsers.size(); i++) { standard_parsers[i]->get_recognized_extensions(&temp); @@ -96,8 +96,8 @@ void EditorTranslationParser::get_recognized_extensions(List<String> *r_extensio for (int i = 0; i < temp.size(); i++) { extensions.insert(temp[i]); } - for (Set<String>::Element *E = extensions.front(); E; E = E->next()) { - r_extensions->push_back(E->get()); + for (const String &E : extensions) { + r_extensions->push_back(E); } } diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 68796683d2..50f03652ee 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -50,7 +50,7 @@ void ExportTemplateManager::_update_template_status() { Error err = da->change_dir(templates_dir); ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'."); - Set<String> templates; + RBSet<String> templates; da->list_dir_begin(); if (err == OK) { String c = da->get_next(); @@ -97,7 +97,7 @@ void ExportTemplateManager::_update_template_status() { installed_table->clear(); TreeItem *installed_root = installed_table->create_item(); - for (Set<String>::Element *E = templates.back(); E; E = E->prev()) { + for (RBSet<String>::Element *E = templates.back(); E; E = E->prev()) { String version_string = E->get(); if (version_string == current_version) { continue; @@ -694,7 +694,7 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_ ProgressDialog::get_singleton()->add_task("uncompress_src", TTR("Uncompressing Android Build Sources"), total_files); - Set<String> dirs_tested; + RBSet<String> dirs_tested; int idx = 0; while (ret == UNZ_OK) { // Get file path. diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp index 0a59ecf1b3..eed3917845 100644 --- a/editor/fileserver/editor_file_server.cpp +++ b/editor/fileserver/editor_file_server.cpp @@ -46,7 +46,7 @@ void EditorFileServer::_close_client(ClientData *cd) { cd->efs->to_wait.insert(cd->thread); } while (cd->files.size()) { - cd->files.erase(cd->files.front()); + cd->files.remove(cd->files.begin()); } memdelete(cd); } diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h index 7e771db55f..21abbc3f8c 100644 --- a/editor/fileserver/editor_file_server.h +++ b/editor/fileserver/editor_file_server.h @@ -49,13 +49,13 @@ class EditorFileServer : public Object { struct ClientData { Thread *thread = nullptr; Ref<StreamPeerTCP> connection; - Map<int, Ref<FileAccess>> files; + HashMap<int, Ref<FileAccess>> files; EditorFileServer *efs = nullptr; bool quit = false; }; Ref<TCPServer> server; - Set<Thread *> to_wait; + RBSet<Thread *> to_wait; static void _close_client(ClientData *cd); static void _subthread_start(void *s); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index aae8cf25b6..4c4d38c074 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -726,7 +726,7 @@ void FileSystemDock::_sort_file_info_list(List<FileSystemDock::FileInfo> &r_file void FileSystemDock::_update_file_list(bool p_keep_selection) { // Register the previously selected items. - Set<String> cselection; + RBSet<String> cselection; if (p_keep_selection) { for (int i = 0; i < files->get_item_count(); i++) { if (files->is_selected(i)) { @@ -1161,7 +1161,7 @@ void FileSystemDock::_get_all_items_in_dir(EditorFileSystemDirectory *efsd, Vect } } -void FileSystemDock::_find_remaps(EditorFileSystemDirectory *efsd, const Map<String, String> &renames, Vector<String> &to_remaps) const { +void FileSystemDock::_find_remaps(EditorFileSystemDirectory *efsd, const HashMap<String, String> &renames, Vector<String> &to_remaps) const { for (int i = 0; i < efsd->get_subdir_count(); i++) { _find_remaps(efsd->get_subdir(i), renames, to_remaps); } @@ -1177,7 +1177,7 @@ void FileSystemDock::_find_remaps(EditorFileSystemDirectory *efsd, const Map<Str } void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_new_path, - Map<String, String> &p_file_renames, Map<String, String> &p_folder_renames) { + HashMap<String, String> &p_file_renames, HashMap<String, String> &p_folder_renames) { // Ensure folder paths end with "/". String old_path = (p_item.is_file || p_item.path.ends_with("/")) ? p_item.path : (p_item.path + "/"); String new_path = (p_item.is_file || p_new_path.ends_with("/")) ? p_new_path : (p_new_path + "/"); @@ -1301,7 +1301,7 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin } } -void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> &p_renames) const { +void FileSystemDock::_update_resource_paths_after_move(const HashMap<String, String> &p_renames) const { // Rename all resources loaded, be it subresources or actual resources. List<Ref<Resource>> cached; ResourceCache::get_cached_resources(&cached); @@ -1346,7 +1346,7 @@ void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> } } -void FileSystemDock::_update_dependencies_after_move(const Map<String, String> &p_renames) const { +void FileSystemDock::_update_dependencies_after_move(const HashMap<String, String> &p_renames) const { // The following code assumes that the following holds: // 1) EditorFileSystem contains the old paths/folder structure from before the rename/move. // 2) ResourceLoader can use the new paths without needing to call rescan. @@ -1367,9 +1367,9 @@ void FileSystemDock::_update_dependencies_after_move(const Map<String, String> & } } -void FileSystemDock::_update_project_settings_after_move(const Map<String, String> &p_renames) const { +void FileSystemDock::_update_project_settings_after_move(const HashMap<String, String> &p_renames) const { // Find all project settings of type FILE and replace them if needed. - const Map<StringName, PropertyInfo> prop_info = ProjectSettings::get_singleton()->get_custom_property_info(); + const HashMap<StringName, PropertyInfo> prop_info = ProjectSettings::get_singleton()->get_custom_property_info(); for (const KeyValue<StringName, PropertyInfo> &E : prop_info) { if (E.value.hint == PROPERTY_HINT_FILE) { String old_path = GLOBAL_GET(E.key); @@ -1398,7 +1398,7 @@ void FileSystemDock::_update_project_settings_after_move(const Map<String, Strin ProjectSettings::get_singleton()->save(); } -void FileSystemDock::_update_favorites_list_after_move(const Map<String, String> &p_files_renames, const Map<String, String> &p_folders_renames) const { +void FileSystemDock::_update_favorites_list_after_move(const HashMap<String, String> &p_files_renames, const HashMap<String, String> &p_folders_renames) const { Vector<String> favorites = EditorSettings::get_singleton()->get_favorites(); Vector<String> new_favorites; @@ -1416,7 +1416,7 @@ void FileSystemDock::_update_favorites_list_after_move(const Map<String, String> EditorSettings::get_singleton()->set_favorites(new_favorites); } -void FileSystemDock::_save_scenes_after_move(const Map<String, String> &p_renames) const { +void FileSystemDock::_save_scenes_after_move(const HashMap<String, String> &p_renames) const { Vector<String> remaps; _find_remaps(EditorFileSystem::get_singleton()->get_filesystem(), p_renames, remaps); Vector<String> new_filenames; @@ -1577,8 +1577,8 @@ void FileSystemDock::_rename_operation_confirm() { return; } - Map<String, String> file_renames; - Map<String, String> folder_renames; + HashMap<String, String> file_renames; + HashMap<String, String> folder_renames; _try_move_item(to_rename, new_path, file_renames, folder_renames); int current_tab = EditorNode::get_singleton()->get_current_tab(); @@ -1677,8 +1677,8 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_ove } } - Map<String, String> file_renames; - Map<String, String> folder_renames; + HashMap<String, String> file_renames; + HashMap<String, String> folder_renames; bool is_moved = false; for (int i = 0; i < to_move.size(); i++) { String old_path = to_move[i].path.ends_with("/") ? to_move[i].path.substr(0, to_move[i].path.length() - 1) : to_move[i].path; diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index fc24b3e9fd..df3dd3fd69 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -108,7 +108,7 @@ private: VSplitContainer *split_box = nullptr; VBoxContainer *file_list_vb = nullptr; - Set<String> favorites; + RBSet<String> favorites; Button *button_toggle_display_mode = nullptr; Button *button_reload = nullptr; @@ -217,14 +217,14 @@ private: void _update_import_dock(); void _get_all_items_in_dir(EditorFileSystemDirectory *efsd, Vector<String> &files, Vector<String> &folders) const; - void _find_remaps(EditorFileSystemDirectory *efsd, const Map<String, String> &renames, Vector<String> &to_remaps) const; - void _try_move_item(const FileOrFolder &p_item, const String &p_new_path, Map<String, String> &p_file_renames, Map<String, String> &p_folder_renames); + void _find_remaps(EditorFileSystemDirectory *efsd, const HashMap<String, String> &renames, Vector<String> &to_remaps) const; + void _try_move_item(const FileOrFolder &p_item, const String &p_new_path, HashMap<String, String> &p_file_renames, HashMap<String, String> &p_folder_renames); void _try_duplicate_item(const FileOrFolder &p_item, const String &p_new_path) const; - void _update_dependencies_after_move(const Map<String, String> &p_renames) const; - void _update_resource_paths_after_move(const Map<String, String> &p_renames) const; - void _save_scenes_after_move(const Map<String, String> &p_renames) const; - void _update_favorites_list_after_move(const Map<String, String> &p_files_renames, const Map<String, String> &p_folders_renames) const; - void _update_project_settings_after_move(const Map<String, String> &p_renames) const; + void _update_dependencies_after_move(const HashMap<String, String> &p_renames) const; + void _update_resource_paths_after_move(const HashMap<String, String> &p_renames) const; + void _save_scenes_after_move(const HashMap<String, String> &p_renames) const; + void _update_favorites_list_after_move(const HashMap<String, String> &p_files_renames, const HashMap<String, String> &p_folders_renames) const; + void _update_project_settings_after_move(const HashMap<String, String> &p_renames) const; void _file_removed(String p_file); void _folder_removed(String p_folder); diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 41191271a1..aafaccf5be 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -99,7 +99,7 @@ void FindInFiles::set_folder(String folder) { _root_dir = folder; } -void FindInFiles::set_filter(const Set<String> &exts) { +void FindInFiles::set_filter(const RBSet<String> &exts) { _extension_filter = exts; } @@ -443,9 +443,9 @@ String FindInFilesDialog::get_folder() const { return text.strip_edges(); } -Set<String> FindInFilesDialog::get_filter() const { +RBSet<String> FindInFilesDialog::get_filter() const { // Could check the _filters_preferences but it might not have been generated yet. - Set<String> filters; + RBSet<String> filters; for (int i = 0; i < _filters_container->get_child_count(); ++i) { CheckBox *cb = static_cast<CheckBox *>(_filters_container->get_child(i)); if (cb->is_pressed()) { @@ -701,9 +701,9 @@ void FindInFilesPanel::_notification(int p_what) { void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin, int end, String text) { TreeItem *file_item; - Map<String, TreeItem *>::Element *E = _file_items.find(fpath); + HashMap<String, TreeItem *>::Iterator E = _file_items.find(fpath); - if (E == nullptr) { + if (!E) { file_item = _results_display->create_item(); file_item->set_text(0, fpath); file_item->set_metadata(0, fpath); @@ -715,7 +715,7 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin _file_items[fpath] = file_item; } else { - file_item = E->value(); + file_item = E->value; } int text_index = _with_replace ? 1 : 0; @@ -754,11 +754,11 @@ void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) { return; } - Map<TreeItem *, Result>::Element *E = _result_items.find(item); + HashMap<TreeItem *, Result>::Iterator E = _result_items.find(item); if (!E) { return; } - Result r = E->value(); + Result r = E->value; String item_text = item->get_text(_with_replace ? 1 : 0); Ref<Font> font = _results_display->get_theme_font(SNAME("font")); int font_size = _results_display->get_theme_font_size(SNAME("font_size")); @@ -818,12 +818,12 @@ void FindInFilesPanel::_on_cancel_button_clicked() { void FindInFilesPanel::_on_result_selected() { TreeItem *item = _results_display->get_selected(); - Map<TreeItem *, Result>::Element *E = _result_items.find(item); + HashMap<TreeItem *, Result>::Iterator E = _result_items.find(item); - if (E == nullptr) { + if (!E) { return; } - Result r = E->value(); + Result r = E->value; TreeItem *file_item = item->get_parent(); String fpath = file_item->get_metadata(0); @@ -850,9 +850,9 @@ void FindInFilesPanel::_on_replace_all_clicked() { continue; } - Map<TreeItem *, Result>::Element *F = _result_items.find(item); - ERR_FAIL_COND(F == nullptr); - locations.push_back(F->value()); + HashMap<TreeItem *, Result>::Iterator F = _result_items.find(item); + ERR_FAIL_COND(!F); + locations.push_back(F->value); } if (locations.size() != 0) { diff --git a/editor/find_in_files.h b/editor/find_in_files.h index 9def190b5b..8bc7b506d0 100644 --- a/editor/find_in_files.h +++ b/editor/find_in_files.h @@ -46,7 +46,7 @@ public: void set_whole_words(bool p_whole_word); void set_match_case(bool p_match_case); void set_folder(String folder); - void set_filter(const Set<String> &exts); + void set_filter(const RBSet<String> &exts); String get_search_text() const { return _pattern; } @@ -72,7 +72,7 @@ private: // Config String _pattern; - Set<String> _extension_filter; + RBSet<String> _extension_filter; String _root_dir; bool _whole_words = true; bool _match_case = true; @@ -115,7 +115,7 @@ public: bool is_match_case() const; bool is_whole_words() const; String get_folder() const; - Set<String> get_filter() const; + RBSet<String> get_filter() const; protected: void _notification(int p_what); @@ -208,8 +208,8 @@ private: Button *_refresh_button = nullptr; Button *_cancel_button = nullptr; ProgressBar *_progress_bar = nullptr; - Map<String, TreeItem *> _file_items; - Map<TreeItem *, Result> _result_items; + HashMap<String, TreeItem *> _file_items; + HashMap<TreeItem *, Result> _result_items; bool _with_replace = false; HBoxContainer *_replace_container = nullptr; diff --git a/editor/icons/TextMesh.svg b/editor/icons/TextMesh.svg new file mode 100644 index 0000000000..234ce7568e --- /dev/null +++ b/editor/icons/TextMesh.svg @@ -0,0 +1 @@ +<svg stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:vectornator="http://vectornator.io"><g fill="#ffca5f" fill-rule="evenodd" vectornator:layerName="Untitled"><path d="M1 1h14v2H1V1Z"/><path d="M7 1h2v14H7V1Z"/><path d="M5 14h6v1H5v-1ZM2 1v4H1V1h1Zm13 0v4h-1V1h1ZM2 3v2a2 2 0 0 1 2-2H2Zm10 0a2 2 0 0 1 2 2V3h-2ZM5 14a2 2 0 0 0 2-2v2H5Zm6 0a2 2 0 0 1-2-2v2h2Z"/></g></svg> diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp index e68c5e9a22..71b5ddc216 100644 --- a/editor/import/collada.cpp +++ b/editor/import/collada.cpp @@ -1645,12 +1645,12 @@ void Collada::_parse_animation(XMLParser &parser) { return; } - Map<String, Vector<float>> float_sources; - Map<String, Vector<String>> string_sources; - Map<String, int> source_strides; - Map<String, Map<String, String>> samplers; - Map<String, Vector<String>> source_param_names; - Map<String, Vector<String>> source_param_types; + HashMap<String, Vector<float>> float_sources; + HashMap<String, Vector<String>> string_sources; + HashMap<String, int> source_strides; + HashMap<String, HashMap<String, String>> samplers; + HashMap<String, Vector<String>> source_param_names; + HashMap<String, Vector<String>> source_param_types; String id = ""; if (parser.has_attribute("id")) { @@ -1685,7 +1685,7 @@ void Collada::_parse_animation(XMLParser &parser) { } } else if (name == "sampler") { current_sampler = parser.get_attribute_value("id"); - samplers[current_sampler] = Map<String, String>(); + samplers[current_sampler] = HashMap<String, String>(); } else if (name == "param") { if (parser.has_attribute("name")) { source_param_names[current_source].push_back(parser.get_attribute_value("name")); @@ -1718,7 +1718,7 @@ void Collada::_parse_animation(XMLParser &parser) { String source = _uri_to_id(channel_sources[i]); String target = channel_targets[i]; ERR_CONTINUE(!samplers.has(source)); - Map<String, String> &sampler = samplers[source]; + HashMap<String, String> &sampler = samplers[source]; ERR_CONTINUE(!sampler.has("INPUT")); //no input semantic? wtf? String input_id = _uri_to_id(sampler["INPUT"]); @@ -2029,7 +2029,7 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) { NodeGeometry *gnode = static_cast<NodeGeometry *>(p_node); if (gnode->controller) { // recount skeletons used - Set<NodeSkeleton *> skeletons; + RBSet<NodeSkeleton *> skeletons; for (int i = 0; i < gnode->skeletons.size(); i++) { String nodeid = gnode->skeletons[i]; @@ -2049,7 +2049,7 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) { if (skeletons.size() > 1) { //do the merger!! - Set<NodeSkeleton *>::Element *E = skeletons.front(); + RBSet<NodeSkeleton *>::Element *E = skeletons.front(); NodeSkeleton *base = E->get(); for (E = E->next(); E; E = E->next()) { diff --git a/editor/import/collada.h b/editor/import/collada.h index df2b789081..6ac6181769 100644 --- a/editor/import/collada.h +++ b/editor/import/collada.h @@ -33,7 +33,7 @@ #include "core/config/project_settings.h" #include "core/io/xml_parser.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "scene/resources/material.h" class Collada { @@ -54,7 +54,7 @@ public: struct Effect { String name; - Map<String, Variant> params; + HashMap<String, Variant> params; struct Channel { int uv_idx = 0; @@ -131,13 +131,13 @@ public: int stride = 0; }; - Map<String, Source> sources; + HashMap<String, Source> sources; struct Vertices { - Map<String, String> sources; + HashMap<String, String> sources; }; - Map<String, Vertices> vertices; + HashMap<String, Vertices> vertices; struct Primitives { struct SourceRef { @@ -146,7 +146,7 @@ public: }; String material; - Map<String, SourceRef> sources; + HashMap<String, SourceRef> sources; Vector<float> polygons; Vector<float> indices; int count = 0; @@ -171,9 +171,9 @@ public: int stride = 0; }; - Map<String, Source> sources; + HashMap<String, Source> sources; - Map<String, String> control_vertices; + HashMap<String, String> control_vertices; CurveData() {} }; @@ -191,10 +191,10 @@ public: Source() {} }; - Map<String, Source> sources; + HashMap<String, Source> sources; struct Joints { - Map<String, String> sources; + HashMap<String, String> sources; } joints; struct Weights { @@ -204,13 +204,13 @@ public: }; String material; - Map<String, SourceRef> sources; + HashMap<String, SourceRef> sources; Vector<float> sets; Vector<float> indices; int count = 0; } weights; - Map<String, Transform3D> bone_rest_map; + HashMap<String, Transform3D> bone_rest_map; SkinControllerData() {} }; @@ -226,9 +226,9 @@ public: Source() {} }; - Map<String, Source> sources; + HashMap<String, Source> sources; - Map<String, String> targets; + HashMap<String, String> targets; MorphControllerData() {} }; @@ -382,7 +382,7 @@ public: String target; }; - Map<String, Material> material_map; + HashMap<String, Material> material_map; Vector<String> skeletons; NodeGeometry() { type = TYPE_GEOMETRY; } @@ -476,28 +476,28 @@ public: } } version; - Map<String, CameraData> camera_data_map; - Map<String, MeshData> mesh_data_map; - Map<String, LightData> light_data_map; - Map<String, CurveData> curve_data_map; + HashMap<String, CameraData> camera_data_map; + HashMap<String, MeshData> mesh_data_map; + HashMap<String, LightData> light_data_map; + HashMap<String, CurveData> curve_data_map; - Map<String, String> mesh_name_map; - Map<String, String> morph_name_map; - Map<String, String> morph_ownership_map; - Map<String, SkinControllerData> skin_controller_data_map; - Map<String, MorphControllerData> morph_controller_data_map; + HashMap<String, String> mesh_name_map; + HashMap<String, String> morph_name_map; + HashMap<String, String> morph_ownership_map; + HashMap<String, SkinControllerData> skin_controller_data_map; + HashMap<String, MorphControllerData> morph_controller_data_map; - Map<String, Image> image_map; - Map<String, Material> material_map; - Map<String, Effect> effect_map; + HashMap<String, Image> image_map; + HashMap<String, Material> material_map; + HashMap<String, Effect> effect_map; - Map<String, VisualScene> visual_scene_map; - Map<String, Node *> scene_map; - Set<String> idref_joints; - Map<String, String> sid_to_node_map; - //Map<String,NodeJoint*> bone_map; + HashMap<String, VisualScene> visual_scene_map; + HashMap<String, Node *> scene_map; + RBSet<String> idref_joints; + HashMap<String, String> sid_to_node_map; + //RBMap<String,NodeJoint*> bone_map; - Map<String, Transform3D> bone_rest_map; + HashMap<String, Transform3D> bone_rest_map; String local_path; String root_visual_scene; @@ -505,8 +505,8 @@ public: Vector<AnimationClip> animation_clips; Vector<AnimationTrack> animation_tracks; - Map<String, Vector<int>> referenced_tracks; - Map<String, Vector<int>> by_id_tracks; + HashMap<String, Vector<int>> referenced_tracks; + HashMap<String, Vector<int>> by_id_tracks; float animation_length = 0; @@ -524,7 +524,7 @@ public: int get_uv_channel(String p_name); private: // private stuff - Map<String, int> channel_map; + HashMap<String, int> channel_map; void _parse_asset(XMLParser &parser); void _parse_image(XMLParser &parser); diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp index 451cb245dd..815366b279 100644 --- a/editor/import/dynamic_font_import_settings.cpp +++ b/editor/import/dynamic_font_import_settings.cpp @@ -45,8 +45,8 @@ class DynamicFontImportSettingsData : public RefCounted { GDCLASS(DynamicFontImportSettingsData, RefCounted) friend class DynamicFontImportSettings; - Map<StringName, Variant> settings; - Map<StringName, Variant> defaults; + HashMap<StringName, Variant> settings; + HashMap<StringName, Variant> defaults; List<ResourceImporter::ImportOption> options; DynamicFontImportSettings *owner = nullptr; @@ -581,10 +581,10 @@ void DynamicFontImportSettings::_variations_validate() { for (TreeItem *vars_item_b = vars_list_root->get_first_child(); vars_item_b; vars_item_b = vars_item_b->get_next()) { if (vars_item_b != vars_item_a) { bool match = true; - for (Map<StringName, Variant>::Element *E = import_variation_data_a->settings.front(); E; E = E->next()) { + for (const KeyValue<StringName, Variant> &E : import_variation_data_a->settings) { Ref<DynamicFontImportSettingsData> import_variation_data_b = vars_item_b->get_metadata(0); ERR_FAIL_NULL(import_variation_data_b); - match = match && (import_variation_data_b->settings[E->key()] == E->get()); + match = match && (import_variation_data_b->settings[E.key] == E.value); } if (match) { warn = TTR("Warning: Multiple configurations have identical settings. Duplicates will be ignored."); @@ -927,7 +927,7 @@ void DynamicFontImportSettings::_notification(int p_what) { } void DynamicFontImportSettings::_re_import() { - Map<StringName, Variant> main_settings; + HashMap<StringName, Variant> main_settings; main_settings["antialiased"] = import_settings_data->get("antialiased"); main_settings["generate_mipmaps"] = import_settings_data->get("generate_mipmaps"); @@ -950,11 +950,11 @@ void DynamicFontImportSettings::_re_import() { String name = vars_item->get_text(0); variation += ("name=" + name); - for (Map<StringName, Variant>::Element *E = import_variation_data->settings.front(); E; E = E->next()) { + for (const KeyValue<StringName, Variant> &E : import_variation_data->settings) { if (!variation.is_empty()) { variation += ","; } - variation += (String(E->key()) + "=" + String(E->get())); + variation += (String(E.key) + "=" + String(E.value)); } variations.push_back(variation); } @@ -991,7 +991,7 @@ void DynamicFontImportSettings::_re_import() { if (!selected_chars.is_empty()) { Vector<String> ranges; char32_t start = selected_chars.front()->get(); - for (Set<char32_t>::Element *E = selected_chars.front()->next(); E; E = E->next()) { + for (RBSet<char32_t>::Element *E = selected_chars.front()->next(); E; E = E->next()) { if (E->prev() && ((E->prev()->get() + 1) != E->get())) { ranges.push_back(String("0x") + String::num_int64(start, 16) + String("-0x") + String::num_int64(E->prev()->get(), 16)); start = E->get(); @@ -1004,7 +1004,7 @@ void DynamicFontImportSettings::_re_import() { if (!selected_glyphs.is_empty()) { Vector<String> ranges; int32_t start = selected_glyphs.front()->get(); - for (Set<int32_t>::Element *E = selected_glyphs.front()->next(); E; E = E->next()) { + for (RBSet<int32_t>::Element *E = selected_glyphs.front()->next(); E; E = E->next()) { if (E->prev() && ((E->prev()->get() + 1) != E->get())) { ranges.push_back(String("0x") + String::num_int64(start, 16) + String("-0x") + String::num_int64(E->prev()->get(), 16)); start = E->get(); @@ -1024,8 +1024,8 @@ void DynamicFontImportSettings::_re_import() { if (OS::get_singleton()->is_stdout_verbose()) { print_line("Import settings:"); - for (Map<StringName, Variant>::Element *E = main_settings.front(); E; E = E->next()) { - print_line(String(" ") + String(E->key()).utf8().get_data() + " == " + String(E->get()).utf8().get_data()); + for (const KeyValue<StringName, Variant> &E : main_settings) { + print_line(String(" ") + String(E.key).utf8().get_data() + " == " + String(E.value).utf8().get_data()); } } diff --git a/editor/import/dynamic_font_import_settings.h b/editor/import/dynamic_font_import_settings.h index c1e868403f..4e2135a13c 100644 --- a/editor/import/dynamic_font_import_settings.h +++ b/editor/import/dynamic_font_import_settings.h @@ -161,8 +161,8 @@ class DynamicFontImportSettings : public ConfirmationDialog { Ref<Font> font_preview; Ref<Font> font_main; - Set<char32_t> selected_chars; - Set<int32_t> selected_glyphs; + RBSet<char32_t> selected_chars; + RBSet<int32_t> selected_glyphs; void _re_import(); diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 013dcb5deb..03fda0a1c3 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -67,34 +67,34 @@ struct ColladaImport { bool use_mesh_builtin_materials = false; float bake_fps = 15; - Map<String, NodeMap> node_map; //map from collada node to engine node - Map<String, String> node_name_map; //map from collada node to engine node - Map<String, Ref<ImporterMesh>> mesh_cache; - Map<String, Ref<Curve3D>> curve_cache; - Map<String, Ref<Material>> material_cache; - Map<Collada::Node *, Skeleton3D *> skeleton_map; + HashMap<String, NodeMap> node_map; //map from collada node to engine node + HashMap<String, String> node_name_map; //map from collada node to engine node + HashMap<String, Ref<ImporterMesh>> mesh_cache; + HashMap<String, Ref<Curve3D>> curve_cache; + HashMap<String, Ref<Material>> material_cache; + HashMap<Collada::Node *, Skeleton3D *> skeleton_map; - Map<Skeleton3D *, Map<String, int>> skeleton_bone_map; + HashMap<Skeleton3D *, HashMap<String, int>> skeleton_bone_map; - Set<String> valid_animated_nodes; + RBSet<String> valid_animated_nodes; Vector<int> valid_animated_properties; - Map<String, bool> bones_with_animation; + HashMap<String, bool> bones_with_animation; - Set<String> mesh_unique_names; - Set<String> material_unique_names; + RBSet<String> mesh_unique_names; + RBSet<String> material_unique_names; Error _populate_skeleton(Skeleton3D *p_skeleton, Collada::Node *p_node, int &r_bone, int p_parent); Error _create_scene_skeletons(Collada::Node *p_node); Error _create_scene(Collada::Node *p_node, Node3D *p_parent); Error _create_resources(Collada::Node *p_node, bool p_use_compression); Error _create_material(const String &p_target); - Error _create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes = Vector<Ref<ImporterMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); + Error _create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const HashMap<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes = Vector<Ref<ImporterMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); Error load(const String &p_path, int p_flags, bool p_force_make_tangents = false, bool p_use_compression = false); void _fix_param_animation_tracks(); void create_animation(int p_clip, bool p_import_value_tracks); void create_animations(bool p_import_value_tracks); - Set<String> tracks_in_clips; + RBSet<String> tracks_in_clips; Vector<String> missing_textures; void _pre_process_lights(Collada::Node *p_node); @@ -467,7 +467,7 @@ Error ColladaImport::_create_material(const String &p_target) { return OK; } -Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { +Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p_mesh, const HashMap<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform3D &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ImporterMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { bool local_xform_mirror = p_local_xform.basis.determinant() < 0; if (p_morph_data) { @@ -637,7 +637,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p /* ADD WEIGHTS IF EXIST */ /************************/ - Map<int, Vector<Collada::Vertex::Weight>> pre_weights; + HashMap<int, Vector<Collada::Vertex::Weight>> pre_weights; bool has_weights = false; @@ -727,7 +727,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p has_weights = true; } - Set<Collada::Vertex> vertex_set; //vertex set will be the vertices + RBSet<Collada::Vertex> vertex_set; //vertex set will be the vertices List<int> indices_list; //indices will be the indices /**************************/ @@ -875,8 +875,8 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p Vector<Collada::Vertex> vertex_array; //there we go, vertex array vertex_array.resize(vertex_set.size()); - for (Set<Collada::Vertex>::Element *F = vertex_set.front(); F; F = F->next()) { - vertex_array.write[F->get().idx] = F->get(); + for (Collada::Vertex &F : vertex_set) { + vertex_array.write[F.idx] = F; } if (has_weights) { @@ -1127,7 +1127,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres Skeleton3D *sk = Object::cast_to<Skeleton3D>(nmsk.node); ERR_FAIL_COND_V(!sk, ERR_INVALID_DATA); ERR_FAIL_COND_V(!skeleton_bone_map.has(sk), ERR_INVALID_DATA); - Map<String, int> &bone_remap_map = skeleton_bone_map[sk]; + HashMap<String, int> &bone_remap_map = skeleton_bone_map[sk]; meshid = skin->base; @@ -1452,7 +1452,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { //main anim } - Set<int> track_filter; + RBSet<int> track_filter; if (p_clip == -1) { for (int i = 0; i < collada.state.animation_clips.size(); i++) { @@ -1507,14 +1507,14 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { bool tracks_found = false; - for (Set<String>::Element *E = valid_animated_nodes.front(); E; E = E->next()) { + for (const String &E : valid_animated_nodes) { // take snapshots - if (!collada.state.scene_map.has(E->get())) { + if (!collada.state.scene_map.has(E)) { continue; } - NodeMap &nm = node_map[E->get()]; + NodeMap &nm = node_map[E]; String path = scene->get_path_to(nm.node); if (nm.bone >= 0) { @@ -1525,7 +1525,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { bool found_anim = false; - Collada::Node *cn = collada.state.scene_map[E->get()]; + Collada::Node *cn = collada.state.scene_map[E]; if (cn->ignore_anim) { continue; } @@ -1665,7 +1665,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { if (nm.bone >= 0) { if (found_anim) { - bones_with_animation[E->get()] = true; + bones_with_animation[E] = true; } } @@ -1754,7 +1754,7 @@ void EditorSceneFormatImporterCollada::get_extensions(List<String> *r_extensions r_extensions->push_back("dae"); } -Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { if (r_err) { *r_err = OK; } diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h index be3f74d821..e45db47440 100644 --- a/editor/import/editor_import_collada.h +++ b/editor/import/editor_import_collada.h @@ -39,7 +39,7 @@ class EditorSceneFormatImporterCollada : public EditorSceneFormatImporter { public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override; EditorSceneFormatImporterCollada(); }; diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp index f7d373ef60..e822b4963a 100644 --- a/editor/import/editor_import_plugin.cpp +++ b/editor/import/editor_import_plugin.cpp @@ -147,12 +147,12 @@ void EditorImportPlugin::get_import_options(const String &p_path, List<ResourceI ERR_FAIL_MSG("Unimplemented _get_import_options in add-on."); } -bool EditorImportPlugin::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool EditorImportPlugin::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { Dictionary d; - Map<StringName, Variant>::Element *E = p_options.front(); + HashMap<StringName, Variant>::ConstIterator E = p_options.begin(); while (E) { - d[E->key()] = E->get(); - E = E->next(); + d[E->key] = E->value; + ++E; } bool visible; if (GDVIRTUAL_CALL(_get_option_visibility, p_path, p_option, d, visible)) { @@ -162,14 +162,14 @@ bool EditorImportPlugin::get_option_visibility(const String &p_path, const Strin ERR_FAIL_V_MSG(false, "Unimplemented _get_option_visibility in add-on."); } -Error EditorImportPlugin::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error EditorImportPlugin::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { Dictionary options; Array platform_variants, gen_files; - Map<StringName, Variant>::Element *E = p_options.front(); + HashMap<StringName, Variant>::ConstIterator E = p_options.begin(); while (E) { - options[E->key()] = E->get(); - E = E->next(); + options[E->key] = E->value; + ++E; } int err; diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h index 6cff8fb917..44fbd41962 100644 --- a/editor/import/editor_import_plugin.h +++ b/editor/import/editor_import_plugin.h @@ -64,8 +64,8 @@ public: virtual float get_priority() const override; virtual int get_import_order() const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr) override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr) override; }; #endif //EDITOR_IMPORT_PLUGIN_H diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp index 46d15e8989..966719dc48 100644 --- a/editor/import/resource_importer_bitmask.cpp +++ b/editor/import/resource_importer_bitmask.cpp @@ -55,7 +55,7 @@ String ResourceImporterBitMap::get_resource_type() const { return "BitMap"; } -bool ResourceImporterBitMap::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterBitMap::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -72,7 +72,7 @@ void ResourceImporterBitMap::get_import_options(const String &p_path, List<Impor r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5)); } -Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { int create_from = p_options["create_from"]; float threshold = p_options["threshold"]; Ref<Image> image; diff --git a/editor/import/resource_importer_bitmask.h b/editor/import/resource_importer_bitmask.h index 6dd6843171..8682ab80a3 100644 --- a/editor/import/resource_importer_bitmask.h +++ b/editor/import/resource_importer_bitmask.h @@ -47,8 +47,8 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterBitMap(); ~ResourceImporterBitMap(); diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp index 8a655fbc0c..8a40b113b9 100644 --- a/editor/import/resource_importer_bmfont.cpp +++ b/editor/import/resource_importer_bmfont.cpp @@ -55,7 +55,7 @@ String ResourceImporterBMFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterBMFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterBMFont::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -63,7 +63,7 @@ void ResourceImporterBMFont::get_import_options(const String &p_path, List<Impor r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true)); } -Error ResourceImporterBMFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterBMFont::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { print_verbose("Importing BMFont font from: " + p_source_file); Ref<FontData> font; diff --git a/editor/import/resource_importer_bmfont.h b/editor/import/resource_importer_bmfont.h index e5a96e2c40..0711302bd5 100644 --- a/editor/import/resource_importer_bmfont.h +++ b/editor/import/resource_importer_bmfont.h @@ -46,9 +46,9 @@ public: virtual String get_resource_type() const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterBMFont(); }; diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index ee6500a643..0b3622e3c0 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -55,7 +55,7 @@ String ResourceImporterCSVTranslation::get_resource_type() const { return "Translation"; } -bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -72,7 +72,7 @@ void ResourceImporterCSVTranslation::get_import_options(const String &p_path, Li r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "delimiter", PROPERTY_HINT_ENUM, "Comma,Semicolon,Tab"), 0)); } -Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { bool compress = p_options["compress"]; String delimiter; diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h index 8f6cf94984..306aafa843 100644 --- a/editor/import/resource_importer_csv_translation.h +++ b/editor/import/resource_importer_csv_translation.h @@ -47,9 +47,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterCSVTranslation(); }; diff --git a/editor/import/resource_importer_dynamic_font.cpp b/editor/import/resource_importer_dynamic_font.cpp index 2dc24c9d44..04f6a0b7af 100644 --- a/editor/import/resource_importer_dynamic_font.cpp +++ b/editor/import/resource_importer_dynamic_font.cpp @@ -67,7 +67,7 @@ String ResourceImporterDynamicFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterDynamicFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterDynamicFont::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_option == "msdf_pixel_range" && !bool(p_options["multichannel_signed_distance_field"])) { return false; } @@ -176,7 +176,7 @@ void ResourceImporterDynamicFont::show_advanced_options(const String &p_path) { DynamicFontImportSettings::get_singleton()->open_settings(p_path); } -Error ResourceImporterDynamicFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterDynamicFont::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { print_verbose("Importing dynamic font from: " + p_source_file); bool antialiased = p_options["antialiased"]; diff --git a/editor/import/resource_importer_dynamic_font.h b/editor/import/resource_importer_dynamic_font.h index 2761b418e1..c0b6c094b0 100644 --- a/editor/import/resource_importer_dynamic_font.h +++ b/editor/import/resource_importer_dynamic_font.h @@ -56,12 +56,12 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; bool has_advanced_options() const override; void show_advanced_options(const String &p_path) override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterDynamicFont(); }; diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp index 8514df76bb..fa7c4cd24f 100644 --- a/editor/import/resource_importer_image.cpp +++ b/editor/import/resource_importer_image.cpp @@ -55,7 +55,7 @@ String ResourceImporterImage::get_resource_type() const { return "Image"; } -bool ResourceImporterImage::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterImage::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -70,7 +70,7 @@ String ResourceImporterImage::get_preset_name(int p_idx) const { void ResourceImporterImage::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { } -Error ResourceImporterImage::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterImage::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { Ref<FileAccess> f = FileAccess::open(p_source_file, FileAccess::READ); ERR_FAIL_COND_V_MSG(f.is_null(), ERR_CANT_OPEN, "Cannot open file from path '" + p_source_file + "'."); diff --git a/editor/import/resource_importer_image.h b/editor/import/resource_importer_image.h index 81aedc91e8..a1a345287e 100644 --- a/editor/import/resource_importer_image.h +++ b/editor/import/resource_importer_image.h @@ -48,9 +48,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterImage(); }; diff --git a/editor/import/resource_importer_imagefont.cpp b/editor/import/resource_importer_imagefont.cpp index 2b67a171cc..bbcd336575 100644 --- a/editor/import/resource_importer_imagefont.cpp +++ b/editor/import/resource_importer_imagefont.cpp @@ -55,7 +55,7 @@ String ResourceImporterImageFont::get_resource_type() const { return "FontData"; } -bool ResourceImporterImageFont::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterImageFont::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -85,7 +85,7 @@ bool ResourceImporterImageFont::_decode_range(const String &p_token, int32_t &r_ } } -Error ResourceImporterImageFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterImageFont::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { print_verbose("Importing image font from: " + p_source_file); int columns = p_options["columns"]; diff --git a/editor/import/resource_importer_imagefont.h b/editor/import/resource_importer_imagefont.h index c1116d5a83..f46bc8c19b 100644 --- a/editor/import/resource_importer_imagefont.h +++ b/editor/import/resource_importer_imagefont.h @@ -48,9 +48,9 @@ public: virtual String get_resource_type() const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterImageFont(); }; diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 7c0c99cd29..bacd09592e 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -119,7 +119,7 @@ String ResourceImporterLayeredTexture::get_resource_type() const { ERR_FAIL_V(String()); } -bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_option == "compress/lossy_quality" && p_options.has("compress/mode")) { return int(p_options["compress/mode"]) == COMPRESS_LOSSY; } @@ -282,7 +282,7 @@ void ResourceImporterLayeredTexture::_save_tex(Vector<Ref<Image>> p_images, cons } } -Error ResourceImporterLayeredTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterLayeredTexture::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { int compress_mode = p_options["compress/mode"]; float lossy = p_options["compress/lossy_quality"]; int hdr_compression = p_options["compress/hdr_compression"]; diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h index 5791914a9b..5a29010c3b 100644 --- a/editor/import/resource_importer_layered_texture.h +++ b/editor/import/resource_importer_layered_texture.h @@ -43,7 +43,7 @@ class LayeredTextureImport : public RefCounted { public: Image::CompressSource *csource = nullptr; String save_path; - Map<StringName, Variant> options; + HashMap<StringName, Variant> options; List<String> *platform_variants = nullptr; Ref<Image> image = nullptr; Array formats_imported; @@ -108,11 +108,11 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; void _save_tex(Vector<Ref<Image>> p_images, const String &p_to_path, int p_compress_mode, float p_lossy, Image::CompressMode p_vram_compression, Image::CompressSource p_csource, Image::UsedChannels used_channels, bool p_mipmaps, bool p_force_po2); - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; virtual bool are_import_settings_valid(const String &p_path) const override; virtual String get_import_settings_string() const override; diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 88837d089a..6fbfecfdfa 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -43,7 +43,7 @@ uint32_t EditorOBJImporter::get_import_flags() const { return IMPORT_SCENE; } -static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D>> &material_map, List<String> *r_missing_deps) { +static Error _parse_material_library(const String &p_path, HashMap<String, Ref<StandardMaterial3D>> &material_map, List<String> *r_missing_deps) { Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(f.is_null(), ERR_CANT_OPEN, vformat("Couldn't open MTL file '%s', it may not exist or not be readable.", p_path)); @@ -219,7 +219,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ Vector<Vector2> uvs; String name; - Map<String, Map<String, Ref<StandardMaterial3D>>> material_map; + HashMap<String, HashMap<String, Ref<StandardMaterial3D>>> material_map; Ref<SurfaceTool> surf_tool = memnew(SurfaceTool); surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES); @@ -402,7 +402,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ current_material_library = l.replace("mtllib", "").strip_edges(); if (!material_map.has(current_material_library)) { - Map<String, Ref<StandardMaterial3D>> lib; + HashMap<String, Ref<StandardMaterial3D>> lib; String lib_path = current_material_library; if (lib_path.is_relative_path()) { lib_path = p_path.get_base_dir().plus_file(current_material_library); @@ -422,7 +422,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ return OK; } -Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { List<Ref<Mesh>> meshes; Error err = _parse_obj(p_path, meshes, false, p_flags & IMPORT_GENERATE_TANGENT_ARRAYS, false, Vector3(1, 1, 1), Vector3(0, 0, 0), r_missing_deps); @@ -505,11 +505,11 @@ void ResourceImporterOBJ::get_import_options(const String &p_path, List<ImportOp r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "optimize_mesh"), true)); } -bool ResourceImporterOBJ::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterOBJ::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } -Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { List<Ref<Mesh>> meshes; Error err = _parse_obj(p_source_file, meshes, true, p_options["generate_tangents"], p_options["optimize_mesh"], p_options["scale_mesh"], p_options["offset_mesh"], nullptr); diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h index 1b5e8bbdc1..3da9f02adb 100644 --- a/editor/import/resource_importer_obj.h +++ b/editor/import/resource_importer_obj.h @@ -39,7 +39,7 @@ class EditorOBJImporter : public EditorSceneFormatImporter { public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; EditorOBJImporter(); }; @@ -59,9 +59,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; // Threaded import can currently cause deadlocks, see GH-48265. virtual bool can_import_threaded() const override { return false; } diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 43b52177c6..4f666730d5 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -74,7 +74,7 @@ void EditorSceneFormatImporter::get_extensions(List<String> *r_extensions) const ERR_FAIL(); } -Node *EditorSceneFormatImporter::import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporter::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Dictionary options_dict; for (const KeyValue<StringName, Variant> &elem : p_options) { options_dict[elem.key] = elem.value; @@ -91,7 +91,7 @@ void EditorSceneFormatImporter::get_import_options(const String &p_path, List<Re GDVIRTUAL_CALL(_get_import_options, p_path); } -Variant EditorSceneFormatImporter::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) { +Variant EditorSceneFormatImporter::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) { Variant ret; GDVIRTUAL_CALL(_get_option_visibility, p_path, p_for_animation, p_option, ret); return ret; @@ -166,14 +166,14 @@ void EditorScenePostImportPlugin::get_internal_import_options(InternalImportCate GDVIRTUAL_CALL(_get_internal_import_options, p_category); current_option_list = nullptr; } -Variant EditorScenePostImportPlugin::get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) const { +Variant EditorScenePostImportPlugin::get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) const { current_options = &p_options; Variant ret; GDVIRTUAL_CALL(_get_internal_option_visibility, p_category, p_for_animation, p_option, ret); current_options = nullptr; return ret; } -Variant EditorScenePostImportPlugin::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { +Variant EditorScenePostImportPlugin::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const { current_options = &p_options; Variant ret; GDVIRTUAL_CALL(_get_internal_option_update_view_required, p_category, p_option, ret); @@ -192,7 +192,7 @@ void EditorScenePostImportPlugin::get_import_options(const String &p_path, List< GDVIRTUAL_CALL(_get_import_options, p_path); current_option_list = nullptr; } -Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) const { +Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) const { current_options = &p_options; Variant ret; GDVIRTUAL_CALL(_get_option_visibility, p_path, p_for_animation, p_option, ret); @@ -200,12 +200,12 @@ Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, return ret; } -void EditorScenePostImportPlugin::pre_process(Node *p_scene, const Map<StringName, Variant> &p_options) { +void EditorScenePostImportPlugin::pre_process(Node *p_scene, const HashMap<StringName, Variant> &p_options) { current_options = &p_options; GDVIRTUAL_CALL(_pre_process, p_scene); current_options = nullptr; } -void EditorScenePostImportPlugin::post_process(Node *p_scene, const Map<StringName, Variant> &p_options) { +void EditorScenePostImportPlugin::post_process(Node *p_scene, const HashMap<StringName, Variant> &p_options) { current_options = &p_options; GDVIRTUAL_CALL(_post_process, p_scene); current_options = nullptr; @@ -263,7 +263,7 @@ int ResourceImporterScene::get_format_version() const { return 1; } -bool ResourceImporterScene::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterScene::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (animation_importer) { if (p_option == "animation/import") { // Option ignored, animation always imported. return false; @@ -367,7 +367,7 @@ static void _pre_gen_shape_list(Ref<ImporterMesh> &mesh, Vector<Ref<Shape3D>> &r } } -Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames) { +Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames) { // Children first. for (int i = 0; i < p_node->get_child_count(); i++) { Node *r = _pre_fix_node(p_node->get_child(i), p_root, r_collision_map, r_occluder_arrays, r_node_renames); @@ -466,7 +466,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I static const char *loop_strings[loop_string_count] = { "loop_mode", "loop", "cycle" }; for (int i = 0; i < loop_string_count; i++) { if (_teststr(animname, loop_strings[i])) { - anim->set_loop_mode(Animation::LoopMode::LOOP_LINEAR); + anim->set_loop_mode(Animation::LOOP_LINEAR); animname = _fixstr(animname, loop_strings[i]); Ref<AnimationLibrary> library = ap->get_animation_library(ap->find_animation_library(anim)); @@ -704,7 +704,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I return p_node; } -Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, Set<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) { +Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, RBSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) { // children first for (int i = 0; i < p_node->get_child_count(); i++) { Node *r = _post_fix_node(p_node->get_child(i), p_root, collision_map, r_occluder_arrays, r_scanned_meshes, p_node_data, p_material_data, p_animation_data, p_animation_fps); @@ -1356,7 +1356,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p } } -bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_options.has("import/skip_import") && p_option != "import/skip_import" && bool(p_options["import/skip_import"])) { return false; //if skip import } @@ -1475,7 +1475,7 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor return true; } -bool ResourceImporterScene::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterScene::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const { switch (p_category) { case INTERNAL_IMPORT_CATEGORY_NODE: { } break; @@ -1909,19 +1909,19 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file) { ERR_FAIL_COND_V(!importer.is_valid(), nullptr); Error err = OK; - Node *scene = importer->import_scene(p_source_file, EditorSceneFormatImporter::IMPORT_ANIMATION | EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, Map<StringName, Variant>(), 15, nullptr, &err); + Node *scene = importer->import_scene(p_source_file, EditorSceneFormatImporter::IMPORT_ANIMATION | EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, HashMap<StringName, Variant>(), 15, nullptr, &err); if (!scene || err != OK) { return nullptr; } - Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; + HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; List<Pair<NodePath, Node *>> node_renames; _pre_fix_node(scene, scene, collision_map, nullptr, node_renames); return scene; } -Error ResourceImporterScene::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterScene::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { const String &src_path = p_source_file; Ref<EditorSceneFormatImporter> importer; @@ -1994,8 +1994,8 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p animation_data = subresources["animations"]; } - Set<Ref<ImporterMesh>> scanned_meshes; - Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; + RBSet<Ref<ImporterMesh>> scanned_meshes; + HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; Pair<PackedVector3Array, PackedInt32Array> occluder_arrays; List<Pair<NodePath, Node *>> node_renames; @@ -2223,7 +2223,7 @@ void EditorSceneFormatImporterESCN::get_extensions(List<String> *r_extensions) c r_extensions->push_back("escn"); } -Node *EditorSceneFormatImporterESCN::import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { +Node *EditorSceneFormatImporterESCN::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Error error; Ref<PackedScene> ps = ResourceFormatLoaderText::singleton->load(p_path, p_path, &error); ERR_FAIL_COND_V_MSG(!ps.is_valid(), nullptr, "Cannot load scene as text resource from path '" + p_path + "'."); diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index ac72a8f39d..92bd267216 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -71,9 +71,9 @@ public: virtual uint32_t get_import_flags() const; virtual void get_extensions(List<String> *r_extensions) const; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr); + virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr); virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options); - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options); + virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options); EditorSceneFormatImporter() {} }; @@ -110,7 +110,7 @@ public: }; private: - mutable const Map<StringName, Variant> *current_options = nullptr; + mutable const HashMap<StringName, Variant> *current_options = nullptr; mutable const Dictionary *current_options_dict = nullptr; List<ResourceImporter::ImportOption> *current_option_list = nullptr; InternalImportCategory current_category = INTERNAL_IMPORT_CATEGORY_MAX; @@ -133,16 +133,16 @@ public: void add_import_option_advanced(Variant::Type p_type, const String &p_name, Variant p_default_value, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = String(), int p_usage_flags = PROPERTY_USAGE_DEFAULT); virtual void get_internal_import_options(InternalImportCategory p_category, List<ResourceImporter::ImportOption> *r_options); - virtual Variant get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) const; - virtual Variant get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual Variant get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) const; + virtual Variant get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const; virtual void internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options); virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options); - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const Map<StringName, Variant> &p_options) const; + virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options) const; - virtual void pre_process(Node *p_scene, const Map<StringName, Variant> &p_options); - virtual void post_process(Node *p_scene, const Map<StringName, Variant> &p_options); + virtual void pre_process(Node *p_scene, const HashMap<StringName, Variant> &p_options); + virtual void post_process(Node *p_scene, const HashMap<StringName, Variant> &p_options); EditorScenePostImportPlugin() {} }; @@ -263,16 +263,16 @@ public: }; void get_internal_import_options(InternalImportCategory p_category, List<ImportOption> *r_options) const; - bool get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; - bool get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const; + bool get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const; + bool get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap<StringName, Variant> &p_options) const; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; // Import scenes *after* everything else (such as textures). virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; } - Node *_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames); - Node *_post_fix_node(Node *p_node, Node *p_root, Map<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, Set<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps); + Node *_pre_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames); + Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, RBSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps); Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks); void _create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all); @@ -280,7 +280,7 @@ public: void _compress_animations(AnimationPlayer *anim, int p_page_size_kb); Node *pre_import(const String &p_source_file); - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; virtual bool has_advanced_options() const override; virtual void show_advanced_options(const String &p_path) override; @@ -302,7 +302,7 @@ class EditorSceneFormatImporterESCN : public EditorSceneFormatImporter { public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; - virtual Node *import_scene(const String &p_path, uint32_t p_flags, const Map<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; + virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; }; #include "scene/resources/box_shape_3d.h" diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp index 1d70a47daa..64839bf199 100644 --- a/editor/import/resource_importer_shader_file.cpp +++ b/editor/import/resource_importer_shader_file.cpp @@ -68,7 +68,7 @@ String ResourceImporterShaderFile::get_preset_name(int p_idx) const { void ResourceImporterShaderFile::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const { } -bool ResourceImporterShaderFile::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterShaderFile::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -89,7 +89,7 @@ static String _include_function(const String &p_path, void *userpointer) { return file_inc->get_as_utf8_string(); } -Error ResourceImporterShaderFile::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterShaderFile::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { /* STEP 1, Read shader code */ Error err; diff --git a/editor/import/resource_importer_shader_file.h b/editor/import/resource_importer_shader_file.h index 858c2e783c..9d0ef88b05 100644 --- a/editor/import/resource_importer_shader_file.h +++ b/editor/import/resource_importer_shader_file.h @@ -47,9 +47,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterShaderFile(); }; diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 6770eef543..5364b53b57 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -160,7 +160,7 @@ String ResourceImporterTexture::get_resource_type() const { return "CompressedTexture2D"; } -bool ResourceImporterTexture::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterTexture::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_option == "compress/lossy_quality") { int compress_mode = int(p_options["compress/mode"]); if (compress_mode != COMPRESS_LOSSY && compress_mode != COMPRESS_VRAM_COMPRESSED) { @@ -402,7 +402,7 @@ void ResourceImporterTexture::_save_ctex(const Ref<Image> &p_image, const String save_to_ctex_format(f, image, p_compress_mode, used_channels, p_vram_compression, p_lossy_quality); } -Error ResourceImporterTexture::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterTexture::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { CompressMode compress_mode = CompressMode(int(p_options["compress/mode"])); const float lossy = p_options["compress/lossy_quality"]; const int pack_channels = p_options["compress/channel_pack"]; diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h index b932c598a2..7def2d4f77 100644 --- a/editor/import/resource_importer_texture.h +++ b/editor/import/resource_importer_texture.h @@ -65,7 +65,7 @@ protected: RS::TextureDetectRoughnessChannel channel_for_roughness = RS::TEXTURE_DETECT_ROUGHNESS_R; }; - Map<StringName, MakeInfo> make_flags; + HashMap<StringName, MakeInfo> make_flags; static void _texture_reimport_roughness(const Ref<CompressedTexture2D> &p_tex, const String &p_normal_path, RenderingServer::TextureDetectRoughnessChannel p_channel); static void _texture_reimport_3d(const Ref<CompressedTexture2D> &p_tex); @@ -96,9 +96,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; void update_imports(); diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index cd481e009e..aa338a6c0d 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -59,7 +59,7 @@ String ResourceImporterTextureAtlas::get_resource_type() const { return "Texture2D"; } -bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterTextureAtlas::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -82,7 +82,7 @@ String ResourceImporterTextureAtlas::get_option_group_file() const { return "atlas_file"; } -Error ResourceImporterTextureAtlas::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterTextureAtlas::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { /* If this happens, it's because the atlas_file field was not filled, so just import a broken texture */ //use an xpm because it's size independent, the editor images are vector and size dependent @@ -188,7 +188,7 @@ static void _plot_triangle(Vector2i *vertices, const Vector2i &p_offset, bool p_ } } -Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) { +Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const HashMap<String, HashMap<StringName, Variant>> &p_source_file_options, const HashMap<String, String> &p_base_paths) { ERR_FAIL_COND_V(p_source_file_options.size() == 0, ERR_BUG); //should never happen Vector<EditorAtlasPacker::Chart> charts; @@ -197,10 +197,10 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file pack_data_files.resize(p_source_file_options.size()); int idx = 0; - for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { + for (const KeyValue<String, HashMap<StringName, Variant>> &E : p_source_file_options) { PackData &pack_data = pack_data_files.write[idx]; - const String &source = E->key(); - const Map<StringName, Variant> &options = E->get(); + const String &source = E.key; + const HashMap<StringName, Variant> &options = E.value; Ref<Image> image; image.instantiate(); @@ -271,6 +271,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file pack_data.chart_vertices.push_back(polygons[j]); } } + idx++; } //pack the charts @@ -318,7 +319,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file //save the images idx = 0; - for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { + for (const KeyValue<String, HashMap<StringName, Variant>> &E : p_source_file_options) { PackData &pack_data = pack_data_files.write[idx]; Ref<Texture2D> texture; @@ -394,8 +395,9 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file //mesh } - String save_path = p_base_paths[E->key()] + ".res"; + String save_path = p_base_paths[E.key] + ".res"; ResourceSaver::save(save_path, texture); + idx++; } return OK; diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h index a5e47dee99..971eb067df 100644 --- a/editor/import/resource_importer_texture_atlas.h +++ b/editor/import/resource_importer_texture_atlas.h @@ -61,11 +61,11 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; virtual String get_option_group_file() const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; - virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import_group_file(const String &p_group_file, const HashMap<String, HashMap<StringName, Variant>> &p_source_file_options, const HashMap<String, String> &p_base_paths) override; ResourceImporterTextureAtlas(); }; diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 154970f7ed..362940dc17 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -58,7 +58,7 @@ String ResourceImporterWAV::get_resource_type() const { return "AudioStreamSample"; } -bool ResourceImporterWAV::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterWAV::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { if (p_option == "force/max_rate_hz" && !bool(p_options["force/max_rate"])) { return false; } @@ -93,7 +93,7 @@ void ResourceImporterWAV::get_import_options(const String &p_path, List<ImportOp r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Disabled,RAM (Ima-ADPCM)"), 0)); } -Error ResourceImporterWAV::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterWAV::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { /* STEP 1, READ WAVE FILE */ Error err; diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h index 2316ce80e5..739ec9b181 100644 --- a/editor/import/resource_importer_wav.h +++ b/editor/import/resource_importer_wav.h @@ -47,7 +47,7 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; static void _compress_ima_adpcm(const Vector<float> &p_data, Vector<uint8_t> &dst_data) { static const int16_t _ima_adpcm_step_table[89] = { @@ -140,7 +140,7 @@ public: } } - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterWAV(); }; diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp index 8866794505..3c68477564 100644 --- a/editor/import/scene_import_settings.cpp +++ b/editor/import/scene_import_settings.cpp @@ -43,9 +43,9 @@ class SceneImportSettingsData : public Object { GDCLASS(SceneImportSettingsData, Object) friend class SceneImportSettings; - Map<StringName, Variant> *settings = nullptr; - Map<StringName, Variant> current; - Map<StringName, Variant> defaults; + HashMap<StringName, Variant> *settings = nullptr; + HashMap<StringName, Variant> current; + HashMap<StringName, Variant> defaults; List<ResourceImporter::ImportOption> options; bool hide_options = false; String path; @@ -501,7 +501,7 @@ void SceneImportSettings::_update_camera() { camera->set_transform(xf); } -void SceneImportSettings::_load_default_subresource_settings(Map<StringName, Variant> &settings, const String &p_type, const String &p_import_id, ResourceImporterScene::InternalImportCategory p_category) { +void SceneImportSettings::_load_default_subresource_settings(HashMap<StringName, Variant> &settings, const String &p_type, const String &p_import_id, ResourceImporterScene::InternalImportCategory p_category) { if (base_subresource_settings.has(p_type)) { Dictionary d = base_subresource_settings[p_type]; if (d.has(p_import_id)) { @@ -852,7 +852,7 @@ void SceneImportSettings::_viewport_input(const Ref<InputEvent> &p_input) { } void SceneImportSettings::_re_import() { - Map<StringName, Variant> main_settings; + HashMap<StringName, Variant> main_settings; main_settings = defaults; main_settings.erase("_subresources"); diff --git a/editor/import/scene_import_settings.h b/editor/import/scene_import_settings.h index ec24a8a5a5..cbd105045a 100644 --- a/editor/import/scene_import_settings.h +++ b/editor/import/scene_import_settings.h @@ -103,9 +103,9 @@ class SceneImportSettings : public ConfirmationDialog { float cam_rot_y = -Math_PI / 4; float cam_zoom = 1; - Map<StringName, Variant> settings; + HashMap<StringName, Variant> settings; }; - Map<String, MaterialData> material_map; + HashMap<String, MaterialData> material_map; struct MeshData { bool has_import_id; @@ -116,31 +116,31 @@ class SceneImportSettings : public ConfirmationDialog { float cam_rot_x = -Math_PI / 4; float cam_rot_y = -Math_PI / 4; float cam_zoom = 1; - Map<StringName, Variant> settings; + HashMap<StringName, Variant> settings; }; - Map<String, MeshData> mesh_map; + HashMap<String, MeshData> mesh_map; struct AnimationData { Ref<Animation> animation; TreeItem *scene_node = nullptr; - Map<StringName, Variant> settings; + HashMap<StringName, Variant> settings; }; - Map<String, AnimationData> animation_map; + HashMap<String, AnimationData> animation_map; struct NodeData { Node *node = nullptr; TreeItem *scene_node = nullptr; - Map<StringName, Variant> settings; + HashMap<StringName, Variant> settings; }; - Map<String, NodeData> node_map; + HashMap<String, NodeData> node_map; void _fill_material(Tree *p_tree, const Ref<Material> &p_material, TreeItem *p_parent); void _fill_mesh(Tree *p_tree, const Ref<Mesh> &p_mesh, TreeItem *p_parent); void _fill_animation(Tree *p_tree, const Ref<Animation> &p_anim, const String &p_name, TreeItem *p_parent); void _fill_scene(Node *p_node, TreeItem *p_parent_item); - Set<Ref<Mesh>> mesh_set; - Set<Ref<Material>> material_set; + RBSet<Ref<Mesh>> mesh_set; + RBSet<Ref<Material>> material_set; String selected_type; String selected_id; @@ -156,7 +156,7 @@ class SceneImportSettings : public ConfirmationDialog { void _viewport_input(const Ref<InputEvent> &p_input); - Map<StringName, Variant> defaults; + HashMap<StringName, Variant> defaults; SceneImportSettingsData *scene_import_settings_data = nullptr; @@ -187,7 +187,7 @@ class SceneImportSettings : public ConfirmationDialog { Dictionary base_subresource_settings; - void _load_default_subresource_settings(Map<StringName, Variant> &settings, const String &p_type, const String &p_import_id, ResourceImporterScene::InternalImportCategory p_category); + void _load_default_subresource_settings(HashMap<StringName, Variant> &settings, const String &p_type, const String &p_import_id, ResourceImporterScene::InternalImportCategory p_category); bool editing_animation = false; diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp index ff6b34dd36..9d96822aef 100644 --- a/editor/import_defaults_editor.cpp +++ b/editor/import_defaults_editor.cpp @@ -44,8 +44,8 @@ class ImportDefaultsEditorSettings : public Object { GDCLASS(ImportDefaultsEditorSettings, Object) friend class ImportDefaultsEditor; List<PropertyInfo> properties; - Map<StringName, Variant> values; - Map<StringName, Variant> default_values; + HashMap<StringName, Variant> values; + HashMap<StringName, Variant> default_values; Ref<ResourceImporter> importer; diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 4df46f2348..56b15c3b1a 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -39,11 +39,11 @@ class ImportDockParameters : public Object { GDCLASS(ImportDockParameters, Object); public: - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; List<PropertyInfo> properties; Ref<ResourceImporter> importer; Vector<String> paths; - Set<StringName> checked; + RBSet<StringName> checked; bool checking; String base_options_path; @@ -193,8 +193,8 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { clear(); // Use the value that is repeated the most. - Map<String, Dictionary> value_frequency; - Set<String> extensions; + HashMap<String, Dictionary> value_frequency; + RBSet<String> extensions; for (int i = 0; i < p_paths.size(); i++) { Ref<ConfigFile> config; diff --git a/editor/import_dock.h b/editor/import_dock.h index f522b0bced..7f4aa1ddb3 100644 --- a/editor/import_dock.h +++ b/editor/import_dock.h @@ -51,7 +51,7 @@ class ImportDock : public VBoxContainer { EditorInspector *import_opts = nullptr; List<PropertyInfo> properties; - Map<StringName, Variant> property_values; + HashMap<StringName, Variant> property_values; ConfirmationDialog *reimport_confirm = nullptr; Label *label_warning = nullptr; diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index a62d1af477..c5dacd8d21 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -149,7 +149,7 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) { if (current) { List<PropertyInfo> props; current->get_property_list(&props); - Map<Ref<Resource>, Ref<Resource>> duplicates; + HashMap<Ref<Resource>, Ref<Resource>> duplicates; for (const PropertyInfo &prop_info : props) { if (!(prop_info.usage & PROPERTY_USAGE_STORAGE)) { continue; @@ -307,7 +307,7 @@ void InspectorDock::_prepare_history() { history_menu->get_popup()->clear(); Ref<Texture2D> base_icon = get_theme_icon(SNAME("Object"), SNAME("EditorIcons")); - Set<ObjectID> already; + RBSet<ObjectID> already; for (int i = editor_history->get_history_len() - 1; i >= history_to; i--) { ObjectID id = editor_history->get_history_obj(i); Object *obj = ObjectDB::get_instance(id); diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 0b3164aada..715b1725e0 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -459,16 +459,22 @@ void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) { undo_redo->commit_action(); } -void AnimationNodeBlendTreeEditor::_delete_nodes_request() { +void AnimationNodeBlendTreeEditor::_delete_nodes_request(const TypedArray<StringName> &p_nodes) { List<StringName> to_erase; - for (int i = 0; i < graph->get_child_count(); i++) { - GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); - if (gn) { - if (gn->is_selected() && gn->is_close_button_visible()) { - to_erase.push_back(gn->get_name()); + if (p_nodes.is_empty()) { + for (int i = 0; i < graph->get_child_count(); i++) { + GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); + if (gn) { + if (gn->is_selected() && gn->is_close_button_visible()) { + to_erase.push_back(gn->get_name()); + } } } + } else { + for (int i = 0; i < p_nodes.size(); i++) { + to_erase.push_back(p_nodes[i]); + } } if (to_erase.is_empty()) { @@ -557,8 +563,8 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano updating = true; - Set<String> paths; - HashMap<String, Set<String>> types; + RBSet<String> paths; + HashMap<String, RBSet<String>> types; { List<StringName> animations; player->get_animation_list(&animations); @@ -595,10 +601,10 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano filters->clear(); TreeItem *root = filters->create_item(); - Map<String, TreeItem *> parenthood; + HashMap<String, TreeItem *> parenthood; - for (Set<String>::Element *E = paths.front(); E; E = E->next()) { - NodePath path = E->get(); + for (const String &E : paths) { + NodePath path = E; TreeItem *ti = nullptr; String accum; for (int i = 0; i < path.get_name_count(); i++) { @@ -692,7 +698,7 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano //just a node, not a property track String types_text = "["; if (types.has(path)) { - Set<String>::Element *F = types[path].front(); + RBSet<String>::Element *F = types[path].front(); types_text += F->get(); while (F->next()) { F = F->next(); @@ -903,8 +909,8 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima } //update animations - for (Map<StringName, ProgressBar *>::Element *E = animations.front(); E; E = E->next()) { - if (E->key() == prev_name) { + for (const KeyValue<StringName, ProgressBar *> &E : animations) { + if (E.key == prev_name) { animations[new_name] = animations[prev_name]; animations.erase(prev_name); break; diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h index cacf8379f9..b5bf91a1da 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.h +++ b/editor/plugins/animation_blend_tree_editor_plugin.h @@ -61,7 +61,7 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin { Tree *filters = nullptr; CheckBox *filter_enabled = nullptr; - Map<StringName, ProgressBar *> animations; + HashMap<StringName, ProgressBar *> animations; Vector<EditorProperty *> visible_properties; String to_node = ""; @@ -103,7 +103,7 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin { void _open_in_editor(const String &p_which); void _anim_selected(int p_index, Array p_options, const String &p_node); void _delete_request(const String &p_which); - void _delete_nodes_request(); + void _delete_nodes_request(const TypedArray<StringName> &p_nodes); bool _update_filters(const Ref<AnimationNode> &anode); void _edit_filters(const String &p_which); diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 581dab84b4..57cf13d298 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1338,7 +1338,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() { float pos = cpos + step_off * anim->get_step(); - bool valid = anim->get_loop_mode() != Animation::LoopMode::LOOP_NONE || (pos >= 0 && pos <= anim->get_length()); + bool valid = anim->get_loop_mode() != Animation::LOOP_NONE || (pos >= 0 && pos <= anim->get_length()); onion.captures_valid.write[cidx] = valid; if (valid) { player->seek(pos, true); diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 920fe347ca..2b90b4cdd6 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -609,7 +609,7 @@ void AnimationNodeStateMachineEditor::_group_selected_nodes() { void AnimationNodeStateMachineEditor::_ungroup_selected_nodes() { bool find = false; - Set<StringName> new_selected_nodes; + RBSet<StringName> new_selected_nodes; for (const StringName &E : selected_nodes) { Ref<AnimationNodeStateMachine> group_sm = state_machine->get_node(E); diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h index 1247d99389..3db4d91367 100644 --- a/editor/plugins/animation_state_machine_editor.h +++ b/editor/plugins/animation_state_machine_editor.h @@ -64,7 +64,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { PanelContainer *panel = nullptr; StringName selected_node; - Set<StringName> selected_nodes; + RBSet<StringName> selected_nodes; HScrollBar *h_scroll = nullptr; VScrollBar *v_scroll = nullptr; @@ -105,7 +105,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { Point2 box_selecting_from; Point2 box_selecting_to; Rect2 box_selecting_rect; - Set<StringName> previous_selected; + RBSet<StringName> previous_selected; bool dragging_selected_attempt = false; bool dragging_selected = false; diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h index 24d7c1d24c..af961e1403 100644 --- a/editor/plugins/asset_library_editor_plugin.h +++ b/editor/plugins/asset_library_editor_plugin.h @@ -252,7 +252,7 @@ class EditorAssetLibrary : public PanelContainer { }; int last_queue_id; - Map<int, ImageQueue> image_queue; + HashMap<int, ImageQueue> image_queue; void _image_update(bool use_cache, bool final, const PackedByteArray &p_data, int p_queue_id); void _image_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data, int p_queue_id); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index c129d705c9..a7e3d17fdc 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -562,7 +562,11 @@ void CanvasItemEditor::_expand_encompassing_rect_using_children(Rect2 &r_rect, c } if (canvas_item && canvas_item->is_visible_in_tree() && (include_locked_nodes || !_is_node_locked(canvas_item))) { - Transform2D xform = p_parent_xform * p_canvas_xform * canvas_item->get_transform(); + Transform2D xform = p_canvas_xform; + if (!canvas_item->is_set_as_top_level()) { + xform *= p_parent_xform; + } + xform *= canvas_item->get_transform(); Rect2 rect = canvas_item->_edit_get_rect(); if (r_first) { r_rect = Rect2(xform.xform(rect.get_center()), Size2()); @@ -608,7 +612,11 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no } if (canvas_item && canvas_item->is_visible_in_tree()) { - Transform2D xform = (p_parent_xform * p_canvas_xform * canvas_item->get_transform()).affine_inverse(); + Transform2D xform = p_canvas_xform; + if (!canvas_item->is_set_as_top_level()) { + xform *= p_parent_xform; + } + xform = (xform * canvas_item->get_transform()).affine_inverse(); const real_t local_grab_distance = xform.basis_xform(Vector2(grab_distance, 0)).length() / zoom; if (canvas_item->_edit_is_selected_on_click(xform.xform(p_pos), local_grab_distance)) { Node2D *node = Object::cast_to<Node2D>(canvas_item); @@ -698,7 +706,11 @@ void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_n } if (canvas_item && canvas_item->is_visible_in_tree() && !locked && editable) { - Transform2D xform = p_parent_xform * p_canvas_xform * canvas_item->get_transform(); + Transform2D xform = p_canvas_xform; + if (!canvas_item->is_set_as_top_level()) { + xform *= p_parent_xform; + } + xform *= canvas_item->get_transform(); if (canvas_item->_edit_use_rect()) { Rect2 rect = canvas_item->_edit_get_rect(); @@ -4085,7 +4097,7 @@ void CanvasItemEditor::_button_tool_select(int p_index) { } void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation, bool p_scale, bool p_on_existing) { - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); for (const KeyValue<Node *, Object *> &E : selection) { CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); @@ -4396,7 +4408,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { case ANIM_COPY_POSE: { pose_clipboard.clear(); - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); for (const KeyValue<Node *, Object *> &E : selection) { CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); @@ -4442,7 +4454,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { } break; case ANIM_CLEAR_POSE: { - Map<Node *, Object *> &selection = editor_selection->get_selection(); + HashMap<Node *, Object *> &selection = editor_selection->get_selection(); for (const KeyValue<Node *, Object *> &E : selection) { CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); @@ -4511,7 +4523,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { } break; case SKELETON_MAKE_BONES: { - Map<Node *, Object *> &selection = editor_selection->get_selection(); + HashMap<Node *, Object *> &selection = editor_selection->get_selection(); Node *editor_root = EditorNode::get_singleton()->get_edited_scene()->get_tree()->get_edited_scene_root(); undo_redo->create_action(TTR("Create Custom Bone2D(s) from Node(s)")); @@ -4559,7 +4571,7 @@ void CanvasItemEditor::_focus_selection(int p_op) { Rect2 rect; int count = 0; - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); for (const KeyValue<Node *, Object *> &E : selection) { CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key); if (!canvas_item) { diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 7a49041131..a4099079f3 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -283,7 +283,7 @@ private: } }; - Map<BoneKey, BoneList> bone_list; + HashMap<BoneKey, BoneList> bone_list; struct PoseClipboard { Vector2 pos; diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp index 4ab03c123b..ebb0da1ad7 100644 --- a/editor/plugins/control_editor_plugin.cpp +++ b/editor/plugins/control_editor_plugin.cpp @@ -335,7 +335,7 @@ void EditorPropertySizeFlags::setup(const Vector<String> &p_options, bool p_vert return; } - Map<int, String> flags; + HashMap<int, String> flags; for (int i = 0, j = 0; i < p_options.size(); i++, j++) { Vector<String> text_split = p_options[i].split(":"); int64_t current_val = text_split[1].to_int(); diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 80fc1c64d0..0560365a58 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -481,8 +481,8 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const Ref<Resource> &p_from, List<String> kwors; scr->get_language()->get_reserved_words(&kwors); - Set<String> control_flow_keywords; - Set<String> keywords; + RBSet<String> control_flow_keywords; + RBSet<String> keywords; for (const String &E : kwors) { if (scr->get_language()->is_control_flow_keyword(E)) { diff --git a/editor/plugins/gdextension_export_plugin.h b/editor/plugins/gdextension_export_plugin.h index 8ed72b1c42..28c37fed52 100644 --- a/editor/plugins/gdextension_export_plugin.h +++ b/editor/plugins/gdextension_export_plugin.h @@ -35,10 +35,10 @@ class GDExtensionExportPlugin : public EditorExportPlugin { protected: - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features); + virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features); }; -void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) { +void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) { if (p_type != "NativeExtension") { return; } diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index 4b1081ed92..b022fcc1c9 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp @@ -42,7 +42,7 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3 if (emission_fill->get_selected() < 2) { float area_accum = 0; - Map<float, int> triangle_area_map; + RBMap<float, int> triangle_area_map; for (int i = 0; i < geometry.size(); i++) { float area = geometry[i].get_area(); @@ -63,9 +63,9 @@ bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3 for (int i = 0; i < emissor_count; i++) { float areapos = Math::random(0.0f, area_accum); - Map<float, int>::Element *E = triangle_area_map.find_closest(areapos); + RBMap<float, int>::Iterator E = triangle_area_map.find_closest(areapos); ERR_FAIL_COND_V(!E, false); - int index = E->get(); + int index = E->value; ERR_FAIL_INDEX_V(index, geometry.size(), false); // ok FINALLY get face diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index 1c75591b34..3094e24659 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -373,7 +373,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) { Ref<Mesh> mesh = node->get_mesh(); ERR_FAIL_COND(!mesh.is_valid()); - Set<MeshInstance3DEditorEdgeSort> edges; + RBSet<MeshInstance3DEditorEdgeSort> edges; uv_lines.clear(); for (int i = 0; i < mesh->get_surface_count(); i++) { if (mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) { diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 423ec5f4ed..914ccb54c1 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -71,7 +71,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, p_library->clear(); } - Map<int, MeshInstance3D *> mesh_instances; + HashMap<int, MeshInstance3D *> mesh_instances; for (int i = 0; i < p_scene->get_child_count(); i++) { Node *child = p_scene->get_child(i); diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index b54fa41e88..0fab3aed0d 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -141,7 +141,7 @@ void MultiMeshEditor::_populate() { const Face3 *r = faces.ptr(); float area_accum = 0; - Map<float, int> triangle_area_map; + RBMap<float, int> triangle_area_map; for (int i = 0; i < facecount; i++) { float area = r[i].get_area(); if (area < CMP_EPSILON) { @@ -180,9 +180,9 @@ void MultiMeshEditor::_populate() { for (int i = 0; i < instance_count; i++) { float areapos = Math::random(0.0f, area_accum); - Map<float, int>::Element *E = triangle_area_map.find_closest(areapos); + RBMap<float, int>::Iterator E = triangle_area_map.find_closest(areapos); ERR_FAIL_COND(!E); - int index = E->get(); + int index = E->value; ERR_FAIL_INDEX(index, facecount); // ok FINALLY get face diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index 6829e25ef3..58cdf3533c 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -2993,10 +2993,15 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { //// GPUParticlesCollision3DGizmoPlugin::GPUParticlesCollision3DGizmoPlugin() { - Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particle_collision", Color(0.5, 0.7, 1)); - create_material("shape_material", gizmo_color); - gizmo_color.a = 0.15; - create_material("shape_material_internal", gizmo_color); + Color gizmo_color_attractor = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particle_attractor", Color(1, 0.7, 0.5)); + create_material("shape_material_attractor", gizmo_color_attractor); + gizmo_color_attractor.a = 0.15; + create_material("shape_material_attractor_internal", gizmo_color_attractor); + + Color gizmo_color_collision = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particle_collision", Color(0.5, 0.7, 1)); + create_material("shape_material_collision", gizmo_color_collision); + gizmo_color_collision.a = 0.15; + create_material("shape_material_collision_internal", gizmo_color_collision); create_handle_material("handles"); } @@ -3122,12 +3127,17 @@ void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->clear(); - const Ref<Material> material = - get_material("shape_material", p_gizmo); - const Ref<Material> material_internal = - get_material("shape_material_internal", p_gizmo); + Ref<Material> material; + Ref<Material> material_internal; + if (Object::cast_to<GPUParticlesAttractor3D>(cs)) { + material = get_material("shape_material_attractor", p_gizmo); + material_internal = get_material("shape_material_attractor_internal", p_gizmo); + } else { + material = get_material("shape_material_collision", p_gizmo); + material_internal = get_material("shape_material_collision_internal", p_gizmo); + } - Ref<Material> handles_material = get_material("handles"); + const Ref<Material> handles_material = get_material("handles"); if (Object::cast_to<GPUParticlesCollisionSphere3D>(cs) || Object::cast_to<GPUParticlesAttractorSphere3D>(cs)) { float r = cs->call("get_radius"); @@ -3789,7 +3799,7 @@ void LightmapGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { p_gizmo->clear(); Vector<Vector3> lines; - Set<Vector2i> lines_found; + RBSet<Vector2i> lines_found; Vector<Vector3> points = data->get_capture_points(); if (points.size() == 0) { @@ -4755,7 +4765,7 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { return; } - Map<_EdgeKey, bool> edge_map; + HashMap<_EdgeKey, bool, _EdgeKey> edge_map; Vector<Vector3> tmeshfaces; tmeshfaces.resize(faces.size() * 3); @@ -4773,10 +4783,10 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { SWAP(ek.from, ek.to); } - Map<_EdgeKey, bool>::Element *F = edge_map.find(ek); + HashMap<_EdgeKey, bool, _EdgeKey>::Iterator F = edge_map.find(ek); if (F) { - F->get() = false; + F->value = false; } else { edge_map[ek] = true; diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h index 4df329a2c5..a0d7715347 100644 --- a/editor/plugins/node_3d_editor_gizmos.h +++ b/editor/plugins/node_3d_editor_gizmos.h @@ -601,7 +601,13 @@ class NavigationRegion3DGizmoPlugin : public EditorNode3DGizmoPlugin { Vector3 from; Vector3 to; - bool operator<(const _EdgeKey &p_with) const { return from == p_with.from ? to < p_with.to : from < p_with.from; } + static uint32_t hash(const _EdgeKey &p_key) { + return HashMapHasherDefault::hash(p_key.from) ^ HashMapHasherDefault::hash(p_key.to); + } + + bool operator==(const _EdgeKey &p_with) const { + return HashMapComparatorDefault<Vector3>::compare(from, p_with.from) && HashMapComparatorDefault<Vector3>::compare(to, p_with.to); + } }; public: diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index d2af13d7fa..e7b4bac8ab 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -369,7 +369,7 @@ Transform3D Node3DEditorViewport::to_camera_transform(const Cursor &p_cursor) co } int Node3DEditorViewport::get_selected_count() const { - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); int count = 0; @@ -518,7 +518,7 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos) { } Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario()); - Set<Ref<EditorNode3DGizmo>> found_gizmos; + RBSet<Ref<EditorNode3DGizmo>> found_gizmos; Node *edited_scene = get_tree()->get_edited_scene_root(); ObjectID closest; @@ -581,7 +581,7 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, Vector<_RayRe Vector3 pos = _get_ray_pos(p_pos); Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario()); - Set<Node3D *> found_nodes; + RBSet<Node3D *> found_nodes; for (int i = 0; i < instances.size(); i++) { Node3D *spat = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i])); @@ -764,7 +764,7 @@ void Node3DEditorViewport::_select_region() { } Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_convex(frustum, get_tree()->get_root()->get_world_3d()->get_scenario()); - Set<Node3D *> found_nodes; + RBSet<Node3D *> found_nodes; Vector<Node *> selected; Node *edited_scene = get_tree()->get_edited_scene_root(); @@ -2465,7 +2465,7 @@ void Node3DEditorViewport::_notification(int p_what) { _update_camera(delta); - const Map<Node *, Object *> &selection = editor_selection->get_selection(); + const HashMap<Node *, Object *> &selection = editor_selection->get_selection(); bool changed = false; bool exist = false; @@ -6685,8 +6685,8 @@ void Node3DEditor::_refresh_menu_icons() { } template <typename T> -Set<T *> _get_child_nodes(Node *parent_node) { - Set<T *> nodes = Set<T *>(); +RBSet<T *> _get_child_nodes(Node *parent_node) { + RBSet<T *> nodes = RBSet<T *>(); T *node = Node::cast_to<T>(parent_node); if (node) { nodes.insert(node); @@ -6694,8 +6694,8 @@ Set<T *> _get_child_nodes(Node *parent_node) { for (int i = 0; i < parent_node->get_child_count(); i++) { Node *child_node = parent_node->get_child(i); - Set<T *> child_nodes = _get_child_nodes<T>(child_node); - for (typename Set<T *>::Element *I = child_nodes.front(); I; I = I->next()) { + RBSet<T *> child_nodes = _get_child_nodes<T>(child_node); + for (typename RBSet<T *>::Element *I = child_nodes.front(); I; I = I->next()) { nodes.insert(I->get()); } } @@ -6703,15 +6703,15 @@ Set<T *> _get_child_nodes(Node *parent_node) { return nodes; } -Set<RID> _get_physics_bodies_rid(Node *node) { - Set<RID> rids = Set<RID>(); +RBSet<RID> _get_physics_bodies_rid(Node *node) { + RBSet<RID> rids = RBSet<RID>(); PhysicsBody3D *pb = Node::cast_to<PhysicsBody3D>(node); if (pb) { rids.insert(pb->get_rid()); } - Set<PhysicsBody3D *> child_nodes = _get_child_nodes<PhysicsBody3D>(node); - for (Set<PhysicsBody3D *>::Element *I = child_nodes.front(); I; I = I->next()) { - rids.insert(I->get()->get_rid()); + RBSet<PhysicsBody3D *> child_nodes = _get_child_nodes<PhysicsBody3D>(node); + for (const PhysicsBody3D *I : child_nodes) { + rids.insert(I->get_rid()); } return rids; @@ -6728,13 +6728,13 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Vector3 position_offset = Vector3(); // Priorities for snapping to floor are CollisionShapes, VisualInstances and then origin - Set<VisualInstance3D *> vi = _get_child_nodes<VisualInstance3D>(sp); - Set<CollisionShape3D *> cs = _get_child_nodes<CollisionShape3D>(sp); + RBSet<VisualInstance3D *> vi = _get_child_nodes<VisualInstance3D>(sp); + RBSet<CollisionShape3D *> cs = _get_child_nodes<CollisionShape3D>(sp); bool found_valid_shape = false; if (cs.size()) { AABB aabb; - Set<CollisionShape3D *>::Element *I = cs.front(); + RBSet<CollisionShape3D *>::Element *I = cs.front(); if (I->get()->get_shape().is_valid()) { CollisionShape3D *collision_shape = cs.front()->get(); aabb = collision_shape->get_global_transform().xform(collision_shape->get_shape()->get_debug_mesh()->get_aabb()); @@ -6755,8 +6755,8 @@ void Node3DEditor::snap_selected_nodes_to_floor() { } if (!found_valid_shape && vi.size()) { AABB aabb = vi.front()->get()->get_transformed_aabb(); - for (Set<VisualInstance3D *>::Element *I = vi.front(); I; I = I->next()) { - aabb.merge_with(I->get()->get_transformed_aabb()); + for (const VisualInstance3D *I : vi) { + aabb.merge_with(I->get_transformed_aabb()); } Vector3 size = aabb.size * Vector3(0.5, 0.0, 0.5); from = aabb.position + size; @@ -6798,7 +6798,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Dictionary d = snap_data[node]; Vector3 from = d["from"]; Vector3 to = from - Vector3(0.0, max_snap_height, 0.0); - Set<RID> excluded = _get_physics_bodies_rid(sp); + RBSet<RID> excluded = _get_physics_bodies_rid(sp); PhysicsDirectSpaceState3D::RayParameters ray_params; ray_params.from = from; @@ -6820,7 +6820,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { Dictionary d = snap_data[node]; Vector3 from = d["from"]; Vector3 to = from - Vector3(0.0, max_snap_height, 0.0); - Set<RID> excluded = _get_physics_bodies_rid(sp); + RBSet<RID> excluded = _get_physics_bodies_rid(sp); PhysicsDirectSpaceState3D::RayParameters ray_params; ray_params.from = from; @@ -6949,6 +6949,10 @@ void Node3DEditor::_update_theme() { sun_title->add_theme_font_override("font", get_theme_font(SNAME("title_font"), SNAME("Window"))); environ_title->add_theme_font_override("font", get_theme_font(SNAME("title_font"), SNAME("Window"))); + + sun_color->set_custom_minimum_size(Size2(0, get_theme_constant(SNAME("color_picker_button_height"), SNAME("Editor")))); + environ_sky_color->set_custom_minimum_size(Size2(0, get_theme_constant(SNAME("color_picker_button_height"), SNAME("Editor")))); + environ_ground_color->set_custom_minimum_size(Size2(0, get_theme_constant(SNAME("color_picker_button_height"), SNAME("Editor")))); } void Node3DEditor::_notification(int p_what) { diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 43efdeec72..511135a5f1 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -461,7 +461,7 @@ public: RID sbox_instance_xray; RID sbox_instance_xray_offset; Ref<EditorNode3DGizmo> gizmo; - Map<int, Transform3D> subgizmos; // map ID -> initial transform + HashMap<int, Transform3D> subgizmos; // map ID -> initial transform Node3DEditorSelectedItem() { sp = nullptr; diff --git a/editor/plugins/ot_features_plugin.cpp b/editor/plugins/ot_features_plugin.cpp index ffa74173be..f8526fb715 100644 --- a/editor/plugins/ot_features_plugin.cpp +++ b/editor/plugins/ot_features_plugin.cpp @@ -31,6 +31,7 @@ #include "ot_features_plugin.h" #include "scene/3d/label_3d.h" +#include "scene/resources/primitive_meshes.h" void OpenTypeFeaturesEditor::_value_changed(double val) { if (setting) { @@ -124,11 +125,14 @@ void OpenTypeFeaturesAdd::setup(Object *p_object) { Control *ctrl = Object::cast_to<Control>(edited_object); if (ctrl != nullptr) { font = ctrl->get_theme_font(SNAME("font")); - } else { - Label3D *l3d = Object::cast_to<Label3D>(edited_object); - if (l3d != nullptr) { - font = l3d->_get_font_or_default(); - } + } + Label3D *l3d = Object::cast_to<Label3D>(edited_object); + if (l3d != nullptr) { + font = l3d->_get_font_or_default(); + } + TextMesh *tm = Object::cast_to<TextMesh>(edited_object); + if (tm != nullptr) { + font = tm->_get_font_or_default(); } if (font.is_null()) { @@ -205,7 +209,7 @@ OpenTypeFeaturesAdd::OpenTypeFeaturesAdd() { /*************************************************************************/ bool EditorInspectorPluginOpenTypeFeatures::can_handle(Object *p_object) { - return (Object::cast_to<Control>(p_object) != nullptr) || (Object::cast_to<Label3D>(p_object) != nullptr); + return (Object::cast_to<Control>(p_object) != nullptr) || (Object::cast_to<Label3D>(p_object) != nullptr) || (Object::cast_to<TextMesh>(p_object) != nullptr); } bool EditorInspectorPluginOpenTypeFeatures::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { diff --git a/editor/plugins/packed_scene_translation_parser_plugin.h b/editor/plugins/packed_scene_translation_parser_plugin.h index ecd090b31b..9135498333 100644 --- a/editor/plugins/packed_scene_translation_parser_plugin.h +++ b/editor/plugins/packed_scene_translation_parser_plugin.h @@ -37,9 +37,9 @@ class PackedSceneEditorTranslationParserPlugin : public EditorTranslationParserP GDCLASS(PackedSceneEditorTranslationParserPlugin, EditorTranslationParserPlugin); // Scene Node's properties that contain translation strings. - Set<String> lookup_properties; + RBSet<String> lookup_properties; // Properties from specific Nodes that should be ignored. - Map<String, Vector<String>> exception_list; + HashMap<String, Vector<String>> exception_list; public: virtual Error parse_file(const String &p_path, Vector<String> *r_ids, Vector<Vector<String>> *r_ids_ctx_plural) override; diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp index bfb672d694..bebc0e9d54 100644 --- a/editor/plugins/root_motion_editor_plugin.cpp +++ b/editor/plugins/root_motion_editor_plugin.cpp @@ -65,7 +65,7 @@ void EditorPropertyRootMotion::_node_assign() { return; } - Set<String> paths; + RBSet<String> paths; { List<StringName> animations; player->get_animation_list(&animations); @@ -81,10 +81,10 @@ void EditorPropertyRootMotion::_node_assign() { filters->clear(); TreeItem *root = filters->create_item(); - Map<String, TreeItem *> parenthood; + HashMap<String, TreeItem *> parenthood; - for (Set<String>::Element *E = paths.front(); E; E = E->next()) { - NodePath path = E->get(); + for (const String &E : paths) { + NodePath path = E; TreeItem *ti = nullptr; String accum; for (int i = 0; i < path.get_name_count(); i++) { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 8d29e04eec..115c6f43dd 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -235,21 +235,21 @@ class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache { Ref<Resource> cache; }; - Map<String, Cache> cached; + HashMap<String, Cache> cached; public: uint64_t max_time_cache = 5 * 60 * 1000; //minutes, five - int max_cache_size = 128; + uint32_t max_cache_size = 128; void cleanup() { - List<Map<String, Cache>::Element *> to_clean; + List<String> to_clean; - Map<String, Cache>::Element *I = cached.front(); + HashMap<String, Cache>::Iterator I = cached.begin(); while (I) { - if ((OS::get_singleton()->get_ticks_msec() - I->get().time_loaded) > max_time_cache) { - to_clean.push_back(I); + if ((OS::get_singleton()->get_ticks_msec() - I->value.time_loaded) > max_time_cache) { + to_clean.push_back(I->key); } - I = I->next(); + ++I; } while (to_clean.front()) { @@ -259,34 +259,34 @@ public: } virtual Ref<Resource> get_cached_resource(const String &p_path) { - Map<String, Cache>::Element *E = cached.find(p_path); + HashMap<String, Cache>::Iterator E = cached.find(p_path); if (!E) { Cache c; c.cache = ResourceLoader::load(p_path); E = cached.insert(p_path, c); } - E->get().time_loaded = OS::get_singleton()->get_ticks_msec(); + E->value.time_loaded = OS::get_singleton()->get_ticks_msec(); if (cached.size() > max_cache_size) { uint64_t older; - Map<String, Cache>::Element *O = cached.front(); - older = O->get().time_loaded; - Map<String, Cache>::Element *I = O; + HashMap<String, Cache>::Iterator O = cached.begin(); + older = O->value.time_loaded; + HashMap<String, Cache>::Iterator I = O; while (I) { - if (I->get().time_loaded < older) { - older = I->get().time_loaded; + if (I->value.time_loaded < older) { + older = I->value.time_loaded; O = I; } - I = I->next(); + ++I; } if (O != E) { //should never happen.. - cached.erase(O); + cached.remove(O); } } - return E->get().cache; + return E->value.cache; } virtual ~EditorScriptCodeCompletionCache() {} @@ -966,7 +966,7 @@ void ScriptEditor::_reload_scripts() { ERR_CONTINUE(!rel_script.is_valid()); script->set_source_code(rel_script->get_source_code()); script->set_last_modified_time(rel_script->get_last_modified_time()); - script->reload(); + script->reload(true); } Ref<TextFile> text_file = edited_res; @@ -1365,9 +1365,17 @@ void ScriptEditor::_menu_option(int p_option) { } } break; - case FILE_TOOL_RELOAD: case FILE_TOOL_RELOAD_SOFT: { - current->reload(p_option == FILE_TOOL_RELOAD_SOFT); + Ref<Script> scr = current->get_edited_resource(); + if (scr == nullptr || scr.is_null()) { + EditorNode::get_singleton()->show_warning(TTR("Can't obtain the script for reloading.")); + break; + } + if (!scr->is_tool()) { + EditorNode::get_singleton()->show_warning(TTR("Reload only takes effect on tool scripts.")); + return; + } + scr->reload(true); } break; case FILE_RUN: { @@ -1376,6 +1384,10 @@ void ScriptEditor::_menu_option(int p_option) { EditorNode::get_singleton()->show_warning(TTR("Can't obtain the script for running.")); break; } + if (!scr->is_tool()) { + EditorNode::get_singleton()->show_warning(TTR("Script is not in tool mode, will not be able to run.")); + return; + } current->apply_code(); Error err = scr->reload(false); //hard reload script before running always @@ -1384,10 +1396,6 @@ void ScriptEditor::_menu_option(int p_option) { EditorNode::get_singleton()->show_warning(TTR("Script failed reloading, check console for errors.")); return; } - if (!scr->is_tool()) { - EditorNode::get_singleton()->show_warning(TTR("Script is not in tool mode, will not be able to run.")); - return; - } if (!ClassDB::is_parent_class(scr->get_instance_base_type(), "EditorScript")) { EditorNode::get_singleton()->show_warning(TTR("To run this script, it must inherit EditorScript and be set to tool mode.")); @@ -1707,7 +1715,7 @@ void ScriptEditor::notify_script_changed(const Ref<Script> &p_script) { } void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) { - Set<String> loaded_scripts; + RBSet<String> loaded_scripts; for (int i = 0; i < tab_container->get_tab_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i)); if (!se) { @@ -1792,7 +1800,7 @@ void ScriptEditor::ensure_select_current() { _update_selected_editor_menu(); } -void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, Set<Ref<Script>> &used) { +void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, RBSet<Ref<Script>> &used) { if (p_current != p_base && p_current->get_owner() != p_base) { return; } @@ -1972,7 +1980,7 @@ void ScriptEditor::_update_script_names() { return; } - Set<Ref<Script>> used; + RBSet<Ref<Script>> used; Node *edited = EditorNode::get_singleton()->get_edited_scene(); if (edited) { _find_scripts(edited, edited, used); @@ -3091,8 +3099,8 @@ void ScriptEditor::_make_script_list_context_menu() { if (se) { Ref<Script> scr = se->get_edited_resource(); if (scr != nullptr) { - context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/reload_script_soft"), FILE_TOOL_RELOAD_SOFT); if (!scr.is_null() && scr->is_tool()) { + context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/reload_script_soft"), FILE_TOOL_RELOAD_SOFT); context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/run_file"), FILE_RUN); context_menu->add_separator(); } @@ -3135,7 +3143,7 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) { restoring_layout = true; - Set<String> loaded_scripts; + RBSet<String> loaded_scripts; List<String> extensions; ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); @@ -3774,7 +3782,7 @@ ScriptEditor::ScriptEditor() { file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_as", TTR("Save As...")), FILE_SAVE_AS); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_all", TTR("Save All"), KeyModifierMask::SHIFT | KeyModifierMask::ALT | Key::S), FILE_SAVE_ALL); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_script_soft", TTR("Soft Reload Script"), KeyModifierMask::CMD | KeyModifierMask::ALT | Key::R), FILE_TOOL_RELOAD_SOFT); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_script_soft", TTR("Soft Reload Tool Script"), KeyModifierMask::CMD | KeyModifierMask::ALT | Key::R), FILE_TOOL_RELOAD_SOFT); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/copy_path", TTR("Copy Script Path")), FILE_COPY_PATH); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/show_in_file_system", TTR("Show in FileSystem")), SHOW_IN_FILE_SYSTEM); file_menu->get_popup()->add_separator(); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 41b311f745..ff71c8b484 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -206,7 +206,6 @@ class ScriptEditor : public PanelContainer { TOGGLE_SCRIPTS_PANEL, SHOW_IN_FILE_SYSTEM, FILE_COPY_PATH, - FILE_TOOL_RELOAD, FILE_TOOL_RELOAD_SOFT, SEARCH_IN_FILES, REPLACE_IN_FILES, @@ -415,7 +414,7 @@ class ScriptEditor : public PanelContainer { void _update_help_overview(); void _help_overview_selected(int p_idx); - void _find_scripts(Node *p_base, Node *p_current, Set<Ref<Script>> &used); + void _find_scripts(Node *p_base, Node *p_current, RBSet<Ref<Script>> &used); void _tree_changed(); @@ -455,7 +454,7 @@ class ScriptEditor : public PanelContainer { Ref<Script> _get_current_script(); Array _get_open_scripts() const; - Set<String> textfile_extensions; + RBSet<String> textfile_extensions; Ref<TextFile> _load_text_file(const String &p_path, Error *r_error) const; Error _save_text_file(Ref<TextFile> p_text_file, const String &p_path); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index bed7739239..f666ac0649 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -664,7 +664,7 @@ static Node *_find_node_for_script(Node *p_base, Node *p_current, const Ref<Scri return nullptr; } -static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, Set<Ref<Script>> &r_scripts) { +static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, RBSet<Ref<Script>> &r_scripts) { if (p_current->get_owner() != p_base && p_base != p_current) { return; } @@ -686,15 +686,15 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo ERR_FAIL_COND(!get_tree()); - Set<Ref<Script>> scripts; + RBSet<Ref<Script>> scripts; Node *base = get_tree()->get_edited_scene_root(); if (base) { _find_changed_scripts_for_external_editor(base, base, scripts); } - for (Set<Ref<Script>>::Element *E = scripts.front(); E; E = E->next()) { - Ref<Script> script = E->get(); + for (const Ref<Script> &E : scripts) { + Ref<Script> script = E; if (p_for_script.is_valid() && p_for_script != script) { continue; @@ -970,7 +970,7 @@ void ScriptTextEditor::_update_connected_methods() { } Vector<Node *> nodes = _find_all_node_for_script(base, base, script); - Set<StringName> methods_found; + RBSet<StringName> methods_found; for (int i = 0; i < nodes.size(); i++) { List<Connection> connections; nodes[i]->get_signals_connected_to_this(&connections); @@ -1371,11 +1371,11 @@ void ScriptTextEditor::add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_hig void ScriptTextEditor::set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) { ERR_FAIL_COND(p_highlighter.is_null()); - Map<String, Ref<EditorSyntaxHighlighter>>::Element *el = highlighters.front(); - while (el != nullptr) { - int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key()); - highlighter_menu->set_item_checked(highlighter_index, el->value() == p_highlighter); - el = el->next(); + HashMap<String, Ref<EditorSyntaxHighlighter>>::Iterator el = highlighters.begin(); + while (el) { + int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key); + highlighter_menu->set_item_checked(highlighter_index, el->value == p_highlighter); + ++el; } CodeEdit *te = code_editor->get_text_editor(); @@ -1558,19 +1558,62 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data Array nodes = d["nodes"]; String text_to_drop; - for (int i = 0; i < nodes.size(); i++) { - if (i > 0) { - text_to_drop += ","; - } - NodePath np = nodes[i]; - Node *node = get_node(np); - if (!node) { - continue; + if (Input::get_singleton()->is_key_pressed(Key::CTRL)) { + bool use_type = EDITOR_GET("text_editor/completion/add_type_hints"); + for (int i = 0; i < nodes.size(); i++) { + NodePath np = nodes[i]; + Node *node = get_node(np); + if (!node) { + continue; + } + + String path; + if (node->is_unique_name_in_owner()) { + path = "%" + node->get_name(); + } else { + path = sn->get_path_to(node); + } + for (const String &segment : path.split("/")) { + if (!segment.is_valid_identifier()) { + path = path.c_escape().quote(quote_style); + break; + } + } + + String variable_name = String(node->get_name()).camelcase_to_underscore(true).validate_identifier(); + if (use_type) { + text_to_drop += vformat("@onready var %s: %s = $%s\n", variable_name, node->get_class_name(), path); + } else { + text_to_drop += vformat("@onready var %s = $%s\n", variable_name, path); + } } + } else { + for (int i = 0; i < nodes.size(); i++) { + if (i > 0) { + text_to_drop += ", "; + } + + NodePath np = nodes[i]; + Node *node = get_node(np); + if (!node) { + continue; + } - String path = sn->get_path_to(node); - text_to_drop += path.c_escape().quote(quote_style); + String path; + if (node->is_unique_name_in_owner()) { + path = "%" + node->get_name(); + } else { + path = sn->get_path_to(node); + } + for (const String &segment : path.split("/")) { + if (!segment.is_valid_identifier()) { + path = path.c_escape().quote(quote_style); + break; + } + } + text_to_drop += "$" + path; + } } te->set_caret_line(row); diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index b3e0c28bb1..ff13b38832 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -64,7 +64,7 @@ class ScriptTextEditor : public ScriptEditorBase { Vector<String> functions; List<ScriptLanguage::Warning> warnings; List<ScriptLanguage::ScriptError> errors; - Set<int> safe_lines; + RBSet<int> safe_lines; List<Connection> missing_connections; @@ -175,7 +175,7 @@ protected: void _notification(int p_what); static void _bind_methods(); - Map<String, Ref<EditorSyntaxHighlighter>> highlighters; + HashMap<String, Ref<EditorSyntaxHighlighter>> highlighters; void _change_syntax_highlighter(int p_idx); void _edit_option(int p_op); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 1bf78cc107..c13d0dc197 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -47,7 +47,7 @@ static bool saved_warnings_enabled = false; static bool saved_treat_warning_as_errors = false; -static Map<ShaderWarning::Code, bool> saved_warnings; +static HashMap<ShaderWarning::Code, bool> saved_warnings; static uint32_t saved_warning_flags = 0U; void ShaderTextEditor::_notification(int p_what) { diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 26a982a091..1ebdf466fe 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -588,7 +588,7 @@ void Skeleton3DEditor::update_joint_tree() { TreeItem *root = joint_tree->create_item(); - Map<int, TreeItem *> items; + HashMap<int, TreeItem *> items; items.insert(-1, root); @@ -600,7 +600,7 @@ void Skeleton3DEditor::update_joint_tree() { bones_to_process.erase(current_bone_idx); const int parent_idx = skeleton->get_bone_parent(current_bone_idx); - TreeItem *parent_item = items.find(parent_idx)->get(); + TreeItem *parent_item = items.find(parent_idx)->value; TreeItem *joint_item = joint_tree->create_item(parent_item); items.insert(current_bone_idx, joint_item); diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 7b6aeb3679..8a40ffbe38 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -125,8 +125,8 @@ void SpriteFramesEditor::_sheet_preview_draw() { Color accent = get_theme_color("accent_color", "Editor"); - for (Set<int>::Element *E = frames_selected.front(); E; E = E->next()) { - const int idx = E->get(); + for (const int &E : frames_selected) { + const int idx = E; const int x = idx % frame_count.x; const int y = idx / frame_count.x; const Point2 pos = draw_offset + Point2(x, y) * (draw_frame_size + draw_sep); @@ -248,8 +248,8 @@ void SpriteFramesEditor::_sheet_add_frames() { int fc = frames->get_frame_count(edited_anim); - for (Set<int>::Element *E = frames_selected.front(); E; E = E->next()) { - int idx = E->get(); + for (const int &E : frames_selected) { + int idx = E; const Point2 frame_coords(idx % frame_count.x, idx / frame_count.x); Ref<AtlasTexture> at; diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h index 3230228fdd..6f16ff2bd1 100644 --- a/editor/plugins/sprite_frames_editor_plugin.h +++ b/editor/plugins/sprite_frames_editor_plugin.h @@ -103,8 +103,8 @@ class SpriteFramesEditor : public HSplitContainer { Button *split_sheet_zoom_reset = nullptr; Button *split_sheet_zoom_in = nullptr; EditorFileDialog *file_split_sheet = nullptr; - Set<int> frames_selected; - Set<int> frames_toggled_by_mouse_hover; + RBSet<int> frames_selected; + RBSet<int> frames_toggled_by_mouse_hover; int last_frame_selected = 0; float scale_ratio; diff --git a/editor/plugins/text_control_editor_plugin.cpp b/editor/plugins/text_control_editor_plugin.cpp index 4290888e94..2a5faba4a2 100644 --- a/editor/plugins/text_control_editor_plugin.cpp +++ b/editor/plugins/text_control_editor_plugin.cpp @@ -92,8 +92,8 @@ void TextControlEditor::_update_fonts_menu() { } int id = FONT_INFO_ID; - for (Map<String, Map<String, String>>::Element *E = fonts.front(); E; E = E->next()) { - font_list->add_item(E->key(), id++); + for (const KeyValue<String, HashMap<String, String>> &E : fonts) { + font_list->add_item(E.key, id++); } if (font_list->get_item_count() > 1) { @@ -107,8 +107,8 @@ void TextControlEditor::_update_styles_menu() { font_style_list->clear(); if ((font_list->get_selected_id() >= FONT_INFO_ID)) { const String &name = font_list->get_item_text(font_list->get_selected()); - for (Map<String, String>::Element *E = fonts[name].front(); E; E = E->next()) { - font_style_list->add_item(E->key()); + for (KeyValue<String, String> &E : fonts[name]) { + font_style_list->add_item(E.key); } } else if (font_list->get_selected() >= 0) { font_style_list->add_item("Default"); diff --git a/editor/plugins/text_control_editor_plugin.h b/editor/plugins/text_control_editor_plugin.h index a475f6eba3..cf069338b6 100644 --- a/editor/plugins/text_control_editor_plugin.h +++ b/editor/plugins/text_control_editor_plugin.h @@ -52,7 +52,7 @@ class TextControlEditor : public HBoxContainer { FONT_INFO_ID = 100, }; - Map<String, Map<String, String>> fonts; + HashMap<String, HashMap<String, String>> fonts; OptionButton *font_list = nullptr; SpinBox *font_size_list = nullptr; diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 97ecc234e6..7ca65c073d 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -43,11 +43,11 @@ void TextEditor::add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlight void TextEditor::set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) { ERR_FAIL_COND(p_highlighter.is_null()); - Map<String, Ref<EditorSyntaxHighlighter>>::Element *el = highlighters.front(); - while (el != nullptr) { - int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key()); - highlighter_menu->set_item_checked(highlighter_index, el->value() == p_highlighter); - el = el->next(); + HashMap<String, Ref<EditorSyntaxHighlighter>>::Iterator el = highlighters.begin(); + while (el) { + int highlighter_index = highlighter_menu->get_item_idx_from_text(el->key); + highlighter_menu->set_item_checked(highlighter_index, el->value == p_highlighter); + ++el; } CodeEdit *te = code_editor->get_text_editor(); diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index 9b6d568382..4f0121da52 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -92,7 +92,7 @@ protected: void _text_edit_gui_input(const Ref<InputEvent> &ev); void _prepare_edit_menu(); - Map<String, Ref<EditorSyntaxHighlighter>> highlighters; + HashMap<String, Ref<EditorSyntaxHighlighter>> highlighters; void _change_syntax_highlighter(int p_idx); void _load_theme_settings(); diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h index 2493446303..2c4ab72743 100644 --- a/editor/plugins/texture_region_editor_plugin.h +++ b/editor/plugins/texture_region_editor_plugin.h @@ -89,7 +89,7 @@ class TextureRegionEditor : public VBoxContainer { Rect2 rect_prev; float prev_margin = 0.0f; int edited_margin; - Map<RID, List<Rect2>> cache_map; + HashMap<RID, List<Rect2>> cache_map; List<Rect2> autoslice_cache; bool autoslice_is_dirty; diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 41a599e933..7b2c7d2a82 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -3211,11 +3211,13 @@ void ThemeTypeEditor::_update_stylebox_from_leading() { edited_theme->get_stylebox_list(edited_type, &names); List<Ref<StyleBox>> styleboxes; for (const StringName &E : names) { - if (E == leading_stylebox.item_name) { + Ref<StyleBox> sb = edited_theme->get_stylebox(E, edited_type); + + // Avoid itself, stylebox can be shared between items. + if (sb == leading_stylebox.stylebox) { continue; } - Ref<StyleBox> sb = edited_theme->get_stylebox(E, edited_type); if (sb->get_class() == leading_stylebox.stylebox->get_class()) { styleboxes.push_back(sb); } diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h index 6debf00e90..323cfceb7e 100644 --- a/editor/plugins/theme_editor_plugin.h +++ b/editor/plugins/theme_editor_plugin.h @@ -73,7 +73,7 @@ class ThemeItemImportTree : public VBoxContainer { SELECT_IMPORT_FULL, }; - Map<ThemeItem, ItemCheckedState> selected_items; + RBMap<ThemeItem, ItemCheckedState> selected_items; LineEdit *import_items_filter = nullptr; diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp index 252a19a7db..a6e34cf5e0 100644 --- a/editor/plugins/theme_editor_preview.cpp +++ b/editor/plugins/theme_editor_preview.cpp @@ -269,6 +269,15 @@ ThemeEditorPreview::ThemeEditorPreview() { picker_overlay->connect("mouse_exited", callable_mp(this, &ThemeEditorPreview::_reset_picker_overlay)); } +void DefaultThemeEditorPreview::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case NOTIFICATION_THEME_CHANGED: { + test_color_picker_button->set_custom_minimum_size(Size2(0, get_theme_constant(SNAME("color_picker_button_height"), SNAME("Editor")))); + } break; + } +} + DefaultThemeEditorPreview::DefaultThemeEditorPreview() { Panel *main_panel = memnew(Panel); preview_content->add_child(main_panel); @@ -343,7 +352,8 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() { test_option_button->add_item(TTR("Many")); test_option_button->add_item(TTR("Options")); first_vb->add_child(test_option_button); - first_vb->add_child(memnew(ColorPickerButton)); + test_color_picker_button = memnew(ColorPickerButton); + first_vb->add_child(test_color_picker_button); VBoxContainer *second_vb = memnew(VBoxContainer); second_vb->set_h_size_flags(SIZE_EXPAND_FILL); diff --git a/editor/plugins/theme_editor_preview.h b/editor/plugins/theme_editor_preview.h index d05916afae..4d209ac788 100644 --- a/editor/plugins/theme_editor_preview.h +++ b/editor/plugins/theme_editor_preview.h @@ -38,6 +38,8 @@ #include "scene/gui/scroll_container.h" #include "scene/resources/theme.h" +class ColorPickerButton; + class ThemeEditorPreview : public VBoxContainer { GDCLASS(ThemeEditorPreview, VBoxContainer); @@ -87,6 +89,11 @@ public: class DefaultThemeEditorPreview : public ThemeEditorPreview { GDCLASS(DefaultThemeEditorPreview, ThemeEditorPreview); + ColorPickerButton *test_color_picker_button = nullptr; + +protected: + void _notification(int p_what); + public: DefaultThemeEditorPreview(); }; diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp index 086588f5a5..e37878ff98 100644 --- a/editor/plugins/tiles/atlas_merging_dialog.cpp +++ b/editor/plugins/tiles/atlas_merging_dialog.cpp @@ -62,7 +62,7 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla int line_height = 0; for (int source_index = 0; source_index < p_atlas_sources.size(); source_index++) { Ref<TileSetAtlasSource> atlas_source = p_atlas_sources[source_index]; - merged_mapping.push_back(Map<Vector2i, Vector2i>()); + merged_mapping.push_back(HashMap<Vector2i, Vector2i>()); // Layout the tiles. Vector2i atlas_size; diff --git a/editor/plugins/tiles/atlas_merging_dialog.h b/editor/plugins/tiles/atlas_merging_dialog.h index 9502d93f6b..c54e259594 100644 --- a/editor/plugins/tiles/atlas_merging_dialog.h +++ b/editor/plugins/tiles/atlas_merging_dialog.h @@ -46,7 +46,7 @@ private: int commited_actions_count = 0; bool delete_original_atlases = true; Ref<TileSetAtlasSource> merged; - LocalVector<Map<Vector2i, Vector2i>> merged_mapping; + LocalVector<HashMap<Vector2i, Vector2i>> merged_mapping; Ref<TileSet> tile_set; UndoRedo *undo_redo = nullptr; diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index 4de2f42fe0..3073c8a7f2 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -480,7 +480,7 @@ void TileAtlasView::_update_alternative_tiles_rect_cache() { // Update the rect. if (!alternative_tiles_rect_cache.has(tile_id)) { - alternative_tiles_rect_cache[tile_id] = Map<int, Rect2i>(); + alternative_tiles_rect_cache[tile_id] = HashMap<int, Rect2i>(); } alternative_tiles_rect_cache[tile_id][alternative_id] = current; @@ -494,7 +494,7 @@ void TileAtlasView::_update_alternative_tiles_rect_cache() { } Vector3i TileAtlasView::get_alternative_tile_at_pos(const Vector2 p_pos) const { - for (const KeyValue<Vector2, Map<int, Rect2i>> &E_coords : alternative_tiles_rect_cache) { + for (const KeyValue<Vector2, HashMap<int, Rect2i>> &E_coords : alternative_tiles_rect_cache) { for (const KeyValue<int, Rect2i> &E_alternative : E_coords.value) { if (E_alternative.value.has_point(p_pos)) { return Vector3i(E_coords.key.x, E_coords.key.y, E_alternative.key); diff --git a/editor/plugins/tiles/tile_atlas_view.h b/editor/plugins/tiles/tile_atlas_view.h index 6e74858b08..ff46b7871f 100644 --- a/editor/plugins/tiles/tile_atlas_view.h +++ b/editor/plugins/tiles/tile_atlas_view.h @@ -69,7 +69,7 @@ private: void _pan_callback(Vector2 p_scroll_vec); void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt); - Map<Vector2, Map<int, Rect2i>> alternative_tiles_rect_cache; + HashMap<Vector2, HashMap<int, Rect2i>> alternative_tiles_rect_cache; void _update_alternative_tiles_rect_cache(); MarginContainer *margin_container = nullptr; diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index 70bcd7e39a..244c718ebe 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -862,7 +862,7 @@ Variant TileDataDefaultEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas_s return tile_data->get(property); } -void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { +void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) { for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { Vector2i coords = E.key.get_atlas_coords(); undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/%s", coords.x, coords.y, E.key.alternative_tile, property), E.value); @@ -882,7 +882,7 @@ void TileDataDefaultEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas_ rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()))); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -897,8 +897,8 @@ void TileDataDefaultEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas_ } } - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { - Vector2i coords = E->get().get_atlas_coords(); + for (const TileMapCell &E : edited) { + Vector2i coords = E.get_atlas_coords(); p_canvas_item->draw_rect(p_tile_set_atlas_source->get_tile_texture_region(coords), selection_color, false); } p_canvas_item->draw_set_transform_matrix(Transform2D()); @@ -1299,7 +1299,7 @@ Variant TileDataOcclusionShapeEditor::_get_value(TileSetAtlasSource *p_tile_set_ return tile_data->get_occluder(occlusion_layer); } -void TileDataOcclusionShapeEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { +void TileDataOcclusionShapeEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) { for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { Vector2i coords = E.key.get_atlas_coords(); undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/occlusion_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, occlusion_layer), E.value); @@ -1479,7 +1479,7 @@ Variant TileDataCollisionEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas return dict; } -void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { +void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) { Array new_array = p_new_value; for (KeyValue<TileMapCell, Variant> &E : p_previous_values) { Array old_array = E.value; @@ -1740,7 +1740,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()))); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -1755,8 +1755,8 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas } } - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { - Vector2i coords = E->get().get_atlas_coords(); + for (const TileMapCell &E : edited) { + Vector2i coords = E.get_atlas_coords(); p_canvas_item->draw_rect(p_tile_set_atlas_source->get_tile_texture_region(coords), selection_color, false); } p_canvas_item->draw_set_transform_matrix(Transform2D()); @@ -1770,7 +1770,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()))); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -1800,8 +1800,8 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas p_canvas_item->draw_set_transform_matrix(p_transform); - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { - Vector2i coords = E->get().get_atlas_coords(); + for (const TileMapCell &E : edited) { + Vector2i coords = E.get_atlas_coords(); Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords); Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0); @@ -2118,7 +2118,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position())); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -2133,15 +2133,15 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t } } undo_redo->create_action(TTR("Painting Terrain Set")); - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { - Vector2i coords = E->get().get_atlas_coords(); + for (const TileMapCell &E : edited) { + Vector2i coords = E.get_atlas_coords(); TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, 0); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E->get().alternative_tile), tile_data->get_terrain_set()); - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E->get().alternative_tile), drag_painted_value); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.alternative_tile), tile_data->get_terrain_set()); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.alternative_tile), drag_painted_value); for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); if (tile_data->is_valid_peering_bit_terrain(bit)) { - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->get().alternative_tile), tile_data->get_peering_bit_terrain(bit)); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.alternative_tile), tile_data->get_peering_bit_terrain(bit)); } } } @@ -2195,7 +2195,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position())); rect = rect.abs(); - Set<TileMapCell> edited; + RBSet<TileMapCell> edited; for (int x = rect.get_position().x; x <= rect.get_end().x; x++) { for (int y = rect.get_position().y; y <= rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -2220,8 +2220,8 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t mouse_pos_rect_polygon.push_back(Vector2(drag_start_pos.x, mb->get_position().y)); undo_redo->create_action(TTR("Painting Terrain")); - for (Set<TileMapCell>::Element *E = edited.front(); E; E = E->next()) { - Vector2i coords = E->get().get_atlas_coords(); + for (const TileMapCell &E : edited) { + Vector2i coords = E.get_atlas_coords(); TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, 0); for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { @@ -2236,8 +2236,8 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t } if (!Geometry2D::intersect_polygons(polygon, mouse_pos_rect_polygon).is_empty()) { // Draw bit. - undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->get().alternative_tile), terrain); - undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E->get().alternative_tile), tile_data->get_peering_bit_terrain(bit)); + undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.alternative_tile), terrain); + undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.alternative_tile), tile_data->get_peering_bit_terrain(bit)); } } } @@ -2571,7 +2571,7 @@ Variant TileDataNavigationEditor::_get_value(TileSetAtlasSource *p_tile_set_atla return tile_data->get_navigation_polygon(navigation_layer); } -void TileDataNavigationEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) { +void TileDataNavigationEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) { for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) { Vector2i coords = E.key.get_atlas_coords(); undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/navigation_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, navigation_layer), E.value); diff --git a/editor/plugins/tiles/tile_data_editors.h b/editor/plugins/tiles/tile_data_editors.h index 2c849637f0..f9b8948d0a 100644 --- a/editor/plugins/tiles/tile_data_editors.h +++ b/editor/plugins/tiles/tile_data_editors.h @@ -71,7 +71,7 @@ public: class DummyObject : public Object { GDCLASS(DummyObject, Object) private: - Map<String, Variant> properties; + HashMap<String, Variant> properties; protected: bool _set(const StringName &p_name, const Variant &p_value); @@ -206,7 +206,7 @@ private: DragType drag_type = DRAG_TYPE_NONE; Vector2 drag_start_pos; Vector2 drag_last_pos; - Map<TileMapCell, Variant> drag_modified; + HashMap<TileMapCell, Variant, TileMapCell> drag_modified; Variant drag_painted_value; void _property_value_changed(StringName p_property, Variant p_value, StringName p_field); @@ -224,7 +224,7 @@ protected: virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile); virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value); virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile); - virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value); + virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value); public: virtual Control *get_toolbar() override { return toolbar; }; @@ -276,7 +276,7 @@ private: virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override; virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; - virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override; + virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override; protected: UndoRedo *undo_redo = nullptr; @@ -301,7 +301,7 @@ class TileDataCollisionEditor : public TileDataDefaultEditor { // UI GenericTilePolygonEditor *polygon_editor = nullptr; DummyObject *dummy_object = memnew(DummyObject); - Map<StringName, EditorProperty *> property_editors; + HashMap<StringName, EditorProperty *> property_editors; void _property_value_changed(StringName p_property, Variant p_value, StringName p_field); void _property_selected(StringName p_path, int p_focusable); @@ -311,7 +311,7 @@ class TileDataCollisionEditor : public TileDataDefaultEditor { virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override; virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; - virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override; + virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override; protected: UndoRedo *undo_redo = nullptr; @@ -348,7 +348,7 @@ private: DragType drag_type = DRAG_TYPE_NONE; Vector2 drag_start_pos; Vector2 drag_last_pos; - Map<TileMapCell, Variant> drag_modified; + HashMap<TileMapCell, Variant, TileMapCell> drag_modified; Variant drag_painted_value; // UI @@ -396,7 +396,7 @@ private: virtual void _set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; virtual void _set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) override; virtual Variant _get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) override; - virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override; + virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override; protected: UndoRedo *undo_redo = nullptr; diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp index ac90333e1d..6c39244f80 100644 --- a/editor/plugins/tiles/tile_map_editor.cpp +++ b/editor/plugins/tiles/tile_map_editor.cpp @@ -501,8 +501,8 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p if (!tile_map_selection.is_empty()) { tile_map_clipboard.instantiate(); TypedArray<Vector2i> coords_array; - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - coords_array.push_back(E->get()); + for (const Vector2i &E : tile_map_selection) { + coords_array.push_back(E); } tile_map_clipboard = tile_map->get_pattern(tile_map_layer, coords_array); } @@ -511,9 +511,9 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p // Delete selected tiles. if (!tile_map_selection.is_empty()) { undo_redo->create_action(TTR("Delete tiles")); - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->get(), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); - undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E->get(), tile_map->get_cell_source_id(tile_map_layer, E->get()), tile_map->get_cell_atlas_coords(tile_map_layer, E->get()), tile_map->get_cell_alternative_tile(tile_map_layer, E->get())); + for (const Vector2i &E : tile_map_selection) { + undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E, TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); + undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E, tile_map->get_cell_source_id(tile_map_layer, E), tile_map->get_cell_atlas_coords(tile_map_layer, E), tile_map->get_cell_alternative_tile(tile_map_layer, E)); } undo_redo->add_undo_method(this, "_set_tile_map_selection", _get_tile_map_selection()); tile_map_selection.clear(); @@ -542,9 +542,9 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p // Delete selected tiles. if (!tile_map_selection.is_empty()) { undo_redo->create_action(TTR("Delete tiles")); - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->get(), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); - undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E->get(), tile_map->get_cell_source_id(tile_map_layer, E->get()), tile_map->get_cell_atlas_coords(tile_map_layer, E->get()), tile_map->get_cell_alternative_tile(tile_map_layer, E->get())); + for (const Vector2i &E : tile_map_selection) { + undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E, TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); + undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E, tile_map->get_cell_source_id(tile_map_layer, E), tile_map->get_cell_atlas_coords(tile_map_layer, E), tile_map->get_cell_alternative_tile(tile_map_layer, E)); } undo_redo->add_undo_method(this, "_set_tile_map_selection", _get_tile_map_selection()); tile_map_selection.clear(); @@ -562,7 +562,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p switch (drag_type) { case DRAG_TYPE_PAINT: { - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_last_mouse_pos, mpos, drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_last_mouse_pos, mpos, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -579,7 +579,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); for (int i = 0; i < line.size(); i++) { if (!drag_modified.has(line[i])) { - Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -628,8 +628,8 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p _update_selection_pattern_from_tilemap_selection(); // Make sure the pattern is up to date before moving. drag_type = DRAG_TYPE_MOVE; drag_modified.clear(); - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - Vector2i coords = E->get(); + for (const Vector2i &E : tile_map_selection) { + Vector2i coords = E; drag_modified.insert(coords, tile_map->get_cell(tile_map_layer, coords)); tile_map->set_cell(tile_map_layer, coords, TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); } @@ -648,7 +648,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p drag_type = DRAG_TYPE_PAINT; drag_start_mouse_pos = mpos; drag_modified.clear(); - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, mpos, mpos, drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, mpos, mpos, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -675,7 +675,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); for (int i = 0; i < line.size(); i++) { if (!drag_modified.has(line[i])) { - Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -746,7 +746,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over // Handle the preview of the tiles to be placed. if ((tiles_bottom_panel->is_visible_in_tree() || patterns_bottom_panel->is_visible_in_tree()) && has_mouse) { // Only if the tilemap editor is opened and the viewport is hovered. - Map<Vector2i, TileMapCell> preview; + HashMap<Vector2i, TileMapCell> preview; Rect2i drawn_grid_rect; if (drag_type == DRAG_TYPE_PICK) { @@ -768,7 +768,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over // Draw the area being selected. Rect2i rect = Rect2i(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(drag_last_mouse_pos) - tile_map->world_to_map(drag_start_mouse_pos)).abs(); rect.size += Vector2i(1, 1); - Set<Vector2i> to_draw; + RBSet<Vector2i> to_draw; for (int x = rect.position.x; x < rect.get_end().x; x++) { for (int y = rect.position.y; y < rect.get_end().y; y++) { Vector2i coords = Vector2i(x, y); @@ -785,8 +785,8 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over if (!tile_map_selection.is_empty()) { top_left = tile_map_selection.front()->get(); } - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - top_left = top_left.min(E->get()); + for (const Vector2i &E : tile_map_selection) { + top_left = top_left.min(E); } Vector2i offset = drag_start_mouse_pos - tile_map->map_to_world(top_left); offset = tile_map->world_to_map(drag_last_mouse_pos - offset) - tile_map->world_to_map(drag_start_mouse_pos - offset); @@ -832,7 +832,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over // Expand the grid if needed if (expand_grid && !preview.is_empty()) { - drawn_grid_rect = Rect2i(preview.front()->key(), Vector2i(1, 1)); + drawn_grid_rect = Rect2i(preview.begin()->key, Vector2i(1, 1)); for (const KeyValue<Vector2i, TileMapCell> &E : preview) { drawn_grid_rect.expand_to(E.key); } @@ -986,15 +986,15 @@ TileMapCell TileMapEditorTilesPlugin::_pick_random_tile(Ref<TileMapPattern> p_pa return TileMapCell(); } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } // Get or create the pattern. @@ -1003,7 +1003,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_ erase_pattern->set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); Ref<TileMapPattern> pattern = p_erase ? erase_pattern : selection_pattern; - Map<Vector2i, TileMapCell> output; + HashMap<Vector2i, TileMapCell> output; if (!pattern->is_empty()) { // Paint the tiles on the tile map. if (!p_erase && random_tile_toggle->is_pressed()) { @@ -1035,15 +1035,15 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_line(Vector2 p_start_ return output; } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } // Create the rect to draw. @@ -1056,7 +1056,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start erase_pattern->set_cell(Vector2i(0, 0), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); Ref<TileMapPattern> pattern = p_erase ? erase_pattern : selection_pattern; - Map<Vector2i, TileMapCell> err_output; + HashMap<Vector2i, TileMapCell> err_output; ERR_FAIL_COND_V(pattern->is_empty(), err_output); // Compute the offset to align things to the bottom or right. @@ -1064,7 +1064,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start bool valigned_bottom = p_end_cell.y < p_start_cell.y; Vector2i offset = Vector2i(aligned_right ? -(pattern->get_size().x - (rect.get_size().x % pattern->get_size().x)) : 0, valigned_bottom ? -(pattern->get_size().y - (rect.get_size().y % pattern->get_size().y)) : 0); - Map<Vector2i, TileMapCell> output; + HashMap<Vector2i, TileMapCell> output; if (!pattern->is_empty()) { if (!p_erase && random_tile_toggle->is_pressed()) { // Paint a random tile. @@ -1094,21 +1094,21 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_rect(Vector2i p_start return output; } -Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } if (tile_map_layer < 0) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } - Map<Vector2i, TileMapCell> output; + HashMap<Vector2i, TileMapCell> output; ERR_FAIL_INDEX_V(tile_map_layer, tile_map->get_layers_count(), output); Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } // Get or create the pattern. @@ -1128,7 +1128,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i if (p_contiguous) { // Replace continuous tiles like the source. - Set<Vector2i> already_checked; + RBSet<Vector2i> already_checked; List<Vector2i> to_check; to_check.push_back(p_coords); while (!to_check.is_empty()) { @@ -1278,8 +1278,8 @@ void TileMapEditorTilesPlugin::_stop_dragging() { if (!tile_map_selection.is_empty()) { top_left = tile_map_selection.front()->get(); } - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - top_left = top_left.min(E->get()); + for (const Vector2i &E : tile_map_selection) { + top_left = top_left.min(E); } // Get the offset from the mouse. @@ -1290,7 +1290,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { // Build the list of cells to undo. Vector2i coords; - Map<Vector2i, TileMapCell> cells_undo; + HashMap<Vector2i, TileMapCell> cells_undo; for (int i = 0; i < selection_used_cells.size(); i++) { coords = tile_map->map_pattern(top_left, selection_used_cells[i], selection_pattern); cells_undo[coords] = TileMapCell(drag_modified[coords].source_id, drag_modified[coords].get_atlas_coords(), drag_modified[coords].alternative_tile); @@ -1299,7 +1299,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { } // Build the list of cells to do. - Map<Vector2i, TileMapCell> cells_do; + HashMap<Vector2i, TileMapCell> cells_do; for (int i = 0; i < selection_used_cells.size(); i++) { coords = tile_map->map_pattern(top_left, selection_used_cells[i], selection_pattern); cells_do[coords] = TileMapCell(); @@ -1311,11 +1311,11 @@ void TileMapEditorTilesPlugin::_stop_dragging() { // Move the tiles. undo_redo->create_action(TTR("Move tiles")); - for (Map<Vector2i, TileMapCell>::Element *E = cells_do.front(); E; E = E->next()) { - undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + for (const KeyValue<Vector2i, TileMapCell> &E : cells_do) { + undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } - for (Map<Vector2i, TileMapCell>::Element *E = cells_undo.front(); E; E = E->next()) { - undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + for (const KeyValue<Vector2i, TileMapCell> &E : cells_undo) { + undo_redo->add_undo_method(tile_map, "set_cell", tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); } // Update the selection. @@ -1378,7 +1378,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { undo_redo->commit_action(false); } break; case DRAG_TYPE_LINE: { - Map<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, mpos, drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(drag_start_mouse_pos, drag_start_mouse_pos, mpos, drag_erasing); undo_redo->create_action(TTR("Paint tiles")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { @@ -1390,7 +1390,7 @@ void TileMapEditorTilesPlugin::_stop_dragging() { undo_redo->commit_action(); } break; case DRAG_TYPE_RECT: { - Map<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); undo_redo->create_action(TTR("Paint tiles")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { @@ -1476,7 +1476,7 @@ void TileMapEditorTilesPlugin::_update_fix_selected_and_hovered() { } // Selection if needed. - for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { + for (RBSet<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { const TileMapCell *selected = &(E->get()); if (!tile_set->has_source(selected->source_id) || !tile_set->get_source(selected->source_id)->has_tile(selected->get_atlas_coords()) || @@ -1500,7 +1500,7 @@ void TileMapEditorTilesPlugin::_fix_invalid_tiles_in_tile_map_selection() { return; } - Set<Vector2i> to_remove; + RBSet<Vector2i> to_remove; for (Vector2i selected : tile_map_selection) { TileMapCell cell = tile_map->get_cell(tile_map_layer, selected); if (cell.source_id == TileSet::INVALID_SOURCE && cell.get_atlas_coords() == TileSetSource::INVALID_ATLAS_COORDS && cell.alternative_tile == TileSetAtlasSource::INVALID_TILE_ALTERNATIVE) { @@ -1534,8 +1534,8 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tilemap_selection( selection_pattern.instantiate(); TypedArray<Vector2i> coords_array; - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - coords_array.push_back(E->get()); + for (const Vector2i &E : tile_map_selection) { + coords_array.push_back(E); } selection_pattern = tile_map->get_pattern(tile_map_layer, coords_array); } @@ -1558,9 +1558,9 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_tiles_sele selection_pattern.instantiate(); // Group per source. - Map<int, List<const TileMapCell *>> per_source; - for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { - per_source[E->get().source_id].push_back(&(E->get())); + HashMap<int, List<const TileMapCell *>> per_source; + for (const TileMapCell &E : tile_set_selection) { + per_source[E.source_id].push_back(&(E)); } int vertical_offset = 0; @@ -1568,7 +1568,7 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_tiles_sele // Per source. List<const TileMapCell *> unorganized; Rect2i encompassing_rect_coords; - Map<Vector2i, const TileMapCell *> organized_pattern; + HashMap<Vector2i, const TileMapCell *> organized_pattern; TileSetSource *source = *tile_set->get_source(E_source.key); TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); @@ -1583,12 +1583,12 @@ void TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_tiles_sele } // Compute the encompassing rect for the organized pattern. - Map<Vector2i, const TileMapCell *>::Element *E_cell = organized_pattern.front(); + HashMap<Vector2i, const TileMapCell *>::Iterator E_cell = organized_pattern.begin(); if (E_cell) { - encompassing_rect_coords = Rect2i(E_cell->key(), Vector2i(1, 1)); - for (; E_cell; E_cell = E_cell->next()) { - encompassing_rect_coords.expand_to(E_cell->key() + Vector2i(1, 1)); - encompassing_rect_coords.expand_to(E_cell->key()); + encompassing_rect_coords = Rect2i(E_cell->key, Vector2i(1, 1)); + for (; E_cell; ++E_cell) { + encompassing_rect_coords.expand_to(E_cell->key + Vector2i(1, 1)); + encompassing_rect_coords.expand_to(E_cell->key); } } } else { @@ -1680,14 +1680,14 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() { // Draw the selection. Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color"); Color selection_color = Color().from_hsv(Math::fposmod(grid_color.get_h() + 0.5, 1.0), grid_color.get_s(), grid_color.get_v(), 1.0); - for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { - if (E->get().source_id == source_id && E->get().alternative_tile == 0) { - for (int frame = 0; frame < atlas->get_tile_animation_frames_count(E->get().get_atlas_coords()); frame++) { + for (const TileMapCell &E : tile_set_selection) { + if (E.source_id == source_id && E.alternative_tile == 0) { + for (int frame = 0; frame < atlas->get_tile_animation_frames_count(E.get_atlas_coords()); frame++) { Color color = selection_color; if (frame > 0) { color.a *= 0.3; } - tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E->get().get_atlas_coords(), frame), color, false); + tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E.get_atlas_coords(), frame), color, false); } } } @@ -1711,7 +1711,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() { Rect2i region = Rect2i(start_tile, end_tile - start_tile).abs(); region.size += Vector2i(1, 1); - Set<Vector2i> to_draw; + RBSet<Vector2i> to_draw; for (int x = region.position.x; x < region.get_end().x; x++) { for (int y = region.position.y; y < region.get_end().y; y++) { Vector2i tile = atlas->get_tile_at_coords(Vector2i(x, y)); @@ -1721,8 +1721,8 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() { } } Color selection_rect_color = selection_color.lightened(0.2); - for (Set<Vector2i>::Element *E = to_draw.front(); E; E = E->next()) { - tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E->get()), selection_rect_color, false); + for (const Vector2i &E : to_draw) { + tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E), selection_rect_color, false); } } } @@ -1868,9 +1868,9 @@ void TileMapEditorTilesPlugin::_tile_alternatives_control_draw() { } // Draw the selection. - for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) { - if (E->get().source_id == source_id && E->get().get_atlas_coords() != TileSetSource::INVALID_ATLAS_COORDS && E->get().alternative_tile > 0) { - Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E->get().get_atlas_coords(), E->get().alternative_tile); + for (const TileMapCell &E : tile_set_selection) { + if (E.source_id == source_id && E.get_atlas_coords() != TileSetSource::INVALID_ATLAS_COORDS && E.alternative_tile > 0) { + Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E.get_atlas_coords(), E.alternative_tile); if (rect != Rect2i()) { alternative_tiles_control->draw_rect(rect, Color(0.2, 0.2, 1.0), false); } @@ -1972,8 +1972,8 @@ void TileMapEditorTilesPlugin::_set_tile_map_selection(const TypedArray<Vector2i TypedArray<Vector2i> TileMapEditorTilesPlugin::_get_tile_map_selection() const { TypedArray<Vector2i> output; - for (Set<Vector2i>::Element *E = tile_map_selection.front(); E; E = E->next()) { - output.push_back(E->get()); + for (const Vector2i &E : tile_map_selection) { + output.push_back(E); } return output; } @@ -2321,33 +2321,33 @@ Vector<TileMapEditorPlugin::TabData> TileMapEditorTerrainsPlugin::get_tabs() con return tabs; } -Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const { +HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const HashMap<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } - Map<Vector2i, TileMapCell> output; + HashMap<Vector2i, TileMapCell> output; // Add the constraints from the added tiles. - Set<TileMap::TerrainConstraint> added_tiles_constraints_set; + RBSet<TileMap::TerrainConstraint> added_tiles_constraints_set; for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { Vector2i coords = E_to_paint.key; TileSet::TerrainsPattern terrains_pattern = E_to_paint.value; - Set<TileMap::TerrainConstraint> cell_constraints = tile_map->get_terrain_constraints_from_added_tile(coords, p_terrain_set, terrains_pattern); - for (Set<TileMap::TerrainConstraint>::Element *E = cell_constraints.front(); E; E = E->next()) { - added_tiles_constraints_set.insert(E->get()); + RBSet<TileMap::TerrainConstraint> cell_constraints = tile_map->get_terrain_constraints_from_added_tile(coords, p_terrain_set, terrains_pattern); + for (const TileMap::TerrainConstraint &E : cell_constraints) { + added_tiles_constraints_set.insert(E); } } // Build the list of potential tiles to replace. - Set<Vector2i> potential_to_replace; + RBSet<Vector2i> potential_to_replace; for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { Vector2i coords = E_to_paint.key; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { @@ -2361,7 +2361,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } // Set of tiles to replace - Set<Vector2i> to_replace; + RBSet<Vector2i> to_replace; // Add the central tiles to the one to replace. for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { @@ -2369,26 +2369,26 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } // Add the constraints from the surroundings of the modified areas. - Set<TileMap::TerrainConstraint> removed_cells_constraints_set; + RBSet<TileMap::TerrainConstraint> removed_cells_constraints_set; bool to_replace_modified = true; while (to_replace_modified) { // Get the constraints from the removed cells. removed_cells_constraints_set = tile_map->get_terrain_constraints_from_removed_cells_list(tile_map_layer, to_replace, p_terrain_set, false); // Filter the sources to make sure they are in the potential_to_replace. - Map<TileMap::TerrainConstraint, Set<Vector2i>> per_constraint_tiles; - for (Set<TileMap::TerrainConstraint>::Element *E = removed_cells_constraints_set.front(); E; E = E->next()) { - Map<Vector2i, TileSet::CellNeighbor> sources_of_constraint = E->get().get_overlapping_coords_and_peering_bits(); + RBMap<TileMap::TerrainConstraint, RBSet<Vector2i>> per_constraint_tiles; + for (const TileMap::TerrainConstraint &E : removed_cells_constraints_set) { + HashMap<Vector2i, TileSet::CellNeighbor> sources_of_constraint = E.get_overlapping_coords_and_peering_bits(); for (const KeyValue<Vector2i, TileSet::CellNeighbor> &E_source_tile_of_constraint : sources_of_constraint) { if (potential_to_replace.has(E_source_tile_of_constraint.key)) { - per_constraint_tiles[E->get()].insert(E_source_tile_of_constraint.key); + per_constraint_tiles[E].insert(E_source_tile_of_constraint.key); } } } to_replace_modified = false; - for (Set<TileMap::TerrainConstraint>::Element *E = added_tiles_constraints_set.front(); E; E = E->next()) { - TileMap::TerrainConstraint c = E->get(); + for (const TileMap::TerrainConstraint &E : added_tiles_constraints_set) { + TileMap::TerrainConstraint c = E; // Check if we have a conflict in constraints. if (removed_cells_constraints_set.has(c) && removed_cells_constraints_set.find(c)->get().get_terrain() != c.get_terrain()) { // If we do, we search for a neighbor to remove. @@ -2398,7 +2398,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map potential_to_replace.erase(to_add_to_remove); to_replace.insert(to_add_to_remove); to_replace_modified = true; - for (KeyValue<TileMap::TerrainConstraint, Set<Vector2i>> &E_source_tiles_of_constraint : per_constraint_tiles) { + for (KeyValue<TileMap::TerrainConstraint, RBSet<Vector2i>> &E_source_tiles_of_constraint : per_constraint_tiles) { E_source_tiles_of_constraint.value.erase(to_add_to_remove); } break; @@ -2408,9 +2408,9 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } // Combine all constraints together. - Set<TileMap::TerrainConstraint> constraints = removed_cells_constraints_set; - for (Set<TileMap::TerrainConstraint>::Element *E = added_tiles_constraints_set.front(); E; E = E->next()) { - constraints.insert(E->get()); + RBSet<TileMap::TerrainConstraint> constraints = removed_cells_constraints_set; + for (const TileMap::TerrainConstraint &E : added_tiles_constraints_set) { + constraints.insert(E); } // Remove the central tiles from the ones to replace. @@ -2419,7 +2419,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map } // Run WFC to fill the holes with the constraints. - Map<Vector2i, TileSet::TerrainsPattern> wfc_output = tile_map->terrain_wave_function_collapse(to_replace, p_terrain_set, constraints); + HashMap<Vector2i, TileSet::TerrainsPattern> wfc_output = tile_map->terrain_wave_function_collapse(to_replace, p_terrain_set, constraints); // Actually paint the tiles. for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E_to_paint : p_to_paint) { @@ -2434,15 +2434,15 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map return output; } -Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } TileSet::TerrainsPattern terrains_pattern; @@ -2453,22 +2453,22 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_line(Vector2i p_st } Vector<Vector2i> line = TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; + HashMap<Vector2i, TileSet::TerrainsPattern> to_draw; for (int i = 0; i < line.size(); i++) { to_draw[line[i]] = terrains_pattern; } return _draw_terrains(to_draw, selected_terrain_set); } -Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } TileSet::TerrainsPattern terrains_pattern; @@ -2483,7 +2483,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_st rect.set_end(p_end_cell); rect = rect.abs(); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; + HashMap<Vector2i, TileSet::TerrainsPattern> to_draw; for (int x = rect.position.x; x <= rect.get_end().x; x++) { for (int y = rect.position.y; y <= rect.get_end().y; y++) { to_draw[Vector2i(x, y)] = terrains_pattern; @@ -2492,15 +2492,15 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i p_st return _draw_terrains(to_draw, selected_terrain_set); } -Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous) { +RBSet<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Set<Vector2i>(); + return RBSet<Vector2i>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Set<Vector2i>(); + return RBSet<Vector2i>(); } TileMapCell source_cell = tile_map->get_cell(tile_map_layer, p_coords); @@ -2514,7 +2514,7 @@ Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p tile_data = atlas_source->get_tile_data(source_cell.get_atlas_coords(), source_cell.alternative_tile); } if (!tile_data) { - return Set<Vector2i>(); + return RBSet<Vector2i>(); } source_pattern = tile_data->get_terrains_pattern(); } @@ -2525,10 +2525,10 @@ Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p boundaries = tile_map->get_used_rect(); } - Set<Vector2i> output; + RBSet<Vector2i> output; if (p_contiguous) { // Replace continuous tiles like the source. - Set<Vector2i> already_checked; + RBSet<Vector2i> already_checked; List<Vector2i> to_check; to_check.push_back(p_coords); while (!to_check.is_empty()) { @@ -2603,15 +2603,15 @@ Set<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i p return output; } -Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { +HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase) { TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id)); if (!tile_map) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } Ref<TileSet> tile_set = tile_map->get_tileset(); if (!tile_set.is_valid()) { - return Map<Vector2i, TileMapCell>(); + return HashMap<Vector2i, TileMapCell>(); } TileSet::TerrainsPattern terrains_pattern; @@ -2621,8 +2621,8 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_bucket_fill(Vector terrains_pattern = selected_terrains_pattern; } - Set<Vector2i> cells_to_draw = _get_cells_for_bucket_fill(p_coords, p_contiguous); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; + RBSet<Vector2i> cells_to_draw = _get_cells_for_bucket_fill(p_coords, p_contiguous); + HashMap<Vector2i, TileSet::TerrainsPattern> to_draw; for (const Vector2i &coords : cells_to_draw) { to_draw[coords] = terrains_pattern; } @@ -2718,7 +2718,7 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { undo_redo->commit_action(false); } break; case DRAG_TYPE_LINE: { - Map<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); undo_redo->create_action(TTR("Paint terrain")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { @@ -2730,7 +2730,7 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() { undo_redo->commit_action(); } break; case DRAG_TYPE_RECT: { - Map<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_rect(tile_map->world_to_map(drag_start_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); undo_redo->create_action(TTR("Paint terrain")); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { @@ -2829,7 +2829,7 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> switch (drag_type) { case DRAG_TYPE_PAINT: { if (selected_terrain_set >= 0) { - Map<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_modified.has(E.key)) { drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key); @@ -2874,7 +2874,7 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> drag_modified.clear(); Vector2i cell = tile_map->world_to_map(mpos); - Map<Vector2i, TileMapCell> to_draw = _draw_line(cell, cell, drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_line(cell, cell, drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key); tile_map->set_cell(tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile); @@ -2903,7 +2903,7 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent> Vector<Vector2i> line = TileMapEditor::get_line(tile_map, tile_map->world_to_map(drag_last_mouse_pos), tile_map->world_to_map(mpos)); for (int i = 0; i < line.size(); i++) { if (!drag_modified.has(line[i])) { - Map<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); + HashMap<Vector2i, TileMapCell> to_draw = _draw_bucket_fill(line[i], bucket_contiguous_checkbox->is_pressed(), drag_erasing); for (const KeyValue<Vector2i, TileMapCell> &E : to_draw) { if (!drag_erasing && E.value.source_id == TileSet::INVALID_SOURCE) { continue; @@ -2959,7 +2959,7 @@ void TileMapEditorTerrainsPlugin::forward_canvas_draw_over_viewport(Control *p_o // Handle the preview of the tiles to be placed. if (main_vbox_container->is_visible_in_tree() && has_mouse) { // Only if the tilemap editor is opened and the viewport is hovered. - Set<Vector2i> preview; + RBSet<Vector2i> preview; Rect2i drawn_grid_rect; if (drag_type == DRAG_TYPE_PICK) { @@ -2996,7 +2996,7 @@ void TileMapEditorTerrainsPlugin::forward_canvas_draw_over_viewport(Control *p_o rect.set_end(tile_map->world_to_map(drag_last_mouse_pos)); rect = rect.abs(); - Map<Vector2i, TileSet::TerrainsPattern> to_draw; + HashMap<Vector2i, TileSet::TerrainsPattern> to_draw; for (int x = rect.position.x; x <= rect.get_end().x; x++) { for (int y = rect.position.y; y <= rect.get_end().y; y++) { preview.insert(Vector2i(x, y)); @@ -3192,24 +3192,24 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() { ERR_FAIL_INDEX(selected_terrain_id, tile_set->get_terrains_count(selected_terrain_set)); // Sort the items in a map by the number of corresponding terrains. - Map<int, Set<TileSet::TerrainsPattern>> sorted; + RBMap<int, RBSet<TileSet::TerrainsPattern>> sorted; - for (Set<TileSet::TerrainsPattern>::Element *E = per_terrain_terrains_patterns[selected_terrain_set][selected_terrain_id].front(); E; E = E->next()) { + for (const TileSet::TerrainsPattern &E : per_terrain_terrains_patterns[selected_terrain_set][selected_terrain_id]) { // Count the number of matching sides/terrains. int count = 0; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); - if (tile_set->is_valid_peering_bit_terrain(selected_terrain_set, bit) && E->get().get_terrain(bit) == selected_terrain_id) { + if (tile_set->is_valid_peering_bit_terrain(selected_terrain_set, bit) && E.get_terrain(bit) == selected_terrain_id) { count++; } } - sorted[count].insert(E->get()); + sorted[count].insert(E); } - for (Map<int, Set<TileSet::TerrainsPattern>>::Element *E_set = sorted.back(); E_set; E_set = E_set->prev()) { - for (Set<TileSet::TerrainsPattern>::Element *E = E_set->get().front(); E; E = E->next()) { - TileSet::TerrainsPattern terrains_pattern = E->get(); + for (RBMap<int, RBSet<TileSet::TerrainsPattern>>::Element *E_set = sorted.back(); E_set; E_set = E_set->prev()) { + for (const TileSet::TerrainsPattern &E : E_set->get()) { + TileSet::TerrainsPattern terrains_pattern = E; // Get the icon. Ref<Texture2D> icon; diff --git a/editor/plugins/tiles/tile_map_editor.h b/editor/plugins/tiles/tile_map_editor.h index f265052200..7158ebff59 100644 --- a/editor/plugins/tiles/tile_map_editor.h +++ b/editor/plugins/tiles/tile_map_editor.h @@ -120,22 +120,22 @@ private: bool drag_erasing = false; Vector2 drag_start_mouse_pos; Vector2 drag_last_mouse_pos; - Map<Vector2i, TileMapCell> drag_modified; + HashMap<Vector2i, TileMapCell> drag_modified; TileMapCell _pick_random_tile(Ref<TileMapPattern> p_pattern); - Map<Vector2i, TileMapCell> _draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase); - Map<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); - Map<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_line(Vector2 p_start_drag_mouse_pos, Vector2 p_from_mouse_pos, Vector2 p_to_mouse_pos, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); void _stop_dragging(); ///// Selection system. ///// - Set<Vector2i> tile_map_selection; + RBSet<Vector2i> tile_map_selection; Ref<TileMapPattern> tile_map_clipboard; Ref<TileMapPattern> selection_pattern; void _set_tile_map_selection(const TypedArray<Vector2i> &p_selection); TypedArray<Vector2i> _get_tile_map_selection() const; - Set<TileMapCell> tile_set_selection; + RBSet<TileMapCell> tile_set_selection; void _update_selection_pattern_from_tilemap_selection(); void _update_selection_pattern_from_tileset_tiles_selection(); @@ -265,14 +265,14 @@ private: bool drag_erasing = false; Vector2 drag_start_mouse_pos; Vector2 drag_last_mouse_pos; - Map<Vector2i, TileMapCell> drag_modified; + HashMap<Vector2i, TileMapCell> drag_modified; // Painting - Map<Vector2i, TileMapCell> _draw_terrains(const Map<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const; - Map<Vector2i, TileMapCell> _draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); - Map<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); - Set<Vector2i> _get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous); - Map<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_terrains(const HashMap<Vector2i, TileSet::TerrainsPattern> &p_to_paint, int p_terrain_set) const; + HashMap<Vector2i, TileMapCell> _draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + HashMap<Vector2i, TileMapCell> _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + RBSet<Vector2i> _get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous); + HashMap<Vector2i, TileMapCell> _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); void _stop_dragging(); int selected_terrain_set = -1; @@ -284,7 +284,7 @@ private: ItemList *terrains_tile_list = nullptr; // Cache. - LocalVector<LocalVector<Set<TileSet::TerrainsPattern>>> per_terrain_terrains_patterns; + LocalVector<LocalVector<RBSet<TileSet::TerrainsPattern>>> per_terrain_terrains_patterns; // Update functions. void _update_terrains_cache(); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 44b18f48fc..b87aedcf60 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -270,9 +270,9 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na // Other properties. bool any_valid = false; - for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { - const Vector2i &coords = E->get().tile; - const int &alternative = E->get().alternative; + for (const TileSelection &E : tiles) { + const Vector2i &coords = E.tile; + const int &alternative = E.alternative; bool valid = false; TileData *tile_data = tile_set_atlas_source->get_tile_data(coords, alternative); @@ -354,11 +354,11 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_get(const StringName &p_na } } - for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { + for (const TileSelection &E : tiles) { // Return the first tile with a property matching the name. // Note: It's a little bit annoying, but the behavior is the same the one in MultiNodeEdit. - const Vector2i &coords = E->get().tile; - const int &alternative = E->get().alternative; + const Vector2i &coords = E.tile; + const int &alternative = E.alternative; TileData *tile_data = tile_set_atlas_source->get_tile_data(coords, alternative); ERR_FAIL_COND_V(!tile_data, false); @@ -426,12 +426,12 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro int uses = 0; PropertyInfo property_info; }; - Map<PropertyId, PLData> usage; + RBMap<PropertyId, PLData> usage; List<PLData *> data_list; - for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { - const Vector2i &coords = E->get().tile; - const int &alternative = E->get().alternative; + for (const TileSelection &E : tiles) { + const Vector2i &coords = E.tile; + const int &alternative = E.alternative; TileData *tile_data = tile_set_atlas_source->get_tile_data(coords, alternative); ERR_FAIL_COND(!tile_data); @@ -439,7 +439,7 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro List<PropertyInfo> list; tile_data->get_property_list(&list); - Map<String, int> counts; // Counts the number of time a property appears (useful for groups that may appear more than once) + HashMap<String, int> counts; // Counts the number of time a property appears (useful for groups that may appear more than once) for (List<PropertyInfo>::Element *E_property = list.front(); E_property; E_property = E_property->next()) { const String &property_string = E_property->get().name; if (!tile_data->is_allowing_transform() && (property_string == "flip_h" || property_string == "flip_v" || property_string == "transpose")) { @@ -473,18 +473,18 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro } } -void TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(TileSetAtlasSource *p_tile_set_atlas_source, Set<TileSelection> p_tiles) { +void TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(TileSetAtlasSource *p_tile_set_atlas_source, RBSet<TileSelection> p_tiles) { ERR_FAIL_COND(!p_tile_set_atlas_source); ERR_FAIL_COND(p_tiles.is_empty()); - for (Set<TileSelection>::Element *E = p_tiles.front(); E; E = E->next()) { - ERR_FAIL_COND(E->get().tile == TileSetSource::INVALID_ATLAS_COORDS); - ERR_FAIL_COND(E->get().alternative < 0); + for (const TileSelection &E : p_tiles) { + ERR_FAIL_COND(E.tile == TileSetSource::INVALID_ATLAS_COORDS); + ERR_FAIL_COND(E.alternative < 0); } // Disconnect to changes. - for (Set<TileSelection>::Element *E = tiles.front(); E; E = E->next()) { - const Vector2i &coords = E->get().tile; - const int &alternative = E->get().alternative; + for (const TileSelection &E : tiles) { + const Vector2i &coords = E.tile; + const int &alternative = E.alternative; if (tile_set_atlas_source && tile_set_atlas_source->has_tile(coords) && tile_set_atlas_source->has_alternative_tile(coords, alternative)) { TileData *tile_data = tile_set_atlas_source->get_tile_data(coords, alternative); @@ -495,12 +495,12 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::edit(TileSetAtlasSource *p_ } tile_set_atlas_source = p_tile_set_atlas_source; - tiles = Set<TileSelection>(p_tiles); + tiles = RBSet<TileSelection>(p_tiles); // Connect to changes. - for (Set<TileSelection>::Element *E = p_tiles.front(); E; E = E->next()) { - const Vector2i &coords = E->get().tile; - const int &alternative = E->get().alternative; + for (const TileSelection &E : p_tiles) { + const Vector2i &coords = E.tile; + const int &alternative = E.alternative; if (tile_set_atlas_source->has_tile(coords) && tile_set_atlas_source->has_alternative_tile(coords, alternative)) { TileData *tile_data = tile_set_atlas_source->get_tile_data(coords, alternative); @@ -541,7 +541,7 @@ void TileSetAtlasSourceEditor::_update_source_inspector() { void TileSetAtlasSourceEditor::_update_fix_selected_and_hovered_tiles() { // Fix selected. - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { + for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) { TileSelection selected = E->get(); if (!tile_set_atlas_source->has_tile(selected.tile) || !tile_set_atlas_source->has_alternative_tile(selected.tile, selected.alternative)) { selection.erase(E); @@ -1313,9 +1313,9 @@ void TileSetAtlasSourceEditor::_end_dragging() { switch (drag_type) { case DRAG_TYPE_CREATE_TILES: undo_redo->create_action(TTR("Create tiles")); - for (Set<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { - undo_redo->add_do_method(tile_set_atlas_source, "create_tile", E->get()); - undo_redo->add_undo_method(tile_set_atlas_source, "remove_tile", E->get()); + for (const Vector2i &E : drag_modified_tiles) { + undo_redo->add_do_method(tile_set_atlas_source, "create_tile", E); + undo_redo->add_undo_method(tile_set_atlas_source, "remove_tile", E); } undo_redo->commit_action(false); break; @@ -1328,10 +1328,10 @@ void TileSetAtlasSourceEditor::_end_dragging() { case DRAG_TYPE_REMOVE_TILES: { List<PropertyInfo> list; tile_set_atlas_source->get_property_list(&list); - Map<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); + HashMap<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); undo_redo->create_action(TTR("Remove tiles")); - for (Set<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { - Vector2i coords = E->get(); + for (const Vector2i &E : drag_modified_tiles) { + Vector2i coords = E; undo_redo->add_do_method(tile_set_atlas_source, "remove_tile", coords); undo_redo->add_undo_method(tile_set_atlas_source, "create_tile", coords); if (per_tile.has(coords)) { @@ -1370,9 +1370,9 @@ void TileSetAtlasSourceEditor::_end_dragging() { area.set_end((area.get_end() + Vector2i(1, 1)).min(tile_set_atlas_source->get_atlas_grid_size())); List<PropertyInfo> list; tile_set_atlas_source->get_property_list(&list); - Map<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); + HashMap<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); - Set<Vector2i> to_delete; + RBSet<Vector2i> to_delete; for (int x = area.get_position().x; x < area.get_end().x; x++) { for (int y = area.get_position().y; y < area.get_end().y; y++) { Vector2i coords = tile_set_atlas_source->get_tile_at_coords(Vector2i(x, y)); @@ -1384,8 +1384,8 @@ void TileSetAtlasSourceEditor::_end_dragging() { undo_redo->create_action(TTR("Remove tiles")); undo_redo->add_do_method(this, "_set_selection_from_array", Array()); - for (Set<Vector2i>::Element *E = to_delete.front(); E; E = E->next()) { - Vector2i coords = E->get(); + for (const Vector2i &E : to_delete) { + Vector2i coords = E; undo_redo->add_do_method(tile_set_atlas_source, "remove_tile", coords); undo_redo->add_undo_method(tile_set_atlas_source, "create_tile", coords); if (per_tile.has(coords)) { @@ -1523,9 +1523,9 @@ void TileSetAtlasSourceEditor::_end_dragging() { tile_atlas_control->set_default_cursor_shape(CURSOR_ARROW); } -Map<Vector2i, List<const PropertyInfo *>> TileSetAtlasSourceEditor::_group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas) { +HashMap<Vector2i, List<const PropertyInfo *>> TileSetAtlasSourceEditor::_group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas) { // Group properties per tile. - Map<Vector2i, List<const PropertyInfo *>> per_tile; + HashMap<Vector2i, List<const PropertyInfo *>> per_tile; for (const List<PropertyInfo>::Element *E_property = r_list.front(); E_property; E_property = E_property->next()) { Vector<String> components = String(E_property->get().name).split("/", true, 1); if (components.size() >= 1) { @@ -1544,13 +1544,13 @@ void TileSetAtlasSourceEditor::_menu_option(int p_option) { case TILE_DELETE: { List<PropertyInfo> list; tile_set_atlas_source->get_property_list(&list); - Map<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); + HashMap<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); undo_redo->create_action(TTR("Remove tile")); // Remove tiles - Set<Vector2i> removed; - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { - TileSelection selected = E->get(); + RBSet<Vector2i> removed; + for (const TileSelection &E : selection) { + TileSelection selected = E; if (selected.alternative == 0) { // Remove a tile. undo_redo->add_do_method(tile_set_atlas_source, "remove_tile", selected.tile); @@ -1569,8 +1569,8 @@ void TileSetAtlasSourceEditor::_menu_option(int p_option) { } // Remove alternatives - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { - TileSelection selected = E->get(); + for (const TileSelection &E : selection) { + TileSelection selected = E; if (selected.alternative > 0 && !removed.has(selected.tile)) { // Remove an alternative tile. undo_redo->add_do_method(tile_set_atlas_source, "remove_alternative_tile", selected.tile, selected.alternative); @@ -1608,13 +1608,13 @@ void TileSetAtlasSourceEditor::_menu_option(int p_option) { case TILE_CREATE_ALTERNATIVE: { undo_redo->create_action(TTR("Create tile alternatives")); Array array; - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { - if (E->get().alternative == 0) { - int next_id = tile_set_atlas_source->get_next_alternative_tile_id(E->get().tile); - undo_redo->add_do_method(tile_set_atlas_source, "create_alternative_tile", E->get().tile, next_id); - array.push_back(E->get().tile); + for (const TileSelection &E : selection) { + if (E.alternative == 0) { + int next_id = tile_set_atlas_source->get_next_alternative_tile_id(E.tile); + undo_redo->add_do_method(tile_set_atlas_source, "create_alternative_tile", E.tile, next_id); + array.push_back(E.tile); array.push_back(next_id); - undo_redo->add_undo_method(tile_set_atlas_source, "remove_alternative_tile", E->get().tile, next_id); + undo_redo->add_undo_method(tile_set_atlas_source, "remove_alternative_tile", E.tile, next_id); } } undo_redo->add_do_method(this, "_set_selection_from_array", array); @@ -1658,9 +1658,9 @@ void TileSetAtlasSourceEditor::_set_selection_from_array(Array p_selection) { Array TileSetAtlasSourceEditor::_get_selection_as_array() { Array output; - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { - output.push_back(E->get().tile); - output.push_back(E->get().alternative); + for (const TileSelection &E : selection) { + output.push_back(E.tile); + output.push_back(E.alternative); } return output; } @@ -1672,8 +1672,8 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() { // Draw the selected tile. if (tools_button_group->get_pressed_button() == tool_select_button) { - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { - TileSelection selected = E->get(); + for (const TileSelection &E : selection) { + TileSelection selected = E; if (selected.alternative == 0) { // Draw the rect. for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(selected.tile); frame++) { @@ -1722,9 +1722,9 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() { if (drag_type == DRAG_TYPE_REMOVE_TILES) { // Draw the tiles to be removed. - for (Set<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) { - for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(E->get()); frame++) { - tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(E->get(), frame), Color(0.0, 0.0, 0.0), false); + for (const Vector2i &E : drag_modified_tiles) { + for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(E); frame++) { + tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(E, frame), Color(0.0, 0.0, 0.0), false); } } } else if (drag_type == DRAG_TYPE_RECT_SELECT || drag_type == DRAG_TYPE_REMOVE_TILES_USING_RECT) { @@ -1739,7 +1739,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() { color = selection_color.lightened(0.2); } - Set<Vector2i> to_paint; + RBSet<Vector2i> to_paint; for (int x = area.get_position().x; x < area.get_end().x; x++) { for (int y = area.get_position().y; y < area.get_end().y; y++) { Vector2i coords = tile_set_atlas_source->get_tile_at_coords(Vector2i(x, y)); @@ -1749,8 +1749,8 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() { } } - for (Set<Vector2i>::Element *E = to_paint.front(); E; E = E->next()) { - Vector2i coords = E->get(); + for (const Vector2i &E : to_paint) { + Vector2i coords = E; tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(coords), color, false); } } else if (drag_type == DRAG_TYPE_CREATE_TILES_USING_RECT) { @@ -1837,19 +1837,19 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw() { // Draw the selection on top of other. if (tools_button_group->get_pressed_button() == tool_select_button) { - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { - if (E->get().alternative != 0) { + for (const TileSelection &E : selection) { + if (E.alternative != 0) { continue; } - Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(E->get().tile); - Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E->get().tile, 0); + Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(E.tile); + Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E.tile, 0); Transform2D xform = tile_atlas_control->get_parent_control()->get_transform(); xform.translate(position); TileMapCell cell; cell.source_id = tile_set_atlas_source_id; - cell.set_atlas_coords(E->get().tile); + cell.set_atlas_coords(E.tile); cell.alternative_tile = 0; current_tile_data_editor->draw_over_tile(tile_atlas_control_unscaled, xform, cell, true); } @@ -1962,8 +1962,8 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_draw() { } // Draw selected tile. - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { - TileSelection selected = E->get(); + for (const TileSelection &E : selection) { + TileSelection selected = E; if (selected.alternative >= 1) { Rect2i rect = tile_atlas_view->get_alternative_tile_rect(selected.tile, selected.alternative); if (rect != Rect2i()) { @@ -2005,11 +2005,11 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() { // Draw the selection on top of other. if (tools_button_group->get_pressed_button() == tool_select_button) { - for (Set<TileSelection>::Element *E = selection.front(); E; E = E->next()) { - if (E->get().alternative == 0) { + for (const TileSelection &E : selection) { + if (E.alternative == 0) { continue; } - Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E->get().tile, E->get().alternative); + Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E.tile, E.alternative); Vector2 position = rect.get_center(); Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform(); @@ -2017,8 +2017,8 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() { TileMapCell cell; cell.source_id = tile_set_atlas_source_id; - cell.set_atlas_coords(E->get().tile); - cell.alternative_tile = E->get().alternative; + cell.set_atlas_coords(E.tile); + cell.alternative_tile = E.alternative; current_tile_data_editor->draw_over_tile(alternative_tiles_control_unscaled, xform, cell, true); } } @@ -2222,7 +2222,7 @@ void TileSetAtlasSourceEditor::_auto_remove_tiles() { List<PropertyInfo> list; tile_set_atlas_source->get_property_list(&list); - Map<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); + HashMap<Vector2i, List<const PropertyInfo *>> per_tile = _group_properties_per_tiles(list, tile_set_atlas_source); for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) { Vector2i coords = tile_set_atlas_source->get_tile_id(i); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h index b26b7edbfa..738fe1044d 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.h +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h @@ -88,7 +88,7 @@ public: TileSetAtlasSourceEditor *tiles_set_atlas_source_editor = nullptr; TileSetAtlasSource *tile_set_atlas_source = nullptr; - Set<TileSelection> tiles = Set<TileSelection>(); + RBSet<TileSelection> tiles = RBSet<TileSelection>(); protected: bool _set(const StringName &p_name, const Variant &p_value); @@ -99,10 +99,10 @@ public: public: TileSetAtlasSource *get_edited_tile_set_atlas_source() const { return tile_set_atlas_source; }; - Set<TileSelection> get_edited_tiles() const { return tiles; }; + RBSet<TileSelection> get_edited_tiles() const { return tiles; }; // Update the proxyed object. - void edit(TileSetAtlasSource *p_tile_set_atlas_source, Set<TileSelection> p_tiles = Set<TileSelection>()); + void edit(TileSetAtlasSource *p_tile_set_atlas_source, RBSet<TileSelection> p_tiles = RBSet<TileSelection>()); AtlasTileProxyObject(TileSetAtlasSourceEditor *p_tiles_set_atlas_source_editor) { tiles_set_atlas_source_editor = p_tiles_set_atlas_source_editor; @@ -130,7 +130,7 @@ private: // -- Tile data editors -- String current_property; Control *current_tile_data_editor_toolbar = nullptr; - Map<String, TileDataEditor *> tile_data_editors; + HashMap<String, TileDataEditor *> tile_data_editors; TileDataEditor *current_tile_data_editor = nullptr; void _tile_data_editors_tree_selected(); @@ -182,10 +182,10 @@ private: Vector2i drag_current_tile; Rect2i drag_start_tile_shape; - Set<Vector2i> drag_modified_tiles; + RBSet<Vector2i> drag_modified_tiles; void _end_dragging(); - Map<Vector2i, List<const PropertyInfo *>> _group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas); + HashMap<Vector2i, List<const PropertyInfo *>> _group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas); // Popup functions. enum MenuOptions { @@ -215,7 +215,7 @@ private: MenuButton *tool_advanced_menu_buttom = nullptr; // Selection. - Set<TileSelection> selection; + RBSet<TileSelection> selection; void _set_selection_from_array(Array p_selection); Array _get_selection_as_array(); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index ff35e3e6f3..0595357926 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -148,6 +148,7 @@ void VisualShaderGraphPlugin::show_port_preview(VisualShader::Type p_type, int p if (links[p_node_id].preview_pos != -1) { links[p_node_id].graph_node->move_child(vbox, links[p_node_id].preview_pos); } + links[p_node_id].graph_node->set_slot_draw_stylebox(vbox->get_index(), false); Control *offset = memnew(Control); offset->set_custom_minimum_size(Size2(0, 5 * EDSCALE)); @@ -324,7 +325,7 @@ void VisualShaderGraphPlugin::make_dirty(bool p_enabled) { } void VisualShaderGraphPlugin::register_link(VisualShader::Type p_type, int p_id, VisualShaderNode *p_visual_node, GraphNode *p_graph_node) { - links.insert(p_id, { p_type, p_visual_node, p_graph_node, p_visual_node->get_output_port_for_preview() != -1, -1, Map<int, InputPort>(), Map<int, Port>(), nullptr, nullptr, nullptr, { nullptr, nullptr, nullptr } }); + links.insert(p_id, { p_type, p_visual_node, p_graph_node, p_visual_node->get_output_port_for_preview() != -1, -1, HashMap<int, InputPort>(), HashMap<int, Port>(), nullptr, nullptr, nullptr, { nullptr, nullptr, nullptr } }); } void VisualShaderGraphPlugin::register_output_port(int p_node_id, int p_port, TextureButton *p_button) { @@ -386,6 +387,14 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { "alpha" }; + // Visual shader specific theme for MSDF font. + Ref<Theme> vstheme; + vstheme.instantiate(); + Ref<Font> label_font = EditorNode::get_singleton()->get_editor_theme()->get_font("main_msdf", "EditorFonts"); + vstheme->set_font("font", "Label", label_font); + vstheme->set_font("font", "LineEdit", label_font); + vstheme->set_font("font", "Button", label_font); + Ref<VisualShaderNode> vsnode = visual_shader->get_node(p_type, p_id); Ref<VisualShaderNodeResizableBase> resizable_node = Object::cast_to<VisualShaderNodeResizableBase>(vsnode.ptr()); @@ -406,8 +415,10 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { custom_node->_set_initialized(true); } + // Create graph node. GraphNode *node = memnew(GraphNode); graph->add_child(node); + node->set_theme(vstheme); editor->_update_created_node(node); register_link(p_type, p_id, vsnode.ptr(), node); @@ -942,12 +953,12 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { if (vsnode->get_output_port_for_preview() >= 0) { show_port_preview(p_type, p_id, vsnode->get_output_port_for_preview()); + } else { + offset = memnew(Control); + offset->set_custom_minimum_size(Size2(0, 4 * EDSCALE)); + node->add_child(offset); } - offset = memnew(Control); - offset->set_custom_minimum_size(Size2(0, 4 * EDSCALE)); - node->add_child(offset); - String error = vsnode->get_warning(mode, p_type); if (!error.is_empty()) { Label *error_label = memnew(Label); @@ -1359,7 +1370,7 @@ void VisualShaderEditor::_update_options_menu() { static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "opengl3"; - Map<String, TreeItem *> folders; + HashMap<String, TreeItem *> folders; int current_func = -1; @@ -1659,7 +1670,7 @@ void VisualShaderEditor::_update_uniforms(bool p_update_refs) { } } -void VisualShaderEditor::_update_uniform_refs(Set<String> &p_deleted_names) { +void VisualShaderEditor::_update_uniform_refs(RBSet<String> &p_deleted_names) { for (int i = 0; i < VisualShader::TYPE_MAX; i++) { VisualShader::Type type = VisualShader::Type(i); @@ -2277,7 +2288,7 @@ void VisualShaderEditor::_uniform_line_edit_changed(const String &p_text, int p_ undo_redo->add_do_method(this, "_update_uniforms", true); undo_redo->add_undo_method(this, "_update_uniforms", true); - Set<String> changed_names; + RBSet<String> changed_names; changed_names.insert(node->get_uniform_name()); _update_uniform_refs(changed_names); @@ -3097,7 +3108,7 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) { } } - Set<String> uniform_names; + RBSet<String> uniform_names; for (const int &F : p_nodes) { Ref<VisualShaderNode> node = visual_shader->get_node(type, F); @@ -3201,11 +3212,11 @@ void VisualShaderEditor::_convert_constants_to_uniforms(bool p_vice_versa) { undo_redo->create_action(TTR("Convert Uniform Node(s) To Constant(s)")); } - const Set<int> ¤t_set = p_vice_versa ? selected_uniforms : selected_constants; - Set<String> deleted_names; + const RBSet<int> ¤t_set = p_vice_versa ? selected_uniforms : selected_constants; + RBSet<String> deleted_names; - for (Set<int>::Element *E = current_set.front(); E; E = E->next()) { - int node_id = E->get(); + for (const int &E : current_set) { + int node_id = E; Ref<VisualShaderNode> node = visual_shader->get_node(type_id, node_id); bool caught = false; Variant var; @@ -3398,16 +3409,23 @@ void VisualShaderEditor::_delete_node_request(int p_type, int p_node) { undo_redo->commit_action(); } -void VisualShaderEditor::_delete_nodes_request() { +void VisualShaderEditor::_delete_nodes_request(const TypedArray<StringName> &p_nodes) { List<int> to_erase; - for (int i = 0; i < graph->get_child_count(); i++) { - GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); - if (gn) { - if (gn->is_selected() && gn->is_close_button_visible()) { - to_erase.push_back(gn->get_name().operator String().to_int()); + if (p_nodes.is_empty()) { + // Called from context menu. + for (int i = 0; i < graph->get_child_count(); i++) { + GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); + if (gn) { + if (gn->is_selected() && gn->is_close_button_visible()) { + to_erase.push_back(gn->get_name().operator String().to_int()); + } } } + } else { + for (int i = 0; i < p_nodes.size(); i++) { + to_erase.push_back(p_nodes[i].operator String().to_int()); + } } if (to_erase.is_empty()) { @@ -3771,7 +3789,7 @@ void VisualShaderEditor::_dup_copy_nodes(int p_type, List<CopyItem> &r_items, Li selection_center.x = 0.0f; selection_center.y = 0.0f; - Set<int> nodes; + RBSet<int> nodes; for (int i = 0; i < graph->get_child_count(); i++) { GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); @@ -3850,9 +3868,9 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, List<CopyItem> &r_items, c int base_id = visual_shader->get_valid_node_id(type); int id_from = base_id; - Map<int, int> connection_remap; - Set<int> unsupported_set; - Set<int> added_set; + HashMap<int, int> connection_remap; + RBSet<int> unsupported_set; + RBSet<int> added_set; for (CopyItem &item : r_items) { if (item.disabled) { @@ -4400,7 +4418,7 @@ void VisualShaderEditor::_node_menu_id_pressed(int p_idx) { _paste_nodes(true, menu_point); break; case NodeMenuOptions::DELETE: - _delete_nodes_request(); + _delete_nodes_request(TypedArray<StringName>()); break; case NodeMenuOptions::DUPLICATE: _duplicate_nodes(); @@ -4652,6 +4670,7 @@ VisualShaderEditor::VisualShaderEditor() { graph->get_zoom_hbox()->set_h_size_flags(SIZE_EXPAND_FILL); graph->set_v_size_flags(SIZE_EXPAND_FILL); graph->set_h_size_flags(SIZE_EXPAND_FILL); + graph->set_show_zoom_label(true); add_child(graph); graph->set_drag_forwarding(this); float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity"); @@ -5938,7 +5957,7 @@ public: } } - void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, const Map<StringName, String> &p_overrided_names, Ref<VisualShaderNode> p_node) { + void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, const HashMap<StringName, String> &p_overrided_names, Ref<VisualShaderNode> p_node) { parent_resource = p_parent_resource; updating = false; node = p_node; @@ -6252,7 +6271,8 @@ void VisualShaderNodePortPreview::setup(const Ref<VisualShader> &p_shader, Visua } Size2 VisualShaderNodePortPreview::get_minimum_size() const { - return Size2(100, 100) * EDSCALE; + int port_preview_size = EditorSettings::get_singleton()->get("editors/visual_editors/visualshader/port_preview_size"); + return Size2(port_preview_size, port_preview_size) * EDSCALE; } void VisualShaderNodePortPreview::_notification(int p_what) { diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index 540cb709b3..003c8b15a8 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -72,8 +72,8 @@ private: GraphNode *graph_node = nullptr; bool preview_visible = false; int preview_pos = 0; - Map<int, InputPort> input_ports; - Map<int, Port> output_ports; + HashMap<int, InputPort> input_ports; + HashMap<int, Port> output_ports; VBoxContainer *preview_box = nullptr; LineEdit *uniform_name = nullptr; CodeEdit *expression_edit = nullptr; @@ -81,7 +81,7 @@ private: }; Ref<VisualShader> visual_shader; - Map<int, Link> links; + HashMap<int, Link> links; List<VisualShader::Connection> connections; bool dirty = false; @@ -346,7 +346,7 @@ class VisualShaderEditor : public VBoxContainer { void _delete_nodes(int p_type, const List<int> &p_nodes); void _delete_node_request(int p_type, int p_node); - void _delete_nodes_request(); + void _delete_nodes_request(const TypedArray<StringName> &p_nodes); void _node_changed(int p_id); @@ -358,8 +358,8 @@ class VisualShaderEditor : public VBoxContainer { int from_node = -1; int from_slot = -1; - Set<int> selected_constants; - Set<int> selected_uniforms; + RBSet<int> selected_constants; + RBSet<int> selected_uniforms; int selected_comment = -1; int selected_float_constant = -1; @@ -468,7 +468,7 @@ class VisualShaderEditor : public VBoxContainer { bool _is_available(int p_mode); void _update_created_node(GraphNode *node); void _update_uniforms(bool p_update_refs); - void _update_uniform_refs(Set<String> &p_names); + void _update_uniform_refs(RBSet<String> &p_names); void _update_varyings(); void _visibility_changed(); diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp index e684d9a5e6..bfc58db2ad 100644 --- a/editor/pot_generator.cpp +++ b/editor/pot_generator.cpp @@ -46,8 +46,8 @@ void POTGenerator::_print_all_translation_strings() { print_line("msgid: " + E.key()); print_line("context: " + v_md[i].ctx); print_line("msgid_plural: " + v_md[i].plural); - for (Set<String>::Element *F = v_md[i].locations.front(); F; F = F->next()) { - print_line("location: " + F->get()); + for (const String &F : v_md[i].locations) { + print_line("location: " + F); } } } @@ -127,14 +127,14 @@ void POTGenerator::_write_to_pot(const String &p_file) { for (int i = 0; i < v_msgid_data.size(); i++) { String context = v_msgid_data[i].ctx; String plural = v_msgid_data[i].plural; - const Set<String> &locations = v_msgid_data[i].locations; + const RBSet<String> &locations = v_msgid_data[i].locations; // Put the blank line at the start, to avoid a double at the end when closing the file. file->store_line(""); // Write file locations. - for (Set<String>::Element *E = locations.front(); E; E = E->next()) { - file->store_line("#: " + E->get().trim_prefix("res://")); + for (const String &E : locations) { + file->store_line("#: " + E.trim_prefix("res://")); } // Write context. diff --git a/editor/pot_generator.h b/editor/pot_generator.h index 05d1903dd6..b24eadfd95 100644 --- a/editor/pot_generator.h +++ b/editor/pot_generator.h @@ -33,7 +33,7 @@ #include "core/io/file_access.h" #include "core/templates/hash_map.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" //#define DEBUG_POT @@ -43,7 +43,7 @@ class POTGenerator { struct MsgidData { String ctx; String plural; - Set<String> locations; + RBSet<String> locations; }; // Store msgid as key and the additional data around the msgid - if it's under a context, has plurals and its file locations. HashMap<String, Vector<MsgidData>> all_translation_strings; diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h index 23a77ea201..a29696cc0d 100644 --- a/editor/progress_dialog.h +++ b/editor/progress_dialog.h @@ -47,8 +47,8 @@ class BackgroundProgress : public HBoxContainer { ProgressBar *progress = nullptr; }; - Map<String, Task> tasks; - Map<String, int> updates; + HashMap<String, Task> tasks; + HashMap<String, int> updates; void _update(); protected: @@ -77,7 +77,7 @@ class ProgressDialog : public PopupPanel { HBoxContainer *cancel_hb = nullptr; Button *cancel = nullptr; - Map<String, Task> tasks; + HashMap<String, Task> tasks; VBoxContainer *main = nullptr; uint64_t last_progress_tick; diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 1344afbd3a..839378dad2 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -346,7 +346,7 @@ void ProjectExportDialog::_update_feature_list() { Ref<EditorExportPreset> current = get_current_preset(); ERR_FAIL_COND(current.is_null()); - Set<String> fset; + RBSet<String> fset; List<String> features; current->get_platform()->get_platform_features(&features); @@ -366,7 +366,7 @@ void ProjectExportDialog::_update_feature_list() { } custom_feature_display->clear(); - for (Set<String>::Element *E = fset.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = fset.front(); E; E = E->next()) { String f = E->get(); if (E->next()) { f += ", "; diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index b4cbb3b7f1..967cb5a932 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1064,7 +1064,7 @@ public: void select_first_visible_project(); void erase_selected_projects(bool p_delete_project_contents); Vector<Item> get_selected_projects() const; - const Set<String> &get_selected_project_keys() const; + const RBSet<String> &get_selected_project_keys() const; void ensure_project_visible(int p_index); int get_single_selected_index() const; bool is_any_project_missing() const; @@ -1090,7 +1090,7 @@ private: String _search_term; FilterOption _order_option; - Set<String> _selected_project_keys; + RBSet<String> _selected_project_keys; String _last_clicked; // Project key VBoxContainer *_scroll_children; int _icon_load_index; @@ -1258,7 +1258,7 @@ void ProjectList::load_projects() { List<PropertyInfo> properties; EditorSettings::get_singleton()->get_property_list(&properties); - Set<String> favorites; + RBSet<String> favorites; // Find favourites... for (const PropertyInfo &E : properties) { String property_key = E.name; @@ -1504,7 +1504,7 @@ void ProjectList::sort_projects() { update_dock_menu(); } -const Set<String> &ProjectList::get_selected_project_keys() const { +const RBSet<String> &ProjectList::get_selected_project_keys() const { // Faster if that's all you need return _selected_project_keys; } @@ -2097,10 +2097,10 @@ void ProjectManager::_open_selected_projects() { // This is especially important for the HTML5 project manager. loading_label->set_modulate(Color(1, 1, 1)); - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); - for (const Set<String>::Element *E = selected_list.front(); E; E = E->next()) { - const String &selected = E->get(); + for (const String &E : selected_list) { + const String &selected = E; String path = EditorSettings::get_singleton()->get("projects/" + selected); String conf = path.plus_file("project.godot"); @@ -2146,7 +2146,7 @@ void ProjectManager::_open_selected_projects() { } void ProjectManager::_open_selected_projects_ask() { - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); if (selected_list.size() < 1) { return; @@ -2261,7 +2261,7 @@ void ProjectManager::_run_project_confirm() { } void ProjectManager::_run_project() { - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); if (selected_list.size() < 1) { return; @@ -2321,14 +2321,14 @@ void ProjectManager::_import_project() { } void ProjectManager::_rename_project() { - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); if (selected_list.size() == 0) { return; } - for (Set<String>::Element *E = selected_list.front(); E; E = E->next()) { - const String &selected = E->get(); + for (const String &E : selected_list) { + const String &selected = E; String path = EditorSettings::get_singleton()->get("projects/" + selected); npdialog->set_project_path(path); npdialog->set_mode(ProjectDialog::MODE_RENAME); @@ -2347,7 +2347,7 @@ void ProjectManager::_erase_missing_projects_confirm() { } void ProjectManager::_erase_project() { - const Set<String> &selected_list = _project_list->get_selected_project_keys(); + const RBSet<String> &selected_list = _project_list->get_selected_project_keys(); if (selected_list.size() == 0) { return; @@ -2404,7 +2404,7 @@ void ProjectManager::_files_dropped(PackedStringArray p_files) { _install_project(p_files[0], file.substr(0, file.length() - 4).capitalize()); return; } - Set<String> folders_set; + RBSet<String> folders_set; Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); for (int i = 0; i < p_files.size(); i++) { String file = p_files[i]; @@ -2412,8 +2412,8 @@ void ProjectManager::_files_dropped(PackedStringArray p_files) { } if (folders_set.size() > 0) { PackedStringArray folders; - for (Set<String>::Element *E = folders_set.front(); E; E = E->next()) { - folders.push_back(E->get()); + for (const String &E : folders_set) { + folders.push_back(E); } bool confirm = true; diff --git a/editor/project_manager.h b/editor/project_manager.h index a68cc4350c..93a6e1c405 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -50,7 +50,7 @@ enum FilterOption { class ProjectManager : public Control { GDCLASS(ProjectManager, Control); - Map<String, Ref<Texture2D>> icon_type_cache; + HashMap<String, Ref<Texture2D>> icon_type_cache; void _build_icon_type_cache(Ref<Theme> p_theme); static ProjectManager *singleton; diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 48cd975715..5367306f1a 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -249,7 +249,7 @@ String ProjectSettingsEditor::_get_setting_name() const { } void ProjectSettingsEditor::_add_feature_overrides() { - Set<String> presets; + RBSet<String> presets; presets.insert("bptc"); presets.insert("s3tc"); @@ -292,8 +292,8 @@ void ProjectSettingsEditor::_add_feature_overrides() { feature_box->clear(); feature_box->add_item(TTR("(All)"), 0); // So it is always on top. int id = 1; - for (Set<String>::Element *E = presets.front(); E; E = E->next()) { - feature_box->add_item(E->get(), id++); + for (const String &E : presets) { + feature_box->add_item(E, id++); } } diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 5effdf0b36..d541b26cc9 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -137,14 +137,14 @@ void CustomPropertyEditor::_menu_option(int p_which) { ResourceLoader::get_recognized_extensions_for_type(type.get_slice(",", i), &extensions); } - Set<String> valid_extensions; + RBSet<String> valid_extensions; for (const String &E : extensions) { valid_extensions.insert(E); } file->clear_filters(); - for (Set<String>::Element *E = valid_extensions.front(); E; E = E->next()) { - file->add_filter("*." + E->get() + " ; " + E->get().to_upper()); + for (const String &E : valid_extensions) { + file->add_filter("*." + E + " ; " + E.to_upper()); } file->popup_file_dialog(); @@ -875,7 +875,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: for (int i = 0; i < hint_text.get_slice_count(","); i++) { String base = hint_text.get_slice(",", i); - Set<String> valid_inheritors; + RBSet<String> valid_inheritors; valid_inheritors.insert(base); List<StringName> inheritors; ClassDB::get_inheriters_from_class(base.strip_edges(), &inheritors); @@ -890,8 +890,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: E = E->next(); } - for (Set<String>::Element *j = valid_inheritors.front(); j; j = j->next()) { - const String &t = j->get(); + for (const String &j : valid_inheritors) { + const String &t = j; bool is_custom_resource = false; Ref<Texture2D> icon; diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index 1ac15a0a9d..c136eae1bc 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -366,11 +366,11 @@ void PropertySelector::_item_selected() { String text; if (properties) { while (!class_type.is_empty()) { - Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_type); + HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(class_type); if (E) { - for (int i = 0; i < E->get().properties.size(); i++) { - if (E->get().properties[i].name == name) { - text = DTR(E->get().properties[i].description); + for (int i = 0; i < E->value.properties.size(); i++) { + if (E->value.properties[i].name == name) { + text = DTR(E->value.properties[i].description); break; } } @@ -385,11 +385,11 @@ void PropertySelector::_item_selected() { } } else { while (!class_type.is_empty()) { - Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_type); + HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(class_type); if (E) { - for (int i = 0; i < E->get().methods.size(); i++) { - if (E->get().methods[i].name == name) { - text = DTR(E->get().methods[i].description); + for (int i = 0; i < E->value.methods.size(); i++) { + if (E->value.methods[i].name == name) { + text = DTR(E->value.methods[i].description); break; } } diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index 1d9e799a30..e47250fcf8 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -356,6 +356,8 @@ void RenameDialog::_update_substitute() { } void RenameDialog::_post_popup() { + ConfirmationDialog::_post_popup(); + EditorSelection *editor_selection = EditorNode::get_singleton()->get_editor_selection(); preview_node = nullptr; diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp index 8879085d86..38d909038f 100644 --- a/editor/reparent_dialog.cpp +++ b/editor/reparent_dialog.cpp @@ -57,7 +57,7 @@ void ReparentDialog::_reparent() { } } -void ReparentDialog::set_current(const Set<Node *> &p_selection) { +void ReparentDialog::set_current(const RBSet<Node *> &p_selection) { tree->set_marked(p_selection, false, false); //tree->set_selected(p_node->get_parent()); } diff --git a/editor/reparent_dialog.h b/editor/reparent_dialog.h index 121a86e9f0..a5a9818e7f 100644 --- a/editor/reparent_dialog.h +++ b/editor/reparent_dialog.h @@ -52,7 +52,7 @@ protected: static void _bind_methods(); public: - void set_current(const Set<Node *> &p_selection); + void set_current(const RBSet<Node *> &p_selection); ReparentDialog(); ~ReparentDialog(); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index b385460232..afb3ac7c15 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -460,7 +460,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { selection.sort_custom<Node::Comparator>(); for (Node *node : selection) { - Map<const Node *, Node *> duplimap; + HashMap<const Node *, Node *> duplimap; Node *dup = node->duplicate_from_editor(duplimap); ERR_CONTINUE(!dup); @@ -658,7 +658,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { List<Node *> owned; node->get_owned_by(node->get_owner(), &owned); - Map<const Node *, Node *> duplimap; + HashMap<const Node *, Node *> duplimap; Node *dup = node->duplicate_from_editor(duplimap); ERR_CONTINUE(!dup); @@ -717,7 +717,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } List<Node *> nodes = editor_selection->get_selected_node_list(); - Set<Node *> nodeset; + RBSet<Node *> nodeset; for (Node *E : nodes) { nodeset.insert(E); } @@ -1402,7 +1402,7 @@ void SceneTreeDock::_set_owners(Node *p_owner, const Array &p_nodes) { } } -void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, Map<Node *, NodePath> *p_renames) { +void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, HashMap<Node *, NodePath> *p_renames) { base_path.push_back(p_node->get_name()); if (new_base_path.size()) { new_base_path.push_back(p_node->get_name()); @@ -1420,7 +1420,7 @@ void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<Stri } } -void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, Map<Node *, NodePath> *p_renames) { +void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, HashMap<Node *, NodePath> *p_renames) { Vector<StringName> base_path; Node *n = p_node->get_parent(); while (n) { @@ -1443,24 +1443,24 @@ void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, Map<Node _fill_path_renames(base_path, new_base_path, p_node, p_renames); } -bool SceneTreeDock::_update_node_path(Node *p_root_node, NodePath &r_node_path, Map<Node *, NodePath> *p_renames) const { +bool SceneTreeDock::_update_node_path(Node *p_root_node, NodePath &r_node_path, HashMap<Node *, NodePath> *p_renames) const { Node *target_node = p_root_node->get_node_or_null(r_node_path); ERR_FAIL_NULL_V_MSG(target_node, false, "Found invalid node path '" + String(r_node_path) + "' on node '" + String(scene_root->get_path_to(p_root_node)) + "'"); // Try to find the target node in modified node paths. - Map<Node *, NodePath>::Element *found_node_path = p_renames->find(target_node); + HashMap<Node *, NodePath>::Iterator found_node_path = p_renames->find(target_node); if (found_node_path) { - Map<Node *, NodePath>::Element *found_root_path = p_renames->find(p_root_node); - NodePath root_path_new = found_root_path ? found_root_path->get() : p_root_node->get_path(); - r_node_path = root_path_new.rel_path_to(found_node_path->get()); + HashMap<Node *, NodePath>::Iterator found_root_path = p_renames->find(p_root_node); + NodePath root_path_new = found_root_path ? found_root_path->value : p_root_node->get_path(); + r_node_path = root_path_new.rel_path_to(found_node_path->value); return true; } // Update the path if the base node has changed and has not been deleted. - Map<Node *, NodePath>::Element *found_root_path = p_renames->find(p_root_node); + HashMap<Node *, NodePath>::Iterator found_root_path = p_renames->find(p_root_node); if (found_root_path) { - NodePath root_path_new = found_root_path->get(); + NodePath root_path_new = found_root_path->value; if (!root_path_new.is_empty()) { NodePath old_abs_path = NodePath(String(p_root_node->get_path()).plus_file(r_node_path)); old_abs_path.simplify(); @@ -1473,7 +1473,7 @@ bool SceneTreeDock::_update_node_path(Node *p_root_node, NodePath &r_node_path, return false; } -bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_variant, Map<Node *, NodePath> *p_renames) const { +bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_variant, HashMap<Node *, NodePath> *p_renames) const { switch (r_variant.get_type()) { case Variant::NODE_PATH: { NodePath node_path = r_variant; @@ -1528,8 +1528,8 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var return false; } -void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_renames, Map<Ref<Animation>, Set<int>> *r_rem_anims) { - Map<Ref<Animation>, Set<int>> rem_anims; +void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, RBSet<int>> *r_rem_anims) { + HashMap<Ref<Animation>, RBSet<int>> rem_anims; if (!r_rem_anims) { r_rem_anims = &rem_anims; } @@ -1543,8 +1543,8 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ } // No renaming if base node is deleted. - Map<Node *, NodePath>::Element *found_base_path = p_renames->find(p_base); - if (found_base_path && found_base_path->get().is_empty()) { + HashMap<Node *, NodePath>::Iterator found_base_path = p_renames->find(p_base); + if (found_base_path && found_base_path->value.is_empty()) { return; } @@ -1575,20 +1575,20 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ Node *root = ap->get_node(ap->get_root()); if (root) { - Map<Node *, NodePath>::Element *found_root_path = p_renames->find(root); - NodePath new_root_path = found_root_path ? found_root_path->get() : root->get_path(); + HashMap<Node *, NodePath>::Iterator found_root_path = p_renames->find(root); + NodePath new_root_path = found_root_path ? found_root_path->value : root->get_path(); if (!new_root_path.is_empty()) { // No renaming if root node is deleted. for (const StringName &E : anims) { Ref<Animation> anim = ap->get_animation(E); if (!r_rem_anims->has(anim)) { - r_rem_anims->insert(anim, Set<int>()); - Set<int> &ran = r_rem_anims->find(anim)->get(); + r_rem_anims->insert(anim, RBSet<int>()); + RBSet<int> &ran = r_rem_anims->find(anim)->value; for (int i = 0; i < anim->get_track_count(); i++) { ran.insert(i); } } - Set<int> &ran = r_rem_anims->find(anim)->get(); + RBSet<int> &ran = r_rem_anims->find(anim)->value; if (anim.is_null()) { continue; @@ -1605,13 +1605,13 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ continue; //channel was removed } - Map<Node *, NodePath>::Element *found_path = p_renames->find(n); + HashMap<Node *, NodePath>::Iterator found_path = p_renames->find(n); if (found_path) { - if (found_path->get() == NodePath()) { + if (found_path->value == NodePath()) { //will be erased int idx = 0; - Set<int>::Element *EI = ran.front(); + RBSet<int>::Element *EI = ran.front(); ERR_FAIL_COND(!EI); //bug while (EI->get() != i) { idx++; @@ -1631,7 +1631,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ } else { //will be renamed - NodePath rel_path = new_root_path.rel_path_to(found_path->get()); + NodePath rel_path = new_root_path.rel_path_to(found_path->value); NodePath new_path = NodePath(rel_path.get_names(), track_np.get_subnames(), false); if (new_path == track_np) { @@ -1653,7 +1653,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_ } void SceneTreeDock::_node_prerenamed(Node *p_node, const String &p_new_name) { - Map<Node *, NodePath> path_renames; + HashMap<Node *, NodePath> path_renames; Vector<StringName> base_path; Node *n = p_node->get_parent(); @@ -1774,7 +1774,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V editor_data->get_undo_redo().create_action(TTR("Reparent Node")); - Map<Node *, NodePath> path_renames; + HashMap<Node *, NodePath> path_renames; Vector<StringName> former_names; int inc = 0; @@ -1811,9 +1811,9 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V // Name was modified, fix the path renames. if (old_name.casecmp_to(new_name) != 0) { // Fix the to name to have the new name. - Map<Node *, NodePath>::Element *found_path = path_renames.find(node); + HashMap<Node *, NodePath>::Iterator found_path = path_renames.find(node); if (found_path) { - NodePath old_new_name = found_path->get(); + NodePath old_new_name = found_path->value; Vector<StringName> unfixed_new_names = old_new_name.get_names(); Vector<StringName> fixed_new_names; @@ -2058,7 +2058,7 @@ void SceneTreeDock::_delete_confirm(bool p_cut) { } else { remove_list.sort_custom<Node::Comparator>(); //sort nodes to keep positions - Map<Node *, NodePath> path_renames; + HashMap<Node *, NodePath> path_renames; //delete from animation for (Node *n : remove_list) { @@ -2148,7 +2148,7 @@ void SceneTreeDock::_selection_changed() { //automatically turn on multi-edit _tool_selected(TOOL_MULTI_EDIT); } else if (selection_size == 1) { - _push_item(editor_selection->get_selection().front()->key()); + _push_item(editor_selection->get_selection().begin()->key); } else if (selection_size == 0) { _push_item(nullptr); } @@ -2407,7 +2407,7 @@ void SceneTreeDock::_new_scene_from(String p_file) { Node *base = selection.front()->get(); - Map<const Node *, Node *> duplimap; + HashMap<const Node *, Node *> duplimap; Node *copy = base->duplicate_from_editor(duplimap); if (copy) { @@ -3038,14 +3038,14 @@ List<Node *> SceneTreeDock::paste_nodes() { ur.create_action(TTR("Paste Node(s)")); ur.add_do_method(editor_selection, "clear"); - Map<Ref<Resource>, Ref<Resource>> resource_remap; + HashMap<Ref<Resource>, Ref<Resource>> resource_remap; String target_scene; if (edited_scene) { target_scene = edited_scene->get_scene_file_path(); } if (target_scene != clipboard_source_scene) { if (!clipboard_resource_remap.has(target_scene)) { - Map<Ref<Resource>, Ref<Resource>> remap; + HashMap<Ref<Resource>, Ref<Resource>> remap; for (Node *E : node_clipboard) { _create_remap_for_node(E, remap); } @@ -3055,7 +3055,7 @@ List<Node *> SceneTreeDock::paste_nodes() { } for (Node *node : node_clipboard) { - Map<const Node *, Node *> duplimap; + HashMap<const Node *, Node *> duplimap; Node *dup = node->duplicate_from_editor(duplimap, resource_remap); ERR_CONTINUE(!dup); @@ -3241,7 +3241,7 @@ void SceneTreeDock::_clear_clipboard() { clipboard_resource_remap.clear(); } -void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<Ref<Resource>, Ref<Resource>> &r_remap) { +void SceneTreeDock::_create_remap_for_node(Node *p_node, HashMap<Ref<Resource>, Ref<Resource>> &r_remap) { List<PropertyInfo> props; p_node->get_property_list(&props); @@ -3280,7 +3280,7 @@ void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<Ref<Resource>, Ref< } } -void SceneTreeDock::_create_remap_for_resource(Ref<Resource> p_resource, Map<Ref<Resource>, Ref<Resource>> &r_remap) { +void SceneTreeDock::_create_remap_for_resource(Ref<Resource> p_resource, HashMap<Ref<Resource>, Ref<Resource>> &r_remap) { r_remap[p_resource] = p_resource->duplicate(); List<PropertyInfo> props; diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index a1d300d3d6..1e58a7a66a 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -145,7 +145,7 @@ class SceneTreeDock : public VBoxContainer { List<Node *> node_clipboard; String clipboard_source_scene; - HashMap<String, Map<Ref<Resource>, Ref<Resource>>> clipboard_resource_remap; + HashMap<String, HashMap<Ref<Resource>, Ref<Resource>>> clipboard_resource_remap; ScriptCreateDialog *script_create_dialog = nullptr; ShaderCreateDialog *shader_create_dialog = nullptr; @@ -232,7 +232,7 @@ class SceneTreeDock : public VBoxContainer { void _selection_changed(); void _update_script_button(); - void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, Map<Node *, NodePath> *p_renames); + void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, HashMap<Node *, NodePath> *p_renames); void _normalize_drop(Node *&to_node, int &to_pos, int p_type); @@ -258,16 +258,16 @@ class SceneTreeDock : public VBoxContainer { void _feature_profile_changed(); void _clear_clipboard(); - void _create_remap_for_node(Node *p_node, Map<Ref<Resource>, Ref<Resource>> &r_remap); - void _create_remap_for_resource(Ref<Resource> p_resource, Map<Ref<Resource>, Ref<Resource>> &r_remap); + void _create_remap_for_node(Node *p_node, HashMap<Ref<Resource>, Ref<Resource>> &r_remap); + void _create_remap_for_resource(Ref<Resource> p_resource, HashMap<Ref<Resource>, Ref<Resource>> &r_remap); bool profile_allow_editing = true; bool profile_allow_script_editing = true; static void _update_configuration_warning(); - bool _update_node_path(Node *p_root_node, NodePath &r_node_path, Map<Node *, NodePath> *p_renames) const; - bool _check_node_path_recursive(Node *p_root_node, Variant &r_variant, Map<Node *, NodePath> *p_renames) const; + bool _update_node_path(Node *p_root_node, NodePath &r_node_path, HashMap<Node *, NodePath> *p_renames) const; + bool _check_node_path_recursive(Node *p_root_node, Variant &r_variant, HashMap<Node *, NodePath> *p_renames) const; private: static SceneTreeDock *singleton; @@ -292,8 +292,8 @@ public: void instantiate(const String &p_file); void instantiate_scenes(const Vector<String> &p_files, Node *p_parent = nullptr); void set_selected(Node *p_node, bool p_emit_selected = false); - void fill_path_renames(Node *p_node, Node *p_new_parent, Map<Node *, NodePath> *p_renames); - void perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_renames, Map<Ref<Animation>, Set<int>> *r_rem_anims = nullptr); + void fill_path_renames(Node *p_node, Node *p_new_parent, HashMap<Node *, NodePath> *p_renames); + void perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, RBSet<int>> *r_rem_anims = nullptr); SceneTreeEditor *get_tree_editor() { return scene_tree; } EditorData *get_editor_data() { return editor_data; } @@ -317,7 +317,9 @@ public: List<Node *> paste_nodes(); List<Node *> get_node_clipboard() const; - ScriptCreateDialog *get_script_create_dialog() { return script_create_dialog; } + ScriptCreateDialog *get_script_create_dialog() { + return script_create_dialog; + } SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selection, EditorData &p_editor_data); ~SceneTreeDock(); diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 4efd22aa1e..afb42efa76 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -874,7 +874,7 @@ Node *SceneTreeEditor::get_selected() { return selected; } -void SceneTreeEditor::set_marked(const Set<Node *> &p_marked, bool p_selectable, bool p_children_selectable) { +void SceneTreeEditor::set_marked(const RBSet<Node *> &p_marked, bool p_selectable, bool p_children_selectable) { if (tree_dirty) { _update_tree(); } @@ -885,7 +885,7 @@ void SceneTreeEditor::set_marked(const Set<Node *> &p_marked, bool p_selectable, } void SceneTreeEditor::set_marked(Node *p_marked, bool p_selectable, bool p_children_selectable) { - Set<Node *> s; + RBSet<Node *> s; if (p_marked) { s.insert(p_marked); } diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h index 3d88081ab1..604d77cf76 100644 --- a/editor/scene_tree_editor.h +++ b/editor/scene_tree_editor.h @@ -99,7 +99,7 @@ class SceneTreeEditor : public Control { void _renamed(); UndoRedo *undo_redo = nullptr; - Set<Node *> marked; + RBSet<Node *> marked; bool marked_selectable = false; bool marked_children_selectable = false; bool display_foreign = false; @@ -140,7 +140,7 @@ public: void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; }; void set_display_foreign_nodes(bool p_display); - void set_marked(const Set<Node *> &p_marked, bool p_selectable = false, bool p_children_selectable = true); + void set_marked(const RBSet<Node *> &p_marked, bool p_selectable = false, bool p_children_selectable = true); void set_marked(Node *p_marked, bool p_selectable = false, bool p_children_selectable = true); void set_selected(Node *p_node, bool p_emit_selected = true); Node *get_selected(); diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index 3a2c4fb17b..046e8fcdfc 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -382,7 +382,7 @@ String ShaderCreateDialog::_validate_path(const String &p_path) { } String extension = p.get_extension(); - Set<String> extensions; + RBSet<String> extensions; for (int i = 0; i < SHADER_TYPE_MAX; i++) { for (const String &ext : language_data[i].extensions) { diff --git a/editor/translations/af.po b/editor/translations/af.po index 679e80af7c..0e4d1e19ff 100644 --- a/editor/translations/af.po +++ b/editor/translations/af.po @@ -81,11 +81,12 @@ msgstr "Afhanklikheid Bewerker" msgid "Screen Orientation" msgstr "Opnoemings" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -93,7 +94,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -105,7 +106,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -119,10 +120,11 @@ msgstr "" msgid "Position" msgstr "Skep Nuwe" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -602,6 +604,41 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Vervang Alles" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Lineêr" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1197,7 +1234,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -6032,6 +6069,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Skep Intekening" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -16008,40 +16050,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Vervang Alles" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Lineêr" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20271,6 +20279,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21961,7 +21974,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24088,6 +24101,11 @@ msgstr "Wissel Modus" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Opnoemings" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Vervang Alles" @@ -24119,11 +24137,6 @@ msgstr "" msgid "Process Priority" msgstr "Wissel Modus" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Opnoemings" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -24788,6 +24801,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Opnoemings:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Hernoem AutoLaai" @@ -25571,6 +25589,10 @@ msgid "Distance Field" msgstr "Installeer" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/ar.po b/editor/translations/ar.po index afb59d8ccc..19fb3809dd 100644 --- a/editor/translations/ar.po +++ b/editor/translations/ar.po @@ -139,12 +139,13 @@ msgstr "ØØ¬Ù… الخطوط:" msgid "Screen Orientation" msgstr "Ù…ÙØ´ØºÙ„ الشاشة." -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Ù†Ø§ÙØ°Ø© جديدة" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "البكسلات المØÙŠØ·ÙŠØ© (Ø§Ù„ØØ¯ÙˆØ¯ÙŠØ©)" @@ -153,7 +154,7 @@ msgstr "البكسلات المØÙŠØ·ÙŠØ© (Ø§Ù„ØØ¯ÙˆØ¯ÙŠØ©)" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "ØªÙØ¹ÙŠÙ„/إلغاء وضع الشاشة الكاملة" @@ -167,7 +168,7 @@ msgstr "" msgid "Minimized" msgstr "الشروع" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -181,10 +182,11 @@ msgstr "" msgid "Position" msgstr "مكان الرصيÙ" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -683,6 +685,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "إظهار الكل" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "ضوء" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "بالعرض يساراً" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "أختبار" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1293,7 +1332,7 @@ msgstr "تمكين/إيقا٠هذا المسار." msgid "Update Mode (How this property is set)" msgstr "وضع Ø§Ù„ØªØØ¯ÙŠØ« (كيÙية تعيين هذه الخاصية)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "وضعية Ø§Ù„Ø£Ø³ØªÙŠÙØ§Ø¡" @@ -6174,6 +6213,11 @@ msgstr "" msgid "Flat" msgstr "Ø§Ù„Ø³Ø·Ø 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "وضع التصادم" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "إختيار عقدة(عقد) للإستيراد" @@ -16130,42 +16174,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "إظهار الكل" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "ضوء" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "بالعرض يساراً" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "أختبار" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20607,6 +20615,11 @@ msgstr "" "مضلع غير صالØ. يتطلب الأمر على الأقل نقطتين ÙÙŠ نمط البناء \"المتجزئ " "Segments\"." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22476,7 +22489,7 @@ msgstr "اطبخ شبكة Ù…Ù„Ø§ØØ©" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24744,6 +24757,11 @@ msgstr "وضع Ø§Ù„Ø³ØØ¨" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "وضعية Ø§Ù„Ø£Ø³ØªÙŠÙØ§Ø¡" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "عرض من غير ظلال" @@ -24777,11 +24795,6 @@ msgstr "ØªØØ¯ÙŠØ¯ التكرار:" msgid "Process Priority" msgstr "تمكين الأولوية" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "وضعية Ø§Ù„Ø£Ø³ØªÙŠÙØ§Ø¡" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25488,6 +25501,11 @@ msgstr "ÙØ§ØµÙ„ Ù…ÙØ³Ù…ّى" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Ù…ÙØ´ØºÙ‘Ù„ اللون." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "إعادة تسمية عنصر اللون" @@ -26294,6 +26312,11 @@ msgstr "وضع خالي من الإلهاء" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "العمق" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Ø§Ù„Ù…ÙØ¹Ø§Ø¯Ù„:" diff --git a/editor/translations/az.po b/editor/translations/az.po index 6f223a4f1f..f0bf91bc54 100644 --- a/editor/translations/az.po +++ b/editor/translations/az.po @@ -73,11 +73,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -85,7 +86,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -97,7 +98,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -111,10 +112,11 @@ msgstr "" msgid "Position" msgstr "Animasiyanı TÉ™mizlÉ™mÉ™" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -586,6 +588,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1181,7 +1216,7 @@ msgstr "Bu izi açın / söndürün." msgid "Update Mode (How this property is set)" msgstr "YenilÉ™mÉ™ rejimi (bu xüsusiyyÉ™t necÉ™ qurulur)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "İnterpolasiya rejimi" @@ -5855,6 +5890,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15404,38 +15443,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19490,6 +19497,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -21122,7 +21134,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23168,6 +23180,11 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "İnterpolasiya rejimi" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23197,11 +23214,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "İnterpolasiya rejimi" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23834,6 +23846,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "İzah:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Funksiyalar:" @@ -24577,6 +24594,10 @@ msgid "Distance Field" msgstr "QuraÅŸdır" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/bg.po b/editor/translations/bg.po index 8aa5d76c71..3275a08135 100644 --- a/editor/translations/bg.po +++ b/editor/translations/bg.po @@ -91,11 +91,12 @@ msgstr "Размер на контура:" msgid "Screen Orientation" msgstr "ОтварÑне на документациÑта" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Прозорец" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Без граници" @@ -103,7 +104,7 @@ msgstr "Без граници" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "ЦÑл екран" @@ -116,7 +117,7 @@ msgstr "" msgid "Minimized" msgstr "Инициализиране" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -130,10 +131,11 @@ msgstr "" msgid "Position" msgstr "Създаване на функциÑ" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -623,6 +625,41 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Показване на вÑичко" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "ТеÑтово" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1220,7 +1257,7 @@ msgstr "Включване/изключване на тази пътечка." msgid "Update Mode (How this property is set)" msgstr "Режим на обновÑване (как Ñе задава ÑтойноÑÑ‚ на това ÑвойÑтво)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Режим на интерполациÑ" @@ -5972,6 +6009,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Режим на колизии" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15626,40 +15668,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Показване на вÑичко" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "ТеÑтово" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19944,6 +19952,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21718,7 +21731,7 @@ msgstr "Изпичане на NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23900,6 +23913,11 @@ msgstr "Панорамен режим" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Режим на интерполациÑ" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Показване на вÑичко" @@ -23931,11 +23949,6 @@ msgstr "" msgid "Process Priority" msgstr "Включване на приоритета" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Режим на интерполациÑ" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -24625,6 +24638,11 @@ msgstr "Именуван разделител" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Разделение:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Преименуване на елемента – цвÑÑ‚" @@ -25413,6 +25431,11 @@ msgstr "ИнÑталиране" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Дълбочина" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "ОтмеÑтване:" diff --git a/editor/translations/bn.po b/editor/translations/bn.po index 1180616c9e..5f0c0e8a9c 100644 --- a/editor/translations/bn.po +++ b/editor/translations/bn.po @@ -87,12 +87,13 @@ msgstr "পà§à¦°à¦¾à¦¨à§à¦¤à¦°à§‡à¦–ার আকার:" msgid "Screen Orientation" msgstr "রেফারেনà§à¦¸à§‡à¦° ডকà§à¦®à§‡à¦¨à§à¦Ÿà§‡à¦¶à¦¨à§‡ খà§à¦à¦œà§à¦¨à¥¤" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "উইনà§à¦¡à§‹" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -100,7 +101,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "পূরà§à¦£-পরà§à¦¦à¦¾ অদলবদল/টগল করà§à¦¨" @@ -114,7 +115,7 @@ msgstr "" msgid "Minimized" msgstr "বড় হাতের অকà§à¦·à¦°à§‡ পরিবরà§à¦¤à¦¨à§‡ করà§à¦¨" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -128,10 +129,11 @@ msgstr "" msgid "Position" msgstr "ডà§à¦• পজিশন" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -628,6 +630,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Normal পà§à¦°à¦¦à¦°à§à¦¶à¦¨" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "ডান" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "বাম দরà§à¦¶à¦¨" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "পরীকà§à¦·à¦¾à¦®à§‚লক উৎস" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1238,7 +1277,7 @@ msgstr "à¦à¦‡ টà§à¦°à§à¦¯à¦¾à¦•টি চালৠ/ বনà§à¦§ টগল msgid "Update Mode (How this property is set)" msgstr "আপডেট মোড (কীà¦à¦¾à¦¬à§‡ à¦à¦‡ সমà§à¦ªà¦¤à§à¦¤à¦¿ সেট করা আছে)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "ইনà§à¦Ÿà¦¾à¦°à¦ªà§‹à¦²à§‡à¦¶à¦¨ মোড" @@ -6313,6 +6352,11 @@ msgstr "" msgid "Flat" msgstr "ফà§à¦²à§à¦¯à¦¾à¦Ÿ0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° নোড" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿà§‡à¦° জনà§à¦¯ নোড(সমূহ) নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨" @@ -16910,42 +16954,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Normal পà§à¦°à¦¦à¦°à§à¦¶à¦¨" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "ডান" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "বাম দরà§à¦¶à¦¨" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "পরীকà§à¦·à¦¾à¦®à§‚লক উৎস" - #: main/main.cpp msgid "DPI" msgstr "" @@ -21419,6 +21427,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -23229,7 +23242,7 @@ msgstr "মেস" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -25464,6 +25477,11 @@ msgstr "পà§à¦¯à¦¾à¦¨ মোড" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "ইনà§à¦Ÿà¦¾à¦°à¦ªà§‹à¦²à§‡à¦¶à¦¨ মোড" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Shadeless পà§à¦°à¦¦à¦°à§à¦¶à¦¨" @@ -25495,11 +25513,6 @@ msgstr "" msgid "Process Priority" msgstr "নোড ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "ইনà§à¦Ÿà¦¾à¦°à¦ªà§‹à¦²à§‡à¦¶à¦¨ মোড" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -26199,6 +26212,11 @@ msgstr "বিচà§à¦›à§‡à¦¦:" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "বিচà§à¦›à§‡à¦¦:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "কà§à¦²à¦¾à¦¸à§‡à¦° আইটেম অপসারণ করà§à¦¨" @@ -27002,6 +27020,11 @@ msgstr "বিকà§à¦·à§‡à¦ª-হীন মোড" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "গà¦à§€à¦°à¦¤à¦¾" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "অফসেট/à¦à¦¾à¦°à¦¸à¦¾à¦®à§à¦¯:" diff --git a/editor/translations/br.po b/editor/translations/br.po index b14561b9f6..5764fa64e2 100644 --- a/editor/translations/br.po +++ b/editor/translations/br.po @@ -75,11 +75,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -87,7 +88,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -99,7 +100,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -113,10 +114,11 @@ msgstr "" msgid "Position" msgstr "Tro Fiñvskeudenn" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -574,6 +576,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1152,7 +1187,7 @@ msgstr "Aktivañ/Diaktivañ ar roudenn-se." msgid "Update Mode (How this property is set)" msgstr "Mod Bremenadur (Penaos eo termenet ar perzh-se)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Mod Interpoladur" @@ -5749,6 +5784,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15248,38 +15287,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19289,6 +19296,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20902,7 +20914,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22915,6 +22927,11 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Mod Interpoladur" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22943,11 +22960,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Mod Interpoladur" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23571,6 +23583,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Tro Fiñvskeudenn" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Fonksionoù :" @@ -24290,6 +24307,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/ca.po b/editor/translations/ca.po index 08e8de0da5..f6bf7acf1a 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -85,11 +85,12 @@ msgstr "Mida Mà xima de la Finestra" msgid "Screen Orientation" msgstr "Orientació de la Pantalla" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Finestra" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "Sense Vores" @@ -98,7 +99,7 @@ msgstr "Sense Vores" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Pantalla Completa" @@ -110,7 +111,7 @@ msgstr "" msgid "Minimized" msgstr "Minimitzat" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -123,10 +124,11 @@ msgstr "" msgid "Position" msgstr "Posició" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -596,6 +598,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Mostra-ho tot" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Llum" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Vista Esquerra" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Provant" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1194,7 +1233,7 @@ msgstr "Activa/Desactiva la Pista." msgid "Update Mode (How this property is set)" msgstr "Mode d'Actualització (Configuració d'aquesta propietat)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Mode d'Interpolació" @@ -6156,6 +6195,11 @@ msgstr "" msgid "Flat" msgstr "Flat 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Mode Col·lisió" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Selecciona Node(s) per Importar" @@ -16455,42 +16499,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Mostra-ho tot" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Llum" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Vista Esquerra" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Provant" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20957,6 +20965,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22805,7 +22818,7 @@ msgstr "Malla" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -25065,6 +25078,11 @@ msgstr "Mode d'Escombratge lateral" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Mode d'Interpolació" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Mostra sense Ombreig" @@ -25098,11 +25116,6 @@ msgstr "Estableix Múltiples:" msgid "Process Priority" msgstr "Habilitar Prioritat" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Mode d'Interpolació" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25809,6 +25822,11 @@ msgstr "Separador amb Nom" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Operador Color." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Elimina Elements de Classe" @@ -26615,6 +26633,11 @@ msgstr "Mode Lliure de Distraccions" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Profunditat" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "òfset:" diff --git a/editor/translations/cs.po b/editor/translations/cs.po index 7f59f12f45..6af60f7975 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -104,12 +104,13 @@ msgstr "Velikost obrysu:" msgid "Screen Orientation" msgstr "Operátor screen." -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Nové okno" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "HraniÄnà pixely" @@ -118,7 +119,7 @@ msgstr "HraniÄnà pixely" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "PÅ™epnout celou obrazovku" @@ -132,7 +133,7 @@ msgstr "" msgid "Minimized" msgstr "Inicializovat" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -146,10 +147,11 @@ msgstr "" msgid "Position" msgstr "Pozice doku" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -647,6 +649,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Zobrazit vÅ¡echny" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "SvÄ›tlo" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Vlevo po celé výšce" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Testované" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1256,7 +1295,7 @@ msgstr "Aktivovat/Deaktivovat tuto stopu." msgid "Update Mode (How this property is set)" msgstr "Režim aktualizace (jak je tato vlastnost nastavena)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "InterpolaÄnà režim" @@ -6160,6 +6199,11 @@ msgstr "" msgid "Flat" msgstr "Plocha 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Koliznà režim" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Vyberte uzly pro import" @@ -16145,42 +16189,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Zobrazit vÅ¡echny" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "SvÄ›tlo" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Vlevo po celé výšce" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Testované" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20577,6 +20585,11 @@ msgstr "Chybný polygon. Alespoň 3 body jsou potÅ™eba v 'Solids' build módu." msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "Chybný polygon. Alespoň 2 body jsou potÅ™eba v 'Segments' build módu." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22415,7 +22428,7 @@ msgstr "Zapéct NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24679,6 +24692,11 @@ msgstr "Režim posouvánÃ" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "InterpolaÄnà režim" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "BezestÃnový pohled" @@ -24712,11 +24730,6 @@ msgstr "Nastavit vÃce:" msgid "Process Priority" msgstr "Zapnout priority" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "InterpolaÄnà režim" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25424,6 +25437,11 @@ msgstr "Nazvaný oddÄ›lovaÄ" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Operátor barvy." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Odstranit položky tÅ™Ãdy" @@ -26230,6 +26248,11 @@ msgstr "NerozptylujÃcà režitm" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Hloubka" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Offset(Posun):" diff --git a/editor/translations/da.po b/editor/translations/da.po index 763b0af614..80669d616a 100644 --- a/editor/translations/da.po +++ b/editor/translations/da.po @@ -86,11 +86,12 @@ msgstr "Max. Vinduesstørrelse" msgid "Screen Orientation" msgstr "Skærmorientering" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Vindue" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Rammeløs" @@ -98,7 +99,7 @@ msgstr "Rammeløs" msgid "Per Pixel Transparency Enabled" msgstr "Per Piksel Gennemsigtighed Aktiveret" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Fuld skærm" @@ -110,7 +111,7 @@ msgstr "Maksimeret" msgid "Minimized" msgstr "Minimeret" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -123,10 +124,11 @@ msgstr "" msgid "Position" msgstr "Position" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -614,6 +616,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Vis alle" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Lineær" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Tester" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1221,7 +1259,7 @@ msgstr "SlÃ¥ spor til/fra." msgid "Update Mode (How this property is set)" msgstr "Opdateringstilstand (Hvordan denne egenskab er sat)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolationsmetode" @@ -6190,6 +6228,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Interpolationsmetode" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Vælg Noder at Importere" @@ -16385,41 +16428,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Vis alle" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Lineær" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Tester" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20761,6 +20769,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22513,7 +22526,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24695,6 +24708,11 @@ msgstr "Skifter Modus" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolationsmetode" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Vis alle" @@ -24726,11 +24744,6 @@ msgstr "" msgid "Process Priority" msgstr "Rediger filtre" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolationsmetode" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25415,6 +25428,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Tællinger:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Fjern Alt" @@ -26207,6 +26225,11 @@ msgid "Distance Field" msgstr "Distraktions Fri Modus" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "Dybde" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/de.po b/editor/translations/de.po index 15b04ff917..13e7b0eeea 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -80,13 +80,14 @@ # Andreas <self@andreasbresser.de>, 2022. # ARez <dark.gaming@fantasymail.de>, 2022. # Christian Packenius <christian@packenius.com>, 2022. +# Sajeg <jfx@posteo.de>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-30 17:12+0000\n" -"Last-Translator: Christian Packenius <christian@packenius.com>\n" +"PO-Revision-Date: 2022-05-17 17:18+0000\n" +"Last-Translator: Sajeg <jfx@posteo.de>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" "Language: de\n" @@ -94,7 +95,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -148,11 +149,12 @@ msgstr "Maximale Fenstergröße" msgid "Screen Orientation" msgstr "Bildschirmausrichtung" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Fenster" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Rahmenlos" @@ -160,7 +162,7 @@ msgstr "Rahmenlos" msgid "Per Pixel Transparency Enabled" msgstr "Pixelweise Transparenz aktiviert" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Vollbildmodus" @@ -172,7 +174,7 @@ msgstr "Maximiert" msgid "Minimized" msgstr "Minimiert" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Verstellbar" @@ -185,10 +187,11 @@ msgstr "Verstellbar" msgid "Position" msgstr "Position" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -639,6 +642,39 @@ msgstr "Eigenes Nutzerverzeichnis verwenden" msgid "Custom User Dir Name" msgstr "Eigener Nutzerverzeichnisname" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "Anzeige" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "Breite" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "Höhe" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "Immer im Vordergrund" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "Testbreite" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "Testhöhe" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1216,7 +1252,7 @@ msgstr "Diese Spur an-/abschalten." msgid "Update Mode (How this property is set)" msgstr "Aktualisierungs-Modus (wie Eigenschaften gesetzt werden)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolationsmodus" @@ -6004,6 +6040,11 @@ msgstr "" msgid "Flat" msgstr "Flach" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Schieber" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Selektiere Node(s) für den Import" @@ -6704,7 +6745,6 @@ msgid "Delimiter" msgstr "Trennzeichen" #: editor/import/resource_importer_layered_texture.cpp -#, fuzzy msgid "ColorCorrect" msgstr "Farbkorrektur" @@ -6995,14 +7035,12 @@ msgid "Saving..." msgstr "Speichere..." #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "2D, Detect 3D" -msgstr "3D erkennen" +msgstr "2D, 3D erkennen" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "2D Pixel" -msgstr "Festkörper-Pixel" +msgstr "2D-Pixel" #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" @@ -8336,7 +8374,7 @@ msgstr "Testphase" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed to get repository configuration." -msgstr "" +msgstr "Die Repository-Konfiguration konnte nicht abgerufen werden." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -10070,8 +10108,9 @@ msgid "Sync Bones to Polygon" msgstr "Knochen mit Polygon synchronisieren" #: editor/plugins/ray_cast_2d_editor_plugin.cpp +#, fuzzy msgid "Set cast_to" -msgstr "" +msgstr "Setzte cast_to" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" @@ -15017,16 +15056,16 @@ msgstr "Lokal machen" #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp msgid "Another node already uses this unique name in the scene." msgstr "" +"Ein anderes Node nutzt schon diesen einzigartigen Namen in dieser Szene." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Enable Scene Unique Name" -msgstr "Eindeutiger Name" +msgstr "Einzigartigen Namen der Szene aktivieren" #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp #, fuzzy msgid "Disable Scene Unique Name" -msgstr "Eindeutiger Name" +msgstr "Szene eindeutiger Name deaktivieren" #: editor/scene_tree_dock.cpp msgid "New Scene Root" @@ -15101,8 +15140,9 @@ msgid "Sub-Resources" msgstr "Unter-Ressourcen" #: editor/scene_tree_dock.cpp +#, fuzzy msgid "Access as Scene Unique Name" -msgstr "" +msgstr "Zugrif als einzigartige Szene" #: editor/scene_tree_dock.cpp msgid "Clear Inheritance" @@ -15900,38 +15940,6 @@ msgstr "Rückfall auf GLES2" msgid "Use Nvidia Rect Flicker Workaround" msgstr "Nvidia-Rechtecksflackern-Abhilfe verwenden" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "Anzeige" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "Breite" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "Höhe" - -#: main/main.cpp -msgid "Always On Top" -msgstr "Immer im Vordergrund" - -#: main/main.cpp -msgid "Test Width" -msgstr "Testbreite" - -#: main/main.cpp -msgid "Test Height" -msgstr "Testhöhe" - #: main/main.cpp msgid "DPI" msgstr "DPI" @@ -20046,6 +20054,11 @@ msgstr "" "Ungültiges Polygon. Mindestens zwei Punkte werden im ‚Segment‘-Baumodus " "benötigt." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "Baumodus" @@ -21715,9 +21728,10 @@ msgid "NavMesh" msgstr "NavMesh backen" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "Der einzige Zweck eines NavigationObstacle ist es, Kollisionsvermeidung für " "ein Spatial-Objekt bereitzustellen." @@ -23754,6 +23768,11 @@ msgid "Pause Mode" msgstr "Pausiermodus" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Physikinterpolation" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "Eingeklappt anzeigen" @@ -23782,10 +23801,6 @@ msgstr "Mehrspieler benutzerdefiniert" msgid "Process Priority" msgstr "Prozesspriorität" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "Physikinterpoliert" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "Zeit übrig" @@ -24400,6 +24415,11 @@ msgid "Labeled Separator Right" msgstr "Benannter Trenner Rechts" #: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Font Separator" +msgstr "Schriftfarbe Trenner" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "Schriftfarbe-Beschleunigung" @@ -25080,6 +25100,11 @@ msgid "Distance Field" msgstr "Distanzfeld" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "Kartendaten" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "Versätze" diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot index 607787019b..e74983e7d3 100644 --- a/editor/translations/editor.pot +++ b/editor/translations/editor.pot @@ -66,11 +66,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -78,7 +79,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -90,7 +91,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -103,10 +104,11 @@ msgstr "" msgid "Position" msgstr "" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -556,6 +558,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1133,7 +1168,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5693,6 +5728,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15157,38 +15196,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19149,6 +19156,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20730,7 +20742,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22677,6 +22689,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22704,10 +22720,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23309,6 +23321,10 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +msgid "Font Separator" +msgstr "" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -23989,6 +24005,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/el.po b/editor/translations/el.po index 4209bc8935..c4c3529ab4 100644 --- a/editor/translations/el.po +++ b/editor/translations/el.po @@ -6,7 +6,7 @@ # Georgios Katsanakis <geo.elgeo@gmail.com>, 2019. # Overloaded <manoschool@yahoo.gr>, 2019. # Eternal Death <eternaldeath0001@gmail.com>, 2019. -# Overloaded @ Orama Interactive http://orama-interactive.com/ <manoschool@yahoo.gr>, 2020. +# Overloaded @ Orama Interactive http://orama-interactive.com/ <manoschool@yahoo.gr>, 2020, 2022. # pandektis <pandektis@gmail.com>, 2020. # KostasMSC <kargyris@athtech.gr>, 2020. # lawfulRobot <czavantias@gmail.com>, 2020, 2021. @@ -22,8 +22,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-05-05 10:10+0000\n" -"Last-Translator: Anthony V. <batmanplayer123@gmail.com>\n" +"PO-Revision-Date: 2022-05-07 05:11+0000\n" +"Last-Translator: Overloaded @ Orama Interactive <manoschool@yahoo.gr>\n" "Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/" "el/>\n" "Language: el\n" @@ -88,11 +88,12 @@ msgstr "ΜÎγιστο ΜÎγεθος ΠαÏαθÏÏου" msgid "Screen Orientation" msgstr "Î Ïοσανατολισμός οθόνης" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "ΠαÏάθυÏο" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "XωÏίς σÏνοÏα" @@ -100,7 +101,7 @@ msgstr "XωÏίς σÏνοÏα" msgid "Per Pixel Transparency Enabled" msgstr "Διαφάνεια ανά εικονοστοιχείο ΕνεÏγοποιημÎνη" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "ΠλήÏης οθόνη" @@ -112,7 +113,7 @@ msgstr "ΜεγιστοποιημÎνη" msgid "Minimized" msgstr "Ελαχιστοποίηση" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Mεταβλητό MÎγεθος" @@ -126,10 +127,11 @@ msgstr "Mεταβλητό MÎγεθος" msgid "Position" msgstr "ΘÎση" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -596,6 +598,43 @@ msgstr "ΧÏήση Î ÏοσαÏμοσμÎνης ΔιεÏθυνση ΚαταλόΠmsgid "Custom User Dir Name" msgstr "Όνομα διεÏθυνσης Ï€ÏοσαÏμοσμÎνου χÏήστη" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Εμφάνιση όλων" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Φως" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "ΕυÏεία ΑÏιστεÏά" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Δοκιμαστικά" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1204,7 +1243,7 @@ msgstr "Εναλλαγή ÎºÎ¿Î¼Î¼Î±Ï„Î¹Î¿Ï on/off." msgid "Update Mode (How this property is set)" msgstr "ΜÎθοδος ανανÎωσης (της ιδιότητας)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "ΜÎθοδος παÏεμβολής" @@ -6170,6 +6209,11 @@ msgstr "" msgid "Flat" msgstr "Επίπεδο 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "ΛειτουÏγία ΣÏγκÏουσης" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "ΕπιλÎξτε κόμβους για εισαγωγή" @@ -14701,7 +14745,7 @@ msgstr "" #: editor/project_settings_editor.cpp msgid "Physical Key" -msgstr "" +msgstr "Φυσικό πλήκτÏο" #: editor/project_settings_editor.cpp msgid "Key " @@ -14749,7 +14793,7 @@ msgstr "Όλες οι ΣυσκευÎÏ‚" #: editor/project_settings_editor.cpp msgid " (Physical)" -msgstr "" +msgstr " (Φυσικό)" #: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp msgid "Press a Key..." @@ -16315,42 +16359,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Εμφάνιση όλων" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Φως" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "ΕυÏεία ΑÏιστεÏά" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Δοκιμαστικά" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20788,6 +20796,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22643,7 +22656,7 @@ msgstr "Ψήσιμο NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24911,6 +24924,11 @@ msgstr "ΛειτουÏγία Μετακίνησης ΚάμεÏας" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "ΜÎθοδος παÏεμβολής" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Εμφάνιση χωÏίς σκιÎÏ‚" @@ -24944,11 +24962,6 @@ msgstr "ΟÏισμός πολλών:" msgid "Process Priority" msgstr "ΕπεξεÏγασία Î ÏοτεÏαιότητας" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "ΜÎθοδος παÏεμβολής" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25657,6 +25670,11 @@ msgstr "ΟνομασμÎνο ΔιαχωÏιστικό" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Τελεστής χÏώματος." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "ΑφαίÏεση στοιχείων κλάσης" @@ -26463,6 +26481,11 @@ msgstr "ΛειτουÏγία χωÏίς διάσπαση Ï€Ïοσοχής" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Βάθος" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Μετατόπιση:" diff --git a/editor/translations/en_Shaw.po b/editor/translations/en_Shaw.po index 585d053296..6ccc2bc4bc 100644 --- a/editor/translations/en_Shaw.po +++ b/editor/translations/en_Shaw.po @@ -71,11 +71,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -83,7 +84,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -95,7 +96,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -109,10 +110,11 @@ msgstr "" msgid "Position" msgstr "ð‘“ð‘³ð‘™ð‘’ð‘–ð‘©ð‘¯ð‘Ÿ:" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -566,6 +568,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1144,7 +1179,7 @@ msgstr "ð‘‘ð‘ªð‘œð‘©ð‘¤ ð‘žð‘¦ð‘• ð‘‘ð‘®ð‘¨ð‘’ ð‘ªð‘¯/ð‘ªð‘“." msgid "Update Mode (How this property is set)" msgstr "ð‘³ð‘ð‘›ð‘±ð‘‘ ð‘¥ð‘´ð‘› (ð‘£ð‘¬ ð‘žð‘¦ð‘• ð‘ð‘®ð‘ªð‘ð‘¼ð‘‘𑦠ð‘¦ð‘Ÿ ð‘•ð‘§ð‘‘)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "ð‘¦ð‘¯ð‘‘ð‘»ð‘ð‘©ð‘¤ð‘±ð‘–ð‘©ð‘¯ ð‘¥ð‘´ð‘›" @@ -5712,6 +5747,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15197,38 +15236,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19218,6 +19225,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20821,7 +20833,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22823,6 +22835,11 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "ð‘¦ð‘¯ð‘‘ð‘»ð‘ð‘©ð‘¤ð‘±ð‘–ð‘©ð‘¯ ð‘¥ð‘´ð‘›" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22851,11 +22868,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "ð‘¦ð‘¯ð‘‘ð‘»ð‘ð‘©ð‘¤ð‘±ð‘–ð‘©ð‘¯ ð‘¥ð‘´ð‘›" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23475,6 +23487,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "ð‘¦ð‘¯ð‘‘ð‘»ð‘ð‘©ð‘¤ð‘±ð‘–ð‘©ð‘¯ ð‘¥ð‘´ð‘›" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "ð‘“ð‘³ð‘™ð‘’ð‘–ð‘©ð‘¯ð‘Ÿ:" @@ -24189,6 +24206,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/eo.po b/editor/translations/eo.po index c9f39f29fd..a183ba025a 100644 --- a/editor/translations/eo.po +++ b/editor/translations/eo.po @@ -87,12 +87,13 @@ msgstr "Grando de konturo:" msgid "Screen Orientation" msgstr "Malfermi dokumentaron" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Nova Fenestro" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "Rastumeroj de bordero" @@ -101,7 +102,7 @@ msgstr "Rastumeroj de bordero" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Baskuli plenekranon" @@ -115,7 +116,7 @@ msgstr "" msgid "Minimized" msgstr "Kapitaligi" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -129,10 +130,11 @@ msgstr "" msgid "Position" msgstr "Pozicio de doko" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -623,6 +625,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Vidigi tutan" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Maldekstre vaste" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Testada" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1232,7 +1270,7 @@ msgstr "Åœalti/malÅalti ĉi tiun trakon." msgid "Update Mode (How this property is set)" msgstr "Aktualigi Modon (Kiel tio ĉi atributo estas determinigis)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolado Modo" @@ -6126,6 +6164,11 @@ msgstr "" msgid "Flat" msgstr "Konstanta 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Videblaj koliziaj formoj" + #: editor/editor_sub_scene.cpp #, fuzzy msgid "Select Node(s) to Import" @@ -16040,41 +16083,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Vidigi tutan" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Maldekstre vaste" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Testada" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20398,6 +20406,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22136,7 +22149,7 @@ msgstr "MaÅo" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24338,6 +24351,11 @@ msgstr "Panoramada reÄimo" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolado Modo" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Vidigi tutan" @@ -24371,11 +24389,6 @@ msgstr "Agordi pluroblan:" msgid "Process Priority" msgstr "Movada reÄimo" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolado Modo" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25067,6 +25080,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Versio:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Renomi nodon" @@ -25867,6 +25885,11 @@ msgstr "Sendistra reÄimo" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Profundo" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Krada deÅovo:" diff --git a/editor/translations/es.po b/editor/translations/es.po index de846418b6..529cc6351b 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -83,7 +83,7 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-05-03 07:13+0000\n" +"PO-Revision-Date: 2022-05-17 21:38+0000\n" "Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" @@ -92,7 +92,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -146,11 +146,12 @@ msgstr "Tamaño Máximo de la Ventana" msgid "Screen Orientation" msgstr "Orientación de la Pantalla" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Ventana" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Sin bordes" @@ -158,7 +159,7 @@ msgstr "Sin bordes" msgid "Per Pixel Transparency Enabled" msgstr "Transparencia Por PÃxel Activada" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Pantalla Completa" @@ -170,7 +171,7 @@ msgstr "Maximizada" msgid "Minimized" msgstr "Minimizada" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Redimensionable" @@ -183,10 +184,11 @@ msgstr "Redimensionable" msgid "Position" msgstr "Posición" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -639,6 +641,43 @@ msgstr "Utilizar Directorio de Usuario Personalizado" msgid "Custom User Dir Name" msgstr "Nombre de Directorio de Usuario Personalizado" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Mostrar Todos" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Luz" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Ancho Izquierda" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Prueba" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1216,7 +1255,7 @@ msgstr "Act./Desact. esta pista." msgid "Update Mode (How this property is set)" msgstr "Modo de actualización (Cómo se establece)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Modo de Interpolación" @@ -2748,7 +2787,7 @@ msgstr "ETC2" #: editor/editor_export.cpp #, fuzzy msgid "No BPTC Fallbacks" -msgstr "Forzar Shader Fallbacks" +msgstr "No hay retroceso de BPTC" #: editor/editor_export.cpp platform/android/export/export_plugin.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp @@ -4199,7 +4238,7 @@ msgstr "Desactivar Plegado" #: editor/editor_node.cpp msgid "Auto Unfold Foreign Scenes" -msgstr "" +msgstr "Despliegue Automático de Escenas Externas" #: editor/editor_node.cpp msgid "Horizontal Vector2 Editing" @@ -4207,7 +4246,7 @@ msgstr "Edición Horizontal De Vector2" #: editor/editor_node.cpp msgid "Horizontal Vector Types Editing" -msgstr "" +msgstr "Edición de Tipos de Vectores Horizontales" #: editor/editor_node.cpp msgid "Open Resources In Current Inspector" @@ -5331,7 +5370,7 @@ msgstr "Ancho del Minimapa" #: editor/editor_settings.cpp msgid "Mouse Extra Buttons Navigate History" -msgstr "" +msgstr "Botones Extra del Ratón Navegar por el Historial" #: editor/editor_settings.cpp msgid "Appearance" @@ -6027,6 +6066,11 @@ msgstr "" msgid "Flat" msgstr "Plano 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Modo de Colisión" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Selecciona nodo(s) a importar" @@ -16008,42 +16052,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Mostrar Todos" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Luz" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Ancho Izquierda" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Prueba" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20449,6 +20457,11 @@ msgstr "" "PolÃgono inválido. Se necesitan al menos 2 puntos en modo de construcción " "'Segments'." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22273,9 +22286,10 @@ msgid "NavMesh" msgstr "Calcular NavMesh" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "El NavigationObstacle sólo sirve para evitar la colisión de un objeto " "spatial." @@ -24521,6 +24535,11 @@ msgstr "Modo desplazamiento lateral" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Modo de Interpolación" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Mostrar Sin Sombreado" @@ -24552,11 +24571,6 @@ msgstr "Multijugador Personalizado" msgid "Process Priority" msgstr "Activar Prioridad" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Modo de Interpolación" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25267,6 +25281,11 @@ msgstr "Separador con nombre" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Separador de Color de Fuentes" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Color Hueso 1" @@ -26061,6 +26080,11 @@ msgstr "Modo Sin Distracciones" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Profundidad" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Offset:" diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index 622041b7bf..c7beccaa06 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -95,12 +95,13 @@ msgstr "Tamaño de Outline:" msgid "Screen Orientation" msgstr "Operador Screen(trama)." -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Nueva Ventana" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "PÃxeles del Borde" @@ -109,7 +110,7 @@ msgstr "PÃxeles del Borde" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Act./Desact. Pantalla Completa" @@ -123,7 +124,7 @@ msgstr "" msgid "Minimized" msgstr "Inicializar" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -137,10 +138,11 @@ msgstr "" msgid "Position" msgstr "Posición del Panel" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -640,6 +642,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Mostrar Todo" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Luz" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Izquierda Ancha" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Prueba" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1249,7 +1288,7 @@ msgstr "Act./Desact. esta pista." msgid "Update Mode (How this property is set)" msgstr "Modo de Actualización (Como esta configurada esta propiedad)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Modo de Interpolación" @@ -6188,6 +6227,11 @@ msgstr "" msgid "Flat" msgstr "Flat 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Modo Colisión" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Seleccionar Nodo(s) para Importar" @@ -16183,42 +16227,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Mostrar Todo" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Luz" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Izquierda Ancha" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Prueba" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20650,6 +20658,11 @@ msgstr "" "PolÃgono inválido. Se necesitan al menos 2 puntos en modo de construcción " "\"Segmentos\"." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22505,7 +22518,7 @@ msgstr "Bake NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24797,6 +24810,11 @@ msgstr "Modo Paneo" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Modo de Interpolación" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Mostrar Sin Sombreado" @@ -24830,11 +24848,6 @@ msgstr "Asignar Múltiples:" msgid "Process Priority" msgstr "Activar Prioridad" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Modo de Interpolación" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25548,6 +25561,11 @@ msgstr "Separador Nomenclado" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Operador Color." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Cambiar Nombre del Elemento Color" @@ -26354,6 +26372,11 @@ msgstr "Modo Sin Distracciones" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Profundidad" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Offset:" diff --git a/editor/translations/et.po b/editor/translations/et.po index 327bceafe3..90a691dac9 100644 --- a/editor/translations/et.po +++ b/editor/translations/et.po @@ -79,12 +79,13 @@ msgstr "Suurus: " msgid "Screen Orientation" msgstr "Ava dokumentatsioon" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Uus aken" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -92,7 +93,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -104,7 +105,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -118,10 +119,11 @@ msgstr "" msgid "Position" msgstr "Doki asukoht" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -602,6 +604,41 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Kuva kõik" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Testimine" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1197,7 +1234,7 @@ msgstr "Lülita see rada sisse/välja." msgid "Update Mode (How this property is set)" msgstr "Uuendusrežiim (kuidas see omadus on seatud)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolatsiooni režiim" @@ -5935,6 +5972,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15604,40 +15645,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Kuva kõik" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Testimine" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19868,6 +19875,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21564,7 +21576,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23697,6 +23709,11 @@ msgstr "Skaleerimisrežiim" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolatsiooni režiim" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Kuva varjutamata" @@ -23729,11 +23746,6 @@ msgstr "Sea mitu:" msgid "Process Priority" msgstr "Liigutamisrežiim" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolatsiooni režiim" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -24397,6 +24409,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Versioon:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Funktsioonid" @@ -25178,6 +25195,10 @@ msgid "Distance Field" msgstr "Paigalda" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/eu.po b/editor/translations/eu.po index b316e1f11e..bee533c6c1 100644 --- a/editor/translations/eu.po +++ b/editor/translations/eu.po @@ -75,11 +75,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -87,7 +88,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Txandakatu pantaila osoa" @@ -100,7 +101,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -114,10 +115,11 @@ msgstr "" msgid "Position" msgstr "Kargatu animazioa" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -588,6 +590,40 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Erakutsi guztiak" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1173,7 +1209,7 @@ msgstr "Pista hau aktibatu/desaktibatu." msgid "Update Mode (How this property is set)" msgstr "Eguneratze mota (Nola ezartzen da)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolazio mota" @@ -5847,6 +5883,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Talka formak ikusgai" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Hautatu inportatu nahi dituzun nodoak" @@ -15483,39 +15524,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Erakutsi guztiak" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19673,6 +19681,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -21346,7 +21359,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23425,6 +23438,11 @@ msgstr "Atxikitze modua:" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolazio mota" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Erakutsi guztiak" @@ -23456,11 +23474,6 @@ msgstr "" msgid "Process Priority" msgstr "Txandakatu modua" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolazio mota" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -24116,6 +24129,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Enumerazioak" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Kendu elementu guztiak" @@ -24881,6 +24899,10 @@ msgid "Distance Field" msgstr "Instalatu" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/extract.py b/editor/translations/extract.py index bd32fc01c7..7f3da400e7 100755 --- a/editor/translations/extract.py +++ b/editor/translations/extract.py @@ -100,6 +100,7 @@ class ExtractType(enum.IntEnum): TEXT = 1 PROPERTY_PATH = 2 GROUP = 3 + SUBGROUP = 4 # Regex "(?P<name>([^"\\]|\\.)*)" creates a group named `name` that matches a string. @@ -115,19 +116,23 @@ message_patterns = { ): ExtractType.TEXT, re.compile(r'_initial_set\("(?P<message>[^"]+?)",'): ExtractType.PROPERTY_PATH, re.compile(r'GLOBAL_DEF(_RST)?(_NOVAL)?(_BASIC)?\("(?P<message>[^"]+?)",'): ExtractType.PROPERTY_PATH, - re.compile(r'GLOBAL_DEF_BASIC\(vformat\("(?P<message>layer_names/\w+)/layer_%d"'): ExtractType.PROPERTY_PATH, re.compile(r'EDITOR_DEF(_RST)?\("(?P<message>[^"]+?)",'): ExtractType.PROPERTY_PATH, re.compile( r'EDITOR_SETTING(_USAGE)?\(Variant::[_A-Z0-9]+, [_A-Z0-9]+, "(?P<message>[^"]+?)",' ): ExtractType.PROPERTY_PATH, re.compile( - r'(ADD_PROPERTYI?|ImportOption|ExportOption)\(PropertyInfo\(Variant::[_A-Z0-9]+, "(?P<message>[^"]+?)"[,)]' + r"(ADD_PROPERTYI?|ImportOption|ExportOption)\(PropertyInfo\(" + + r"Variant::[_A-Z0-9]+" # Name + + r', "(?P<message>[^"]+)"' # Type + + r'(, [_A-Z0-9]+(, "([^"\\]|\\.)*"(, (?P<usage>[_A-Z0-9]+))?)?|\))' # [, hint[, hint string[, usage]]]. ): ExtractType.PROPERTY_PATH, - re.compile( - r"(?!#define )LIMPL_PROPERTY(_RANGE)?\(Variant::[_A-Z0-9]+, (?P<message>[^,]+?)," - ): ExtractType.PROPERTY_PATH, - re.compile(r'ADD_GROUP\("(?P<message>[^"]+?)", "(?P<prefix>[^"]*?)"\)'): ExtractType.GROUP, - re.compile(r'#define WRTC_\w+ "(?P<message>[^"]+?)"'): ExtractType.PROPERTY_PATH, + re.compile(r'ADD_ARRAY\("(?P<message>[^"]+)", '): ExtractType.PROPERTY_PATH, + re.compile(r'ADD_ARRAY_COUNT(_WITH_USAGE_FLAGS)?\("(?P<message>[^"]+)", '): ExtractType.TEXT, + re.compile(r'(ADD_GROUP|GNAME)\("(?P<message>[^"]+)", "(?P<prefix>[^"]*)"\)'): ExtractType.GROUP, + re.compile(r'ADD_GROUP_INDENT\("(?P<message>[^"]+)", "(?P<prefix>[^"]*)", '): ExtractType.GROUP, + re.compile(r'ADD_SUBGROUP\("(?P<message>[^"]+)", "(?P<prefix>[^"]*)"\)'): ExtractType.SUBGROUP, + re.compile(r'ADD_SUBGROUP_INDENT\("(?P<message>[^"]+)", "(?P<prefix>[^"]*)", '): ExtractType.GROUP, + re.compile(r'PNAME\("(?P<message>[^"]+)"\)'): ExtractType.PROPERTY_PATH, } theme_property_patterns = { re.compile(r'set_(constant|font|font_size|stylebox|color|icon)\("(?P<message>[^"]+)", '): ExtractType.PROPERTY_PATH, @@ -203,6 +208,7 @@ def process_file(f, fname): is_block_translator_comment = False translator_comment = "" current_group = "" + current_subgroup = "" patterns = message_patterns if os.path.basename(fname) == "default_theme.cpp": @@ -239,11 +245,25 @@ def process_file(f, fname): if extract_type == ExtractType.TEXT: _add_message(msg, msg_plural, msgctx, location, translator_comment) elif extract_type == ExtractType.PROPERTY_PATH: - if current_group: + if captures.get("usage") == "PROPERTY_USAGE_NO_EDITOR": + continue + + if current_subgroup: + if msg.startswith(current_subgroup): + msg = msg[len(current_subgroup) :] + elif current_subgroup.startswith(msg): + pass # Keep this as-is. See EditorInspector::update_tree(). + else: + current_subgroup = "" + elif current_group: if msg.startswith(current_group): msg = msg[len(current_group) :] + elif current_group.startswith(msg): + pass # Keep this as-is. See EditorInspector::update_tree(). else: current_group = "" + current_subgroup = "" + if "." in msg: # Strip feature tag. msg = msg.split(".", 1)[0] for part in msg.split("/"): @@ -251,6 +271,10 @@ def process_file(f, fname): elif extract_type == ExtractType.GROUP: _add_message(msg, msg_plural, msgctx, location, translator_comment) current_group = captures["prefix"] + current_subgroup = "" + elif extract_type == ExtractType.SUBGROUP: + _add_message(msg, msg_plural, msgctx, location, translator_comment) + current_subgroup = captures["prefix"] translator_comment = "" l = f.readline() diff --git a/editor/translations/fa.po b/editor/translations/fa.po index e4d1d422c5..e3ce955b19 100644 --- a/editor/translations/fa.po +++ b/editor/translations/fa.po @@ -100,12 +100,13 @@ msgstr "باز کردن Ùˆ اجرای یک اسکریپت" msgid "Screen Orientation" msgstr "شمارش ها" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "چارچوب جدید" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -113,7 +114,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "ØØ§Ù„ت تمام ØµÙØÙ‡" @@ -126,7 +127,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -140,10 +141,11 @@ msgstr "" msgid "Position" msgstr "برداشتن موج" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -633,6 +635,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "نشان دادن همه" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "خطی" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "آزمودن" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1228,7 +1266,7 @@ msgstr "دÙÚ¯Ø±ØØ§Ù„ت٠روشن/خاموش این قطعه." msgid "Update Mode (How this property is set)" msgstr "ØØ§Ù„ت بروزرسانی (Ù†ØÙˆÙ‡ تنظیم این ویژگی)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "ØØ§Ù„ت درون یابی(درون‌یابی روشی است برای ÛŒØ§ÙØªÙ† مقدار تابع درون یک بازه)" @@ -6014,6 +6052,11 @@ msgstr "" msgid "Flat" msgstr "تخت 1" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "گره انیمیشن" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "انتخاب گره (ها) برای وارد شدن" @@ -16225,41 +16268,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "نشان دادن همه" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "خطی" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "آزمودن" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20612,6 +20620,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22364,7 +22377,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24540,6 +24553,11 @@ msgstr "انتخاب ØØ§Ù„ت" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "ØØ§Ù„ت درون یابی(درون‌یابی روشی است برای ÛŒØ§ÙØªÙ† مقدار تابع درون یک بازه)" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "نشان دادن همه" @@ -24573,11 +24591,6 @@ msgstr "تعیین چندگانه:" msgid "Process Priority" msgstr "ویرایش صاÙÛŒ ها" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "ØØ§Ù„ت درون یابی(درون‌یابی روشی است برای ÛŒØ§ÙØªÙ† مقدار تابع درون یک بازه)" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25260,6 +25273,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "شمارش ها:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "برداشتن انتخاب شده" @@ -26049,6 +26067,11 @@ msgid "Distance Field" msgstr "نصب کردن" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "صادکردن ÙØ§ÛŒÙ„ کتابخانه ای" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/fi.po b/editor/translations/fi.po index 00afd220af..f63f9f4cd6 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -88,12 +88,13 @@ msgstr "Ääriviivojen koko:" msgid "Screen Orientation" msgstr "Näyttöoperaattori." -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Uusi ikkuna" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "Reunapikselit" @@ -102,7 +103,7 @@ msgstr "Reunapikselit" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Siirry koko näytön tilaan" @@ -116,7 +117,7 @@ msgstr "" msgid "Minimized" msgstr "Alusta" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -130,10 +131,11 @@ msgstr "" msgid "Position" msgstr "Telakan sijainti" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -632,6 +634,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Näytä kaikki" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Valo" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Laaja vasemmalla" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Testaus" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1241,7 +1280,7 @@ msgstr "Kytke tämä raita päälle/pois." msgid "Update Mode (How this property is set)" msgstr "Päivitystila (Kuinka tämä ominaisuus on asetettu)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolaatiotila" @@ -6157,6 +6196,11 @@ msgstr "" msgid "Flat" msgstr "Tasainen 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Törmäystila" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Valitse tuotavat solmut" @@ -16120,42 +16164,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Näytä kaikki" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Valo" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Laaja vasemmalla" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Testaus" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20581,6 +20589,11 @@ msgstr "" "Virheellinen polygoni. 'Segments' luontitilassa tarvitaan ainakin kaksi " "pistettä." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22438,9 +22451,10 @@ msgid "NavMesh" msgstr "Kehitä NavMesh" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "NavigationObstacle on olemassa ainoastaan tarjotakseen Spatial objektille " "törmäyksen välttämistä." @@ -24734,6 +24748,11 @@ msgstr "Panorointitila" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolaatiotila" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Näytä sävyttämätön" @@ -24767,11 +24786,6 @@ msgstr "Aseta useita:" msgid "Process Priority" msgstr "Ota prioriteetti käyttöön" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolaatiotila" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25485,6 +25499,11 @@ msgstr "Nimetty erotin" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Värioperaattori." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Nimeä väri uudelleen" @@ -26291,6 +26310,11 @@ msgstr "Häiriötön tila" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Syvyys" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Siirtymä:" diff --git a/editor/translations/fil.po b/editor/translations/fil.po index e1ca820ec1..5966e53547 100644 --- a/editor/translations/fil.po +++ b/editor/translations/fil.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" -"PO-Revision-Date: 2022-03-17 13:58+0000\n" +"PO-Revision-Date: 2022-05-15 09:38+0000\n" "Last-Translator: Marco Santos <enum.scima@gmail.com>\n" "Language-Team: Filipino <https://hosted.weblate.org/projects/godot-engine/" "godot/fil/>\n" @@ -21,159 +21,157 @@ msgstr "" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=2; plural=n != 1 && n != 2 && n != 3 && (n % 10 == 4 " "|| n % 10 == 6 || n % 10 == 9);\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" -msgstr "" +msgstr "Tablet Driver" #: core/bind/core_bind.cpp msgid "Clipboard" -msgstr "" +msgstr "Clipboard" #: core/bind/core_bind.cpp -#, fuzzy msgid "Current Screen" -msgstr "Property Track" +msgstr "Kasalukuyang Screen" #: core/bind/core_bind.cpp msgid "Exit Code" -msgstr "" +msgstr "Umalis sa Code" #: core/bind/core_bind.cpp msgid "V-Sync Enabled" -msgstr "" +msgstr "Binuksan ang V-Sync" #: core/bind/core_bind.cpp main/main.cpp msgid "V-Sync Via Compositor" -msgstr "" +msgstr "V-Sync Via Compositor" #: core/bind/core_bind.cpp main/main.cpp msgid "Delta Smoothing" -msgstr "" +msgstr "Delta Smoothing" #: core/bind/core_bind.cpp msgid "Low Processor Usage Mode" -msgstr "" +msgstr "Mababang Paggamit sa Processor" #: core/bind/core_bind.cpp msgid "Low Processor Usage Mode Sleep (µsec)" -msgstr "" +msgstr "Mababang Paggamit sa Processor Tulog (µsec)" #: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp msgid "Keep Screen On" -msgstr "" +msgstr "Panatilihing Nakabukas ang Screen" #: core/bind/core_bind.cpp msgid "Min Window Size" -msgstr "" +msgstr "Min na Laki ng Window" #: core/bind/core_bind.cpp msgid "Max Window Size" -msgstr "" +msgstr "Max na Laki ng Window" #: core/bind/core_bind.cpp msgid "Screen Orientation" -msgstr "" +msgstr "Screen Orientation" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" -msgstr "" +msgstr "Window" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" -msgstr "" +msgstr "Walang border" #: core/bind/core_bind.cpp msgid "Per Pixel Transparency Enabled" -msgstr "" +msgstr "Nakabukas ang Kada Pixel na Transparency" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" -msgstr "" +msgstr "Fullscreen" #: core/bind/core_bind.cpp msgid "Maximized" -msgstr "" +msgstr "Naka-maximize" #: core/bind/core_bind.cpp msgid "Minimized" -msgstr "" +msgstr "Naka-minimize" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" -msgstr "" +msgstr "Nare-resize" #: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp #: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp #: scene/3d/physics_body.cpp scene/3d/remote_transform.cpp #: scene/gui/control.cpp scene/gui/line_edit.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Position" -msgstr "Pagulit ng Animation" +msgstr "Posisyon" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp #: scene/resources/visual_shader.cpp servers/visual_server.cpp msgid "Size" -msgstr "" +msgstr "Laki" #: core/bind/core_bind.cpp msgid "Endian Swap" -msgstr "" +msgstr "Endian Swap" #: core/bind/core_bind.cpp -#, fuzzy msgid "Editor Hint" -msgstr "I-edit" +msgstr "Editor Hint" #: core/bind/core_bind.cpp msgid "Print Error Messages" -msgstr "" +msgstr "I-print mga Mensahe ng Error" #: core/bind/core_bind.cpp msgid "Iterations Per Second" -msgstr "" +msgstr "Ikot Kada Segundo" #: core/bind/core_bind.cpp msgid "Target FPS" -msgstr "" +msgstr "Target na FPS" #: core/bind/core_bind.cpp msgid "Time Scale" -msgstr "" +msgstr "Iskala ng Oras" #: core/bind/core_bind.cpp main/main.cpp msgid "Physics Jitter Fix" -msgstr "" +msgstr "Ayos sa Jitter ng Pisika" #: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Error" -msgstr "" +msgstr "Error" #: core/bind/core_bind.cpp msgid "Error String" -msgstr "" +msgstr "String ng Error" #: core/bind/core_bind.cpp -#, fuzzy msgid "Error Line" -msgstr "Salamin" +msgstr "Linya ng Error" #: core/bind/core_bind.cpp msgid "Result" -msgstr "" +msgstr "Resulta" #: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp msgid "Memory" -msgstr "" +msgstr "Memory" #: core/command_queue_mt.cpp core/message_queue.cpp #: core/register_core_types.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp @@ -184,23 +182,22 @@ msgstr "" #: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h #: servers/visual_server.cpp msgid "Limits" -msgstr "" +msgstr "Mga Limit" #: core/command_queue_mt.cpp msgid "Command Queue" -msgstr "" +msgstr "Pila ng Utos" #: core/command_queue_mt.cpp msgid "Multithreading Queue Size (KB)" -msgstr "" +msgstr "Laki ng Pila sa Multithreading (KB)" #: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp #: modules/visual_script/visual_script_func_nodes.cpp #: modules/visual_script/visual_script_nodes.cpp #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Function" -msgstr "Mga Functions:" +msgstr "Function" #: core/image.cpp core/packed_data_container.cpp #: modules/minimp3/audio_stream_mp3.cpp @@ -211,119 +208,114 @@ msgstr "Mga Functions:" #: scene/resources/concave_polygon_shape.cpp scene/resources/curve.cpp #: scene/resources/polygon_path_finder.cpp scene/resources/texture.cpp msgid "Data" -msgstr "" +msgstr "Data" #: core/io/file_access_network.cpp core/register_core_types.cpp #: editor/editor_settings.cpp main/main.cpp #: modules/gdscript/language_server/gdscript_language_server.cpp #: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h msgid "Network" -msgstr "" +msgstr "Network" #: core/io/file_access_network.cpp -#, fuzzy msgid "Remote FS" -msgstr "Alisin" +msgstr "Remote FS" #: core/io/file_access_network.cpp -#, fuzzy msgid "Page Size" -msgstr "Pahina: " +msgstr "Laki ng Pahina" #: core/io/file_access_network.cpp msgid "Page Read Ahead" -msgstr "" +msgstr "Page Read Ahead" #: core/io/http_client.cpp msgid "Blocking Mode Enabled" -msgstr "" +msgstr "Binuksan ang Pagharang" #: core/io/http_client.cpp -#, fuzzy msgid "Connection" -msgstr "Ikabit" +msgstr "Koneksyon" #: core/io/http_client.cpp msgid "Read Chunk Size" -msgstr "" +msgstr "Laki ng Read Chunk" #: core/io/marshalls.cpp msgid "Object ID" -msgstr "" +msgstr "Object ID" #: core/io/multiplayer_api.cpp core/io/packet_peer.cpp msgid "Allow Object Decoding" -msgstr "" +msgstr "Payagan ang Pag-decode sa Object" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp msgid "Refuse New Network Connections" -msgstr "" +msgstr "Tanggihan ang mga Bagong Koneksyon sa Network" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp msgid "Network Peer" -msgstr "" +msgstr "Network Peer" #: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp msgid "Root Node" -msgstr "" +msgstr "Root Node" #: core/io/networked_multiplayer_peer.cpp -#, fuzzy msgid "Refuse New Connections" -msgstr "Ikabit" +msgstr "Tanggihan ang mga Bagong Koneksyon" #: core/io/networked_multiplayer_peer.cpp msgid "Transfer Mode" -msgstr "" +msgstr "Paglipat" #: core/io/packet_peer.cpp msgid "Encode Buffer Max Size" -msgstr "" +msgstr "Max na Laki ng Encode Buffer" #: core/io/packet_peer.cpp msgid "Input Buffer Max Size" -msgstr "" +msgstr "Max na Laki ng Input Buffer" #: core/io/packet_peer.cpp msgid "Output Buffer Max Size" -msgstr "" +msgstr "Max na Laki ng Output Buffer" #: core/io/packet_peer.cpp msgid "Stream Peer" -msgstr "" +msgstr "Stream Peer" #: core/io/stream_peer.cpp msgid "Big Endian" -msgstr "" +msgstr "Big Endian" #: core/io/stream_peer.cpp msgid "Data Array" -msgstr "" +msgstr "Data Array" #: core/io/stream_peer_ssl.cpp msgid "Blocking Handshake" -msgstr "" +msgstr "Hinaharang ang Handshake" #: core/io/udp_server.cpp msgid "Max Pending Connections" -msgstr "" +msgstr "Max na Nakabinbing Koneksyon" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Invalid type argument to convert(), use TYPE_* constants." msgstr "" -"Invalid na type argument para sa convert(), gamitin ang TYPE_* na constant." +"Invalid na argumento ng type sa convert(), gumamit ng mga TYPE_* constant." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp msgid "Expected a string of length 1 (a character)." -msgstr "Inaasahan ang isang string na may haba na 1 (isang karakter)." +msgstr "Inaasahan ang isang string na may habang 1 (karakter)." #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/mono/glue/gd_glue.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Not enough bytes for decoding bytes, or invalid format." -msgstr "" -"Kulang ang mga byte para sa pagde-decode, o di kaya'y invalid na format." +msgstr "Kulang sa bytes para i-decode ang bytes, o invalid na format." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -335,7 +327,7 @@ msgstr "Di magagamit ang self dahil null ang instance (di pinasa)" #: core/math/expression.cpp msgid "Invalid operands to operator %s, %s and %s." -msgstr "Mga invalid na operand sa operator na %s, %s at %s." +msgstr "Mga invalid na operand sa operator %s, %s, at %s." #: core/math/expression.cpp msgid "Invalid index of type %s for base type %s" @@ -343,11 +335,11 @@ msgstr "Invalid na index ng type na %s para sa base type na %s" #: core/math/expression.cpp msgid "Invalid named index '%s' for base type %s" -msgstr "Invalid na pinangalanang index na '%s' para sa base type na %s" +msgstr "Invalid na napangalanang index na '%s' para sa base type na %s" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" -msgstr "Mga invalid na argument para i-construct ang '%s'" +msgstr "Mga invalid na argumento para i-construct ang '%s'" #: core/math/expression.cpp msgid "On call to '%s':" @@ -356,182 +348,177 @@ msgstr "On call sa '%s':" #: core/math/random_number_generator.cpp #: modules/opensimplex/open_simplex_noise.cpp msgid "Seed" -msgstr "" +msgstr "Seed" #: core/math/random_number_generator.cpp msgid "State" -msgstr "" +msgstr "Estado" #: core/message_queue.cpp msgid "Message Queue" -msgstr "" +msgstr "Pila ng Mensahe" #: core/message_queue.cpp msgid "Max Size (KB)" -msgstr "" +msgstr "Max na Laki (KB)" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: servers/audio_server.cpp msgid "Device" -msgstr "" +msgstr "Device" #: core/os/input_event.cpp msgid "Alt" -msgstr "" +msgstr "Alt" #: core/os/input_event.cpp msgid "Shift" -msgstr "" +msgstr "Shift" #: core/os/input_event.cpp msgid "Control" -msgstr "" +msgstr "Control" #: core/os/input_event.cpp msgid "Meta" -msgstr "" +msgstr "Meta" #: core/os/input_event.cpp -#, fuzzy msgid "Command" -msgstr "Komunidad" +msgstr "Command" #: core/os/input_event.cpp scene/2d/touch_screen_button.cpp #: scene/gui/base_button.cpp scene/gui/texture_button.cpp #: scene/resources/default_theme/default_theme.cpp msgid "Pressed" -msgstr "" +msgstr "Pinindot" #: core/os/input_event.cpp msgid "Scancode" -msgstr "" +msgstr "Scancode" #: core/os/input_event.cpp msgid "Physical Scancode" -msgstr "" +msgstr "Pisikal na Scancode" #: core/os/input_event.cpp msgid "Unicode" -msgstr "" +msgstr "Unicode" #: core/os/input_event.cpp msgid "Echo" -msgstr "" +msgstr "Echo" #: core/os/input_event.cpp scene/gui/base_button.cpp msgid "Button Mask" -msgstr "" +msgstr "Mask ng Button" #: core/os/input_event.cpp scene/2d/node_2d.cpp scene/gui/control.cpp -#, fuzzy msgid "Global Position" -msgstr "Pagulit ng Animation" +msgstr "Global na Posisyon" #: core/os/input_event.cpp msgid "Factor" -msgstr "" +msgstr "Factor" #: core/os/input_event.cpp msgid "Button Index" -msgstr "" +msgstr "Index ng Button" #: core/os/input_event.cpp msgid "Doubleclick" -msgstr "" +msgstr "Dobleng pindot" #: core/os/input_event.cpp msgid "Tilt" -msgstr "" +msgstr "Kiling" #: core/os/input_event.cpp msgid "Pressure" -msgstr "" +msgstr "Presyur" #: core/os/input_event.cpp msgid "Relative" -msgstr "" +msgstr "Relatibo" #: core/os/input_event.cpp scene/2d/camera_2d.cpp scene/2d/cpu_particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/interpolated_camera.cpp #: scene/animation/animation_player.cpp scene/resources/environment.cpp #: scene/resources/particles_material.cpp msgid "Speed" -msgstr "" +msgstr "Bilis" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: scene/3d/sprite_3d.cpp msgid "Axis" -msgstr "" +msgstr "Axis" #: core/os/input_event.cpp -#, fuzzy msgid "Axis Value" -msgstr "Halaga:" +msgstr "Value ng Axis" #: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp msgid "Index" -msgstr "" +msgstr "Index" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: modules/visual_script/visual_script_nodes.cpp #: scene/2d/touch_screen_button.cpp msgid "Action" -msgstr "" +msgstr "Gawain" #: core/os/input_event.cpp scene/resources/environment.cpp #: scene/resources/material.cpp msgid "Strength" -msgstr "" +msgstr "Lakas" #: core/os/input_event.cpp msgid "Delta" -msgstr "" +msgstr "Delta" #: core/os/input_event.cpp -#, fuzzy msgid "Channel" -msgstr "Baguhin" +msgstr "Channel" #: core/os/input_event.cpp main/main.cpp msgid "Message" -msgstr "" +msgstr "Mensahe" #: core/os/input_event.cpp msgid "Pitch" -msgstr "" +msgstr "Tinis" #: core/os/input_event.cpp scene/2d/cpu_particles_2d.cpp #: scene/2d/physics_body_2d.cpp scene/3d/cpu_particles.cpp #: scene/3d/physics_body.cpp scene/resources/particles_material.cpp msgid "Velocity" -msgstr "" +msgstr "Belosidad" #: core/os/input_event.cpp msgid "Instrument" -msgstr "" +msgstr "Instrumento" #: core/os/input_event.cpp msgid "Controller Number" -msgstr "" +msgstr "Bilang ng Controller" #: core/os/input_event.cpp msgid "Controller Value" -msgstr "" +msgstr "Value ng Controller" #: core/project_settings.cpp editor/editor_node.cpp main/main.cpp #: platform/iphone/export/export.cpp platform/osx/export/export.cpp #: platform/windows/export/export.cpp -#, fuzzy msgid "Application" -msgstr "Pagulit ng Animation" +msgstr "Application" #: core/project_settings.cpp main/main.cpp msgid "Config" -msgstr "" +msgstr "Config" #: core/project_settings.cpp msgid "Project Settings Override" -msgstr "" +msgstr "Override sa Pagsasaayos ng Proyekto" #: core/project_settings.cpp core/resource.cpp #: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp @@ -542,7 +529,7 @@ msgstr "" #: platform/osx/export/export.cpp scene/2d/area_2d.cpp scene/3d/area.cpp #: scene/main/node.cpp msgid "Name" -msgstr "" +msgstr "Pangalan" #: core/project_settings.cpp editor/editor_help.cpp #: modules/visual_script/visual_script_nodes.cpp platform/uwp/export/export.cpp @@ -554,132 +541,163 @@ msgstr "Paglalarawan" #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp #: main/main.cpp msgid "Run" -msgstr "" +msgstr "Patakbuhin" #: core/project_settings.cpp editor/editor_node.cpp #: editor/run_settings_dialog.cpp main/main.cpp msgid "Main Scene" -msgstr "" +msgstr "Pangunahing Eksena" #: core/project_settings.cpp msgid "Disable stdout" -msgstr "" +msgstr "Patayin ang stdout" #: core/project_settings.cpp msgid "Disable stderr" -msgstr "" +msgstr "Patayin ang stderr" #: core/project_settings.cpp msgid "Use Hidden Project Data Directory" -msgstr "" +msgstr "Gamitin ang Hidden Project Data Directory" #: core/project_settings.cpp msgid "Use Custom User Dir" -msgstr "" +msgstr "Gamitin ang Sariling User Dir" #: core/project_settings.cpp msgid "Custom User Dir Name" +msgstr "Pangalan ng Sariling User Dir" + +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" msgstr "" #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" -msgstr "" +msgstr "Tunog" #: core/project_settings.cpp msgid "Default Bus Layout" -msgstr "" +msgstr "Default na Bus Layout" #: core/project_settings.cpp editor/editor_export.cpp #: editor/editor_file_system.cpp editor/editor_node.cpp #: editor/editor_settings.cpp editor/script_create_dialog.cpp #: scene/2d/camera_2d.cpp scene/3d/light.cpp scene/main/node.cpp msgid "Editor" -msgstr "" +msgstr "Editor" #: core/project_settings.cpp msgid "Main Run Args" -msgstr "" +msgstr "Pangunahing Args sa Pagtakbo" #: core/project_settings.cpp msgid "Search In File Extensions" -msgstr "" +msgstr "Maghanap sa mga File Extension" #: core/project_settings.cpp msgid "Script Templates Search Path" -msgstr "" +msgstr "Path ng mga Hahanaping Script Template" #: core/project_settings.cpp editor/editor_node.cpp #: editor/plugins/version_control_editor_plugin.cpp msgid "Version Control" -msgstr "" +msgstr "Version Control" #: core/project_settings.cpp msgid "Autoload On Startup" -msgstr "" +msgstr "Kusang i-load sa Simula" #: core/project_settings.cpp msgid "Plugin Name" -msgstr "" +msgstr "Pangalan ng Plugin" #: core/project_settings.cpp scene/2d/collision_object_2d.cpp #: scene/3d/collision_object.cpp scene/gui/control.cpp msgid "Input" -msgstr "" +msgstr "Input" #: core/project_settings.cpp msgid "UI Accept" -msgstr "" +msgstr "UI Tanggapin" #: core/project_settings.cpp -#, fuzzy msgid "UI Select" -msgstr "Burahin ang (mga) Napiling Key" +msgstr "UI Pagpili" #: core/project_settings.cpp msgid "UI Cancel" -msgstr "" +msgstr "UI Ikansela" #: core/project_settings.cpp msgid "UI Focus Next" -msgstr "" +msgstr "UI Ipokus sa Susunod" #: core/project_settings.cpp msgid "UI Focus Prev" -msgstr "" +msgstr "UI Ipokus sa Huli" #: core/project_settings.cpp msgid "UI Left" -msgstr "" +msgstr "UI Kaliwa" #: core/project_settings.cpp msgid "UI Right" -msgstr "" +msgstr "UI Kanan" #: core/project_settings.cpp msgid "UI Up" -msgstr "" +msgstr "UI Taas" #: core/project_settings.cpp msgid "UI Down" -msgstr "" +msgstr "UI Baba" #: core/project_settings.cpp -#, fuzzy msgid "UI Page Up" -msgstr "Pahina: " +msgstr "UI Page Up" #: core/project_settings.cpp msgid "UI Page Down" -msgstr "" +msgstr "UI Page Down" #: core/project_settings.cpp msgid "UI Home" -msgstr "" +msgstr "UI Home" #: core/project_settings.cpp msgid "UI End" -msgstr "" +msgstr "UI End" #: core/project_settings.cpp main/main.cpp modules/bullet/register_types.cpp #: modules/bullet/space_bullet.cpp scene/2d/physics_body_2d.cpp @@ -689,7 +707,7 @@ msgstr "" #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp msgid "Physics" -msgstr "" +msgstr "Pisika" #: core/project_settings.cpp editor/editor_settings.cpp #: editor/import/resource_importer_layered_texture.cpp @@ -699,11 +717,11 @@ msgstr "" #: scene/3d/physics_body.cpp scene/resources/world.cpp #: servers/physics/space_sw.cpp msgid "3D" -msgstr "" +msgstr "3D" #: core/project_settings.cpp msgid "Smooth Trimesh Collision" -msgstr "" +msgstr "Smooth na Banggaan ng Trimesh" #: core/project_settings.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles2/rasterizer_scene_gles2.cpp @@ -715,7 +733,7 @@ msgstr "" #: scene/main/viewport.cpp servers/visual/visual_server_scene.cpp #: servers/visual_server.cpp msgid "Rendering" -msgstr "" +msgstr "Pagre-render" #: core/project_settings.cpp drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_scene_gles3.cpp @@ -725,17 +743,17 @@ msgstr "" #: scene/resources/multimesh.cpp servers/visual/visual_server_scene.cpp #: servers/visual_server.cpp msgid "Quality" -msgstr "" +msgstr "Kalidad" #: core/project_settings.cpp scene/animation/animation_tree.cpp #: scene/gui/file_dialog.cpp scene/main/scene_tree.cpp #: servers/visual_server.cpp msgid "Filters" -msgstr "" +msgstr "Mga Filter" #: core/project_settings.cpp scene/main/viewport.cpp msgid "Sharpen Intensity" -msgstr "" +msgstr "Tindi ng Tulis" #: core/project_settings.cpp editor/editor_export.cpp editor/editor_node.cpp #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp @@ -747,123 +765,122 @@ msgstr "" #: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp #: servers/visual_server.cpp msgid "Debug" -msgstr "" +msgstr "Debug" #: core/project_settings.cpp main/main.cpp modules/gdscript/gdscript.cpp #: modules/visual_script/visual_script.cpp scene/resources/dynamic_font.cpp msgid "Settings" -msgstr "" +msgstr "Pagsasaayos" #: core/project_settings.cpp editor/script_editor_debugger.cpp main/main.cpp #: modules/mono/mono_gd/gd_mono.cpp msgid "Profiler" -msgstr "" +msgstr "Profiler" #: core/project_settings.cpp -#, fuzzy msgid "Max Functions" -msgstr "Mga Functions:" +msgstr "Max na Function" #: core/project_settings.cpp scene/3d/vehicle_body.cpp msgid "Compression" -msgstr "" +msgstr "Compression" #: core/project_settings.cpp msgid "Formats" -msgstr "" +msgstr "Mga Format" #: core/project_settings.cpp msgid "Zstd" -msgstr "" +msgstr "Zstd" #: core/project_settings.cpp msgid "Long Distance Matching" -msgstr "" +msgstr "Pagtugma sa Mahabang Layo" #: core/project_settings.cpp msgid "Compression Level" -msgstr "" +msgstr "Compression Level" #: core/project_settings.cpp msgid "Window Log Size" -msgstr "" +msgstr "Laki ng Log ng Window" #: core/project_settings.cpp msgid "Zlib" -msgstr "" +msgstr "Zlib" #: core/project_settings.cpp msgid "Gzip" -msgstr "" +msgstr "Gzip" #: core/project_settings.cpp platform/android/export/export.cpp msgid "Android" -msgstr "" +msgstr "Android" #: core/project_settings.cpp msgid "Modules" -msgstr "" +msgstr "Mga Module" #: core/register_core_types.cpp msgid "TCP" -msgstr "" +msgstr "TCP" #: core/register_core_types.cpp msgid "Connect Timeout Seconds" -msgstr "" +msgstr "Segundo ng Timeout sa Pagkonekta" #: core/register_core_types.cpp msgid "Packet Peer Stream" -msgstr "" +msgstr "Packet Peer Stream" #: core/register_core_types.cpp msgid "Max Buffer (Power of 2)" -msgstr "" +msgstr "Max na Buffer (Lakas ng 2)" #: core/register_core_types.cpp editor/editor_settings.cpp main/main.cpp msgid "SSL" -msgstr "" +msgstr "SSL" #: core/register_core_types.cpp main/main.cpp msgid "Certificates" -msgstr "" +msgstr "Mga Katibayan" #: core/resource.cpp editor/dependency_editor.cpp #: editor/editor_resource_picker.cpp #: modules/visual_script/visual_script_nodes.cpp msgid "Resource" -msgstr "" +msgstr "Resource" #: core/resource.cpp msgid "Local To Scene" -msgstr "" +msgstr "Lokal sa Eksena" #: core/resource.cpp editor/dependency_editor.cpp #: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp #: editor/project_manager.cpp editor/project_settings_editor.cpp #: modules/visual_script/visual_script_nodes.cpp msgid "Path" -msgstr "" +msgstr "Daan" #: core/script_language.cpp msgid "Source Code" -msgstr "" +msgstr "Source Code" #: core/translation.cpp msgid "Messages" -msgstr "" +msgstr "Mga Mensahe" #: core/translation.cpp editor/project_settings_editor.cpp msgid "Locale" -msgstr "" +msgstr "Lokal" #: core/translation.cpp msgid "Test" -msgstr "" +msgstr "Subok" #: core/translation.cpp scene/resources/font.cpp msgid "Fallback" -msgstr "" +msgstr "Fallback" #: core/ustring.cpp scene/resources/segment_shape_2d.cpp msgid "B" @@ -899,17 +916,17 @@ msgstr "EiB" #: drivers/gles3/rasterizer_scene_gles3.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp modules/gltf/gltf_state.cpp msgid "Buffers" -msgstr "" +msgstr "Mga Buffer" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp msgid "Canvas Polygon Buffer Size (KB)" -msgstr "" +msgstr "Laki ng Buffer ng Canvas Polygon (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp msgid "Canvas Polygon Index Buffer Size (KB)" -msgstr "" +msgstr "Index Buffer ng Canvas Polygon (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp @@ -920,52 +937,52 @@ msgstr "" #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp servers/visual_server.cpp msgid "2D" -msgstr "" +msgstr "2D" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp msgid "Snapping" -msgstr "" +msgstr "Pag-snap" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp msgid "Use GPU Pixel Snap" -msgstr "" +msgstr "Gamitin ang GPU Pixel Snap" #: drivers/gles2/rasterizer_scene_gles2.cpp #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Immediate Buffer Size (KB)" -msgstr "" +msgstr "Agad na Laki ng Buffer (KB)" #: drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp msgid "Lightmapping" -msgstr "" +msgstr "Pagla-lightmap" #: drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp msgid "Use Bicubic Sampling" -msgstr "" +msgstr "Gamitin ang Pag-sample na Bicubic" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Max Renderable Elements" -msgstr "" +msgstr "Max na Mare-render na Elemento" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Max Renderable Lights" -msgstr "" +msgstr "Max na Mare-render na Ilaw" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Max Renderable Reflections" -msgstr "" +msgstr "Max na Mare-render na Repleksyon" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Max Lights Per Object" -msgstr "" +msgstr "Max na Ilaw Kada Object" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Subsurface Scattering" -msgstr "" +msgstr "Subsurface Scattering" #: drivers/gles3/rasterizer_scene_gles3.cpp #: editor/import/resource_importer_texture.cpp @@ -977,27 +994,27 @@ msgstr "" #: scene/main/canvas_layer.cpp scene/resources/environment.cpp #: scene/resources/material.cpp scene/resources/particles_material.cpp msgid "Scale" -msgstr "" +msgstr "Iskala" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Follow Surface" -msgstr "" +msgstr "Sundan ang Surface" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Weight Samples" -msgstr "" +msgstr "Mga Sample sa Bigat" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Voxel Cone Tracing" -msgstr "" +msgstr "Pagte-trace sa Voxel Cone" #: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp msgid "High Quality" -msgstr "" +msgstr "Mataas na Kalidad" #: drivers/gles3/rasterizer_storage_gles3.cpp msgid "Blend Shape Max Buffer Size (KB)" -msgstr "" +msgstr "Max na Laki ng Buffer ng Blend Shape (KB)" #: editor/animation_bezier_editor.cpp msgid "Free" @@ -1017,7 +1034,7 @@ msgstr "Oras:" #: editor/animation_bezier_editor.cpp msgid "Value:" -msgstr "Halaga:" +msgstr "Value:" #: editor/animation_bezier_editor.cpp msgid "Insert Key Here" @@ -1041,60 +1058,60 @@ msgstr "Maglipat ng (mga) Bezier Point" #: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp msgid "Anim Duplicate Keys" -msgstr "I-animate ang mga Dinobleng Key" +msgstr "Anim Duplicate Keys" #: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp msgid "Anim Delete Keys" -msgstr "I-animate ang mga Binurang Key" +msgstr "Anim Delete Keys" #: editor/animation_track_editor.cpp msgid "Anim Change Keyframe Time" -msgstr "I-animate ang Pagbago sa Oras ng Keyframe" +msgstr "Anim Change Keyframe Time" #: editor/animation_track_editor.cpp msgid "Anim Change Transition" -msgstr "I-animate ang Pagbago sa Transition" +msgstr "Anim Change Transition" #: editor/animation_track_editor.cpp msgid "Anim Change Transform" -msgstr "I-animate ang Pagbago sa Transform" +msgstr "Anim Change Transform" #: editor/animation_track_editor.cpp msgid "Anim Change Keyframe Value" -msgstr "I-animate ang Pagbago sa Halaga ng Keyframe" +msgstr "Anim Change Keyframe Value" #: editor/animation_track_editor.cpp msgid "Anim Change Call" -msgstr "Pagbago ng Pagtawag sa Animation" +msgstr "Anim Change Call" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Keyframe Time" -msgstr "Pagbago ng Time ng Maraming Keyframe ng Animation" +msgstr "Anim Multi Change Keyframe Time" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Transition" -msgstr "Pagbago ng Maraming Transition ng Animation" +msgstr "Anim Multi Change Transition" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Transform" -msgstr "Pagbago ng Maraming Transform ng Animation" +msgstr "Anim Multi Change Transform" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Keyframe Value" -msgstr "Pagbago ng Nilalaman ng Maraming Keyframe ng Animation" +msgstr "Anim Multi Change Keyframe Value" #: editor/animation_track_editor.cpp msgid "Anim Multi Change Call" -msgstr "Pagbago ng Maraming Pagtawag ng Animation" +msgstr "Anim Multi Change Call" #: editor/animation_track_editor.cpp msgid "Change Animation Length" -msgstr "Pagbago ng Haba ng Animation" +msgstr "Baguhin ang Haba ng Animation" #: editor/animation_track_editor.cpp #: editor/plugins/sprite_frames_editor_plugin.cpp msgid "Change Animation Loop" -msgstr "Pagbago ng Animation Loop" +msgstr "Baguhin ang Animation Loop" #: editor/animation_track_editor.cpp msgid "Property Track" @@ -1106,19 +1123,19 @@ msgstr "3D Transform Track" #: editor/animation_track_editor.cpp msgid "Call Method Track" -msgstr "" +msgstr "Call Method Track" #: editor/animation_track_editor.cpp msgid "Bezier Curve Track" -msgstr "" +msgstr "Bezier Curve Track" #: editor/animation_track_editor.cpp msgid "Audio Playback Track" -msgstr "" +msgstr "Audio Playback Track" #: editor/animation_track_editor.cpp msgid "Animation Playback Track" -msgstr "" +msgstr "Animation Playback Track" #: editor/animation_track_editor.cpp msgid "Animation length (frames)" @@ -1134,40 +1151,40 @@ msgstr "Magdagdag ng Track" #: editor/animation_track_editor.cpp msgid "Animation Looping" -msgstr "Pagulit ng Animation" +msgstr "Pag-loop sa Animation" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Functions:" -msgstr "Mga Functions:" +msgstr "Mga Function:" #: editor/animation_track_editor.cpp msgid "Audio Clips:" -msgstr "Mga clip ng tunog:" +msgstr "Mga Audio Clip:" #: editor/animation_track_editor.cpp msgid "Anim Clips:" -msgstr "Mga clip ng Anim:" +msgstr "Mga Anim Clip:" #: editor/animation_track_editor.cpp msgid "Change Track Path" -msgstr "Ibahin ang landas ng Track" +msgstr "Baguhin ang Track Path" #: editor/animation_track_editor.cpp msgid "Toggle this track on/off." -msgstr "Ilipat sa on/off ang track na ito." +msgstr "Buksan/isara ang track na ito." #: editor/animation_track_editor.cpp msgid "Update Mode (How this property is set)" -msgstr "Baguhin ang Mode (Kung paano na-set ang property)" +msgstr "Update Mode (kung paano itinatakda ang property na ito)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" -msgstr "" +msgstr "Interpolation Mode" #: editor/animation_track_editor.cpp msgid "Loop Wrap Mode (Interpolate end with beginning on loop)" -msgstr "" +msgstr "Loop Wrap Mode (ini-interpolate ang dulo sa simula ng loop)" #: editor/animation_track_editor.cpp msgid "Remove this track." @@ -1175,11 +1192,11 @@ msgstr "Tanggalin ang track na ito." #: editor/animation_track_editor.cpp msgid "Time (s): " -msgstr "Oras (s): " +msgstr "Oras (seg): " #: editor/animation_track_editor.cpp msgid "Toggle Track Enabled" -msgstr "" +msgstr "Nakabukas ang Toggle Track" #: editor/animation_track_editor.cpp msgid "Continuous" @@ -1187,15 +1204,15 @@ msgstr "Tuloy-tuloy" #: editor/animation_track_editor.cpp msgid "Discrete" -msgstr "" +msgstr "Diskreto" #: editor/animation_track_editor.cpp msgid "Trigger" -msgstr "" +msgstr "Trigger" #: editor/animation_track_editor.cpp scene/3d/baked_lightmap.cpp msgid "Capture" -msgstr "" +msgstr "I-capture" #: editor/animation_track_editor.cpp msgid "Nearest" @@ -1205,52 +1222,52 @@ msgstr "Pinakamalapit" #: editor/property_editor.cpp scene/2d/physics_body_2d.cpp #: scene/3d/physics_body.cpp msgid "Linear" -msgstr "" +msgstr "Linear" #: editor/animation_track_editor.cpp msgid "Cubic" -msgstr "" +msgstr "Cubic" #: editor/animation_track_editor.cpp msgid "Clamp Loop Interp" -msgstr "" +msgstr "Clamp Loop Interp" #: editor/animation_track_editor.cpp msgid "Wrap Loop Interp" -msgstr "" +msgstr "Wrap Loop Interp" #: editor/animation_track_editor.cpp #: editor/plugins/canvas_item_editor_plugin.cpp msgid "Insert Key" -msgstr "Magpasok Ang Key" +msgstr "Magpasok ng Key" #: editor/animation_track_editor.cpp msgid "Duplicate Key(s)" -msgstr "Kopyahin Ang (Mga) Key(s)" +msgstr "Doblehin ang (mga) Key" #: editor/animation_track_editor.cpp msgid "Add RESET Value(s)" -msgstr "" +msgstr "Magdagdag ng (mga) RESET value" #: editor/animation_track_editor.cpp msgid "Delete Key(s)" -msgstr "Tanggalin Ang (Mga) Key(s)" +msgstr "Burahin ang (mga) Key" #: editor/animation_track_editor.cpp msgid "Change Animation Update Mode" -msgstr "" +msgstr "Baguhin ang Animation Update Mode" #: editor/animation_track_editor.cpp msgid "Change Animation Interpolation Mode" -msgstr "" +msgstr "Baguhin ang Animation Interpolation Mode" #: editor/animation_track_editor.cpp msgid "Change Animation Loop Mode" -msgstr "" +msgstr "Baguhin ang Animation Loop Mode" #: editor/animation_track_editor.cpp msgid "Remove Anim Track" -msgstr "" +msgstr "Tanggalin ang Anim Track" #: editor/animation_track_editor.cpp editor/editor_settings.cpp #: editor/plugins/path_editor_plugin.cpp @@ -1259,9 +1276,8 @@ msgstr "" #: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp #: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Editors" -msgstr "I-edit" +msgstr "Mga Editor" #: editor/animation_track_editor.cpp editor/editor_settings.cpp #: editor/import/resource_importer_scene.cpp @@ -1271,7 +1287,7 @@ msgstr "I-edit" #: scene/animation/animation_blend_tree.cpp #: scene/resources/particles_material.cpp msgid "Animation" -msgstr "" +msgstr "Animation" #: editor/animation_track_editor.cpp editor/editor_settings.cpp msgid "Confirm Insert Track" @@ -1413,7 +1429,7 @@ msgstr "" #: editor/animation_track_editor.cpp editor/editor_help.cpp msgid "Methods" -msgstr "" +msgstr "Mga Method" #: editor/animation_track_editor.cpp msgid "Bezier" @@ -1865,7 +1881,7 @@ msgstr "" #: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp msgid "Signals" -msgstr "" +msgstr "Mga Signal" #: editor/connections_dialog.cpp msgid "Filter signals" @@ -3094,7 +3110,7 @@ msgstr "" #: editor/editor_help.cpp editor/scene_tree_editor.cpp #: editor/script_create_dialog.cpp msgid "Inherits:" -msgstr "" +msgstr "Minamana ang:" #: editor/editor_help.cpp msgid "Inherited by:" @@ -3106,7 +3122,7 @@ msgstr "" #: editor/editor_help.cpp msgid "Properties" -msgstr "" +msgstr "Mga Property" #: editor/editor_help.cpp msgid "overrides %s:" @@ -3118,7 +3134,7 @@ msgstr "" #: editor/editor_help.cpp msgid "Theme Properties" -msgstr "" +msgstr "Mga Property ng Tema" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp @@ -3128,7 +3144,7 @@ msgstr "" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constants" -msgstr "" +msgstr "Mga Constant" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp msgid "Fonts" @@ -3145,11 +3161,11 @@ msgstr "" #: editor/editor_help.cpp msgid "Enumerations" -msgstr "" +msgstr "Mga Enumeration" #: editor/editor_help.cpp msgid "Property Descriptions" -msgstr "" +msgstr "Mga Paglalarawan sa Property" #: editor/editor_help.cpp #, fuzzy @@ -3164,7 +3180,7 @@ msgstr "" #: editor/editor_help.cpp msgid "Method Descriptions" -msgstr "" +msgstr "Mga Paglalarawan sa Method" #: editor/editor_help.cpp msgid "" @@ -3855,7 +3871,7 @@ msgstr "" #: editor/editor_node.cpp editor/import_dock.cpp #: editor/script_create_dialog.cpp msgid "Default" -msgstr "" +msgstr "Default" #: editor/editor_node.cpp editor/editor_resource_picker.cpp #: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp @@ -5760,6 +5776,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15297,38 +15317,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19370,6 +19358,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20991,7 +20984,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22987,6 +22980,11 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolation Mode" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23015,10 +23013,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23640,6 +23634,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Pagulit ng Animation" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Mga Functions:" @@ -24358,6 +24357,11 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "Data" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/fr.po b/editor/translations/fr.po index a06fe62bc4..8a5afd2499 100644 --- a/editor/translations/fr.po +++ b/editor/translations/fr.po @@ -94,13 +94,15 @@ # Maxim Lopez <maxim.lopez.02@gmail.com>, 2022. # Simon Trahan <xxmoby@gmail.com>, 2022. # Maxime Rigout <max.rigout@gmail.com>, 2022. +# Zachary Dionne <zachary.dionne.01@gmail.com>, 2022. +# Fares Setbel <fares.setbels@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-28 11:11+0000\n" -"Last-Translator: Maxime Rigout <max.rigout@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:38+0000\n" +"Last-Translator: Fares Setbel <fares.setbels@gmail.com>\n" "Language-Team: French <https://hosted.weblate.org/projects/godot-engine/" "godot/fr/>\n" "Language: fr\n" @@ -108,11 +110,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp +#, fuzzy msgid "Tablet Driver" -msgstr "Pilote Tablette" +msgstr "Pilote De Tablette" #: core/bind/core_bind.cpp msgid "Clipboard" @@ -135,12 +138,14 @@ msgid "V-Sync Via Compositor" msgstr "V-Sync via le compositeur" #: core/bind/core_bind.cpp main/main.cpp +#, fuzzy msgid "Delta Smoothing" -msgstr "Lissage Delta" +msgstr "Lissage de Delta" #: core/bind/core_bind.cpp +#, fuzzy msgid "Low Processor Usage Mode" -msgstr "Mode d'Utilisation Faible du Processeur" +msgstr "Mode d'utilisation du processeur bas en ressources" #: core/bind/core_bind.cpp msgid "Low Processor Usage Mode Sleep (µsec)" @@ -148,7 +153,7 @@ msgstr "Mode d'Utilisation Faible du Processeur (µs)" #: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp msgid "Keep Screen On" -msgstr "Garder l'Écran Allumé" +msgstr "Garder l'écran actif" #: core/bind/core_bind.cpp msgid "Min Window Size" @@ -162,11 +167,12 @@ msgstr "Taille Maximale de la Fenêtre" msgid "Screen Orientation" msgstr "Orientation de l'Écran" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Fenêtre" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Sans Bordure" @@ -174,7 +180,7 @@ msgstr "Sans Bordure" msgid "Per Pixel Transparency Enabled" msgstr "Transparence Par Pixel Activé" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Plein Écran" @@ -186,7 +192,7 @@ msgstr "Maximisé" msgid "Minimized" msgstr "Minimisé" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Redimensionnable" @@ -199,10 +205,11 @@ msgstr "Redimensionnable" msgid "Position" msgstr "Position" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -212,16 +219,15 @@ msgstr "Taille" #: core/bind/core_bind.cpp msgid "Endian Swap" -msgstr "" +msgstr "Échange d'Endians" #: core/bind/core_bind.cpp -#, fuzzy msgid "Editor Hint" -msgstr "Éditeur" +msgstr "Conseil(s) Éditeur" #: core/bind/core_bind.cpp msgid "Print Error Messages" -msgstr "Imprimer les messages d'erreur" +msgstr "Afficher les messages d'erreur" #: core/bind/core_bind.cpp msgid "Iterations Per Second" @@ -229,26 +235,24 @@ msgstr "Itérations Par Seconde" #: core/bind/core_bind.cpp msgid "Target FPS" -msgstr "FPS cible" +msgstr "Cible de FPS" #: core/bind/core_bind.cpp -#, fuzzy msgid "Time Scale" -msgstr "NÅ“ud TimeScale" +msgstr "Echelle de temps" #: core/bind/core_bind.cpp main/main.cpp #, fuzzy msgid "Physics Jitter Fix" -msgstr "Image physique %" +msgstr "Correction de la physique gigue" #: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "Erreur" #: core/bind/core_bind.cpp -#, fuzzy msgid "Error String" -msgstr "Erreur d'enregistrement" +msgstr "Chaîne d'erreurs" #: core/bind/core_bind.cpp msgid "Error Line" @@ -664,6 +668,43 @@ msgstr "Utiliser un Répertoire Utilisateur Personnalisé" msgid "Custom User Dir Name" msgstr "Nom du Répertoire Utilisateur Personnalisé" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Tout afficher" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Lumière" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Étendu à Gauche" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "En période de test" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1259,7 +1300,7 @@ msgstr "Activer/désactiver cette piste." msgid "Update Mode (How this property is set)" msgstr "Mode de mise à jour (comment cette propriété est définie)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Mode d’interpolation" @@ -2992,7 +3033,7 @@ msgstr "Rendre actuel" #: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp #: modules/fbx/editor_scene_importer_fbx.cpp msgid "Import" -msgstr "Importation" +msgstr "Importer" #: editor/editor_feature_profile.cpp editor/project_export.cpp #: platform/android/export/export.cpp platform/javascript/export/export.cpp @@ -6171,6 +6212,11 @@ msgstr "" msgid "Flat" msgstr "Plat" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Mode collision" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Sélectionner les nÅ“uds à importer" @@ -16187,42 +16233,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Tout afficher" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Lumière" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Étendu à Gauche" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "En période de test" - #: main/main.cpp msgid "DPI" msgstr "" @@ -16310,7 +16320,7 @@ msgstr "" #: scene/gui/scroll_container.cpp scene/gui/text_edit.cpp scene/gui/tree.cpp #: scene/main/viewport.cpp scene/register_scene_types.cpp msgid "GUI" -msgstr "" +msgstr "GUI" #: main/main.cpp msgid "Drop Mouse On GUI Input Disabled" @@ -20621,6 +20631,11 @@ msgstr "" "Polygone non valide. Il doit y avoir au moins 2 points en mode de " "construction 'Segments'." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22475,9 +22490,10 @@ msgid "NavMesh" msgstr "Calculer le NavMesh" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "Un NavigationObstacle ne peut éviter les collisions qu'avec les nÅ“uds " "Spatial." @@ -24750,6 +24766,11 @@ msgstr "Mode navigation" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Mode d’interpolation" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Afficher sans ombrage" @@ -24781,11 +24802,6 @@ msgstr "Multijoueur Personnalisé" msgid "Process Priority" msgstr "Activer la priorité" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Mode d’interpolation" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25494,6 +25510,11 @@ msgstr "Séparateur nommé" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Opérateur de couleur." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Renommer l'item de couleur" @@ -26286,6 +26307,11 @@ msgid "Distance Field" msgstr "Mode Sans Distraction" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "Profondeur" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "Décalages" diff --git a/editor/translations/ga.po b/editor/translations/ga.po index 57c8cf258a..1e786ca3e4 100644 --- a/editor/translations/ga.po +++ b/editor/translations/ga.po @@ -70,11 +70,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -82,7 +83,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -94,7 +95,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -108,10 +109,11 @@ msgstr "" msgid "Position" msgstr "Cruthaigh" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -572,6 +574,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1155,7 +1190,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5732,6 +5767,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15248,38 +15287,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19313,6 +19320,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20938,7 +20950,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22939,6 +22951,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22968,10 +22984,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23602,6 +23614,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Cuntas:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Cruthaigh" @@ -24339,6 +24356,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/gl.po b/editor/translations/gl.po index 66bf39e903..ff0aa989bd 100644 --- a/editor/translations/gl.po +++ b/editor/translations/gl.po @@ -79,12 +79,13 @@ msgstr "Tamaño: " msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Nova Xanela" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -92,7 +93,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Act./Desact. Pantalla Completa" @@ -106,7 +107,7 @@ msgstr "" msgid "Minimized" msgstr "Inicializar" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -120,10 +121,11 @@ msgstr "" msgid "Position" msgstr "Posición do Panel" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -617,6 +619,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Amosar Todo" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Esquerdo Alto" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Probas" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1221,7 +1259,7 @@ msgstr "Act./Desact. esta pista." msgid "Update Mode (How this property is set)" msgstr "Modo de Actualización (cómo se establece esta propiedade)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Modo de Interpolación" @@ -6127,6 +6165,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Colisión" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Selecciona o(s) Nodo(s) a Importar" @@ -16038,41 +16081,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Amosar Todo" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Esquerdo Alto" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Probas" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20402,6 +20410,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22183,7 +22196,7 @@ msgstr "Malla" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24402,6 +24415,11 @@ msgstr "Modo Escalado" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Modo de Interpolación" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Mostrar Sen Sombreado" @@ -24435,11 +24453,6 @@ msgstr "Establecer Varios:" msgid "Process Priority" msgstr "Prioridade" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Modo de Interpolación" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25132,6 +25145,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Escalar (Razón):" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Renomear Nodo" @@ -25928,6 +25946,11 @@ msgstr "Modo Sen Distraccións" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Profundidad" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Offset:" diff --git a/editor/translations/he.po b/editor/translations/he.po index fb0f42e7dd..09ec6b6032 100644 --- a/editor/translations/he.po +++ b/editor/translations/he.po @@ -98,12 +98,13 @@ msgstr "מבט קדמי" msgid "Screen Orientation" msgstr "פתיחת התיעוד" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "חלון חדש" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -111,7 +112,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "הפעלת/ביטול מסך מל×" @@ -125,7 +126,7 @@ msgstr "" msgid "Minimized" msgstr "הגדלת ×ות ר××©×•× ×”" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -139,10 +140,11 @@ msgstr "" msgid "Position" msgstr "×ž×™×§×•× ×”×¤× ×œ" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -638,6 +640,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "הצג הכל" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "ימין" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "מבט שמ×לי" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "בבדיקה" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1242,7 +1281,7 @@ msgstr "הפעלת/כיבוי רצועה זו." msgid "Update Mode (How this property is set)" msgstr "עדכן מצב (×יך המ×פיין ×”×–×” × ×§×‘×¢)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "מצב ××™× ×˜×¨×¤×•×œ×¦×™×”" @@ -6079,6 +6118,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "עריכת מצולע" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "× × ×œ×‘×—×•×¨ ×ž×¤×¨×§×™× ×œ×™×™×¦×•×" @@ -16195,42 +16239,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "הצג הכל" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "ימין" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "מבט שמ×לי" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "בבדיקה" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20593,6 +20601,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22393,7 +22406,7 @@ msgstr "×פיית NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24625,6 +24638,11 @@ msgstr "מצב ×©×™× ×•×™ ×§× ×” מידה (R)" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "מצב ××™× ×˜×¨×¤×•×œ×¦×™×”" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "הצג הכל" @@ -24658,11 +24676,6 @@ msgstr "קביעה מרובה:" msgid "Process Priority" msgstr "×™×™×¦×•× ×ž×™×–×" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "מצב ××™× ×˜×¨×¤×•×œ×¦×™×”" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25356,6 +25369,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "×ž×•× ×™×:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "×©×™× ×•×™ ×©× ×ž×¤×¨×§" @@ -26154,6 +26172,11 @@ msgstr "מצב ×œ×œ× ×”×¡×—×•×ª דעת" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "עומק" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "היסט רשת:" diff --git a/editor/translations/hi.po b/editor/translations/hi.po index a64e5ac8b1..b90ffb435d 100644 --- a/editor/translations/hi.po +++ b/editor/translations/hi.po @@ -88,12 +88,13 @@ msgstr "आकार: " msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "नया विंडो" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -101,7 +102,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "पूरà¥à¤£à¤¸à¥à¤•à¥à¤°à¥€à¤¨ चालू करें" @@ -114,7 +115,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -128,10 +129,11 @@ msgstr "" msgid "Position" msgstr "डॉक पोजीशन" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -611,6 +613,40 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "सब दिखाइà¤" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1207,7 +1243,7 @@ msgstr "इस टà¥à¤°à¥ˆà¤• को ऑन/ऑफ पर टॉगल करॠmsgid "Update Mode (How this property is set)" msgstr "अपडेट मोड (यह संपतà¥à¤¤à¤¿ कैसे सेट की जाती है)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "इंटरपोलेशन मोड" @@ -6052,6 +6088,11 @@ msgstr "पूरà¥à¤£à¤¾à¤‚क के लिठCtrl दबाठरखें msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "आयात करने के लिठनोड (à¤à¤¸) का चयन करें" @@ -15883,39 +15924,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "सब दिखाइà¤" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20164,6 +20172,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -21865,7 +21878,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24003,6 +24016,11 @@ msgstr "दृशà¥à¤¯ रोकें" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "इंटरपोलेशन मोड" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "सब दिखाइà¤" @@ -24036,11 +24054,6 @@ msgstr "अनेक सेट करे:" msgid "Process Priority" msgstr "मोड टॉगल कीजिये" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "इंटरपोलेशन मोड" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -24713,6 +24726,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "संसà¥à¤•रण:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "आइटम निकालें" @@ -25498,6 +25516,10 @@ msgid "Distance Field" msgstr "वà¥à¤¯à¤¾à¤•à¥à¤²à¤¤à¤¾ मà¥à¤•à¥à¤¤ मोड" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/hr.po b/editor/translations/hr.po index 1efde7cc57..d9aaa4d5f9 100644 --- a/editor/translations/hr.po +++ b/editor/translations/hr.po @@ -77,11 +77,12 @@ msgstr "Glavna skripta:" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -89,7 +90,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -101,7 +102,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -115,10 +116,11 @@ msgstr "" msgid "Position" msgstr "Stvori" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -588,6 +590,40 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Lijevo Å iroko" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1174,7 +1210,7 @@ msgstr "Upali/ugasi ovu stazu." msgid "Update Mode (How this property is set)" msgstr "NaÄin ažuriranja (kako se ovo svojstvo postavlja)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "NaÄin Interpolacije" @@ -5851,6 +5887,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "NaÄin Interpolacije" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15480,39 +15521,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Lijevo Å iroko" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19654,6 +19662,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21320,7 +21333,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23405,6 +23418,11 @@ msgid "Pause Mode" msgstr "NaÄin reprodukcije:" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "NaÄin Interpolacije" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23435,11 +23453,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "NaÄin Interpolacije" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -24096,6 +24109,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Opis:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Preimenuj Autoload" @@ -24866,6 +24884,11 @@ msgid "Distance Field" msgstr "Instaliraj" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "Dubina" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/hu.po b/editor/translations/hu.po index bb69c65e4e..3718ec5db6 100644 --- a/editor/translations/hu.po +++ b/editor/translations/hu.po @@ -98,12 +98,13 @@ msgstr "Körvonal Mérete:" msgid "Screen Orientation" msgstr "Dokumentáció megnyitása" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Új ablak" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -111,7 +112,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Teljes KépernyÅ‘" @@ -125,7 +126,7 @@ msgstr "" msgid "Minimized" msgstr "Inicializálás" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -139,10 +140,11 @@ msgstr "" msgid "Position" msgstr "Dokk PozÃció" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -639,6 +641,41 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Az összes megjelenÃtése" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Tesztelés" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1246,7 +1283,7 @@ msgstr "Jelen sáv ki/be kapcsolása." msgid "Update Mode (How this property is set)" msgstr "FrissÃtés Módja (Hogyan van ez a tulajdonság beállÃtva)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolálás Módja" @@ -6153,6 +6190,11 @@ msgstr "" msgid "Flat" msgstr "Lapos 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Ütközési mód" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Válassza ki az importálandó Node-okat" @@ -15988,40 +16030,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Az összes megjelenÃtése" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Tesztelés" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20351,6 +20359,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22105,7 +22118,7 @@ msgstr "Mesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24305,6 +24318,11 @@ msgstr "Pásztázás Mód" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolálás Módja" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Az összes megjelenÃtése" @@ -24338,11 +24356,6 @@ msgstr "Többszörös beállÃtása:" msgid "Process Priority" msgstr "Prioritás Engedélyezése" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolálás Módja" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25038,6 +25051,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Felsorolások:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Elem eltávolÃtása" @@ -25836,6 +25854,11 @@ msgstr "Zavarmentes Mód" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Mélység" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Rács Eltolás:" diff --git a/editor/translations/id.po b/editor/translations/id.po index c9c98b1a7e..7082c3bf57 100644 --- a/editor/translations/id.po +++ b/editor/translations/id.po @@ -32,7 +32,7 @@ # Reza Almanda <rezaalmanda27@gmail.com>, 2021, 2022. # Naufal Adriansyah <naufaladrn90@gmail.com>, 2021. # undisputedgoose <diablodvorak@gmail.com>, 2021. -# Tsaqib Fadhlurrahman Soka <sokatsaqib@gmail.com>, 2021. +# Tsaqib Fadhlurrahman Soka <sokatsaqib@gmail.com>, 2021, 2022. # Hilman Hazazi <hafizd.muhammad.kren.403@gmail.com>, 2021. # Brian <brian@brianthe.dev>, 2021. # Helmi Hibatullah <helmihibatullah393@gmail.com>, 2022. @@ -44,8 +44,8 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:02+0000\n" -"Last-Translator: ProgrammerIndonesia 44 <elo.jhy@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:38+0000\n" +"Last-Translator: Tsaqib Fadhlurrahman Soka <sokatsaqib@gmail.com>\n" "Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/" "godot/id/>\n" "Language: id\n" @@ -53,11 +53,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" -msgstr "Driver Tablet" +msgstr "Tablet Driver" #: core/bind/core_bind.cpp msgid "Clipboard" @@ -97,7 +97,7 @@ msgstr "Biarkan Layar Menyala" #: core/bind/core_bind.cpp msgid "Min Window Size" -msgstr "Ukuran Jendela Minimum" +msgstr "Ukuran Jendela Minim" #: core/bind/core_bind.cpp msgid "Max Window Size" @@ -107,11 +107,12 @@ msgstr "Ukuran Jendela Maks" msgid "Screen Orientation" msgstr "Orientasi Layar" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Jendela" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Tanpa batas" @@ -119,9 +120,9 @@ msgstr "Tanpa batas" msgid "Per Pixel Transparency Enabled" msgstr "Aktifkan Transparansi Per Piksel" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" -msgstr "Layar penuh" +msgstr "Fullscreen" #: core/bind/core_bind.cpp msgid "Maximized" @@ -131,7 +132,7 @@ msgstr "Dimaksimalkan" msgid "Minimized" msgstr "Diminimalkan" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Dapat diubah ukurannya" @@ -144,10 +145,11 @@ msgstr "Dapat diubah ukurannya" msgid "Position" msgstr "Posisi" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -173,7 +175,7 @@ msgstr "Pengulangan Per Detik" #: core/bind/core_bind.cpp msgid "Target FPS" -msgstr "FPS Sasaran" +msgstr "Target FPS" #: core/bind/core_bind.cpp msgid "Time Scale" @@ -185,7 +187,7 @@ msgstr "Perbaikan Fisika Jitter" #: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Error" -msgstr "Galat" +msgstr "Error" #: core/bind/core_bind.cpp msgid "Error String" @@ -193,7 +195,7 @@ msgstr "String Error" #: core/bind/core_bind.cpp msgid "Error Line" -msgstr "Baris Galat" +msgstr "Baris Error" #: core/bind/core_bind.cpp msgid "Result" @@ -257,7 +259,7 @@ msgstr "Ukuran Halaman" #: core/io/file_access_network.cpp msgid "Page Read Ahead" -msgstr "" +msgstr "Halaman Baca Terlebih Dahulu" #: core/io/http_client.cpp msgid "Blocking Mode Enabled" @@ -344,7 +346,7 @@ msgstr "String dengan panjang 1 (karakter) diharapkan." #: modules/mono/glue/gd_glue.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp msgid "Not enough bytes for decoding bytes, or invalid format." -msgstr "Tidak cukup bita untuk mendekode bita, atau format tidak valid." +msgstr "Tidak cukup byte untuk decoding byte, atau format tidak valid." #: core/math/expression.cpp msgid "Invalid input %i (not passed) in expression" @@ -365,7 +367,7 @@ msgstr "Index tidak valid dari tipe %s untuk tipe dasar %s" #: core/math/expression.cpp msgid "Invalid named index '%s' for base type %s" -msgstr "index bernama '%s' untuk tipe dasar %s tidak sah" +msgstr "Indeks bernama '%s' tidak valid untuk tipe dasar %s" #: core/math/expression.cpp msgid "Invalid arguments to construct '%s'" @@ -433,7 +435,7 @@ msgstr "Kode Pindaian Fisik" #: core/os/input_event.cpp msgid "Unicode" -msgstr "Unikode" +msgstr "Unicode" #: core/os/input_event.cpp msgid "Echo" @@ -508,7 +510,7 @@ msgstr "Delta" #: core/os/input_event.cpp msgid "Channel" -msgstr "Kanal" +msgstr "Channel" #: core/os/input_event.cpp main/main.cpp msgid "Message" @@ -548,7 +550,7 @@ msgstr "Konfigurasi" #: core/project_settings.cpp msgid "Project Settings Override" -msgstr "Penimpaan Setelan Proyek" +msgstr "Penggantian Pengaturan Proyek" #: core/project_settings.cpp core/resource.cpp #: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp @@ -595,9 +597,44 @@ msgid "Use Custom User Dir" msgstr "Gunakan Direktori Pengguna Kustom" #: core/project_settings.cpp -#, fuzzy msgid "Custom User Dir Name" -msgstr "Nama Direktori Pengguna Kustom" +msgstr "Nama Dir Pengguna Kustom" + +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "Tampilan" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "Lebar" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "Tinggi" + +#: core/project_settings.cpp +#, fuzzy +msgid "Always On Top" +msgstr "Selalu Di Depan" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Kiri Lebar" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Menguji" #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp @@ -605,9 +642,8 @@ msgid "Audio" msgstr "Suara" #: core/project_settings.cpp -#, fuzzy msgid "Default Bus Layout" -msgstr "Muat default Layout Bus." +msgstr "Tata Letak Bus Default" #: core/project_settings.cpp editor/editor_export.cpp #: editor/editor_file_system.cpp editor/editor_node.cpp @@ -617,9 +653,8 @@ msgid "Editor" msgstr "Editor" #: core/project_settings.cpp -#, fuzzy msgid "Main Run Args" -msgstr "Argumen Skena Utama:" +msgstr "Jalan Utama Argumen" #: core/project_settings.cpp msgid "Search In File Extensions" @@ -627,7 +662,7 @@ msgstr "Cari dalam Ekstensi File" #: core/project_settings.cpp msgid "Script Templates Search Path" -msgstr "" +msgstr "Jalur Pencarian Template Skrip" #: core/project_settings.cpp editor/editor_node.cpp #: editor/plugins/version_control_editor_plugin.cpp @@ -874,7 +909,7 @@ msgstr "Pesan" #: core/translation.cpp editor/project_settings_editor.cpp msgid "Locale" -msgstr "Pelokalan" +msgstr "Lokal" #: core/translation.cpp msgid "Test" @@ -1182,7 +1217,7 @@ msgstr "Alihkan track ini ke nyala/mati." msgid "Update Mode (How this property is set)" msgstr "Mode Pembaruan (Bagaimana properti ini akan di terapkan)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Mode Interpolasi" @@ -1440,7 +1475,7 @@ msgstr "Transformasi" #: editor/animation_track_editor.cpp editor/editor_help.cpp msgid "Methods" -msgstr "Metode" +msgstr "Method" #: editor/animation_track_editor.cpp msgid "Bezier" @@ -1535,7 +1570,7 @@ msgstr "FPS" #: editor/project_settings_editor.cpp editor/property_editor.cpp #: modules/visual_script/visual_script_editor.cpp msgid "Edit" -msgstr "Sunting" +msgstr "Edit" #: editor/animation_track_editor.cpp msgid "Animation properties." @@ -1922,7 +1957,7 @@ msgstr "Putuskan Semuanya" #: editor/connections_dialog.cpp msgid "Edit..." -msgstr "sunting..." +msgstr "Edit..." #: editor/connections_dialog.cpp msgid "Go to Method" @@ -2399,7 +2434,7 @@ msgstr "Berkas salah, tidak layout suara bus." #: editor/editor_audio_buses.cpp msgid "Error saving file: %s" -msgstr "Galat menyimpan berkas: %s" +msgstr "Error menyimpan berkas: %s" #: editor/editor_audio_buses.cpp msgid "Add Bus" @@ -2872,7 +2907,7 @@ msgstr "" #: editor/editor_feature_profile.cpp msgid "Error saving profile to path: '%s'." -msgstr "Galat saat menyimpan profil ke: '%s'." +msgstr "Error saat menyimpan profil ke: '%s'." #: editor/editor_feature_profile.cpp msgid "Reset to Default" @@ -3221,7 +3256,7 @@ msgstr "Warna" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp msgid "Constants" -msgstr "Konstanta" +msgstr "konstan" #: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp #, fuzzy @@ -3539,7 +3574,7 @@ msgstr "Oke" #: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp msgid "Error saving resource!" -msgstr "Galat saat menyimpan resource!" +msgstr "Error saat menyimpan resource!" #: editor/editor_node.cpp msgid "" @@ -3575,7 +3610,7 @@ msgstr "Kesalahan saat melakukan parsing '%s'." #: editor/editor_node.cpp msgid "Unexpected end of file '%s'." -msgstr "akhir dari berkas tak terduga '%s'." +msgstr "Akhir file '%s' yang tidak terduga." #: editor/editor_node.cpp msgid "Missing '%s' or its dependencies." @@ -4074,7 +4109,7 @@ msgstr "" #: editor/editor_node.cpp editor/plugins/theme_editor_plugin.cpp msgid "Scene" -msgstr "Skena" +msgstr "Scene" #: editor/editor_node.cpp msgid "Scene Naming" @@ -4708,7 +4743,7 @@ msgstr "Turunan Baru" #: editor/editor_node.cpp msgid "Load Errors" -msgstr "Muat Galat" +msgstr "Muat Error" #: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp #: modules/visual_script/visual_script_nodes.cpp @@ -4733,7 +4768,7 @@ msgstr "Buka Editor Skrip" #: editor/editor_node.cpp editor/project_manager.cpp msgid "Open Asset Library" -msgstr "Buka Pustaka Aset" +msgstr "Buka Aset Library" #: editor/editor_node.cpp msgid "Open the next Editor" @@ -6069,6 +6104,11 @@ msgstr "" msgid "Flat" msgstr "Flat 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Penabrak" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Pilih node untuk diimpor" @@ -6088,7 +6128,7 @@ msgstr "Impor dari Node:" #. TRANSLATORS: %s refers to the name of a version control system (e.g. "Git"). #: editor/editor_vcs_interface.cpp msgid "%s Error" -msgstr "%s Galat" +msgstr "%s Error" #: editor/export_template_manager.cpp msgid "Open the folder containing these templates." @@ -6112,7 +6152,7 @@ msgstr "Memulai pengunduhan..." #: editor/export_template_manager.cpp msgid "Error requesting URL:" -msgstr "Galat saat meminta URL:" +msgstr "Error saat meminta URL:" #: editor/export_template_manager.cpp msgid "Connecting to the mirror..." @@ -6161,7 +6201,7 @@ msgstr "" #: editor/export_template_manager.cpp msgid "Error getting the list of mirrors." -msgstr "Galat dalam mendapatkan daftar mirror." +msgstr "Error dalam mendapatkan daftar mirror." #: editor/export_template_manager.cpp msgid "Error parsing JSON with the list of mirrors. Please report this issue!" @@ -6391,11 +6431,11 @@ msgstr "Tidak dapat memindahkan folder ke dalam dirinya sendiri." #: editor/filesystem_dock.cpp msgid "Error moving:" -msgstr "Galat saat memindahkan:" +msgstr "Error saat memindahkan:" #: editor/filesystem_dock.cpp msgid "Error duplicating:" -msgstr "Galat saat menggandakan berkas:" +msgstr "Error saat menggandakan berkas:" #: editor/filesystem_dock.cpp msgid "Unable to update dependencies:" @@ -6439,11 +6479,11 @@ msgid "" "\n" "Do you wish to overwrite them?" msgstr "" -"file dan/atau berkas-berkas berikut mempunyai konflik di '%s':\n" +"File atau folder berikut ini bentrok dengan item di lokasi target '%s':\n" "\n" "%s\n" "\n" -"Apakah Anda ingin melanjutkan (overwrite)?" +"Apakah Anda ingin menimpanya?" #: editor/filesystem_dock.cpp msgid "Renaming file:" @@ -6811,7 +6851,7 @@ msgstr "" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp msgid "sRGB" -msgstr "" +msgstr "sRGB" #: editor/import/resource_importer_layered_texture.cpp #, fuzzy @@ -8255,7 +8295,7 @@ msgstr "Tidak dapat menyimpan respons ke:" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Write error." -msgstr "Galat saat menyimpan ke dalam berkas." +msgstr "Error saat menyimpan ke dalam berkas." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Request failed, too many redirects" @@ -10267,7 +10307,7 @@ msgstr "Tutup dan simpan perubahan?" #: editor/plugins/script_editor_plugin.cpp msgid "Error writing TextFile:" -msgstr "Galat saat menulis TextFile:" +msgstr "Error saat menulis TextFile:" #: editor/plugins/script_editor_plugin.cpp msgid "Could not load file at:" @@ -10275,23 +10315,23 @@ msgstr "Tidak dapat memuat berkas di:" #: editor/plugins/script_editor_plugin.cpp msgid "Error saving file!" -msgstr "Galat saat menyimpan berkas!" +msgstr "Error saat menyimpan berkas!" #: editor/plugins/script_editor_plugin.cpp msgid "Error while saving theme." -msgstr "Galat saat menyimpan tema." +msgstr "Error saat menyimpan tema." #: editor/plugins/script_editor_plugin.cpp msgid "Error Saving" -msgstr "Galat Menyimpan" +msgstr "Error Menyimpan" #: editor/plugins/script_editor_plugin.cpp msgid "Error importing theme." -msgstr "Galat saat mengimpor tema." +msgstr "Error saat mengimpor tema." #: editor/plugins/script_editor_plugin.cpp msgid "Error Importing" -msgstr "Galat saat mengimpor" +msgstr "Error saat mengimpor" #: editor/plugins/script_editor_plugin.cpp msgid "New Text File..." @@ -10827,7 +10867,7 @@ msgstr "Mainkan IK" #: editor/plugins/spatial_editor_plugin.cpp msgid "Orthogonal" -msgstr "Ortogonal" +msgstr "Orthogonal" #: editor/plugins/spatial_editor_plugin.cpp modules/gltf/gltf_camera.cpp msgid "Perspective" @@ -12330,7 +12370,7 @@ msgstr "Cat Persegi Panjang" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Bucket Fill" -msgstr "Ember Isian" +msgstr "Bucket Fill" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Erase TileMap" @@ -12883,9 +12923,8 @@ msgid "Select SSH private key path" msgstr "Pilih jalur kunci pribadi SSH" #: editor/plugins/version_control_editor_plugin.cpp -#, fuzzy msgid "SSH Passphrase" -msgstr "Frasa Sandi SSH" +msgstr "SSH Passphrase" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect new changes" @@ -14099,7 +14138,7 @@ msgstr "Lokasi yang ditentukan tidak ada." #: editor/project_manager.cpp msgid "Error opening package file (it's not in ZIP format)." -msgstr "Galat saat membuka berkas paket (tidak dalam format ZIP)." +msgstr "Error saat membuka berkas paket (tidak dalam format ZIP)." #: editor/project_manager.cpp msgid "" @@ -14267,7 +14306,7 @@ msgstr "Proyek hilang" #: editor/project_manager.cpp msgid "Error: Project is missing on the filesystem." -msgstr "Galat: Proyek ini tidak ditemukan dalam berkas sistem." +msgstr "Error: Proyek ini tidak ditemukan dalam berkas sistem." #: editor/project_manager.cpp msgid "Can't open project at '%s'." @@ -14390,9 +14429,8 @@ msgid "Project Manager" msgstr "Manajer Proyek" #: editor/project_manager.cpp -#, fuzzy msgid "Local Projects" -msgstr "Proyek" +msgstr "Proyek Lokal" #: editor/project_manager.cpp msgid "Loading, please wait..." @@ -14427,7 +14465,7 @@ msgstr "Pilih Berkas untuk Dipindai" #: editor/project_manager.cpp msgid "New Project" -msgstr "Projek Baru" +msgstr "Proyek Baru" #: editor/project_manager.cpp #, fuzzy @@ -14448,9 +14486,8 @@ msgid "About" msgstr "Tentang" #: editor/project_manager.cpp -#, fuzzy msgid "Asset Library Projects" -msgstr "Pustaka Aset" +msgstr "Proyek Perpustakaan Aset" #: editor/project_manager.cpp msgid "Restart Now" @@ -14473,13 +14510,12 @@ msgid "" "You currently don't have any projects.\n" "Would you like to explore official example projects in the Asset Library?" msgstr "" -"Saat ini Anda tidak memiliki proyek.\n" -"Apakah Anda ingin menjelajahi contoh proyek resmi di Pustaka Aset?" +"Saat ini Anda tidak memiliki proyek apa pun.\n" +"Apakah Anda ingin menjelajahi contoh proyek resmi di Perpustakaan Aset?" #: editor/project_manager.cpp -#, fuzzy msgid "Filter projects" -msgstr "Filter properti" +msgstr "Filter proyek" #: editor/project_manager.cpp #, fuzzy @@ -14669,7 +14705,7 @@ msgstr "Tampah Aksi Input" #: editor/project_settings_editor.cpp msgid "Error saving settings." -msgstr "Galat saat menyimpan pengaturan." +msgstr "Error saat menyimpan pengaturan." #: editor/project_settings_editor.cpp msgid "Settings saved OK." @@ -14848,7 +14884,7 @@ msgstr "Pilih Node" #: editor/property_editor.cpp msgid "Error loading file: Not a resource!" -msgstr "Galat saat memuat berkas: Bukan resource!" +msgstr "Error saat memuat berkas: Bukan resource!" #: editor/property_editor.cpp msgid "Pick a Node" @@ -15039,7 +15075,7 @@ msgstr "Tidak ada parent untuk menginstansi skena disana." #: editor/scene_tree_dock.cpp msgid "Error loading scene from %s" -msgstr "Galat saat memuat skena dari %s" +msgstr "Error saat memuat skena dari %s" #: editor/scene_tree_dock.cpp msgid "" @@ -15289,11 +15325,11 @@ msgstr "" #: editor/scene_tree_dock.cpp msgid "Error saving scene." -msgstr "Galat menyimpan skena." +msgstr "Error menyimpan skena." #: editor/scene_tree_dock.cpp msgid "Error duplicating scene to save it." -msgstr "Galat menduplikasi skena untuk menyimpannya." +msgstr "Error menduplikasi skena untuk menyimpannya." #: editor/scene_tree_dock.cpp msgid "Sub-Resources" @@ -15554,15 +15590,15 @@ msgstr "Ekstensi salah dipilih." #: editor/script_create_dialog.cpp msgid "Error loading template '%s'" -msgstr "Galat saat memuat templat '%s'" +msgstr "Error saat memuat templat '%s'" #: editor/script_create_dialog.cpp msgid "Error - Could not create script in filesystem." -msgstr "Galat - Tidak dapat membuat skrip di berkas sistem." +msgstr "Error - Tidak dapat membuat skrip di berkas sistem." #: editor/script_create_dialog.cpp msgid "Error loading script from %s" -msgstr "Galat saat memuat skrip dari %s" +msgstr "Error saat memuat skrip dari %s" #: editor/script_create_dialog.cpp msgid "Overrides" @@ -15666,15 +15702,15 @@ msgstr "Peringatan:" #: editor/script_editor_debugger.cpp msgid "Error:" -msgstr "Galat:" +msgstr "Error:" #: editor/script_editor_debugger.cpp msgid "C++ Error" -msgstr "Galat C++" +msgstr "Error C++" #: editor/script_editor_debugger.cpp msgid "C++ Error:" -msgstr "Galat C++ :" +msgstr "Error C++ :" #: editor/script_editor_debugger.cpp msgid "C++ Source" @@ -15694,7 +15730,7 @@ msgstr "Jejak Tumpukan" #: editor/script_editor_debugger.cpp msgid "Errors" -msgstr "Galat" +msgstr "Error" #: editor/script_editor_debugger.cpp msgid "Child process connected." @@ -15702,7 +15738,7 @@ msgstr "Proses anak terhubung." #: editor/script_editor_debugger.cpp msgid "Copy Error" -msgstr "Salin Galat" +msgstr "Salin Error" #: editor/script_editor_debugger.cpp msgid "Open C++ Source on GitHub" @@ -16071,7 +16107,7 @@ msgstr "Maksimal Pesan Per Bingkai" #: main/main.cpp msgid "Max Errors Per Second" -msgstr "Maksimal Galat Per Detik" +msgstr "Maksimal Error Per Detik" #: main/main.cpp msgid "Max Warnings Per Second" @@ -16120,41 +16156,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "Tampilan" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "Lebar" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "Tinggi" - -#: main/main.cpp -#, fuzzy -msgid "Always On Top" -msgstr "Selalu Di Depan" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Kiri Lebar" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Menguji" - #: main/main.cpp msgid "DPI" msgstr "DPI" @@ -16350,7 +16351,7 @@ msgstr "Warna Latar Belakang" #: main/main.cpp msgid "macOS Native Icon" -msgstr "Ikon macOS" +msgstr "Ikon Asli macOS" #: main/main.cpp msgid "Windows Native Icon" @@ -16788,7 +16789,7 @@ msgstr "" #: modules/gdscript/gdscript.cpp msgid "Treat Warnings As Errors" -msgstr "Perlakukan Peringatan Sebagai Galat" +msgstr "Perlakukan Peringatan Sebagai Error" #: modules/gdscript/gdscript.cpp msgid "Exclude Addons" @@ -17988,7 +17989,7 @@ msgstr "if (kondisi) adalah:" #: modules/visual_script/visual_script_flow_control.cpp msgid "While" -msgstr "" +msgstr "Ketika" #: modules/visual_script/visual_script_flow_control.cpp msgid "while (cond):" @@ -20478,6 +20479,11 @@ msgstr "" "Poligon tidak valid. Minimal 2 titik dibutuhkan untuk mode pembangunan " "'Segmen\"." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21900,7 +21906,7 @@ msgstr "Proyeksi" #: scene/3d/camera.cpp msgid "FOV" -msgstr "Bidang Pandang" +msgstr "FOV" #: scene/3d/camera.cpp #, fuzzy @@ -22242,10 +22248,13 @@ msgid "NavMesh" msgstr "Panggang NavMesh" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" +"NavigationObstacle2D hanya berfungsi untuk memberikan penghindaran tabrakan " +"ke objek Node2D." #: scene/3d/occluder.cpp msgid "No shape is set." @@ -24516,6 +24525,11 @@ msgstr "Mode Geser Pandangan" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Mode Interpolasi" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Tampilan Tak Berbayang" @@ -24549,11 +24563,6 @@ msgstr "Terapkan Bersamaan:" msgid "Process Priority" msgstr "Aktifkan Prioritas" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Mode Interpolasi" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25262,6 +25271,11 @@ msgstr "Pemisah yang diberi nama" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Operator warna." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Warna Tulang 1" @@ -25520,9 +25534,8 @@ msgid "Large" msgstr "Sasaran" #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Folder" -msgstr "Direktori:" +msgstr "Folder" #: scene/resources/default_theme/default_theme.cpp #, fuzzy @@ -26071,6 +26084,11 @@ msgstr "Mode Tanpa Gangguan" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Kedalaman" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Pengimbangan:" @@ -26468,9 +26486,8 @@ msgid "Visible Instance Count" msgstr "" #: scene/resources/multimesh.cpp -#, fuzzy msgid "Transform Array" -msgstr "Transformasi Dibatalkan." +msgstr "Transformasi Array" #: scene/resources/multimesh.cpp #, fuzzy @@ -26493,9 +26510,8 @@ msgid "Sample Partition Type" msgstr "Atur Jenis variabel" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Parsed Geometry Type" -msgstr "Mengurai Geometri..." +msgstr "Jenis Geometri yang Diuraikan" #: scene/resources/navigation_mesh.cpp msgid "Source Geometry Mode" @@ -26537,9 +26553,8 @@ msgid "Verts Per Poly" msgstr "" #: scene/resources/navigation_mesh.cpp -#, fuzzy msgid "Sample Distance" -msgstr "Pilih Jarak:" +msgstr "Jarak sampel" #: scene/resources/navigation_mesh.cpp #, fuzzy @@ -26599,14 +26614,12 @@ msgid "Color Modifier" msgstr "Pengubah Lambat Tampilan Bebas" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Point Texture" -msgstr "Titik Emisi:" +msgstr "Tekstur Titik" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Normal Texture" -msgstr "Sumber Emisi: " +msgstr "Texture Normal" #: scene/resources/particles_material.cpp #, fuzzy @@ -26619,9 +26632,8 @@ msgid "Point Count" msgstr "Tambah Port Masukan" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Scale Random" -msgstr "Rasio Skala:" +msgstr "Skala Acak" #: scene/resources/particles_material.cpp #, fuzzy @@ -26637,9 +26649,8 @@ msgid "Absorbent" msgstr "" #: scene/resources/plane_shape.cpp -#, fuzzy msgid "Plane" -msgstr "Dataran:" +msgstr "Plane" #: scene/resources/primitive_meshes.cpp #, fuzzy @@ -26663,19 +26674,16 @@ msgid "Subdivide Depth" msgstr "" #: scene/resources/primitive_meshes.cpp -#, fuzzy msgid "Top Radius" -msgstr "Radius:" +msgstr "Radius Atas" #: scene/resources/primitive_meshes.cpp -#, fuzzy msgid "Bottom Radius" -msgstr "Kanan Bawah" +msgstr "Radius Bawah" #: scene/resources/primitive_meshes.cpp -#, fuzzy msgid "Left To Right" -msgstr "Kanan Atas" +msgstr "Kiri Ke Kanan" #: scene/resources/primitive_meshes.cpp msgid "Is Hemisphere" @@ -26699,9 +26707,8 @@ msgid "Custom Solver Bias" msgstr "" #: scene/resources/sky.cpp -#, fuzzy msgid "Radiance Size" -msgstr "Ukuran Garis Tepi:" +msgstr "Ukuran Pancaran" #: scene/resources/sky.cpp msgid "Panorama" @@ -26713,9 +26720,8 @@ msgid "Top Color" msgstr "Floor Selanjutnya" #: scene/resources/sky.cpp -#, fuzzy msgid "Horizon Color" -msgstr "Menyimpan File:" +msgstr "Warna Horizon" #: scene/resources/sky.cpp #, fuzzy @@ -26799,9 +26805,8 @@ msgid "Base Texture" msgstr "Hapus Tekstur" #: scene/resources/texture.cpp -#, fuzzy msgid "Image Size" -msgstr "Halaman: " +msgstr "Ukuran Gambar" #: scene/resources/texture.cpp #, fuzzy @@ -26814,14 +26819,12 @@ msgid "Lossy Storage Quality" msgstr "Tangkap" #: scene/resources/texture.cpp -#, fuzzy msgid "Fill From" -msgstr "Mode Putar:" +msgstr "Isi Dari" #: scene/resources/texture.cpp -#, fuzzy msgid "Fill To" -msgstr "Mode Putar:" +msgstr "Isi Ke" #: scene/resources/texture.cpp #, fuzzy @@ -26975,9 +26978,8 @@ msgid "Audio Stream" msgstr "Item Radio" #: servers/audio/audio_stream.cpp -#, fuzzy msgid "Random Pitch" -msgstr "Kemiringan Acak:" +msgstr "Pitch Acak" #: servers/audio/effects/audio_effect_capture.cpp #: servers/audio/effects/audio_effect_spectrum_analyzer.cpp @@ -27027,9 +27029,8 @@ msgstr "" #: servers/audio/effects/audio_effect_chorus.cpp #: servers/audio/effects/audio_effect_delay.cpp #: servers/audio/effects/audio_effect_panner.cpp -#, fuzzy msgid "Pan" -msgstr "Dataran:" +msgstr "Pan" #: servers/audio/effects/audio_effect_compressor.cpp #: servers/audio/effects/audio_effect_filter.cpp @@ -27125,9 +27126,8 @@ msgstr "" #: servers/audio/effects/audio_effect_pitch_shift.cpp #: servers/audio/effects/audio_effect_spectrum_analyzer.cpp -#, fuzzy msgid "FFT Size" -msgstr "Ukuran:" +msgstr "Ukuran FFT" #: servers/audio/effects/audio_effect_reverb.cpp msgid "Predelay" @@ -27223,9 +27223,8 @@ msgid "Time Before Sleep" msgstr "" #: servers/physics_2d/physics_2d_server_sw.cpp -#, fuzzy msgid "BP Hash Table Size" -msgstr "Ukuran:" +msgstr "Ukuran Tabel Hash BP" #: servers/physics_2d/physics_2d_server_sw.cpp msgid "Large Object Surface Threshold In Cells" @@ -27291,33 +27290,28 @@ msgid "Collision Normal" msgstr "Mode Tabrakan" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collision Depth" -msgstr "Mode Tabrakan" +msgstr "Kedalaman Collision" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collision Safe Fraction" -msgstr "Mode Tabrakan" +msgstr "Fraksi Aman Collision" #: servers/physics_2d_server.cpp servers/physics_server.cpp -#, fuzzy msgid "Collision Unsafe Fraction" -msgstr "Mode Tabrakan" +msgstr "Fraksi Tidak Aman Collision" #: servers/physics_server.cpp -#, fuzzy msgid "Center Of Mass" -msgstr "Kiri Tengah" +msgstr "Pusat Massa" #: servers/physics_server.cpp msgid "Principal Inertia Axes" msgstr "" #: servers/visual/shader_language.cpp -#, fuzzy msgid "Varying may not be assigned in the '%s' function." -msgstr "Variasi hanya bisa ditetapkan dalam fungsi vertex." +msgstr "Memvariasikan mungkin tidak ditetapkan dalam fungsi '%s'." #: servers/visual/shader_language.cpp msgid "" @@ -27344,53 +27338,44 @@ msgid "Constants cannot be modified." msgstr "Konstanta tidak dapat dimodifikasi." #: servers/visual/visual_server_scene.cpp -#, fuzzy msgid "Spatial Partitioning" -msgstr "Mempartisi..." +msgstr "Partisi Spatial" #: servers/visual_server.cpp -#, fuzzy msgid "Render Loop Enabled" -msgstr "Filter sinyal" +msgstr "Render Loop Diaktifkan" #: servers/visual_server.cpp -#, fuzzy msgid "VRAM Compression" -msgstr "Tetapkan ekspresi" +msgstr "Kompresi VRAM" #: servers/visual_server.cpp -#, fuzzy msgid "Import BPTC" -msgstr "Impor" +msgstr "Impor BPTC" #: servers/visual_server.cpp -#, fuzzy msgid "Import S3TC" -msgstr "Impor" +msgstr "Impor S3TC" #: servers/visual_server.cpp -#, fuzzy msgid "Import ETC" -msgstr "Impor" +msgstr "Impor ETC" #: servers/visual_server.cpp -#, fuzzy msgid "Import ETC2" -msgstr "Impor" +msgstr "Impor ETC2" #: servers/visual_server.cpp -#, fuzzy msgid "Import PVRTC" -msgstr "Impor Tema" +msgstr "Impor PVRTC" #: servers/visual_server.cpp msgid "Lossless Compression" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Force PNG" -msgstr "Sumber Mesh:" +msgstr "Paksa PNG" #: servers/visual_server.cpp msgid "WebP Compression Level" @@ -27401,9 +27386,8 @@ msgid "Time Rollover Secs" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Cubemap Size" -msgstr "Ubah Ukuran Kamera" +msgstr "Ukuran Cubemap" #: servers/visual_server.cpp msgid "Quadrant 0 Subdiv" @@ -27422,19 +27406,16 @@ msgid "Quadrant 3 Subdiv" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Shadows" -msgstr "Shader" +msgstr "Bayangan" #: servers/visual_server.cpp -#, fuzzy msgid "Filter Mode" -msgstr "Filter node" +msgstr "Mode Filter" #: servers/visual_server.cpp -#, fuzzy msgid "Texture Array Reflections" -msgstr "Seleksi Tengah" +msgstr "Refleksi Tekstur Array" #: servers/visual_server.cpp msgid "High Quality GGX" @@ -27445,9 +27426,8 @@ msgid "Irradiance Max Size" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Shading" -msgstr "Lapisan" +msgstr "Shading" #: servers/visual_server.cpp msgid "Force Vertex Shading" @@ -27466,9 +27446,8 @@ msgid "Mesh Storage" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Split Stream" -msgstr "Pisahkan Kurva" +msgstr "Stream Terpisah" #: servers/visual_server.cpp msgid "Use Physical Light Attenuation" @@ -27507,23 +27486,20 @@ msgid "Use Software Skinning" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Ninepatch Mode" -msgstr "Mode Interpolasi" +msgstr "Mode Ninepatch" #: servers/visual_server.cpp -#, fuzzy msgid "OpenGL" -msgstr "Buka" +msgstr "OpenGL" #: servers/visual_server.cpp msgid "Batching Send Null" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Batching Stream" -msgstr "Ubah Nama Massal" +msgstr "Batching Stream" #: servers/visual_server.cpp msgid "Legacy Orphan Buffers" @@ -27534,18 +27510,16 @@ msgid "Legacy Stream" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Batching" -msgstr "Mencari..." +msgstr "Batching" #: servers/visual_server.cpp msgid "Use Batching" -msgstr "" +msgstr "Gunakan Batching" #: servers/visual_server.cpp -#, fuzzy msgid "Use Batching In Editor" -msgstr "Memperbarui editor" +msgstr "Gunakan Batching Di Editor" #: servers/visual_server.cpp msgid "Single Rect Fallback" @@ -27564,9 +27538,8 @@ msgid "Scissor Area Threshold" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Max Join Items" -msgstr "Kelola Templat Ekspor…" +msgstr "Item Gabung Maks" #: servers/visual_server.cpp msgid "Batch Buffer Size" @@ -27581,13 +27554,12 @@ msgid "Flash Batching" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Diagnose Frame" -msgstr "Rekat Frame" +msgstr "Diagnosis Frame" #: servers/visual_server.cpp msgid "GLES2" -msgstr "" +msgstr "GLES2" #: servers/visual_server.cpp msgid "Compatibility" @@ -27598,14 +27570,12 @@ msgid "Disable Half Float" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Enable High Float" -msgstr "Aktifkan Prioritas" +msgstr "Aktifkan Float Tinggi" #: servers/visual_server.cpp -#, fuzzy msgid "Precision" -msgstr "Tetapkan ekspresi" +msgstr "Presisi" #: servers/visual_server.cpp msgid "UV Contract" @@ -27616,47 +27586,40 @@ msgid "UV Contract Amount" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Use Simple PVS" -msgstr "Gunakan Pengancingan Skala" +msgstr "Gunakan PVS Sederhana" #: servers/visual_server.cpp msgid "PVS Logging" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Use Signals" -msgstr "Sinyal" +msgstr "Gunakan Sinyal" #: servers/visual_server.cpp -#, fuzzy msgid "Remove Danglers" -msgstr "Hapus Tile" +msgstr "Hapus Danglers" #: servers/visual_server.cpp -#, fuzzy msgid "Flip Imported Portals" -msgstr "Balikkan Portal" +msgstr "Balik Portal Impor" #: servers/visual_server.cpp -#, fuzzy msgid "Occlusion Culling" -msgstr "Pengaturan Viewport" +msgstr "Pemusnahan Oklusi" #: servers/visual_server.cpp msgid "Max Active Spheres" -msgstr "" +msgstr "Bola Aktif Maks" #: servers/visual_server.cpp -#, fuzzy msgid "Max Active Polygons" -msgstr "Geser Poligon" +msgstr "Poligon Aktif Maks" #: servers/visual_server.cpp -#, fuzzy msgid "Shader Compilation Mode" -msgstr "Mode Interpolasi" +msgstr "Mode Kompilasi Shader" #: servers/visual_server.cpp msgid "Max Simultaneous Compiles" @@ -27667,6 +27630,5 @@ msgid "Log Active Async Compiles Count" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Shader Cache Size (MB)" -msgstr "Ubah Ukuran Kamera" +msgstr "Ukuran Cache Shader (MB)" diff --git a/editor/translations/is.po b/editor/translations/is.po index cc705e3310..f32c97384b 100644 --- a/editor/translations/is.po +++ b/editor/translations/is.po @@ -74,11 +74,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -86,7 +87,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -98,7 +99,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -112,10 +113,11 @@ msgstr "" msgid "Position" msgstr "Val á kvarða" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -583,6 +585,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1178,7 +1213,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5824,6 +5859,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Breyta Viðbót" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15464,38 +15504,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19575,6 +19583,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -21229,7 +21242,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23254,6 +23267,11 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Breytingar á Anim track" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23283,10 +23301,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23928,6 +23942,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Stillið breyting á:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Val á kvarða" @@ -24685,6 +24704,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/it.po b/editor/translations/it.po index 0ed67618f4..16a47de770 100644 --- a/editor/translations/it.po +++ b/editor/translations/it.po @@ -73,7 +73,7 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-30 23:27+0000\n" +"PO-Revision-Date: 2022-05-15 20:00+0000\n" "Last-Translator: Alessandro Casalino <alessandro.casalino93@gmail.com>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/" "godot/it/>\n" @@ -82,7 +82,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -136,11 +136,12 @@ msgstr "Dimensione Massima Finestra" msgid "Screen Orientation" msgstr "Orientazione Schermo" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Finestra" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Senza contorno" @@ -148,7 +149,7 @@ msgstr "Senza contorno" msgid "Per Pixel Transparency Enabled" msgstr "Trasparenza A Livello Di Pixel Abilitata" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Schermo intero" @@ -160,7 +161,7 @@ msgstr "Massimizzata" msgid "Minimized" msgstr "Minimizzata" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Ridimensionabile" @@ -173,10 +174,11 @@ msgstr "Ridimensionabile" msgid "Position" msgstr "Posizione" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -626,6 +628,41 @@ msgstr "Utilizza Percorso Utente Personalizzato" msgid "Custom User Dir Name" msgstr "Nome Personalizzato del Percorso Utente" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "Display" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "Larghezza" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "Altezza" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "Sempre In Primo Piano" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Larghezza Test" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Altezza Test" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1203,7 +1240,7 @@ msgstr "Abilita/Disabilita questa traccia." msgid "Update Mode (How this property is set)" msgstr "Modalità di aggiornamento (come viene impostata questa proprietà )" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Modalità d'interpolazione" @@ -4349,7 +4386,7 @@ msgstr "Explorer di risorse orfane…" #: editor/editor_node.cpp msgid "Reload Current Project" -msgstr "Rinomina il progetto corrente" +msgstr "Ricarica il Progetto Corrente" #: editor/editor_node.cpp msgid "Quit to Project List" @@ -5996,6 +6033,11 @@ msgstr "" msgid "Flat" msgstr "Flat" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Modalità Collisioni" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Scegli Nodo(i) da Importare" @@ -6992,14 +7034,12 @@ msgid "Saving..." msgstr "Salvataggio..." #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "2D, Detect 3D" -msgstr "Rileva 3D" +msgstr "2D, Rileva 3D" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "2D Pixel" -msgstr "Pixel Solidi" +msgstr "Pixel 2D" #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" @@ -7769,9 +7809,8 @@ msgid "New" msgstr "Nuovo" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Paste As Reference" -msgstr "%s Riferimento di classe" +msgstr "Incolla Come Reference" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." @@ -8334,7 +8373,7 @@ msgstr "Testing" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed to get repository configuration." -msgstr "" +msgstr "Impossibile recuperare la configurazione del repository." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9435,7 +9474,7 @@ msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy msgid "Create Simplified Convex Collision Sibling" -msgstr "Crea Singolo Fratello di Collisione Convessa" +msgstr "Crea Fratello di Collisione Convessa Semplificato" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -9466,17 +9505,16 @@ msgid "Create Outline Mesh..." msgstr "Crea Mesh di Outline..." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "" "Creates a static outline mesh. The outline mesh will have its normals " "flipped automatically.\n" "This can be used instead of the SpatialMaterial Grow property when using " "that property isn't possible." msgstr "" -"Crea intorno una mesh statica. Questa mesh avrà le suoe normali invertite " +"Crea una mesh di contorno statica. Questa mesh avrà le sue normali invertite " "automaticamente.\n" -"Questo puó essere usato come sostitutivo per la proprietà Grow (ingrandisci) " -"delle SpatialMaterial quando questa non é disponibile." +"Può essere utilizzata al posto della proprietà Grow (ingrandisci) delle " +"SpatialMaterial quando questa non è disponibile." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "View UV1" @@ -10075,7 +10113,7 @@ msgstr "Sincronizza Ossa a Poligono" #: editor/plugins/ray_cast_2d_editor_plugin.cpp msgid "Set cast_to" -msgstr "" +msgstr "Imposta cast_to" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" @@ -10128,9 +10166,8 @@ msgid "ResourcePreloader" msgstr "ResourcePreloader" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Flip Portals" -msgstr "Ribalta orizzontalmente" +msgstr "Ribalta Portali" #: editor/plugins/room_manager_editor_plugin.cpp msgid "Room Generate Points" @@ -10141,14 +10178,13 @@ msgid "Generate Points" msgstr "Genera punti" #: editor/plugins/room_manager_editor_plugin.cpp -#, fuzzy msgid "Flip Portal" -msgstr "Ribalta orizzontalmente" +msgstr "Ribalta Portale" #: editor/plugins/room_manager_editor_plugin.cpp #, fuzzy msgid "Occluder Set Transform" -msgstr "Azzera la trasformazione" +msgstr "Trasformazione dell'Insieme dell'Occlusore" #: editor/plugins/room_manager_editor_plugin.cpp msgid "Center Node" @@ -10337,7 +10373,7 @@ msgstr "Importa tema..." #: editor/plugins/script_editor_plugin.cpp msgid "Reload Theme" -msgstr "Ricarica tema" +msgstr "Ricarica Tema" #: editor/plugins/script_editor_plugin.cpp msgid "Save Theme" @@ -10438,9 +10474,8 @@ msgid "Exec Path" msgstr "Percorso di Esecuzione" #: editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Script Temperature Enabled" -msgstr "Seleziona File Modello" +msgstr "Temperatura dello Script Abilitata" #: editor/plugins/script_editor_plugin.cpp msgid "Highlight Current Script" @@ -10448,7 +10483,7 @@ msgstr "Evidenzia Script Attuale" #: editor/plugins/script_editor_plugin.cpp msgid "Script Temperature History Size" -msgstr "" +msgstr "Dimensione Storico della Temperatura dello Script" #: editor/plugins/script_editor_plugin.cpp msgid "Current Script Background Color" @@ -10705,9 +10740,8 @@ msgid "Reset to Rest Pose" msgstr "Ripristina a Posizione di Riposo" #: editor/plugins/skeleton_2d_editor_plugin.cpp -#, fuzzy msgid "Overwrite Rest Pose" -msgstr "Sovrascrivi Scena esistente" +msgstr "Sovrascrivi Posa a Riposo" #: editor/plugins/skeleton_editor_plugin.cpp msgid "Create physical bones" @@ -10790,7 +10824,6 @@ msgstr " [auto]" #. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled. #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid " [portals active]" msgstr " [portali attivi]" @@ -10887,7 +10920,6 @@ msgid "Vertices:" msgstr "Vertici:" #: editor/plugins/spatial_editor_plugin.cpp -#, fuzzy msgid "FPS: %d (%s ms)" msgstr "FPS: %d (%s ms)" @@ -11095,8 +11127,9 @@ msgid "Use Snap" msgstr "Usa Scatto" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Converts rooms for portal culling." -msgstr "" +msgstr "Converte stanze per culling del portale." #: editor/plugins/spatial_editor_plugin.cpp msgid "Bottom View" @@ -11294,12 +11327,14 @@ msgid "Post" msgstr "Post" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Manipulator Gizmo Size" -msgstr "" +msgstr "Dimensione Gizmo Di Controllo" #: editor/plugins/spatial_editor_plugin.cpp +#, fuzzy msgid "Manipulator Gizmo Opacity" -msgstr "" +msgstr "Opacità Gizmo Di Controllo" #: editor/plugins/spatial_editor_plugin.cpp msgid "Show Viewport Rotation Gizmo" @@ -11754,15 +11789,17 @@ msgid "" msgstr "" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Type" -msgstr "Rimuovi Tile" +msgstr "Rimuovi Tipo" #: editor/plugins/theme_editor_plugin.cpp msgid "" "Select a theme type from the list to edit its items.\n" "You can add a custom type or import a type with its items from another theme." msgstr "" +"Seleziona un tipo di tema dalla lista per editare i suoi elementi.\n" +"Puoi aggiungere un tipo personalizzato o importare un tipo con i suoi " +"elementi da un altro tema." #: editor/plugins/theme_editor_plugin.cpp msgid "Remove All Color Items" @@ -11797,14 +11834,12 @@ msgstr "" "Aggiungici più elementi manualmente o importando da un altro tema." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Theme Type" -msgstr "Aggiungi Tipo Elemento" +msgstr "Aggiungi Tipo Di Tema" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Theme Type" -msgstr "Rimuovi da Remoto" +msgstr "Rimuovi Tipo Di Tema" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -12002,12 +12037,15 @@ msgstr "Sovrascrivi tutti gli elementi predefiniti." #: editor/plugins/theme_editor_plugin.cpp msgid "Select the variation base type from a list of available types." msgstr "" +"Seleziona la variazione del tipo base da una lista di tipi disponibili." #: editor/plugins/theme_editor_plugin.cpp msgid "" "A type associated with a built-in class cannot be marked as a variation of " "another type." msgstr "" +"Un tipo associato ad una classe integrata non può essere indicato come " +"variazione di un altro tipo." #: editor/plugins/theme_editor_plugin.cpp msgid "Theme:" @@ -12034,10 +12072,13 @@ msgid "Select UI Scene:" msgstr "Seleziona Scena UI:" #: editor/plugins/theme_editor_preview.cpp +#, fuzzy msgid "" "Toggle the control picker, allowing to visually select control types for " "edit." msgstr "" +"Alterna il picker di controllo, permettendo di selezionare visualmente i " +"tipi di controllo per la modifica." #: editor/plugins/theme_editor_preview.cpp msgid "Toggle Button" @@ -15014,14 +15055,12 @@ msgid "Another node already uses this unique name in the scene." msgstr "" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Enable Scene Unique Name" -msgstr "Nome del Nodo:" +msgstr "Abilita Nome Unico Scena" #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp -#, fuzzy msgid "Disable Scene Unique Name" -msgstr "Nome del Nodo:" +msgstr "Disabilita Nome Unico Scena" #: editor/scene_tree_dock.cpp msgid "New Scene Root" @@ -15097,7 +15136,7 @@ msgstr "Sotto-Risorse" #: editor/scene_tree_dock.cpp msgid "Access as Scene Unique Name" -msgstr "" +msgstr "Accedi come Nome Unico Scena" #: editor/scene_tree_dock.cpp msgid "Clear Inheritance" @@ -15204,8 +15243,9 @@ msgid "Show Scene Tree Root Selection" msgstr "Mostra Selezione del Tree Root di Scena" #: editor/scene_tree_dock.cpp +#, fuzzy msgid "Derive Script Globals By Name" -msgstr "" +msgstr "Ricava Script Globali Dal Nome" #: editor/scene_tree_dock.cpp msgid "Use Favorites Root Selection" @@ -15237,6 +15277,9 @@ msgid "" "with the '%s' prefix in a node path.\n" "Click to disable this." msgstr "" +"Si può accedere a questo nodo da qualcunque punto della scena facendolo " +"precedere dal prefisso '%s' in un percorso di nodo.\n" +"Clicca per disabilitarlo." #: editor/scene_tree_editor.cpp msgid "" @@ -15752,17 +15795,16 @@ msgid "Set Room Point Position" msgstr "Imposta Posizione Punto Stanza" #: editor/spatial_editor_gizmos.cpp scene/3d/portal.cpp -#, fuzzy msgid "Portal Margin" msgstr "Margine del Portale" #: editor/spatial_editor_gizmos.cpp msgid "Portal Edge" -msgstr "" +msgstr "Confine del Portale" #: editor/spatial_editor_gizmos.cpp msgid "Portal Arrow" -msgstr "" +msgstr "Freccia del Portale" #: editor/spatial_editor_gizmos.cpp msgid "Set Portal Point Position" @@ -15899,43 +15941,9 @@ msgstr "Ripiega Su GLES2" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "Display" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "Larghezza" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "Altezza" - -#: main/main.cpp -msgid "Always On Top" -msgstr "Sempre In Primo Piano" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Larghezza Test" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Altezza Test" - #: main/main.cpp msgid "DPI" -msgstr "" +msgstr "DPI" #: main/main.cpp msgid "Allow hiDPI" @@ -16035,9 +16043,8 @@ msgid "Physics Interpolation" msgstr "Modalità d'interpolazione" #: main/main.cpp -#, fuzzy msgid "Enable Warnings" -msgstr "Abilita filtraggio" +msgstr "Abilita Avvertimenti" #: main/main.cpp msgid "Frame Delay Msec" @@ -16057,7 +16064,7 @@ msgstr "" #: main/main.cpp msgid "Hide Home Indicator" -msgstr "" +msgstr "Nascondi Indicatore Home" #: main/main.cpp msgid "Input Devices" @@ -16092,12 +16099,13 @@ msgid "Environment" msgstr "Ambiente" #: main/main.cpp +#, fuzzy msgid "Default Clear Color" -msgstr "" +msgstr "Colore Di Cancellamento Di Default" #: main/main.cpp msgid "Boot Splash" -msgstr "" +msgstr "Sfondo Di Avvio" #: main/main.cpp msgid "Show Image" @@ -16156,9 +16164,8 @@ msgid "Custom Image Hotspot" msgstr "" #: main/main.cpp -#, fuzzy msgid "Tooltip Position Offset" -msgstr "Scostamento della rotazione:" +msgstr "Suggerimento Scostamento Posizione" #: main/main.cpp modules/mono/mono_gd/gd_mono.cpp msgid "Debugger Agent" @@ -16328,7 +16335,6 @@ msgid "Polygon" msgstr "Poligono" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Spin Degrees" msgstr "Gradi di Rotazione" @@ -16337,9 +16343,8 @@ msgid "Spin Sides" msgstr "" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path Node" -msgstr "Incolla nodi" +msgstr "Percorso Nodo" #: modules/csg/csg_shape.cpp #, fuzzy @@ -16518,16 +16523,15 @@ msgstr "GDScript" #: modules/gdscript/editor/gdscript_highlighter.cpp msgid "Function Definition Color" -msgstr "" +msgstr "Colore Definizione Funzione" #: modules/gdscript/editor/gdscript_highlighter.cpp -#, fuzzy msgid "Node Path Color" -msgstr "Copia percorso del nodo" +msgstr "Colore Percorso Nodo" #: modules/gdscript/gdscript.cpp modules/visual_script/visual_script.cpp msgid "Max Call Stack" -msgstr "" +msgstr "Max Chiamate In Coda" #: modules/gdscript/gdscript.cpp msgid "Treat Warnings As Errors" @@ -16539,7 +16543,7 @@ msgstr "Escludi Componenti Aggiuntivi" #: modules/gdscript/gdscript.cpp msgid "Autocomplete Setters And Getters" -msgstr "" +msgstr "Autocompleta Setters E Getters" #: modules/gdscript/gdscript_functions.cpp msgid "Step argument is zero!" @@ -16590,7 +16594,7 @@ msgstr "Abilita Risoluzione Intelligente" #: modules/gdscript/language_server/gdscript_language_server.cpp msgid "Show Native Symbols In Editor" -msgstr "" +msgstr "Mostra Simboli Nativi Nell'Editor" #: modules/gdscript/language_server/gdscript_language_server.cpp msgid "Use Thread" @@ -16629,14 +16633,12 @@ msgid "Min" msgstr "Min" #: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Max" -msgstr "Mischia" +msgstr "Max" #: modules/gltf/gltf_accessor.cpp -#, fuzzy msgid "Sparse Count" -msgstr "Istanza" +msgstr "Conteggio Sparso" #: modules/gltf/gltf_accessor.cpp msgid "Sparse Indices Buffer View" @@ -16659,18 +16661,16 @@ msgid "Sparse Values Byte Offset" msgstr "" #: modules/gltf/gltf_buffer_view.cpp -#, fuzzy msgid "Buffer" -msgstr "Vista dal retro" +msgstr "Buffer" #: modules/gltf/gltf_buffer_view.cpp -#, fuzzy msgid "Byte Length" -msgstr "Tema Predefinito" +msgstr "Lunghezza Byte" #: modules/gltf/gltf_buffer_view.cpp msgid "Byte Stride" -msgstr "" +msgstr "Stride Byte" #: modules/gltf/gltf_buffer_view.cpp msgid "Indices" @@ -16717,9 +16717,8 @@ msgid "Outer Cone Angle" msgstr "Angolo Cono Esterno" #: modules/gltf/gltf_mesh.cpp -#, fuzzy msgid "Blend Weights" -msgstr "Preprocessa Lightmaps" +msgstr "Sfuma Pesi" #: modules/gltf/gltf_mesh.cpp msgid "Instance Materials" @@ -16745,32 +16744,28 @@ msgstr "Traslazione" #: modules/gltf/gltf_node.cpp scene/2d/node_2d.cpp scene/2d/polygon_2d.cpp #: scene/2d/remote_transform_2d.cpp scene/3d/remote_transform.cpp #: scene/3d/spatial.cpp scene/gui/control.cpp scene/main/canvas_layer.cpp -#, fuzzy msgid "Rotation" -msgstr "Passo di rotazione:" +msgstr "Rotazione" #: modules/gltf/gltf_node.cpp -#, fuzzy msgid "Children" -msgstr "Figli Modificabili" +msgstr "Figli" #: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp -#, fuzzy msgid "Joints" -msgstr "Punto" +msgstr "Articolazioni" #: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp msgid "Roots" -msgstr "" +msgstr "Radici" #: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_state.cpp msgid "Unique Names" -msgstr "" +msgstr "Nomi Unici" #: modules/gltf/gltf_skeleton.cpp -#, fuzzy msgid "Godot Bone Node" -msgstr "Nodo TimeScale" +msgstr "Nodo Osso Godot" #: modules/gltf/gltf_skin.cpp #, fuzzy @@ -16787,9 +16782,8 @@ msgid "Inverse Binds" msgstr "" #: modules/gltf/gltf_skin.cpp -#, fuzzy msgid "Non Joints" -msgstr "Sposta Articolazione" +msgstr "Non Articolazioni" #: modules/gltf/gltf_skin.cpp msgid "Joint I To Bone I" @@ -16801,19 +16795,19 @@ msgstr "" #: modules/gltf/gltf_skin.cpp msgid "Godot Skin" -msgstr "" +msgstr "Skin Godot" #: modules/gltf/gltf_spec_gloss.cpp msgid "Diffuse Img" -msgstr "" +msgstr "Immagine Diffuse" #: modules/gltf/gltf_spec_gloss.cpp msgid "Diffuse Factor" -msgstr "" +msgstr "Coefficiente Diffuse" #: modules/gltf/gltf_spec_gloss.cpp msgid "Gloss Factor" -msgstr "" +msgstr "Coefficiente Gloss" #: modules/gltf/gltf_spec_gloss.cpp msgid "Specular Factor" @@ -16821,26 +16815,23 @@ msgstr "Coefficiente Speculare" #: modules/gltf/gltf_spec_gloss.cpp msgid "Spec Gloss Img" -msgstr "" +msgstr "Immagine Gloss Speculare" #: modules/gltf/gltf_state.cpp msgid "Json" msgstr "" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Major Version" -msgstr "Versione" +msgstr "Versione Principale" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Minor Version" -msgstr "Versione" +msgstr "Versione Minore" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "GLB Data" -msgstr "Con i Dati" +msgstr "Dati GLB" #: modules/gltf/gltf_state.cpp msgid "Use Named Skin Binds" @@ -16853,107 +16844,92 @@ msgstr "Vista dal retro" #: modules/gltf/gltf_state.cpp msgid "Accessors" -msgstr "" +msgstr "Accessori" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Scene Name" -msgstr "Percorso Scena:" +msgstr "Nome Scena" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Root Nodes" -msgstr "Nome del nodo radice" +msgstr "Nodi Radice" #: modules/gltf/gltf_state.cpp scene/2d/particles_2d.cpp #: scene/gui/texture_button.cpp scene/gui/texture_progress.cpp #: scene/resources/font.cpp -#, fuzzy msgid "Textures" -msgstr "Funzionalità " +msgstr "Textures" #: modules/gltf/gltf_state.cpp platform/uwp/export/export.cpp msgid "Images" -msgstr "" +msgstr "Immagini" #: modules/gltf/gltf_state.cpp msgid "Cameras" -msgstr "" +msgstr "Telecamere" #: modules/gltf/gltf_state.cpp servers/visual_server.cpp -#, fuzzy msgid "Lights" -msgstr "Luce" +msgstr "Luci" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Unique Animation Names" -msgstr "Nuovo Nome Animazione:" +msgstr "Nomi Unici Di Animazione" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Skeletons" -msgstr "Scheletro" +msgstr "Scheletri" #: modules/gltf/gltf_state.cpp -#, fuzzy msgid "Skeleton To Node" -msgstr "Scegli un Nodo" +msgstr "Da Scheletro A Nodo" #: modules/gltf/gltf_state.cpp scene/2d/animated_sprite.cpp -#, fuzzy msgid "Animations" -msgstr "Animazioni:" +msgstr "Animazioni" #: modules/gltf/gltf_texture.cpp -#, fuzzy msgid "Src Image" -msgstr "Mostra Ossa" +msgstr "Risorsa Immagine" #: modules/gridmap/grid_map.cpp msgid "Mesh Library" msgstr "Libreria Mesh" #: modules/gridmap/grid_map.cpp -#, fuzzy msgid "Physics Material" -msgstr "Fotogramma fisico %" +msgstr "Materiale Fisico" #: modules/gridmap/grid_map.cpp scene/3d/visual_instance.cpp -#, fuzzy msgid "Use In Baked Light" -msgstr "Preprocessa Lightmaps" +msgstr "Utilizza in Luce Preprocessata" #: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp #: scene/resources/navigation_mesh.cpp msgid "Cell" -msgstr "" +msgstr "Cella" #: modules/gridmap/grid_map.cpp -#, fuzzy msgid "Octant Size" -msgstr "Vista frontale" +msgstr "Dimensione Ottante" #: modules/gridmap/grid_map.cpp -#, fuzzy msgid "Center X" -msgstr "Centro" +msgstr "Centra X" #: modules/gridmap/grid_map.cpp -#, fuzzy msgid "Center Y" -msgstr "Centro" +msgstr "Centra Y" #: modules/gridmap/grid_map.cpp -#, fuzzy msgid "Center Z" -msgstr "Centro" +msgstr "Centra Z" #: modules/gridmap/grid_map.cpp scene/2d/collision_object_2d.cpp #: scene/2d/tile_map.cpp scene/3d/collision_object.cpp scene/3d/soft_body.cpp #: scene/resources/material.cpp msgid "Mask" -msgstr "" +msgstr "Maschera" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Next Plane" @@ -16997,9 +16973,8 @@ msgid "GridMap Paint" msgstr "GridMap Riempi" #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "GridMap Selection" -msgstr "GridMap Riempi Selezione" +msgstr "Selezione GridMap" #: modules/gridmap/grid_map_editor_plugin.cpp msgid "Snap View" @@ -17122,40 +17097,38 @@ msgstr "Preprocessa Lightmaps" #: modules/lightmapper_cpu/register_types.cpp msgid "Low Quality Ray Count" -msgstr "" +msgstr "Contaggio Raggi Qualità Bassa" #: modules/lightmapper_cpu/register_types.cpp msgid "Medium Quality Ray Count" -msgstr "" +msgstr "Conteggio Raggi Qualità Media" #: modules/lightmapper_cpu/register_types.cpp msgid "High Quality Ray Count" -msgstr "" +msgstr "Conteggio Raggi Qualità Alta" #: modules/lightmapper_cpu/register_types.cpp msgid "Ultra Quality Ray Count" -msgstr "" +msgstr "Conteggio Raggi Qualità Ultra" #: modules/minimp3/audio_stream_mp3.cpp #: modules/minimp3/resource_importer_mp3.cpp #: modules/stb_vorbis/audio_stream_ogg_vorbis.cpp #: modules/stb_vorbis/resource_importer_ogg_vorbis.cpp -#, fuzzy msgid "Loop Offset" -msgstr "Scostamento:" +msgstr "Scostamento Loop" #: modules/mobile_vr/mobile_vr_interface.cpp msgid "Eye Height" -msgstr "" +msgstr "Altezza Occhio" #: modules/mobile_vr/mobile_vr_interface.cpp msgid "IOD" msgstr "" #: modules/mobile_vr/mobile_vr_interface.cpp -#, fuzzy msgid "Display Width" -msgstr "Mostra Wireframe" +msgstr "Larghezza Display" #: modules/mobile_vr/mobile_vr_interface.cpp #, fuzzy @@ -17183,9 +17156,8 @@ msgid "Build Solution" msgstr "Crea Soluzione" #: modules/mono/editor/csharp_project.cpp -#, fuzzy msgid "Auto Update Project" -msgstr "Progetto Senza Nome" +msgstr "Auto-Aggiorna Progetto" #: modules/mono/mono_gd/gd_mono_utils.cpp #, fuzzy @@ -17261,56 +17233,51 @@ msgstr "Fatto!" #: modules/opensimplex/noise_texture.cpp msgid "Seamless" -msgstr "" +msgstr "Senza cuciture" #: modules/opensimplex/noise_texture.cpp -#, fuzzy msgid "As Normal Map" -msgstr "Scala Casuale:" +msgstr "Come Normal Map" #: modules/opensimplex/noise_texture.cpp msgid "Bump Strength" -msgstr "" +msgstr "Intensità Bump" #: modules/opensimplex/noise_texture.cpp msgid "Noise" -msgstr "" +msgstr "Rumore" #: modules/opensimplex/noise_texture.cpp -#, fuzzy msgid "Noise Offset" -msgstr "Scostamento della griglia:" +msgstr "Scostamento Rumore" #: modules/opensimplex/open_simplex_noise.cpp msgid "Octaves" -msgstr "" +msgstr "Ottave" #: modules/opensimplex/open_simplex_noise.cpp msgid "Period" -msgstr "" +msgstr "Periodo" #: modules/opensimplex/open_simplex_noise.cpp -#, fuzzy msgid "Persistence" -msgstr "Prospettica" +msgstr "Persistenza" #: modules/opensimplex/open_simplex_noise.cpp msgid "Lacunarity" -msgstr "" +msgstr "Lacunarietà " #: modules/regex/regex.cpp msgid "Subject" -msgstr "" +msgstr "Soggetto" #: modules/regex/regex.cpp -#, fuzzy msgid "Names" -msgstr "Nome" +msgstr "Nomi" #: modules/regex/regex.cpp -#, fuzzy msgid "Strings" -msgstr "Impostazioni:" +msgstr "Stringhe" #: modules/upnp/upnp.cpp msgid "Discover Multicast If" @@ -17325,14 +17292,12 @@ msgid "Discover IPv6" msgstr "" #: modules/upnp/upnp_device.cpp -#, fuzzy msgid "Description URL" -msgstr "Descrizione" +msgstr "Descrizione URL" #: modules/upnp/upnp_device.cpp -#, fuzzy msgid "Service Type" -msgstr "Imposta Tipo di Variabile" +msgstr "Tipo Di Servizio" #: modules/upnp/upnp_device.cpp msgid "IGD Control URL" @@ -17731,19 +17696,17 @@ msgid "Return Enabled" msgstr "Eseguibile" #: modules/visual_script/visual_script_flow_control.cpp -#, fuzzy msgid "Return Type" -msgstr "Tipo di membro" +msgstr "Tipo di Ritorno" #: modules/visual_script/visual_script_flow_control.cpp #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Condition" msgstr "Condizione" #: modules/visual_script/visual_script_flow_control.cpp msgid "if (cond) is:" -msgstr "" +msgstr "if (cond) is:" #: modules/visual_script/visual_script_flow_control.cpp msgid "While" @@ -17755,7 +17718,7 @@ msgstr "" #: modules/visual_script/visual_script_flow_control.cpp msgid "Iterator" -msgstr "" +msgstr "Iteratore" #: modules/visual_script/visual_script_flow_control.cpp msgid "for (elem) in (input):" @@ -17775,12 +17738,11 @@ msgstr "L'iteratore è diventato invalido: " #: modules/visual_script/visual_script_flow_control.cpp msgid "Sequence" -msgstr "" +msgstr "Sequenza" #: modules/visual_script/visual_script_flow_control.cpp -#, fuzzy msgid "in order:" -msgstr "Rinomina cartella:" +msgstr "in ordine:" #: modules/visual_script/visual_script_flow_control.cpp #, fuzzy @@ -17793,7 +17755,7 @@ msgstr "Inverti" #: modules/visual_script/visual_script_flow_control.cpp msgid "'input' is:" -msgstr "" +msgstr "'input' è:" #: modules/visual_script/visual_script_flow_control.cpp #, fuzzy @@ -17802,41 +17764,36 @@ msgstr "Tipo:" #: modules/visual_script/visual_script_flow_control.cpp msgid "Is %s?" -msgstr "" +msgstr "È %s?" #: modules/visual_script/visual_script_flow_control.cpp #: modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "Base Script" -msgstr "Nuovo script" +msgstr "Script Base" #: modules/visual_script/visual_script_func_nodes.cpp msgid "On %s" -msgstr "" +msgstr "Su %s" #: modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "On Self" -msgstr "Proprio" +msgstr "Su se stesso" #: modules/visual_script/visual_script_func_nodes.cpp #: modules/visual_script/visual_script_yield_nodes.cpp -#, fuzzy msgid "Call Mode" -msgstr "Modalità scala" +msgstr "Modalità Chiamata" #: modules/visual_script/visual_script_func_nodes.cpp #: modules/visual_script/visual_script_nodes.cpp -#, fuzzy msgid "Basic Type" -msgstr "Cambia Tipo di Base" +msgstr "Tipo Base" #: modules/visual_script/visual_script_func_nodes.cpp #: modules/visual_script/visual_script_nodes.cpp #: modules/visual_script/visual_script_yield_nodes.cpp -#, fuzzy msgid "Node Path" -msgstr "Copia percorso del nodo" +msgstr "Percorso Nodo" #: modules/visual_script/visual_script_func_nodes.cpp #, fuzzy @@ -17844,14 +17801,12 @@ msgid "Argument Cache" msgstr "Cambia nome Argomento" #: modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "Use Default Args" -msgstr "Ripristinare le impostazioni predefinite" +msgstr "Utilizza Argomenti Predefiniti" #: modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "Validate" -msgstr "Caratteri validi:" +msgstr "Valida" #: modules/visual_script/visual_script_func_nodes.cpp #, fuzzy @@ -17859,36 +17814,32 @@ msgid "RPC Call Mode" msgstr "Modalità scala" #: modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "Subtract %s" -msgstr "Al carattere %s" +msgstr "Sottrai %s" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Multiply %s" -msgstr "" +msgstr "Moltiplica %s" #: modules/visual_script/visual_script_func_nodes.cpp msgid "Divide %s" -msgstr "" +msgstr "Dividi %s" #: modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "Mod %s" -msgstr "Aggiungi %s" +msgstr "Modulo %s" #: modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "ShiftLeft %s" -msgstr "Imposta %s" +msgstr "ShiftLeft %s" #: modules/visual_script/visual_script_func_nodes.cpp msgid "ShiftRight %s" msgstr "" #: modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "BitAnd %s" -msgstr "Aggiungi %s" +msgstr "BitAnd %s" #: modules/visual_script/visual_script_func_nodes.cpp msgid "BitOr %s" @@ -18100,12 +18051,11 @@ msgstr "Fotogramma Fisico Successivo" #: modules/visual_script/visual_script_yield_nodes.cpp msgid "%s sec(s)" -msgstr "" +msgstr "%s secondi(s)" #: modules/visual_script/visual_script_yield_nodes.cpp scene/main/timer.cpp -#, fuzzy msgid "Wait Time" -msgstr "Disegna tile" +msgstr "Tempo Di Attesa" #: modules/visual_script/visual_script_yield_nodes.cpp #, fuzzy @@ -18138,11 +18088,11 @@ msgstr "Dimensione Index Buffer dei Poligoni nel Canvas (KB)" #: modules/websocket/websocket_client.cpp msgid "Verify SSL" -msgstr "" +msgstr "Verifica SSL" #: modules/websocket/websocket_client.cpp msgid "Trusted SSL Certificate" -msgstr "" +msgstr "Certificato SSL Fidato" #: modules/websocket/websocket_macros.h #, fuzzy @@ -18177,13 +18127,12 @@ msgid "Bind IP" msgstr "" #: modules/websocket/websocket_server.cpp -#, fuzzy msgid "Private Key" -msgstr "Tasto Fisico" +msgstr "Chiave Privata" #: modules/websocket/websocket_server.cpp platform/javascript/export/export.cpp msgid "SSL Certificate" -msgstr "" +msgstr "Certificato SSL" #: modules/websocket/websocket_server.cpp #, fuzzy @@ -18195,19 +18144,16 @@ msgid "Handshake Timeout" msgstr "Timeout Handshake" #: modules/webxr/webxr_interface.cpp -#, fuzzy msgid "Session Mode" -msgstr "Modalità Regione" +msgstr "Modalità Sessione" #: modules/webxr/webxr_interface.cpp -#, fuzzy msgid "Required Features" -msgstr "Funzionalità Principali:" +msgstr "Funzionalità Richieste" #: modules/webxr/webxr_interface.cpp -#, fuzzy msgid "Optional Features" -msgstr "Funzionalità Principali:" +msgstr "Funzionalità Opzionali" #: modules/webxr/webxr_interface.cpp msgid "Requested Reference Space Types" @@ -18218,14 +18164,12 @@ msgid "Reference Space Type" msgstr "" #: modules/webxr/webxr_interface.cpp -#, fuzzy msgid "Visibility State" -msgstr "Commuta visibilità " +msgstr "Stato Visibilità " #: modules/webxr/webxr_interface.cpp -#, fuzzy msgid "Bounds Geometry" -msgstr "Riprova" +msgstr "Confini Geometria" #: modules/webxr/webxr_interface.cpp #, fuzzy @@ -18234,7 +18178,7 @@ msgstr "Agganciamento Intelligente" #: platform/android/export/export.cpp msgid "Android SDK Path" -msgstr "" +msgstr "Percorso SDK Android" #: platform/android/export/export.cpp #, fuzzy @@ -18251,7 +18195,7 @@ msgstr "" #: platform/android/export/export.cpp msgid "Force System User" -msgstr "" +msgstr "Forza Utente System" #: platform/android/export/export.cpp msgid "Shutdown ADB On Exit" @@ -18287,19 +18231,16 @@ msgid "The package must have at least one '.' separator." msgstr "Il pacchetto deve avere almeno un \".\" separatore." #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Use Custom Build" -msgstr "Utilizza Percorso Utente Personalizzato" +msgstr "Utilizza Build Personalizzata" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Export Format" -msgstr "Percorso di Esportazione" +msgstr "Formato Esportazione" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Keystore" -msgstr "Debugger" +msgstr "Archivio Chiavi" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -18311,47 +18252,40 @@ msgid "Debug Password" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Release User" -msgstr "Rilascio" +msgstr "Utente Di Rilascio" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Release Password" -msgstr "Password" +msgstr "Password Di Rilascio" #: platform/android/export/export_plugin.cpp msgid "One Click Deploy" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Clear Previous Install" -msgstr "Ispeziona Istanza Precedente" +msgstr "Elimina Installazione Precedente" #: platform/android/export/export_plugin.cpp scene/resources/shader.cpp msgid "Code" -msgstr "" +msgstr "Codice" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Min SDK" -msgstr "Dimensione Outline:" +msgstr "SDK Min" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Target SDK" -msgstr "Target FPS" +msgstr "Target SDK" #: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp -#, fuzzy msgid "Package" -msgstr "Impacchettando" +msgstr "Pacchetto" #: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp -#, fuzzy msgid "Unique Name" -msgstr "Nome del Nodo:" +msgstr "Nome Unico" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -18359,38 +18293,32 @@ msgid "Signed" msgstr "Segnale" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Classify As Game" -msgstr "Nome Classe:" +msgstr "Classifica Come Gioco" #: platform/android/export/export_plugin.cpp msgid "Retain Data On Uninstall" -msgstr "" +msgstr "Conserva Dati Dopo Disinstallazione" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Exclude From Recents" -msgstr "Elimina Nodi" +msgstr "Escludi Da Recenti" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Graphics" -msgstr "Scostamento della griglia:" +msgstr "Grafica" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "OpenGL Debug" -msgstr "Apri" +msgstr "Debug OpenGL" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "XR Features" -msgstr "Funzionalità " +msgstr "Funzionalità XR" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "XR Mode" -msgstr "Modalità di Pan" +msgstr "Modalità XR" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -18407,9 +18335,8 @@ msgid "Passthrough" msgstr "Passthrough" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Immersive Mode" -msgstr "Modalità Priorità " +msgstr "Modalità Immersiva" #: platform/android/export/export_plugin.cpp #, fuzzy @@ -18441,38 +18368,32 @@ msgid "Allow" msgstr "" #: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp -#, fuzzy msgid "Command Line" -msgstr "Comando" +msgstr "Linea Di Comando" #: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp -#, fuzzy msgid "Extra Args" -msgstr "Argomenti di chiamata aggiuntivi:" +msgstr "Argomenti Extra" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "APK Expansion" -msgstr "Cambia espressione" +msgstr "Espansione APK" #: platform/android/export/export_plugin.cpp msgid "Salt" msgstr "" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Public Key" -msgstr "Percorso Chiave SSH Pubblica" +msgstr "Chiave Pubblica" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Permissions" -msgstr "Maschera Emissione" +msgstr "Permessi" #: platform/android/export/export_plugin.cpp -#, fuzzy msgid "Custom Permissions" -msgstr "Avvia una scena personalizzata" +msgstr "Permessi Personalizzati" #: platform/android/export/export_plugin.cpp msgid "Select device from the list" @@ -20298,6 +20219,11 @@ msgstr "" "Poligono non valido. Sono necessari almeno 2 punti nella modalità di " "costruzione \"Segmenti\"." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -20376,9 +20302,8 @@ msgstr "Nodo OneShot" #: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/particles.cpp -#, fuzzy msgid "Preprocess" -msgstr "Post processing" +msgstr "Preprocesso" #: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/particles.cpp @@ -22148,7 +22073,7 @@ msgstr "Prepara NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24414,6 +24339,11 @@ msgstr "Modalità di Pan" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Modalità d'interpolazione" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Mostra Unshaded" @@ -24447,11 +24377,6 @@ msgstr "Imposta più valori:" msgid "Process Priority" msgstr "Abilita Priorità Tile" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Modalità d'interpolazione" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25165,6 +25090,11 @@ msgstr "Chiamato Separatore" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Operatore colore." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Colore Osso 1" @@ -25972,6 +25902,11 @@ msgstr "Modalità senza distrazioni" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Profondità " + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Scostamento:" diff --git a/editor/translations/ja.po b/editor/translations/ja.po index b85513357b..07463073a6 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -43,7 +43,7 @@ msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:02+0000\n" +"PO-Revision-Date: 2022-05-10 13:14+0000\n" "Last-Translator: nitenook <admin@alterbaum.net>\n" "Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/" "godot/ja/>\n" @@ -52,7 +52,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -106,11 +106,12 @@ msgstr "ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æœ€å¤§ã‚µã‚¤ã‚º" msgid "Screen Orientation" msgstr "ç”»é¢ã®å‘ã" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "ウィンドウ" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "ボーダーレス" @@ -118,7 +119,7 @@ msgstr "ボーダーレス" msgid "Per Pixel Transparency Enabled" msgstr "ピクセルå˜ä½ã®é€æ˜Žåº¦ã‚’有効化" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "フルスクリーン" @@ -130,7 +131,7 @@ msgstr "最大化" msgid "Minimized" msgstr "最å°åŒ–" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "サイズを変更å¯èƒ½" @@ -143,10 +144,11 @@ msgstr "サイズを変更å¯èƒ½" msgid "Position" msgstr "ä½ç½®" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -602,6 +604,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "ã™ã¹ã¦è¡¨ç¤º" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "ライト" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "å¸¸ã«æœ€å‰é¢" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "左伸長" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "試験的" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1197,7 +1236,7 @@ msgstr "ã“ã®ãƒˆãƒ©ãƒƒã‚¯ã® オン/オフ を切り替ãˆã€‚" msgid "Update Mode (How this property is set)" msgstr "Update モード (ã“ã®ãƒ—ãƒãƒ‘ティã®è¨å®šæ–¹æ³•)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "補間モード" @@ -6007,6 +6046,11 @@ msgstr "%s を押ã—ãŸã¾ã¾ã§æ•´æ•°å€¤ã«ä¸¸ã‚る。Shiftを押ã—ãŸã¾ã¾ã msgid "Flat" msgstr "フラット" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "コリジョンモード" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "インãƒãƒ¼ãƒˆã™ã‚‹ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠž" @@ -15539,9 +15583,8 @@ msgid "Stack Frames" msgstr "スタックフレーム" #: editor/script_editor_debugger.cpp -#, fuzzy msgid "Filter stack variables" -msgstr "タイルを絞り込む" +msgstr "スタック変数を絞り込む" #: editor/script_editor_debugger.cpp msgid "Auto Switch To Remote Scene Tree" @@ -15919,42 +15962,6 @@ msgstr "GLES2ã«ãƒ•ォールãƒãƒƒã‚¯" msgid "Use Nvidia Rect Flicker Workaround" msgstr "Nvidiaã§ã®Rectã¡ã‚‰ã¤ãã®å›žé¿ç–を使用" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "ã™ã¹ã¦è¡¨ç¤º" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "ライト" - -#: main/main.cpp -msgid "Always On Top" -msgstr "å¸¸ã«æœ€å‰é¢" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "左伸長" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "試験的" - #: main/main.cpp msgid "DPI" msgstr "DPI" @@ -20288,6 +20295,11 @@ msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" "無効ãªãƒãƒªã‚´ãƒ³ã§ã™ã€‚'Segments' ビルドモードã§ã¯æœ€ä½Ž2ã¤ã®ãƒã‚¤ãƒ³ãƒˆãŒå¿…è¦ã§ã™ã€‚" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22125,9 +22137,10 @@ msgid "NavMesh" msgstr "NavMeshを焼ã込む" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "NavigationObstacle ã¯Spatialãªã‚ªãƒ–ジェクトã«ã‚³ãƒªã‚¸ãƒ§ãƒ³å›žé¿ã‚’æä¾›ã™ã‚‹ãŸã‚ã ã‘" "ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚" @@ -24413,6 +24426,11 @@ msgstr "パンモード" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "補間モード" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "シェーディングãªã—ã§è¡¨ç¤º" @@ -24446,11 +24464,6 @@ msgstr "複数è¨å®š:" msgid "Process Priority" msgstr "å„ªå…ˆé †ä½ã‚’有効化" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "補間モード" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25162,6 +25175,11 @@ msgstr "åå‰ä»˜ãセパレーター" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Color演算å。" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "ボーンã®è‰² 1" @@ -25970,6 +25988,11 @@ msgstr "集ä¸ãƒ¢ãƒ¼ãƒ‰" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Depth(深度/奥行)" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "オフセット:" diff --git a/editor/translations/ka.po b/editor/translations/ka.po index d31fd41fd2..80d946f0dc 100644 --- a/editor/translations/ka.po +++ b/editor/translations/ka.po @@ -78,11 +78,12 @@ msgstr "დáƒáƒ›áƒáƒ™áƒ˜áƒ“ებულებების შემსწáƒáƒ msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -90,7 +91,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -102,7 +103,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -116,10 +117,11 @@ msgstr "" msgid "Position" msgstr "áƒáƒ®áƒáƒšáƒ˜ %s შექმნáƒ" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -595,6 +597,41 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "ყველáƒáƒ¡ ჩáƒáƒœáƒáƒªáƒ•ლებáƒ" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "წრფივი" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1201,7 +1238,7 @@ msgstr "ჩáƒáƒœáƒáƒ¬áƒ”რის ჩáƒáƒ თვრ/ გáƒáƒ›áƒáƒ თვრmsgid "Update Mode (How this property is set)" msgstr "გáƒáƒœáƒáƒ®áƒšáƒ”ბის რეჟიმი (რáƒáƒ’áƒáƒ áƒáƒª ეს პáƒáƒ áƒáƒ›áƒ”ტრირდáƒáƒ§áƒ”ნებული)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp #, fuzzy msgid "Interpolation Mode" msgstr "ინტერპáƒáƒšáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი" @@ -5969,6 +6006,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "ინტერპáƒáƒšáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15831,40 +15873,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "ყველáƒáƒ¡ ჩáƒáƒœáƒáƒªáƒ•ლებáƒ" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "წრფივი" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20046,6 +20054,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21731,7 +21744,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23835,6 +23848,11 @@ msgstr "მáƒáƒ¡áƒ¨áƒ¢áƒáƒ‘ის თáƒáƒœáƒáƒ¤áƒáƒ დáƒáƒ‘áƒ:" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "ინტერპáƒáƒšáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "ყველáƒáƒ¡ ჩáƒáƒœáƒáƒªáƒ•ლებáƒ" @@ -23866,11 +23884,6 @@ msgstr "" msgid "Process Priority" msgstr "მáƒáƒ¡áƒ¨áƒ¢áƒáƒ‘ის თáƒáƒœáƒáƒ¤áƒáƒ დáƒáƒ‘áƒ:" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "ინტერპáƒáƒšáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -24529,6 +24542,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "ფუნქციის შექმნáƒ" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "ფუნქციები:" @@ -25308,6 +25326,10 @@ msgid "Distance Field" msgstr "დáƒáƒ§áƒ”ნებáƒ" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/km.po b/editor/translations/km.po index 4e33bd7ad3..366466c08d 100644 --- a/editor/translations/km.po +++ b/editor/translations/km.po @@ -70,11 +70,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -82,7 +83,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -94,7 +95,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -107,10 +108,11 @@ msgstr "" msgid "Position" msgstr "" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -561,6 +563,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1139,7 +1174,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5704,6 +5739,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15186,38 +15225,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19189,6 +19196,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20777,7 +20789,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22732,6 +22744,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22760,10 +22776,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23371,6 +23383,11 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Font Separator" +msgstr "Anim ផ្លាស់ប្ážáž¼ážš Transition" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -24062,6 +24079,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/ko.po b/editor/translations/ko.po index 9141788988..3c3df766ce 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -30,13 +30,14 @@ # Kiroo <elusive1102@naver.com>, 2021. # JumpJetAvocado <dwkng@jbnu.ac.kr>, 2021. # Lee Minhak <minarihak@gmail.com>, 2022. +# 한수현 <shh1473@ajou.ac.kr>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-05-03 07:13+0000\n" -"Last-Translator: Lee Minhak <minarihak@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:38+0000\n" +"Last-Translator: 한수현 <shh1473@ajou.ac.kr>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" "Language: ko\n" @@ -44,174 +45,153 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" -msgstr "" +msgstr "태블릿 드ë¼ì´ë²„" #: core/bind/core_bind.cpp -#, fuzzy msgid "Clipboard" -msgstr "í´ë¦½ë³´ë“œê°€ 비었습니다!" +msgstr "í´ë¦½ë³´ë“œ" #: core/bind/core_bind.cpp -#, fuzzy msgid "Current Screen" -msgstr "현재 씬" +msgstr "현재 화면" #: core/bind/core_bind.cpp msgid "Exit Code" -msgstr "" +msgstr "종료 코드" #: core/bind/core_bind.cpp -#, fuzzy msgid "V-Sync Enabled" -msgstr "활성화" +msgstr "V-Sync 활성화" #: core/bind/core_bind.cpp main/main.cpp msgid "V-Sync Via Compositor" -msgstr "" +msgstr "ì»´í¬ì§€í„°ë¥¼ 통한 V-Sync" #: core/bind/core_bind.cpp main/main.cpp msgid "Delta Smoothing" -msgstr "" +msgstr "ë¸íƒ€ 스무딩" #: core/bind/core_bind.cpp -#, fuzzy msgid "Low Processor Usage Mode" -msgstr "ì´ë™ 모드" +msgstr "ì €ì‚¬ì–‘ 모드" #: core/bind/core_bind.cpp msgid "Low Processor Usage Mode Sleep (µsec)" -msgstr "" +msgstr "ì €ì‚¬ì–‘ 모드 슬립 (마ì´í¬ë¡œì´ˆ 단위)" #: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp -#, fuzzy msgid "Keep Screen On" -msgstr "디버거 í•ìƒ ì—´ì–´ë†“ê¸°" +msgstr "화면 í•ìƒ í™œì„±í™”" #: core/bind/core_bind.cpp -#, fuzzy msgid "Min Window Size" -msgstr "ì°½ì˜ ìµœì†Œ í¬ê¸°" +msgstr "최소 ì°½ í¬ê¸°" #: core/bind/core_bind.cpp -#, fuzzy msgid "Max Window Size" -msgstr "ì°½ì˜ ìµœëŒ€ í¬ê¸°" +msgstr "최대 ì°½ í¬ê¸°" #: core/bind/core_bind.cpp -#, fuzzy msgid "Screen Orientation" -msgstr "화면 ì—°ì‚°ìž." +msgstr "화면 ë°©í–¥" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp -#, fuzzy +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" -msgstr "새 ì°½" +msgstr "ì°½" -#: core/bind/core_bind.cpp main/main.cpp -#, fuzzy +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" -msgstr "í…Œë‘리 픽셀" +msgstr "í…Œë‘리 없는" #: core/bind/core_bind.cpp msgid "Per Pixel Transparency Enabled" -msgstr "" +msgstr "픽셀 당 íˆ¬ëª…ë„ í™œì„±í™”" -#: core/bind/core_bind.cpp main/main.cpp -#, fuzzy +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" -msgstr "ì „ì²´ 화면 í† ê¸€" +msgstr "ì „ì²´ 화면" #: core/bind/core_bind.cpp msgid "Maximized" -msgstr "" +msgstr "최대화" #: core/bind/core_bind.cpp -#, fuzzy msgid "Minimized" -msgstr "초기화" +msgstr "최소화" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp -#, fuzzy msgid "Resizable" -msgstr "í¬ê¸° ì¡°ì • 가능" +msgstr "í¬ê¸° ì¡°ì ˆ 가능한" #: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp #: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp #: scene/3d/physics_body.cpp scene/3d/remote_transform.cpp #: scene/gui/control.cpp scene/gui/line_edit.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Position" -msgstr "ë… ìœ„ì¹˜" +msgstr "위치" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp #: scene/resources/visual_shader.cpp servers/visual_server.cpp -#, fuzzy msgid "Size" -msgstr "í¬ê¸°:" +msgstr "í¬ê¸°" #: core/bind/core_bind.cpp msgid "Endian Swap" -msgstr "" +msgstr "Endian 스왑" #: core/bind/core_bind.cpp -#, fuzzy msgid "Editor Hint" -msgstr "ì—디터" +msgstr "ì—디터 힌트" #: core/bind/core_bind.cpp msgid "Print Error Messages" -msgstr "" +msgstr "ì—러 메시지 ì¶œë ¥" #: core/bind/core_bind.cpp -#, fuzzy msgid "Iterations Per Second" -msgstr "ë³´ê°„ 모드" +msgstr "초당 반복 수" #: core/bind/core_bind.cpp -#, fuzzy msgid "Target FPS" -msgstr "Target(대ìƒ)" +msgstr "목표 FPS" #: core/bind/core_bind.cpp -#, fuzzy msgid "Time Scale" -msgstr "시간 ìŠ¤ì¼€ì¼ ë…¸ë“œ" +msgstr "시간 스케ì¼" #: core/bind/core_bind.cpp main/main.cpp -#, fuzzy msgid "Physics Jitter Fix" -msgstr "물리 í”„ë ˆìž„ %" +msgstr "물리 ííŠ¸ëŸ¬ì§ ê³ ì •" #: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Error" msgstr "오류" #: core/bind/core_bind.cpp -#, fuzzy msgid "Error String" -msgstr "ì €ìž¥ 중 오류" +msgstr "오류 문ìžì—´" #: core/bind/core_bind.cpp -#, fuzzy msgid "Error Line" -msgstr "ì €ìž¥ 중 오류" +msgstr "오류 줄" #: core/bind/core_bind.cpp -#, fuzzy msgid "Result" -msgstr "검색 ê²°ê³¼" +msgstr "ê²°ê³¼" #: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp msgid "Memory" @@ -226,24 +206,22 @@ msgstr "메모리" #: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h #: servers/visual_server.cpp msgid "Limits" -msgstr "" +msgstr "ì œí•œ" #: core/command_queue_mt.cpp -#, fuzzy msgid "Command Queue" -msgstr "Command: íšŒì „" +msgstr "ëª…ë ¹ 대기열" #: core/command_queue_mt.cpp msgid "Multithreading Queue Size (KB)" -msgstr "" +msgstr "ë©€í‹°ìŠ¤ë ˆë”© 대기열 í¬ê¸° (KB)" #: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp #: modules/visual_script/visual_script_func_nodes.cpp #: modules/visual_script/visual_script_nodes.cpp #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Function" -msgstr "함수(Function)" +msgstr "함수" #: core/image.cpp core/packed_data_container.cpp #: modules/minimp3/audio_stream_mp3.cpp @@ -253,113 +231,99 @@ msgstr "함수(Function)" #: scene/resources/audio_stream_sample.cpp scene/resources/bit_map.cpp #: scene/resources/concave_polygon_shape.cpp scene/resources/curve.cpp #: scene/resources/polygon_path_finder.cpp scene/resources/texture.cpp -#, fuzzy msgid "Data" -msgstr "ë°ì´í„°ì™€ 함께" +msgstr "ë°ì´í„°" #: core/io/file_access_network.cpp core/register_core_types.cpp #: editor/editor_settings.cpp main/main.cpp #: modules/gdscript/language_server/gdscript_language_server.cpp #: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h -#, fuzzy msgid "Network" -msgstr "ë„¤íŠ¸ì›Œí¬ í”„ë¡œíŒŒì¼ëŸ¬" +msgstr "네트워í¬" #: core/io/file_access_network.cpp -#, fuzzy msgid "Remote FS" -msgstr "ì›ê²© " +msgstr "ì›ê²© FS" #: core/io/file_access_network.cpp -#, fuzzy msgid "Page Size" -msgstr "페ì´ì§€: " +msgstr "페ì´ì§€ í¬ê¸°" #: core/io/file_access_network.cpp -#, fuzzy msgid "Page Read Ahead" -msgstr "페ì´ì§€ 미리 ì½ê¸°" +msgstr "앞 페ì´ì§€ ì½ê¸°" #: core/io/http_client.cpp msgid "Blocking Mode Enabled" -msgstr "" +msgstr "Blocking 모드 활성화" #: core/io/http_client.cpp -#, fuzzy msgid "Connection" msgstr "ì—°ê²°" #: core/io/http_client.cpp msgid "Read Chunk Size" -msgstr "" +msgstr "ì²í¬ í¬ê¸° ì½ê¸°" #: core/io/marshalls.cpp -#, fuzzy msgid "Object ID" -msgstr "ê·¸ë ¤ì§„ 오브ì 트:" +msgstr "오브ì 트 ID" #: core/io/multiplayer_api.cpp core/io/packet_peer.cpp -#, fuzzy msgid "Allow Object Decoding" -msgstr "어니언 ìŠ¤í‚¤ë‹ í™œì„±í™”" +msgstr "오브ì 트 디코딩 허용" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp msgid "Refuse New Network Connections" -msgstr "" +msgstr "새로운 ë„¤íŠ¸ì›Œí¬ ì—°ê²° ê±°ë¶€" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp -#, fuzzy msgid "Network Peer" -msgstr "ë„¤íŠ¸ì›Œí¬ í”„ë¡œíŒŒì¼ëŸ¬" +msgstr "ë„¤íŠ¸ì›Œí¬ í”¼ì–´" #: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp -#, fuzzy msgid "Root Node" -msgstr "루트 노드 ì´ë¦„" +msgstr "루트 노드" #: core/io/networked_multiplayer_peer.cpp -#, fuzzy msgid "Refuse New Connections" -msgstr "ì—°ê²°" +msgstr "새로운 ì—°ê²° ê±°ë¶€" #: core/io/networked_multiplayer_peer.cpp -#, fuzzy msgid "Transfer Mode" -msgstr "변형 타입" +msgstr "ì „ì†¡ 모드" #: core/io/packet_peer.cpp msgid "Encode Buffer Max Size" -msgstr "" +msgstr "ë²„í¼ ìµœëŒ€ í¬ê¸° ì¸ì½”딩" #: core/io/packet_peer.cpp msgid "Input Buffer Max Size" -msgstr "" +msgstr "ìž…ë ¥ ë²„í¼ ìµœëŒ€ í¬ê¸°" #: core/io/packet_peer.cpp msgid "Output Buffer Max Size" -msgstr "" +msgstr "ì¶œë ¥ ë²„í¼ ìµœëŒ€ í¬ê¸°" #: core/io/packet_peer.cpp msgid "Stream Peer" -msgstr "" +msgstr "스트림 피어" #: core/io/stream_peer.cpp -#, fuzzy msgid "Big Endian" -msgstr "ë¹… 엔디안" +msgstr "Big Endian" #: core/io/stream_peer.cpp msgid "Data Array" -msgstr "" +msgstr "ë°ì´í„° ë°°ì—´" #: core/io/stream_peer_ssl.cpp msgid "Blocking Handshake" -msgstr "" +msgstr "Handshake 차단" #: core/io/udp_server.cpp -#, fuzzy msgid "Max Pending Connections" -msgstr "ì—°ê²° 변경:" +msgstr "최대 대기 ì¤‘ì¸ ì—°ê²° 수" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -408,16 +372,15 @@ msgstr "'%s'ì„(를) 호출 시:" #: core/math/random_number_generator.cpp #: modules/opensimplex/open_simplex_noise.cpp msgid "Seed" -msgstr "" +msgstr "시드" #: core/math/random_number_generator.cpp -#, fuzzy msgid "State" msgstr "ìƒíƒœ" #: core/message_queue.cpp msgid "Message Queue" -msgstr "" +msgstr "메시지 대기열" #: core/message_queue.cpp msgid "Max Size (KB)" @@ -437,35 +400,30 @@ msgid "Shift" msgstr "Shift" #: core/os/input_event.cpp -#, fuzzy msgid "Control" -msgstr "ë²„ì „ 컨트롤" +msgstr "ì¡°ìž‘" #: core/os/input_event.cpp msgid "Meta" -msgstr "" +msgstr "메타" #: core/os/input_event.cpp -#, fuzzy msgid "Command" -msgstr "커뮤니티" +msgstr "ëª…ë ¹" #: core/os/input_event.cpp scene/2d/touch_screen_button.cpp #: scene/gui/base_button.cpp scene/gui/texture_button.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Pressed" -msgstr "프리셋" +msgstr "눌림" #: core/os/input_event.cpp -#, fuzzy msgid "Scancode" -msgstr "스캔" +msgstr "스캔코드" #: core/os/input_event.cpp -#, fuzzy msgid "Physical Scancode" -msgstr "물리 키" +msgstr "물리ì 스캔코드" #: core/os/input_event.cpp msgid "Unicode" @@ -473,27 +431,23 @@ msgstr "ìœ ë‹ˆì½”ë“œ" #: core/os/input_event.cpp msgid "Echo" -msgstr "" +msgstr "반복" #: core/os/input_event.cpp scene/gui/base_button.cpp -#, fuzzy msgid "Button Mask" -msgstr "버튼" +msgstr "버튼 마스í¬" #: core/os/input_event.cpp scene/2d/node_2d.cpp scene/gui/control.cpp -#, fuzzy msgid "Global Position" -msgstr "ìƒìˆ˜" +msgstr "ì „ì— ìœ„ì¹˜" #: core/os/input_event.cpp -#, fuzzy msgid "Factor" -msgstr "벡터" +msgstr "ê³µì‹" #: core/os/input_event.cpp -#, fuzzy msgid "Button Index" -msgstr "마우스 버튼 ì¸ë±ìФ:" +msgstr "버튼 ì¸ë±ìФ" #: core/os/input_event.cpp msgid "Doubleclick" @@ -501,25 +455,22 @@ msgstr "ë”블 í´ë¦" #: core/os/input_event.cpp msgid "Tilt" -msgstr "" +msgstr "기울ì´ê¸°" #: core/os/input_event.cpp -#, fuzzy msgid "Pressure" -msgstr "프리셋" +msgstr "ì••ë ¥" #: core/os/input_event.cpp -#, fuzzy msgid "Relative" -msgstr "ìƒëŒ€ì ì¸ ìŠ¤ëƒ…" +msgstr "ìƒëŒ€ì " #: core/os/input_event.cpp scene/2d/camera_2d.cpp scene/2d/cpu_particles_2d.cpp #: scene/3d/cpu_particles.cpp scene/3d/interpolated_camera.cpp #: scene/animation/animation_player.cpp scene/resources/environment.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Speed" -msgstr "ì†ë„:" +msgstr "ì†ë ¥" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: scene/3d/sprite_3d.cpp @@ -527,14 +478,12 @@ msgid "Axis" msgstr "ì¶•" #: core/os/input_event.cpp -#, fuzzy msgid "Axis Value" -msgstr "(ê°’)" +msgstr "ì¶• ê°’" #: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp -#, fuzzy msgid "Index" -msgstr "ì¸ë±ìФ:" +msgstr "ì¸ë±ìФ" #: core/os/input_event.cpp editor/project_settings_editor.cpp #: modules/visual_script/visual_script_nodes.cpp @@ -545,63 +494,55 @@ msgstr "ì•¡ì…˜" #: core/os/input_event.cpp scene/resources/environment.cpp #: scene/resources/material.cpp msgid "Strength" -msgstr "" +msgstr "힘" #: core/os/input_event.cpp msgid "Delta" -msgstr "" +msgstr "ë¸íƒ€" #: core/os/input_event.cpp -#, fuzzy msgid "Channel" -msgstr "바꾸기" +msgstr "채ë„" #: core/os/input_event.cpp main/main.cpp -#, fuzzy msgid "Message" -msgstr "커밋 변경사í•" +msgstr "메시지" #: core/os/input_event.cpp -#, fuzzy msgid "Pitch" -msgstr "Pitch:" +msgstr "피치" #: core/os/input_event.cpp scene/2d/cpu_particles_2d.cpp #: scene/2d/physics_body_2d.cpp scene/3d/cpu_particles.cpp #: scene/3d/physics_body.cpp scene/resources/particles_material.cpp -#, fuzzy msgid "Velocity" -msgstr "ì„ íšŒ ë·° 오른쪽으로" +msgstr "ì†ë„" #: core/os/input_event.cpp msgid "Instrument" -msgstr "" +msgstr "장비" #: core/os/input_event.cpp -#, fuzzy msgid "Controller Number" -msgstr "í–‰ 번호:" +msgstr "컨트롤러 번호" #: core/os/input_event.cpp msgid "Controller Value" -msgstr "" +msgstr "컨트롤러 ê°’" #: core/project_settings.cpp editor/editor_node.cpp main/main.cpp #: platform/iphone/export/export.cpp platform/osx/export/export.cpp #: platform/windows/export/export.cpp -#, fuzzy msgid "Application" -msgstr "ì•¡ì…˜" +msgstr "어플리케ì´ì…˜" #: core/project_settings.cpp main/main.cpp -#, fuzzy msgid "Config" -msgstr "스냅 구성" +msgstr "구성" #: core/project_settings.cpp -#, fuzzy msgid "Project Settings Override" -msgstr "프로ì 트 ì„¤ì •..." +msgstr "프로ì 트 ì„¤ì • ë®ì–´ì“°ê¸°" #: core/project_settings.cpp core/resource.cpp #: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp @@ -618,7 +559,7 @@ msgstr "ì´ë¦„" #: modules/visual_script/visual_script_nodes.cpp platform/uwp/export/export.cpp #: platform/windows/export/export.cpp msgid "Description" -msgstr "설명" +msgstr "ì„œìˆ " #: core/project_settings.cpp editor/editor_node.cpp editor/editor_settings.cpp #: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp @@ -632,36 +573,70 @@ msgid "Main Scene" msgstr "ë©”ì¸ ì”¬" #: core/project_settings.cpp -#, fuzzy msgid "Disable stdout" -msgstr "ì˜¤í† íƒ€ì¼ ë¹„í™œì„±í™”" +msgstr "표준 ì¶œë ¥ 비활성화" #: core/project_settings.cpp -#, fuzzy msgid "Disable stderr" -msgstr "ë¹„í™œì„±í™”ëœ í•목" +msgstr "표준 ì—러 비활성화" #: core/project_settings.cpp msgid "Use Hidden Project Data Directory" -msgstr "" +msgstr "프로ì íŠ¸ì˜ ìˆ¨ê²¨ì§„ ë°ì´í„° ë””ë ‰í† ë¦¬ 사용" #: core/project_settings.cpp msgid "Use Custom User Dir" -msgstr "" +msgstr "ì‚¬ìš©ìž ì§€ì • ë””ë ‰í† ë¦¬ 사용" #: core/project_settings.cpp msgid "Custom User Dir Name" +msgstr "ì‚¬ìš©ìž ì§€ì • ë””ë ‰í† ë¦¬ ì´ë¦„" + +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "ëª¨ë‘ í‘œì‹œ" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" msgstr "" +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "ë¼ì´íЏ" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "왼쪽 넓게" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "테스트" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" msgstr "오디오" #: core/project_settings.cpp -#, fuzzy msgid "Default Bus Layout" -msgstr "ë””í´íЏ 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì˜µë‹ˆë‹¤." +msgstr "기본 버스 ë ˆì´ì•„웃" #: core/project_settings.cpp editor/editor_export.cpp #: editor/editor_file_system.cpp editor/editor_node.cpp @@ -671,17 +646,16 @@ msgid "Editor" msgstr "ì—디터" #: core/project_settings.cpp -#, fuzzy msgid "Main Run Args" -msgstr "ë©”ì¸ ì”¬ ì¸ìˆ˜:" +msgstr "ë©”ì¸ ì‹¤í–‰ ì¸ìž" #: core/project_settings.cpp msgid "Search In File Extensions" -msgstr "" +msgstr "íŒŒì¼ í™•ìž¥ìžë¡œ 찾기" #: core/project_settings.cpp msgid "Script Templates Search Path" -msgstr "" +msgstr "스í¬ë¦½íЏ 템플릿 검색 경로" #: core/project_settings.cpp editor/editor_node.cpp #: editor/plugins/version_control_editor_plugin.cpp @@ -690,22 +664,20 @@ msgstr "ë²„ì „ 컨트롤" #: core/project_settings.cpp msgid "Autoload On Startup" -msgstr "" +msgstr "스타트업으로 ìžë™ 로드" #: core/project_settings.cpp -#, fuzzy msgid "Plugin Name" -msgstr "í”ŒëŸ¬ê·¸ì¸ ì´ë¦„:" +msgstr "í”ŒëŸ¬ê·¸ì¸ ì´ë¦„" #: core/project_settings.cpp scene/2d/collision_object_2d.cpp #: scene/3d/collision_object.cpp scene/gui/control.cpp -#, fuzzy msgid "Input" -msgstr "ìž…ë ¥ 추가" +msgstr "ìž…ë ¥" #: core/project_settings.cpp msgid "UI Accept" -msgstr "" +msgstr "UI ì ìš©" #: core/project_settings.cpp msgid "UI Select" @@ -716,51 +688,44 @@ msgid "UI Cancel" msgstr "UI 취소" #: core/project_settings.cpp -#, fuzzy msgid "UI Focus Next" -msgstr "경로 í¬ì»¤ìФ" +msgstr "ë‹¤ìŒ UI í¬ì»¤ìФ" #: core/project_settings.cpp -#, fuzzy msgid "UI Focus Prev" -msgstr "경로 í¬ì»¤ìФ" +msgstr "ì´ì „ UI í¬ì»¤ìФ" #: core/project_settings.cpp -#, fuzzy msgid "UI Left" -msgstr "UI 왼쪽" +msgstr "왼쪽 UI" #: core/project_settings.cpp -#, fuzzy msgid "UI Right" -msgstr "UI 오른쪽" +msgstr "오른쪽 UI" #: core/project_settings.cpp msgid "UI Up" -msgstr "" +msgstr "위쪽 UI" #: core/project_settings.cpp -#, fuzzy msgid "UI Down" -msgstr "아래" +msgstr "아래쪽 UI" #: core/project_settings.cpp -#, fuzzy msgid "UI Page Up" -msgstr "페ì´ì§€: " +msgstr "페ì´ì§€ ì—… UI" #: core/project_settings.cpp msgid "UI Page Down" -msgstr "" +msgstr "페ì´ì§€ 다운 UI" #: core/project_settings.cpp msgid "UI Home" -msgstr "" +msgstr "Home UI" #: core/project_settings.cpp -#, fuzzy msgid "UI End" -msgstr "ëì—서" +msgstr "End UI" #: core/project_settings.cpp main/main.cpp modules/bullet/register_types.cpp #: modules/bullet/space_bullet.cpp scene/2d/physics_body_2d.cpp @@ -769,9 +734,8 @@ msgstr "ëì—서" #: servers/physics/space_sw.cpp servers/physics_2d/physics_2d_server_sw.cpp #: servers/physics_2d/physics_2d_server_wrap_mt.h #: servers/physics_2d/space_2d_sw.cpp -#, fuzzy msgid "Physics" -msgstr " (물리)" +msgstr "물리" #: core/project_settings.cpp editor/editor_settings.cpp #: editor/import/resource_importer_layered_texture.cpp @@ -784,9 +748,8 @@ msgid "3D" msgstr "3D" #: core/project_settings.cpp -#, fuzzy msgid "Smooth Trimesh Collision" -msgstr "Trimesh ì½œë¦¬ì „ ë™ê¸° 만들기" +msgstr "부드러운 삼ê°ë§¤ì‰¬ ì¶©ëŒ" #: core/project_settings.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles2/rasterizer_scene_gles2.cpp @@ -808,18 +771,17 @@ msgstr "ë Œë”ë§" #: scene/resources/multimesh.cpp servers/visual/visual_server_scene.cpp #: servers/visual_server.cpp msgid "Quality" -msgstr "" +msgstr "품질" #: core/project_settings.cpp scene/animation/animation_tree.cpp #: scene/gui/file_dialog.cpp scene/main/scene_tree.cpp #: servers/visual_server.cpp -#, fuzzy msgid "Filters" -msgstr "í•„í„°:" +msgstr "í•„í„°" #: core/project_settings.cpp scene/main/viewport.cpp msgid "Sharpen Intensity" -msgstr "" +msgstr "ë‚ ì¹´ë¡œìš´ ê°•ë„" #: core/project_settings.cpp editor/editor_export.cpp editor/editor_node.cpp #: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp @@ -835,9 +797,8 @@ msgstr "디버그" #: core/project_settings.cpp main/main.cpp modules/gdscript/gdscript.cpp #: modules/visual_script/visual_script.cpp scene/resources/dynamic_font.cpp -#, fuzzy msgid "Settings" -msgstr "ì„¤ì •:" +msgstr "ì„¤ì •" #: core/project_settings.cpp editor/script_editor_debugger.cpp main/main.cpp #: modules/mono/mono_gd/gd_mono.cpp @@ -845,39 +806,36 @@ msgid "Profiler" msgstr "프로파ì¼ëŸ¬" #: core/project_settings.cpp -#, fuzzy msgid "Max Functions" -msgstr "함수 만들기" +msgstr "최대 함수 수" #: core/project_settings.cpp scene/3d/vehicle_body.cpp -#, fuzzy msgid "Compression" -msgstr "í‘œí˜„ì‹ ì„¤ì •" +msgstr "ì••ì¶•" #: core/project_settings.cpp -#, fuzzy msgid "Formats" msgstr "형ì‹" #: core/project_settings.cpp msgid "Zstd" -msgstr "" +msgstr "Zstd ì••ì¶• ì•Œê³ ë¦¬ì¦˜" #: core/project_settings.cpp msgid "Long Distance Matching" -msgstr "" +msgstr "장거리 매ì¹" #: core/project_settings.cpp msgid "Compression Level" -msgstr "" +msgstr "ì••ì¶• ë ˆë²¨" #: core/project_settings.cpp msgid "Window Log Size" -msgstr "" +msgstr "ì°½ 로그 í¬ê¸°" #: core/project_settings.cpp msgid "Zlib" -msgstr "Zlib" +msgstr "Zlib ì••ì¶• ë¼ì´ë¸ŒëŸ¬ë¦¬" #: core/project_settings.cpp msgid "Gzip" @@ -896,26 +854,24 @@ msgid "TCP" msgstr "TCP (ì „ì†¡ ì œì–´ í”„ë¡œí† ì½œ)" #: core/register_core_types.cpp -#, fuzzy msgid "Connect Timeout Seconds" -msgstr "ë©”ì„œë“œì— ì—°ê²°:" +msgstr "ì—°ê²° 타임아웃 시간" #: core/register_core_types.cpp msgid "Packet Peer Stream" -msgstr "" +msgstr "패킷 피어 스트림" #: core/register_core_types.cpp msgid "Max Buffer (Power of 2)" -msgstr "" +msgstr "최대 ë²„í¼ (2ì˜ ì œê³±ìˆ˜)" #: core/register_core_types.cpp editor/editor_settings.cpp main/main.cpp msgid "SSL" msgstr "SSL" #: core/register_core_types.cpp main/main.cpp -#, fuzzy msgid "Certificates" -msgstr "ì •ì :" +msgstr "ì¸ì¦" #: core/resource.cpp editor/dependency_editor.cpp #: editor/editor_resource_picker.cpp @@ -924,9 +880,8 @@ msgid "Resource" msgstr "리소스" #: core/resource.cpp -#, fuzzy msgid "Local To Scene" -msgstr "씬 닫기" +msgstr "로컬ì—서 씬으로" #: core/resource.cpp editor/dependency_editor.cpp #: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp @@ -945,16 +900,15 @@ msgstr "메시지" #: core/translation.cpp editor/project_settings_editor.cpp msgid "Locale" -msgstr "로케ì¼" +msgstr "위치" #: core/translation.cpp -#, fuzzy msgid "Test" msgstr "테스트" #: core/translation.cpp scene/resources/font.cpp msgid "Fallback" -msgstr "" +msgstr "í´ë°±" #: core/ustring.cpp scene/resources/segment_shape_2d.cpp msgid "B" @@ -995,12 +949,12 @@ msgstr "버í¼" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp msgid "Canvas Polygon Buffer Size (KB)" -msgstr "" +msgstr "캔버스 í´ë¦¬ê³¤ ë²„í¼ í¬ê¸° (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp msgid "Canvas Polygon Index Buffer Size (KB)" -msgstr "" +msgstr "캔버스 í´ë¦¬ê³¤ ì¸ë±ìФ ë²„í¼ í¬ê¸° (KB)" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp @@ -1015,9 +969,8 @@ msgstr "2D" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp -#, fuzzy msgid "Snapping" -msgstr "스마트 스냅" +msgstr "스내핑" #: drivers/gles2/rasterizer_canvas_base_gles2.cpp #: drivers/gles3/rasterizer_canvas_base_gles3.cpp @@ -1027,39 +980,37 @@ msgstr "GPU 픽셀 스냅 사용" #: drivers/gles2/rasterizer_scene_gles2.cpp #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Immediate Buffer Size (KB)" -msgstr "" +msgstr "Immediate ë²„í¼ í¬ê¸° (KB)" #: drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp -#, fuzzy msgid "Lightmapping" -msgstr "ë¼ì´íŠ¸ë§µ 굽기" +msgstr "ë¼ì´íЏ 매핑" #: drivers/gles2/rasterizer_storage_gles2.cpp #: drivers/gles3/rasterizer_storage_gles3.cpp msgid "Use Bicubic Sampling" -msgstr "" +msgstr "Bicubic ìƒ˜í”Œë§ ì‚¬ìš©" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Max Renderable Elements" -msgstr "" +msgstr "최대 ë Œë” ìš”ì†Œ 수" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Max Renderable Lights" -msgstr "" +msgstr "최대 ë Œë” ê´‘ì› ìˆ˜" #: drivers/gles3/rasterizer_scene_gles3.cpp -#, fuzzy msgid "Max Renderable Reflections" -msgstr "ì„ íƒ í•목 중앙으로" +msgstr "최대 ë Œë” ë°˜ì‚¬ 수" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Max Lights Per Object" -msgstr "" +msgstr "오브ì 트당 최대 ê´‘ì› ìˆ˜" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Subsurface Scattering" -msgstr "" +msgstr "서브서피스 산란" #: drivers/gles3/rasterizer_scene_gles3.cpp #: editor/import/resource_importer_texture.cpp @@ -1071,20 +1022,19 @@ msgstr "" #: scene/main/canvas_layer.cpp scene/resources/environment.cpp #: scene/resources/material.cpp scene/resources/particles_material.cpp msgid "Scale" -msgstr "스케ì¼" +msgstr "í¬ê¸°" #: drivers/gles3/rasterizer_scene_gles3.cpp -#, fuzzy msgid "Follow Surface" -msgstr "표면 채우기" +msgstr "서피스 따르기" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Weight Samples" -msgstr "" +msgstr "가중치 샘플" #: drivers/gles3/rasterizer_scene_gles3.cpp msgid "Voxel Cone Tracing" -msgstr "" +msgstr "ì›ë¿” ì¶”ì " #: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp msgid "High Quality" @@ -1092,7 +1042,7 @@ msgstr "ê³ í’ˆì§ˆ" #: drivers/gles3/rasterizer_storage_gles3.cpp msgid "Blend Shape Max Buffer Size (KB)" -msgstr "" +msgstr "ë¸”ë Œë“œ ë„형 최대 ë²„í¼ í¬ê¸° (KB)" #: editor/animation_bezier_editor.cpp msgid "Free" @@ -1201,7 +1151,7 @@ msgstr "3D 변형 트랙" #: editor/animation_track_editor.cpp msgid "Call Method Track" -msgstr "호출 메서드 트랙" +msgstr "메서드 호출 트랙" #: editor/animation_track_editor.cpp msgid "Bezier Curve Track" @@ -1256,7 +1206,7 @@ msgstr "ì´ íŠ¸ëž™ì„ ì¼œê¸°/ë„기를 í† ê¸€í•©ë‹ˆë‹¤." msgid "Update Mode (How this property is set)" msgstr "ì—…ë°ì´íЏ 모드 (ì´ ì†ì„±ì´ ì„¤ì •ë˜ëŠ” 방법)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "ë³´ê°„ 모드" @@ -1324,9 +1274,8 @@ msgid "Duplicate Key(s)" msgstr "키 ë³µì œ" #: editor/animation_track_editor.cpp -#, fuzzy msgid "Add RESET Value(s)" -msgstr "í”„ë ˆìž„ %dê°œ 추가" +msgstr "초기화 ê°’ 추가" #: editor/animation_track_editor.cpp msgid "Delete Key(s)" @@ -1355,7 +1304,6 @@ msgstr "ì• ë‹ˆë©”ì´ì…˜ 트랙 ì œê±°" #: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp #: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp #: modules/gridmap/grid_map_editor_plugin.cpp -#, fuzzy msgid "Editors" msgstr "ì—디터" @@ -1370,9 +1318,8 @@ msgid "Animation" msgstr "ì• ë‹ˆë©”ì´ì…˜" #: editor/animation_track_editor.cpp editor/editor_settings.cpp -#, fuzzy msgid "Confirm Insert Track" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 트랙 & 키 삽입" +msgstr "트랙 삽입하기" #. TRANSLATORS: %s will be replaced by a phrase describing the target of track. #: editor/animation_track_editor.cpp @@ -1519,7 +1466,7 @@ msgstr "메서드" #: editor/animation_track_editor.cpp msgid "Bezier" -msgstr "" +msgstr "ë² ì§€ì–´" #: editor/animation_track_editor.cpp #: modules/visual_script/visual_script_editor.cpp @@ -1541,9 +1488,8 @@ msgstr "" "ì´ ì„¤ì •ì€ ë‹¨ì¼ íŠ¸ëž™ì—ë§Œ ì ìš© 가능하므로 ë² ì§€ì–´ íŽ¸ì§‘ì— ì‚¬ìš©í• ìˆ˜ 없습니다." #: editor/animation_track_editor.cpp -#, fuzzy msgid "Anim Add RESET Keys" -msgstr "ì• ë‹ˆë©”ì´ì…˜ 키 스케ì¼" +msgstr "ì• ë‹ˆë©”ì´ì…˜ 리셋 키 추가" #: editor/animation_track_editor.cpp msgid "" @@ -1981,7 +1927,7 @@ msgstr "\"%s\" 시그ë„ì˜ ëª¨ë“ ì—°ê²°ì„ ì œê±°í•˜ì‹œê² ìŠµë‹ˆê¹Œ?" #: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp msgid "Signals" -msgstr "시그ë„" +msgstr "ì‹ í˜¸" #: editor/connections_dialog.cpp msgid "Filter signals" @@ -6140,6 +6086,11 @@ msgstr "%s를 눌러 ì •ìˆ˜ë¡œ 반올림합니다. Shift를 눌러 좀 ë” ì •ë° msgid "Flat" msgstr "플랫 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "ì½œë¦¬ì „ 모드" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "ê°€ì ¸ì˜¬ 노드 ì„ íƒ" @@ -6877,7 +6828,7 @@ msgstr "" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp msgid "sRGB" -msgstr "" +msgstr "sRGB" #: editor/import/resource_importer_layered_texture.cpp #, fuzzy @@ -12878,7 +12829,7 @@ msgstr "" #: editor/plugins/version_control_editor_plugin.cpp msgid "SSH Passphrase" -msgstr "" +msgstr "SSH Passphrase" #: editor/plugins/version_control_editor_plugin.cpp msgid "Detect new changes" @@ -16051,42 +16002,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "ëª¨ë‘ í‘œì‹œ" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "ë¼ì´íЏ" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "왼쪽 넓게" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "테스트" - #: main/main.cpp msgid "DPI" msgstr "" @@ -17959,7 +17874,7 @@ msgstr "" #: modules/visual_script/visual_script_flow_control.cpp msgid "While" -msgstr "" +msgstr "While" #: modules/visual_script/visual_script_flow_control.cpp msgid "while (cond):" @@ -20481,6 +20396,11 @@ msgstr "ìž˜ëª»ëœ í´ë¦¬ê³¤. ì ì–´ë„ '솔리드' 빌드 모드ì—서 ì 3ê°œê msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "ìž˜ëª»ëœ í´ë¦¬ê³¤. ì ì–´ë„ '세그먼트' 빌드 모드ì—서 ì 2개가 필요합니다." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22320,7 +22240,7 @@ msgstr "NavMesh 굽기" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24599,6 +24519,11 @@ msgstr "팬 모드" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "ë³´ê°„ 모드" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "ì…°ì´ë” ì—†ìŒ í‘œì‹œ" @@ -24632,11 +24557,6 @@ msgstr "다수 ì„¤ì •:" msgid "Process Priority" msgstr "ìš°ì„ ìˆœìœ„ 활성화" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "ë³´ê°„ 모드" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25348,6 +25268,11 @@ msgstr "ì´ë¦„ 있는 구분ìž" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "ìƒ‰ìƒ ì—°ì‚°ìž." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "ìƒ‰ìƒ í•목 ì´ë¦„ 바꾸기" @@ -26154,6 +26079,11 @@ msgstr "집중 모드" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "깊ì´" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "오프셋:" diff --git a/editor/translations/lt.po b/editor/translations/lt.po index e2a4f225ca..4850f0b982 100644 --- a/editor/translations/lt.po +++ b/editor/translations/lt.po @@ -81,11 +81,12 @@ msgstr "Atidaryti Skriptų Editorių" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -93,7 +94,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -105,7 +106,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -119,10 +120,11 @@ msgstr "" msgid "Position" msgstr "Sukurti NaujÄ…" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -603,6 +605,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1201,7 +1236,7 @@ msgstr "Ä®raÅ¡o koregavimas: įjungtas/ iÅ¡jungtas." msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpoliacijos režimas" @@ -5942,6 +5977,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Animacijos Nodas" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Pasirinkite Nodus, kuriuos norite importuoti" @@ -15816,38 +15856,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20064,6 +20072,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21752,7 +21765,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23861,6 +23874,11 @@ msgid "Pause Mode" msgstr "TimeScale Nodas" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpoliacijos režimas" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23891,11 +23909,6 @@ msgstr "" msgid "Process Priority" msgstr "Redaguoti Filtrus" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpoliacijos režimas" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -24561,6 +24574,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Versija:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "(Esama)" @@ -25339,6 +25357,10 @@ msgid "Distance Field" msgstr "Diegti" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/lv.po b/editor/translations/lv.po index 3329f559f5..2d4a4d6eb7 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -9,13 +9,14 @@ # StiLins <aigars.skilins@gmail.com>, 2020. # Rihards Kubilis <oldcar@inbox.lv>, 2020. # M E <gruffy7932@gmail.com>, 2021, 2022. +# D Ävis <dlektauers@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:02+0000\n" -"Last-Translator: M E <gruffy7932@gmail.com>\n" +"PO-Revision-Date: 2022-05-07 16:08+0000\n" +"Last-Translator: D Ävis <dlektauers@gmail.com>\n" "Language-Team: Latvian <https://hosted.weblate.org/projects/godot-engine/" "godot/lv/>\n" "Language: lv\n" @@ -24,16 +25,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n % 10 == 0 || n % 100 >= 11 && n % 100 <= " "19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2);\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" msgstr "" #: core/bind/core_bind.cpp -#, fuzzy msgid "Clipboard" -msgstr "Starpliktuve ir tukÅ¡a!" +msgstr "Starpliktuve" #: core/bind/core_bind.cpp #, fuzzy @@ -45,9 +45,8 @@ msgid "Exit Code" msgstr "" #: core/bind/core_bind.cpp -#, fuzzy msgid "V-Sync Enabled" -msgstr "IespÄ“jot" +msgstr "V-Sync ieslÄ“gts" #: core/bind/core_bind.cpp main/main.cpp msgid "V-Sync Via Compositor" @@ -72,34 +71,31 @@ msgid "Keep Screen On" msgstr "AtstÄt atkļūdotÄju atvÄ“rtu" #: core/bind/core_bind.cpp -#, fuzzy msgid "Min Window Size" -msgstr "Galvenais Skripts:" +msgstr "MazÄkais loga izmÄ“rs" #: core/bind/core_bind.cpp -#, fuzzy msgid "Max Window Size" -msgstr "Galvenais Skripts:" +msgstr "LielÄkais loga izmÄ“rs" #: core/bind/core_bind.cpp -#, fuzzy msgid "Screen Orientation" -msgstr "AtvÄ“rt dokumentÄciju" +msgstr "EkrÄna orientÄcija" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp -#, fuzzy +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" -msgstr "Jauns logs" +msgstr "Logs" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" -msgstr "" +msgstr "Bez apmales" #: core/bind/core_bind.cpp msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "PÄrslÄ“gt PilnekrÄnu" @@ -112,7 +108,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -126,10 +122,11 @@ msgstr "" msgid "Position" msgstr "Doka pozÄ«cija" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -171,7 +168,7 @@ msgstr "Fizikas kadrs %" #: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp msgid "Error" -msgstr "" +msgstr "Kļūda" #: core/bind/core_bind.cpp #, fuzzy @@ -612,6 +609,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "ParÄdÄ«t Visu" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Pa Kreisi, PlaÅ¡s" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "TestÄ“" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1209,7 +1242,7 @@ msgstr "PÄrslÄ“gt Å¡o celiņu ieslÄ“gts/izslÄ“gts." msgid "Update Mode (How this property is set)" msgstr "AtjaunoÅ¡anas Režīms (KÄ Å¡is mainÄ«gais tiek iestatÄ«ts)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "InterpolÄcijas režīms" @@ -6025,6 +6058,11 @@ msgstr "" msgid "Flat" msgstr "Plakans 1" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Sadursmes režīms" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15607,41 +15645,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "ParÄdÄ«t Visu" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Pa Kreisi, PlaÅ¡s" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "TestÄ“" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19865,6 +19868,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21574,7 +21582,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23721,6 +23729,11 @@ msgstr "MÄ“roga Režīms" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "InterpolÄcijas režīms" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "ParÄdÄ«t Visu" @@ -23754,11 +23767,6 @@ msgstr "Uzlikt vairÄkus:" msgid "Process Priority" msgstr "MÄ“roga Režīms" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "InterpolÄcijas režīms" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -24429,6 +24437,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "AtdalÄ«jums:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Funkcijas" @@ -25215,6 +25228,11 @@ msgid "Distance Field" msgstr "TraucÄ“jumu brÄ«vs režīms" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "Dziļums" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/mi.po b/editor/translations/mi.po index ccf4d87a9c..c5fe6170e1 100644 --- a/editor/translations/mi.po +++ b/editor/translations/mi.po @@ -63,11 +63,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -75,7 +76,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -87,7 +88,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -100,10 +101,11 @@ msgstr "" msgid "Position" msgstr "" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -553,6 +555,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1130,7 +1165,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5690,6 +5725,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15154,38 +15193,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19146,6 +19153,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20727,7 +20739,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22674,6 +22686,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22701,10 +22717,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23306,6 +23318,10 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +msgid "Font Separator" +msgstr "" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -23986,6 +24002,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/mk.po b/editor/translations/mk.po index 8a470c73e4..43ff9e4c40 100644 --- a/editor/translations/mk.po +++ b/editor/translations/mk.po @@ -72,11 +72,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -84,7 +85,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -96,7 +97,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -109,10 +110,11 @@ msgstr "" msgid "Position" msgstr "" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -567,6 +569,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1144,7 +1179,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5720,6 +5755,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15215,38 +15254,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19230,6 +19237,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20824,7 +20836,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22791,6 +22803,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22819,10 +22835,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23431,6 +23443,11 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Font Separator" +msgstr "СвојÑтва на анимацијата." + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -24120,6 +24137,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/ml.po b/editor/translations/ml.po index e5e378e680..138b1d6748 100644 --- a/editor/translations/ml.po +++ b/editor/translations/ml.po @@ -74,11 +74,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -86,7 +87,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -98,7 +99,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -112,10 +113,11 @@ msgstr "" msgid "Position" msgstr "ചലനം à´šàµà´±àµà´±àµ½" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -571,6 +573,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1149,7 +1184,7 @@ msgstr "à´ˆ വഴി à´“(ണോ/ഫോ) ആകàµà´•àµà´•." msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5733,6 +5768,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15230,38 +15269,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19261,6 +19268,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20867,7 +20879,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22844,6 +22856,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22872,10 +22888,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23496,6 +23508,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "ചലനം à´šàµà´±àµà´±àµ½" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "à´ªàµà´°à´µàµƒà´¤àµà´¤à´¿à´•ൾ:" @@ -24206,6 +24223,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/mr.po b/editor/translations/mr.po index d77bbd3c00..acc9653beb 100644 --- a/editor/translations/mr.po +++ b/editor/translations/mr.po @@ -71,11 +71,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -83,7 +84,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -95,7 +96,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -109,10 +110,11 @@ msgstr "" msgid "Position" msgstr "अâ€à¥…निमेशन टà¥à¤°à¥€" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -573,6 +575,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1152,7 +1187,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5726,6 +5761,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15228,38 +15267,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19269,6 +19276,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -20887,7 +20899,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22879,6 +22891,10 @@ msgid "Pause Mode" msgstr "पà¥à¤²à¥‡ मोड:" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22907,10 +22923,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23526,6 +23538,11 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Font Separator" +msgstr "संकà¥à¤°à¤®à¤£: " + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -24238,6 +24255,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/ms.po b/editor/translations/ms.po index 754d3f8667..673ad0ff22 100644 --- a/editor/translations/ms.po +++ b/editor/translations/ms.po @@ -86,12 +86,13 @@ msgstr "Saiz:" msgid "Screen Orientation" msgstr "Buka Dokumentasi" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Tetingkap Baru" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "Piksel Sempadan" @@ -100,7 +101,7 @@ msgstr "Piksel Sempadan" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Togol Skrin Penuh" @@ -113,7 +114,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -127,10 +128,11 @@ msgstr "" msgid "Position" msgstr "Kedudukan Dok" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -616,6 +618,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Paparkan Semua" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Kiri Lebar" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Menguji" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1218,7 +1256,7 @@ msgstr "Hidupkan / matikan trek ini." msgid "Update Mode (How this property is set)" msgstr "Kemas kini Mod (Bagaimana sifat ini ditetapkan)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Mod Interpolasi" @@ -6103,6 +6141,11 @@ msgstr "" msgid "Flat" msgstr "Flat 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Bentuk Perlanggaran Yang Boleh Dilihat" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Pilih Nod(Nod-nod) untuk Diimport" @@ -15850,41 +15893,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Paparkan Semua" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Kiri Lebar" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Menguji" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20150,6 +20158,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21877,7 +21890,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24049,6 +24062,11 @@ msgstr "Mod Pan" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Mod Interpolasi" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Paparkan Semua" @@ -24082,11 +24100,6 @@ msgstr "Tetapkan Pelbagai:" msgid "Process Priority" msgstr "Mod Alih" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Mod Interpolasi" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -24768,6 +24781,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Versi:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Keluarkan Item" @@ -25566,6 +25584,11 @@ msgstr "Mod Bebas Gangguan" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Kedalaman" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Grid Offset:" diff --git a/editor/translations/nb.po b/editor/translations/nb.po index ecbcf6d448..e6f25c2a6a 100644 --- a/editor/translations/nb.po +++ b/editor/translations/nb.po @@ -91,11 +91,12 @@ msgstr "Maks Vindustørrelse" msgid "Screen Orientation" msgstr "Skjermretning" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Vindu" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Rammeløs" @@ -103,7 +104,7 @@ msgstr "Rammeløs" msgid "Per Pixel Transparency Enabled" msgstr "Per Piksel Gjennomsiktighet Aktivert" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Fullskjerm" @@ -115,7 +116,7 @@ msgstr "Maksimert" msgid "Minimized" msgstr "Minimert" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp #, fuzzy msgid "Resizable" @@ -129,10 +130,11 @@ msgstr "Kan Endre Størrelse" msgid "Position" msgstr "Posisjon" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -600,6 +602,43 @@ msgstr "Bruk Tilpasset Brukerkatalog" msgid "Custom User Dir Name" msgstr "Tilpasset Brukerkatalognavn" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Vis alle" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Lys" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Venstrevisning" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Tester" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1211,7 +1250,7 @@ msgstr "SlÃ¥ sporet av/pÃ¥." msgid "Update Mode (How this property is set)" msgstr "Oppdateringsmodus (Hvordan denne egenskapen settes)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolasjonsmodus" @@ -6199,6 +6238,11 @@ msgstr "" msgid "Flat" msgstr "Flat0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Kollisjon Modus" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Velg node(r) som skal importeres" @@ -16448,42 +16492,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Vis alle" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Lys" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Venstrevisning" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Tester" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20893,6 +20901,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22661,7 +22674,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24870,6 +24883,11 @@ msgstr "Panorerings-Modus" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolasjonsmodus" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Vis alle" @@ -24903,11 +24921,6 @@ msgstr "Sett mange:" msgid "Process Priority" msgstr "Rediger Filtre" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolasjonsmodus" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25603,6 +25616,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Nummereringer:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Fjern Gjenstand" @@ -26406,6 +26424,11 @@ msgstr "Distraksjonsfri Modus" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Dybde" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Avstand:" diff --git a/editor/translations/nl.po b/editor/translations/nl.po index ca718216df..5fb29c5fcc 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -134,12 +134,13 @@ msgstr "Omlijningsgrootte:" msgid "Screen Orientation" msgstr "Scherm operator." -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Nieuw Venster" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "Randpixels" @@ -148,7 +149,7 @@ msgstr "Randpixels" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Volledig scherm" @@ -162,7 +163,7 @@ msgstr "" msgid "Minimized" msgstr "Initialiseren" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -176,10 +177,11 @@ msgstr "" msgid "Position" msgstr "Tabbladpositie" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -678,6 +680,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Alles tonen" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Licht" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Linkerbreedte" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Testen" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1288,7 +1327,7 @@ msgstr "Schakel deze track aan/uit." msgid "Update Mode (How this property is set)" msgstr "Bijwerkmodus (hoe de eigenschap ingesteld wordt)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolatiemodus" @@ -6208,6 +6247,11 @@ msgstr "" msgid "Flat" msgstr "Plat 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Botsingsmodus" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Selecteer een of meer knopen om te importeren" @@ -16324,42 +16368,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Alles tonen" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Licht" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Linkerbreedte" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Testen" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20789,6 +20797,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22633,7 +22646,7 @@ msgstr "Bak NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24900,6 +24913,11 @@ msgstr "Verschuifmodus" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolatiemodus" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Weergave Zonder Shading" @@ -24933,11 +24951,6 @@ msgstr "Zet Meerdere:" msgid "Process Priority" msgstr "Prioriteit Inschakelen" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolatiemodus" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25646,6 +25659,11 @@ msgstr "Genoemde Sep." #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Color operator." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Class Items Verwijderen" @@ -26452,6 +26470,11 @@ msgstr "Afleidingsvrijemodus" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Diepte" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Afstand:" diff --git a/editor/translations/or.po b/editor/translations/or.po index d8832dfc66..0178876256 100644 --- a/editor/translations/or.po +++ b/editor/translations/or.po @@ -69,11 +69,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -81,7 +82,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -93,7 +94,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -106,10 +107,11 @@ msgstr "" msgid "Position" msgstr "" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -559,6 +561,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1136,7 +1171,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5696,6 +5731,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15160,38 +15199,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19152,6 +19159,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20733,7 +20745,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22680,6 +22692,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22707,10 +22723,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23312,6 +23324,10 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +msgid "Font Separator" +msgstr "" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -23992,6 +24008,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 9cb6e1441a..9f087146df 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -59,13 +59,15 @@ # Katarzyna Twardowska <katarina.twardowska@gmail.com>, 2022. # Mateusz ZdrzaÅ‚ek <matjozohd@gmail.com>, 2022. # Konrad <kobe-interactive@protonmail.com>, 2022. +# Pixel Zone - Godot Engine Tutorials <karoltomaszewskimusic@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-04 13:05+0000\n" -"Last-Translator: Tomek <kobewi4e@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 20:00+0000\n" +"Last-Translator: Pixel Zone - Godot Engine Tutorials " +"<karoltomaszewskimusic@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" "Language: pl\n" @@ -74,7 +76,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -128,11 +130,12 @@ msgstr "Maks. rozmiar okna" msgid "Screen Orientation" msgstr "Orientacja ekranu" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Okno" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Bez obramowania" @@ -140,7 +143,7 @@ msgstr "Bez obramowania" msgid "Per Pixel Transparency Enabled" msgstr "Włączona przezroczystość na piksel" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "PeÅ‚ny ekran" @@ -152,7 +155,7 @@ msgstr "Zmaksymalizowane" msgid "Minimized" msgstr "Zminimalizowane" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Zmienny rozmiar" @@ -165,10 +168,11 @@ msgstr "Zmienny rozmiar" msgid "Position" msgstr "Pozycja" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -178,7 +182,7 @@ msgstr "Rozmiar" #: core/bind/core_bind.cpp msgid "Endian Swap" -msgstr "" +msgstr "Zamiana Endian" #: core/bind/core_bind.cpp msgid "Editor Hint" @@ -278,7 +282,7 @@ msgstr "Rozmiar strony" #: core/io/file_access_network.cpp msgid "Page Read Ahead" -msgstr "" +msgstr "Strona czytana z wyprzedzeniem" #: core/io/http_client.cpp msgid "Blocking Mode Enabled" @@ -619,6 +623,43 @@ msgstr "Użyj niestandardowego katalogu użytkownika" msgid "Custom User Dir Name" msgstr "WÅ‚asna nazwa katalogu użytkownika" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Pokaż wszystko" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "Szerokość" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "ÅšwiatÅ‚o" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "Zawsze na wierzchu" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "RozciÄ…gnij po lewej" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Testowanie" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1198,7 +1239,7 @@ msgstr "Włącz/wyłącz Å›cieżkÄ™." msgid "Update Mode (How this property is set)" msgstr "Sposób odÅ›wieżania (jak ta wÅ‚aÅ›ciwość jest ustawiana)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Sposób interpolacji" @@ -6107,6 +6148,11 @@ msgstr "" msgid "Flat" msgstr "PÅ‚askie 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Tryb kolizji" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Wybierz wÄ™zÅ‚y do importu" @@ -16069,42 +16115,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Pokaż wszystko" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "Szerokość" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "ÅšwiatÅ‚o" - -#: main/main.cpp -msgid "Always On Top" -msgstr "Zawsze na wierzchu" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "RozciÄ…gnij po lewej" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Testowanie" - #: main/main.cpp #, fuzzy msgid "DPI" @@ -20526,6 +20536,11 @@ msgstr "" "NieprawidÅ‚owy wielokÄ…t. Co najmniej 3 punkty sÄ… potrzebne do trybu budowania " "\"Segments\"." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22385,9 +22400,10 @@ msgid "NavMesh" msgstr "Przygotuj NavMesh" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "NavigationObstacle sÅ‚uży jedynie do zapewnienia unikania kolizji dla obiektu " "przestrzennego." @@ -24680,6 +24696,11 @@ msgstr "Tryb przesuwania" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Sposób interpolacji" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Widok bezcieniowy" @@ -24713,11 +24734,6 @@ msgstr "Ustaw wiele:" msgid "Process Priority" msgstr "Włącz priorytety" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Sposób interpolacji" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25430,6 +25446,11 @@ msgstr "Nazwany separator" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Operator koloru." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "ZmieÅ„ nazwÄ™ elementu koloru" @@ -26239,6 +26260,11 @@ msgstr "Tryb bez rozproszeÅ„" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Głębia" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "PrzesuniÄ™cie:" diff --git a/editor/translations/pr.po b/editor/translations/pr.po index 95fc632433..3b097a5b8b 100644 --- a/editor/translations/pr.po +++ b/editor/translations/pr.po @@ -80,11 +80,12 @@ msgstr "Edit" msgid "Screen Orientation" msgstr "Yer functions:" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -92,7 +93,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -104,7 +105,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -118,10 +119,11 @@ msgstr "" msgid "Position" msgstr "Discharge ye' Signal" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -598,6 +600,40 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Yar, Blow th' Selected Down!" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1199,7 +1235,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5933,6 +5969,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Ye be fixin' Signal:" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15834,39 +15875,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Yar, Blow th' Selected Down!" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20103,6 +20111,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21778,7 +21791,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23872,6 +23885,11 @@ msgid "Pause Mode" msgstr "Slit th' Node" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Yer functions:" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23902,11 +23920,6 @@ msgstr "" msgid "Process Priority" msgstr "Edit yer Variable:" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Yer functions:" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -24569,6 +24582,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Yer functions:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Discharge ye' Variable" @@ -25338,6 +25356,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/pt.po b/editor/translations/pt.po index 7cdba4348c..0f00e31cfe 100644 --- a/editor/translations/pt.po +++ b/editor/translations/pt.po @@ -91,11 +91,12 @@ msgstr "Tamanho máximo da janela" msgid "Screen Orientation" msgstr "Orientação da tela" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Janela" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Sem bordas" @@ -103,7 +104,7 @@ msgstr "Sem bordas" msgid "Per Pixel Transparency Enabled" msgstr "Transparência por pixel ativada" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Tela cheia" @@ -115,7 +116,7 @@ msgstr "Maximizado" msgid "Minimized" msgstr "Minimizado" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Redimensionável" @@ -128,10 +129,11 @@ msgstr "Redimensionável" msgid "Position" msgstr "Posição" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -603,6 +605,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Mostrar Tudo" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Luz" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Esquerda Wide" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Em teste" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1202,7 +1241,7 @@ msgstr "Alternar esta pista on/off." msgid "Update Mode (How this property is set)" msgstr "Modo Atualização (Como esta propriedade é definida)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Modo de Interpolação" @@ -6086,6 +6125,11 @@ msgstr "" msgid "Flat" msgstr "Plano 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Modo Colisão" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Selecionar Nó(s) para Importar" @@ -16012,42 +16056,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Mostrar Tudo" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Luz" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Esquerda Wide" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Em teste" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20428,6 +20436,11 @@ msgstr "" "PolÃgono inválido. São precisos pelo menos 2 pontos no modo de construção " "'Segmentos'." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22271,9 +22284,10 @@ msgid "NavMesh" msgstr "Consolidar NavMesh" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "NavigationObstacle serve apenas para fornecer prevenção de colisão a um " "objeto espacial." @@ -24559,6 +24573,11 @@ msgstr "Modo deslocamento" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Modo de Interpolação" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Vista sem sombras" @@ -24592,11 +24611,6 @@ msgstr "Definir Múltiplo:" msgid "Process Priority" msgstr "Ativar Prioridade" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Modo de Interpolação" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25310,6 +25324,11 @@ msgstr "Separador Nomeado" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Operador de Cor." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Renomear Item Cor" @@ -26115,6 +26134,11 @@ msgstr "Modo Livre de Distrações" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Profundidade" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Compensação:" diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po index ea8089b407..06f450b222 100644 --- a/editor/translations/pt_BR.po +++ b/editor/translations/pt_BR.po @@ -138,13 +138,14 @@ # Douglas S. Elias <douglassantoselias@gmail.com>, 2022. # Daniel Abrante <danielabrante@protonmail.com>, 2022. # blue wemes <bluewemes@gmail.com>, 2022. +# José Miranda Neto <dodimi95@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: 2016-05-30\n" -"PO-Revision-Date: 2022-05-03 07:14+0000\n" -"Last-Translator: Douglas Leão <djlsplays@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:38+0000\n" +"Last-Translator: José Miranda Neto <dodimi95@gmail.com>\n" "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_BR/>\n" "Language: pt_BR\n" @@ -152,7 +153,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -206,11 +207,12 @@ msgstr "Tamanho Máximo da Janela" msgid "Screen Orientation" msgstr "Orientação da Tela" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Janela" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Sem Bordas" @@ -218,7 +220,7 @@ msgstr "Sem Bordas" msgid "Per Pixel Transparency Enabled" msgstr "Transparência Por Pixel Ativada" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Tela Cheia" @@ -230,7 +232,7 @@ msgstr "Maximizado" msgid "Minimized" msgstr "Minimizado" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Redimensionável" @@ -243,10 +245,11 @@ msgstr "Redimensionável" msgid "Position" msgstr "Posição" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -513,7 +516,7 @@ msgstr "Meta" #: core/os/input_event.cpp msgid "Command" -msgstr "Command" +msgstr "Comando" #: core/os/input_event.cpp scene/2d/touch_screen_button.cpp #: scene/gui/base_button.cpp scene/gui/texture_button.cpp @@ -696,6 +699,43 @@ msgstr "Usar Diretório de Usuário Personalizado" msgid "Custom User Dir Name" msgstr "Nome do Diretório de Usuário Personalizado" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Exibir Tudo" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Luz" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Largura Esquerda" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Testando" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1276,7 +1316,7 @@ msgstr "Ligar/desligar esta faixa." msgid "Update Mode (How this property is set)" msgstr "Modo de Atualização (Como esta propriedade é setada)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Modo de Interpolação" @@ -6156,6 +6196,11 @@ msgstr "" msgid "Flat" msgstr "Plano 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Modo Colisão" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Selecione Nó(s) para Importar" @@ -16109,42 +16154,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Exibir Tudo" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Luz" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Largura Esquerda" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Testando" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20526,6 +20535,11 @@ msgstr "" "PolÃgono inválido. Pelo menos 2 pontos são necessários no modo de construção " "\"Segmentos\"." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22311,7 +22325,7 @@ msgstr "Bake NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24574,6 +24588,11 @@ msgstr "Modo Panorâmico" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Modo de Interpolação" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Exibir Sem Sombreamento" @@ -24607,11 +24626,6 @@ msgstr "Definir Múltiplos:" msgid "Process Priority" msgstr "Ativar Prioridade" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Modo de Interpolação" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25325,6 +25339,11 @@ msgstr "Separador Nomeado" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Separador de Cor da Fonte" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Renomear Item de Cor" @@ -26128,6 +26147,11 @@ msgstr "Modo Sem Distrações" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Profundidade" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Deslocamento:" diff --git a/editor/translations/ro.po b/editor/translations/ro.po index cce96e98c0..908a718dba 100644 --- a/editor/translations/ro.po +++ b/editor/translations/ro.po @@ -17,13 +17,14 @@ # R3ktGamerRO <bluegamermc1@gmail.com>, 2021. # FlooferLand <yunaflarf@gmail.com>, 2021, 2022. # N3mEee <n3mebusiness@gmail.com>, 2021. +# Psynt <nichita@cadvegra.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-29 02:53+0000\n" -"Last-Translator: FlooferLand <yunaflarf@gmail.com>\n" +"PO-Revision-Date: 2022-05-15 09:38+0000\n" +"Last-Translator: Psynt <nichita@cadvegra.com>\n" "Language-Team: Romanian <https://hosted.weblate.org/projects/godot-engine/" "godot/ro/>\n" "Language: ro\n" @@ -32,16 +33,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" msgstr "" #: core/bind/core_bind.cpp -#, fuzzy msgid "Clipboard" -msgstr "Clipboardul este gol!" +msgstr "Clipboard" #: core/bind/core_bind.cpp msgid "Current Screen" @@ -77,47 +77,43 @@ msgid "Keep Screen On" msgstr "" #: core/bind/core_bind.cpp -#, fuzzy msgid "Min Window Size" -msgstr "Dimensiunea Conturului:" +msgstr "Dimensiune Minima" #: core/bind/core_bind.cpp -#, fuzzy msgid "Max Window Size" -msgstr "Dimensiunea Conturului:" +msgstr "Dimensiune Maxima" #: core/bind/core_bind.cpp -#, fuzzy msgid "Screen Orientation" -msgstr "Deschide Recente" +msgstr "Orientare Ecran" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp -#, fuzzy +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" -msgstr "Fereastră Nouă" +msgstr "Fereastră" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" -msgstr "" +msgstr "Fara margini" #: core/bind/core_bind.cpp msgid "Per Pixel Transparency Enabled" -msgstr "" +msgstr "Transparenta per Pixel" -#: core/bind/core_bind.cpp main/main.cpp -#, fuzzy +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" -msgstr "Comutare ecran complet" +msgstr "Fullscreen" #: core/bind/core_bind.cpp msgid "Maximized" -msgstr "" +msgstr "Maximizat" #: core/bind/core_bind.cpp msgid "Minimized" -msgstr "" +msgstr "Minimizat" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -127,14 +123,14 @@ msgstr "" #: scene/3d/physics_body.cpp scene/3d/remote_transform.cpp #: scene/gui/control.cpp scene/gui/line_edit.cpp #: scene/resources/default_theme/default_theme.cpp -#, fuzzy msgid "Position" -msgstr "PoziÈ›ia Dock-ului" +msgstr "PoziÈ›ie" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -144,26 +140,23 @@ msgstr "Mărimea" #: core/bind/core_bind.cpp msgid "Endian Swap" -msgstr "" +msgstr "Inversiune Endian" #: core/bind/core_bind.cpp -#, fuzzy msgid "Editor Hint" -msgstr "Editor" +msgstr "Indiciu Editor" #: core/bind/core_bind.cpp msgid "Print Error Messages" msgstr "" #: core/bind/core_bind.cpp -#, fuzzy msgid "Iterations Per Second" -msgstr "Mod Intercalare" +msgstr "Iteratii pe Secunda" #: core/bind/core_bind.cpp -#, fuzzy msgid "Target FPS" -msgstr "Suprafață Èšintă:" +msgstr "Frecvență Èšintă" #: core/bind/core_bind.cpp #, fuzzy @@ -221,9 +214,8 @@ msgstr "" #: modules/visual_script/visual_script_func_nodes.cpp #: modules/visual_script/visual_script_nodes.cpp #: scene/resources/visual_shader_nodes.cpp -#, fuzzy msgid "Function" -msgstr "FuncÈ›ii" +msgstr "FuncÈ›ie" #: core/image.cpp core/packed_data_container.cpp #: modules/minimp3/audio_stream_mp3.cpp @@ -251,7 +243,7 @@ msgstr "ȘtergeÈ›i" #: core/io/file_access_network.cpp msgid "Page Size" -msgstr "" +msgstr "Marime Pagina" #: core/io/file_access_network.cpp msgid "Page Read Ahead" @@ -262,9 +254,8 @@ msgid "Blocking Mode Enabled" msgstr "" #: core/io/http_client.cpp -#, fuzzy msgid "Connection" -msgstr "ConectaÈ›i" +msgstr "Conexie" #: core/io/http_client.cpp msgid "Read Chunk Size" @@ -272,7 +263,7 @@ msgstr "" #: core/io/marshalls.cpp msgid "Object ID" -msgstr "" +msgstr "ID Obiect" #: core/io/multiplayer_api.cpp core/io/packet_peer.cpp #, fuzzy @@ -281,7 +272,7 @@ msgstr "Activează Onion Skinning" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp msgid "Refuse New Network Connections" -msgstr "" +msgstr "Refuza Conexiuni noi pe retea" #: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp #, fuzzy @@ -289,19 +280,16 @@ msgid "Network Peer" msgstr "Analizator Network" #: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp -#, fuzzy msgid "Root Node" -msgstr "RedenumeÈ™te" +msgstr "Radacina" #: core/io/networked_multiplayer_peer.cpp -#, fuzzy msgid "Refuse New Connections" -msgstr "ConectaÈ›i" +msgstr "Refuza Conexiuni noi" #: core/io/networked_multiplayer_peer.cpp -#, fuzzy msgid "Transfer Mode" -msgstr "Mod ÃŽn Jur" +msgstr "Mod Transfer" #: core/io/packet_peer.cpp msgid "Encode Buffer Max Size" @@ -618,6 +606,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "AfiÈ™ează Tot" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Stânga liniară" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Se Testează" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1222,7 +1246,7 @@ msgstr "Comutează această pistă pornit/oprit." msgid "Update Mode (How this property is set)" msgstr "Modul Actualizare (Cum este setată această proprietate)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Mod Intercalare" @@ -2188,10 +2212,9 @@ msgstr "Dezvoltator Principal" #. TRANSLATORS: This refers to a job title. #: editor/editor_about.cpp -#, fuzzy msgctxt "Job Title" msgid "Project Manager" -msgstr "Manager de Proiect " +msgstr "Manager de Proiect" #: editor/editor_about.cpp msgid "Developers" @@ -3234,7 +3257,7 @@ msgstr "Clasă:" #: editor/editor_help.cpp editor/scene_tree_editor.cpp #: editor/script_create_dialog.cpp msgid "Inherits:" -msgstr "MoÈ™teneÈ™te:" +msgstr "Mosteneste:" #: editor/editor_help.cpp msgid "Inherited by:" @@ -6107,6 +6130,11 @@ msgstr "" msgid "Flat" msgstr "Plat0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Nod de AnimaÈ›ie" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Selectează Nodul(rile) pentru Importare" @@ -14509,10 +14537,9 @@ msgstr "" #. TRANSLATORS: This refers to the application where users manage their Godot projects. #: editor/project_manager.cpp -#, fuzzy msgctxt "Application" msgid "Project Manager" -msgstr "Manager de Proiect " +msgstr "Manager de Proiect" #: editor/project_manager.cpp #, fuzzy @@ -16222,41 +16249,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "AfiÈ™ează Tot" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Stânga liniară" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Se Testează" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20598,6 +20590,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -20730,9 +20727,8 @@ msgstr "Mască de Emisie" #: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp #: scene/resources/particles_material.cpp -#, fuzzy msgid "Sphere Radius" -msgstr "Sursă de Emisie: " +msgstr "Sursă de Emisie:" #: scene/2d/cpu_particles_2d.cpp msgid "Rect Extents" @@ -22343,7 +22339,7 @@ msgstr "Mesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24532,6 +24528,11 @@ msgstr "Mod ÃŽn Jur" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Mod Intercalare" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "AfiÈ™ează Tot" @@ -24565,11 +24566,6 @@ msgstr "Seteaza Multiple:" msgid "Process Priority" msgstr "Editează Filtrele" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Mod Intercalare" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25256,6 +25252,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Enumerări:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "RedenumiÅ£i Autoload" @@ -25945,9 +25946,8 @@ msgid "Distance" msgstr "Instanță" #: scene/resources/environment.cpp -#, fuzzy msgid "Transition" -msgstr "TranziÈ›ie: " +msgstr "TranziÈ›ie:" #: scene/resources/environment.cpp msgid "DOF Near Blur" @@ -26055,6 +26055,11 @@ msgstr "Modul Fără Distrageri" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Adâncime" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Compensare Grilă:" @@ -26232,9 +26237,8 @@ msgid "Metallic Specular" msgstr "" #: scene/resources/material.cpp -#, fuzzy msgid "Metallic Texture" -msgstr "Sursă de Emisie: " +msgstr "Textura Metalica" #: scene/resources/material.cpp msgid "Metallic Texture Channel" @@ -26270,9 +26274,8 @@ msgid "Emission On UV2" msgstr "Mască de Emisie" #: scene/resources/material.cpp -#, fuzzy msgid "Emission Texture" -msgstr "Sursă de Emisie: " +msgstr "Textura Emisiei" #: scene/resources/material.cpp msgid "NormalMap" @@ -26356,14 +26359,12 @@ msgid "Subsurf Scatter" msgstr "" #: scene/resources/material.cpp -#, fuzzy msgid "Transmission" -msgstr "TranziÈ›ie: " +msgstr "Transmisie" #: scene/resources/material.cpp -#, fuzzy msgid "Transmission Texture" -msgstr "TranziÈ›ie: " +msgstr "Textura Transmisie" #: scene/resources/material.cpp #, fuzzy @@ -26579,9 +26580,8 @@ msgid "Point Texture" msgstr "Puncte de Emisie:" #: scene/resources/particles_material.cpp -#, fuzzy msgid "Normal Texture" -msgstr "Sursă de Emisie: " +msgstr "Textura Normala" #: scene/resources/particles_material.cpp #, fuzzy diff --git a/editor/translations/ru.po b/editor/translations/ru.po index 457ae88277..66d8befc49 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -111,12 +111,13 @@ # Rish Alternative <ii4526668@gmail.com>, 2022. # MRSEEO <mr.seeo@mail.ru>, 2022. # Ortje <pappinenart@gmail.com>, 2022. +# Павел <Humani.apparatus.1960@gmail.com>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-05-05 10:10+0000\n" +"PO-Revision-Date: 2022-05-17 21:38+0000\n" "Last-Translator: MRSEEO <mr.seeo@mail.ru>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" @@ -126,7 +127,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.12.1\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -180,11 +181,12 @@ msgstr "МакÑимальный размер окна" msgid "Screen Orientation" msgstr "ÐžÑ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ñкрана" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Окно" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Без границ" @@ -192,7 +194,7 @@ msgstr "Без границ" msgid "Per Pixel Transparency Enabled" msgstr "ПопикÑÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾Ð·Ñ€Ð°Ñ‡Ð½Ð¾Ñть включена" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "ПолноÑкранный режим" @@ -204,7 +206,7 @@ msgstr "МакÑимизировано" msgid "Minimized" msgstr "Свёрнуто" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "ИзменÑемый размер" @@ -217,10 +219,11 @@ msgstr "ИзменÑемый размер" msgid "Position" msgstr "ПозициÑ" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -673,6 +676,39 @@ msgstr "ИÑпользовать ÑобÑтвенную директорию дРmsgid "Custom User Dir Name" msgstr "Ð˜Ð¼Ñ ÑобÑтвенной директории данных пользователÑ" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "ДиÑплей" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "Ширина" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "Ð’Ñ‹Ñота" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "Ð’Ñегда Ñверху" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "ТеÑÑ‚Ð¾Ð²Ð°Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð°" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "ТеÑÑ‚Ð¾Ð²Ð°Ñ Ð²Ñ‹Ñота" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -879,7 +915,7 @@ msgstr "Размер журнала окна" #: core/project_settings.cpp msgid "Zlib" -msgstr "Zlib" +msgstr "Зlib" #: core/project_settings.cpp msgid "Gzip" @@ -1250,7 +1286,7 @@ msgstr "Включить/выключить Ñтот трек." msgid "Update Mode (How this property is set)" msgstr "Режим Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ (как Ñто ÑвойÑтво уÑтанавливаетÑÑ)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Режим интерполÑции" @@ -2754,24 +2790,23 @@ msgstr "Формат текÑтур" #: editor/editor_export.cpp msgid "BPTC" -msgstr "" +msgstr "BPTC" #: editor/editor_export.cpp platform/osx/export/export.cpp msgid "S3TC" -msgstr "" +msgstr "S3TC" #: editor/editor_export.cpp platform/osx/export/export.cpp msgid "ETC" -msgstr "" +msgstr "ETC" #: editor/editor_export.cpp platform/osx/export/export.cpp msgid "ETC2" -msgstr "" +msgstr "ETC2" #: editor/editor_export.cpp -#, fuzzy msgid "No BPTC Fallbacks" -msgstr "ЗапаÑной вариант" +msgstr "ЗапаÑной вариант BPTC" #: editor/editor_export.cpp platform/android/export/export_plugin.cpp #: platform/iphone/export/export.cpp platform/javascript/export/export.cpp @@ -6010,6 +6045,11 @@ msgstr "" msgid "Flat" msgstr "ПлоÑкаÑ" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Коллайдер" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Выберите узлы Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°" @@ -6681,16 +6721,15 @@ msgstr "Управление группами" #: editor/import/editor_import_collada.cpp msgid "Collada" -msgstr "Collada" +msgstr "ColladA" #: editor/import/editor_import_collada.cpp msgid "Use Ambient" msgstr "ИÑпользовать Ambient" #: editor/import/resource_importer_bitmask.cpp -#, fuzzy msgid "Create From" -msgstr "Создать из" +msgstr "Сотворить из" #: editor/import/resource_importer_bitmask.cpp #: servers/audio/effects/audio_effect_compressor.cpp @@ -6710,9 +6749,8 @@ msgid "Delimiter" msgstr "Разделитель" #: editor/import/resource_importer_layered_texture.cpp -#, fuzzy msgid "ColorCorrect" -msgstr "Ð¦Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ ÐºÐ¾Ñ€Ñ€ÐµÐºÑ†Ð¸Ñ" +msgstr "ЦветокоррекциÑ" #: editor/import/resource_importer_layered_texture.cpp msgid "No BPTC If RGB" @@ -6751,52 +6789,46 @@ msgstr "Ðнизотропный" #: editor/import/resource_importer_layered_texture.cpp #: editor/import/resource_importer_texture.cpp msgid "sRGB" -msgstr "" +msgstr "sRGÐ’" #: editor/import/resource_importer_layered_texture.cpp -#, fuzzy msgid "Slices" -msgstr "ÐвтоматичеÑки" +msgstr "Ðарезчик" #: editor/import/resource_importer_layered_texture.cpp #: scene/gui/aspect_ratio_container.cpp scene/gui/control.cpp #: scene/gui/nine_patch_rect.cpp scene/gui/scroll_container.cpp #: scene/resources/style_box.cpp msgid "Horizontal" -msgstr "Горизонтальный" +msgstr "Горизонталь" #: editor/import/resource_importer_layered_texture.cpp #: scene/gui/aspect_ratio_container.cpp scene/gui/control.cpp #: scene/gui/nine_patch_rect.cpp scene/gui/scroll_container.cpp #: scene/resources/style_box.cpp msgid "Vertical" -msgstr "Вертикальный" +msgstr "Вертикаль" #: editor/import/resource_importer_obj.cpp -#, fuzzy msgid "Generate Tangents" -msgstr "Генерировать точки" +msgstr "Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ ÐºÐ°Ñательной" #: editor/import/resource_importer_obj.cpp -#, fuzzy msgid "Scale Mesh" -msgstr "Режим маÑштабированиÑ" +msgstr "МаÑштаб Ñетки" #: editor/import/resource_importer_obj.cpp -#, fuzzy msgid "Offset Mesh" -msgstr "ОтÑтупы" +msgstr "Смещение Ñетки" #: editor/import/resource_importer_obj.cpp #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Octahedral Compression" -msgstr "Сжатие" +msgstr "ОктаÑдральный Ñжатие" #: editor/import/resource_importer_obj.cpp -#, fuzzy msgid "Optimize Mesh Flags" -msgstr "Флаги размера" +msgstr "Ðаилучший флаг Ñетки" #: editor/import/resource_importer_scene.cpp msgid "Import as Single Scene" @@ -6844,24 +6876,20 @@ msgid "Nodes" msgstr "Узлы" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Root Type" -msgstr "Тип возвращаемого значениÑ" +msgstr "Тип ветви" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Root Name" -msgstr "Ðазвание внешнего репозиториÑ" +msgstr "Ð˜Ð¼Ñ Ð²ÐµÑ‚Ð²Ð¸" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Root Scale" -msgstr "МаÑштабировать" +msgstr "РаÑширение ветки" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Custom Script" -msgstr "ПользовательÑкий узел" +msgstr "ПользовательÑкий Скрипт" #: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp msgid "Storage" @@ -6876,64 +6904,54 @@ msgid "Materials" msgstr "Материалы" #: editor/import/resource_importer_scene.cpp platform/osx/export/export.cpp -#, fuzzy msgid "Location" -msgstr "ЛокализациÑ" +msgstr "РаÑположение" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Keep On Reimport" -msgstr "Переимпортировать" +msgstr "Продолжить переÑылку" #: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp msgid "Meshes" -msgstr "Меши" +msgstr "Сетка" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Ensure Tangents" -msgstr "ВычиÑлить каÑательные" +msgstr "Проверить ÑоприкоÑновение" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Light Baking" -msgstr "Карты оÑвещениÑ" +msgstr "запекание Ñвета" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Lightmap Texel Size" -msgstr "Запекание LightMap" +msgstr "Запекание Lightmap" #: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp msgid "Skins" -msgstr "Скины" +msgstr "Обложки" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Use Named Skins" -msgstr "ИÑпользовать привÑзку маÑштабированиÑ" +msgstr "ИÑпользование заданной обложки" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "External Files" -msgstr "Внешний" +msgstr "ВнеÑение файлов" #: editor/import/resource_importer_scene.cpp msgid "Store In Subdir" msgstr "Хранить в поддиректории" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Filter Script" -msgstr "Фильтр Ñкриптов" +msgstr "Фильтр Ñценариев" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Keep Custom Tracks" -msgstr "Преобразование" +msgstr "ИÑпользовать пользовательÑкие дорожки" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Optimizer" msgstr "Оптимизировать" @@ -6960,19 +6978,16 @@ msgid "Max Angular Error" msgstr "МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ ÑƒÐ³Ð»Ð¾Ð²Ð°Ñ Ð¿Ð¾Ð³Ñ€ÐµÑˆÐ½Ð¾Ñть" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Max Angle" -msgstr "Угол" +msgstr "МакÑимальный Угол" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Remove Unused Tracks" -msgstr "Удалить дорожку" +msgstr "Удалить неиÑпользуемые дорожки" #: editor/import/resource_importer_scene.cpp -#, fuzzy msgid "Clips" -msgstr "Ðнимационные клипы" +msgstr "Клипы" #: editor/import/resource_importer_scene.cpp scene/2d/cpu_particles_2d.cpp #: scene/2d/particles_2d.cpp scene/3d/area.cpp scene/3d/cpu_particles.cpp @@ -7022,27 +7037,24 @@ msgid "Saving..." msgstr "Сохранение..." #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "2D, Detect 3D" -msgstr "Обнаружить 3D" +msgstr "2D, Обнаружение 3D" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "2D Pixel" -msgstr "Залитые пикÑели" +msgstr "2D пикÑели" #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" msgstr "КачеÑтво Ñ Ð¿Ð¾Ñ‚ÐµÑ€Ñми" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "HDR Mode" -msgstr "Режим выделениÑ" +msgstr "Режим HDR" #: editor/import/resource_importer_texture.cpp msgid "BPTC LDR" -msgstr "" +msgstr "BPTC LDR" #: editor/import/resource_importer_texture.cpp scene/2d/cpu_particles_2d.cpp #: scene/2d/mesh_instance_2d.cpp scene/2d/multimesh_instance_2d.cpp @@ -7051,32 +7063,28 @@ msgid "Normal Map" msgstr "Карта нормалей" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Process" -msgstr "Предобработка" +msgstr "ПроцеÑÑ" #: editor/import/resource_importer_texture.cpp msgid "Fix Alpha Border" msgstr "ИÑправить альфа-границу" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Premult Alpha" -msgstr "Редактировать полигон" +msgstr "ПредшеÑÑ‚Ð²ÑƒÑŽÑ‰Ð°Ñ Ðльфа" #: editor/import/resource_importer_texture.cpp msgid "Hdr As Srgb" msgstr "Hdr как Srgb" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Invert Color" -msgstr "Вершины" +msgstr "Обращенный цвет" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Normal Map Invert Y" -msgstr "Карта нормалей" +msgstr "ИнвеÑтирование карты нормалей по Y" #: editor/import/resource_importer_texture.cpp #: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp @@ -7085,18 +7093,16 @@ msgid "Stream" msgstr "Поток" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "Size Limit" -msgstr "Лимит" +msgstr "Размер лимита" #: editor/import/resource_importer_texture.cpp msgid "Detect 3D" msgstr "Обнаружить 3D" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "SVG" -msgstr "CSG" +msgstr "SVG" #: editor/import/resource_importer_texture.cpp msgid "" @@ -7104,21 +7110,19 @@ msgid "" "texture will not display correctly on PC." msgstr "" "Внимание, в ÐаÑтройках проекта не включено подходÑщее Ñжатие видеопамÑти Ð´Ð»Ñ " -"ПК. Ðта текÑтура не будет корректно отображатьÑÑ Ð½Ð° ПК." +"ПК. Ðта текÑтура не будет корректно отображатьÑÑ." #: editor/import/resource_importer_texture_atlas.cpp -#, fuzzy msgid "Atlas File" -msgstr "Размер атлаÑа" +msgstr "Файл атлаÑа" #: editor/import/resource_importer_texture_atlas.cpp msgid "Import Mode" -msgstr "Режим импорта" +msgstr "Режим импортированиÑ" #: editor/import/resource_importer_texture_atlas.cpp -#, fuzzy msgid "Crop To Region" -msgstr "Задать облаÑть тайла" +msgstr "Обрезать краÑ" #: editor/import/resource_importer_texture_atlas.cpp msgid "Trim Alpha Border From Region" @@ -7138,41 +7142,35 @@ msgid "Mono" msgstr "Моно" #: editor/import/resource_importer_wav.cpp -#, fuzzy msgid "Max Rate" -msgstr "Mix узел" +msgstr "макÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ñ‡Ð°Ñтота" #: editor/import/resource_importer_wav.cpp -#, fuzzy msgid "Max Rate Hz" -msgstr "Mix узел" +msgstr "МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ñ‡Ð°Ñтота Hz" #: editor/import/resource_importer_wav.cpp msgid "Trim" msgstr "Обрезать" #: editor/import/resource_importer_wav.cpp -#, fuzzy msgid "Normalize" -msgstr "Ðормализованный" +msgstr "ÐормализациÑ" #: editor/import/resource_importer_wav.cpp #: scene/resources/audio_stream_sample.cpp -#, fuzzy msgid "Loop Mode" -msgstr "Режим перемещениÑ" +msgstr "Режим цикла" #: editor/import/resource_importer_wav.cpp #: scene/resources/audio_stream_sample.cpp -#, fuzzy msgid "Loop Begin" -msgstr "Режим перемещениÑ" +msgstr "Ðачало цикла" #: editor/import/resource_importer_wav.cpp #: scene/resources/audio_stream_sample.cpp -#, fuzzy msgid "Loop End" -msgstr "Режим перемещениÑ" +msgstr "Конец цикла" #: editor/import_defaults_editor.cpp msgid "Select Importer" @@ -7259,22 +7257,20 @@ msgid "Raw" msgstr "Без обработки" #: editor/inspector_dock.cpp -#, fuzzy msgid "Capitalized" -msgstr "С Заглавных Букв" +msgstr "Капитализированный" #: editor/inspector_dock.cpp -#, fuzzy msgid "Localized" -msgstr "Локаль" +msgstr "ЛокализациÑ" #: editor/inspector_dock.cpp msgid "Localization not available for current language." -msgstr "Ð›Ð¾ÐºÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð½ÐµÐ´Ð¾Ñтупна Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ Ñзыка." +msgstr "Ð›Ð¾ÐºÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð½ÐµÐ´Ð¾Ñтупна Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ Ñзыка." #: editor/inspector_dock.cpp msgid "Copy Properties" -msgstr "Копировать ÑвойÑтва" +msgstr "Копировать характериÑтики" #: editor/inspector_dock.cpp msgid "Paste Properties" @@ -7811,9 +7807,8 @@ msgid "New" msgstr "Ðовый" #: editor/plugins/animation_player_editor_plugin.cpp -#, fuzzy msgid "Paste As Reference" -msgstr "Справка по клаÑÑу %s" +msgstr "Ð’Ñтавить ÑÑылку" #: editor/plugins/animation_player_editor_plugin.cpp msgid "Edit Transitions..." @@ -8311,28 +8306,24 @@ msgid "Loading..." msgstr "Загрузка..." #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgctxt "Pagination" msgid "First" -msgstr "ПерваÑ" +msgstr "ÐачальнаÑ" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgctxt "Pagination" msgid "Previous" -msgstr "ПредыдущаÑ" +msgstr "ПредшеÑтвующаÑ" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgctxt "Pagination" msgid "Next" -msgstr "СледующаÑ" +msgstr "ПоÑледующаÑ" #: editor/plugins/asset_library_editor_plugin.cpp -#, fuzzy msgctxt "Pagination" msgid "Last" -msgstr "ПоÑледнÑÑ" +msgstr "крайнÑÑ" #: editor/plugins/asset_library_editor_plugin.cpp msgid "All" @@ -8380,15 +8371,15 @@ msgstr "ТеÑтируемые" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed to get repository configuration." -msgstr "" +msgstr "Ðе удалоÑÑŒ получить конфигурацию репозиториÑ." #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" -msgstr "ZIP файл аÑÑетов" +msgstr "ZIP файл набора" #: editor/plugins/audio_stream_editor_plugin.cpp msgid "Audio Preview Play/Pause" -msgstr "Ðудио превью Старт/Пауза" +msgstr "Ðудио пред проÑлушивание Старт/Пауза" #: editor/plugins/baked_lightmap_editor_plugin.cpp msgid "" @@ -9309,9 +9300,8 @@ msgid "Swap Gradient Fill Points" msgstr "ПоменÑть меÑтами точки градиентной заливки" #: editor/plugins/gradient_texture_2d_editor_plugin.cpp -#, fuzzy msgid "Toggle Grid Snap" -msgstr "Переключить Ñетку" +msgstr "Переключить привÑзки Ñетки" #: editor/plugins/item_list_editor_plugin.cpp msgid "Item %d" @@ -9547,9 +9537,8 @@ msgstr "" "%s" #: editor/plugins/mesh_library_editor_plugin.cpp -#, fuzzy msgid "MeshLibrary" -msgstr "Библиотека полиÑеток" +msgstr "Библиотека Ñеток" #: editor/plugins/mesh_library_editor_plugin.cpp msgid "Add Item" @@ -10103,7 +10092,7 @@ msgstr "Ð¡Ð¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ ÐºÐ¾Ñтей Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð¾Ð¼" #: editor/plugins/ray_cast_2d_editor_plugin.cpp msgid "Set cast_to" -msgstr "" +msgstr "Задать cast_to" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" @@ -11774,9 +11763,8 @@ msgstr "" "Ð’ÑÑ‘ равно закрыть?" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Type" -msgstr "Удалить тайл" +msgstr "Удалить тип" #: editor/plugins/theme_editor_plugin.cpp msgid "" @@ -11820,14 +11808,12 @@ msgstr "" "Добавьте в него Ñлементы вручную или импортировав из другой темы." #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Add Theme Type" -msgstr "Добавить тип Ñлемента" +msgstr "Добавить тип Темы" #: editor/plugins/theme_editor_plugin.cpp -#, fuzzy msgid "Remove Theme Type" -msgstr "Удалить внешний репозиторий" +msgstr "Удалить тип Темы" #: editor/plugins/theme_editor_plugin.cpp msgid "Add Color Item" @@ -12282,9 +12268,8 @@ msgid "Palette Min Width" msgstr "ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð° палитры" #: editor/plugins/tile_map_editor_plugin.cpp -#, fuzzy msgid "Palette Item H Separation" -msgstr "Горизонтальное разделение Ñлементов палитры" +msgstr "Разделение Ñлементов в палитре H" #: editor/plugins/tile_map_editor_plugin.cpp msgid "Show Tile Names" @@ -14052,7 +14037,7 @@ msgstr "ОтриÑовщик:" #: editor/project_manager.cpp msgid "OpenGL ES 3.0" -msgstr "OpenGL ES 3.0" +msgstr "ОткрытыйGL ES 3.0" #: editor/project_manager.cpp msgid "Not supported by your GPU drivers." @@ -14072,7 +14057,7 @@ msgstr "" #: editor/project_manager.cpp msgid "OpenGL ES 2.0" -msgstr "OpenGL ES 2.0" +msgstr "ОткрытыйGL ES 2.0" #: editor/project_manager.cpp msgid "" @@ -15032,17 +15017,15 @@ msgstr "Сделать локальным" #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp msgid "Another node already uses this unique name in the scene." -msgstr "" +msgstr "Ð˜Ð¼Ñ ÑƒÐ·Ð»Ð° уже иÑпользовано в Ñцене" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Enable Scene Unique Name" -msgstr "Уникальные имена" +msgstr "Добавить уникальное Ð¸Ð¼Ñ Ñцене" #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp -#, fuzzy msgid "Disable Scene Unique Name" -msgstr "Уникальные имена" +msgstr "Убрать уникальное Ð¸Ð¼Ñ Ð² Ñцене" #: editor/scene_tree_dock.cpp msgid "New Scene Root" @@ -15118,7 +15101,7 @@ msgstr "Вложенные реÑурÑÑ‹" #: editor/scene_tree_dock.cpp msgid "Access as Scene Unique Name" -msgstr "" +msgstr "ДоÑтуп к уникальному имени Ñцены" #: editor/scene_tree_dock.cpp msgid "Clear Inheritance" @@ -15259,6 +15242,8 @@ msgid "" "with the '%s' prefix in a node path.\n" "Click to disable this." msgstr "" +"ДоÑтуп к узлу можно получить из любой точки Ñцены, предшеÑтвовав ему Ñ " +"префикÑом «%s» на пути узла. Ðажмите, чтобы отключить" #: editor/scene_tree_editor.cpp msgid "" @@ -15917,38 +15902,6 @@ msgstr "Откат к GLES2" msgid "Use Nvidia Rect Flicker Workaround" msgstr "Обходить проблему Nvidia Rect Flicker" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "ДиÑплей" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "Ширина" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "Ð’Ñ‹Ñота" - -#: main/main.cpp -msgid "Always On Top" -msgstr "Ð’Ñегда Ñверху" - -#: main/main.cpp -msgid "Test Width" -msgstr "ТеÑÑ‚Ð¾Ð²Ð°Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð°" - -#: main/main.cpp -msgid "Test Height" -msgstr "ТеÑÑ‚Ð¾Ð²Ð°Ñ Ð²Ñ‹Ñота" - #: main/main.cpp msgid "DPI" msgstr "DPI" @@ -16031,7 +15984,7 @@ msgstr "GUI" #: main/main.cpp msgid "Drop Mouse On GUI Input Disabled" -msgstr "" +msgstr "Отключение курÑора мыши в интерфейÑе" #: main/main.cpp msgid "stdout" @@ -16046,19 +15999,16 @@ msgid "Verbose stdout" msgstr "Подробный Ñтандартный вывод" #: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp -#, fuzzy msgid "Physics Interpolation" -msgstr "Режим интерполÑции" +msgstr "физичеÑÐºÐ°Ñ Ð¸Ð½Ñ‚ÐµÑ€Ð¿Ð¾Ð»Ñции" #: main/main.cpp -#, fuzzy msgid "Enable Warnings" -msgstr "Включить фильтрацию" +msgstr "Включить предупреждениÑ" #: main/main.cpp -#, fuzzy msgid "Frame Delay Msec" -msgstr "Задержка кадра (мÑ)" +msgstr "Задержка кадра в МÑ" #: main/main.cpp msgid "Low Processor Mode" @@ -16352,9 +16302,8 @@ msgid "Path Node" msgstr "Узел пути" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path Interval Type" -msgstr "Создать внутреннюю вершину" +msgstr "Путь типа интервала" #: modules/csg/csg_shape.cpp msgid "Path Interval" @@ -16369,14 +16318,12 @@ msgid "Path Rotation" msgstr "Вращение пути" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path Local" -msgstr "Сделать локальным" +msgstr "Дополнить локально" #: modules/csg/csg_shape.cpp -#, fuzzy msgid "Path Continuous U" -msgstr "ÐепрерывнаÑ" +msgstr "Продолжать дополнть U" #: modules/csg/csg_shape.cpp msgid "Path U Distance" @@ -16403,19 +16350,16 @@ msgid "Always Ordered" msgstr "Ð’Ñегда по порÑдку" #: modules/enet/networked_multiplayer_enet.cpp -#, fuzzy msgid "Server Relay" -msgstr "Релей Ñервера" +msgstr "Переключение Ñервера" #: modules/enet/networked_multiplayer_enet.cpp -#, fuzzy msgid "DTLS Verify" -msgstr "Проверка DTLS" +msgstr "Уточнение DTLS" #: modules/enet/networked_multiplayer_enet.cpp -#, fuzzy msgid "DTLS Hostname" -msgstr "Ð˜Ð¼Ñ Ñ…Ð¾Ñта DTLS" +msgstr "ХоÑÑ‚ Ð¸Ð¼Ñ DTLS" #: modules/enet/networked_multiplayer_enet.cpp msgid "Use DTLS" @@ -16423,12 +16367,11 @@ msgstr "ИÑпользовать DTLS" #: modules/fbx/editor_scene_importer_fbx.cpp msgid "FBX" -msgstr "" +msgstr "ФБХ" #: modules/fbx/editor_scene_importer_fbx.cpp -#, fuzzy msgid "Use FBX" -msgstr "ИÑпользовать FXAA" +msgstr "ИÑпользовать FBX" #: modules/gdnative/gdnative.cpp msgid "Config File" @@ -16519,12 +16462,12 @@ msgstr "Путь иконки" #: modules/gdnative/register_types.cpp msgid "GDNative" -msgstr "" +msgstr "GDNative Базовый" #: modules/gdscript/editor/gdscript_highlighter.cpp #: modules/gdscript/gdscript.cpp msgid "GDScript" -msgstr "" +msgstr "GDScript код" #: modules/gdscript/editor/gdscript_highlighter.cpp msgid "Function Definition Color" @@ -16535,9 +16478,8 @@ msgid "Node Path Color" msgstr "Цвет пути узла" #: modules/gdscript/gdscript.cpp modules/visual_script/visual_script.cpp -#, fuzzy msgid "Max Call Stack" -msgstr "МакÑимальный Ñтек вызовов" +msgstr "МакÑимальное чиÑто вызовов" #: modules/gdscript/gdscript.cpp msgid "Treat Warnings As Errors" @@ -16597,9 +16539,8 @@ msgid "Enable Smart Resolve" msgstr "Включить интеллектуальное разрешение" #: modules/gdscript/language_server/gdscript_language_server.cpp -#, fuzzy msgid "Show Native Symbols In Editor" -msgstr "Показывать нативные Ñимволы в редакторе" +msgstr "Показать базовые Ñимволы в редакторе" #: modules/gdscript/language_server/gdscript_language_server.cpp msgid "Use Thread" @@ -16618,9 +16559,8 @@ msgid "Buffer View" msgstr "ПроÑмотр буфера" #: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_buffer_view.cpp -#, fuzzy msgid "Byte Offset" -msgstr "Смещение байтов" +msgstr "Смещение байта" #: modules/gltf/gltf_accessor.cpp msgid "Component Type" @@ -16643,17 +16583,16 @@ msgid "Max" msgstr "МакÑимум" #: modules/gltf/gltf_accessor.cpp -#, fuzzy msgid "Sparse Count" -msgstr "Добавить ÑкземплÑÑ€" +msgstr "разделенный подÑчет" #: modules/gltf/gltf_accessor.cpp msgid "Sparse Indices Buffer View" -msgstr "" +msgstr "ПоÑмотреть переÑчет буфера" #: modules/gltf/gltf_accessor.cpp msgid "Sparse Indices Byte Offset" -msgstr "" +msgstr "ПоÑмотреть переÑчет Ð¸Ð½Ð´ÐµÐºÑ Ð±Ð°Ð¹Ñ‚Ð°" #: modules/gltf/gltf_accessor.cpp #, fuzzy @@ -16678,25 +16617,23 @@ msgstr "Длина байта" #: modules/gltf/gltf_buffer_view.cpp msgid "Byte Stride" -msgstr "" +msgstr "Шаг байта" #: modules/gltf/gltf_buffer_view.cpp msgid "Indices" msgstr "ИндекÑÑ‹" #: modules/gltf/gltf_camera.cpp -#, fuzzy msgid "FOV Size" -msgstr "Размер FOV" +msgstr "ОблаÑть Ð¿Ð¾Ð»Ñ Ð·Ñ€ÐµÐ½Ð¸Ñ" #: modules/gltf/gltf_camera.cpp msgid "Zfar" -msgstr "" +msgstr "Отдаление по Z" #: modules/gltf/gltf_camera.cpp -#, fuzzy msgid "Znear" -msgstr "Линейный" +msgstr "приближение по Z" #: modules/gltf/gltf_light.cpp scene/2d/canvas_modulate.cpp #: scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp scene/2d/polygon_2d.cpp @@ -20221,6 +20158,11 @@ msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" "ÐедопуÑтимый полигон. Ð’ режиме «Segments» необходимо по крайней мере 2 точки." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22018,9 +21960,10 @@ msgid "NavMesh" msgstr "Запечь NavMesh" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "NavigationObstacle Ñлужит только Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ð¾Ñ‚Ð²Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ñ Ñтолкновений Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð¾Ð¼ " "Spatial." @@ -24272,6 +24215,11 @@ msgstr "Режим оÑмотра" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "физичеÑÐºÐ°Ñ Ð¸Ð½Ñ‚ÐµÑ€Ð¿Ð¾Ð»Ñции" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Режим без теней" @@ -24304,11 +24252,6 @@ msgstr "ПользовательÑкий мультиплеер" msgid "Process Priority" msgstr "Включить приоритет" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Режим интерполÑции" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25007,6 +24950,11 @@ msgstr "Именованный разделитель" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Разделитель цветов шрифта" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Цвет коÑти 1" @@ -25802,6 +25750,11 @@ msgstr "Режим без отвлечениÑ" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Данные карты" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "ОтÑтупы" @@ -27198,7 +27151,7 @@ msgstr "Режим интерполÑции" #: servers/visual_server.cpp msgid "OpenGL" -msgstr "" +msgstr "ОткрытыйGL" #: servers/visual_server.cpp msgid "Batching Send Null" @@ -27218,9 +27171,8 @@ msgid "Legacy Stream" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Batching" -msgstr "Пакетирование" +msgstr "Сборка пакета" #: servers/visual_server.cpp msgid "Use Batching" @@ -27264,13 +27216,12 @@ msgid "Flash Batching" msgstr "" #: servers/visual_server.cpp -#, fuzzy msgid "Diagnose Frame" -msgstr "Ð’Ñтавить кадр" +msgstr "ДиагноÑтика кадров" #: servers/visual_server.cpp msgid "GLES2" -msgstr "" +msgstr "GLES2" #: servers/visual_server.cpp msgid "Compatibility" diff --git a/editor/translations/si.po b/editor/translations/si.po index d2bfe44473..5738f29eb9 100644 --- a/editor/translations/si.po +++ b/editor/translations/si.po @@ -73,11 +73,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -85,7 +86,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -97,7 +98,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -111,10 +112,11 @@ msgstr "" msgid "Position" msgstr "à·à·Šâ€à¶»à·’à¶:" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -575,6 +577,40 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "රේඛීය" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1163,7 +1199,7 @@ msgstr "ලුහුබදින්න෠සක්â€à¶»à·’ය/à¶…à¶šà·Šâ€à¶»à msgid "Update Mode (How this property is set)" msgstr "මà·à¶¯à·’ලිය යà·à·€à¶à·Š කරන්න (මෙම ගුණà·à¶‚ගය සකස෠ඇà¶à·Šà¶à·š කෙසේද)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "නිවේà·à¶± මà·à¶¯à·’ලිය" @@ -5784,6 +5820,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "නිවේà·à¶± මà·à¶¯à·’ලිය" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15378,39 +15419,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "රේඛීය" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19477,6 +19485,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21112,7 +21125,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23151,6 +23164,11 @@ msgid "Pause Mode" msgstr "නිවේà·à¶± මà·à¶¯à·’ලිය" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "නිවේà·à¶± මà·à¶¯à·’ලිය" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23179,11 +23197,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "නිවේà·à¶± මà·à¶¯à·’ලිය" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23823,6 +23836,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "à·à·Šâ€à¶»à·’à¶:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "à·à·Šâ€à¶»à·’à¶:" @@ -24567,6 +24585,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/sk.po b/editor/translations/sk.po index 0494245043..e6faff29b1 100644 --- a/editor/translations/sk.po +++ b/editor/translations/sk.po @@ -86,12 +86,13 @@ msgstr "VeľkosÅ¥: " msgid "Screen Orientation" msgstr "Popis:" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Nové Okno" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "OhraniÄené Pixely" @@ -100,7 +101,7 @@ msgstr "OhraniÄené Pixely" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Prepnúť na Celú Obrazovku" @@ -113,7 +114,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -127,10 +128,11 @@ msgstr "" msgid "Position" msgstr "PozÃcia Dock-u" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -624,6 +626,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "ZobraziÅ¥ VÅ¡etko" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Ľavá Å Ãrka" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Testovanie" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1229,7 +1267,7 @@ msgstr "Zapnúť/Vypnúť tento track." msgid "Update Mode (How this property is set)" msgstr "Update Mode (Tak ako je táto možnosÅ¥ nastavená)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Režim Interpolácie" @@ -6119,6 +6157,11 @@ msgstr "" msgid "Flat" msgstr "Plochý 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Režim Interpolácie" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Vyberte Node(y) pre Importovanie" @@ -16135,41 +16178,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "ZobraziÅ¥ VÅ¡etko" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Ľavá Å Ãrka" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Testovanie" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20501,6 +20509,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22255,7 +22268,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24442,6 +24455,11 @@ msgstr "Pohyb Mód" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Režim Interpolácie" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "ZobraziÅ¥ VÅ¡etko" @@ -24475,11 +24493,6 @@ msgstr "NastaviÅ¥ Viac:" msgid "Process Priority" msgstr "Súbor:" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Režim Interpolácie" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25164,6 +25177,11 @@ msgstr "Popis:" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Popis:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "VÅ¡etky vybrané" @@ -25960,6 +25978,11 @@ msgstr "Režim bez rozptyľovania" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Hĺbka" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Odchýlka Mriežky:" diff --git a/editor/translations/sl.po b/editor/translations/sl.po index 9bace3e00e..0d6d15a5a2 100644 --- a/editor/translations/sl.po +++ b/editor/translations/sl.po @@ -88,11 +88,12 @@ msgstr "Zaženi Skripto" msgid "Screen Orientation" msgstr "Odpri Nedavne" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -100,7 +101,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Preklopi na Celozaslonski NaÄin" @@ -113,7 +114,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -127,10 +128,11 @@ msgstr "" msgid "Position" msgstr "Položaj Sidranja" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -624,6 +626,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Zamenjaj Vse" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Linearno" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "PreskuÅ¡anje" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1240,7 +1278,7 @@ msgstr "Preklop naÄin pisanja brez motenj." msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp #, fuzzy msgid "Interpolation Mode" msgstr "Animacijski Gradnik" @@ -6216,6 +6254,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Animacijski Gradnik" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Izberi Gradnik(e) za Uvoz" @@ -16449,41 +16492,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Zamenjaj Vse" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Linearno" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "PreskuÅ¡anje" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20835,6 +20843,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22581,7 +22594,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24771,6 +24784,11 @@ msgstr "NaÄin PloÅ¡Äe" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Animacijski Gradnik" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Zamenjaj Vse" @@ -24802,11 +24820,6 @@ msgstr "" msgid "Process Priority" msgstr "Uredi Filtre" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Animacijski Gradnik" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25488,6 +25501,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "OÅ¡tevilÄenja:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Odstrani Vse Stvari" @@ -26284,6 +26302,11 @@ msgstr "NaÄin Brez Motenj" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Globina" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Mrežni Zamik:" diff --git a/editor/translations/sq.po b/editor/translations/sq.po index 52a657c799..bb92b3e21f 100644 --- a/editor/translations/sq.po +++ b/editor/translations/sq.po @@ -76,11 +76,12 @@ msgstr "Madhësia: " msgid "Screen Orientation" msgstr "Hap të Fundit" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -88,7 +89,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Ndrysho Ekranin e Plotë" @@ -101,7 +102,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -115,10 +116,11 @@ msgstr "" msgid "Position" msgstr "Pozicioni i Dokut" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -603,6 +605,40 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Shfaqi të Gjitha" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1202,7 +1238,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -6109,6 +6145,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Format e Përplasjes të Dukshme" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Zgjidh Nyjet Për ti Importuar" @@ -15985,39 +16026,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Shfaqi të Gjitha" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20268,6 +20276,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21951,7 +21964,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24067,6 +24080,11 @@ msgstr "Luaj Skenën" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Hapi i Fizikës %" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Shfaqi të Gjitha" @@ -24100,11 +24118,6 @@ msgstr "Vendos të Shumëfishta:" msgid "Process Priority" msgstr "Ndrysho Mënyrën" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Hapi i Fizikës %" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -24775,6 +24788,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Enumeracionet:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Hiq Artikullin" @@ -25555,6 +25573,10 @@ msgid "Distance Field" msgstr "Metoda Pa Shpërqëndrime" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po index 0ffdd6452e..d41f434033 100644 --- a/editor/translations/sr_Cyrl.po +++ b/editor/translations/sr_Cyrl.po @@ -82,12 +82,13 @@ msgstr "Величина ивице:" msgid "Screen Orientation" msgstr "ЗаÑлон оператор." -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Ðов Прозор" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "ПикÑели Оквира" @@ -96,7 +97,7 @@ msgstr "ПикÑели Оквира" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Укљ./ИÑкљ. режим целог екрана" @@ -110,7 +111,7 @@ msgstr "" msgid "Minimized" msgstr "Велика Ñлова" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -124,10 +125,11 @@ msgstr "" msgid "Position" msgstr "Позиција панела" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -628,6 +630,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Прикажи нормалу" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "деÑно" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Поглед Ñ Ð»ÐµÐ²Ð°" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "ТеÑтирање" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp #, fuzzy @@ -1267,7 +1306,7 @@ msgstr "Укљ./ИÑкљ. режим без Ñметње." msgid "Update Mode (How this property is set)" msgstr "Режим ажурирања (Како је поÑтављена ова оÑобина)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp #, fuzzy msgid "Interpolation Mode" msgstr "Ðнимациони чвор" @@ -6459,6 +6498,11 @@ msgstr "Држи Ctrl да иÑпуÑтиш Узимача. Држи Shift да msgid "Flat" msgstr "Раван0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Ðнимациони чвор" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Одабери чвор/ове за увоз" @@ -17649,42 +17693,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Прикажи нормалу" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "деÑно" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Поглед Ñ Ð»ÐµÐ²Ð°" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "ТеÑтирање" - #: main/main.cpp msgid "DPI" msgstr "" @@ -22247,6 +22255,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -24130,7 +24143,7 @@ msgstr "ИÑпеци ÐавМрежу" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -26424,6 +26437,11 @@ msgstr "Режим инÑпекције" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Ðнимациони чвор" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Прикажи неоÑенчен" @@ -26457,11 +26475,6 @@ msgstr "ПоÑтави Више:" msgid "Process Priority" msgstr "Уреди филтере" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Ðнимациони чвор" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -27170,6 +27183,11 @@ msgstr "Иманован Сеп." #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Операције боје." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Обриши Ñтавке клаÑе" @@ -27976,6 +27994,11 @@ msgstr "Режим без Ñметње" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Дубина" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "ОфÑет:" diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po index 3a98b975bc..977a01df40 100644 --- a/editor/translations/sr_Latn.po +++ b/editor/translations/sr_Latn.po @@ -77,11 +77,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -89,7 +90,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -101,7 +102,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -115,10 +116,11 @@ msgstr "" msgid "Position" msgstr "Napravi" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -591,6 +593,40 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Leva Å iroka" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1176,7 +1212,7 @@ msgstr "UkljuÄi/iskljuÄi ovu traku." msgid "Update Mode (How this property is set)" msgstr "NaÄin Ažuriranja (Kako je ova osobina postavljena)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "NaÄin Interpolacije" @@ -5816,6 +5852,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Napravi" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15409,39 +15450,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Leva Å iroka" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19559,6 +19567,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -21231,7 +21244,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23306,6 +23319,11 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "NaÄin Interpolacije" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23336,11 +23354,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "NaÄin Interpolacije" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23990,6 +24003,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Odvajanje:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Funkcija" @@ -24759,6 +24777,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/sv.po b/editor/translations/sv.po index 9aaeac846a..c02b1b32b2 100644 --- a/editor/translations/sv.po +++ b/editor/translations/sv.po @@ -100,12 +100,13 @@ msgstr "Storlek:" msgid "Screen Orientation" msgstr "Öppna Senaste" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Nytt Fönster" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -113,7 +114,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Växla Fullskärm" @@ -126,7 +127,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -140,10 +141,11 @@ msgstr "" msgid "Position" msgstr "Dockposition" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -635,6 +637,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Ersätt Alla" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Höger" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Vy frÃ¥n vänster" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Höger" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1234,7 +1273,7 @@ msgstr "Ändra spÃ¥rets läge till pÃ¥/av." msgid "Update Mode (How this property is set)" msgstr "Uppdateringsläge (Hur denna egenskap sätts)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Interpolationsläge" @@ -6139,6 +6178,11 @@ msgstr "" msgid "Flat" msgstr "Platt 1" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Animations-Node" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Välj Nod(er) att Importera" @@ -16221,42 +16265,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Ersätt Alla" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Höger" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Vy frÃ¥n vänster" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Höger" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20572,6 +20580,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22332,7 +22345,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24516,6 +24529,11 @@ msgstr "Växla Läge" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Interpolationsläge" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Ersätt Alla" @@ -24549,11 +24567,6 @@ msgstr "Sätt Flera:" msgid "Process Priority" msgstr "Redigera Filter" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Interpolationsläge" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25236,6 +25249,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Sektioner:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Byt namn pÃ¥ Node" @@ -26029,6 +26047,11 @@ msgid "Distance Field" msgstr "Distraktionsfritt Läge" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "Höger" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/ta.po b/editor/translations/ta.po index dea2dbaa15..e51596cbfa 100644 --- a/editor/translations/ta.po +++ b/editor/translations/ta.po @@ -75,11 +75,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -87,7 +88,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -99,7 +100,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -113,10 +114,11 @@ msgstr "" msgid "Position" msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -582,6 +584,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1171,7 +1206,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5785,6 +5820,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "à®®à¯à®Ÿà®•à¯à®•பà¯à®ªà®Ÿà¯à®Ÿà®¤à¯" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15364,38 +15404,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19451,6 +19459,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -21082,7 +21095,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23095,6 +23108,11 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "அசைவூடà¯à®Ÿà¯ பாதை [interpolation]யை மாறà¯à®±à¯" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23124,10 +23142,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23766,6 +23780,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "மாறà¯à®±à®™à¯à®•ளை இதறà¯à®•௠அமை:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "அனைதà¯à®¤à¯ தேரà¯à®µà¯à®•ளà¯" @@ -24510,6 +24529,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/te.po b/editor/translations/te.po index e4f9d88d87..8fbfa32f91 100644 --- a/editor/translations/te.po +++ b/editor/translations/te.po @@ -70,11 +70,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -82,7 +83,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -94,7 +95,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -107,10 +108,11 @@ msgstr "" msgid "Position" msgstr "" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -566,6 +568,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1144,7 +1179,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5707,6 +5742,10 @@ msgstr "" msgid "Flat" msgstr "à°«à±à°²à°¾à°Ÿà± 1" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15184,38 +15223,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19206,6 +19213,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20799,7 +20811,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22766,6 +22778,11 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "గణనలà±" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22793,11 +22810,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "గణనలà±" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23402,6 +23414,11 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Font Separator" +msgstr "గణనలà±" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -24097,6 +24114,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/th.po b/editor/translations/th.po index d9e7bddaf7..aafef8492b 100644 --- a/editor/translations/th.po +++ b/editor/translations/th.po @@ -89,12 +89,13 @@ msgstr "ขนาดเส้นรà¸à¸šà¸£à¸¹à¸›:" msgid "Screen Orientation" msgstr "ดำเนินà¸à¸²à¸£ Screen" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "หน้าต่างใหม่" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "พิà¸à¹€à¸‹à¸¥à¸‚à¸à¸š" @@ -103,7 +104,7 @@ msgstr "พิà¸à¹€à¸‹à¸¥à¸‚à¸à¸š" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "เปิด/ปิด โหมดเต็มหน้าจà¸" @@ -117,7 +118,7 @@ msgstr "" msgid "Minimized" msgstr "เริ่มต้น" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -131,10 +132,11 @@ msgstr "" msgid "Position" msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡à¹à¸œà¸‡" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -632,6 +634,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "à¹à¸ªà¸”งทั้งหมด" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "à¹à¸ªà¸‡" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "ความà¸à¸§à¹‰à¸²à¸‡à¸‹à¹‰à¸²à¸¢" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "à¸à¸³à¸¥à¸±à¸‡à¸—ดสà¸à¸š" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1247,7 +1286,7 @@ msgstr "เปิด/ปิดà¹à¸—ร็à¸à¸™à¸µà¹‰" msgid "Update Mode (How this property is set)" msgstr "โหมดà¸à¸±à¸žà¹€à¸”ท (คุณสมบัตินี้ถูà¸à¸•ั้งค่าได้à¸à¸¢à¹ˆà¸²à¸‡à¹„ร)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "โหมดà¸à¸²à¸£à¹à¸à¹‰à¹„ข" @@ -6132,6 +6171,11 @@ msgstr "" msgid "Flat" msgstr "Flat 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "โหมดขà¸à¸šà¹€à¸‚ตà¸à¸²à¸£à¸Šà¸™" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "เลืà¸à¸à¹‚หนดเพื่à¸à¸™à¸³à¹€à¸‚้า" @@ -16136,42 +16180,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "à¹à¸ªà¸”งทั้งหมด" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "à¹à¸ªà¸‡" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "ความà¸à¸§à¹‰à¸²à¸‡à¸‹à¹‰à¸²à¸¢" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "à¸à¸³à¸¥à¸±à¸‡à¸—ดสà¸à¸š" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20557,6 +20565,11 @@ msgstr "โพลีà¸à¸à¸™à¹„ม่ถูà¸à¸•้à¸à¸‡ ต้à¸à¸‡à¸¡à¸µà¸ msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "โพลีà¸à¸à¸™à¹„ม่ถูà¸à¸•้à¸à¸‡ ต้à¸à¸‡à¸¡à¸µà¸à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸à¸¢ 2 จุด ในโหมดà¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¹à¸šà¸š 'Segments'" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22370,7 +22383,7 @@ msgstr "Bake NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24621,6 +24634,11 @@ msgstr "โหมดมุมมà¸à¸‡" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "โหมดà¸à¸²à¸£à¹à¸à¹‰à¹„ข" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "à¹à¸ªà¸”งà¹à¸šà¸šà¹„ร้เงา" @@ -24654,11 +24672,6 @@ msgstr "à¸à¸³à¸«à¸™à¸” หลายà¸à¸¢à¹ˆà¸²à¸‡:" msgid "Process Priority" msgstr "เปิดà¸à¸²à¸£à¸ˆà¸±à¸”ลำดับความสำคัà¸" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "โหมดà¸à¸²à¸£à¹à¸à¹‰à¹„ข" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25365,6 +25378,11 @@ msgstr "หมวดชื่à¸" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸ªà¸µ" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "ลบไà¸à¹€à¸—มคลาส" @@ -26171,6 +26189,11 @@ msgstr "โหมดไร้สิ่งรบà¸à¸§à¸™" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "ความลึà¸" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "เลื่à¸à¸™:" diff --git a/editor/translations/tl.po b/editor/translations/tl.po index db596952bf..7aa93a5aff 100644 --- a/editor/translations/tl.po +++ b/editor/translations/tl.po @@ -73,11 +73,12 @@ msgstr "Pinakamalaking Laki ng Window" msgid "Screen Orientation" msgstr "Pagkakatayo ng Screen" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Walang Kuwadro" @@ -85,7 +86,7 @@ msgstr "Walang Kuwadro" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Pumalit sa Buong Tabing" @@ -99,7 +100,7 @@ msgstr "" msgid "Minimized" msgstr "Simulan" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -113,10 +114,11 @@ msgstr "" msgid "Position" msgstr "Idaong Ang Posisyon" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -604,6 +606,41 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Ipakita Lahat" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Sinusubukan" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1200,7 +1237,7 @@ msgstr "Ipalit sa on/off ang track na ito." msgid "Update Mode (How this property is set)" msgstr "Paraan ng Pag-update (Kung papano inayos ang katangian na ito)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Paraang Interpolasyon" @@ -5933,6 +5970,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Nakikitang Collision Shapes" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Pumili ng (mga) Node na Iaangkat" @@ -15547,40 +15589,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Ipakita Lahat" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Sinusubukan" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19804,6 +19812,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21523,7 +21536,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23683,6 +23696,11 @@ msgstr "Paraan ng Pag-pan" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Paraang Interpolasyon" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Ipakita Lahat" @@ -23716,11 +23734,6 @@ msgstr "Magtakda ng Marami:" msgid "Process Priority" msgstr "Pagpapahalaga" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Paraang Interpolasyon" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -24397,6 +24410,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Animasyon" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Pumili ng Kulay" @@ -25190,6 +25208,11 @@ msgstr "Instance:" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Lalim" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Usog:" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index 3de35b0487..cd0beeeb00 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -146,12 +146,13 @@ msgstr "Maksimum Ekran Boyutu" msgid "Screen Orientation" msgstr "Ekran Oryantasyonu" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp #, fuzzy msgid "Window" msgstr "Yeni Pencere" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Borderless" msgstr "Kenar Pikselleri" @@ -160,7 +161,7 @@ msgstr "Kenar Pikselleri" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "Tam Ekranı Aç/Kapat" @@ -174,7 +175,7 @@ msgstr "" msgid "Minimized" msgstr "EtkinleÅŸtir" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -188,10 +189,11 @@ msgstr "" msgid "Position" msgstr "Dock Pozisyonu" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -689,6 +691,43 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Hepsini Görüntüle" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "Işık" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Soldan Görünüm" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Deneme" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1298,7 +1337,7 @@ msgstr "Bu parçayı Aç/Kapat." msgid "Update Mode (How this property is set)" msgstr "Güncelleme Kipi (Bu özellik nasıl belirlenir)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Ara DeÄŸerleme Kipi" @@ -6220,6 +6259,11 @@ msgstr "" msgid "Flat" msgstr "Sade 0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Temas Kipi" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Düğüm(leri) içe Aktarmak için Seç" @@ -16157,42 +16201,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Hepsini Görüntüle" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "Işık" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Soldan Görünüm" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Deneme" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20581,6 +20589,11 @@ msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" "Geçersiz çokgen. 'Segments' oluÅŸturma modunda en az 2 nokta gereklidir." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22433,7 +22446,7 @@ msgstr "NavMesh'i Sabitle" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24722,6 +24735,11 @@ msgstr "Kaydırma Biçimi" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Ara DeÄŸerleme Kipi" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Gölgesiz Görüntüle" @@ -24755,11 +24773,6 @@ msgstr "Çoklu Ayarla:" msgid "Process Priority" msgstr "Önceliklemeyi EtkinleÅŸtir" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Ara DeÄŸerleme Kipi" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25472,6 +25485,11 @@ msgstr "İsimli Ayraç" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Renk operatörü." + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Renk Öğesini Yeniden Adlandır" @@ -26278,6 +26296,11 @@ msgstr "Dikkat Dağıtmayan Kip" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Derinlik" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Kaydırma:" diff --git a/editor/translations/tt.po b/editor/translations/tt.po index a7d9a7c15e..c880c08ace 100644 --- a/editor/translations/tt.po +++ b/editor/translations/tt.po @@ -70,11 +70,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -82,7 +83,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -94,7 +95,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -107,10 +108,11 @@ msgstr "" msgid "Position" msgstr "" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -563,6 +565,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1140,7 +1175,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5701,6 +5736,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15168,38 +15207,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19162,6 +19169,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20744,7 +20756,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22692,6 +22704,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22719,10 +22735,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23325,6 +23337,10 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +msgid "Font Separator" +msgstr "" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -24006,6 +24022,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/tzm.po b/editor/translations/tzm.po index 2139691a5f..46c5660298 100644 --- a/editor/translations/tzm.po +++ b/editor/translations/tzm.po @@ -70,11 +70,12 @@ msgstr "" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -82,7 +83,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -94,7 +95,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -107,10 +108,11 @@ msgstr "" msgid "Position" msgstr "" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -561,6 +563,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1138,7 +1173,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5699,6 +5734,10 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +msgid "Hide Slider" +msgstr "" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15166,38 +15205,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19160,6 +19167,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "" @@ -20742,7 +20754,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -22694,6 +22706,10 @@ msgid "Pause Mode" msgstr "" #: scene/main/node.cpp +msgid "Physics Interpolation Mode" +msgstr "" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -22721,10 +22737,6 @@ msgstr "" msgid "Process Priority" msgstr "" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -23326,6 +23338,10 @@ msgid "Labeled Separator Right" msgstr "" #: scene/resources/default_theme/default_theme.cpp +msgid "Font Separator" +msgstr "" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "" @@ -24008,6 +24024,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/uk.po b/editor/translations/uk.po index 29dd720e91..6a1f0396e5 100644 --- a/editor/translations/uk.po +++ b/editor/translations/uk.po @@ -28,8 +28,8 @@ msgstr "" "Project-Id-Version: Ukrainian (Godot Engine)\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-28 11:12+0000\n" -"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" +"PO-Revision-Date: 2022-05-17 17:18+0000\n" +"Last-Translator: МироÑлав <hlopukmyroslav@gmail.com>\n" "Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/" "godot/uk/>\n" "Language: uk\n" @@ -38,7 +38,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.13-dev\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -92,11 +92,12 @@ msgstr "МакÑ. розмір вікна" msgid "Screen Orientation" msgstr "ÐžÑ€Ñ–Ñ”Ð½Ñ‚Ð°Ñ†Ñ–Ñ ÐµÐºÑ€Ð°Ð½Ð°" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Вікно" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Без рамки" @@ -104,7 +105,7 @@ msgstr "Без рамки" msgid "Per Pixel Transparency Enabled" msgstr "Увімкнено прозоріÑть за пікÑелÑми" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Ðа веÑÑŒ екран" @@ -116,7 +117,7 @@ msgstr "МакÑимізовано" msgid "Minimized" msgstr "Мінімізовано" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Зі зміною розміру" @@ -129,10 +130,11 @@ msgstr "Зі зміною розміру" msgid "Position" msgstr "РозташуваннÑ" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -586,6 +588,39 @@ msgstr "Ðетиповий каталог кориÑтувача" msgid "Custom User Dir Name" msgstr "Ðетипова назва каталогу кориÑтувача" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "Показ" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "Ширина" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "ВиÑота" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "Завжди згори" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "Перевірити ширину" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "Перевірити виÑоту" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1163,7 +1198,7 @@ msgstr "Увімкнути або вимкнути цю доріжку." msgid "Update Mode (How this property is set)" msgstr "Оновити режим (ÑпоÑіб вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑті)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Режим інтерполÑції" @@ -5935,6 +5970,11 @@ msgstr "" msgid "Flat" msgstr "ПлоÑка" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Повзунок" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Виберіть вузол(вузли) Ð´Ð»Ñ Ñ–Ð¼Ð¿Ð¾Ñ€Ñ‚Ñƒ" @@ -6880,7 +6920,7 @@ msgstr "Кліпи" #: scene/2d/particles_2d.cpp scene/3d/area.cpp scene/3d/cpu_particles.cpp #: scene/3d/particles.cpp scene/resources/environment.cpp msgid "Amount" -msgstr "Величина" +msgstr "КількіÑть" #: editor/import/resource_importer_scene.cpp #: editor/plugins/mesh_library_editor_plugin.cpp @@ -15809,38 +15849,6 @@ msgstr "Резервний GLES2" msgid "Use Nvidia Rect Flicker Workaround" msgstr "Обхідний шлÑÑ… Ð´Ð»Ñ ÑƒÑÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ð»Ð¸Ð¼Ð°Ð½Ð½Ñ Ð¿Ñ€Ñмокутників на Nvidia" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "Показ" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "Ширина" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "ВиÑота" - -#: main/main.cpp -msgid "Always On Top" -msgstr "Завжди згори" - -#: main/main.cpp -msgid "Test Width" -msgstr "Перевірити ширину" - -#: main/main.cpp -msgid "Test Height" -msgstr "Перевірити виÑоту" - #: main/main.cpp msgid "DPI" msgstr "РоздільніÑть" @@ -19957,6 +19965,11 @@ msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" "Ðекоректний полігон. У режимі Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Â«Segments» потрібні принаймні 2 точки." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "Режим вимірюваннÑ" @@ -21435,7 +21448,7 @@ msgstr "ПлаÑкіÑть" #: scene/3d/cull_instance.cpp servers/visual_server.cpp msgid "Portals" -msgstr "Віддзеркалити портали" +msgstr "Портали" #: scene/3d/cull_instance.cpp msgid "Portal Mode" @@ -21618,9 +21631,10 @@ msgid "NavMesh" msgstr "Запекти NavMesh" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" "NavigationObstacle призначено лише Ð´Ð»Ñ Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ‡ÐµÐ½Ð½Ñ Ð·Ð°Ñобів ÑƒÐ½Ð¸ÐºÐ½ÐµÐ½Ð½Ñ " "Ð·Ñ–Ñ‚ÐºÐ½ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñторового об'єкта." @@ -23659,6 +23673,11 @@ msgid "Pause Mode" msgstr "Режим панорамуваннÑ" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Режим інтерполÑції" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "ПереглÑд без тіней" @@ -23687,10 +23706,6 @@ msgstr "Ðетипові параметри гри з багатьма Ð³Ñ€Ð°Ð²Ñ msgid "Process Priority" msgstr "ПріоритетніÑть процеÑу" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "Інтерпольована фізика" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "ЗалишилоÑÑŒ чаÑу" @@ -24323,6 +24338,11 @@ msgstr "Іменований роздільник" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Колір шрифту роздільника" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Колір кіÑток 1" @@ -24784,7 +24804,7 @@ msgstr "Ідентифікатор Ð¶Ð¸Ð²Ð»ÐµÐ½Ð½Ñ ÐºÐ°Ð¼ÐµÑ€Ð¸" #: scene/resources/environment.cpp msgid "Ambient Light" -msgstr "Збільшити відÑтуп" +msgstr "Ðавколишнє Ñвітло" #: scene/resources/environment.cpp msgid "Sky Contribution" @@ -25027,6 +25047,11 @@ msgid "Distance Field" msgstr "Поле відÑтані" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "Дані карти" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "ЗміщеннÑ" diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po index 6eee3eac1b..45876f3cd6 100644 --- a/editor/translations/ur_PK.po +++ b/editor/translations/ur_PK.po @@ -77,11 +77,12 @@ msgstr "سب سکریپشن بنائیں" msgid "Screen Orientation" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -89,7 +90,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "" @@ -101,7 +102,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -115,10 +116,11 @@ msgstr "" msgid "Position" msgstr ".تمام کا انتخاب" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -591,6 +593,39 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1179,7 +1214,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "" @@ -5877,6 +5912,11 @@ msgstr "" msgid "Flat" msgstr "Ùلیٹ 1" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "سب سکریپشن بنائیں" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "" @@ -15699,38 +15739,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -msgid "Test Width" -msgstr "" - -#: main/main.cpp -msgid "Test Height" -msgstr "" - #: main/main.cpp msgid "DPI" msgstr "" @@ -19904,6 +19912,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -21571,7 +21584,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -23638,6 +23651,11 @@ msgid "Pause Mode" msgstr "ایکشن منتقل کریں" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "گنتی" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "" @@ -23668,11 +23686,6 @@ msgstr "" msgid "Process Priority" msgstr "ایکشن منتقل کریں" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "گنتی" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "" @@ -24327,6 +24340,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr ".تمام کا انتخاب" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr ".تمام کا انتخاب" @@ -25090,6 +25108,10 @@ msgid "Distance Field" msgstr "" #: scene/resources/gradient.cpp +msgid "Raw Data" +msgstr "" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/vi.po b/editor/translations/vi.po index 4ab12f669d..276dbc7b3a 100644 --- a/editor/translations/vi.po +++ b/editor/translations/vi.po @@ -20,13 +20,14 @@ # SyliawDeV <thanhlongstranger@gmail.com>, 2021. # IoeCmcomc <hopdaigia2004@gmail.com>, 2021, 2022. # Hung <hungthitkhia@gmail.com>, 2021. +# PaweÅ‚ Fertyk <pfertyk@pfertyk.me>, 2022. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-04-25 15:02+0000\n" -"Last-Translator: IoeCmcomc <hopdaigia2004@gmail.com>\n" +"PO-Revision-Date: 2022-05-10 13:14+0000\n" +"Last-Translator: PaweÅ‚ Fertyk <pfertyk@pfertyk.me>\n" "Language-Team: Vietnamese <https://hosted.weblate.org/projects/godot-engine/" "godot/vi/>\n" "Language: vi\n" @@ -34,7 +35,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -89,11 +90,12 @@ msgstr "Cỡ cá»a sổ tối Ä‘a" msgid "Screen Orientation" msgstr "Hướng xoay mà n hình" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "Cá»a sổ" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "Trà n viá»n" @@ -101,7 +103,7 @@ msgstr "Trà n viá»n" msgid "Per Pixel Transparency Enabled" msgstr "Báºt độ trong suốt má»—i Ä‘iểm ảnh" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "Toà n mà n hình" @@ -113,7 +115,7 @@ msgstr "Äã cá»±c đại hoá" msgid "Minimized" msgstr "Äã cá»±c tiểu hoá" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "Äổi kÃch cỡ được" @@ -126,10 +128,11 @@ msgstr "Äổi kÃch cỡ được" msgid "Position" msgstr "Vị trÃ" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -588,6 +591,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "Hiển thị tất cả" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "Chiá»u rá»™ng" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "Chiá»u cao" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "Rá»™ng bên trái" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "Kiểm tra" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1174,7 +1213,7 @@ msgstr "Báºt/tắt kênh nà y." msgid "Update Mode (How this property is set)" msgstr "Cáºp nháºt chế độ (Cách thuá»™c tÃnh được thiết láºp)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "Ná»™i suy" @@ -1760,7 +1799,7 @@ msgid "" "target node." msgstr "" "Phương thức không được tìm thấy. Chỉ định phương thức hợp lệ hoặc Ä‘Ãnh kèm " -"táºp lệnh và o nút." +"táºp lệnh và o nút mục tiêu." #: editor/connections_dialog.cpp msgid "Connect to Node:" @@ -5967,6 +6006,11 @@ msgstr "Giữ Ctrl để là m tròn vá» số nguyên. Giữ Shift để sá»a t msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "Chế độ va chạm" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "Chá»n Nút để Nháºp" @@ -14947,9 +14991,8 @@ msgid "Paste Node(s)" msgstr "Dán các nút" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Detach Script" -msgstr "ÄÃnh kèm Script" +msgstr "Tách táºp lệnh ra" #: editor/scene_tree_dock.cpp msgid "This operation can't be done on the tree root." @@ -15122,7 +15165,7 @@ msgstr "Không thể thá»±c hiện thao tác nà y trên Cảnh được khởi t #: editor/scene_tree_dock.cpp msgid "Attach Script" -msgstr "ÄÃnh kèm Script" +msgstr "ÄÃnh kèm táºp lệnh" #: editor/scene_tree_dock.cpp #, fuzzy @@ -15178,8 +15221,8 @@ msgid "" "This is probably because this editor was built with all language modules " "disabled." msgstr "" -"Không thể Ä‘Ãnh kèm tệp lệnh: Không ghi nháºn thấy ngôn ngữ nà o.\n" -"Vấn đỠcó thể là do các module ngôn ngữ bị vô hiệu hóa khi trình biên táºp " +"Không thể Ä‘Ãnh kèm táºp lệnh: Không ghi nháºn thấy ngôn ngữ nà o.\n" +"Vấn đỠcó thể là do các mô Ä‘un ngôn ngữ bị vô hiệu hóa khi trình chỉnh sá»a " "nà y được xây dá»±ng." #: editor/scene_tree_dock.cpp @@ -15231,9 +15274,8 @@ msgstr "" "Tệp tin cảnh giống như má»™t nút. Tạo má»™t cảnh kế thừa nếu nó không có nút gốc." #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Attach a new or existing script to the selected node." -msgstr "ÄÃnh kèm má»™t tệp lệnh cho nút đã chá»n." +msgstr "ÄÃnh kèm má»™t táºp lệnh cho nút đã chá»n." #: editor/scene_tree_dock.cpp #, fuzzy @@ -15514,7 +15556,7 @@ msgstr "Tệp lệnh có sẵn:" #: editor/script_create_dialog.cpp msgid "Attach Node Script" -msgstr "ÄÃnh kèm lệnh cho nút" +msgstr "ÄÃnh kèm táºp lệnh cá»§a nút" #: editor/script_editor_debugger.cpp msgid "Remote " @@ -15995,41 +16037,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "Hiển thị tất cả" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "Chiá»u rá»™ng" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "Chiá»u cao" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "Rá»™ng bên trái" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "Kiểm tra" - #: main/main.cpp msgid "DPI" msgstr "" @@ -17616,7 +17623,7 @@ msgstr "Tên không phải định danh hợp lệ:" #: modules/visual_script/visual_script_editor.cpp msgid "Name already in use by another func/var/signal:" -msgstr "Tên đã được sá» dụng bởi func/var/singal khác:" +msgstr "Tên đã được sá» dụng bởi func/var/signal khác:" #: modules/visual_script/visual_script_editor.cpp msgid "Rename Function" @@ -20419,6 +20426,11 @@ msgstr "Äa giác không hợp lệ. Cần Ãt nhất 3 Ä‘iểm trong chế đỠmsgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "Äa giác không hợp lệ. Cần Ãt nhất 2 Ä‘iểm trong chế độ dá»±ng 'Segments'." +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22237,7 +22249,7 @@ msgstr "Lưới" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24456,6 +24468,11 @@ msgstr "Chế độ Xoay" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "Ná»™i suy" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "Hiển thị tất cả" @@ -24489,11 +24506,6 @@ msgstr "Gán nhiá»u:" msgid "Process Priority" msgstr "Chỉnh độ ưu tiên cá»§a ô" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "Ná»™i suy" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25193,6 +25205,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "Thu phóng (theo tỉ lệ):" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "Xóa mục Lá»›p" @@ -25993,6 +26010,11 @@ msgstr "Chế độ táºp trung" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "Chiá»u sâu" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "Äá»™ dá»i:" diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po index e1ec7d79d6..71413f6120 100644 --- a/editor/translations/zh_CN.po +++ b/editor/translations/zh_CN.po @@ -89,7 +89,7 @@ msgstr "" "Project-Id-Version: Chinese (Simplified) (Godot Engine)\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n" "POT-Creation-Date: 2018-01-20 12:15+0200\n" -"PO-Revision-Date: 2022-04-28 11:12+0000\n" +"PO-Revision-Date: 2022-05-07 05:11+0000\n" "Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n" "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/" "godot-engine/godot/zh_Hans/>\n" @@ -98,7 +98,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.12.1-dev\n" +"X-Generator: Weblate 4.12.1\n" #: core/bind/core_bind.cpp main/main.cpp msgid "Tablet Driver" @@ -152,11 +152,12 @@ msgstr "çª—å£æœ€å¤§å¤§å°" msgid "Screen Orientation" msgstr "çª—å£æœå‘" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "窗å£" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "æ— è¾¹æ¡†" @@ -164,7 +165,7 @@ msgstr "æ— è¾¹æ¡†" msgid "Per Pixel Transparency Enabled" msgstr "å¯ç”¨åƒç´ çº§é€æ˜Ž" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "å…¨å±" @@ -176,7 +177,7 @@ msgstr "最大化" msgid "Minimized" msgstr "最å°åŒ–" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "å¯è°ƒæ•´å¤§å°" @@ -189,10 +190,11 @@ msgstr "å¯è°ƒæ•´å¤§å°" msgid "Position" msgstr "ä½ç½®" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -642,6 +644,39 @@ msgstr "使用自定义用户目录" msgid "Custom User Dir Name" msgstr "自定义用户目录åç§°" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +msgid "Display" +msgstr "显示" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "宽度" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "高度" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "置顶" + +#: core/project_settings.cpp +msgid "Test Width" +msgstr "测试宽度" + +#: core/project_settings.cpp +msgid "Test Height" +msgstr "测试高度" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1219,7 +1254,7 @@ msgstr "切æ¢è¯¥è½¨é“的开关。" msgid "Update Mode (How this property is set)" msgstr "更新模å¼ï¼ˆè®¾ç½®å±žæ€§çš„æ–¹å¼ï¼‰" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "æ’值模å¼" @@ -5880,6 +5915,11 @@ msgstr "æŒ‰ä½ %s å–æ•´ã€‚ æŒ‰ä½ Shift èŽ·å–æ›´ç²¾ç¡®çš„å˜åŒ–。" msgid "Flat" msgstr "æ‰å¹³" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "滑动æ¡" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "选择è¦å¯¼å…¥çš„节点" @@ -6563,7 +6603,6 @@ msgid "Delimiter" msgstr "分隔符" #: editor/import/resource_importer_layered_texture.cpp -#, fuzzy msgid "ColorCorrect" msgstr "é¢œè‰²æ ¡æ£" @@ -6852,14 +6891,12 @@ msgid "Saving..." msgstr "ä¿å˜ä¸..." #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "2D, Detect 3D" -msgstr "检测 3D" +msgstr "2Dã€æ£€æµ‹ 3D" #: editor/import/resource_importer_texture.cpp -#, fuzzy msgid "2D Pixel" -msgstr "实体åƒç´ " +msgstr "2D åƒç´ " #: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp msgid "Lossy Quality" @@ -8171,7 +8208,7 @@ msgstr "测试" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Failed to get repository configuration." -msgstr "" +msgstr "获å–仓库é…置失败。" #: editor/plugins/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -9866,7 +9903,7 @@ msgstr "åŒæ¥éª¨éª¼åˆ°å¤šè¾¹å½¢" #: editor/plugins/ray_cast_2d_editor_plugin.cpp msgid "Set cast_to" -msgstr "" +msgstr "设置 cast_to" #: editor/plugins/resource_preloader_editor_plugin.cpp msgid "ERROR: Couldn't load resource!" @@ -14683,17 +14720,15 @@ msgstr "转为本地" #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp msgid "Another node already uses this unique name in the scene." -msgstr "" +msgstr "该场景ä¸å·²æœ‰ä½¿ç”¨è¯¥å”¯ä¸€å称的节点。" #: editor/scene_tree_dock.cpp -#, fuzzy msgid "Enable Scene Unique Name" -msgstr "唯一åç§°" +msgstr "å¯ç”¨åœºæ™¯å”¯ä¸€åç§°" #: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp -#, fuzzy msgid "Disable Scene Unique Name" -msgstr "唯一åç§°" +msgstr "ç¦ç”¨åœºæ™¯å”¯ä¸€åç§°" #: editor/scene_tree_dock.cpp msgid "New Scene Root" @@ -14767,7 +14802,7 @@ msgstr "å资æº" #: editor/scene_tree_dock.cpp msgid "Access as Scene Unique Name" -msgstr "" +msgstr "作为场景唯一å称访问" #: editor/scene_tree_dock.cpp msgid "Clear Inheritance" @@ -14903,6 +14938,8 @@ msgid "" "with the '%s' prefix in a node path.\n" "Click to disable this." msgstr "" +"这个节点å¯ä»¥åœ¨åœºæ™¯ä¸çš„ä»»æ„ä½ç½®é€šè¿‡åœ¨èŠ‚ç‚¹è·¯å¾„ä¸ä¸ºå…¶åŠ ä¸Šâ€œ%sâ€å‰ç¼€æ¥è®¿é—®ã€‚\n" +"点击ç¦ç”¨ã€‚" #: editor/scene_tree_editor.cpp msgid "" @@ -15556,38 +15593,6 @@ msgstr "回退至 GLES2" msgid "Use Nvidia Rect Flicker Workaround" msgstr "使用 Nvidia 矩形闪çƒå˜é€šæŽªæ–½" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -msgid "Display" -msgstr "显示" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "宽度" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "高度" - -#: main/main.cpp -msgid "Always On Top" -msgstr "置顶" - -#: main/main.cpp -msgid "Test Width" -msgstr "测试宽度" - -#: main/main.cpp -msgid "Test Height" -msgstr "测试高度" - #: main/main.cpp msgid "DPI" msgstr "DPI" @@ -15689,9 +15694,8 @@ msgid "Physics Interpolation" msgstr "ç‰©ç†æ’值" #: main/main.cpp -#, fuzzy msgid "Enable Warnings" -msgstr "å¯ç”¨ç›é€‰" +msgstr "å¯ç”¨è¦å‘Š" #: main/main.cpp msgid "Frame Delay Msec" @@ -19184,9 +19188,8 @@ msgid "Digest Algorithm" msgstr "摘è¦ç®—法" #: platform/windows/export/export.cpp -#, fuzzy msgid "Modify Resources" -msgstr "å¤åˆ¶èµ„æº" +msgstr "修改资æº" #: platform/windows/export/export.cpp msgid "File Version" @@ -19593,6 +19596,11 @@ msgstr "å¤šè¾¹å½¢æ— æ•ˆã€‚â€œSolidsâ€æž„建模å¼éœ€è¦è‡³å°‘三个点。" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "å¤šè¾¹å½¢æ— æ•ˆã€‚â€œSegmentsâ€æž„建模å¼éœ€è¦è‡³å°‘两个点。" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp msgid "Build Mode" msgstr "构建模å¼" @@ -21208,14 +21216,14 @@ msgstr "" "æä¾›å¯¼èˆªæ•°æ®ã€‚" #: scene/3d/navigation_mesh_instance.cpp -#, fuzzy msgid "NavMesh" -msgstr "çƒ˜ç„™å¯¼èˆªç½‘æ ¼" +msgstr "å¯¼èˆªç½‘æ ¼" #: scene/3d/navigation_obstacle.cpp +#, fuzzy msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "NavigationObstacle åªèƒ½ç”¨äºŽä¸º Spatial 对象é¿å…碰撞。" #: scene/3d/occluder.cpp @@ -23191,6 +23199,8 @@ msgid "" "Setting node name '%s' to be unique within scene for '%s', but it's already " "claimed by '%s'. This node is no longer set unique." msgstr "" +"æ£åœ¨å°†åœºæ™¯ä¸çš„唯一节点å称“%sâ€è®¾ç»™â€œ%sâ€ï¼Œä½†è¯¥å称已被“%sâ€å 用。这个节点ä¸å†å”¯" +"一。" #: scene/main/node.cpp msgid "Name Num Separator" @@ -23213,13 +23223,17 @@ msgid "Pause Mode" msgstr "æš‚åœæ¨¡å¼" #: scene/main/node.cpp +#, fuzzy +msgid "Physics Interpolation Mode" +msgstr "ç‰©ç†æ’值" + +#: scene/main/node.cpp msgid "Display Folded" msgstr "显示折å " #: scene/main/node.cpp -#, fuzzy msgid "Unique Name In Owner" -msgstr "唯一åç§°" +msgstr "所有者唯一åç§°" #: scene/main/node.cpp msgid "Filename" @@ -23241,10 +23255,6 @@ msgstr "自定义多人" msgid "Process Priority" msgstr "处ç†ä¼˜å…ˆçº§" -#: scene/main/node.cpp -msgid "Physics Interpolated" -msgstr "ç‰©ç†æ’值" - #: scene/main/scene_tree.cpp scene/main/timer.cpp msgid "Time Left" msgstr "剩余时间" @@ -23852,6 +23862,11 @@ msgid "Labeled Separator Right" msgstr "带å称分隔线å³ä¾§" #: scene/resources/default_theme/default_theme.cpp +#, fuzzy +msgid "Font Separator" +msgstr "分隔线å—体颜色" + +#: scene/resources/default_theme/default_theme.cpp msgid "Font Color Accel" msgstr "å¿«æ·é”®å—体颜色" @@ -24532,6 +24547,11 @@ msgid "Distance Field" msgstr "è·ç¦»åœº" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "地图数æ®" + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "åç§»" @@ -25133,7 +25153,7 @@ msgstr "扩展边è·" #: scene/resources/style_box.cpp msgid "Skew" -msgstr "" +msgstr "åæ–œ" #: scene/resources/style_box.cpp msgid "Corner Radius" diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po index da22ae2254..5d38b98427 100644 --- a/editor/translations/zh_HK.po +++ b/editor/translations/zh_HK.po @@ -79,11 +79,12 @@ msgstr "下一個腳本" msgid "Screen Orientation" msgstr "開啓最近的" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "" @@ -91,7 +92,7 @@ msgstr "" msgid "Per Pixel Transparency Enabled" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp #, fuzzy msgid "Fullscreen" msgstr "全螢幕" @@ -104,7 +105,7 @@ msgstr "" msgid "Minimized" msgstr "" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "" @@ -118,10 +119,11 @@ msgstr "" msgid "Position" msgstr "åªé™é¸ä¸" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -609,6 +611,42 @@ msgstr "" msgid "Custom User Dir Name" msgstr "" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "全部å–代" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +msgid "Height" +msgstr "" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "線性" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "測試" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1218,7 +1256,7 @@ msgstr "" msgid "Update Mode (How this property is set)" msgstr "" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "模å¼" @@ -6145,6 +6183,11 @@ msgstr "" msgid "Flat" msgstr "" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "無干擾模å¼" + #: editor/editor_sub_scene.cpp #, fuzzy msgid "Select Node(s) to Import" @@ -16368,41 +16411,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "全部å–代" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -msgid "Height" -msgstr "" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "線性" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "測試" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20720,6 +20728,11 @@ msgstr "" msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22435,7 +22448,7 @@ msgstr "" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24592,6 +24605,11 @@ msgstr "鏿“‡æ¨¡å¼" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "模å¼" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "全部å–代" @@ -24622,11 +24640,6 @@ msgstr "" msgid "Process Priority" msgstr "檔案" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "模å¼" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25304,6 +25317,11 @@ msgstr "" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "ç¿»è¯:" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "移除é¸é …" @@ -26094,6 +26112,11 @@ msgid "Distance Field" msgstr "無干擾模å¼" #: scene/resources/gradient.cpp +#, fuzzy +msgid "Raw Data" +msgstr "MeshLibrary..." + +#: scene/resources/gradient.cpp msgid "Offsets" msgstr "" diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po index e01991c1ec..703348c019 100644 --- a/editor/translations/zh_TW.po +++ b/editor/translations/zh_TW.po @@ -105,11 +105,12 @@ msgstr "最大視窗大å°" msgid "Screen Orientation" msgstr "螢幕方å‘" -#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp +#: platform/uwp/os_uwp.cpp msgid "Window" msgstr "視窗" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Borderless" msgstr "無邊框" @@ -117,7 +118,7 @@ msgstr "無邊框" msgid "Per Pixel Transparency Enabled" msgstr "啟用單åƒç´ 逿˜Žåº¦" -#: core/bind/core_bind.cpp main/main.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp msgid "Fullscreen" msgstr "全螢幕" @@ -129,7 +130,7 @@ msgstr "最大化" msgid "Minimized" msgstr "最å°åŒ–" -#: core/bind/core_bind.cpp main/main.cpp scene/gui/dialogs.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp #: scene/gui/graph_node.cpp msgid "Resizable" msgstr "å¯èª¿æ•´å¤§å°çš„" @@ -142,10 +143,11 @@ msgstr "å¯èª¿æ•´å¤§å°çš„" msgid "Position" msgstr "ä½ç½®" -#: core/bind/core_bind.cpp editor/editor_settings.cpp main/main.cpp -#: modules/gridmap/grid_map.cpp modules/visual_script/visual_script_nodes.cpp -#: scene/2d/tile_map.cpp scene/3d/camera.cpp scene/3d/light.cpp -#: scene/gui/control.cpp scene/gui/graph_edit.cpp scene/main/viewport.cpp +#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp +#: main/main.cpp modules/gridmap/grid_map.cpp +#: modules/visual_script/visual_script_nodes.cpp scene/2d/tile_map.cpp +#: scene/3d/camera.cpp scene/3d/light.cpp scene/gui/control.cpp +#: scene/gui/graph_edit.cpp scene/main/viewport.cpp #: scene/resources/dynamic_font.cpp scene/resources/navigation_mesh.cpp #: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp #: scene/resources/style_box.cpp scene/resources/texture.cpp @@ -617,6 +619,43 @@ msgstr "使用自訂使用者目錄" msgid "Custom User Dir Name" msgstr "自訂使用者目錄å稱" +#: core/project_settings.cpp main/main.cpp +#: platform/javascript/export/export.cpp platform/osx/export/export.cpp +#: platform/uwp/os_uwp.cpp +#, fuzzy +msgid "Display" +msgstr "全部顯示" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp +#: scene/gui/text_edit.cpp scene/resources/texture.cpp +msgid "Width" +msgstr "" + +#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp +#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp +#: scene/2d/light_2d.cpp scene/resources/capsule_shape.cpp +#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp +#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp +#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp +#, fuzzy +msgid "Height" +msgstr "燈光" + +#: core/project_settings.cpp +msgid "Always On Top" +msgstr "" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Width" +msgstr "左延展" + +#: core/project_settings.cpp +#, fuzzy +msgid "Test Height" +msgstr "測試" + #: core/project_settings.cpp editor/animation_track_editor.cpp #: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp msgid "Audio" @@ -1221,7 +1260,7 @@ msgstr "打開ï¼é—œé–‰æ¤è»Œé“。" msgid "Update Mode (How this property is set)" msgstr "更新模å¼ï¼ˆå±¬æ€§è¨å®šæ–¹æ³•)" -#: editor/animation_track_editor.cpp +#: editor/animation_track_editor.cpp scene/resources/gradient.cpp msgid "Interpolation Mode" msgstr "æ’值模å¼" @@ -6082,6 +6121,11 @@ msgstr "æŒ‰ä½ %s 以喿•´æ•¸ã€‚æŒ‰ä½ Shift 以進行更精確的更動。" msgid "Flat" msgstr "å¹³é¢0" +#: editor/editor_spin_slider.cpp +#, fuzzy +msgid "Hide Slider" +msgstr "碰撞模å¼" + #: editor/editor_sub_scene.cpp msgid "Select Node(s) to Import" msgstr "鏿“‡è¦åŒ¯å…¥çš„節點" @@ -15905,42 +15949,6 @@ msgstr "" msgid "Use Nvidia Rect Flicker Workaround" msgstr "" -#: main/main.cpp platform/javascript/export/export.cpp -#: platform/osx/export/export.cpp platform/uwp/os_uwp.cpp -#, fuzzy -msgid "Display" -msgstr "全部顯示" - -#: main/main.cpp modules/csg/csg_shape.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp -#: scene/gui/text_edit.cpp scene/resources/texture.cpp -msgid "Width" -msgstr "" - -#: main/main.cpp modules/csg/csg_shape.cpp modules/gltf/gltf_node.cpp -#: modules/opensimplex/noise_texture.cpp scene/2d/light_2d.cpp -#: scene/resources/capsule_shape.cpp scene/resources/capsule_shape_2d.cpp -#: scene/resources/cylinder_shape.cpp scene/resources/font.cpp -#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp -#: scene/resources/texture.cpp -#, fuzzy -msgid "Height" -msgstr "燈光" - -#: main/main.cpp -msgid "Always On Top" -msgstr "" - -#: main/main.cpp -#, fuzzy -msgid "Test Width" -msgstr "左延展" - -#: main/main.cpp -#, fuzzy -msgid "Test Height" -msgstr "測試" - #: main/main.cpp msgid "DPI" msgstr "" @@ -20309,6 +20317,11 @@ msgstr "ç„¡æ•ˆçš„å¤šé‚Šå½¢ã€‚è‡³å°‘å¿…é ˆæœ‰ä¸‰å€‹é»žç‚ºã€ŒSolidsã€å»ºæ§‹æ¨¡å¼ msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode." msgstr "ç„¡æ•ˆçš„å¤šé‚Šå½¢ã€‚è‡³å°‘å¿…é ˆæœ‰ 2 個點為「Segmentsã€å»ºæ§‹æ¨¡å¼ã€‚" +#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp +msgid "" +"The One Way Collision property will be ignored when the parent is an Area2D." +msgstr "" + #: scene/2d/collision_polygon_2d.cpp #, fuzzy msgid "Build Mode" @@ -22125,7 +22138,7 @@ msgstr "製作 NavMesh" #: scene/3d/navigation_obstacle.cpp msgid "" "The NavigationObstacle only serves to provide collision avoidance to a " -"spatial object." +"Spatial inheriting parent object." msgstr "" #: scene/3d/occluder.cpp @@ -24395,6 +24408,11 @@ msgstr "平移模å¼" #: scene/main/node.cpp #, fuzzy +msgid "Physics Interpolation Mode" +msgstr "æ’值模å¼" + +#: scene/main/node.cpp +#, fuzzy msgid "Display Folded" msgstr "顯示無陰影" @@ -24428,11 +24446,6 @@ msgstr "è¨å®šå¤šå€‹ï¼š" msgid "Process Priority" msgstr "啟用優先級" -#: scene/main/node.cpp -#, fuzzy -msgid "Physics Interpolated" -msgstr "æ’值模å¼" - #: scene/main/scene_tree.cpp scene/main/timer.cpp #, fuzzy msgid "Time Left" @@ -25141,6 +25154,11 @@ msgstr "帶å稱的分隔線" #: scene/resources/default_theme/default_theme.cpp #, fuzzy +msgid "Font Separator" +msgstr "色彩é‹ç®—å。" + +#: scene/resources/default_theme/default_theme.cpp +#, fuzzy msgid "Font Color Accel" msgstr "釿–°å‘½åé¡è‰²é …ç›®" @@ -25949,6 +25967,11 @@ msgstr "專注模å¼" #: scene/resources/gradient.cpp #, fuzzy +msgid "Raw Data" +msgstr "深度" + +#: scene/resources/gradient.cpp +#, fuzzy msgid "Offsets" msgstr "å移:" diff --git a/main/main.cpp b/main/main.cpp index 2134e5079d..4d4173b2ee 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -342,9 +342,9 @@ void Main::print_help(const char *p_binary) { OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n"); OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n"); OS::get_singleton()->print(" --gpu-profile Show a GPU profile of the tasks that took the most time during frame rendering.\n"); - OS::get_singleton()->print(" --vk-layers Enable Vulkan validation layers for debugging.\n"); + OS::get_singleton()->print(" --gpu-validation Enable graphics API validation layers for debugging.\n"); #if DEBUG_ENABLED - OS::get_singleton()->print(" --gpu-abort Abort on GPU errors (usually validation layer errors), may help see the problem if your system freezes.\n"); + OS::get_singleton()->print(" --gpu-abort Abort on graphics API usage errors (usually validation layer errors). May help see the problem if your system freezes.\n"); #endif OS::get_singleton()->print(" --remote-debug <uri> Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n"); #if defined(DEBUG_ENABLED) @@ -831,7 +831,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->print("Missing GPU index argument, aborting.\n"); goto error; } - } else if (I->get() == "--vk-layers") { + } else if (I->get() == "--gpu-validation") { Engine::singleton->use_validation_layers = true; #ifdef DEBUG_ENABLED } else if (I->get() == "--gpu-abort") { @@ -1506,7 +1506,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/default_action_map", PropertyInfo(Variant::STRING, "xr/openxr/default_action_map", PROPERTY_HINT_FILE, "*.tres")); GLOBAL_DEF_BASIC("xr/openxr/form_factor", "0"); - ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/form_factor", PropertyInfo(Variant::INT, "xr/openxr/form_factor", PROPERTY_HINT_ENUM, "Head mounted,Handheld")); + ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/form_factor", PropertyInfo(Variant::INT, "xr/openxr/form_factor", PROPERTY_HINT_ENUM, "Head Mounted,Handheld")); GLOBAL_DEF_BASIC("xr/openxr/view_configuration", "1"); ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/view_configuration", PropertyInfo(Variant::INT, "xr/openxr/view_configuration", PROPERTY_HINT_ENUM, "Mono,Stereo")); // "Mono,Stereo,Quad,Observer" @@ -2149,8 +2149,8 @@ bool Main::start() { doc.generate(doc_base); DocTools docsrc; - Map<String, String> doc_data_classes; - Set<String> checked_paths; + HashMap<String, String> doc_data_classes; + RBSet<String> checked_paths; print_line("Loading docs..."); for (int i = 0; i < _doc_data_class_path_count; i++) { @@ -2189,10 +2189,10 @@ bool Main::start() { print_line("Merging docs..."); doc.merge_from(docsrc); - for (Set<String>::Element *E = checked_paths.front(); E; E = E->next()) { - print_line("Erasing old docs at: " + E->get()); - err = DocTools::erase_classes(E->get()); - ERR_FAIL_COND_V_MSG(err != OK, false, "Error erasing old docs at: " + E->get() + ": " + itos(err)); + for (const String &E : checked_paths) { + print_line("Erasing old docs at: " + E); + err = DocTools::erase_classes(E); + ERR_FAIL_COND_V_MSG(err != OK, false, "Error erasing old docs at: " + E + ": " + itos(err)); } print_line("Generating new docs..."); @@ -2634,6 +2634,7 @@ bool Main::start() { uint64_t Main::last_ticks = 0; uint32_t Main::frames = 0; +uint32_t Main::hide_print_fps_attempts = 3; uint32_t Main::frame = 0; bool Main::force_redraw_requested = false; int Main::iterating = 0; @@ -2774,12 +2775,17 @@ bool Main::iteration() { Engine::get_singleton()->_process_frames++; if (frame > 1000000) { - if (editor || project_manager) { - if (print_fps) { - print_line(vformat("Editor FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(2))); + // Wait a few seconds before printing FPS, as FPS reporting just after the engine has started is inaccurate. + if (hide_print_fps_attempts == 0) { + if (editor || project_manager) { + if (print_fps) { + print_line(vformat("Editor FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(2))); + } + } else if (print_fps || GLOBAL_GET("debug/settings/stdout/print_fps")) { + print_line(vformat("Project FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(2))); } - } else if (GLOBAL_GET("debug/settings/stdout/print_fps") || print_fps) { - print_line(vformat("Project FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(2))); + } else { + hide_print_fps_attempts--; } Engine::get_singleton()->_fps = frames; diff --git a/main/main.h b/main/main.h index 14a8fb4147..d1870ab8df 100644 --- a/main/main.h +++ b/main/main.h @@ -38,6 +38,7 @@ class Main { static void print_help(const char *p_binary); static uint64_t last_ticks; + static uint32_t hide_print_fps_attempts; static uint32_t frames; static uint32_t frame; static bool force_redraw_requested; diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html index 8d436038c1..7c44dd45a1 100644 --- a/misc/dist/html/editor.html +++ b/misc/dist/html/editor.html @@ -68,6 +68,11 @@ height: 100%; overflow: auto; background-color: hsla(0, 0%, 0%, 0.5); + text-align: left; + } + + .welcome-modal-title { + text-align: center; } .welcome-modal-content { @@ -238,7 +243,7 @@ onclick="if (event.target === this) closeWelcomeModal(false)" > <div class="welcome-modal-content"> - <h2 id="welcome-modal-title">Important - Please read before continuing</h2> + <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read before continuing</h2> <div id="welcome-modal-description"> <p> The Godot Web Editor has some limitations compared to the native version. @@ -254,9 +259,38 @@ >Web editor documentation</a> for usage instructions and limitations. </p> </div> - <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem"> - OK, don't show again - </button> + <div id="welcome-modal-description-no-cross-origin-isolation" style="display: none"> + <p> + The web server does not support cross-origin isolation, + which is required for the Godot Web Editor to function. + </p> + <p> + <strong>Reasons for cross-origin isolation being disabled:</strong> + <ul> + <li id="welcome-modal-reason-not-secure"> + This page is not served from a secure context (HTTPS <i>or</i> localhost). + </li> + <li> + This page may not be served with cross-origin isolation headers + (check with the developer tools' Network tab). + </li> + </ul> + </p> + <p> + If you are self-hosting the web editor, + refer to + <a + href="https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#threads" + target="_blank" + rel="noopener" + >Exporting for the Web - Threads</a> for more information. + </p> + </div> + <div style="text-align: center"> + <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem"> + OK, don't show again + </button> + </div> </div> </div> <div id="tabs-buttons"> @@ -360,7 +394,16 @@ }); } - if (localStorage.getItem("welcomeModalDismissed") !== 'true') { + if (!crossOriginIsolated) { + // Display error dialog as threading support is required for the editor. + setButtonEnabled('startButton', false); + document.getElementById("welcome-modal-description").style.display = "none"; + document.getElementById("welcome-modal-description-no-cross-origin-isolation").style.display = "block"; + document.getElementById("welcome-modal-dismiss").style.display = "none"; + document.getElementById("welcome-modal-reason-not-secure").style.display = window.isSecureContext ? "none" : "list-item"; + } + + if (!crossOriginIsolated || localStorage.getItem("welcomeModalDismissed") !== 'true') { document.getElementById("welcome-modal").style.display = "block"; document.getElementById("welcome-modal-dismiss").focus(); } diff --git a/misc/dist/shell/_godot.zsh-completion b/misc/dist/shell/_godot.zsh-completion index aaa5fe0a06..6444ca337e 100644 --- a/misc/dist/shell/_godot.zsh-completion +++ b/misc/dist/shell/_godot.zsh-completion @@ -61,8 +61,8 @@ _arguments \ '(-b --breakpoints)'{-b,--breakpoints}'[specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)]:breakpoint list' \ '--profiling[enable profiling in the script debugger]' \ '--gpu-profile[show a GPU profile of the tasks that took the most time during frame rendering]' \ - '--vk-layers[enable Vulkan validation layers for debugging]' \ - '--gpu-abort[abort on GPU errors (usually validation layer errors)]' \ + '--gpu-validation[enable graphics API validation layers for debugging]' \ + '--gpu-abort[abort on graphics API usage errors (usually validation layer errors)]' \ '--remote-debug[enable remote debugging]:remote debugger address' \ '--debug-collisions[show collision shapes when running the scene]' \ '--debug-navigation[show navigation polygons when running the scene]' \ diff --git a/misc/dist/shell/godot.bash-completion b/misc/dist/shell/godot.bash-completion index 7927d26171..31e067e29a 100644 --- a/misc/dist/shell/godot.bash-completion +++ b/misc/dist/shell/godot.bash-completion @@ -64,7 +64,7 @@ _complete_godot_options() { --breakpoints --profiling --gpu-profile ---vk-layers +--gpu-validation --gpu-abort --remote-debug --debug-collisions diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish index c05aa74017..da4ce1190c 100644 --- a/misc/dist/shell/godot.fish +++ b/misc/dist/shell/godot.fish @@ -74,8 +74,8 @@ complete -c godot -s d -l debug -d "Debug (local stdout debugger)" complete -c godot -s b -l breakpoints -d "Specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)" -x complete -c godot -l profiling -d "Enable profiling in the script debugger" complete -c godot -l gpu-profile -d "Show a GPU profile of the tasks that took the most time during frame rendering" -complete -c godot -l vk-layers -d "Enable Vulkan validation layers for debugging" -complete -c godot -l gpu-abort -d "Abort on GPU errors (usually validation layer errors)" +complete -c godot -l gpu-validation -d "Enable graphics API validation layers for debugging" +complete -c godot -l gpu-abort -d "Abort on graphics API usage errors (usually validation layer errors)" complete -c godot -l remote-debug -d "Enable remote debugging" complete -c godot -l debug-collisions -d "Show collision shapes when running the scene" complete -c godot -l debug-navigation -d "Show navigation polygons when running the scene" diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index 177014e5a7..93533e1690 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -211,7 +211,7 @@ void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector< int ic = p_flip_faces.size(); const bool *ri = p_flip_faces.ptr(); - Map<Ref<Material>, int> material_map; + HashMap<Ref<Material>, int> material_map; faces.resize(p_vertices.size() / 3); @@ -242,10 +242,10 @@ void CSGBrush::build_from_faces(const Vector<Vector3> &p_vertices, const Vector< if (mc == vc / 3) { Ref<Material> mat = rm[i]; if (mat.is_valid()) { - const Map<Ref<Material>, int>::Element *E = material_map.find(mat); + HashMap<Ref<Material>, int>::ConstIterator E = material_map.find(mat); if (E) { - f.material = E->get(); + f.material = E->value; } else { f.material = material_map.size(); material_map[mat] = f.material; diff --git a/modules/csg/csg.h b/modules/csg/csg.h index 9ff7b13a44..53a9e5d722 100644 --- a/modules/csg/csg.h +++ b/modules/csg/csg.h @@ -38,8 +38,8 @@ #include "core/math/vector3.h" #include "core/object/ref_counted.h" #include "core/templates/list.h" -#include "core/templates/map.h" #include "core/templates/oa_hash_map.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "scene/resources/material.h" @@ -139,8 +139,8 @@ struct CSGBrushOperation { Vector<Vector3> points; Vector<Face> faces; - Map<Ref<Material>, int> materials; - Map<Vector3, int> vertex_map; + HashMap<Ref<Material>, int> materials; + HashMap<Vector3, int> vertex_map; OAHashMap<VertexKey, int, VertexKeyHash> snap_cache; float vertex_snap = 0.0; @@ -184,8 +184,8 @@ struct CSGBrushOperation { }; struct Build2DFaceCollection { - Map<int, Build2DFaces> build2DFacesA; - Map<int, Build2DFaces> build2DFacesB; + HashMap<int, Build2DFaces> build2DFacesA; + HashMap<int, Build2DFaces> build2DFacesB; }; void update_faces(const CSGBrush &p_brush_a, const int p_face_idx_a, const CSGBrush &p_brush_b, const int p_face_idx_b, Build2DFaceCollection &p_collection, float p_vertex_snap); diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index a5b3db89d9..25772bebbe 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -1052,7 +1052,7 @@ void CSGSphere3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGSphere3D::set_material); ClassDB::bind_method(D_METHOD("get_material"), &CSGSphere3D::get_material); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,suffix:m"), "set_radius", "get_radius"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1"), "set_radial_segments", "get_radial_segments"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1"), "set_rings", "get_rings"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces"); @@ -1225,7 +1225,7 @@ void CSGBox3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGBox3D::set_material); ClassDB::bind_method(D_METHOD("get_material"), &CSGBox3D::get_material); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size", PROPERTY_HINT_NONE, "suffix:m"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "BaseMaterial3D,ShaderMaterial"), "set_material", "get_material"); } @@ -1405,8 +1405,8 @@ void CSGCylinder3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_smooth_faces", "smooth_faces"), &CSGCylinder3D::set_smooth_faces); ClassDB::bind_method(D_METHOD("get_smooth_faces"), &CSGCylinder3D::get_smooth_faces); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,1000.0,0.001,or_greater,exp"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,1000.0,0.001,or_greater,exp"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,1000.0,0.001,or_greater,exp,suffix:m"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,1000.0,0.001,or_greater,exp,suffix:m"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_sides", "get_sides"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cone"), "set_cone", "is_cone"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces"); @@ -1630,8 +1630,8 @@ void CSGTorus3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_smooth_faces", "smooth_faces"), &CSGTorus3D::set_smooth_faces); ClassDB::bind_method(D_METHOD("get_smooth_faces"), &CSGTorus3D::get_smooth_faces); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inner_radius", PROPERTY_HINT_RANGE, "0.001,1000.0,0.001,or_greater,exp"), "set_inner_radius", "get_inner_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "outer_radius", PROPERTY_HINT_RANGE, "0.001,1000.0,0.001,or_greater,exp"), "set_outer_radius", "get_outer_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inner_radius", PROPERTY_HINT_RANGE, "0.001,1000.0,0.001,or_greater,exp,suffix:m"), "set_inner_radius", "get_inner_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "outer_radius", PROPERTY_HINT_RANGE, "0.001,1000.0,0.001,or_greater,exp,suffix:m"), "set_outer_radius", "get_outer_radius"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_sides", "get_sides"); ADD_PROPERTY(PropertyInfo(Variant::INT, "ring_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_ring_sides", "get_ring_sides"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces"); diff --git a/modules/csg/editor/csg_gizmos.cpp b/modules/csg/editor/csg_gizmos.cpp index 4d972e46c6..6442ff71fc 100644 --- a/modules/csg/editor/csg_gizmos.cpp +++ b/modules/csg/editor/csg_gizmos.cpp @@ -349,9 +349,11 @@ void CSGShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { if (cs->is_root_shape()) { Array csg_meshes = cs->get_meshes(); - Ref<Mesh> csg_mesh = csg_meshes[1]; - if (csg_mesh.is_valid()) { - p_gizmo->add_collision_triangles(csg_mesh->generate_triangle_mesh()); + if (csg_meshes.size() == 2) { + Ref<Mesh> csg_mesh = csg_meshes[1]; + if (csg_mesh.is_valid()) { + p_gizmo->add_collision_triangles(csg_mesh->generate_triangle_mesh()); + } } } diff --git a/modules/enet/enet_multiplayer_peer.h b/modules/enet/enet_multiplayer_peer.h index e7b61169fb..18eca18e51 100644 --- a/modules/enet/enet_multiplayer_peer.h +++ b/modules/enet/enet_multiplayer_peer.h @@ -70,8 +70,8 @@ private: ConnectionStatus connection_status = CONNECTION_DISCONNECTED; - Map<int, Ref<ENetConnection>> hosts; - Map<int, Ref<ENetPacketPeer>> peers; + HashMap<int, Ref<ENetConnection>> hosts; + HashMap<int, Ref<ENetPacketPeer>> peers; struct Packet { ENetPacket *packet = nullptr; diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub index d23c4b637c..4b2ea6faa5 100644 --- a/modules/freetype/SCsub +++ b/modules/freetype/SCsub @@ -49,6 +49,7 @@ if env["builtin_freetype"]: "src/psnames/psnames.c", "src/raster/raster.c", "src/sdf/sdf.c", + "src/svg/svg.c", "src/smooth/smooth.c", "src/truetype/truetype.c", "src/type1/type1.c", @@ -87,7 +88,7 @@ if env["builtin_freetype"]: # Also needed in main env for scene/ env.Prepend(CPPPATH=[thirdparty_dir + "/include"]) - env_freetype.Append(CPPDEFINES=["FT2_BUILD_LIBRARY", "FT_CONFIG_OPTION_USE_PNG"]) + env_freetype.Append(CPPDEFINES=["FT2_BUILD_LIBRARY", "FT_CONFIG_OPTION_USE_PNG", "FT_CONFIG_OPTION_SYSTEM_ZLIB"]) if env["target"] == "debug": env_freetype.Append(CPPDEFINES=["ZLIB_DEBUG"]) diff --git a/modules/gdscript/editor/gdscript_highlighter.h b/modules/gdscript/editor/gdscript_highlighter.h index 1ae0d72896..92764e3891 100644 --- a/modules/gdscript/editor/gdscript_highlighter.h +++ b/modules/gdscript/editor/gdscript_highlighter.h @@ -45,7 +45,7 @@ private: bool line_only = false; }; Vector<ColorRegion> color_regions; - Map<int, int> color_region_cache; + HashMap<int, int> color_region_cache; HashMap<StringName, Color> keywords; HashMap<StringName, Color> member_keywords; diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.h b/modules/gdscript/editor/gdscript_translation_parser_plugin.h index e7b40aa367..4633a431d8 100644 --- a/modules/gdscript/editor/gdscript_translation_parser_plugin.h +++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.h @@ -31,7 +31,7 @@ #ifndef GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H #define GDSCRIPT_TRANSLATION_PARSER_PLUGIN_H -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "editor/editor_translation_parser.h" #include "modules/gdscript/gdscript_parser.h" @@ -44,9 +44,9 @@ class GDScriptEditorTranslationParserPlugin : public EditorTranslationParserPlug // List of patterns used for extracting translation strings. StringName tr_func = "tr"; StringName trn_func = "tr_n"; - Set<StringName> assignment_patterns; - Set<StringName> first_arg_patterns; - Set<StringName> second_arg_patterns; + RBSet<StringName> assignment_patterns; + RBSet<StringName> first_arg_patterns; + RBSet<StringName> second_arg_patterns; // FileDialog patterns. StringName fd_add_filter = "add_filter"; StringName fd_set_filter = "set_filters"; diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 1b4711804c..25f4823d92 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -340,14 +340,14 @@ bool GDScript::has_method(const StringName &p_method) const { } MethodInfo GDScript::get_method_info(const StringName &p_method) const { - const Map<StringName, GDScriptFunction *>::Element *E = member_functions.find(p_method); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = member_functions.find(p_method); if (!E) { return MethodInfo(); } - GDScriptFunction *func = E->get(); + GDScriptFunction *func = E->value; MethodInfo mi; - mi.name = E->key(); + mi.name = E->key; for (int i = 0; i < func->get_argument_count(); i++) { mi.arguments.push_back(func->get_argument_type(i)); } @@ -359,9 +359,9 @@ MethodInfo GDScript::get_method_info(const StringName &p_method) const { bool GDScript::get_property_default_value(const StringName &p_property, Variant &r_value) const { #ifdef TOOLS_ENABLED - const Map<StringName, Variant>::Element *E = member_default_values_cache.find(p_property); + HashMap<StringName, Variant>::ConstIterator E = member_default_values_cache.find(p_property); if (E) { - r_value = E->get(); + r_value = E->value; return true; } @@ -427,7 +427,7 @@ void GDScript::set_source_code(const String &p_code) { } #ifdef TOOLS_ENABLED -void GDScript::_update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames) { +void GDScript::_update_exports_values(HashMap<StringName, Variant> &values, List<PropertyInfo> &propnames) { if (base_cache.is_valid()) { base_cache->_update_exports_values(values, propnames); } @@ -759,13 +759,13 @@ bool GDScript::_update_exports(bool *r_err, bool p_recursive_call, PlaceHolderSc if ((changed || p_instance_to_update) && placeholders.size()) { //hm :( // update placeholders if any - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; List<PropertyInfo> propnames; _update_exports_values(values, propnames); if (changed) { - for (Set<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) { - E->get()->update(propnames, values); + for (PlaceHolderScriptInstance *E : placeholders) { + E->update(propnames, values); } } else { p_instance_to_update->update(propnames, values); @@ -788,10 +788,10 @@ void GDScript::update_exports() { return; } - Set<ObjectID> copy = inheriters_cache; //might get modified + RBSet<ObjectID> copy = inheriters_cache; //might get modified - for (Set<ObjectID>::Element *E = copy.front(); E; E = E->next()) { - Object *id = ObjectDB::get_instance(E->get()); + for (const ObjectID &E : copy) { + Object *id = ObjectDB::get_instance(E); GDScript *s = Object::cast_to<GDScript>(id); if (!s) { continue; @@ -929,7 +929,7 @@ ScriptLanguage *GDScript::get_language() const { return GDScriptLanguage::get_singleton(); } -void GDScript::get_constants(Map<StringName, Variant> *p_constants) { +void GDScript::get_constants(HashMap<StringName, Variant> *p_constants) { if (p_constants) { for (const KeyValue<StringName, Variant> &E : constants) { (*p_constants)[E.key] = E.value; @@ -937,10 +937,10 @@ void GDScript::get_constants(Map<StringName, Variant> *p_constants) { } } -void GDScript::get_members(Set<StringName> *p_members) { +void GDScript::get_members(RBSet<StringName> *p_members) { if (p_members) { - for (Set<StringName>::Element *E = members.front(); E; E = E->next()) { - p_members->insert(E->get()); + for (const StringName &E : members) { + p_members->insert(E); } } } @@ -952,11 +952,11 @@ const Vector<Multiplayer::RPCConfig> GDScript::get_rpc_methods() const { Variant GDScript::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { GDScript *top = this; while (top) { - Map<StringName, GDScriptFunction *>::Element *E = top->member_functions.find(p_method); + HashMap<StringName, GDScriptFunction *>::Iterator E = top->member_functions.find(p_method); if (E) { - ERR_FAIL_COND_V_MSG(!E->get()->is_static(), Variant(), "Can't call non-static function '" + String(p_method) + "' in script."); + ERR_FAIL_COND_V_MSG(!E->value->is_static(), Variant(), "Can't call non-static function '" + String(p_method) + "' in script."); - return E->get()->call(nullptr, p_args, p_argcount, r_error); + return E->value->call(nullptr, p_args, p_argcount, r_error); } top = top->_base; } @@ -971,17 +971,17 @@ bool GDScript::_get(const StringName &p_name, Variant &r_ret) const { const GDScript *top = this; while (top) { { - const Map<StringName, Variant>::Element *E = top->constants.find(p_name); + HashMap<StringName, Variant>::ConstIterator E = top->constants.find(p_name); if (E) { - r_ret = E->get(); + r_ret = E->value; return true; } } { - const Map<StringName, Ref<GDScript>>::Element *E = subclasses.find(p_name); + HashMap<StringName, Ref<GDScript>>::ConstIterator E = subclasses.find(p_name); if (E) { - r_ret = E->get(); + r_ret = E->value; return true; } } @@ -1061,7 +1061,7 @@ Error GDScript::load_source_code(const String &p_path) { return OK; } -const Map<StringName, GDScriptFunction *> &GDScript::debug_get_member_functions() const { +const HashMap<StringName, GDScriptFunction *> &GDScript::debug_get_member_functions() const { return member_functions; } @@ -1209,7 +1209,7 @@ void GDScript::_init_rpc_methods_properties() { } GDScript *cscript = this; - Map<StringName, Ref<GDScript>>::Element *sub_E = subclasses.front(); + HashMap<StringName, Ref<GDScript>>::Iterator sub_E = subclasses.begin(); while (cscript) { // RPC Methods for (KeyValue<StringName, GDScriptFunction *> &E : cscript->member_functions) { @@ -1223,11 +1223,11 @@ void GDScript::_init_rpc_methods_properties() { } if (cscript != this) { - sub_E = sub_E->next(); + ++sub_E; } if (sub_E) { - cscript = sub_E->get().ptr(); + cscript = sub_E->value.ptr(); } else { cscript = nullptr; } @@ -1282,9 +1282,9 @@ GDScript::~GDScript() { bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) { //member { - const Map<StringName, GDScript::MemberInfo>::Element *E = script->member_indices.find(p_name); + HashMap<StringName, GDScript::MemberInfo>::Iterator E = script->member_indices.find(p_name); if (E) { - const GDScript::MemberInfo *member = &E->get(); + const GDScript::MemberInfo *member = &E->value; if (member->setter) { const Variant *val = &p_value; Callable::CallError err; @@ -1325,13 +1325,13 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) { GDScript *sptr = script.ptr(); while (sptr) { - Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._set); + HashMap<StringName, GDScriptFunction *>::Iterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._set); if (E) { Variant name = p_name; const Variant *args[2] = { &name, &p_value }; Callable::CallError err; - Variant ret = E->get()->call(this, (const Variant **)args, 2, err); + Variant ret = E->value->call(this, (const Variant **)args, 2, err); if (err.error == Callable::CallError::CALL_OK && ret.get_type() == Variant::BOOL && ret.operator bool()) { return true; } @@ -1346,16 +1346,16 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { const GDScript *sptr = script.ptr(); while (sptr) { { - const Map<StringName, GDScript::MemberInfo>::Element *E = script->member_indices.find(p_name); + HashMap<StringName, GDScript::MemberInfo>::ConstIterator E = script->member_indices.find(p_name); if (E) { - if (E->get().getter) { + if (E->value.getter) { Callable::CallError err; - r_ret = const_cast<GDScriptInstance *>(this)->callp(E->get().getter, nullptr, 0, err); + r_ret = const_cast<GDScriptInstance *>(this)->callp(E->value.getter, nullptr, 0, err); if (err.error == Callable::CallError::CALL_OK) { return true; } } - r_ret = members[E->get().index]; + r_ret = members[E->value.index]; return true; //index found } } @@ -1363,9 +1363,9 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { { const GDScript *sl = sptr; while (sl) { - const Map<StringName, Variant>::Element *E = sl->constants.find(p_name); + HashMap<StringName, Variant>::ConstIterator E = sl->constants.find(p_name); if (E) { - r_ret = E->get(); + r_ret = E->value; return true; //index found } sl = sl->_base; @@ -1376,9 +1376,9 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { // Signals. const GDScript *sl = sptr; while (sl) { - const Map<StringName, Vector<StringName>>::Element *E = sl->_signals.find(p_name); + HashMap<StringName, Vector<StringName>>::ConstIterator E = sl->_signals.find(p_name); if (E) { - r_ret = Signal(this->owner, E->key()); + r_ret = Signal(this->owner, E->key); return true; //index found } sl = sl->_base; @@ -1389,14 +1389,14 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { // Methods. const GDScript *sl = sptr; while (sl) { - const Map<StringName, GDScriptFunction *>::Element *E = sl->member_functions.find(p_name); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = sl->member_functions.find(p_name); if (E) { Multiplayer::RPCConfig config; config.name = p_name; if (sptr->rpc_functions.find(config) != -1) { - r_ret = Callable(memnew(GDScriptRPCCallable(this->owner, E->key()))); + r_ret = Callable(memnew(GDScriptRPCCallable(this->owner, E->key))); } else { - r_ret = Callable(this->owner, E->key()); + r_ret = Callable(this->owner, E->key); } return true; //index found } @@ -1405,13 +1405,13 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const { } { - const Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get); if (E) { Variant name = p_name; const Variant *args[1] = { &name }; Callable::CallError err; - Variant ret = const_cast<GDScriptFunction *>(E->get())->call(const_cast<GDScriptInstance *>(this), (const Variant **)args, 1, err); + Variant ret = const_cast<GDScriptFunction *>(E->value)->call(const_cast<GDScriptInstance *>(this), (const Variant **)args, 1, err); if (err.error == Callable::CallError::CALL_OK && ret.get_type() != Variant::NIL) { r_ret = ret; return true; @@ -1449,10 +1449,10 @@ void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const List<PropertyInfo> props; while (sptr) { - const Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get_property_list); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get_property_list); if (E) { Callable::CallError err; - Variant ret = const_cast<GDScriptFunction *>(E->get())->call(const_cast<GDScriptInstance *>(this), nullptr, 0, err); + Variant ret = const_cast<GDScriptFunction *>(E->value)->call(const_cast<GDScriptInstance *>(this), nullptr, 0, err); if (err.error == Callable::CallError::CALL_OK) { ERR_FAIL_COND_MSG(ret.get_type() != Variant::ARRAY, "Wrong type for _get_property_list, must be an array of dictionaries."); @@ -1525,7 +1525,7 @@ void GDScriptInstance::get_method_list(List<MethodInfo> *p_list) const { bool GDScriptInstance::has_method(const StringName &p_method) const { const GDScript *sptr = script.ptr(); while (sptr) { - const Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(p_method); + HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(p_method); if (E) { return true; } @@ -1538,9 +1538,9 @@ bool GDScriptInstance::has_method(const StringName &p_method) const { Variant GDScriptInstance::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { GDScript *sptr = script.ptr(); while (sptr) { - Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(p_method); + HashMap<StringName, GDScriptFunction *>::Iterator E = sptr->member_functions.find(p_method); if (E) { - return E->get()->call(this, p_args, p_argcount, r_error); + return E->value->call(this, p_args, p_argcount, r_error); } sptr = sptr->_base; } @@ -1555,10 +1555,10 @@ void GDScriptInstance::notification(int p_notification) { GDScript *sptr = script.ptr(); while (sptr) { - Map<StringName, GDScriptFunction *>::Element *E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._notification); + HashMap<StringName, GDScriptFunction *>::Iterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._notification); if (E) { Callable::CallError err; - E->get()->call(this, args, 1, err); + E->value->call(this, args, 1, err); if (err.error != Callable::CallError::CALL_OK) { //print error about notification call } @@ -1882,7 +1882,7 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so //when someone asks you why dynamically typed languages are easier to write.... - Map<Ref<GDScript>, Map<ObjectID, List<Pair<StringName, Variant>>>> to_reload; + HashMap<Ref<GDScript>, HashMap<ObjectID, List<Pair<StringName, Variant>>>> to_reload; //as scripts are going to be reloaded, must proceed without locking here @@ -1895,11 +1895,11 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so continue; } - to_reload.insert(script, Map<ObjectID, List<Pair<StringName, Variant>>>()); + to_reload.insert(script, HashMap<ObjectID, List<Pair<StringName, Variant>>>()); if (!p_soft_reload) { //save state and remove script from instances - Map<ObjectID, List<Pair<StringName, Variant>>> &map = to_reload[script]; + HashMap<ObjectID, List<Pair<StringName, Variant>>> &map = to_reload[script]; while (script->instances.front()) { Object *obj = script->instances.front()->get(); @@ -1938,7 +1938,7 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so } } - for (KeyValue<Ref<GDScript>, Map<ObjectID, List<Pair<StringName, Variant>>>> &E : to_reload) { + for (KeyValue<Ref<GDScript>, HashMap<ObjectID, List<Pair<StringName, Variant>>>> &E : to_reload) { Ref<GDScript> scr = E.key; scr->reload(p_soft_reload); @@ -2277,13 +2277,13 @@ void GDScriptLanguage::add_orphan_subclass(const String &p_qualified_name, const } Ref<GDScript> GDScriptLanguage::get_orphan_subclass(const String &p_qualified_name) { - Map<String, ObjectID>::Element *orphan_subclass_element = orphan_subclasses.find(p_qualified_name); + HashMap<String, ObjectID>::Iterator orphan_subclass_element = orphan_subclasses.find(p_qualified_name); if (!orphan_subclass_element) { return Ref<GDScript>(); } - ObjectID orphan_subclass = orphan_subclass_element->get(); + ObjectID orphan_subclass = orphan_subclass_element->value; Object *obj = ObjectDB::get_instance(orphan_subclass); - orphan_subclasses.erase(orphan_subclass_element); + orphan_subclasses.remove(orphan_subclass_element); if (!obj) { return Ref<GDScript>(); } @@ -2372,7 +2372,7 @@ Error ResourceFormatSaverGDScript::save(const String &p_path, const Ref<Resource } if (ScriptServer::is_reload_scripts_on_save_enabled()) { - GDScriptLanguage::get_singleton()->reload_tool_script(p_resource, false); + GDScriptLanguage::get_singleton()->reload_tool_script(p_resource, true); } return OK; diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h index a20f3b2fca..5199d3215d 100644 --- a/modules/gdscript/gdscript.h +++ b/modules/gdscript/gdscript.h @@ -80,48 +80,48 @@ class GDScript : public Script { GDScript *_base = nullptr; //fast pointer access GDScript *_owner = nullptr; //for subclasses - Set<StringName> members; //members are just indices to the instantiated script. - Map<StringName, Variant> constants; - Map<StringName, GDScriptFunction *> member_functions; - Map<StringName, MemberInfo> member_indices; //members are just indices to the instantiated script. - Map<StringName, Ref<GDScript>> subclasses; - Map<StringName, Vector<StringName>> _signals; + RBSet<StringName> members; //members are just indices to the instantiated script. + HashMap<StringName, Variant> constants; + HashMap<StringName, GDScriptFunction *> member_functions; + HashMap<StringName, MemberInfo> member_indices; //members are just indices to the instantiated script. + HashMap<StringName, Ref<GDScript>> subclasses; + HashMap<StringName, Vector<StringName>> _signals; Vector<Multiplayer::RPCConfig> rpc_functions; #ifdef TOOLS_ENABLED - Map<StringName, int> member_lines; - Map<StringName, Variant> member_default_values; + HashMap<StringName, int> member_lines; + HashMap<StringName, Variant> member_default_values; List<PropertyInfo> members_cache; - Map<StringName, Variant> member_default_values_cache; + HashMap<StringName, Variant> member_default_values_cache; Ref<GDScript> base_cache; - Set<ObjectID> inheriters_cache; + RBSet<ObjectID> inheriters_cache; bool source_changed_cache = false; bool placeholder_fallback_enabled = false; - void _update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames); + void _update_exports_values(HashMap<StringName, Variant> &values, List<PropertyInfo> &propnames); DocData::ClassDoc doc; Vector<DocData::ClassDoc> docs; String doc_brief_description; String doc_description; Vector<DocData::TutorialDoc> doc_tutorials; - Map<String, String> doc_functions; - Map<String, String> doc_variables; - Map<String, String> doc_constants; - Map<String, String> doc_signals; - Map<String, DocData::EnumDoc> doc_enums; + HashMap<String, String> doc_functions; + HashMap<String, String> doc_variables; + HashMap<String, String> doc_constants; + HashMap<String, String> doc_signals; + HashMap<String, DocData::EnumDoc> doc_enums; void _clear_doc(); void _update_doc(); void _add_doc(const DocData::ClassDoc &p_inner_class); #endif - Map<StringName, PropertyInfo> member_info; + HashMap<StringName, PropertyInfo> member_info; GDScriptFunction *implicit_initializer = nullptr; GDScriptFunction *initializer = nullptr; //direct pointer to new , faster to locate int subclass_count = 0; - Set<Object *> instances; + RBSet<Object *> instances; //exported members String source; String path; @@ -139,14 +139,14 @@ class GDScript : public Script { String _get_debug_path() const; #ifdef TOOLS_ENABLED - Set<PlaceHolderScriptInstance *> placeholders; + RBSet<PlaceHolderScriptInstance *> placeholders; //void _update_placeholder(PlaceHolderScriptInstance *p_placeholder); virtual void _placeholder_erased(PlaceHolderScriptInstance *p_placeholder) override; #endif #ifdef DEBUG_ENABLED - Map<ObjectID, List<Pair<StringName, Variant>>> pending_reload_state; + HashMap<ObjectID, List<Pair<StringName, Variant>>> pending_reload_state; #endif @@ -176,14 +176,14 @@ public: bool inherits_script(const Ref<Script> &p_script) const override; - const Map<StringName, Ref<GDScript>> &get_subclasses() const { return subclasses; } - const Map<StringName, Variant> &get_constants() const { return constants; } - const Set<StringName> &get_members() const { return members; } + const HashMap<StringName, Ref<GDScript>> &get_subclasses() const { return subclasses; } + const HashMap<StringName, Variant> &get_constants() const { return constants; } + const RBSet<StringName> &get_members() const { return members; } const GDScriptDataType &get_member_type(const StringName &p_member) const { CRASH_COND(!member_indices.has(p_member)); return member_indices[p_member].data_type; } - const Map<StringName, GDScriptFunction *> &get_member_functions() const { return member_functions; } + const HashMap<StringName, GDScriptFunction *> &get_member_functions() const { return member_functions; } const Ref<GDScriptNativeClass> &get_native() const { return native; } const String &get_script_class_name() const { return name; } @@ -193,8 +193,8 @@ public: bool is_tool() const override { return tool; } Ref<GDScript> get_base() const; - const Map<StringName, MemberInfo> &debug_get_member_indices() const { return member_indices; } - const Map<StringName, GDScriptFunction *> &debug_get_member_functions() const; //this is debug only + const HashMap<StringName, MemberInfo> &debug_get_member_indices() const { return member_indices; } + const HashMap<StringName, GDScriptFunction *> &debug_get_member_functions() const; //this is debug only StringName debug_get_member_by_index(int p_idx) const; Variant _new(const Variant **p_args, int p_argcount, Callable::CallError &r_error); @@ -245,8 +245,8 @@ public: return -1; } - virtual void get_constants(Map<StringName, Variant> *p_constants) override; - virtual void get_members(Set<StringName> *p_members) override; + virtual void get_constants(HashMap<StringName, Variant> *p_constants) override; + virtual void get_members(RBSet<StringName> *p_members) override; virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override; @@ -270,7 +270,7 @@ class GDScriptInstance : public ScriptInstance { Object *owner = nullptr; Ref<GDScript> script; #ifdef DEBUG_ENABLED - Map<StringName, int> member_indices_cache; //used only for hot script reloading + HashMap<StringName, int> member_indices_cache; //used only for hot script reloading #endif Vector<Variant> members; bool base_ref_counted; @@ -315,8 +315,8 @@ class GDScriptLanguage : public ScriptLanguage { Variant *_global_array = nullptr; Vector<Variant> global_array; - Map<StringName, int> globals; - Map<StringName, Variant> named_globals; + HashMap<StringName, int> globals; + HashMap<StringName, Variant> named_globals; struct CallLevel { Variant *stack = nullptr; @@ -348,7 +348,7 @@ class GDScriptLanguage : public ScriptLanguage { bool profiling; uint64_t script_frame_time; - Map<String, ObjectID> orphan_subclasses; + HashMap<String, ObjectID> orphan_subclasses; public: int calls; @@ -427,8 +427,8 @@ public: _FORCE_INLINE_ int get_global_array_size() const { return global_array.size(); } _FORCE_INLINE_ Variant *get_global_array() { return _global_array; } - _FORCE_INLINE_ const Map<StringName, int> &get_global_map() const { return globals; } - _FORCE_INLINE_ const Map<StringName, Variant> &get_named_globals_map() const { return named_globals; } + _FORCE_INLINE_ const HashMap<StringName, int> &get_global_map() const { return globals; } + _FORCE_INLINE_ const HashMap<StringName, Variant> &get_named_globals_map() const { return named_globals; } _FORCE_INLINE_ static GDScriptLanguage *get_singleton() { return singleton; } @@ -449,7 +449,7 @@ public: virtual bool is_using_templates() override; virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override; virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) override; - virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const override; + virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const override; virtual Script *create_script() const override; virtual bool has_named_classes() const override; virtual bool supports_builtin_mode() const override; diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 85ad08ea4f..32fa3b8c87 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -898,7 +898,7 @@ void GDScriptAnalyzer::resolve_class_body(GDScriptParser::ClassNode *p_class) { } #ifdef DEBUG_ENABLED - Set<uint32_t> previously_ignored = parser->ignored_warning_codes; + RBSet<uint32_t> previously_ignored = parser->ignored_warning_codes; for (uint32_t ignored_warning : member.function->ignored_warnings) { parser->ignored_warning_codes.insert(ignored_warning); } @@ -947,7 +947,7 @@ void GDScriptAnalyzer::resolve_class_body(GDScriptParser::ClassNode *p_class) { GDScriptParser::ClassNode::Member member = p_class->members[i]; if (member.type == GDScriptParser::ClassNode::Member::VARIABLE) { #ifdef DEBUG_ENABLED - Set<uint32_t> previously_ignored = parser->ignored_warning_codes; + RBSet<uint32_t> previously_ignored = parser->ignored_warning_codes; for (uint32_t ignored_warning : member.function->ignored_warnings) { parser->ignored_warning_codes.insert(ignored_warning); } @@ -1279,7 +1279,7 @@ void GDScriptAnalyzer::resolve_suite(GDScriptParser::SuiteNode *p_suite) { } #ifdef DEBUG_ENABLED - Set<uint32_t> previously_ignored = parser->ignored_warning_codes; + RBSet<uint32_t> previously_ignored = parser->ignored_warning_codes; for (uint32_t ignored_warning : stmt->ignored_warnings) { parser->ignored_warning_codes.insert(ignored_warning); } @@ -2174,7 +2174,7 @@ void GDScriptAnalyzer::reduce_binary_op(GDScriptParser::BinaryOpNode *p_binary_o void GDScriptAnalyzer::reduce_call(GDScriptParser::CallNode *p_call, bool p_is_await, bool p_is_root) { bool all_is_constant = true; - Map<int, GDScriptParser::ArrayNode *> arrays; // For array literal to potentially type when passing. + HashMap<int, GDScriptParser::ArrayNode *> arrays; // For array literal to potentially type when passing. for (int i = 0; i < p_call->arguments.size(); i++) { reduce_expression(p_call->arguments[i]); if (p_call->arguments[i]->type == GDScriptParser::Node::ARRAY) { diff --git a/modules/gdscript/gdscript_analyzer.h b/modules/gdscript/gdscript_analyzer.h index 519e1975c4..5b03f6dbb4 100644 --- a/modules/gdscript/gdscript_analyzer.h +++ b/modules/gdscript/gdscript_analyzer.h @@ -33,7 +33,7 @@ #include "core/object/object.h" #include "core/object/ref_counted.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "gdscript_cache.h" #include "gdscript_parser.h" diff --git a/modules/gdscript/gdscript_byte_codegen.h b/modules/gdscript/gdscript_byte_codegen.h index 0503f66161..6ee8fda533 100644 --- a/modules/gdscript/gdscript_byte_codegen.h +++ b/modules/gdscript/gdscript_byte_codegen.h @@ -53,19 +53,19 @@ class GDScriptByteCodeGenerator : public GDScriptCodeGenerator { bool debug_stack = false; Vector<int> opcodes; - List<Map<StringName, int>> stack_id_stack; - Map<StringName, int> stack_identifiers; + List<RBMap<StringName, int>> stack_id_stack; + RBMap<StringName, int> stack_identifiers; List<int> stack_identifiers_counts; - Map<StringName, int> local_constants; + RBMap<StringName, int> local_constants; Vector<StackSlot> locals; Vector<StackSlot> temporaries; List<int> used_temporaries; - Map<Variant::Type, List<int>> temporaries_pool; + RBMap<Variant::Type, List<int>> temporaries_pool; List<GDScriptFunction::StackDebug> stack_debug; - List<Map<StringName, int>> block_identifier_stack; - Map<StringName, int> block_identifiers; + List<RBMap<StringName, int>> block_identifier_stack; + RBMap<StringName, int> block_identifiers; int max_locals = 0; int current_line = 0; @@ -77,23 +77,23 @@ class GDScriptByteCodeGenerator : public GDScriptCodeGenerator { #endif HashMap<Variant, int, VariantHasher, VariantComparator> constant_map; - Map<StringName, int> name_map; + RBMap<StringName, int> name_map; #ifdef TOOLS_ENABLED Vector<StringName> named_globals; #endif - Map<Variant::ValidatedOperatorEvaluator, int> operator_func_map; - Map<Variant::ValidatedSetter, int> setters_map; - Map<Variant::ValidatedGetter, int> getters_map; - Map<Variant::ValidatedKeyedSetter, int> keyed_setters_map; - Map<Variant::ValidatedKeyedGetter, int> keyed_getters_map; - Map<Variant::ValidatedIndexedSetter, int> indexed_setters_map; - Map<Variant::ValidatedIndexedGetter, int> indexed_getters_map; - Map<Variant::ValidatedBuiltInMethod, int> builtin_method_map; - Map<Variant::ValidatedConstructor, int> constructors_map; - Map<Variant::ValidatedUtilityFunction, int> utilities_map; - Map<GDScriptUtilityFunctions::FunctionPtr, int> gds_utilities_map; - Map<MethodBind *, int> method_bind_map; - Map<GDScriptFunction *, int> lambdas_map; + RBMap<Variant::ValidatedOperatorEvaluator, int> operator_func_map; + RBMap<Variant::ValidatedSetter, int> setters_map; + RBMap<Variant::ValidatedGetter, int> getters_map; + RBMap<Variant::ValidatedKeyedSetter, int> keyed_setters_map; + RBMap<Variant::ValidatedKeyedGetter, int> keyed_getters_map; + RBMap<Variant::ValidatedIndexedSetter, int> indexed_setters_map; + RBMap<Variant::ValidatedIndexedGetter, int> indexed_getters_map; + RBMap<Variant::ValidatedBuiltInMethod, int> builtin_method_map; + RBMap<Variant::ValidatedConstructor, int> constructors_map; + RBMap<Variant::ValidatedUtilityFunction, int> utilities_map; + RBMap<GDScriptUtilityFunctions::FunctionPtr, int> gds_utilities_map; + RBMap<MethodBind *, int> method_bind_map; + RBMap<GDScriptFunction *, int> lambdas_map; // Lists since these can be nested. List<int> if_jmp_addrs; @@ -135,7 +135,7 @@ class GDScriptByteCodeGenerator : public GDScriptCodeGenerator { stack_identifiers_counts.push_back(locals.size()); stack_id_stack.push_back(stack_identifiers); if (debug_stack) { - Map<StringName, int> block_ids(block_identifiers); + RBMap<StringName, int> block_ids(block_identifiers); block_identifier_stack.push_back(block_ids); block_identifiers.clear(); } diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp index 8c198345c2..bd98d66fcc 100644 --- a/modules/gdscript/gdscript_cache.cpp +++ b/modules/gdscript/gdscript_cache.cpp @@ -223,10 +223,10 @@ Error GDScriptCache::finish_compiling(const String &p_owner) { singleton->full_gdscript_cache[p_owner] = script.ptr(); singleton->shallow_gdscript_cache.erase(p_owner); - Set<String> depends = singleton->dependencies[p_owner]; + RBSet<String> depends = singleton->dependencies[p_owner]; Error err = OK; - for (const Set<String>::Element *E = depends.front(); E != nullptr; E = E->next()) { + for (const RBSet<String>::Element *E = depends.front(); E != nullptr; E = E->next()) { Error this_err = OK; // No need to save the script. We assume it's already referenced in the owner. get_full_script(E->get(), this_err); diff --git a/modules/gdscript/gdscript_cache.h b/modules/gdscript/gdscript_cache.h index 3ce976ee14..8abae7d4ad 100644 --- a/modules/gdscript/gdscript_cache.h +++ b/modules/gdscript/gdscript_cache.h @@ -34,7 +34,7 @@ #include "core/object/ref_counted.h" #include "core/os/mutex.h" #include "core/templates/hash_map.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "gdscript.h" class GDScriptAnalyzer; @@ -74,7 +74,7 @@ class GDScriptCache { HashMap<String, GDScriptParserRef *> parser_map; HashMap<String, GDScript *> shallow_gdscript_cache; HashMap<String, GDScript *> full_gdscript_cache; - HashMap<String, Set<String>> dependencies; + HashMap<String, RBSet<String>> dependencies; friend class GDScript; friend class GDScriptParserRef; diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index c194fbf9b8..478fafc930 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -108,11 +108,15 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D result.native_type = result.script_type->get_instance_base_type(); } break; case GDScriptParser::DataType::CLASS: { - // Locate class by constructing the path to it and following that path + // Locate class by constructing the path to it and following that path. GDScriptParser::ClassNode *class_type = p_datatype.class_type; if (class_type) { - const bool is_inner_by_path = (!main_script->path.is_empty()) && (class_type->fqcn.split("::")[0] == main_script->path); - const bool is_inner_by_name = (!main_script->name.is_empty()) && (class_type->fqcn.split("::")[0] == main_script->name); + result.kind = GDScriptDataType::GDSCRIPT; + result.builtin_type = p_datatype.builtin_type; + + String class_name = class_type->fqcn.split("::")[0]; + const bool is_inner_by_path = (!main_script->path.is_empty()) && (class_name == main_script->path); + const bool is_inner_by_name = (!main_script->name.is_empty()) && (class_name == main_script->name); if (is_inner_by_path || is_inner_by_name) { // Local class. List<StringName> names; @@ -131,16 +135,41 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D script = script->subclasses[names.back()->get()]; names.pop_back(); } - result.kind = GDScriptDataType::GDSCRIPT; result.script_type = script.ptr(); result.native_type = script->get_instance_base_type(); - result.builtin_type = p_datatype.builtin_type; } else { - result.kind = GDScriptDataType::GDSCRIPT; - result.script_type_ref = GDScriptCache::get_shallow_script(p_datatype.script_path, main_script->path); + // Inner class. + PackedStringArray classes = class_type->fqcn.split("::"); + if (!classes.is_empty()) { + for (GDScript *script : parsed_classes) { + // Checking of inheritance structure of inner class to find a correct script link. + if (script->name == classes[classes.size() - 1]) { + PackedStringArray classes2 = script->fully_qualified_name.split("::"); + bool valid = true; + if (classes.size() != classes2.size()) { + valid = false; + } else { + for (int i = 0; i < classes.size(); i++) { + if (classes[i] != classes2[i]) { + valid = false; + break; + } + } + } + if (!valid) { + continue; + } + result.script_type_ref = Ref<GDScript>(script); + break; + } + } + } + if (result.script_type_ref.is_null()) { + result.script_type_ref = GDScriptCache::get_shallow_script(p_datatype.script_path, main_script->path); + } + result.script_type = result.script_type_ref.ptr(); result.native_type = p_datatype.native_type; - result.builtin_type = p_datatype.builtin_type; } } } break; @@ -703,10 +732,10 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code } else if (subscript->is_attribute) { if (subscript->base->type == GDScriptParser::Node::SELF && codegen.script) { GDScriptParser::IdentifierNode *identifier = subscript->attribute; - const Map<StringName, GDScript::MemberInfo>::Element *MI = codegen.script->member_indices.find(identifier->name); + HashMap<StringName, GDScript::MemberInfo>::Iterator MI = codegen.script->member_indices.find(identifier->name); #ifdef DEBUG_ENABLED - if (MI && MI->get().getter == codegen.function_name) { + if (MI && MI->value.getter == codegen.function_name) { String n = identifier->name; _set_error("Must use '" + n + "' instead of 'self." + n + "' in getter.", identifier); r_error = ERR_COMPILATION_FAILED; @@ -714,11 +743,11 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code } #endif - if (MI && MI->get().getter == "") { + if (MI && MI->value.getter == "") { // Remove result temp as we don't need it. gen->pop_temporary(); // Faster than indexing self (as if no self. had been used). - return GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::MEMBER, MI->get().index, _gdtype_from_datatype(subscript->get_datatype())); + return GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::MEMBER, MI->value.index, _gdtype_from_datatype(subscript->get_datatype())); } } @@ -894,8 +923,8 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code const GDScriptParser::SubscriptNode *subscript = static_cast<GDScriptParser::SubscriptNode *>(assignment->assignee); #ifdef DEBUG_ENABLED if (subscript->is_attribute && subscript->base->type == GDScriptParser::Node::SELF && codegen.script) { - const Map<StringName, GDScript::MemberInfo>::Element *MI = codegen.script->member_indices.find(subscript->attribute->name); - if (MI && MI->get().setter == codegen.function_name) { + HashMap<StringName, GDScript::MemberInfo>::Iterator MI = codegen.script->member_indices.find(subscript->attribute->name); + if (MI && MI->value.setter == codegen.function_name) { String n = subscript->attribute->name; _set_error("Must use '" + n + "' instead of 'self." + n + "' in setter.", subscript); r_error = ERR_COMPILATION_FAILED; @@ -2500,8 +2529,8 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa //validate instances if keeping state if (p_keep_state) { - for (Set<Object *>::Element *E = p_script->instances.front(); E;) { - Set<Object *>::Element *N = E->next(); + for (RBSet<Object *>::Element *E = p_script->instances.front(); E;) { + RBSet<Object *>::Element *N = E->next(); ScriptInstance *si = E->get()->get_script_instance(); if (si->is_placeholder()) { @@ -2563,7 +2592,7 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa } void GDScriptCompiler::_make_scripts(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state) { - Map<StringName, Ref<GDScript>> old_subclasses; + HashMap<StringName, Ref<GDScript>> old_subclasses; if (p_keep_state) { old_subclasses = p_script->subclasses; diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h index 8d71437344..c9ffb04fb8 100644 --- a/modules/gdscript/gdscript_compiler.h +++ b/modules/gdscript/gdscript_compiler.h @@ -31,7 +31,7 @@ #ifndef GDSCRIPT_COMPILER_H #define GDSCRIPT_COMPILER_H -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "gdscript.h" #include "gdscript_codegen.h" #include "gdscript_function.h" @@ -39,8 +39,8 @@ class GDScriptCompiler { const GDScriptParser *parser = nullptr; - Set<GDScript *> parsed_classes; - Set<GDScript *> parsing_classes; + RBSet<GDScript *> parsed_classes; + RBSet<GDScript *> parsing_classes; GDScript *main_script = nullptr; struct CodeGen { @@ -49,9 +49,9 @@ class GDScriptCompiler { const GDScriptParser::FunctionNode *function_node = nullptr; StringName function_name; GDScriptCodeGenerator *generator = nullptr; - Map<StringName, GDScriptCodeGenerator::Address> parameters; - Map<StringName, GDScriptCodeGenerator::Address> locals; - List<Map<StringName, GDScriptCodeGenerator::Address>> locals_stack; + HashMap<StringName, GDScriptCodeGenerator::Address> parameters; + HashMap<StringName, GDScriptCodeGenerator::Address> locals; + List<HashMap<StringName, GDScriptCodeGenerator::Address>> locals_stack; GDScriptCodeGenerator::Address add_local(const StringName &p_name, const GDScriptDataType &p_type) { uint32_t addr = generator->add_local(p_name, p_type); @@ -101,7 +101,7 @@ class GDScriptCompiler { } void start_block() { - Map<StringName, GDScriptCodeGenerator::Address> old_locals = locals; + HashMap<StringName, GDScriptCodeGenerator::Address> old_locals = locals; locals_stack.push_back(old_locals); generator->start_block(); } diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 226b4c24b1..72f54626e3 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -98,7 +98,7 @@ Vector<ScriptLanguage::ScriptTemplate> GDScriptLanguage::get_built_in_templates( return templates; } -static void get_function_names_recursively(const GDScriptParser::ClassNode *p_class, const String &p_prefix, Map<int, String> &r_funcs) { +static void get_function_names_recursively(const GDScriptParser::ClassNode *p_class, const String &p_prefix, HashMap<int, String> &r_funcs) { for (int i = 0; i < p_class->members.size(); i++) { if (p_class->members[i].type == GDScriptParser::ClassNode::Member::FUNCTION) { const GDScriptParser::FunctionNode *function = p_class->members[i].function; @@ -110,7 +110,7 @@ static void get_function_names_recursively(const GDScriptParser::ClassNode *p_cl } } -bool GDScriptLanguage::validate(const String &p_script, const String &p_path, List<String> *r_functions, List<ScriptLanguage::ScriptError> *r_errors, List<ScriptLanguage::Warning> *r_warnings, Set<int> *r_safe_lines) const { +bool GDScriptLanguage::validate(const String &p_script, const String &p_path, List<String> *r_functions, List<ScriptLanguage::ScriptError> *r_errors, List<ScriptLanguage::Warning> *r_warnings, RBSet<int> *r_safe_lines) const { GDScriptParser parser; GDScriptAnalyzer analyzer(&parser); @@ -148,7 +148,7 @@ bool GDScriptLanguage::validate(const String &p_script, const String &p_path, Li return false; } else { const GDScriptParser::ClassNode *cl = parser.get_tree(); - Map<int, String> funcs; + HashMap<int, String> funcs; get_function_names_recursively(cl, "", funcs); @@ -159,7 +159,7 @@ bool GDScriptLanguage::validate(const String &p_script, const String &p_path, Li #ifdef DEBUG_ENABLED if (r_safe_lines) { - const Set<int> &unsafe_lines = parser.get_unsafe_lines(); + const RBSet<int> &unsafe_lines = parser.get_unsafe_lines(); for (int i = 1; i <= parser.get_last_line_number(); i++) { if (!unsafe_lines.has(i)) { r_safe_lines->insert(i); @@ -321,7 +321,7 @@ void GDScriptLanguage::debug_get_stack_level_members(int p_level, List<String> * Ref<GDScript> script = instance->get_script(); ERR_FAIL_COND(script.is_null()); - const Map<StringName, GDScript::MemberInfo> &mi = script->debug_get_member_indices(); + const HashMap<StringName, GDScript::MemberInfo> &mi = script->debug_get_member_indices(); for (const KeyValue<StringName, GDScript::MemberInfo> &E : mi) { p_members->push_back(E.key); @@ -343,7 +343,7 @@ ScriptInstance *GDScriptLanguage::debug_get_stack_level_instance(int p_level) { } void GDScriptLanguage::debug_get_globals(List<String> *p_globals, List<Variant> *p_values, int p_max_subitems, int p_max_depth) { - const Map<StringName, int> &name_idx = GDScriptLanguage::get_singleton()->get_global_map(); + const HashMap<StringName, int> &name_idx = GDScriptLanguage::get_singleton()->get_global_map(); const Variant *globals = GDScriptLanguage::get_singleton()->get_global_array(); List<Pair<String, Variant>> cinfo; @@ -722,7 +722,7 @@ static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_functio return arghint; } -static void _get_directory_contents(EditorFileSystemDirectory *p_dir, Map<String, ScriptLanguage::CodeCompletionOption> &r_list) { +static void _get_directory_contents(EditorFileSystemDirectory *p_dir, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_list) { const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\""; for (int i = 0; i < p_dir->get_file_count(); i++) { @@ -736,7 +736,7 @@ static void _get_directory_contents(EditorFileSystemDirectory *p_dir, Map<String } } -static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_annotation, int p_argument, const String p_quote_style, Map<String, ScriptLanguage::CodeCompletionOption> &r_result) { +static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_annotation, int p_argument, const String p_quote_style, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) { if (p_annotation->name == SNAME("@export_range")) { if (p_argument == 3 || p_argument == 4) { // Slider hint. @@ -777,7 +777,7 @@ static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_a } } -static void _find_built_in_variants(Map<String, ScriptLanguage::CodeCompletionOption> &r_result, bool exclude_nil = false) { +static void _find_built_in_variants(HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, bool exclude_nil = false) { for (int i = 0; i < Variant::VARIANT_MAX; i++) { if (!exclude_nil && Variant::Type(i) == Variant::Type::NIL) { ScriptLanguage::CodeCompletionOption option("null", ScriptLanguage::CODE_COMPLETION_KIND_CLASS); @@ -789,7 +789,7 @@ static void _find_built_in_variants(Map<String, ScriptLanguage::CodeCompletionOp } } -static void _list_available_types(bool p_inherit_only, GDScriptParser::CompletionContext &p_context, Map<String, ScriptLanguage::CodeCompletionOption> &r_result) { +static void _list_available_types(bool p_inherit_only, GDScriptParser::CompletionContext &p_context, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) { // Built-in Variant Types _find_built_in_variants(r_result, true); @@ -863,7 +863,7 @@ static void _list_available_types(bool p_inherit_only, GDScriptParser::Completio } } -static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite, Map<String, ScriptLanguage::CodeCompletionOption> &r_result) { +static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) { for (int i = 0; i < p_suite->locals.size(); i++) { ScriptLanguage::CodeCompletionOption option; if (p_suite->locals[i].type == GDScriptParser::SuiteNode::Local::CONSTANT) { @@ -879,9 +879,9 @@ static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite, } } -static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth); +static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth); -static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class, bool p_only_functions, bool p_static, bool p_parent_only, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { +static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class, bool p_only_functions, bool p_static, bool p_parent_only, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { ERR_FAIL_COND(p_recursion_depth > COMPLETION_RECURSION_LIMIT); if (!p_parent_only) { @@ -966,7 +966,7 @@ static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class, _find_identifiers_in_base(base_type, p_only_functions, r_result, p_recursion_depth + 1); } -static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { +static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { ERR_FAIL_COND(p_recursion_depth > COMPLETION_RECURSION_LIMIT); GDScriptParser::DataType base_type = p_base.type; @@ -998,7 +998,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base r_result.insert(option.display, option); } } - Map<StringName, Variant> constants; + HashMap<StringName, Variant> constants; scr->get_constants(&constants); for (const KeyValue<StringName, Variant> &E : constants) { int location = p_recursion_depth + _get_constant_location(scr->get_class_name(), E.key); @@ -1149,7 +1149,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base } } -static void _find_identifiers(const GDScriptParser::CompletionContext &p_context, bool p_only_functions, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { +static void _find_identifiers(const GDScriptParser::CompletionContext &p_context, bool p_only_functions, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) { if (!p_only_functions && p_context.current_suite) { // This includes function parameters, since they are also locals. _find_identifiers_in_suite(p_context.current_suite, r_result); @@ -2089,7 +2089,7 @@ static bool _guess_identifier_type_from_base(GDScriptParser::CompletionContext & case GDScriptParser::DataType::SCRIPT: { Ref<Script> scr = base_type.script_type; if (scr.is_valid()) { - Map<StringName, Variant> constants; + HashMap<StringName, Variant> constants; scr->get_constants(&constants); if (constants.has(p_identifier)) { r_type = _type_from_variant(constants[p_identifier]); @@ -2318,7 +2318,7 @@ static bool _guess_method_return_type_from_base(GDScriptParser::CompletionContex return false; } -static void _find_enumeration_candidates(GDScriptParser::CompletionContext &p_context, const String &p_enum_hint, Map<String, ScriptLanguage::CodeCompletionOption> &r_result) { +static void _find_enumeration_candidates(GDScriptParser::CompletionContext &p_context, const String &p_enum_hint, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) { if (!p_enum_hint.contains(".")) { // Global constant or in the current class. StringName current_enum = p_enum_hint; @@ -2355,7 +2355,7 @@ static void _find_enumeration_candidates(GDScriptParser::CompletionContext &p_co } } -static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, int p_argidx, bool p_static, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, String &r_arghint) { +static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, int p_argidx, bool p_static, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, String &r_arghint) { Variant base = p_base.value; GDScriptParser::DataType base_type = p_base.type; @@ -2474,7 +2474,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c } } -static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, const GDScriptParser::Node *p_call, int p_argidx, Map<String, ScriptLanguage::CodeCompletionOption> &r_result, bool &r_forced, String &r_arghint) { +static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, const GDScriptParser::Node *p_call, int p_argidx, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, bool &r_forced, String &r_arghint) { if (p_call->type == GDScriptParser::Node::PRELOAD) { if (p_argidx == 0 && bool(EditorSettings::get_singleton()->get("text_editor/completion/complete_file_paths"))) { _get_directory_contents(EditorFileSystem::get_singleton()->get_filesystem(), r_result); @@ -2589,7 +2589,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c analyzer.analyze(); r_forced = false; - Map<String, ScriptLanguage::CodeCompletionOption> options; + HashMap<String, ScriptLanguage::CodeCompletionOption> options; GDScriptParser::CompletionContext completion_context = parser.get_completion_context(); completion_context.base = p_owner; @@ -3279,7 +3279,7 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co } // Global. - Map<StringName, int> classes = GDScriptLanguage::get_singleton()->get_global_map(); + HashMap<StringName, int> classes = GDScriptLanguage::get_singleton()->get_global_map(); if (classes.has(p_symbol)) { Variant value = GDScriptLanguage::get_singleton()->get_global_array()[classes[p_symbol]]; if (value.get_type() == Variant::OBJECT) { diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 3d708955ed..deef593f34 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -93,7 +93,7 @@ struct _GDFKCS { void GDScriptFunction::debug_get_stack_member_state(int p_line, List<Pair<StringName, int>> *r_stackvars) const { int oc = 0; - Map<StringName, _GDFKC> sdmap; + HashMap<StringName, _GDFKC> sdmap; for (const StackDebug &sd : stack_debug) { if (sd.line >= p_line) { break; @@ -279,7 +279,8 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) { void GDScriptFunctionState::_clear_stack() { if (state.stack_size) { Variant *stack = (Variant *)state.stack.ptr(); - for (int i = 0; i < state.stack_size; i++) { + // The first 3 are special addresses and not copied to the state, so we skip them here. + for (int i = 3; i < state.stack_size; i++) { stack[i].~Variant(); } state.stack_size = 0; @@ -300,8 +301,6 @@ GDScriptFunctionState::GDScriptFunctionState() : } GDScriptFunctionState::~GDScriptFunctionState() { - _clear_stack(); - { MutexLock lock(GDScriptLanguage::singleton->lock); scripts_list.remove_from_list(); diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index ba0d51c5cc..d2ca795977 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -495,7 +495,7 @@ private: Vector<GDScriptDataType> argument_types; GDScriptDataType return_type; - Map<int, Variant::Type> temporary_slots; + HashMap<int, Variant::Type> temporary_slots; #ifdef TOOLS_ENABLED Vector<StringName> arg_names; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index aa1bfb312c..96d1f68f60 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -1808,7 +1808,6 @@ GDScriptParser::MatchNode *GDScriptParser::parse_match() { #ifdef DEBUG_ENABLED bool all_have_return = true; bool have_wildcard = false; - bool wildcard_has_return = false; bool have_wildcard_without_continue = false; #endif @@ -1826,9 +1825,6 @@ GDScriptParser::MatchNode *GDScriptParser::parse_match() { if (branch->has_wildcard) { have_wildcard = true; - if (branch->block->has_return) { - wildcard_has_return = true; - } if (!branch->block->has_continue) { have_wildcard_without_continue = true; } @@ -1843,7 +1839,7 @@ GDScriptParser::MatchNode *GDScriptParser::parse_match() { consume(GDScriptTokenizer::Token::DEDENT, R"(Expected an indented block after "match" statement.)"); #ifdef DEBUG_ENABLED - if (wildcard_has_return || (all_have_return && have_wildcard)) { + if (all_have_return && have_wildcard) { current_suite->has_return = true; } #endif @@ -3053,7 +3049,7 @@ bool GDScriptParser::has_comment(int p_line) { } String GDScriptParser::get_doc_comment(int p_line, bool p_single_line) { - const Map<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments(); + const HashMap<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments(); ERR_FAIL_COND_V(!comments.has(p_line), String()); if (p_single_line) { @@ -3105,7 +3101,7 @@ String GDScriptParser::get_doc_comment(int p_line, bool p_single_line) { } void GDScriptParser::get_class_doc_comment(int p_line, String &p_brief, String &p_desc, Vector<Pair<String, String>> &p_tutorials, bool p_inner_class) { - const Map<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments(); + const HashMap<int, GDScriptTokenizer::CommentData> &comments = tokenizer.get_comments(); if (!comments.has(p_line)) { return; } diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h index 857e06440c..17f87edeeb 100644 --- a/modules/gdscript/gdscript_parser.h +++ b/modules/gdscript/gdscript_parser.h @@ -39,7 +39,7 @@ #include "core/string/ustring.h" #include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "core/variant/variant.h" #include "gdscript_cache.h" @@ -802,7 +802,7 @@ public: FunctionNode *function = nullptr; FunctionNode *parent_function = nullptr; Vector<IdentifierNode *> captures; - Map<StringName, int> captures_indices; + HashMap<StringName, int> captures_indices; bool use_self = false; bool has_name() const { @@ -1205,9 +1205,9 @@ private: List<ParserError> errors; #ifdef DEBUG_ENABLED List<GDScriptWarning> warnings; - Set<String> ignored_warnings; - Set<uint32_t> ignored_warning_codes; - Set<int> unsafe_lines; + RBSet<String> ignored_warnings; + RBSet<uint32_t> ignored_warning_codes; + RBSet<int> unsafe_lines; #endif GDScriptTokenizer tokenizer; @@ -1419,7 +1419,7 @@ public: } #ifdef DEBUG_ENABLED const List<GDScriptWarning> &get_warnings() const { return warnings; } - const Set<int> &get_unsafe_lines() const { return unsafe_lines; } + const RBSet<int> &get_unsafe_lines() const { return unsafe_lines; } int get_last_line_number() const { return current.end_line; } #endif diff --git a/modules/gdscript/gdscript_tokenizer.h b/modules/gdscript/gdscript_tokenizer.h index 75f9a7626e..ad818cf812 100644 --- a/modules/gdscript/gdscript_tokenizer.h +++ b/modules/gdscript/gdscript_tokenizer.h @@ -31,9 +31,9 @@ #ifndef GDSCRIPT_TOKENIZER_H #define GDSCRIPT_TOKENIZER_H +#include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/map.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "core/templates/vector.h" #include "core/variant/variant.h" @@ -193,7 +193,7 @@ public: new_line = p_new_line; } }; - const Map<int, CommentData> &get_comments() const { + const HashMap<int, CommentData> &get_comments() const { return comments; } #endif // TOOLS_ENABLED @@ -226,7 +226,7 @@ private: int length = 0; #ifdef TOOLS_ENABLED - Map<int, CommentData> comments; + HashMap<int, CommentData> comments; #endif // TOOLS_ENABLED _FORCE_INLINE_ bool _is_at_end() { return position >= length; } diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp index e28dd26c28..8f85d8159b 100644 --- a/modules/gdscript/gdscript_vm.cpp +++ b/modules/gdscript/gdscript_vm.cpp @@ -546,33 +546,32 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a memnew_placement(&stack[i], Variant); } - memnew_placement(&stack[ADDR_STACK_NIL], Variant); - if (_instruction_args_size) { instruction_args = (Variant **)&aptr[sizeof(Variant) * _stack_size]; } else { instruction_args = nullptr; } - if (p_instance) { - memnew_placement(&stack[ADDR_STACK_SELF], Variant(p_instance->owner)); - script = p_instance->script.ptr(); - } else { - memnew_placement(&stack[ADDR_STACK_SELF], Variant); - script = _script; + for (const KeyValue<int, Variant::Type> &E : temporary_slots) { + type_init_function_table[E.value](&stack[E.key]); } } + if (_ptrcall_args_size) { call_args_ptr = (const void **)alloca(_ptrcall_args_size * sizeof(void *)); } else { call_args_ptr = nullptr; } - memnew_placement(&stack[ADDR_STACK_CLASS], Variant(script)); - - for (const KeyValue<int, Variant::Type> &E : temporary_slots) { - type_init_function_table[E.value](&stack[E.key]); + if (p_instance) { + memnew_placement(&stack[ADDR_STACK_SELF], Variant(p_instance->owner)); + script = p_instance->script.ptr(); + } else { + memnew_placement(&stack[ADDR_STACK_SELF], Variant); + script = _script; } + memnew_placement(&stack[ADDR_STACK_CLASS], Variant(script)); + memnew_placement(&stack[ADDR_STACK_NIL], Variant); String err_text; @@ -2104,7 +2103,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a const GDScript *gds = _script; - const Map<StringName, GDScriptFunction *>::Element *E = nullptr; + HashMap<StringName, GDScriptFunction *>::ConstIterator E; while (gds->base.ptr()) { gds = gds->base.ptr(); E = gds->member_functions.find(*methodname); @@ -2116,7 +2115,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a Callable::CallError err; if (E) { - *dst = E->get()->call(p_instance, (const Variant **)argptrs, argc, err); + *dst = E->value->call(p_instance, (const Variant **)argptrs, argc, err); } else if (gds->native.ptr()) { if (*methodname != GDScriptLanguage::get_singleton()->strings._init) { MethodBind *mb = ClassDB::get_method(gds->native->get_name(), *methodname); @@ -2171,8 +2170,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a // Is this even possible to be null at this point? if (obj) { if (obj->is_class_ptr(GDScriptFunctionState::get_class_ptr_static())) { - static StringName completed = _scs_create("completed"); - result = Signal(obj, completed); + result = Signal(obj, "completed"); } } } @@ -2193,8 +2191,9 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a gdfs->function = this; gdfs->state.stack.resize(alloca_size); - //copy variant stack - for (int i = 0; i < _stack_size; i++) { + + // First 3 stack addresses are special, so we just skip them here. + for (int i = 3; i < _stack_size; i++) { memnew_placement(&gdfs->state.stack.write[sizeof(Variant) * i], Variant(stack[i])); } gdfs->state.stack_size = _stack_size; @@ -3451,26 +3450,24 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a GDScriptLanguage::get_singleton()->script_frame_time += time_taken - function_call_time; } - // Check if this is the last time the function is resuming from await - // Will be true if never awaited as well - // When it's the last resume it will postpone the exit from stack, - // so the debugger knows which function triggered the resume of the next function (if any) - if (!p_state || awaited) { + // Check if this function has been interrupted by `await`. + // If that is the case we want to keep it in the debugger until it actually exits. + // This ensures the call stack can be properly shown when using `await`, showing what resumed the function. + if (!awaited) { if (EngineDebugger::is_active()) { GDScriptLanguage::get_singleton()->exit_function(); } + } #endif - if (_stack_size) { - //free stack - for (int i = 0; i < _stack_size; i++) { - stack[i].~Variant(); - } + // Clear the stack even if there was an `await`. + // The stack saved in the state is a copy, so this needs to be destructed to avoid leaks. + if (_stack_size) { + // Free stack. + for (int i = 0; i < _stack_size; i++) { + stack[i].~Variant(); } - -#ifdef DEBUG_ENABLED } -#endif return retvalue; } diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp index bc1f001d86..d3c5fed95a 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.cpp +++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp @@ -216,8 +216,8 @@ void ExtendGDScriptParser::parse_class_symbol(const GDScriptParser::ClassNode *p if (res.is_valid() && !res->get_path().is_empty()) { value_text = "preload(\"" + res->get_path() + "\")"; if (symbol.documentation.is_empty()) { - if (Map<String, ExtendGDScriptParser *>::Element *S = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(res->get_path())) { - symbol.documentation = S->get()->class_symbol.documentation; + if (HashMap<String, ExtendGDScriptParser *>::Iterator S = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(res->get_path())) { + symbol.documentation = S->value->class_symbol.documentation; } } } else { diff --git a/modules/gdscript/language_server/gdscript_text_document.cpp b/modules/gdscript/language_server/gdscript_text_document.cpp index 1f02943480..d763701911 100644 --- a/modules/gdscript/language_server/gdscript_text_document.cpp +++ b/modules/gdscript/language_server/gdscript_text_document.cpp @@ -141,9 +141,9 @@ Array GDScriptTextDocument::documentSymbol(const Dictionary &p_params) { String uri = params["uri"]; String path = GDScriptLanguageProtocol::get_singleton()->get_workspace()->get_file_path(uri); Array arr; - if (const Map<String, ExtendGDScriptParser *>::Element *parser = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(path)) { + if (HashMap<String, ExtendGDScriptParser *>::ConstIterator parser = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(path)) { Vector<lsp::DocumentedSymbolInformation> list; - parser->get()->get_symbols().symbol_tree_as_list(uri, list); + parser->value->get_symbols().symbol_tree_as_list(uri, list); for (int i = 0; i < list.size(); i++) { arr.push_back(list[i].to_json()); } @@ -267,8 +267,8 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) { } if (!symbol) { - if (const Map<String, ExtendGDScriptParser *>::Element *E = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(class_name)) { - symbol = E->get()->get_member_symbol(member_name, inner_class_name); + if (HashMap<String, ExtendGDScriptParser *>::ConstIterator E = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.find(class_name)) { + symbol = E->value->get_member_symbol(member_name, inner_class_name); } } } diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 378dc6d04b..ffd3cfa907 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -116,22 +116,22 @@ void GDScriptWorkspace::did_delete_files(const Dictionary &p_params) { } void GDScriptWorkspace::remove_cache_parser(const String &p_path) { - Map<String, ExtendGDScriptParser *>::Element *parser = parse_results.find(p_path); - Map<String, ExtendGDScriptParser *>::Element *script = scripts.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator parser = parse_results.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator script = scripts.find(p_path); if (parser && script) { - if (script->get() && script->get() == parser->get()) { - memdelete(script->get()); + if (script->value && script->value == parser->value) { + memdelete(script->value); } else { - memdelete(script->get()); - memdelete(parser->get()); + memdelete(script->value); + memdelete(parser->value); } parse_results.erase(p_path); scripts.erase(p_path); } else if (parser) { - memdelete(parser->get()); + memdelete(parser->value); parse_results.erase(p_path); } else if (script) { - memdelete(script->get()); + memdelete(script->value); scripts.erase(p_path); } } @@ -141,8 +141,8 @@ const lsp::DocumentSymbol *GDScriptWorkspace::get_native_symbol(const String &p_ StringName empty; while (class_name != empty) { - if (const Map<StringName, lsp::DocumentSymbol>::Element *E = native_symbols.find(class_name)) { - const lsp::DocumentSymbol &class_symbol = E->value(); + if (HashMap<StringName, lsp::DocumentSymbol>::ConstIterator E = native_symbols.find(class_name)) { + const lsp::DocumentSymbol &class_symbol = E->value; if (p_member.is_empty()) { return &class_symbol; @@ -162,9 +162,9 @@ const lsp::DocumentSymbol *GDScriptWorkspace::get_native_symbol(const String &p_ } const lsp::DocumentSymbol *GDScriptWorkspace::get_script_symbol(const String &p_path) const { - const Map<String, ExtendGDScriptParser *>::Element *S = scripts.find(p_path); + HashMap<String, ExtendGDScriptParser *>::ConstIterator S = scripts.find(p_path); if (S) { - return &(S->get()->get_symbols()); + return &(S->value->get_symbols()); } return nullptr; } @@ -209,10 +209,10 @@ void GDScriptWorkspace::reload_all_workspace_scripts() { err = parse_script(path, content); if (err != OK) { - Map<String, ExtendGDScriptParser *>::Element *S = parse_results.find(path); + HashMap<String, ExtendGDScriptParser *>::Iterator S = parse_results.find(path); String err_msg = "Failed parse script " + path; if (S) { - err_msg += "\n" + S->get()->get_errors()[0].message; + err_msg += "\n" + S->value->get_errors()[0].message; } ERR_CONTINUE_MSG(err != OK, err_msg); } @@ -238,25 +238,25 @@ void GDScriptWorkspace::list_script_files(const String &p_root_dir, List<String> } ExtendGDScriptParser *GDScriptWorkspace::get_parse_successed_script(const String &p_path) { - const Map<String, ExtendGDScriptParser *>::Element *S = scripts.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator S = scripts.find(p_path); if (!S) { parse_local_script(p_path); S = scripts.find(p_path); } if (S) { - return S->get(); + return S->value; } return nullptr; } ExtendGDScriptParser *GDScriptWorkspace::get_parse_result(const String &p_path) { - const Map<String, ExtendGDScriptParser *>::Element *S = parse_results.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator S = parse_results.find(p_path); if (!S) { parse_local_script(p_path); S = parse_results.find(p_path); } if (S) { - return S->get(); + return S->value; } return nullptr; } @@ -424,8 +424,8 @@ Error GDScriptWorkspace::initialize() { Error GDScriptWorkspace::parse_script(const String &p_path, const String &p_content) { ExtendGDScriptParser *parser = memnew(ExtendGDScriptParser); Error err = parser->parse(p_content, p_path); - Map<String, ExtendGDScriptParser *>::Element *last_parser = parse_results.find(p_path); - Map<String, ExtendGDScriptParser *>::Element *last_script = scripts.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator last_parser = parse_results.find(p_path); + HashMap<String, ExtendGDScriptParser *>::Iterator last_script = scripts.find(p_path); if (err == OK) { remove_cache_parser(p_path); @@ -433,8 +433,8 @@ Error GDScriptWorkspace::parse_script(const String &p_path, const String &p_cont scripts[p_path] = parser; } else { - if (last_parser && last_script && last_parser->get() != last_script->get()) { - memdelete(last_parser->get()); + if (last_parser && last_script && last_parser->value != last_script->value) { + memdelete(last_parser->value); } parse_results[p_path] = parser; } @@ -513,9 +513,9 @@ String GDScriptWorkspace::get_file_uri(const String &p_path) const { void GDScriptWorkspace::publish_diagnostics(const String &p_path) { Dictionary params; Array errors; - const Map<String, ExtendGDScriptParser *>::Element *ele = parse_results.find(p_path); + HashMap<String, ExtendGDScriptParser *>::ConstIterator ele = parse_results.find(p_path); if (ele) { - const Vector<lsp::Diagnostic> &list = ele->get()->get_diagnostics(); + const Vector<lsp::Diagnostic> &list = ele->value->get_diagnostics(); errors.resize(list.size()); for (int i = 0; i < list.size(); ++i) { errors[i] = list[i].to_json(); @@ -707,8 +707,8 @@ void GDScriptWorkspace::resolve_related_symbols(const lsp::TextDocumentPositionP } const lsp::DocumentSymbol *GDScriptWorkspace::resolve_native_symbol(const lsp::NativeSymbolInspectParams &p_params) { - if (Map<StringName, lsp::DocumentSymbol>::Element *E = native_symbols.find(p_params.native_class)) { - const lsp::DocumentSymbol &symbol = E->get(); + if (HashMap<StringName, lsp::DocumentSymbol>::Iterator E = native_symbols.find(p_params.native_class)) { + const lsp::DocumentSymbol &symbol = E->value; if (p_params.symbol_name.is_empty() || p_params.symbol_name == symbol.name) { return &symbol; } @@ -784,7 +784,7 @@ GDScriptWorkspace::GDScriptWorkspace() { } GDScriptWorkspace::~GDScriptWorkspace() { - Set<String> cached_parsers; + RBSet<String> cached_parsers; for (const KeyValue<String, ExtendGDScriptParser *> &E : parse_results) { cached_parsers.insert(E.key); @@ -794,7 +794,7 @@ GDScriptWorkspace::~GDScriptWorkspace() { cached_parsers.insert(E.key); } - for (Set<String>::Element *E = cached_parsers.front(); E; E = E->next()) { - remove_cache_parser(E->get()); + for (const String &E : cached_parsers) { + remove_cache_parser(E); } } diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h index 92e78f8992..7bff5db81f 100644 --- a/modules/gdscript/language_server/gdscript_workspace.h +++ b/modules/gdscript/language_server/gdscript_workspace.h @@ -48,7 +48,7 @@ protected: static void _bind_methods(); void remove_cache_parser(const String &p_path); bool initialized = false; - Map<StringName, lsp::DocumentSymbol> native_symbols; + HashMap<StringName, lsp::DocumentSymbol> native_symbols; const lsp::DocumentSymbol *get_native_symbol(const String &p_class, const String &p_member = "") const; const lsp::DocumentSymbol *get_script_symbol(const String &p_path) const; @@ -68,8 +68,8 @@ public: String root; String root_uri; - Map<String, ExtendGDScriptParser *> scripts; - Map<String, ExtendGDScriptParser *> parse_results; + HashMap<String, ExtendGDScriptParser *> scripts; + HashMap<String, ExtendGDScriptParser *> parse_results; HashMap<StringName, ClassMembers> native_members; public: diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp index a63f9df918..d4aa207972 100644 --- a/modules/gdscript/language_server/lsp.hpp +++ b/modules/gdscript/language_server/lsp.hpp @@ -261,7 +261,7 @@ struct WorkspaceEdit { /** * Holds changes to existing resources. */ - Map<String, Vector<TextEdit>> changes; + HashMap<String, Vector<TextEdit>> changes; _FORCE_INLINE_ void add_edit(const String &uri, const TextEdit &edit) { if (changes.has(uri)) { @@ -293,8 +293,8 @@ struct WorkspaceEdit { } _FORCE_INLINE_ void add_change(const String &uri, const int &line, const int &start_character, const int &end_character, const String &new_text) { - if (Map<String, Vector<TextEdit>>::Element *E = changes.find(uri)) { - Vector<TextEdit> edit_list = E->value(); + if (HashMap<String, Vector<TextEdit>>::Iterator E = changes.find(uri)) { + Vector<TextEdit> edit_list = E->value; for (int i = 0; i < edit_list.size(); ++i) { TextEdit edit = edit_list[i]; if (edit.range.start.character == start_character) { @@ -310,8 +310,8 @@ struct WorkspaceEdit { new_edit.range.end.line = line; new_edit.range.end.character = end_character; - if (Map<String, Vector<TextEdit>>::Element *E = changes.find(uri)) { - E->value().push_back(new_edit); + if (HashMap<String, Vector<TextEdit>>::Iterator E = changes.find(uri)) { + E->value.push_back(new_edit); } else { Vector<TextEdit> edit_list; edit_list.push_back(new_edit); diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp index 59acb1c064..7cedbda804 100644 --- a/modules/gdscript/register_types.cpp +++ b/modules/gdscript/register_types.cpp @@ -70,7 +70,7 @@ class EditorExportGDScript : public EditorExportPlugin { GDCLASS(EditorExportGDScript, EditorExportPlugin); public: - virtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features) override { + virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) override { int script_mode = EditorExportPreset::MODE_SCRIPT_COMPILED; String script_key; diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp index 71dc5de7e4..de5cd10e7c 100644 --- a/modules/gdscript/tests/gdscript_test_runner.cpp +++ b/modules/gdscript/tests/gdscript_test_runner.cpp @@ -543,8 +543,8 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) { return result; } // Test running. - const Map<StringName, GDScriptFunction *>::Element *test_function_element = script->get_member_functions().find(GDScriptTestRunner::test_function_name); - if (test_function_element == nullptr) { + const HashMap<StringName, GDScriptFunction *>::ConstIterator test_function_element = script->get_member_functions().find(GDScriptTestRunner::test_function_name); + if (!test_function_element) { enable_stdout(); result.status = GDTEST_LOAD_ERROR; result.output = ""; diff --git a/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.gd b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.gd new file mode 100644 index 0000000000..d00d483a73 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.gd @@ -0,0 +1,16 @@ +func test(): + var foo := "bar" + match foo: + "baz": + return + _: + pass + match foo: + "baz": + return + match foo: + "bar": + pass + _: + return + print("reached") diff --git a/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.out b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.out new file mode 100644 index 0000000000..47db6b631b --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return_bug_55154.out @@ -0,0 +1,2 @@ +GDTEST_OK +reached diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp index 173d5131cf..63f446561a 100644 --- a/modules/gltf/editor/editor_scene_importer_blend.cpp +++ b/modules/gltf/editor/editor_scene_importer_blend.cpp @@ -58,7 +58,7 @@ void EditorSceneFormatImporterBlend::get_extensions(List<String> *r_extensions) } Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { // Get global paths for source and sink. @@ -239,7 +239,7 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_ } Variant EditorSceneFormatImporterBlend::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, - const Map<StringName, Variant> &p_options) { + const HashMap<StringName, Variant> &p_options) { if (p_path.get_extension().to_lower() != "blend") { return true; } diff --git a/modules/gltf/editor/editor_scene_importer_blend.h b/modules/gltf/editor/editor_scene_importer_blend.h index 0925333a28..dd1c1b9889 100644 --- a/modules/gltf/editor/editor_scene_importer_blend.h +++ b/modules/gltf/editor/editor_scene_importer_blend.h @@ -66,12 +66,12 @@ public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; virtual Node *import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options) override; virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, - const Map<StringName, Variant> &p_options) override; + const HashMap<StringName, Variant> &p_options) override; }; class LineEdit; diff --git a/modules/gltf/editor/editor_scene_importer_fbx.cpp b/modules/gltf/editor/editor_scene_importer_fbx.cpp index 893d2efcec..faad2d315d 100644 --- a/modules/gltf/editor/editor_scene_importer_fbx.cpp +++ b/modules/gltf/editor/editor_scene_importer_fbx.cpp @@ -30,7 +30,7 @@ #include "editor_scene_importer_fbx.h" -#if TOOLS_ENABLED +#ifdef TOOLS_ENABLED #include "../gltf_document.h" #include "../gltf_state.h" @@ -49,7 +49,7 @@ void EditorSceneFormatImporterFBX::get_extensions(List<String> *r_extensions) co } Node *EditorSceneFormatImporterFBX::import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { // Get global paths for source and sink. @@ -106,7 +106,7 @@ Node *EditorSceneFormatImporterFBX::import_scene(const String &p_path, uint32_t } Variant EditorSceneFormatImporterFBX::get_option_visibility(const String &p_path, bool p_for_animation, - const String &p_option, const Map<StringName, Variant> &p_options) { + const String &p_option, const HashMap<StringName, Variant> &p_options) { return true; } diff --git a/modules/gltf/editor/editor_scene_importer_fbx.h b/modules/gltf/editor/editor_scene_importer_fbx.h index 84de7fd1cc..b0039b1c8f 100644 --- a/modules/gltf/editor/editor_scene_importer_fbx.h +++ b/modules/gltf/editor/editor_scene_importer_fbx.h @@ -45,12 +45,12 @@ public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; virtual Node *import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options) override; virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, - const Map<StringName, Variant> &p_options) override; + const HashMap<StringName, Variant> &p_options) override; }; #endif // TOOLS_ENABLED diff --git a/modules/gltf/editor/editor_scene_importer_gltf.cpp b/modules/gltf/editor/editor_scene_importer_gltf.cpp index 5e7811ad2b..d5b247fc6e 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor/editor_scene_importer_gltf.cpp @@ -48,7 +48,7 @@ void EditorSceneFormatImporterGLTF::get_extensions(List<String> *r_extensions) c } Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { Ref<GLTFDocument> doc; doc.instantiate(); diff --git a/modules/gltf/editor/editor_scene_importer_gltf.h b/modules/gltf/editor/editor_scene_importer_gltf.h index b714ada124..edca038532 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.h +++ b/modules/gltf/editor/editor_scene_importer_gltf.h @@ -45,7 +45,7 @@ public: virtual uint32_t get_import_flags() const override; virtual void get_extensions(List<String> *r_extensions) const override; virtual Node *import_scene(const String &p_path, uint32_t p_flags, - const Map<StringName, Variant> &p_options, int p_bake_fps, + const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override; }; diff --git a/modules/gltf/gltf_animation.cpp b/modules/gltf/gltf_animation.cpp index c857be4b2c..e598c870ab 100644 --- a/modules/gltf/gltf_animation.cpp +++ b/modules/gltf/gltf_animation.cpp @@ -45,7 +45,7 @@ void GLTFAnimation::set_loop(bool p_val) { loop = p_val; } -Map<int, GLTFAnimation::Track> &GLTFAnimation::get_tracks() { +HashMap<int, GLTFAnimation::Track> &GLTFAnimation::get_tracks() { return tracks; } diff --git a/modules/gltf/gltf_animation.h b/modules/gltf/gltf_animation.h index ba8ae8a273..8688ddb937 100644 --- a/modules/gltf/gltf_animation.h +++ b/modules/gltf/gltf_animation.h @@ -64,11 +64,11 @@ public: public: bool get_loop() const; void set_loop(bool p_val); - Map<int, GLTFAnimation::Track> &get_tracks(); + HashMap<int, GLTFAnimation::Track> &get_tracks(); GLTFAnimation(); private: bool loop = false; - Map<int, Track> tracks; + HashMap<int, Track> tracks; }; #endif // GLTF_ANIMATION_H diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 082b4ce1ec..f440a29f28 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -2294,7 +2294,7 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) { attributes["COLOR_0"] = _encode_accessor_as_color(state, a, true); } } - Map<int, int> joint_i_to_bone_i; + HashMap<int, int> joint_i_to_bone_i; for (GLTFNodeIndex node_i = 0; node_i < state->nodes.size(); node_i++) { GLTFSkinIndex skin_i = -1; if (state->nodes[node_i]->mesh == gltf_mesh_i) { @@ -2468,9 +2468,9 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) { mat = import_mesh->get_surface_material(surface_i); } if (mat.is_valid()) { - Map<Ref<BaseMaterial3D>, GLTFMaterialIndex>::Element *material_cache_i = state->material_cache.find(mat); - if (material_cache_i && material_cache_i->get() != -1) { - primitive["material"] = material_cache_i->get(); + HashMap<Ref<BaseMaterial3D>, GLTFMaterialIndex>::Iterator material_cache_i = state->material_cache.find(mat); + if (material_cache_i && material_cache_i->value != -1) { + primitive["material"] = material_cache_i->value; } else { GLTFMaterialIndex mat_i = state->materials.size(); state->materials.push_back(mat); @@ -5904,9 +5904,9 @@ void GLTFDocument::_import_animation(Ref<GLTFState> state, AnimationPlayer *ap, Node *root = ap->get_parent(); ERR_FAIL_COND(root == nullptr); - Map<GLTFNodeIndex, Node *>::Element *node_element = state->scene_nodes.find(node_index); - ERR_CONTINUE_MSG(node_element == nullptr, vformat("Unable to find node %d for animation", node_index)); - node_path = root->get_path_to(node_element->get()); + HashMap<GLTFNodeIndex, Node *>::Iterator node_element = state->scene_nodes.find(node_index); + ERR_CONTINUE_MSG(!node_element, vformat("Unable to find node %d for animation", node_index)); + node_path = root->get_path_to(node_element->value); if (gltf_node->skeleton >= 0) { const Skeleton3D *sk = state->skeletons[gltf_node->skeleton]->godot_skeleton; @@ -6116,11 +6116,11 @@ void GLTFDocument::_convert_mesh_instances(Ref<GLTFState> state) { if (node->mesh < 0) { continue; } - Map<GLTFNodeIndex, Node *>::Element *mi_element = state->scene_nodes.find(mi_node_i); + HashMap<GLTFNodeIndex, Node *>::Iterator mi_element = state->scene_nodes.find(mi_node_i); if (!mi_element) { continue; } - MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(mi_element->get()); + MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(mi_element->value); if (!mi) { continue; } @@ -6250,11 +6250,11 @@ void GLTFDocument::_process_mesh_instances(Ref<GLTFState> state, Node *scene_roo if (node->skin >= 0 && node->mesh >= 0) { const GLTFSkinIndex skin_i = node->skin; - Map<GLTFNodeIndex, Node *>::Element *mi_element = state->scene_nodes.find(node_i); - ERR_CONTINUE_MSG(mi_element == nullptr, vformat("Unable to find node %d", node_i)); + HashMap<GLTFNodeIndex, Node *>::Iterator mi_element = state->scene_nodes.find(node_i); + ERR_CONTINUE_MSG(!mi_element, vformat("Unable to find node %d", node_i)); - ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(mi_element->get()); - ERR_CONTINUE_MSG(mi == nullptr, vformat("Unable to cast node %d of type %s to ImporterMeshInstance3D", node_i, mi_element->get()->get_class_name())); + ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(mi_element->value); + ERR_CONTINUE_MSG(mi == nullptr, vformat("Unable to cast node %d of type %s to ImporterMeshInstance3D", node_i, mi_element->value->get_class_name())); const GLTFSkeletonIndex skel_i = state->skins.write[node->skin]->skeleton; Ref<GLTFSkeleton> gltf_skeleton = state->skeletons.write[skel_i]; @@ -6436,10 +6436,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, for (const KeyValue<GLTFNodeIndex, Node *> &position_scene_node_i : state->scene_nodes) { if (position_scene_node_i.value == node) { GLTFNodeIndex node_index = position_scene_node_i.key; - Map<int, GLTFAnimation::Track>::Element *position_track_i = gltf_animation->get_tracks().find(node_index); + HashMap<int, GLTFAnimation::Track>::Iterator position_track_i = gltf_animation->get_tracks().find(node_index); GLTFAnimation::Track track; if (position_track_i) { - track = position_track_i->get(); + track = position_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_index); gltf_animation->get_tracks().insert(node_index, track); @@ -6452,10 +6452,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, for (const KeyValue<GLTFNodeIndex, Node *> &rotation_degree_scene_node_i : state->scene_nodes) { if (rotation_degree_scene_node_i.value == node) { GLTFNodeIndex node_index = rotation_degree_scene_node_i.key; - Map<int, GLTFAnimation::Track>::Element *rotation_degree_track_i = gltf_animation->get_tracks().find(node_index); + HashMap<int, GLTFAnimation::Track>::Iterator rotation_degree_track_i = gltf_animation->get_tracks().find(node_index); GLTFAnimation::Track track; if (rotation_degree_track_i) { - track = rotation_degree_track_i->get(); + track = rotation_degree_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_index); gltf_animation->get_tracks().insert(node_index, track); @@ -6468,10 +6468,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, for (const KeyValue<GLTFNodeIndex, Node *> &scale_scene_node_i : state->scene_nodes) { if (scale_scene_node_i.value == node) { GLTFNodeIndex node_index = scale_scene_node_i.key; - Map<int, GLTFAnimation::Track>::Element *scale_track_i = gltf_animation->get_tracks().find(node_index); + HashMap<int, GLTFAnimation::Track>::Iterator scale_track_i = gltf_animation->get_tracks().find(node_index); GLTFAnimation::Track track; if (scale_track_i) { - track = scale_track_i->get(); + track = scale_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_index); gltf_animation->get_tracks().insert(node_index, track); @@ -6503,7 +6503,7 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, } } ERR_CONTINUE(mesh_index == -1); - Map<int, GLTFAnimation::Track> &tracks = gltf_animation->get_tracks(); + HashMap<int, GLTFAnimation::Track> &tracks = gltf_animation->get_tracks(); GLTFAnimation::Track track = gltf_animation->get_tracks().has(mesh_index) ? gltf_animation->get_tracks()[mesh_index] : GLTFAnimation::Track(); if (!tracks.has(mesh_index)) { for (int32_t shape_i = 0; shape_i < mesh->get_blend_shape_count(); shape_i++) { @@ -6565,10 +6565,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, continue; } GLTFNodeIndex node_i = skeleton_gltf->godot_bone_node[bone]; - Map<int, GLTFAnimation::Track>::Element *property_track_i = gltf_animation->get_tracks().find(node_i); + HashMap<int, GLTFAnimation::Track>::Iterator property_track_i = gltf_animation->get_tracks().find(node_i); GLTFAnimation::Track track; if (property_track_i) { - track = property_track_i->get(); + track = property_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_i); gltf_animation->get_tracks()[node_i] = track; @@ -6580,10 +6580,10 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap, for (const KeyValue<GLTFNodeIndex, Node *> &scene_node_i : state->scene_nodes) { if (scene_node_i.value == godot_node) { GLTFNodeIndex node_i = scene_node_i.key; - Map<int, GLTFAnimation::Track>::Element *node_track_i = gltf_animation->get_tracks().find(node_i); + HashMap<int, GLTFAnimation::Track>::Iterator node_track_i = gltf_animation->get_tracks().find(node_i); GLTFAnimation::Track track; if (node_track_i) { - track = node_track_i->get(); + track = node_track_i->value; } track = _convert_animation_track(state, track, animation, track_i, node_i); gltf_animation->get_tracks()[node_i] = track; diff --git a/modules/gltf/gltf_document.h b/modules/gltf/gltf_document.h index 19bc507a8d..9db824a0d4 100644 --- a/modules/gltf/gltf_document.h +++ b/modules/gltf/gltf_document.h @@ -135,9 +135,9 @@ private: } template <class T> - static Array to_array(const Set<T> &p_inp) { + static Array to_array(const RBSet<T> &p_inp) { Array ret; - typename Set<T>::Element *elem = p_inp.front(); + typename RBSet<T>::Element *elem = p_inp.front(); while (elem) { ret.push_back(elem->get()); elem = elem->next(); @@ -154,23 +154,23 @@ private: } template <class T> - static void set_from_array(Set<T> &r_out, const Array &p_inp) { + static void set_from_array(RBSet<T> &r_out, const Array &p_inp) { r_out.clear(); for (int i = 0; i < p_inp.size(); i++) { r_out.insert(p_inp[i]); } } template <class K, class V> - static Dictionary to_dict(const Map<K, V> &p_inp) { + static Dictionary to_dict(const HashMap<K, V> &p_inp) { Dictionary ret; - for (typename Map<K, V>::Element *E = p_inp.front(); E; E = E->next()) { - ret[E->key()] = E->value(); + for (const KeyValue<K, V> &E : p_inp) { + ret[E.key] = E.value; } return ret; } template <class K, class V> - static void set_from_dict(Map<K, V> &r_out, const Dictionary &p_inp) { + static void set_from_dict(HashMap<K, V> &r_out, const Dictionary &p_inp) { r_out.clear(); Array keys = p_inp.keys(); for (int i = 0; i < keys.size(); i++) { diff --git a/modules/gltf/gltf_skeleton.cpp b/modules/gltf/gltf_skeleton.cpp index e80376f130..b813f39a27 100644 --- a/modules/gltf/gltf_skeleton.cpp +++ b/modules/gltf/gltf_skeleton.cpp @@ -46,7 +46,7 @@ void GLTFSkeleton::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "joints"), "set_joints", "get_joints"); // Vector<GLTFNodeIndex> ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "roots"), "set_roots", "get_roots"); // Vector<GLTFNodeIndex> ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "unique_names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_unique_names", "get_unique_names"); // Set<String> - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "godot_bone_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_godot_bone_node", "get_godot_bone_node"); // Map<int32_t, + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "godot_bone_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_godot_bone_node", "get_godot_bone_node"); // RBMap<int32_t, } Vector<GLTFNodeIndex> GLTFSkeleton::get_joints() { diff --git a/modules/gltf/gltf_skeleton.h b/modules/gltf/gltf_skeleton.h index 7d07d528cb..4dcee41465 100644 --- a/modules/gltf/gltf_skeleton.h +++ b/modules/gltf/gltf_skeleton.h @@ -50,9 +50,9 @@ private: Skeleton3D *godot_skeleton = nullptr; // Set of unique bone names for the skeleton - Set<String> unique_names; + RBSet<String> unique_names; - Map<int32_t, GLTFNodeIndex> godot_bone_node; + HashMap<int32_t, GLTFNodeIndex> godot_bone_node; Vector<BoneAttachment3D *> bone_attachments; @@ -78,10 +78,10 @@ public: Array get_unique_names(); void set_unique_names(Array p_unique_names); - //Map<int32_t, GLTFNodeIndex> get_godot_bone_node() { + //RBMap<int32_t, GLTFNodeIndex> get_godot_bone_node() { // return this->godot_bone_node; //} - //void set_godot_bone_node(Map<int32_t, GLTFNodeIndex> p_godot_bone_node) { + //void set_godot_bone_node(RBMap<int32_t, GLTFNodeIndex> p_godot_bone_node) { // this->godot_bone_node = p_godot_bone_node; //} Dictionary get_godot_bone_node(); diff --git a/modules/gltf/gltf_skin.cpp b/modules/gltf/gltf_skin.cpp index 283fc34ff5..e8005aa0c1 100644 --- a/modules/gltf/gltf_skin.cpp +++ b/modules/gltf/gltf_skin.cpp @@ -59,8 +59,8 @@ void GLTFSkin::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "non_joints"), "set_non_joints", "get_non_joints"); // Vector<GLTFNodeIndex> ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "roots"), "set_roots", "get_roots"); // Vector<GLTFNodeIndex> ADD_PROPERTY(PropertyInfo(Variant::INT, "skeleton"), "set_skeleton", "get_skeleton"); // int - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "joint_i_to_bone_i", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL), "set_joint_i_to_bone_i", "get_joint_i_to_bone_i"); // Map<int, - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "joint_i_to_name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL), "set_joint_i_to_name", "get_joint_i_to_name"); // Map<int, + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "joint_i_to_bone_i", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL), "set_joint_i_to_bone_i", "get_joint_i_to_bone_i"); // RBMap<int, + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "joint_i_to_name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL), "set_joint_i_to_name", "get_joint_i_to_name"); // RBMap<int, ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "godot_skin"), "set_godot_skin", "get_godot_skin"); // Ref<Skin> } @@ -130,16 +130,16 @@ void GLTFSkin::set_joint_i_to_bone_i(Dictionary p_joint_i_to_bone_i) { Dictionary GLTFSkin::get_joint_i_to_name() { Dictionary ret; - Map<int, StringName>::Element *elem = joint_i_to_name.front(); + HashMap<int, StringName>::Iterator elem = joint_i_to_name.begin(); while (elem) { - ret[elem->key()] = String(elem->value()); - elem = elem->next(); + ret[elem->key] = String(elem->value); + ++elem; } return ret; } void GLTFSkin::set_joint_i_to_name(Dictionary p_joint_i_to_name) { - joint_i_to_name = Map<int, StringName>(); + joint_i_to_name = HashMap<int, StringName>(); Array keys = p_joint_i_to_name.keys(); for (int i = 0; i < keys.size(); i++) { joint_i_to_name[keys[i]] = p_joint_i_to_name[keys[i]]; diff --git a/modules/gltf/gltf_skin.h b/modules/gltf/gltf_skin.h index 31cb892f19..d946324756 100644 --- a/modules/gltf/gltf_skin.h +++ b/modules/gltf/gltf_skin.h @@ -65,8 +65,8 @@ private: // A mapping from the joint indices (in the order of joints_original) to the // Godot Skeleton's bone_indices - Map<int, int> joint_i_to_bone_i; - Map<int, StringName> joint_i_to_name; + HashMap<int, int> joint_i_to_bone_i; + HashMap<int, StringName> joint_i_to_name; // The Actual Skin that will be created as a mapping between the IBM's of // this skin to the generated skeleton for the mesh instances. diff --git a/modules/gltf/gltf_state.cpp b/modules/gltf/gltf_state.cpp index 6ead2f69c3..e959a640b4 100644 --- a/modules/gltf/gltf_state.cpp +++ b/modules/gltf/gltf_state.cpp @@ -102,7 +102,7 @@ void GLTFState::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "unique_names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_unique_names", "get_unique_names"); // Set<String> ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "unique_animation_names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_unique_animation_names", "get_unique_animation_names"); // Set<String> ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "skeletons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_skeletons", "get_skeletons"); // Vector<Ref<GLTFSkeleton>> - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "skeleton_to_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_skeleton_to_node", "get_skeleton_to_node"); // Map<GLTFSkeletonIndex, + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "skeleton_to_node", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_skeleton_to_node", "get_skeleton_to_node"); // RBMap<GLTFSkeletonIndex, ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "animations", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_animations", "get_animations"); // Vector<Ref<GLTFAnimation>> } diff --git a/modules/gltf/gltf_state.h b/modules/gltf/gltf_state.h index 42ca079f1c..f695b20b49 100644 --- a/modules/gltf/gltf_state.h +++ b/modules/gltf/gltf_state.h @@ -45,8 +45,8 @@ #include "gltf_texture.h" #include "core/io/resource.h" -#include "core/templates/map.h" #include "core/templates/pair.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "scene/animation/animation_player.h" #include "scene/resources/texture.h" @@ -72,7 +72,7 @@ class GLTFState : public Resource { Vector<Ref<GLTFMesh>> meshes; // meshes are loaded directly, no reason not to. Vector<AnimationPlayer *> animation_players; - Map<Ref<BaseMaterial3D>, GLTFMaterialIndex> material_cache; + HashMap<Ref<BaseMaterial3D>, GLTFMaterialIndex> material_cache; Vector<Ref<BaseMaterial3D>> materials; String scene_name; @@ -83,16 +83,16 @@ class GLTFState : public Resource { Vector<Ref<GLTFSkin>> skins; Vector<Ref<GLTFCamera>> cameras; Vector<Ref<GLTFLight>> lights; - Set<String> unique_names; - Set<String> unique_animation_names; + RBSet<String> unique_names; + RBSet<String> unique_animation_names; Vector<Ref<GLTFSkeleton>> skeletons; - Map<GLTFSkeletonIndex, GLTFNodeIndex> skeleton_to_node; + HashMap<GLTFSkeletonIndex, GLTFNodeIndex> skeleton_to_node; Vector<Ref<GLTFAnimation>> animations; - Map<GLTFNodeIndex, Node *> scene_nodes; + HashMap<GLTFNodeIndex, Node *> scene_nodes; - Map<ObjectID, GLTFSkeletonIndex> skeleton3d_to_gltf_skeleton; - Map<ObjectID, Map<ObjectID, GLTFSkinIndex>> skin_and_skeleton3d_to_gltf_skin; + HashMap<ObjectID, GLTFSkeletonIndex> skeleton3d_to_gltf_skeleton; + HashMap<ObjectID, HashMap<ObjectID, GLTFSkinIndex>> skin_and_skeleton3d_to_gltf_skin; protected: static void _bind_methods(); @@ -176,7 +176,7 @@ public: AnimationPlayer *get_animation_player(int idx); - //void set_scene_nodes(Map<GLTFNodeIndex, Node *> p_scene_nodes) { + //void set_scene_nodes(RBMap<GLTFNodeIndex, Node *> p_scene_nodes) { // this->scene_nodes = p_scene_nodes; //} @@ -184,10 +184,10 @@ public: // this->animation_players = p_animation_players; //} - //Map<Ref<Material>, GLTFMaterialIndex> get_material_cache() { + //RBMap<Ref<Material>, GLTFMaterialIndex> get_material_cache() { // return this->material_cache; //} - //void set_material_cache(Map<Ref<Material>, GLTFMaterialIndex> p_material_cache) { + //void set_material_cache(RBMap<Ref<Material>, GLTFMaterialIndex> p_material_cache) { // this->material_cache = p_material_cache; //} }; diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index 2f613768ee..4902adb827 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -930,6 +930,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) { } update_palette(); + _update_cursor_instance(); set_process(true); diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 3c7bd5eb70..c70a8121e8 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -103,9 +103,10 @@ bool GridMap::_get(const StringName &p_name, Variant &r_ret) const { { int *w = cells.ptrw(); int i = 0; - for (Map<IndexKey, Cell>::Element *E = cell_map.front(); E; E = E->next(), i++) { - encode_uint64(E->key().key, (uint8_t *)&w[i * 3]); - encode_uint32(E->get().cell, (uint8_t *)&w[i * 3 + 2]); + for (const KeyValue<IndexKey, Cell> &E : cell_map) { + encode_uint64(E.key.key, (uint8_t *)&w[i * 3]); + encode_uint32(E.value.cell, (uint8_t *)&w[i * 3 + 2]); + i++; } } @@ -480,17 +481,17 @@ bool GridMap::_octant_update(const OctantKey &p_key) { * and set said multimesh bounding box to one containing all cells which have this item */ - Map<int, List<Pair<Transform3D, IndexKey>>> multimesh_items; + HashMap<int, List<Pair<Transform3D, IndexKey>>> multimesh_items; - for (Set<IndexKey>::Element *E = g.cells.front(); E; E = E->next()) { - ERR_CONTINUE(!cell_map.has(E->get())); - const Cell &c = cell_map[E->get()]; + for (const IndexKey &E : g.cells) { + ERR_CONTINUE(!cell_map.has(E)); + const Cell &c = cell_map[E]; if (!mesh_library.is_valid() || !mesh_library->has_item(c.item)) { continue; } - Vector3 cellpos = Vector3(E->get().x, E->get().y, E->get().z); + Vector3 cellpos = Vector3(E.x, E.y, E.z); Vector3 ofs = _get_offset(); Transform3D xform; @@ -506,7 +507,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) { Pair<Transform3D, IndexKey> p; p.first = xform * mesh_library->get_item_mesh_transform(c.item); - p.second = E->get(); + p.second = E; multimesh_items[c.item].push_back(p); } } @@ -539,7 +540,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) { nm.region = region; } - g.navmesh_ids[E->get()] = nm; + g.navmesh_ids[E] = nm; } } @@ -770,7 +771,7 @@ void GridMap::_queue_octants_dirty() { void GridMap::_recreate_octant_data() { recreating_octants = true; - Map<IndexKey, Cell> cell_copy = cell_map; + HashMap<IndexKey, Cell, IndexKey> cell_copy = cell_map; _clear_internal(); for (const KeyValue<IndexKey, Cell> &E : cell_copy) { set_cell_item(Vector3i(E.key), E.value.item, E.value.rot); @@ -998,7 +999,7 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe } //generate - Map<OctantKey, Map<Ref<Material>, Ref<SurfaceTool>>> surface_map; + HashMap<OctantKey, HashMap<Ref<Material>, Ref<SurfaceTool>>, OctantKey> surface_map; for (KeyValue<IndexKey, Cell> &E : cell_map) { IndexKey key = E.key; @@ -1028,10 +1029,10 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe ok.z = key.z / octant_size; if (!surface_map.has(ok)) { - surface_map[ok] = Map<Ref<Material>, Ref<SurfaceTool>>(); + surface_map[ok] = HashMap<Ref<Material>, Ref<SurfaceTool>>(); } - Map<Ref<Material>, Ref<SurfaceTool>> &mat_map = surface_map[ok]; + HashMap<Ref<Material>, Ref<SurfaceTool>> &mat_map = surface_map[ok]; for (int i = 0; i < mesh->get_surface_count(); i++) { if (mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) { @@ -1051,7 +1052,7 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe } } - for (KeyValue<OctantKey, Map<Ref<Material>, Ref<SurfaceTool>>> &E : surface_map) { + for (KeyValue<OctantKey, HashMap<Ref<Material>, Ref<SurfaceTool>>> &E : surface_map) { Ref<ArrayMesh> mesh; mesh.instantiate(); for (KeyValue<Ref<Material>, Ref<SurfaceTool>> &F : E.value) { diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h index 5e367e149d..88e16bce82 100644 --- a/modules/gridmap/grid_map.h +++ b/modules/gridmap/grid_map.h @@ -56,9 +56,15 @@ class GridMap : public Node3D { }; uint64_t key = 0; + static uint32_t hash(const IndexKey &p_key) { + return hash_one_uint64(p_key.key); + } _FORCE_INLINE_ bool operator<(const IndexKey &p_key) const { return key < p_key.key; } + _FORCE_INLINE_ bool operator==(const IndexKey &p_key) const { + return key == p_key.key; + } _FORCE_INLINE_ operator Vector3i() const { return Vector3i(x, y, z); @@ -107,13 +113,13 @@ class GridMap : public Node3D { }; Vector<MultimeshInstance> multimesh_instances; - Set<IndexKey> cells; + RBSet<IndexKey> cells; RID collision_debug; RID collision_debug_instance; bool dirty = false; RID static_body; - Map<IndexKey, NavMesh> navmesh_ids; + HashMap<IndexKey, NavMesh> navmesh_ids; }; union OctantKey { @@ -126,8 +132,11 @@ class GridMap : public Node3D { uint64_t key = 0; - _FORCE_INLINE_ bool operator<(const OctantKey &p_key) const { - return key < p_key.key; + static uint32_t hash(const OctantKey &p_key) { + return hash_one_uint64(p_key.key); + } + _FORCE_INLINE_ bool operator==(const OctantKey &p_key) const { + return key == p_key.key; } //OctantKey(const IndexKey& p_k, int p_item) { indexkey=p_k.key; item=p_item; } @@ -154,8 +163,8 @@ class GridMap : public Node3D { Ref<MeshLibrary> mesh_library; - Map<OctantKey, Octant *> octant_map; - Map<IndexKey, Cell> cell_map; + HashMap<OctantKey, Octant *, OctantKey> octant_map; + HashMap<IndexKey, Cell, IndexKey> cell_map; void _recreate_octant_data(); diff --git a/modules/jsonrpc/jsonrpc.h b/modules/jsonrpc/jsonrpc.h index 3144746f6d..f57d6aef42 100644 --- a/modules/jsonrpc/jsonrpc.h +++ b/modules/jsonrpc/jsonrpc.h @@ -37,7 +37,7 @@ class JSONRPC : public Object { GDCLASS(JSONRPC, Object) - Map<String, Object *> method_scopes; + HashMap<String, Object *> method_scopes; protected: static void _bind_methods(); diff --git a/modules/minimp3/resource_importer_mp3.cpp b/modules/minimp3/resource_importer_mp3.cpp index 6cd710e792..e03940f963 100644 --- a/modules/minimp3/resource_importer_mp3.cpp +++ b/modules/minimp3/resource_importer_mp3.cpp @@ -54,7 +54,7 @@ String ResourceImporterMP3::get_resource_type() const { return "AudioStreamMP3"; } -bool ResourceImporterMP3::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterMP3::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -71,7 +71,7 @@ void ResourceImporterMP3::get_import_options(const String &p_path, List<ImportOp r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "loop_offset"), 0)); } -Error ResourceImporterMP3::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterMP3::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { bool loop = p_options["loop"]; float loop_offset = p_options["loop_offset"]; diff --git a/modules/minimp3/resource_importer_mp3.h b/modules/minimp3/resource_importer_mp3.h index 75890228b9..678a3773bb 100644 --- a/modules/minimp3/resource_importer_mp3.h +++ b/modules/minimp3/resource_importer_mp3.h @@ -48,9 +48,9 @@ public: virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterMP3(); }; diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 31257ac33a..d0140f117c 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -686,10 +686,10 @@ void CSharpLanguage::pre_unsafe_unreference(Object *p_obj) { #ifdef DEBUG_ENABLED MutexLock lock(unsafe_object_references_lock); ObjectID id = p_obj->get_instance_id(); - Map<ObjectID, int>::Element *elem = unsafe_object_references.find(id); + HashMap<ObjectID, int>::Iterator elem = unsafe_object_references.find(id); ERR_FAIL_NULL(elem); - if (--elem->value() == 0) { - unsafe_object_references.erase(elem); + if (--elem->value == 0) { + unsafe_object_references.remove(elem); } #endif } @@ -897,7 +897,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { #endif // Save state and remove script from instances - Map<ObjectID, CSharpScript::StateBackup> &owners_map = script->pending_reload_state; + RBMap<ObjectID, CSharpScript::StateBackup> &owners_map = script->pending_reload_state; for (Object *&obj : script->instances) { ERR_CONTINUE(!obj->get_script_instance()); @@ -1099,14 +1099,14 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { const StringName &name = G.first; const Array &serialized_data = G.second; - Map<StringName, CSharpScript::EventSignal>::Element *match = script->event_signals.find(name); + HashMap<StringName, CSharpScript::EventSignal>::Iterator match = script->event_signals.find(name); if (!match) { // The event or its signal attribute were removed continue; } - const CSharpScript::EventSignal &event_signal = match->value(); + const CSharpScript::EventSignal &event_signal = match->value; MonoObject *managed_serialized_data = GDMonoMarshal::variant_to_mono_object(serialized_data); MonoDelegate *delegate = nullptr; @@ -1428,7 +1428,7 @@ bool CSharpLanguage::setup_csharp_script_binding(CSharpScriptBinding &r_script_b return true; } -Map<Object *, CSharpScriptBinding>::Element *CSharpLanguage::insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding) { +RBMap<Object *, CSharpScriptBinding>::Element *CSharpLanguage::insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding) { return script_bindings.insert(p_object, p_script_binding); } @@ -1437,7 +1437,7 @@ void *CSharpLanguage::_instance_binding_create_callback(void *, void *p_instance MutexLock lock(csharp_lang->language_bind_mutex); - Map<Object *, CSharpScriptBinding>::Element *match = csharp_lang->script_bindings.find((Object *)p_instance); + RBMap<Object *, CSharpScriptBinding>::Element *match = csharp_lang->script_bindings.find((Object *)p_instance); if (match) { return (void *)match; } @@ -1467,7 +1467,7 @@ void CSharpLanguage::_instance_binding_free_callback(void *, void *, void *p_bin { MutexLock lock(csharp_lang->language_bind_mutex); - Map<Object *, CSharpScriptBinding>::Element *data = (Map<Object *, CSharpScriptBinding>::Element *)p_binding; + RBMap<Object *, CSharpScriptBinding>::Element *data = (RBMap<Object *, CSharpScriptBinding>::Element *)p_binding; CSharpScriptBinding &script_binding = data->value(); @@ -1488,7 +1488,7 @@ void CSharpLanguage::_instance_binding_free_callback(void *, void *, void *p_bin GDNativeBool CSharpLanguage::_instance_binding_reference_callback(void *p_token, void *p_binding, GDNativeBool p_reference) { CRASH_COND(!p_binding); - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)p_binding)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)p_binding)->get(); RefCounted *rc_owner = Object::cast_to<RefCounted>(script_binding.owner); @@ -1558,7 +1558,7 @@ void *CSharpLanguage::get_instance_binding(Object *p_object) { // `setup_csharp_script_binding` may call `reference()`. It was moved here outside to fix that. if (binding) { - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)binding)->value(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)binding)->value(); if (!script_binding.inited) { MutexLock lock(CSharpLanguage::get_singleton()->get_language_bind_mutex()); @@ -2301,7 +2301,7 @@ CSharpInstance::~CSharpInstance() { void *data = CSharpLanguage::get_instance_binding(owner); CRASH_COND(data == nullptr); - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->get(); CRASH_COND(!script_binding.inited); #ifdef DEBUG_ENABLED @@ -2315,7 +2315,7 @@ CSharpInstance::~CSharpInstance() { #ifdef DEBUG_ENABLED // CSharpInstance must not be created unless it's going to be added to the list for sure - Set<Object *>::Element *match = script->instances.find(owner); + RBSet<Object *>::Element *match = script->instances.find(owner); CRASH_COND(!match); script->instances.erase(match); #else @@ -2331,7 +2331,7 @@ void CSharpScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) #endif #ifdef TOOLS_ENABLED -void CSharpScript::_update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames) { +void CSharpScript::_update_exports_values(HashMap<StringName, Variant> &values, List<PropertyInfo> &propnames) { if (base_cache.is_valid()) { base_cache->_update_exports_values(values, propnames); } @@ -2567,7 +2567,7 @@ bool CSharpScript::_update_exports(PlaceHolderScriptInstance *p_instance_to_upda if ((changed || p_instance_to_update) && placeholders.size()) { // Update placeholders if any - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; List<PropertyInfo> propnames; _update_exports_values(values, propnames); @@ -3144,7 +3144,7 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg void *data = CSharpLanguage::get_existing_instance_binding(p_owner); CRASH_COND(data == nullptr); - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->get(); if (script_binding.inited && !script_binding.gchandle.is_released()) { MonoObject *mono_object = script_binding.gchandle.get_target(); if (mono_object) { @@ -3401,9 +3401,9 @@ ScriptLanguage *CSharpScript::get_language() const { bool CSharpScript::get_property_default_value(const StringName &p_property, Variant &r_value) const { #ifdef TOOLS_ENABLED - const Map<StringName, Variant>::Element *E = exported_members_defval_cache.find(p_property); + HashMap<StringName, Variant>::ConstIterator E = exported_members_defval_cache.find(p_property); if (E) { - r_value = E->get(); + r_value = E->value; return true; } @@ -3574,7 +3574,7 @@ CSharpScript::~CSharpScript() { #endif } -void CSharpScript::get_members(Set<StringName> *p_members) { +void CSharpScript::get_members(RBSet<StringName> *p_members) { #if defined(TOOLS_ENABLED) || defined(DEBUG_ENABLED) if (p_members) { for (const StringName &member_name : exported_members_names) { diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index c69cba61a4..6e600bb47a 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -110,7 +110,7 @@ private: Ref<CSharpScript> base_cache; // TODO what's this for? - Set<Object *> instances; + RBSet<Object *> instances; #ifdef GD_MONO_HOT_RELOAD struct StateBackup { @@ -121,8 +121,8 @@ private: List<Pair<StringName, Array>> event_signals; }; - Set<ObjectID> pending_reload_instances; - Map<ObjectID, StateBackup> pending_reload_state; + RBSet<ObjectID> pending_reload_instances; + RBMap<ObjectID, StateBackup> pending_reload_state; StringName tied_class_name_for_reload; StringName tied_class_namespace_for_reload; #endif @@ -132,26 +132,26 @@ private: SelfList<CSharpScript> script_list = this; - Map<StringName, Vector<SignalParameter>> _signals; - Map<StringName, EventSignal> event_signals; + HashMap<StringName, Vector<SignalParameter>> _signals; + HashMap<StringName, EventSignal> event_signals; bool signals_invalidated = true; Vector<Multiplayer::RPCConfig> rpc_functions; #ifdef TOOLS_ENABLED List<PropertyInfo> exported_members_cache; // members_cache - Map<StringName, Variant> exported_members_defval_cache; // member_default_values_cache - Set<PlaceHolderScriptInstance *> placeholders; + HashMap<StringName, Variant> exported_members_defval_cache; // member_default_values_cache + RBSet<PlaceHolderScriptInstance *> placeholders; bool source_changed_cache = false; bool placeholder_fallback_enabled = false; bool exports_invalidated = true; - void _update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames); + void _update_exports_values(HashMap<StringName, Variant> &values, List<PropertyInfo> &propnames); void _update_member_info_no_exports(); void _placeholder_erased(PlaceHolderScriptInstance *p_placeholder) override; #endif #if defined(TOOLS_ENABLED) || defined(DEBUG_ENABLED) - Set<StringName> exported_members_names; + RBSet<StringName> exported_members_names; #endif HashMap<StringName, PropertyInfo> member_info; @@ -218,7 +218,7 @@ public: void get_script_property_list(List<PropertyInfo> *r_list) const override; void update_exports() override; - void get_members(Set<StringName> *p_members) override; + void get_members(RBSet<StringName> *p_members) override; bool is_tool() const override { return tool; } bool is_valid() const override { return valid; } @@ -356,11 +356,11 @@ class CSharpLanguage : public ScriptLanguage { Mutex script_gchandle_release_mutex; Mutex language_bind_mutex; - Map<Object *, CSharpScriptBinding> script_bindings; + RBMap<Object *, CSharpScriptBinding> script_bindings; #ifdef DEBUG_ENABLED // List of unsafe object references - Map<ObjectID, int> unsafe_object_references; + HashMap<ObjectID, int> unsafe_object_references; Mutex unsafe_object_references_lock; #endif @@ -467,7 +467,7 @@ public: virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override; virtual Vector<ScriptTemplate> get_built_in_templates(StringName p_object) override; /* TODO */ bool validate(const String &p_script, const String &p_path, List<String> *r_functions, - List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const override { + List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const override { return true; } String validate_path(const String &p_path) const override; @@ -518,7 +518,7 @@ public: void thread_enter() override; void thread_exit() override; - Map<Object *, CSharpScriptBinding>::Element *insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding); + RBMap<Object *, CSharpScriptBinding>::Element *insert_script_binding(Object *p_object, const CSharpScriptBinding &p_script_binding); bool setup_csharp_script_binding(CSharpScriptBinding &r_script_binding, Object *p_object); #ifdef DEBUG_ENABLED diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 168f0254ee..e602396ede 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -604,14 +604,14 @@ void BindingsGenerator::_append_xml_signal(StringBuilder &p_xml_output, const Ty void BindingsGenerator::_append_xml_enum(StringBuilder &p_xml_output, const TypeInterface *p_target_itype, const StringName &p_target_cname, const String &p_link_target, const Vector<String> &p_link_target_parts) { const StringName search_cname = !p_target_itype ? p_target_cname : StringName(p_target_itype->name + "." + (String)p_target_cname); - const Map<StringName, TypeInterface>::Element *enum_match = enum_types.find(search_cname); + HashMap<StringName, TypeInterface>::ConstIterator enum_match = enum_types.find(search_cname); if (!enum_match && search_cname != p_target_cname) { enum_match = enum_types.find(p_target_cname); } if (enum_match) { - const TypeInterface &target_enum_itype = enum_match->value(); + const TypeInterface &target_enum_itype = enum_match->value; p_xml_output.append("<see cref=\"" BINDINGS_NAMESPACE "."); p_xml_output.append(target_enum_itype.proxy_name); // Includes nesting class if any @@ -1938,10 +1938,10 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf return OK; // Won't increment method bind count } - const Map<const MethodInterface *, const InternalCall *>::Element *match = method_icalls_map.find(&p_imethod); + HashMap<const MethodInterface *, const InternalCall *>::ConstIterator match = method_icalls_map.find(&p_imethod); ERR_FAIL_NULL_V(match, ERR_BUG); - const InternalCall *im_icall = match->value(); + const InternalCall *im_icall = match->value; String im_call = im_icall->editor_only ? BINDINGS_CLASS_NATIVECALLS_EDITOR : BINDINGS_CLASS_NATIVECALLS; im_call += "."; @@ -2322,10 +2322,10 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte i++; } - const Map<const MethodInterface *, const InternalCall *>::Element *match = method_icalls_map.find(&p_imethod); + HashMap<const MethodInterface *, const InternalCall *>::ConstIterator match = method_icalls_map.find(&p_imethod); ERR_FAIL_NULL_V(match, ERR_BUG); - const InternalCall *im_icall = match->value(); + const InternalCall *im_icall = match->value; String icall_method = im_icall->name; if (!generated_icall_funcs.find(im_icall)) { @@ -2468,29 +2468,29 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte } const BindingsGenerator::TypeInterface *BindingsGenerator::_get_type_or_null(const TypeReference &p_typeref) { - const Map<StringName, TypeInterface>::Element *builtin_type_match = builtin_types.find(p_typeref.cname); + HashMap<StringName, TypeInterface>::ConstIterator builtin_type_match = builtin_types.find(p_typeref.cname); if (builtin_type_match) { - return &builtin_type_match->get(); + return &builtin_type_match->value; } - const HashMap<StringName, TypeInterface>::Iterator obj_type_match = obj_types.find(p_typeref.cname); + HashMap<StringName, TypeInterface>::ConstIterator obj_type_match = obj_types.find(p_typeref.cname); if (obj_type_match) { return &obj_type_match->value; } if (p_typeref.is_enum) { - const Map<StringName, TypeInterface>::Element *enum_match = enum_types.find(p_typeref.cname); + HashMap<StringName, TypeInterface>::ConstIterator enum_match = enum_types.find(p_typeref.cname); if (enum_match) { - return &enum_match->get(); + return &enum_match->value; } // Enum not found. Most likely because none of its constants were bound, so it's empty. That's fine. Use int instead. - const Map<StringName, TypeInterface>::Element *int_match = builtin_types.find(name_cache.type_int); + HashMap<StringName, TypeInterface>::ConstIterator int_match = builtin_types.find(name_cache.type_int); ERR_FAIL_NULL_V(int_match, nullptr); - return &int_match->get(); + return &int_match->value; } return nullptr; @@ -2505,16 +2505,16 @@ const BindingsGenerator::TypeInterface *BindingsGenerator::_get_type_or_placehol ERR_PRINT(String() + "Type not found. Creating placeholder: '" + p_typeref.cname.operator String() + "'."); - const Map<StringName, TypeInterface>::Element *match = placeholder_types.find(p_typeref.cname); + HashMap<StringName, TypeInterface>::ConstIterator match = placeholder_types.find(p_typeref.cname); if (match) { - return &match->get(); + return &match->value; } TypeInterface placeholder; TypeInterface::create_placeholder_type(placeholder, p_typeref.cname); - return &placeholder_types.insert(placeholder.cname, placeholder)->get(); + return &placeholder_types.insert(placeholder.cname, placeholder)->value; } StringName BindingsGenerator::_get_int_type_name_from_meta(GodotTypeInfo::Metadata p_meta) { @@ -2708,7 +2708,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() { List<PropertyInfo> property_list; ClassDB::get_property_list(type_cname, &property_list, true); - Map<StringName, StringName> accessor_methods; + HashMap<StringName, StringName> accessor_methods; for (const PropertyInfo &property : property_list) { if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY || (property.type == Variant::NIL && property.usage & PROPERTY_USAGE_ARRAY)) { @@ -2903,9 +2903,9 @@ bool BindingsGenerator::_populate_object_type_interfaces() { imethod.proxy_name += "_"; } - Map<StringName, StringName>::Element *accessor = accessor_methods.find(imethod.cname); + HashMap<StringName, StringName>::Iterator accessor = accessor_methods.find(imethod.cname); if (accessor) { - const PropertyInterface *accessor_property = itype.find_property_by_name(accessor->value()); + const PropertyInterface *accessor_property = itype.find_property_by_name(accessor->value); // We only deprecate an accessor method if it's in the same class as the property. It's easier this way, but also // we don't know if an accessor method in a different class could have other purposes, so better leave those untouched. @@ -3594,11 +3594,11 @@ void BindingsGenerator::_populate_global_constants() { int global_constants_count = CoreConstants::get_global_constant_count(); if (global_constants_count > 0) { - Map<String, DocData::ClassDoc>::Element *match = EditorHelp::get_doc_data()->class_list.find("@GlobalScope"); + HashMap<String, DocData::ClassDoc>::Iterator match = EditorHelp::get_doc_data()->class_list.find("@GlobalScope"); CRASH_COND_MSG(!match, "Could not find '@GlobalScope' in DocData."); - const DocData::ClassDoc &global_scope_doc = match->value(); + const DocData::ClassDoc &global_scope_doc = match->value; for (int i = 0; i < global_constants_count; i++) { String constant_name = CoreConstants::get_global_constant_name(i); diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h index ec57a34c2b..fb7e0e5a81 100644 --- a/modules/mono/editor/bindings_generator.h +++ b/modules/mono/editor/bindings_generator.h @@ -535,22 +535,22 @@ class BindingsGenerator { HashMap<StringName, TypeInterface> obj_types; - Map<StringName, TypeInterface> placeholder_types; - Map<StringName, TypeInterface> builtin_types; - Map<StringName, TypeInterface> enum_types; + HashMap<StringName, TypeInterface> placeholder_types; + HashMap<StringName, TypeInterface> builtin_types; + HashMap<StringName, TypeInterface> enum_types; List<EnumInterface> global_enums; List<ConstantInterface> global_constants; List<InternalCall> method_icalls; - Map<const MethodInterface *, const InternalCall *> method_icalls_map; + HashMap<const MethodInterface *, const InternalCall *> method_icalls_map; List<const InternalCall *> generated_icall_funcs; List<InternalCall> core_custom_icalls; List<InternalCall> editor_custom_icalls; - Map<StringName, List<StringName>> blacklisted_methods; + HashMap<StringName, List<StringName>> blacklisted_methods; void _initialize_blacklisted_methods(); diff --git a/modules/mono/glue/base_object_glue.cpp b/modules/mono/glue/base_object_glue.cpp index b10d78c593..7b9dbc87cf 100644 --- a/modules/mono/glue/base_object_glue.cpp +++ b/modules/mono/glue/base_object_glue.cpp @@ -68,7 +68,7 @@ void godot_icall_Object_Disposed(MonoObject *p_obj, Object *p_ptr) { void *data = CSharpLanguage::get_existing_instance_binding(p_ptr); if (data) { - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->get(); if (script_binding.inited) { MonoGCHandleData &gchandle = script_binding.gchandle; if (!gchandle.is_released()) { @@ -115,7 +115,7 @@ void godot_icall_RefCounted_Disposed(MonoObject *p_obj, Object *p_ptr, MonoBoole void *data = CSharpLanguage::get_existing_instance_binding(rc); if (data) { - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->get(); if (script_binding.inited) { MonoGCHandleData &gchandle = script_binding.gchandle; if (!gchandle.is_released()) { diff --git a/modules/mono/managed_callable.cpp b/modules/mono/managed_callable.cpp index 8ed21c323f..4f7783b765 100644 --- a/modules/mono/managed_callable.cpp +++ b/modules/mono/managed_callable.cpp @@ -36,7 +36,7 @@ #ifdef GD_MONO_HOT_RELOAD SelfList<ManagedCallable>::List ManagedCallable::instances; -Map<ManagedCallable *, Array> ManagedCallable::instances_pending_reload; +RBMap<ManagedCallable *, Array> ManagedCallable::instances_pending_reload; Mutex ManagedCallable::instances_mutex; #endif diff --git a/modules/mono/managed_callable.h b/modules/mono/managed_callable.h index d50a8a7b08..11bee6cf60 100644 --- a/modules/mono/managed_callable.h +++ b/modules/mono/managed_callable.h @@ -48,7 +48,7 @@ class ManagedCallable : public CallableCustom { #ifdef GD_MONO_HOT_RELOAD SelfList<ManagedCallable> self_instance = this; static SelfList<ManagedCallable>::List instances; - static Map<ManagedCallable *, Array> instances_pending_reload; + static RBMap<ManagedCallable *, Array> instances_pending_reload; static Mutex instances_mutex; #endif diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp index 3991b14612..42c6b6305f 100644 --- a/modules/mono/mono_gd/gd_mono_assembly.cpp +++ b/modules/mono/mono_gd/gd_mono_assembly.cpp @@ -412,10 +412,10 @@ GDMonoClass *GDMonoAssembly::get_class(const StringName &p_namespace, const Stri GDMonoClass *GDMonoAssembly::get_class(MonoClass *p_mono_class) { ERR_FAIL_NULL_V(image, nullptr); - Map<MonoClass *, GDMonoClass *>::Element *match = cached_raw.find(p_mono_class); + HashMap<MonoClass *, GDMonoClass *>::Iterator match = cached_raw.find(p_mono_class); if (match) { - return match->value(); + return match->value; } StringName namespace_name = String::utf8(mono_class_get_namespace(p_mono_class)); diff --git a/modules/mono/mono_gd/gd_mono_assembly.h b/modules/mono/mono_gd/gd_mono_assembly.h index a96357b082..0a3ae6c4fe 100644 --- a/modules/mono/mono_gd/gd_mono_assembly.h +++ b/modules/mono/mono_gd/gd_mono_assembly.h @@ -36,7 +36,7 @@ #include "core/string/ustring.h" #include "core/templates/hash_map.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "gd_mono_utils.h" class GDMonoAssembly { @@ -79,7 +79,7 @@ class GDMonoAssembly { #endif HashMap<ClassKey, GDMonoClass *, ClassKey::Hasher> cached_classes; - Map<MonoClass *, GDMonoClass *> cached_raw; + HashMap<MonoClass *, GDMonoClass *> cached_raw; static Vector<String> search_dirs; diff --git a/modules/mono/mono_gd/gd_mono_class.cpp b/modules/mono/mono_gd/gd_mono_class.cpp index daf70443e9..51c5aa3542 100644 --- a/modules/mono/mono_gd/gd_mono_class.cpp +++ b/modules/mono/mono_gd/gd_mono_class.cpp @@ -360,10 +360,10 @@ GDMonoMethod *GDMonoClass::get_method_with_desc(const String &p_description, boo } GDMonoField *GDMonoClass::get_field(const StringName &p_name) { - Map<StringName, GDMonoField *>::Element *result = fields.find(p_name); + HashMap<StringName, GDMonoField *>::Iterator result = fields.find(p_name); if (result) { - return result->value(); + return result->value; } if (fields_fetched) { @@ -392,10 +392,10 @@ const Vector<GDMonoField *> &GDMonoClass::get_all_fields() { while ((raw_field = mono_class_get_fields(mono_class, &iter)) != nullptr) { StringName name = String::utf8(mono_field_get_name(raw_field)); - Map<StringName, GDMonoField *>::Element *match = fields.find(name); + HashMap<StringName, GDMonoField *>::Iterator match = fields.find(name); if (match) { - fields_list.push_back(match->get()); + fields_list.push_back(match->value); } else { GDMonoField *field = memnew(GDMonoField(raw_field, this)); fields.insert(name, field); @@ -409,10 +409,10 @@ const Vector<GDMonoField *> &GDMonoClass::get_all_fields() { } GDMonoProperty *GDMonoClass::get_property(const StringName &p_name) { - Map<StringName, GDMonoProperty *>::Element *result = properties.find(p_name); + HashMap<StringName, GDMonoProperty *>::Iterator result = properties.find(p_name); if (result) { - return result->value(); + return result->value; } if (properties_fetched) { @@ -441,10 +441,10 @@ const Vector<GDMonoProperty *> &GDMonoClass::get_all_properties() { while ((raw_property = mono_class_get_properties(mono_class, &iter)) != nullptr) { StringName name = String::utf8(mono_property_get_name(raw_property)); - Map<StringName, GDMonoProperty *>::Element *match = properties.find(name); + HashMap<StringName, GDMonoProperty *>::Iterator match = properties.find(name); if (match) { - properties_list.push_back(match->get()); + properties_list.push_back(match->value); } else { GDMonoProperty *property = memnew(GDMonoProperty(raw_property, this)); properties.insert(name, property); @@ -477,10 +477,10 @@ const Vector<GDMonoClass *> &GDMonoClass::get_all_delegates() { if (mono_class_is_delegate(raw_class)) { StringName name = String::utf8(mono_class_get_name(raw_class)); - Map<StringName, GDMonoClass *>::Element *match = delegates.find(name); + HashMap<StringName, GDMonoClass *>::Iterator match = delegates.find(name); if (match) { - delegates_list.push_back(match->get()); + delegates_list.push_back(match->value); } else { GDMonoClass *delegate = memnew(GDMonoClass(String::utf8(mono_class_get_namespace(raw_class)), String::utf8(mono_class_get_name(raw_class)), raw_class, assembly)); delegates.insert(name, delegate); diff --git a/modules/mono/mono_gd/gd_mono_class.h b/modules/mono/mono_gd/gd_mono_class.h index b32d561f61..6b35da30f9 100644 --- a/modules/mono/mono_gd/gd_mono_class.h +++ b/modules/mono/mono_gd/gd_mono_class.h @@ -32,7 +32,7 @@ #define GD_MONO_CLASS_H #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "gd_mono_field.h" #include "gd_mono_header.h" @@ -85,15 +85,15 @@ class GDMonoClass { Vector<GDMonoMethod *> method_list; bool fields_fetched; - Map<StringName, GDMonoField *> fields; + HashMap<StringName, GDMonoField *> fields; Vector<GDMonoField *> fields_list; bool properties_fetched; - Map<StringName, GDMonoProperty *> properties; + HashMap<StringName, GDMonoProperty *> properties; Vector<GDMonoProperty *> properties_list; bool delegates_fetched; - Map<StringName, GDMonoClass *> delegates; + HashMap<StringName, GDMonoClass *> delegates; Vector<GDMonoClass *> delegates_list; friend class GDMonoAssembly; diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index a884bf4da0..25678be624 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -70,7 +70,7 @@ MonoObject *unmanaged_get_managed(Object *unmanaged) { void *data = CSharpLanguage::get_instance_binding(unmanaged); ERR_FAIL_NULL_V(data, nullptr); - CSharpScriptBinding &script_binding = ((Map<Object *, CSharpScriptBinding>::Element *)data)->value(); + CSharpScriptBinding &script_binding = ((RBMap<Object *, CSharpScriptBinding>::Element *)data)->value(); ERR_FAIL_COND_V(!script_binding.inited, nullptr); MonoGCHandleData &gchandle = script_binding.gchandle; diff --git a/modules/navigation/godot_navigation_server.cpp b/modules/navigation/godot_navigation_server.cpp index d16d41b438..cc9d05da47 100644 --- a/modules/navigation/godot_navigation_server.cpp +++ b/modules/navigation/godot_navigation_server.cpp @@ -233,6 +233,44 @@ RID GodotNavigationServer::map_get_closest_point_owner(RID p_map, const Vector3 return map->get_closest_point_owner(p_point); } +Array GodotNavigationServer::map_get_regions(RID p_map) const { + Array regions_rids; + const NavMap *map = map_owner.get_or_null(p_map); + ERR_FAIL_COND_V(map == nullptr, regions_rids); + for (NavRegion *region : map->get_regions()) { + regions_rids.push_back(region->get_self()); + } + return regions_rids; +} + +Array GodotNavigationServer::map_get_agents(RID p_map) const { + Array agents_rids; + const NavMap *map = map_owner.get_or_null(p_map); + ERR_FAIL_COND_V(map == nullptr, agents_rids); + for (RvoAgent *agent : map->get_agents()) { + agents_rids.push_back(agent->get_self()); + } + return agents_rids; +} + +RID GodotNavigationServer::region_get_map(RID p_region) const { + NavRegion *region = region_owner.get_or_null(p_region); + ERR_FAIL_COND_V(region == nullptr, RID()); + if (region->get_map()) { + return region->get_map()->get_self(); + } + return RID(); +} + +RID GodotNavigationServer::agent_get_map(RID p_agent) const { + RvoAgent *agent = agent_owner.get_or_null(p_agent); + ERR_FAIL_COND_V(agent == nullptr, RID()); + if (agent->get_map()) { + return agent->get_map()->get_self(); + } + return RID(); +} + RID GodotNavigationServer::region_create() const { GodotNavigationServer *mut_this = const_cast<GodotNavigationServer *>(this); MutexLock lock(mut_this->operations_mutex); diff --git a/modules/navigation/godot_navigation_server.h b/modules/navigation/godot_navigation_server.h index 7ad5e2d501..89e7311e51 100644 --- a/modules/navigation/godot_navigation_server.h +++ b/modules/navigation/godot_navigation_server.h @@ -105,8 +105,12 @@ public: virtual Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const override; virtual RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const override; + virtual Array map_get_regions(RID p_map) const override; + virtual Array map_get_agents(RID p_map) const override; + virtual RID region_create() const override; COMMAND_2(region_set_map, RID, p_region, RID, p_map); + virtual RID region_get_map(RID p_region) const override; COMMAND_2(region_set_layers, RID, p_region, uint32_t, p_layers); virtual uint32_t region_get_layers(RID p_region) const override; COMMAND_2(region_set_transform, RID, p_region, Transform3D, p_transform); @@ -118,6 +122,7 @@ public: virtual RID agent_create() const override; COMMAND_2(agent_set_map, RID, p_agent, RID, p_map); + virtual RID agent_get_map(RID p_agent) const override; COMMAND_2(agent_set_neighbor_dist, RID, p_agent, real_t, p_dist); COMMAND_2(agent_set_max_neighbors, RID, p_agent, int, p_count); COMMAND_2(agent_set_time_horizon, RID, p_agent, real_t, p_time); diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp index cbc0adc574..344475fb37 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -541,7 +541,7 @@ void NavMap::sync() { } // Group all edges per key. - Map<gd::EdgeKey, Vector<gd::Edge::Connection>> connections; + HashMap<gd::EdgeKey, Vector<gd::Edge::Connection>, gd::EdgeKey> connections; for (size_t poly_id(0); poly_id < polygons.size(); poly_id++) { gd::Polygon &poly(polygons[poly_id]); @@ -549,7 +549,7 @@ void NavMap::sync() { int next_point = (p + 1) % poly.points.size(); gd::EdgeKey ek(poly.points[p].key, poly.points[next_point].key); - Map<gd::EdgeKey, Vector<gd::Edge::Connection>>::Element *connection = connections.find(ek); + HashMap<gd::EdgeKey, Vector<gd::Edge::Connection>, gd::EdgeKey>::Iterator connection = connections.find(ek); if (!connection) { connections[ek] = Vector<gd::Edge::Connection>(); } diff --git a/modules/navigation/nav_map.h b/modules/navigation/nav_map.h index 5232e42bed..f58a78d4ca 100644 --- a/modules/navigation/nav_map.h +++ b/modules/navigation/nav_map.h @@ -28,13 +28,13 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef RVO_SPACE_H -#define RVO_SPACE_H +#ifndef NAV_MAP_H +#define NAV_MAP_H #include "nav_rid.h" #include "core/math/math_defs.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/thread_work_pool.h" #include "nav_utils.h" @@ -141,4 +141,4 @@ private: void clip_path(const std::vector<gd::NavigationPoly> &p_navigation_polys, Vector<Vector3> &path, const gd::NavigationPoly *from_poly, const Vector3 &p_to_point, const gd::NavigationPoly *p_to_poly) const; }; -#endif // RVO_SPACE_H +#endif // NAV_MAP_H diff --git a/modules/navigation/nav_utils.h b/modules/navigation/nav_utils.h index 5b6c695ca4..a9f4e0e2fc 100644 --- a/modules/navigation/nav_utils.h +++ b/modules/navigation/nav_utils.h @@ -32,8 +32,9 @@ #define NAV_UTILS_H #include "core/math/vector3.h" +#include "core/templates/hash_map.h" +#include "core/templates/hashfuncs.h" #include "core/templates/vector.h" - #include <vector> class NavRegion; @@ -49,15 +50,18 @@ union PointKey { }; uint64_t key = 0; - bool operator<(const PointKey &p_key) const { return key < p_key.key; } }; struct EdgeKey { PointKey a; PointKey b; - bool operator<(const EdgeKey &p_key) const { - return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key); + static uint32_t hash(const EdgeKey &p_val) { + return hash_one_uint64(p_val.a.key) ^ hash_one_uint64(p_val.b.key); + } + + bool operator==(const EdgeKey &p_key) const { + return (a.key == p_key.a.key) && (b.key == p_key.b.key); } EdgeKey(const PointKey &p_a = PointKey(), const PointKey &p_b = PointKey()) : diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index 110a4f5138..5cbaded6c1 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -445,7 +445,7 @@ void NavigationMeshGenerator::_build_recast_navigation_mesh( cfg.minRegionArea = (int)(p_nav_mesh->get_region_min_size() * p_nav_mesh->get_region_min_size()); cfg.mergeRegionArea = (int)(p_nav_mesh->get_region_merge_size() * p_nav_mesh->get_region_merge_size()); cfg.maxVertsPerPoly = (int)p_nav_mesh->get_verts_per_poly(); - cfg.detailSampleDist = p_nav_mesh->get_detail_sample_distance() < 0.9f ? 0 : p_nav_mesh->get_cell_size() * p_nav_mesh->get_detail_sample_distance(); + cfg.detailSampleDist = MAX(p_nav_mesh->get_cell_size() * p_nav_mesh->get_detail_sample_distance(), 0.1f); cfg.detailSampleMaxError = p_nav_mesh->get_cell_height() * p_nav_mesh->get_detail_sample_max_error(); cfg.bmin[0] = bmin[0]; diff --git a/modules/noise/fastnoise_lite.cpp b/modules/noise/fastnoise_lite.cpp index a8d38dee62..b21e3247d7 100644 --- a/modules/noise/fastnoise_lite.cpp +++ b/modules/noise/fastnoise_lite.cpp @@ -30,6 +30,24 @@ #include "fastnoise_lite.h" +_FastNoiseLite::FractalType FastNoiseLite::_convert_domain_warp_fractal_type_enum(DomainWarpFractalType p_domain_warp_fractal_type) { + _FastNoiseLite::FractalType type; + switch (p_domain_warp_fractal_type) { + case DOMAIN_WARP_FRACTAL_NONE: + type = _FastNoiseLite::FractalType_None; + break; + case DOMAIN_WARP_FRACTAL_PROGRESSIVE: + type = _FastNoiseLite::FractalType_DomainWarpProgressive; + break; + case DOMAIN_WARP_FRACTAL_INDEPENDENT: + type = _FastNoiseLite::FractalType_DomainWarpIndependent; + break; + default: + type = _FastNoiseLite::FractalType_None; + } + return type; +} + FastNoiseLite::FastNoiseLite() { _noise.SetNoiseType((_FastNoiseLite::NoiseType)noise_type); _noise.SetSeed(seed); @@ -50,7 +68,7 @@ FastNoiseLite::FastNoiseLite() { _domain_warp_noise.SetSeed(seed); _domain_warp_noise.SetDomainWarpAmp(domain_warp_amplitude); _domain_warp_noise.SetFrequency(domain_warp_frequency); - _domain_warp_noise.SetFractalType(_FastNoiseLite::FractalType_None); + _domain_warp_noise.SetFractalType(_convert_domain_warp_fractal_type_enum(domain_warp_fractal_type)); _domain_warp_noise.SetFractalOctaves(domain_warp_fractal_octaves); _domain_warp_noise.SetFractalLacunarity(domain_warp_fractal_lacunarity); _domain_warp_noise.SetFractalGain(domain_warp_fractal_gain); @@ -241,23 +259,7 @@ real_t FastNoiseLite::get_domain_warp_frequency() const { void FastNoiseLite::set_domain_warp_fractal_type(DomainWarpFractalType p_domain_warp_fractal_type) { domain_warp_fractal_type = p_domain_warp_fractal_type; - // This needs manual conversion because Godots Inspector property API does not support discontiguous enum indices. - _FastNoiseLite::FractalType type; - switch (p_domain_warp_fractal_type) { - case DOMAIN_WARP_FRACTAL_NONE: - type = _FastNoiseLite::FractalType_None; - break; - case DOMAIN_WARP_FRACTAL_PROGRESSIVE: - type = _FastNoiseLite::FractalType_DomainWarpProgressive; - break; - case DOMAIN_WARP_FRACTAL_INDEPENDENT: - type = _FastNoiseLite::FractalType_DomainWarpIndependent; - break; - default: - type = _FastNoiseLite::FractalType_None; - } - - _domain_warp_noise.SetFractalType(type); + _domain_warp_noise.SetFractalType(_convert_domain_warp_fractal_type_enum(p_domain_warp_fractal_type)); emit_changed(); } @@ -298,6 +300,12 @@ real_t FastNoiseLite::get_domain_warp_fractal_gain() const { // Noise interface functions. real_t FastNoiseLite::get_noise_1d(real_t p_x) const { + p_x += offset.x; + if (domain_warp_enabled) { + // Needed since DomainWarp expects a reference. + real_t y_dummy = 0; + _domain_warp_noise.DomainWarp(p_x, y_dummy); + } return get_noise_2d(p_x, 0.0); } @@ -306,10 +314,12 @@ real_t FastNoiseLite::get_noise_2dv(Vector2 p_v) const { } real_t FastNoiseLite::get_noise_2d(real_t p_x, real_t p_y) const { + p_x += offset.x; + p_y += offset.y; if (domain_warp_enabled) { _domain_warp_noise.DomainWarp(p_x, p_y); } - return _noise.GetNoise(p_x + offset.x, p_y + offset.y); + return _noise.GetNoise(p_x, p_y); } real_t FastNoiseLite::get_noise_3dv(Vector3 p_v) const { @@ -317,10 +327,13 @@ real_t FastNoiseLite::get_noise_3dv(Vector3 p_v) const { } real_t FastNoiseLite::get_noise_3d(real_t p_x, real_t p_y, real_t p_z) const { + p_x += offset.x; + p_y += offset.y; + p_z += offset.z; if (domain_warp_enabled) { _domain_warp_noise.DomainWarp(p_x, p_y, p_z); } - return _noise.GetNoise(p_x + offset.x, p_y + offset.y, p_z + offset.z); + return _noise.GetNoise(p_x, p_y, p_z); } void FastNoiseLite::_changed() { diff --git a/modules/noise/fastnoise_lite.h b/modules/noise/fastnoise_lite.h index 0a4251868b..fe8cd7ce6e 100644 --- a/modules/noise/fastnoise_lite.h +++ b/modules/noise/fastnoise_lite.h @@ -127,6 +127,9 @@ private: real_t domain_warp_fractal_lacunarity = 6; real_t domain_warp_fractal_gain = 0.5; + // This needs manual conversion because Godots Inspector property API does not support discontiguous enum indices. + _FastNoiseLite::FractalType _convert_domain_warp_fractal_type_enum(DomainWarpFractalType p_domain_warp_fractal_type); + public: FastNoiseLite(); ~FastNoiseLite(); diff --git a/modules/openxr/extensions/openxr_extension_wrapper.h b/modules/openxr/extensions/openxr_extension_wrapper.h index f3064041b8..0f7c0ba0bc 100644 --- a/modules/openxr/extensions/openxr_extension_wrapper.h +++ b/modules/openxr/extensions/openxr_extension_wrapper.h @@ -33,7 +33,7 @@ #include "core/error/error_macros.h" #include "core/math/camera_matrix.h" -#include "core/templates/map.h" +#include "core/templates/hash_map.h" #include "core/templates/rid.h" #include "thirdparty/openxr/src/common/xr_linear.h" @@ -49,10 +49,10 @@ protected: // Store extension we require. // If bool pointer is a nullptr this means this extension is mandatory and initialisation will fail if it is not available // If bool pointer is set, value will be set to true or false depending on whether extension is available - Map<const char *, bool *> request_extensions; + HashMap<String, bool *> request_extensions; public: - virtual Map<const char *, bool *> get_request_extensions() { + virtual HashMap<String, bool *> get_request_extensions() { return request_extensions; } diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp index d0f67b7f5d..f42af0492f 100644 --- a/modules/openxr/openxr_api.cpp +++ b/modules/openxr/openxr_api.cpp @@ -170,9 +170,9 @@ bool OpenXRAPI::load_supported_extensions() { return true; } -bool OpenXRAPI::is_extension_supported(const char *p_extension) const { +bool OpenXRAPI::is_extension_supported(const String &p_extension) const { for (uint32_t i = 0; i < num_supported_extensions; i++) { - if (strcmp(supported_extensions[i].extensionName, p_extension) == 0) { + if (supported_extensions[i].extensionName == p_extension) { #ifdef DEBUG print_line("OpenXR: requested extension", p_extension, "is supported"); #endif @@ -204,9 +204,9 @@ bool OpenXRAPI::create_instance() { // Create our OpenXR instance, this will query any registered extension wrappers for extensions we need to enable. // Append the extensions requested by the registered extension wrappers. - Map<const char *, bool *> requested_extensions; + HashMap<String, bool *> requested_extensions; for (OpenXRExtensionWrapper *wrapper : registered_extension_wrappers) { - Map<const char *, bool *> wrapper_request_extensions = wrapper->get_request_extensions(); + const HashMap<String, bool *> &wrapper_request_extensions = wrapper->get_request_extensions(); // requested_extensions.insert(wrapper_request_extensions.begin(), wrapper_request_extensions.end()); for (auto &requested_extension : wrapper_request_extensions) { @@ -224,6 +224,7 @@ bool OpenXRAPI::create_instance() { // Check which extensions are supported enabled_extensions.clear(); + for (auto &requested_extension : requested_extensions) { if (!is_extension_supported(requested_extension.key)) { if (requested_extension.value == nullptr) { @@ -238,13 +239,18 @@ bool OpenXRAPI::create_instance() { *requested_extension.value = true; // and record that we want to enable it - enabled_extensions.push_back(requested_extension.key); + enabled_extensions.push_back(requested_extension.key.ascii()); } else { // record that we want to enable this - enabled_extensions.push_back(requested_extension.key); + enabled_extensions.push_back(requested_extension.key.ascii()); } } + Vector<const char *> extension_ptrs; + for (int i = 0; i < enabled_extensions.size(); i++) { + extension_ptrs.push_back(enabled_extensions[i].get_data()); + } + // Get our project name String project_name = GLOBAL_GET("application/config/name"); @@ -264,8 +270,8 @@ bool OpenXRAPI::create_instance() { application_info, // applicationInfo 0, // enabledApiLayerCount, need to find out if we need support for this? nullptr, // enabledApiLayerNames - uint32_t(enabled_extensions.size()), // enabledExtensionCount - enabled_extensions.ptr() // enabledExtensionNames + uint32_t(extension_ptrs.size()), // enabledExtensionCount + extension_ptrs.ptr() // enabledExtensionNames }; copy_string_to_char_buffer(project_name, instance_create_info.applicationInfo.applicationName, XR_MAX_APPLICATION_NAME_SIZE); diff --git a/modules/openxr/openxr_api.h b/modules/openxr/openxr_api.h index 702f6b9b1d..bd71f0e1c2 100644 --- a/modules/openxr/openxr_api.h +++ b/modules/openxr/openxr_api.h @@ -37,7 +37,7 @@ #include "core/math/vector2.h" #include "core/os/memory.h" #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/rid_owner.h" #include "core/templates/vector.h" #include "servers/xr/xr_pose.h" @@ -73,7 +73,7 @@ private: uint32_t num_supported_extensions = 0; XrExtensionProperties *supported_extensions = nullptr; Vector<OpenXRExtensionWrapper *> registered_extension_wrappers; - Vector<const char *> enabled_extensions; + Vector<CharString> enabled_extensions; bool ext_hp_mixed_reality_available = false; bool ext_samsung_odyssey_available = false; @@ -132,7 +132,7 @@ private: bool load_layer_properties(); bool load_supported_extensions(); - bool is_extension_supported(const char *p_extension) const; + bool is_extension_supported(const String &p_extension) const; // instance bool create_instance(); diff --git a/modules/openxr/openxr_interface.cpp b/modules/openxr/openxr_interface.cpp index 41ce8c019e..ab06583932 100644 --- a/modules/openxr/openxr_interface.cpp +++ b/modules/openxr/openxr_interface.cpp @@ -113,7 +113,7 @@ void OpenXRInterface::_load_action_map() { // process our action map if (action_map.is_valid()) { - Map<Ref<OpenXRAction>, Action *> xr_actions; + HashMap<Ref<OpenXRAction>, Action *> xr_actions; Array action_sets = action_map->get_action_sets(); for (int i = 0; i < action_sets.size(); i++) { diff --git a/modules/raycast/lightmap_raycaster.cpp b/modules/raycast/lightmap_raycaster.cpp index ecc256bff9..fc9ac416b7 100644 --- a/modules/raycast/lightmap_raycaster.cpp +++ b/modules/raycast/lightmap_raycaster.cpp @@ -152,17 +152,17 @@ void LightmapRaycasterEmbree::commit() { rtcCommitScene(embree_scene); } -void LightmapRaycasterEmbree::set_mesh_filter(const Set<int> &p_mesh_ids) { - for (Set<int>::Element *E = p_mesh_ids.front(); E; E = E->next()) { - rtcDisableGeometry(rtcGetGeometry(embree_scene, E->get())); +void LightmapRaycasterEmbree::set_mesh_filter(const RBSet<int> &p_mesh_ids) { + for (const int &E : p_mesh_ids) { + rtcDisableGeometry(rtcGetGeometry(embree_scene, E)); } rtcCommitScene(embree_scene); filter_meshes = p_mesh_ids; } void LightmapRaycasterEmbree::clear_mesh_filter() { - for (Set<int>::Element *E = filter_meshes.front(); E; E = E->next()) { - rtcEnableGeometry(rtcGetGeometry(embree_scene, E->get())); + for (const int &E : filter_meshes) { + rtcEnableGeometry(rtcGetGeometry(embree_scene, E)); } rtcCommitScene(embree_scene); filter_meshes.clear(); diff --git a/modules/raycast/lightmap_raycaster.h b/modules/raycast/lightmap_raycaster.h index c420e617e5..4c52758fd8 100644 --- a/modules/raycast/lightmap_raycaster.h +++ b/modules/raycast/lightmap_raycaster.h @@ -52,8 +52,8 @@ private: static void filter_function(const struct RTCFilterFunctionNArguments *p_args); - Map<unsigned int, AlphaTextureData> alpha_textures; - Set<int> filter_meshes; + HashMap<unsigned int, AlphaTextureData> alpha_textures; + RBSet<int> filter_meshes; public: virtual bool intersect(Ray &p_ray) override; @@ -64,7 +64,7 @@ public: virtual void set_mesh_alpha_texture(Ref<Image> p_alpha_texture, unsigned int p_id) override; virtual void commit() override; - virtual void set_mesh_filter(const Set<int> &p_mesh_ids) override; + virtual void set_mesh_filter(const RBSet<int> &p_mesh_ids) override; virtual void clear_mesh_filter() override; static LightmapRaycaster *create_embree_raycaster(); diff --git a/modules/raycast/raycast_occlusion_cull.cpp b/modules/raycast/raycast_occlusion_cull.cpp index f49cd08698..89e75f774e 100644 --- a/modules/raycast/raycast_occlusion_cull.cpp +++ b/modules/raycast/raycast_occlusion_cull.cpp @@ -223,9 +223,9 @@ void RaycastOcclusionCull::occluder_set_mesh(RID p_occluder, const PackedVector3 occluder->vertices = p_vertices; occluder->indices = p_indices; - for (Set<InstanceID>::Element *E = occluder->users.front(); E; E = E->next()) { - RID scenario_rid = E->get().scenario; - RID instance_rid = E->get().instance; + for (const InstanceID &E : occluder->users) { + RID scenario_rid = E.scenario; + RID instance_rid = E.instance; ERR_CONTINUE(!scenarios.has(scenario_rid)); Scenario &scenario = scenarios[scenario_rid]; ERR_CONTINUE(!scenario.instances.has(instance_rid)); diff --git a/modules/raycast/raycast_occlusion_cull.h b/modules/raycast/raycast_occlusion_cull.h index 8453c5341d..779f6fb3c4 100644 --- a/modules/raycast/raycast_occlusion_cull.h +++ b/modules/raycast/raycast_occlusion_cull.h @@ -101,7 +101,7 @@ private: struct Occluder { PackedVector3Array vertices; PackedInt32Array indices; - Set<InstanceID> users; + RBSet<InstanceID> users; }; struct OccluderInstance { @@ -136,7 +136,7 @@ private: int current_scene_idx = 0; HashMap<RID, OccluderInstance> instances; - Set<RID> dirty_instances; // To avoid duplicates + RBSet<RID> dirty_instances; // To avoid duplicates LocalVector<RID> dirty_instances_array; // To iterate and split into threads LocalVector<RID> removed_instances; diff --git a/modules/raycast/static_raycaster.cpp b/modules/raycast/static_raycaster.cpp index 9df6d5ff43..5d2dedf1a4 100644 --- a/modules/raycast/static_raycaster.cpp +++ b/modules/raycast/static_raycaster.cpp @@ -94,17 +94,17 @@ void StaticRaycasterEmbree::commit() { rtcCommitScene(embree_scene); } -void StaticRaycasterEmbree::set_mesh_filter(const Set<int> &p_mesh_ids) { - for (Set<int>::Element *E = p_mesh_ids.front(); E; E = E->next()) { - rtcDisableGeometry(rtcGetGeometry(embree_scene, E->get())); +void StaticRaycasterEmbree::set_mesh_filter(const RBSet<int> &p_mesh_ids) { + for (const int &E : p_mesh_ids) { + rtcDisableGeometry(rtcGetGeometry(embree_scene, E)); } rtcCommitScene(embree_scene); filter_meshes = p_mesh_ids; } void StaticRaycasterEmbree::clear_mesh_filter() { - for (Set<int>::Element *E = filter_meshes.front(); E; E = E->next()) { - rtcEnableGeometry(rtcGetGeometry(embree_scene, E->get())); + for (const int &E : filter_meshes) { + rtcEnableGeometry(rtcGetGeometry(embree_scene, E)); } rtcCommitScene(embree_scene); filter_meshes.clear(); diff --git a/modules/raycast/static_raycaster.h b/modules/raycast/static_raycaster.h index cce19ba60d..b52b5bccfc 100644 --- a/modules/raycast/static_raycaster.h +++ b/modules/raycast/static_raycaster.h @@ -41,7 +41,7 @@ private: static RTCDevice embree_device; RTCScene embree_scene; - Set<int> filter_meshes; + RBSet<int> filter_meshes; public: virtual bool intersect(Ray &p_ray) override; @@ -50,7 +50,7 @@ public: virtual void add_mesh(const PackedVector3Array &p_vertices, const PackedInt32Array &p_indices, unsigned int p_id) override; virtual void commit() override; - virtual void set_mesh_filter(const Set<int> &p_mesh_ids) override; + virtual void set_mesh_filter(const RBSet<int> &p_mesh_ids) override; virtual void clear_mesh_filter() override; static StaticRaycaster *create_embree_raycaster(); diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp index ee1137b71f..bbe92139e0 100644 --- a/modules/regex/regex.cpp +++ b/modules/regex/regex.cpp @@ -52,9 +52,9 @@ int RegExMatch::_find(const Variant &p_name) const { return i; } else if (p_name.get_type() == Variant::STRING) { - const Map<String, int>::Element *found = names.find((String)p_name); + HashMap<String, int>::ConstIterator found = names.find((String)p_name); if (found) { - return found->value(); + return found->value; } } @@ -75,8 +75,8 @@ int RegExMatch::get_group_count() const { Dictionary RegExMatch::get_names() const { Dictionary result; - for (const Map<String, int>::Element *i = names.front(); i != nullptr; i = i->next()) { - result[i->key()] = i->value(); + for (const KeyValue<String, int> &E : names) { + result[E.key] = E.value; } return result; diff --git a/modules/regex/regex.h b/modules/regex/regex.h index e7221f4070..1455188670 100644 --- a/modules/regex/regex.h +++ b/modules/regex/regex.h @@ -33,7 +33,7 @@ #include "core/object/ref_counted.h" #include "core/string/ustring.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/vector.h" #include "core/variant/array.h" #include "core/variant/dictionary.h" @@ -48,7 +48,7 @@ class RegExMatch : public RefCounted { String subject; Vector<Range> data; - Map<String, int> names; + HashMap<String, int> names; friend class RegEx; diff --git a/modules/text_server_adv/SCsub b/modules/text_server_adv/SCsub index 525d4d3efb..a46f17311a 100644 --- a/modules/text_server_adv/SCsub +++ b/modules/text_server_adv/SCsub @@ -442,7 +442,7 @@ if env["builtin_icu"]: ] thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - icu_data_name = "icudt70l.dat" + icu_data_name = "icudt71l.dat" if env_icu["tools"]: env_icu.Depends("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/" + icu_data_name) diff --git a/modules/text_server_adv/gdextension_build/SConstruct b/modules/text_server_adv/gdextension_build/SConstruct index 1c38398c88..0e36ef6805 100644 --- a/modules/text_server_adv/gdextension_build/SConstruct +++ b/modules/text_server_adv/gdextension_build/SConstruct @@ -116,6 +116,7 @@ if env["freetype_enabled"]: "src/psnames/psnames.c", "src/raster/raster.c", "src/sdf/sdf.c", + "src/svg/svg.c", "src/smooth/smooth.c", "src/truetype/truetype.c", "src/type1/type1.c", @@ -164,7 +165,14 @@ if env["freetype_enabled"]: env_freetype.Append(CPPPATH=[thirdparty_freetype_dir + "/include", thirdparty_zlib_dir, thirdparty_png_dir]) env.Append(CPPPATH=[thirdparty_freetype_dir + "/include"]) - env_freetype.Append(CPPDEFINES=["FT2_BUILD_LIBRARY", "FT_CONFIG_OPTION_USE_PNG", ("PNG_ARM_NEON_OPT", 0)]) + env_freetype.Append( + CPPDEFINES=[ + "FT2_BUILD_LIBRARY", + "FT_CONFIG_OPTION_USE_PNG", + ("PNG_ARM_NEON_OPT", 0), + "FT_CONFIG_OPTION_SYSTEM_ZLIB", + ] + ) if env["target"] == "debug": env_freetype.Append(CPPDEFINES=["ZLIB_DEBUG"]) @@ -564,7 +572,7 @@ thirdparty_icu_sources = [ ] thirdparty_icu_sources = [thirdparty_icu_dir + file for file in thirdparty_icu_sources] -icu_data_name = "icudt70l.dat" +icu_data_name = "icudt71l.dat" if env["static_icu_data"]: env_icu.Depends("../../../thirdparty/icu4c/icudata.gen.h", "../../../thirdparty/icu4c/" + icu_data_name) diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index fe3a43dc97..ef7807ca5d 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -1691,6 +1691,8 @@ hb_font_t *TextServerAdvanced::_font_get_hb_handle(const RID &p_font_rid, int64_ } RID TextServerAdvanced::create_font() { + _THREAD_SAFE_METHOD_ + FontDataAdvanced *fd = memnew(FontDataAdvanced); return font_owner.make_rid(fd); @@ -2688,13 +2690,22 @@ Dictionary TextServerAdvanced::font_get_glyph_contours(const RID &p_font_rid, in int error = FT_Load_Glyph(fd->cache[size]->face, index, FT_LOAD_NO_BITMAP | (fd->force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0)); ERR_FAIL_COND_V(error, Dictionary()); - double h = fd->cache[size]->ascent; + if (fd->embolden != 0.f) { + FT_Pos strength = fd->embolden * p_size * 4; // 26.6 fractional units (1 / 64). + FT_Outline_Embolden(&fd->cache[size]->face->glyph->outline, strength); + } + + if (fd->transform != Transform2D()) { + FT_Matrix mat = { FT_Fixed(fd->transform[0][0] * 65536), FT_Fixed(fd->transform[0][1] * 65536), FT_Fixed(fd->transform[1][0] * 65536), FT_Fixed(fd->transform[1][1] * 65536) }; // 16.16 fractional units (1 / 65536). + FT_Outline_Transform(&fd->cache[size]->face->glyph->outline, &mat); + } + double scale = (1.0 / 64.0) / fd->cache[size]->oversampling * fd->cache[size]->scale; if (fd->msdf) { scale = scale * (double)p_size / (double)fd->msdf_source_size; } for (short i = 0; i < fd->cache[size]->face->glyph->outline.n_points; i++) { - points.push_back(Vector3(fd->cache[size]->face->glyph->outline.points[i].x * scale, h - fd->cache[size]->face->glyph->outline.points[i].y * scale, FT_CURVE_TAG(fd->cache[size]->face->glyph->outline.tags[i]))); + points.push_back(Vector3(fd->cache[size]->face->glyph->outline.points[i].x * scale, -fd->cache[size]->face->glyph->outline.points[i].y * scale, FT_CURVE_TAG(fd->cache[size]->face->glyph->outline.tags[i]))); } for (short i = 0; i < fd->cache[size]->face->glyph->outline.n_contours; i++) { contours.push_back(fd->cache[size]->face->glyph->outline.contours[i]); @@ -3350,6 +3361,7 @@ void TextServerAdvanced::full_copy(ShapedTextDataAdvanced *p_shaped) { RID TextServerAdvanced::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) { _THREAD_SAFE_METHOD_ + ShapedTextDataAdvanced *sd = memnew(ShapedTextDataAdvanced); sd->hb_buffer = hb_buffer_create(); sd->direction = p_direction; @@ -3739,6 +3751,8 @@ void TextServerAdvanced::_realign(ShapedTextDataAdvanced *p_sd) const { } RID TextServerAdvanced::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const { + _THREAD_SAFE_METHOD_ + const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped); ERR_FAIL_COND_V(!sd, RID()); @@ -5575,7 +5589,7 @@ PackedInt32Array TextServerAdvanced::string_get_word_breaks(const String &p_stri // Convert to UTF-16. Char16String utf16 = p_string.utf16(); - Set<int> breaks; + RBSet<int> breaks; UErrorCode err = U_ZERO_ERROR; UBreakIterator *bi = ubrk_open(UBRK_LINE, p_language.ascii().get_data(), (const UChar *)utf16.ptr(), utf16.length(), &err); if (U_FAILURE(err)) { diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h index c292e2e707..897c27b6fa 100644 --- a/modules/text_server_adv/text_server_adv.h +++ b/modules/text_server_adv/text_server_adv.h @@ -126,7 +126,7 @@ class TextServerAdvanced : public TextServerExtension { _THREAD_SAFE_CLASS_ struct NumSystemData { - Set<StringName> lang; + RBSet<StringName> lang; String digits; String percent_sign; String exp; @@ -192,7 +192,6 @@ class TextServerAdvanced : public TextServerExtension { Vector<FontTexture> textures; HashMap<int32_t, FontGlyph> glyph_map; HashMap<Vector2i, Vector2, VariantHasher, VariantComparator> kerning_map; - hb_font_t *hb_handle = nullptr; #ifdef MODULE_FREETYPE_ENABLED @@ -236,7 +235,7 @@ class TextServerAdvanced : public TextServerExtension { HashMap<Vector2i, FontDataForSizeAdvanced *, VariantHasher, VariantComparator> cache; bool face_init = false; - Set<uint32_t> supported_scripts; + RBSet<uint32_t> supported_scripts; Dictionary supported_features; Dictionary supported_varaitions; Dictionary feature_overrides; diff --git a/modules/text_server_fb/gdextension_build/SConstruct b/modules/text_server_fb/gdextension_build/SConstruct index 1753bc8b86..6c9e10db18 100644 --- a/modules/text_server_fb/gdextension_build/SConstruct +++ b/modules/text_server_fb/gdextension_build/SConstruct @@ -111,6 +111,7 @@ if env["freetype_enabled"]: "src/psnames/psnames.c", "src/raster/raster.c", "src/sdf/sdf.c", + "src/svg/svg.c", "src/smooth/smooth.c", "src/truetype/truetype.c", "src/type1/type1.c", @@ -159,7 +160,14 @@ if env["freetype_enabled"]: env_freetype.Append(CPPPATH=[thirdparty_freetype_dir + "/include", thirdparty_zlib_dir, thirdparty_png_dir]) env.Append(CPPPATH=[thirdparty_freetype_dir + "/include"]) - env_freetype.Append(CPPDEFINES=["FT2_BUILD_LIBRARY", "FT_CONFIG_OPTION_USE_PNG", ("PNG_ARM_NEON_OPT", 0)]) + env_freetype.Append( + CPPDEFINES=[ + "FT2_BUILD_LIBRARY", + "FT_CONFIG_OPTION_USE_PNG", + ("PNG_ARM_NEON_OPT", 0), + "FT_CONFIG_OPTION_SYSTEM_ZLIB", + ] + ) if env["target"] == "debug": env_freetype.Append(CPPDEFINES=["ZLIB_DEBUG"]) diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 4a4b51e5d3..498b58175e 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -853,6 +853,8 @@ _FORCE_INLINE_ void TextServerFallback::_font_clear_cache(FontDataFallback *p_fo } RID TextServerFallback::create_font() { + _THREAD_SAFE_METHOD_ + FontDataFallback *fd = memnew(FontDataFallback); return font_owner.make_rid(fd); @@ -1836,13 +1838,22 @@ Dictionary TextServerFallback::font_get_glyph_contours(const RID &p_font_rid, in int error = FT_Load_Glyph(fd->cache[size]->face, FT_Get_Char_Index(fd->cache[size]->face, index), FT_LOAD_NO_BITMAP | (fd->force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0)); ERR_FAIL_COND_V(error, Dictionary()); - double h = fd->cache[size]->ascent; + if (fd->embolden != 0.f) { + FT_Pos strength = fd->embolden * p_size * 4; // 26.6 fractional units (1 / 64). + FT_Outline_Embolden(&fd->cache[size]->face->glyph->outline, strength); + } + + if (fd->transform != Transform2D()) { + FT_Matrix mat = { FT_Fixed(fd->transform[0][0] * 65536), FT_Fixed(fd->transform[0][1] * 65536), FT_Fixed(fd->transform[1][0] * 65536), FT_Fixed(fd->transform[1][1] * 65536) }; // 16.16 fractional units (1 / 65536). + FT_Outline_Transform(&fd->cache[size]->face->glyph->outline, &mat); + } + double scale = (1.0 / 64.0) / fd->cache[size]->oversampling * fd->cache[size]->scale; if (fd->msdf) { scale = scale * (double)p_size / (double)fd->msdf_source_size; } for (short i = 0; i < fd->cache[size]->face->glyph->outline.n_points; i++) { - points.push_back(Vector3(fd->cache[size]->face->glyph->outline.points[i].x * scale, h - fd->cache[size]->face->glyph->outline.points[i].y * scale, FT_CURVE_TAG(fd->cache[size]->face->glyph->outline.tags[i]))); + points.push_back(Vector3(fd->cache[size]->face->glyph->outline.points[i].x * scale, -fd->cache[size]->face->glyph->outline.points[i].y * scale, FT_CURVE_TAG(fd->cache[size]->face->glyph->outline.tags[i]))); } for (short i = 0; i < fd->cache[size]->face->glyph->outline.n_contours; i++) { contours.push_back(fd->cache[size]->face->glyph->outline.contours[i]); @@ -2420,6 +2431,7 @@ void TextServerFallback::full_copy(ShapedTextDataFallback *p_shaped) { RID TextServerFallback::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) { _THREAD_SAFE_METHOD_ + ShapedTextDataFallback *sd = memnew(ShapedTextDataFallback); sd->direction = p_direction; sd->orientation = p_orientation; @@ -2798,6 +2810,8 @@ void TextServerFallback::_realign(ShapedTextDataFallback *p_sd) const { } RID TextServerFallback::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const { + _THREAD_SAFE_METHOD_ + const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped); ERR_FAIL_COND_V(!sd, RID()); diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp index 569bcad780..012e0229f3 100644 --- a/modules/visual_script/editor/visual_script_editor.cpp +++ b/modules/visual_script/editor/visual_script_editor.cpp @@ -647,6 +647,14 @@ void VisualScriptEditor::_update_graph(int p_only_id) { Control::get_theme_icon(SNAME("PackedColorArray"), SNAME("EditorIcons")) }; + // Visual script specific theme for MSDF font. + Ref<Theme> vstheme; + vstheme.instantiate(); + Ref<Font> label_font = EditorNode::get_singleton()->get_editor_theme()->get_font("main_msdf", "EditorFonts"); + vstheme->set_font("font", "Label", label_font); + vstheme->set_font("font", "LineEdit", label_font); + vstheme->set_font("font", "Button", label_font); + Ref<Texture2D> seq_port = Control::get_theme_icon(SNAME("VisualShaderPort"), SNAME("EditorIcons")); List<int> node_ids; script->get_node_list(&node_ids); @@ -960,9 +968,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) { slot_idx++; } - graph->add_child(gnode); - + gnode->set_theme(vstheme); if (gnode->is_comment()) { graph->move_child(gnode, 0); } @@ -1603,12 +1610,12 @@ void VisualScriptEditor::_remove_output_port(int p_id, int p_port) { List<VisualScript::DataConnection> data_connections; script->get_data_connection_list(&data_connections); - HashMap<int, Set<int>> conn_map; + HashMap<int, RBSet<int>> conn_map; for (const VisualScript::DataConnection &E : data_connections) { if (E.from_node == p_id && E.from_port == p_port) { // Push into the connections map. if (!conn_map.has(E.to_node)) { - conn_map.insert(E.to_node, Set<int>()); + conn_map.insert(E.to_node, RBSet<int>()); } conn_map[E.to_node].insert(E.to_port); } @@ -1617,9 +1624,9 @@ void VisualScriptEditor::_remove_output_port(int p_id, int p_port) { undo_redo->add_do_method(vsn.ptr(), "remove_output_data_port", p_port); undo_redo->add_do_method(this, "_update_graph", p_id); - for (const KeyValue<int, Set<int>> &E : conn_map) { - for (const Set<int>::Element *F = E.value.front(); F; F = F->next()) { - undo_redo->add_undo_method(script.ptr(), "data_connect", p_id, p_port, E.key, F->get()); + for (const KeyValue<int, RBSet<int>> &E : conn_map) { + for (const int &F : E.value) { + undo_redo->add_undo_method(script.ptr(), "data_connect", p_id, p_port, E.key, F); } } @@ -1760,14 +1767,14 @@ void VisualScriptEditor::_on_nodes_paste() { return; } - Map<int, int> remap; + HashMap<int, int> remap; undo_redo->create_action(TTR("Paste VisualScript Nodes")); int idc = script->get_available_id() + 1; - Set<int> to_select; + RBSet<int> to_select; - Set<Vector2> existing_positions; + RBSet<Vector2> existing_positions; { List<int> nodes; @@ -1806,14 +1813,14 @@ void VisualScriptEditor::_on_nodes_paste() { undo_redo->add_undo_method(script.ptr(), "remove_node", new_id); } - for (Set<VisualScript::SequenceConnection>::Element *E = clipboard->sequence_connections.front(); E; E = E->next()) { - undo_redo->add_do_method(script.ptr(), "sequence_connect", remap[E->get().from_node], E->get().from_output, remap[E->get().to_node]); - undo_redo->add_undo_method(script.ptr(), "sequence_disconnect", remap[E->get().from_node], E->get().from_output, remap[E->get().to_node]); + for (const VisualScript::SequenceConnection &E : clipboard->sequence_connections) { + undo_redo->add_do_method(script.ptr(), "sequence_connect", remap[E.from_node], E.from_output, remap[E.to_node]); + undo_redo->add_undo_method(script.ptr(), "sequence_disconnect", remap[E.from_node], E.from_output, remap[E.to_node]); } - for (Set<VisualScript::DataConnection>::Element *E = clipboard->data_connections.front(); E; E = E->next()) { - undo_redo->add_do_method(script.ptr(), "data_connect", remap[E->get().from_node], E->get().from_port, remap[E->get().to_node], E->get().to_port); - undo_redo->add_undo_method(script.ptr(), "data_disconnect", remap[E->get().from_node], E->get().from_port, remap[E->get().to_node], E->get().to_port); + for (const VisualScript::DataConnection &E : clipboard->data_connections) { + undo_redo->add_do_method(script.ptr(), "data_connect", remap[E.from_node], E.from_port, remap[E.to_node], E.to_port); + undo_redo->add_undo_method(script.ptr(), "data_disconnect", remap[E.from_node], E.from_port, remap[E.to_node], E.to_port); } undo_redo->add_do_method(this, "_update_graph"); @@ -1881,7 +1888,7 @@ void VisualScriptEditor::_on_nodes_delete() { } void VisualScriptEditor::_on_nodes_duplicate() { - Set<int> to_duplicate; + RBSet<int> to_duplicate; for (int i = 0; i < graph->get_child_count(); i++) { GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); @@ -1900,20 +1907,20 @@ void VisualScriptEditor::_on_nodes_duplicate() { undo_redo->create_action(TTR("Duplicate VisualScript Nodes")); int idc = script->get_available_id() + 1; - Set<int> to_select; + RBSet<int> to_select; HashMap<int, int> remap; - for (Set<int>::Element *F = to_duplicate.front(); F; F = F->next()) { + for (const int &F : to_duplicate) { // Duplicate from the specific function but place it into the default func as it would lack the connections. - Ref<VisualScriptNode> node = script->get_node(F->get()); + Ref<VisualScriptNode> node = script->get_node(F); Ref<VisualScriptNode> dupe = node->duplicate(true); int new_id = idc++; - remap.insert(F->get(), new_id); + remap.insert(F, new_id); to_select.insert(new_id); - undo_redo->add_do_method(script.ptr(), "add_node", new_id, dupe, script->get_node_position(F->get()) + Vector2(20, 20)); + undo_redo->add_do_method(script.ptr(), "add_node", new_id, dupe, script->get_node_position(F) + Vector2(20, 20)); undo_redo->add_undo_method(script.ptr(), "remove_node", new_id); } @@ -3175,7 +3182,7 @@ void VisualScriptEditor::_graph_connect_to_empty(const String &p_from, int p_fro } } -VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_action_node, int p_port_action_output, Set<int> &visited_nodes) { +VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_action_node, int p_port_action_output, RBSet<int> &visited_nodes) { VisualScriptNode::TypeGuess tg; tg.type = Variant::NIL; @@ -3226,7 +3233,7 @@ VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_ac } void VisualScriptEditor::_port_action_menu(int p_option) { - Set<int> vn; + RBSet<int> vn; switch (p_option) { case CREATE_CALL_SET_GET: { @@ -3338,7 +3345,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri #endif Vector2 pos = _get_pos_in_graph(port_action_pos); - Set<int> vn; + RBSet<int> vn; bool port_node_exists = true; if (drop_position != Vector2()) { @@ -4094,8 +4101,8 @@ void VisualScriptEditor::_menu_option(int p_what) { } break; case EDIT_CREATE_FUNCTION: { // Create Function. - Map<int, Ref<VisualScriptNode>> nodes; - Set<int> selections; + HashMap<int, Ref<VisualScriptNode>> nodes; + RBSet<int> selections; for (int i = 0; i < graph->get_child_count(); i++) { GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i)); if (gn) { @@ -4118,18 +4125,18 @@ void VisualScriptEditor::_menu_option(int p_what) { return; // nothing to be done if there are no valid nodes selected } - Set<VisualScript::SequenceConnection> seqmove; - Set<VisualScript::DataConnection> datamove; + RBSet<VisualScript::SequenceConnection> seqmove; + RBSet<VisualScript::DataConnection> datamove; - Set<VisualScript::SequenceConnection> seqext; - Set<VisualScript::DataConnection> dataext; + RBSet<VisualScript::SequenceConnection> seqext; + RBSet<VisualScript::DataConnection> dataext; int start_node = -1; - Set<int> end_nodes; + RBSet<int> end_nodes; if (nodes.size() == 1) { - Ref<VisualScriptNode> nd = script->get_node(nodes.front()->key()); + Ref<VisualScriptNode> nd = script->get_node(nodes.begin()->key); if (nd.is_valid() && nd->has_input_sequence_port()) { - start_node = nodes.front()->key(); + start_node = nodes.begin()->key; } else { EditorNode::get_singleton()->show_warning(TTR("Select at least one node with sequence port.")); return; @@ -4167,8 +4174,8 @@ void VisualScriptEditor::_menu_option(int p_what) { } } else { // Pick the node with input sequence. - Set<int> nodes_from; - Set<int> nodes_to; + RBSet<int> nodes_from; + RBSet<int> nodes_to; for (const VisualScript::SequenceConnection &E : seqs) { if (nodes.has(E.from_node) && nodes.has(E.to_node)) { seqmove.insert(E); @@ -4194,9 +4201,9 @@ void VisualScriptEditor::_menu_option(int p_what) { // If we still don't have a start node then, // run through the nodes and select the first tree node, // i.e. node without any input sequence but output sequence. - for (Set<int>::Element *E = nodes_from.front(); E; E = E->next()) { - if (!nodes_to.has(E->get())) { - start_node = E->get(); + for (const int &E : nodes_from) { + if (!nodes_to.has(E)) { + start_node = E; } } } @@ -4265,13 +4272,13 @@ void VisualScriptEditor::_menu_option(int p_what) { // Move the nodes. // Handles reconnection of sequence connections on undo, start here in case of issues. - for (Set<VisualScript::SequenceConnection>::Element *E = seqext.front(); E; E = E->next()) { - undo_redo->add_do_method(script.ptr(), "sequence_disconnect", E->get().from_node, E->get().from_output, E->get().to_node); - undo_redo->add_undo_method(script.ptr(), "sequence_connect", E->get().from_node, E->get().from_output, E->get().to_node); + for (const VisualScript::SequenceConnection &E : seqext) { + undo_redo->add_do_method(script.ptr(), "sequence_disconnect", E.from_node, E.from_output, E.to_node); + undo_redo->add_undo_method(script.ptr(), "sequence_connect", E.from_node, E.from_output, E.to_node); } - for (Set<VisualScript::DataConnection>::Element *E = dataext.front(); E; E = E->next()) { - undo_redo->add_do_method(script.ptr(), "data_disconnect", E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); - undo_redo->add_undo_method(script.ptr(), "data_connect", E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); + for (const VisualScript::DataConnection &E : dataext) { + undo_redo->add_do_method(script.ptr(), "data_disconnect", E.from_node, E.from_port, E.to_node, E.to_port); + undo_redo->add_undo_method(script.ptr(), "data_connect", E.from_node, E.from_port, E.to_node, E.to_port); } // I don't really think we need support for non sequenced functions at this moment. @@ -4279,24 +4286,24 @@ void VisualScriptEditor::_menu_option(int p_what) { // Could fail with the new changes, start here when searching for bugs in create function shortcut. int m = 1; - for (Set<int>::Element *G = end_nodes.front(); G; G = G->next()) { + for (const int &G : end_nodes) { Ref<VisualScriptReturn> ret_node; ret_node.instantiate(); int ret_id = fn_id + (m++); selections.insert(ret_id); - Vector2 posi = _get_available_pos(false, script->get_node_position(G->get()) + Vector2(80, -100)); + Vector2 posi = _get_available_pos(false, script->get_node_position(G) + Vector2(80, -100)); undo_redo->add_do_method(script.ptr(), "add_node", ret_id, ret_node, posi); undo_redo->add_undo_method(script.ptr(), "remove_node", ret_id); - undo_redo->add_do_method(script.ptr(), "sequence_connect", G->get(), 0, ret_id); + undo_redo->add_do_method(script.ptr(), "sequence_connect", G, 0, ret_id); // Add data outputs from each of the end_nodes. - Ref<VisualScriptNode> vsn = script->get_node(G->get()); + Ref<VisualScriptNode> vsn = script->get_node(G); if (vsn.is_valid() && vsn->get_output_value_port_count() > 0) { ret_node->set_enable_return_value(true); // Use the zeroth data port cause that's the likely one that is planned to be used. ret_node->set_return_type(vsn->get_output_value_port_info(0).type); - undo_redo->add_do_method(script.ptr(), "data_connect", G->get(), 0, ret_id, 0); + undo_redo->add_do_method(script.ptr(), "data_connect", G, 0, ret_id, 0); } } @@ -4331,7 +4338,7 @@ void VisualScriptEditor::_menu_option(int p_what) { // This is likely going to be very slow and I am not sure if I should keep it, // but I hope that it will not be a problem considering that we won't be creating functions so frequently, // and cyclic connections would be a problem but hopefully we won't let them get to this point. -void VisualScriptEditor::_get_ends(int p_node, const List<VisualScript::SequenceConnection> &p_seqs, const Set<int> &p_selected, Set<int> &r_end_nodes) { +void VisualScriptEditor::_get_ends(int p_node, const List<VisualScript::SequenceConnection> &p_seqs, const RBSet<int> &p_selected, RBSet<int> &r_end_nodes) { for (const VisualScript::SequenceConnection &E : p_seqs) { int from = E.from_node; int to = E.to_node; @@ -4575,6 +4582,7 @@ VisualScriptEditor::VisualScriptEditor() { add_child(graph); graph->set_v_size_flags(Control::SIZE_EXPAND_FILL); graph->set_anchors_and_offsets_preset(Control::PRESET_WIDE); + graph->set_show_zoom_label(true); graph->connect("node_selected", callable_mp(this, &VisualScriptEditor::_node_selected)); graph->connect("begin_node_move", callable_mp(this, &VisualScriptEditor::_begin_node_move)); graph->connect("end_node_move", callable_mp(this, &VisualScriptEditor::_end_node_move)); @@ -4837,7 +4845,7 @@ Ref<VisualScriptNode> VisualScriptCustomNodes::create_node_custom(const String & } VisualScriptCustomNodes *VisualScriptCustomNodes::singleton = nullptr; -Map<String, Ref<RefCounted>> VisualScriptCustomNodes::custom_nodes; +HashMap<String, Ref<RefCounted>> VisualScriptCustomNodes::custom_nodes; VisualScriptCustomNodes::VisualScriptCustomNodes() { singleton = this; diff --git a/modules/visual_script/editor/visual_script_editor.h b/modules/visual_script/editor/visual_script_editor.h index e63539ac5b..c7fd8c4a78 100644 --- a/modules/visual_script/editor/visual_script_editor.h +++ b/modules/visual_script/editor/visual_script_editor.h @@ -142,9 +142,9 @@ class VisualScriptEditor : public ScriptEditorBase { Vector<Pair<Variant::Type, String>> args; }; - Map<StringName, Color> node_colors; + HashMap<StringName, Color> node_colors; HashMap<StringName, Ref<StyleBox>> node_styles; - Map<StringName, Variant::Type> base_type_map; + HashMap<StringName, Variant::Type> base_type_map; void _update_graph_connections(); void _update_graph(int p_only_id = -1); @@ -159,11 +159,11 @@ class VisualScriptEditor : public ScriptEditorBase { String _validate_name(const String &p_name) const; struct Clipboard { - Map<int, Ref<VisualScriptNode>> nodes; - Map<int, Vector2> nodes_positions; + HashMap<int, Ref<VisualScriptNode>> nodes; + HashMap<int, Vector2> nodes_positions; - Set<VisualScript::SequenceConnection> sequence_connections; - Set<VisualScript::DataConnection> data_connections; + RBSet<VisualScript::SequenceConnection> sequence_connections; + RBSet<VisualScript::DataConnection> data_connections; }; static Clipboard *clipboard; @@ -213,7 +213,7 @@ class VisualScriptEditor : public ScriptEditorBase { void _end_node_move(); void _move_node(int p_id, const Vector2 &p_to); - void _get_ends(int p_node, const List<VisualScript::SequenceConnection> &p_seqs, const Set<int> &p_selected, Set<int> &r_end_nodes); + void _get_ends(int p_node, const List<VisualScript::SequenceConnection> &p_seqs, const RBSet<int> &p_selected, RBSet<int> &r_end_nodes); void _node_moved(Vector2 p_from, Vector2 p_to, int p_id); void _remove_node(int p_id); @@ -287,7 +287,7 @@ class VisualScriptEditor : public ScriptEditorBase { void _draw_color_over_button(Object *obj, Color p_color); void _button_resource_previewed(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, Variant p_ud); - VisualScriptNode::TypeGuess _guess_output_type(int p_port_action_node, int p_port_action_output, Set<int> &p_visited_nodes); + VisualScriptNode::TypeGuess _guess_output_type(int p_port_action_node, int p_port_action_output, RBSet<int> &p_visited_nodes); void _member_rmb_selected(const Vector2 &p_pos); void _member_option(int p_option); @@ -359,7 +359,7 @@ protected: static void _bind_methods(); static VisualScriptCustomNodes *singleton; - static Map<String, Ref<RefCounted>> custom_nodes; + static HashMap<String, Ref<RefCounted>> custom_nodes; static Ref<VisualScriptNode> create_node_custom(const String &p_name); public: diff --git a/modules/visual_script/editor/visual_script_property_selector.cpp b/modules/visual_script/editor/visual_script_property_selector.cpp index c8549ddb53..7557d12526 100644 --- a/modules/visual_script/editor/visual_script_property_selector.cpp +++ b/modules/visual_script/editor/visual_script_property_selector.cpp @@ -182,7 +182,7 @@ void VisualScriptPropertySelector::select_method_from_base_type(const String &p_ void VisualScriptPropertySelector::select_from_base_type(const String &p_base, const String &p_base_script, bool p_virtuals_only, const bool p_connecting, bool clear_text) { set_title(TTR("Select from base type")); base_type = p_base; - base_script = p_base_script.lstrip("res://").quote(); // filepath to EditorHelp::get_doc_data().name + base_script = p_base_script.trim_prefix("res://").quote(); // filepath to EditorHelp::get_doc_data().name type = Variant::NIL; connecting = p_connecting; @@ -217,7 +217,7 @@ void VisualScriptPropertySelector::select_from_script(const Ref<Script> &p_scrip ERR_FAIL_COND(p_script.is_null()); base_type = p_script->get_instance_base_type(); - base_script = p_script->get_path().lstrip("res://").quote(); // filepath to EditorHelp::get_doc_data().name + base_script = p_script->get_path().trim_prefix("res://").quote(); // filepath to EditorHelp::get_doc_data().name type = Variant::NIL; script = p_script->get_instance_id(); connecting = p_connecting; @@ -312,7 +312,7 @@ void VisualScriptPropertySelector::select_from_instance(Object *p_instance, cons if (p_script == nullptr) { base_script = ""; } else { - base_script = p_script->get_path().lstrip("res://").quote(); // filepath to EditorHelp::get_doc_data().name + base_script = p_script->get_path().trim_prefix("res://").quote(); // filepath to EditorHelp::get_doc_data().name } type = Variant::NIL; @@ -346,7 +346,7 @@ void VisualScriptPropertySelector::select_from_visual_script(const Ref<Script> & if (p_script == nullptr) { base_script = ""; } else { - base_script = p_script->get_path().lstrip("res://").quote(); // filepath to EditorHelp::get_doc_data().name + base_script = p_script->get_path().trim_prefix("res://").quote(); // filepath to EditorHelp::get_doc_data().name } type = Variant::NIL; connecting = false; @@ -726,7 +726,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_match_classes_init() { combined_docs.insert(class_doc.name, class_doc); } } - iterator_doc = combined_docs.front(); + iterator_doc = combined_docs.begin(); return true; } @@ -787,7 +787,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_node_classes_build() { } bool VisualScriptPropertySelector::SearchRunner::_phase_match_classes() { - DocData::ClassDoc &class_doc = iterator_doc->value(); + DocData::ClassDoc &class_doc = iterator_doc->value; if ( (!_is_class_disabled_by_feature_profile(class_doc.name) && !_is_class_disabled_by_scope(class_doc.name)) || _match_visual_script(class_doc)) { @@ -909,13 +909,13 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_match_classes() { } } - iterator_doc = iterator_doc->next(); + ++iterator_doc; return !iterator_doc; } bool VisualScriptPropertySelector::SearchRunner::_phase_class_items_init() { results_tree->clear(); - iterator_match = matches.front(); + iterator_match = matches.begin(); root_item = results_tree->create_item(); class_items.clear(); @@ -928,7 +928,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_class_items() { return true; } - ClassMatch &match = iterator_match->value(); + ClassMatch &match = iterator_match->value; if (search_flags & SEARCH_SHOW_HIERARCHY) { if (match.required()) { @@ -940,12 +940,12 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_class_items() { } } - iterator_match = iterator_match->next(); + ++iterator_match; return !iterator_match; } bool VisualScriptPropertySelector::SearchRunner::_phase_member_items_init() { - iterator_match = matches.front(); + iterator_match = matches.begin(); return true; } @@ -955,7 +955,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_member_items() { return true; } - ClassMatch &match = iterator_match->value(); + ClassMatch &match = iterator_match->value; TreeItem *parent = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item; bool constructor_created = false; @@ -986,7 +986,7 @@ bool VisualScriptPropertySelector::SearchRunner::_phase_member_items() { _create_theme_property_item(parent, match.doc, match.theme_properties[i]); } - iterator_match = iterator_match->next(); + ++iterator_match; return !iterator_match; } diff --git a/modules/visual_script/editor/visual_script_property_selector.h b/modules/visual_script/editor/visual_script_property_selector.h index 90a6265ab7..91d81bba47 100644 --- a/modules/visual_script/editor/visual_script_property_selector.h +++ b/modules/visual_script/editor/visual_script_property_selector.h @@ -179,15 +179,15 @@ class VisualScriptPropertySelector::SearchRunner : public RefCounted { Ref<Texture2D> empty_icon; Color disabled_color; - Map<String, DocData::ClassDoc>::Element *iterator_doc = nullptr; - Map<String, ClassMatch> matches; - Map<String, ClassMatch>::Element *iterator_match = nullptr; + HashMap<String, DocData::ClassDoc>::Iterator iterator_doc; + HashMap<String, ClassMatch> matches; + HashMap<String, ClassMatch>::Iterator iterator_match; TreeItem *root_item = nullptr; - Map<String, TreeItem *> class_items; + HashMap<String, TreeItem *> class_items; TreeItem *matched_item = nullptr; float match_highest_score = 0; - Map<String, DocData::ClassDoc> combined_docs; + HashMap<String, DocData::ClassDoc> combined_docs; List<String> vs_nodes; bool _is_class_disabled_by_feature_profile(const StringName &p_class); diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index c140ceb0b4..7c15651fa2 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -230,12 +230,12 @@ void VisualScript::_node_ports_changed(int p_id) { { List<SequenceConnection> to_remove; - for (Set<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { - if (E->get().from_node == p_id && E->get().from_output >= vsn->get_output_sequence_port_count()) { - to_remove.push_back(E->get()); + for (const SequenceConnection &E : sequence_connections) { + if (E.from_node == p_id && E.from_output >= vsn->get_output_sequence_port_count()) { + to_remove.push_back(E); } - if (E->get().to_node == p_id && !vsn->has_input_sequence_port()) { - to_remove.push_back(E->get()); + if (E.to_node == p_id && !vsn->has_input_sequence_port()) { + to_remove.push_back(E); } } @@ -248,12 +248,12 @@ void VisualScript::_node_ports_changed(int p_id) { { List<DataConnection> to_remove; - for (Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { - if (E->get().from_node == p_id && E->get().from_port >= vsn->get_output_value_port_count()) { - to_remove.push_back(E->get()); + for (const DataConnection &E : data_connections) { + if (E.from_node == p_id && E.from_port >= vsn->get_output_value_port_count()) { + to_remove.push_back(E); } - if (E->get().to_node == p_id && E->get().to_port >= vsn->get_input_value_port_count()) { - to_remove.push_back(E->get()); + if (E.to_node == p_id && E.to_port >= vsn->get_input_value_port_count()) { + to_remove.push_back(E); } } @@ -292,9 +292,9 @@ void VisualScript::remove_node(int p_id) { { List<SequenceConnection> to_remove; - for (Set<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { - if (E->get().from_node == p_id || E->get().to_node == p_id) { - to_remove.push_back(E->get()); + for (const SequenceConnection &E : sequence_connections) { + if (E.from_node == p_id || E.to_node == p_id) { + to_remove.push_back(E); } } @@ -307,9 +307,9 @@ void VisualScript::remove_node(int p_id) { { List<DataConnection> to_remove; - for (Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { - if (E->get().from_node == p_id || E->get().to_node == p_id) { - to_remove.push_back(E->get()); + for (const DataConnection &E : data_connections) { + if (E.from_node == p_id || E.to_node == p_id) { + to_remove.push_back(E); } } @@ -384,8 +384,8 @@ bool VisualScript::has_sequence_connection(int p_from_node, int p_from_output, i } void VisualScript::get_sequence_connection_list(List<SequenceConnection> *r_connection) const { - for (const Set<SequenceConnection>::Element *E = sequence_connections.front(); E; E = E->next()) { - r_connection->push_back(E->get()); + for (const SequenceConnection &E : sequence_connections) { + r_connection->push_back(E); } } @@ -426,8 +426,8 @@ bool VisualScript::has_data_connection(int p_from_node, int p_from_port, int p_t } bool VisualScript::is_input_value_port_connected(int p_node, int p_port) const { - for (const Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { - if (E->get().to_node == p_node && E->get().to_port == p_port) { + for (const DataConnection &E : data_connections) { + if (E.to_node == p_node && E.to_port == p_port) { return true; } } @@ -435,10 +435,10 @@ bool VisualScript::is_input_value_port_connected(int p_node, int p_port) const { } bool VisualScript::get_input_value_port_connection_source(int p_node, int p_port, int *r_node, int *r_port) const { - for (const Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { - if (E->get().to_node == p_node && E->get().to_port == p_port) { - *r_node = E->get().from_node; - *r_port = E->get().from_port; + for (const DataConnection &E : data_connections) { + if (E.to_node == p_node && E.to_port == p_port) { + *r_node = E.from_node; + *r_port = E.from_port; return true; } } @@ -446,8 +446,8 @@ bool VisualScript::get_input_value_port_connection_source(int p_node, int p_port } void VisualScript::get_data_connection_list(List<DataConnection> *r_connection) const { - for (const Set<DataConnection>::Element *E = data_connections.front(); E; E = E->next()) { - r_connection->push_back(E->get()); + for (const DataConnection &E : data_connections) { + r_connection->push_back(E); } } @@ -751,7 +751,7 @@ void VisualScript::_update_placeholders() { return; // No bother if no placeholders. } List<PropertyInfo> pinfo; - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; for (const KeyValue<StringName, Variable> &E : variables) { if (!variables[E.key]._export) { @@ -764,8 +764,8 @@ void VisualScript::_update_placeholders() { values[p.name] = variables[E.key].default_value; } - for (Set<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) { - E->get()->update(pinfo, values); + for (PlaceHolderScriptInstance *E : placeholders) { + E->update(pinfo, values); } } @@ -779,7 +779,7 @@ ScriptInstance *VisualScript::instance_create(Object *p_this) { placeholders.insert(sins); List<PropertyInfo> pinfo; - Map<StringName, Variant> values; + HashMap<StringName, Variant> values; for (const KeyValue<StringName, Variable> &E : variables) { if (!variables[E.key]._export) { @@ -1078,19 +1078,19 @@ Dictionary VisualScript::_get_data() const { d["nodes"] = nds; Array seqconns; - for (const Set<SequenceConnection>::Element *F = sequence_connections.front(); F; F = F->next()) { - seqconns.push_back(F->get().from_node); - seqconns.push_back(F->get().from_output); - seqconns.push_back(F->get().to_node); + for (const SequenceConnection &F : sequence_connections) { + seqconns.push_back(F.from_node); + seqconns.push_back(F.from_output); + seqconns.push_back(F.to_node); } d["sequence_connections"] = seqconns; Array dataconns; - for (const Set<DataConnection>::Element *F = data_connections.front(); F; F = F->next()) { - dataconns.push_back(F->get().from_node); - dataconns.push_back(F->get().from_port); - dataconns.push_back(F->get().to_node); - dataconns.push_back(F->get().to_port); + for (const DataConnection &F : data_connections) { + dataconns.push_back(F.from_node); + dataconns.push_back(F.from_port); + dataconns.push_back(F.to_node); + dataconns.push_back(F.to_port); } d["data_connections"] = dataconns; @@ -1168,10 +1168,10 @@ bool VisualScript::inherits_script(const Ref<Script> &p_script) const { return this == p_script.ptr(); // There is no inheritance in visual scripts, so this is enough. } -Set<int> VisualScript::get_output_sequence_ports_connected(int from_node) { +RBSet<int> VisualScript::get_output_sequence_ports_connected(int from_node) { List<VisualScript::SequenceConnection> *sc = memnew(List<VisualScript::SequenceConnection>); get_sequence_connection_list(sc); - Set<int> connected; + RBSet<int> connected; for (List<VisualScript::SequenceConnection>::Element *E = sc->front(); E; E = E->next()) { if (E->get().from_node == from_node) { connected.insert(E->get().from_output); @@ -1191,23 +1191,23 @@ VisualScript::~VisualScript() { //////////////////////////////////////////// bool VisualScriptInstance::set(const StringName &p_name, const Variant &p_value) { - Map<StringName, Variant>::Element *E = variables.find(p_name); + HashMap<StringName, Variant>::Iterator E = variables.find(p_name); if (!E) { return false; } - E->get() = p_value; + E->value = p_value; return true; } bool VisualScriptInstance::get(const StringName &p_name, Variant &r_ret) const { - const Map<StringName, Variant>::Element *E = variables.find(p_name); + HashMap<StringName, Variant>::ConstIterator E = variables.find(p_name); if (!E) { return false; } - r_ret = E->get(); + r_ret = E->value; return true; } @@ -1315,9 +1315,9 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int } Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p_stack, int p_stack_size, VisualScriptNodeInstance *p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Callable::CallError &r_error) { - Map<StringName, Function>::Element *F = functions.find(p_method); + HashMap<StringName, Function>::Iterator F = functions.find(p_method); ERR_FAIL_COND_V(!F, Variant()); - Function *f = &F->get(); + Function *f = &F->value; // This call goes separate, so it can be yielded and suspended. Variant *variant_stack = (Variant *)p_stack; @@ -1689,7 +1689,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p Variant VisualScriptInstance::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { r_error.error = Callable::CallError::CALL_OK; //ok by default - Map<StringName, Function>::Element *F = functions.find(p_method); + HashMap<StringName, Function>::Iterator F = functions.find(p_method); if (!F) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); @@ -1697,7 +1697,7 @@ Variant VisualScriptInstance::callp(const StringName &p_method, const Variant ** VSDEBUG("CALLING: " + String(p_method)); - Function *f = &F->get(); + Function *f = &F->value; int total_stack_size = 0; @@ -1731,14 +1731,14 @@ Variant VisualScriptInstance::callp(const StringName &p_method, const Variant ** memset(pass_stack, 0, f->pass_stack_size * sizeof(int)); - Map<int, VisualScriptNodeInstance *>::Element *E = instances.find(f->node); + HashMap<int, VisualScriptNodeInstance *>::Iterator E = instances.find(f->node); if (!E) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; ERR_FAIL_V_MSG(Variant(), "No VisualScriptFunction node in function."); } - VisualScriptNodeInstance *node = E->get(); + VisualScriptNodeInstance *node = E->value; if (flow_stack) { flow_stack[0] = node->get_id(); @@ -1839,7 +1839,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o function.pass_stack_size = 0; function.node_count = 0; - Map<StringName, int> local_var_indices; + HashMap<StringName, int> local_var_indices; if (function.node < 0) { VisualScriptLanguage::singleton->debug_break_parse(get_script()->get_path(), 0, "No start node in function: " + String(E.key)); @@ -1861,31 +1861,31 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o max_input_args = MAX(max_input_args, function.argument_count); } // Function nodes graphs. - Set<VisualScript::SequenceConnection> seqconns; - Set<VisualScript::DataConnection> dataconns; - Set<int> node_ids; + RBSet<VisualScript::SequenceConnection> seqconns; + RBSet<VisualScript::DataConnection> dataconns; + RBSet<int> node_ids; node_ids.insert(function.node); { List<int> nd_queue; nd_queue.push_back(function.node); while (!nd_queue.is_empty()) { - for (const Set<VisualScript::SequenceConnection>::Element *F = script->sequence_connections.front(); F; F = F->next()) { - if (nd_queue.front()->get() == F->get().from_node && !node_ids.has(F->get().to_node)) { - nd_queue.push_back(F->get().to_node); - node_ids.insert(F->get().to_node); + for (const VisualScript::SequenceConnection &F : script->sequence_connections) { + if (nd_queue.front()->get() == F.from_node && !node_ids.has(F.to_node)) { + nd_queue.push_back(F.to_node); + node_ids.insert(F.to_node); } - if (nd_queue.front()->get() == F->get().from_node && !seqconns.has(F->get())) { - seqconns.insert(F->get()); + if (nd_queue.front()->get() == F.from_node && !seqconns.has(F)) { + seqconns.insert(F); } } nd_queue.pop_front(); } HashMap<int, HashMap<int, Pair<int, int>>> dc_lut; // :: to -> to_port -> (from, from_port) - for (const Set<VisualScript::DataConnection>::Element *F = script->data_connections.front(); F; F = F->next()) { - dc_lut[F->get().to_node][F->get().to_port] = Pair<int, int>(F->get().from_node, F->get().from_port); + for (const VisualScript::DataConnection &F : script->data_connections) { + dc_lut[F.to_node][F.to_port] = Pair<int, int>(F.from_node, F.from_port); } - for (const Set<int>::Element *F = node_ids.front(); F; F = F->next()) { - nd_queue.push_back(F->get()); + for (const int &F : node_ids) { + nd_queue.push_back(F); } List<int> dc_keys; while (!nd_queue.is_empty()) { @@ -1907,15 +1907,15 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o //Multiple passes are required to set up this complex thing.. //First create the nodes. - for (const Set<int>::Element *F = node_ids.front(); F; F = F->next()) { - Ref<VisualScriptNode> node = script->nodes[F->get()].node; + for (const int &F : node_ids) { + Ref<VisualScriptNode> node = script->nodes[F].node; VisualScriptNodeInstance *instance = node->instantiate(this); // Create instance. ERR_FAIL_COND(!instance); instance->base = node.ptr(); - instance->id = F->get(); + instance->id = F; instance->input_port_count = node->get_input_value_port_count(); instance->input_ports = nullptr; instance->output_port_count = node->get_output_value_port_count(); @@ -1975,14 +1975,14 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o max_input_args = MAX(max_input_args, instance->input_port_count); max_output_args = MAX(max_output_args, instance->output_port_count); - instances[F->get()] = instance; + instances[F] = instance; } function.trash_pos = function.max_stack++; // create pos for trash // Second pass, do data connections. - for (const Set<VisualScript::DataConnection>::Element *F = dataconns.front(); F; F = F->next()) { - VisualScript::DataConnection dc = F->get(); + for (const VisualScript::DataConnection &F : dataconns) { + VisualScript::DataConnection dc = F; ERR_CONTINUE(!instances.has(dc.from_node)); VisualScriptNodeInstance *from = instances[dc.from_node]; ERR_CONTINUE(!instances.has(dc.to_node)); @@ -2008,8 +2008,8 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o } // Third pass, do sequence connections. - for (const Set<VisualScript::SequenceConnection>::Element *F = seqconns.front(); F; F = F->next()) { - VisualScript::SequenceConnection sc = F->get(); + for (const VisualScript::SequenceConnection &F : seqconns) { + VisualScript::SequenceConnection sc = F; ERR_CONTINUE(!instances.has(sc.from_node)); VisualScriptNodeInstance *from = instances[sc.from_node]; ERR_CONTINUE(!instances.has(sc.to_node)); @@ -2022,11 +2022,11 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o //fourth pass: // 1) unassigned input ports to default values // 2) connect unassigned output ports to trash - for (const Set<int>::Element *F = node_ids.front(); F; F = F->next()) { - ERR_CONTINUE(!instances.has(F->get())); + for (const int &F : node_ids) { + ERR_CONTINUE(!instances.has(F)); - Ref<VisualScriptNode> node = script->nodes[F->get()].node; - VisualScriptNodeInstance *instance = instances[F->get()]; + Ref<VisualScriptNode> node = script->nodes[F].node; + VisualScriptNodeInstance *instance = instances[F]; // Connect to default values. for (int i = 0; i < instance->input_port_count; i++) { @@ -2223,7 +2223,7 @@ Ref<Script> VisualScriptLanguage::make_template(const String &p_template, const return script; } -bool VisualScriptLanguage::validate(const String &p_script, const String &p_path, List<String> *r_functions, List<ScriptLanguage::ScriptError> *r_errors, List<ScriptLanguage::Warning> *r_warnings, Set<int> *r_safe_lines) const { +bool VisualScriptLanguage::validate(const String &p_script, const String &p_path, List<String> *r_functions, List<ScriptLanguage::ScriptError> *r_errors, List<ScriptLanguage::Warning> *r_warnings, RBSet<int> *r_safe_lines) const { return false; } diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h index 6b27af15f6..c28ec2268b 100644 --- a/modules/visual_script/visual_script.h +++ b/modules/visual_script/visual_script.h @@ -214,8 +214,8 @@ private: HashMap<int, NodeData> nodes; // Can be a sparse map. - Set<SequenceConnection> sequence_connections; - Set<DataConnection> data_connections; + RBSet<SequenceConnection> sequence_connections; + RBSet<DataConnection> data_connections; Vector2 scroll; @@ -233,15 +233,15 @@ private: HashMap<StringName, Function> functions; HashMap<StringName, Variable> variables; - Map<StringName, Vector<Argument>> custom_signals; + HashMap<StringName, Vector<Argument>> custom_signals; Vector<Multiplayer::RPCConfig> rpc_functions; - Map<Object *, VisualScriptInstance *> instances; + HashMap<Object *, VisualScriptInstance *> instances; bool is_tool_script; #ifdef TOOLS_ENABLED - Set<PlaceHolderScriptInstance *> placeholders; + RBSet<PlaceHolderScriptInstance *> placeholders; // void _update_placeholder(PlaceHolderScriptInstance *p_placeholder); virtual void _placeholder_erased(PlaceHolderScriptInstance *p_placeholder) override; void _update_placeholders(); @@ -283,7 +283,7 @@ public: void sequence_disconnect(int p_from_node, int p_from_output, int p_to_node); bool has_sequence_connection(int p_from_node, int p_from_output, int p_to_node) const; void get_sequence_connection_list(List<SequenceConnection> *r_connection) const; - Set<int> get_output_sequence_ports_connected(int from_node); + RBSet<int> get_output_sequence_ports_connected(int from_node); void data_connect(int p_from_node, int p_from_port, int p_to_node, int p_to_port); void data_disconnect(int p_from_node, int p_from_port, int p_to_node, int p_to_port); @@ -317,7 +317,7 @@ public: void custom_signal_swap_argument(const StringName &p_func, int p_argidx, int p_with_argidx); void remove_custom_signal(const StringName &p_name); void rename_custom_signal(const StringName &p_name, const StringName &p_new_name); - Set<int> get_output_sequence_ports_connected(const String &edited_func, int from_node); + RBSet<int> get_output_sequence_ports_connected(const String &edited_func, int from_node); void get_custom_signal_list(List<StringName> *r_custom_signals) const; @@ -376,8 +376,8 @@ class VisualScriptInstance : public ScriptInstance { Object *owner = nullptr; Ref<VisualScript> script; - Map<StringName, Variant> variables; // Using variable path, not script. - Map<int, VisualScriptNodeInstance *> instances; + HashMap<StringName, Variant> variables; // Using variable path, not script. + HashMap<int, VisualScriptNodeInstance *> instances; struct Function { int node = 0; @@ -389,7 +389,7 @@ class VisualScriptInstance : public ScriptInstance { int argument_count = 0; }; - Map<StringName, Function> functions; + HashMap<StringName, Function> functions; Vector<Variant> default_values; int max_input_args = 0; @@ -415,22 +415,22 @@ public: String to_string(bool *r_valid); bool set_variable(const StringName &p_variable, const Variant &p_value) { - Map<StringName, Variant>::Element *E = variables.find(p_variable); + HashMap<StringName, Variant>::Iterator E = variables.find(p_variable); if (!E) { return false; } - E->get() = p_value; + E->value = p_value; return true; } bool get_variable(const StringName &p_variable, Variant *r_variable) const { - const Map<StringName, Variant>::Element *E = variables.find(p_variable); + HashMap<StringName, Variant>::ConstIterator E = variables.find(p_variable); if (!E) { return false; } - *r_variable = E->get(); + *r_variable = E->value; return true; } @@ -480,7 +480,7 @@ public: typedef Ref<VisualScriptNode> (*VisualScriptNodeRegisterFunc)(const String &p_type); class VisualScriptLanguage : public ScriptLanguage { - Map<String, VisualScriptNodeRegisterFunc> register_funcs; + HashMap<String, VisualScriptNodeRegisterFunc> register_funcs; struct CallLevel { Variant *stack = nullptr; @@ -570,7 +570,7 @@ public: virtual void get_string_delimiters(List<String> *p_delimiters) const override; virtual bool is_using_templates() override; virtual Ref<Script> make_template(const String &p_template, const String &p_class_name, const String &p_base_class_name) const override; - virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, Set<int> *r_safe_lines = nullptr) const override; + virtual bool validate(const String &p_script, const String &p_path = "", List<String> *r_functions = nullptr, List<ScriptLanguage::ScriptError> *r_errors = nullptr, List<ScriptLanguage::Warning> *r_warnings = nullptr, RBSet<int> *r_safe_lines = nullptr) const override; virtual Script *create_script() const override; virtual bool has_named_classes() const override; virtual bool supports_builtin_mode() const override; diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index dbbe74f3d5..ac33526ddc 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -3416,7 +3416,7 @@ VisualScriptConstructor::VisualScriptConstructor() { type = Variant::NIL; } -static Map<String, Pair<Variant::Type, MethodInfo>> constructor_map; +static HashMap<String, Pair<Variant::Type, MethodInfo>> constructor_map; static Ref<VisualScriptNode> create_constructor_node(const String &p_name) { ERR_FAIL_COND_V(!constructor_map.has(p_name), Ref<VisualScriptNode>()); diff --git a/modules/vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp index 03e145216a..7ee6446313 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.cpp +++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp @@ -57,7 +57,7 @@ String ResourceImporterOGGVorbis::get_resource_type() const { return "AudioStreamOGGVorbis"; } -bool ResourceImporterOGGVorbis::get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const { +bool ResourceImporterOGGVorbis::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; } @@ -74,7 +74,7 @@ void ResourceImporterOGGVorbis::get_import_options(const String &p_path, List<Im r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "loop_offset"), 0)); } -Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { +Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { bool loop = p_options["loop"]; float loop_offset = p_options["loop_offset"]; diff --git a/modules/vorbis/resource_importer_ogg_vorbis.h b/modules/vorbis/resource_importer_ogg_vorbis.h index 07291803a1..3b4a68a1fd 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.h +++ b/modules/vorbis/resource_importer_ogg_vorbis.h @@ -52,9 +52,9 @@ public: virtual int get_preset_count() const override; virtual String get_preset_name(int p_idx) const override; virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; - virtual bool get_option_visibility(const String &p_path, const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; + virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; ResourceImporterOGGVorbis(); }; diff --git a/modules/webrtc/webrtc_data_channel.h b/modules/webrtc/webrtc_data_channel.h index eac8f85a84..75e29283ec 100644 --- a/modules/webrtc/webrtc_data_channel.h +++ b/modules/webrtc/webrtc_data_channel.h @@ -33,7 +33,7 @@ #include "core/io/packet_peer.h" -#define WRTC_IN_BUF "network/limits/webrtc/max_channel_in_buffer_kb" +#define WRTC_IN_BUF PNAME("network/limits/webrtc/max_channel_in_buffer_kb") class WebRTCDataChannel : public PacketPeer { GDCLASS(WebRTCDataChannel, PacketPeer); diff --git a/modules/webrtc/webrtc_multiplayer_peer.cpp b/modules/webrtc/webrtc_multiplayer_peer.cpp index 0bc42b104c..6f68b84ad3 100644 --- a/modules/webrtc/webrtc_multiplayer_peer.cpp +++ b/modules/webrtc/webrtc_multiplayer_peer.cpp @@ -140,41 +140,41 @@ void WebRTCMultiplayerPeer::poll() { } void WebRTCMultiplayerPeer::_find_next_peer() { - Map<int, Ref<ConnectedPeer>>::Element *E = peer_map.find(next_packet_peer); + HashMap<int, Ref<ConnectedPeer>>::Iterator E = peer_map.find(next_packet_peer); if (E) { - E = E->next(); + ++E; } // After last. while (E) { - if (!E->get()->connected) { - E = E->next(); + if (!E->value->connected) { + ++E; continue; } - for (const Ref<WebRTCDataChannel> &F : E->get()->channels) { + for (const Ref<WebRTCDataChannel> &F : E->value->channels) { if (F->get_available_packet_count()) { - next_packet_peer = E->key(); + next_packet_peer = E->key; return; } } - E = E->next(); + ++E; } - E = peer_map.front(); + E = peer_map.begin(); // Before last while (E) { - if (!E->get()->connected) { - E = E->next(); + if (!E->value->connected) { + ++E; continue; } - for (const Ref<WebRTCDataChannel> &F : E->get()->channels) { + for (const Ref<WebRTCDataChannel> &F : E->value->channels) { if (F->get_available_packet_count()) { - next_packet_peer = E->key(); + next_packet_peer = E->key; return; } } - if (E->key() == (int)next_packet_peer) { + if (E->key == (int)next_packet_peer) { break; } - E = E->next(); + ++E; } // No packet found next_packet_peer = 0; @@ -354,12 +354,12 @@ Error WebRTCMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer_si } if (target_peer > 0) { - Map<int, Ref<ConnectedPeer>>::Element *E = peer_map.find(target_peer); + HashMap<int, Ref<ConnectedPeer>>::Iterator E = peer_map.find(target_peer); ERR_FAIL_COND_V_MSG(!E, ERR_INVALID_PARAMETER, "Invalid target peer: " + itos(target_peer) + "."); - ERR_FAIL_COND_V_MSG(E->value()->channels.size() <= ch, ERR_INVALID_PARAMETER, vformat("Unable to send packet on channel %d, max channels: %d", ch, E->value()->channels.size())); - ERR_FAIL_COND_V(E->value()->channels[ch].is_null(), ERR_BUG); - return E->value()->channels[ch]->put_packet(p_buffer, p_buffer_size); + ERR_FAIL_COND_V_MSG(E->value->channels.size() <= ch, ERR_INVALID_PARAMETER, vformat("Unable to send packet on channel %d, max channels: %d", ch, E->value->channels.size())); + ERR_FAIL_COND_V(E->value->channels[ch].is_null(), ERR_BUG); + return E->value->channels[ch]->put_packet(p_buffer, p_buffer_size); } else { int exclude = -target_peer; diff --git a/modules/webrtc/webrtc_multiplayer_peer.h b/modules/webrtc/webrtc_multiplayer_peer.h index 6675c67867..97550a3e9d 100644 --- a/modules/webrtc/webrtc_multiplayer_peer.h +++ b/modules/webrtc/webrtc_multiplayer_peer.h @@ -69,7 +69,7 @@ private: int next_packet_peer = 0; bool server_compat = false; - Map<int, Ref<ConnectedPeer>> peer_map; + HashMap<int, Ref<ConnectedPeer>> peer_map; List<Dictionary> channels_config; void _peer_to_dict(Ref<ConnectedPeer> p_connected_peer, Dictionary &r_dict); diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h index 43d9d59f38..db529a669d 100644 --- a/modules/websocket/websocket_multiplayer_peer.h +++ b/modules/websocket/websocket_multiplayer_peer.h @@ -62,7 +62,7 @@ protected: }; List<Packet> _incoming_packets; - Map<int, Ref<WebSocketPeer>> _peer_map; + HashMap<int, Ref<WebSocketPeer>> _peer_map; Packet _current_packet; bool _is_multiplayer = false; diff --git a/modules/websocket/wsl_client.cpp b/modules/websocket/wsl_client.cpp index 894ba7766f..478dbb9d47 100644 --- a/modules/websocket/wsl_client.cpp +++ b/modules/websocket/wsl_client.cpp @@ -113,7 +113,7 @@ bool WSLClient::_verify_headers(String &r_protocol) { ERR_FAIL_COND_V_MSG(req[0] != "HTTP/1.1", false, "Invalid protocol. Got: '" + req[0] + "', expected 'HTTP/1.1'."); ERR_FAIL_COND_V_MSG(req[1] != "101", false, "Invalid status code. Got: '" + req[1] + "', expected '101'."); - Map<String, String> headers; + HashMap<String, String> headers; for (int i = 1; i < len; i++) { Vector<String> header = psa[i].split(":", false, 1); ERR_FAIL_COND_V_MSG(header.size() != 2, false, "Invalid header -> " + psa[i] + "."); diff --git a/modules/websocket/wsl_server.cpp b/modules/websocket/wsl_server.cpp index b58b2e4724..517b9643f8 100644 --- a/modules/websocket/wsl_server.cpp +++ b/modules/websocket/wsl_server.cpp @@ -46,7 +46,7 @@ bool WSLServer::PendingPeer::_parse_request(const Vector<String> p_protocols, St ERR_FAIL_COND_V_MSG(req[0] != "GET" || req[2] != "HTTP/1.1", false, "Invalid method or HTTP version."); r_resource_name = req[1]; - Map<String, String> headers; + HashMap<String, String> headers; for (int i = 1; i < len; i++) { Vector<String> header = psa[i].split(":", false, 1); ERR_FAIL_COND_V_MSG(header.size() != 2, false, "Invalid header -> " + psa[i]); diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h index 96b7b48e48..ac8d6585d3 100644 --- a/platform/android/api/java_class_wrapper.h +++ b/platform/android/api/java_class_wrapper.h @@ -63,7 +63,7 @@ class JavaClass : public RefCounted { ARG_TYPE_MASK = (1 << 16) - 1 }; - Map<StringName, Variant> constant_map; + RBMap<StringName, Variant> constant_map; struct MethodInfo { bool _static = false; @@ -174,7 +174,7 @@ class JavaClass : public RefCounted { bool _call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error, Variant &ret); friend class JavaClassWrapper; - Map<StringName, List<MethodInfo>> methods; + HashMap<StringName, List<MethodInfo>> methods; jclass _class; #endif @@ -207,7 +207,7 @@ class JavaClassWrapper : public Object { GDCLASS(JavaClassWrapper, Object); #ifdef ANDROID_ENABLED - Map<String, Ref<JavaClass>> class_cache; + RBMap<String, Ref<JavaClass>> class_cache; friend class JavaClass; jclass activityClass; jmethodID findClass; diff --git a/platform/android/api/jni_singleton.h b/platform/android/api/jni_singleton.h index 74ca10e5e2..8a0e021157 100644 --- a/platform/android/api/jni_singleton.h +++ b/platform/android/api/jni_singleton.h @@ -48,13 +48,13 @@ class JNISingleton : public Object { }; jobject instance; - Map<StringName, MethodData> method_map; + RBMap<StringName, MethodData> method_map; #endif public: virtual Variant callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override { #ifdef ANDROID_ENABLED - Map<StringName, MethodData>::Element *E = method_map.find(p_method); + RBMap<StringName, MethodData>::Element *E = method_map.find(p_method); // Check the method we're looking for is in the JNISingleton map and that // the arguments match. diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 5aef64943b..18f037ed56 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -207,9 +207,9 @@ static const char *SPLASH_CONFIG_PATH = "res://android/build/res/drawable/splash static const char *GDNATIVE_LIBS_PATH = "res://android/build/libs/gdnativelibs.json"; static const int icon_densities_count = 6; -static const char *launcher_icon_option = "launcher_icons/main_192x192"; -static const char *launcher_adaptive_icon_foreground_option = "launcher_icons/adaptive_foreground_432x432"; -static const char *launcher_adaptive_icon_background_option = "launcher_icons/adaptive_background_432x432"; +static const char *launcher_icon_option = PNAME("launcher_icons/main_192x192"); +static const char *launcher_adaptive_icon_foreground_option = PNAME("launcher_icons/adaptive_foreground_432x432"); +static const char *launcher_adaptive_icon_background_option = PNAME("launcher_icons/adaptive_background_432x432"); static const LauncherIcon launcher_icons[icon_densities_count] = { { "res/mipmap-xxxhdpi-v4/icon.png", 192 }, @@ -1697,7 +1697,7 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio Vector<PluginConfigAndroid> plugins_configs = get_plugins(); for (int i = 0; i < plugins_configs.size(); i++) { print_verbose("Found Android plugin " + plugins_configs[i].name); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + plugins_configs[i].name), false)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("plugins"), plugins_configs[i].name)), false)); } plugins_changed.clear(); @@ -1707,7 +1707,7 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio // All Android devices supporting Vulkan run 64-bit Android, // so there is usually no point in exporting for 32-bit Android. const bool is_default = abi == "arm64-v8a"; - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "architectures/" + abi), is_default)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("architectures"), abi)), is_default)); } r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/debug", PROPERTY_HINT_GLOBAL_FILE, "*.keystore,*.jks"), "")); @@ -1758,7 +1758,7 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio const char **perms = android_perms; while (*perms) { - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "permissions/" + String(*perms).to_lower()), false)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("permissions"), String(*perms).to_lower())), false)); perms++; } } @@ -3067,7 +3067,7 @@ void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features r_features->push_back("android"); } -void EditorExportPlatformAndroid::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) { +void EditorExportPlatformAndroid::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) { } EditorExportPlatformAndroid::EditorExportPlatformAndroid() { diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h index 0f267cf13a..c857850007 100644 --- a/platform/android/export/export_plugin.h +++ b/platform/android/export/export_plugin.h @@ -228,7 +228,7 @@ public: virtual void get_platform_features(List<String> *r_features) override; - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override; EditorExportPlatformAndroid(); diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp index 1805807f90..349c3a3ab3 100644 --- a/platform/android/java_class_wrapper.cpp +++ b/platform/android/java_class_wrapper.cpp @@ -34,7 +34,7 @@ #include "thread_jandroid.h" bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error, Variant &ret) { - Map<StringName, List<MethodInfo>>::Element *M = methods.find(p_method); + HashMap<StringName, List<MethodInfo>>::Iterator M = methods.find(p_method); if (!M) { return false; } @@ -43,7 +43,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, ERR_FAIL_COND_V(env == nullptr, false); MethodInfo *method = nullptr; - for (MethodInfo &E : M->get()) { + for (MethodInfo &E : M->value) { if (!p_instance && !E._static) { r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL; continue; diff --git a/platform/android/tts_android.cpp b/platform/android/tts_android.cpp index 528878f14e..d3f3773344 100644 --- a/platform/android/tts_android.cpp +++ b/platform/android/tts_android.cpp @@ -46,7 +46,7 @@ jmethodID TTS_Android::_pause_speaking = 0; jmethodID TTS_Android::_resume_speaking = 0; jmethodID TTS_Android::_stop_speaking = 0; -Map<int, Char16String> TTS_Android::ids; +HashMap<int, Char16String> TTS_Android::ids; void TTS_Android::setup(jobject p_tts) { JNIEnv *env = get_jni_env(); @@ -175,8 +175,8 @@ void TTS_Android::resume() { } void TTS_Android::stop() { - for (Map<int, Char16String>::Element *E = ids.front(); E; E = E->next()) { - DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, E->key()); + for (const KeyValue<int, Char16String> &E : ids) { + DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, E.key); } ids.clear(); diff --git a/platform/android/tts_android.h b/platform/android/tts_android.h index efeed94856..bc0cdb8d55 100644 --- a/platform/android/tts_android.h +++ b/platform/android/tts_android.h @@ -49,7 +49,7 @@ class TTS_Android { static jmethodID _resume_speaking; static jmethodID _stop_speaking; - static Map<int, Char16String> ids; + static HashMap<int, Char16String> ids; public: static void setup(jobject p_tts); diff --git a/platform/iphone/export/export_plugin.cpp b/platform/iphone/export/export_plugin.cpp index bf7cf6ee81..f28d014c07 100644 --- a/platform/iphone/export/export_plugin.cpp +++ b/platform/iphone/export/export_plugin.cpp @@ -58,18 +58,18 @@ struct LoadingScreenInfo { }; static const LoadingScreenInfo loading_screen_infos[] = { - { "landscape_launch_screens/iphone_2436x1125", "Default-Landscape-X.png", 2436, 1125, false }, - { "landscape_launch_screens/iphone_2208x1242", "Default-Landscape-736h@3x.png", 2208, 1242, false }, - { "landscape_launch_screens/ipad_1024x768", "Default-Landscape.png", 1024, 768, false }, - { "landscape_launch_screens/ipad_2048x1536", "Default-Landscape@2x.png", 2048, 1536, false }, - - { "portrait_launch_screens/iphone_640x960", "Default-480h@2x.png", 640, 960, true }, - { "portrait_launch_screens/iphone_640x1136", "Default-568h@2x.png", 640, 1136, true }, - { "portrait_launch_screens/iphone_750x1334", "Default-667h@2x.png", 750, 1334, true }, - { "portrait_launch_screens/iphone_1125x2436", "Default-Portrait-X.png", 1125, 2436, true }, - { "portrait_launch_screens/ipad_768x1024", "Default-Portrait.png", 768, 1024, true }, - { "portrait_launch_screens/ipad_1536x2048", "Default-Portrait@2x.png", 1536, 2048, true }, - { "portrait_launch_screens/iphone_1242x2208", "Default-Portrait-736h@3x.png", 1242, 2208, true } + { PNAME("landscape_launch_screens/iphone_2436x1125"), "Default-Landscape-X.png", 2436, 1125, false }, + { PNAME("landscape_launch_screens/iphone_2208x1242"), "Default-Landscape-736h@3x.png", 2208, 1242, false }, + { PNAME("landscape_launch_screens/ipad_1024x768"), "Default-Landscape.png", 1024, 768, false }, + { PNAME("landscape_launch_screens/ipad_2048x1536"), "Default-Landscape@2x.png", 2048, 1536, false }, + + { PNAME("portrait_launch_screens/iphone_640x960"), "Default-480h@2x.png", 640, 960, true }, + { PNAME("portrait_launch_screens/iphone_640x1136"), "Default-568h@2x.png", 640, 1136, true }, + { PNAME("portrait_launch_screens/iphone_750x1334"), "Default-667h@2x.png", 750, 1334, true }, + { PNAME("portrait_launch_screens/iphone_1125x2436"), "Default-Portrait-X.png", 1125, 2436, true }, + { PNAME("portrait_launch_screens/ipad_768x1024"), "Default-Portrait.png", 768, 1024, true }, + { PNAME("portrait_launch_screens/ipad_1536x2048"), "Default-Portrait@2x.png", 1536, 2048, true }, + { PNAME("portrait_launch_screens/iphone_1242x2208"), "Default-Portrait-736h@3x.png", 1242, 2208, true } }; void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) { @@ -78,7 +78,7 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) Vector<ExportArchitecture> architectures = _get_supported_architectures(); for (int i = 0; i < architectures.size(); ++i) { - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "architectures/" + architectures[i].name), architectures[i].is_default)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("architectures"), architectures[i].name)), architectures[i].is_default)); } r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/app_store_team_id"), "")); @@ -99,10 +99,10 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) Vector<PluginConfigIOS> found_plugins = get_plugins(); for (int i = 0; i < found_plugins.size(); i++) { - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + found_plugins[i].name), false)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("plugins"), found_plugins[i].name)), false)); } - Set<String> plist_keys; + RBSet<String> plist_keys; for (int i = 0; i < found_plugins.size(); i++) { // Editable plugin plist values @@ -1178,7 +1178,7 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset> Vector<String> added_embedded_dependenciy_names; HashMap<String, String> plist_values; - Set<String> plugin_linker_flags; + RBSet<String> plugin_linker_flags; Error err; @@ -1350,8 +1350,8 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset> // Update Linker Flag Values { String result_linker_flags = " "; - for (Set<String>::Element *E = plugin_linker_flags.front(); E; E = E->next()) { - const String &flag = E->get(); + for (const String &E : plugin_linker_flags) { + const String &flag = E; if (flag.length() == 0) { continue; @@ -1453,7 +1453,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p bool found_library = false; const String project_file = "godot_ios.xcodeproj/project.pbxproj"; - Set<String> files_to_parse; + RBSet<String> files_to_parse; files_to_parse.insert("godot_ios/godot_ios-Info.plist"); files_to_parse.insert(project_file); files_to_parse.insert("godot_ios/export_options.plist"); diff --git a/platform/iphone/export/export_plugin.h b/platform/iphone/export/export_plugin.h index 2c6faed691..10a17c4bf1 100644 --- a/platform/iphone/export/export_plugin.h +++ b/platform/iphone/export/export_plugin.h @@ -204,7 +204,7 @@ public: r_features->push_back("ios"); } - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override { + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override { } EditorExportPlatformIOS(); diff --git a/platform/iphone/ios.mm b/platform/iphone/ios.mm index cca28cc055..79baae028a 100644 --- a/platform/iphone/ios.mm +++ b/platform/iphone/ios.mm @@ -77,7 +77,7 @@ void iOS::vibrate_haptic_engine(float p_duration_seconds) API_AVAILABLE(ios(13)) NSDictionary *hapticDict = @{ CHHapticPatternKeyPattern : @[ @{CHHapticPatternKeyEvent : @{ - CHHapticPatternKeyEventType : CHHapticEventTypeHapticTransient, + CHHapticPatternKeyEventType : CHHapticEventTypeHapticContinuous, CHHapticPatternKeyTime : @(CHHapticTimeImmediate), CHHapticPatternKeyEventDuration : @(p_duration_seconds) }, diff --git a/platform/iphone/tts_ios.h b/platform/iphone/tts_ios.h index 3fac762b62..064316b0b2 100644 --- a/platform/iphone/tts_ios.h +++ b/platform/iphone/tts_ios.h @@ -39,13 +39,13 @@ #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @interface TTS_IOS : NSObject <AVSpeechSynthesizerDelegate> { bool speaking; - Map<id, int> ids; + HashMap<id, int> ids; AVSpeechSynthesizer *av_synth; List<DisplayServer::TTSUtterance> queue; diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp index 312707c3b5..a96c539a1f 100644 --- a/platform/javascript/display_server_javascript.cpp +++ b/platform/javascript/display_server_javascript.cpp @@ -244,9 +244,9 @@ const char *DisplayServerJavaScript::godot2dom_cursor(DisplayServer::CursorShape case DisplayServer::CURSOR_CROSS: return "crosshair"; case DisplayServer::CURSOR_WAIT: - return "progress"; - case DisplayServer::CURSOR_BUSY: return "wait"; + case DisplayServer::CURSOR_BUSY: + return "progress"; case DisplayServer::CURSOR_DRAG: return "grab"; case DisplayServer::CURSOR_CAN_DROP: @@ -326,8 +326,8 @@ void DisplayServerJavaScript::tts_resume() { } void DisplayServerJavaScript::tts_stop() { - for (Map<int, CharString>::Element *E = utterance_ids.front(); E; E = E->next()) { - tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, E->key()); + for (const KeyValue<int, CharString> &E : utterance_ids) { + tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, E.key); } utterance_ids.clear(); godot_js_tts_stop(); diff --git a/platform/javascript/display_server_javascript.h b/platform/javascript/display_server_javascript.h index 623546bbd0..79b0fbb652 100644 --- a/platform/javascript/display_server_javascript.h +++ b/platform/javascript/display_server_javascript.h @@ -55,7 +55,7 @@ private: EMSCRIPTEN_WEBGL_CONTEXT_HANDLE webgl_ctx = 0; #endif - Map<int, CharString> utterance_ids; + HashMap<int, CharString> utterance_ids; WindowMode window_mode = WINDOW_MODE_WINDOWED; ObjectID window_attached_instance_id = {}; diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp index 9576256d03..3334e7394b 100644 --- a/platform/javascript/export/export_plugin.cpp +++ b/platform/javascript/export/export_plugin.cpp @@ -93,7 +93,7 @@ Error EditorExportPlatformJavaScript::_write_or_error(const uint8_t *p_content, return OK; } -void EditorExportPlatformJavaScript::_replace_strings(Map<String, String> p_replaces, Vector<uint8_t> &r_template) { +void EditorExportPlatformJavaScript::_replace_strings(HashMap<String, String> p_replaces, Vector<uint8_t> &r_template) { String str_template = String::utf8(reinterpret_cast<const char *>(r_template.ptr()), r_template.size()); String out; Vector<String> lines = str_template.split("\n"); @@ -145,7 +145,7 @@ void EditorExportPlatformJavaScript::_fix_html(Vector<uint8_t> &p_html, const Re // Replaces HTML string const String str_config = Variant(config).to_json_string(); const String custom_head_include = p_preset->get("html/head_include"); - Map<String, String> replaces; + HashMap<String, String> replaces; replaces["$GODOT_URL"] = p_name + ".js"; replaces["$GODOT_PROJECT_NAME"] = ProjectSettings::get_singleton()->get_setting("application/config/name"); replaces["$GODOT_HEAD_INCLUDE"] = head_include + custom_head_include; @@ -196,7 +196,7 @@ Error EditorExportPlatformJavaScript::_build_pwa(const Ref<EditorExportPreset> & const String dir = p_path.get_base_dir(); const String name = p_path.get_file().get_basename(); const ExportMode mode = (ExportMode)(int)p_preset->get("variant/export_type"); - Map<String, String> replaces; + HashMap<String, String> replaces; replaces["@GODOT_VERSION@"] = String::num_int64(OS::get_singleton()->get_unix_time()) + "|" + String::num_int64(OS::get_singleton()->get_ticks_usec()); replaces["@GODOT_NAME@"] = proj_name.substr(0, 16); replaces["@GODOT_OFFLINE_PAGE@"] = name + ".offline.html"; diff --git a/platform/javascript/export/export_plugin.h b/platform/javascript/export/export_plugin.h index d17fd2f674..d38d6e7073 100644 --- a/platform/javascript/export/export_plugin.h +++ b/platform/javascript/export/export_plugin.h @@ -104,7 +104,7 @@ class EditorExportPlatformJavaScript : public EditorExportPlatform { } Error _extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa); - void _replace_strings(Map<String, String> p_replaces, Vector<uint8_t> &r_template); + void _replace_strings(HashMap<String, String> p_replaces, Vector<uint8_t> &r_template); void _fix_html(Vector<uint8_t> &p_html, const Ref<EditorExportPreset> &p_preset, const String &p_name, bool p_debug, int p_flags, const Vector<SharedObject> p_shared_objects, const Dictionary &p_file_sizes); Error _add_manifest_icon(const String &p_path, const String &p_icon, int p_size, Array &r_arr); Error _build_pwa(const Ref<EditorExportPreset> &p_preset, const String p_path, const Vector<SharedObject> &p_shared_objects); @@ -138,7 +138,7 @@ public: r_features->push_back(get_os_name().to_lower()); } - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override { + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override { } String get_debug_protocol() const override { return "ws://"; } diff --git a/platform/javascript/export/export_server.h b/platform/javascript/export/export_server.h index f77ac3d1ad..a831b76076 100644 --- a/platform/javascript/export/export_server.h +++ b/platform/javascript/export/export_server.h @@ -41,7 +41,7 @@ class EditorHTTPServer : public RefCounted { private: Ref<TCPServer> server; - Map<String, String> mimes; + HashMap<String, String> mimes; Ref<StreamPeerTCP> tcp; Ref<StreamPeerSSL> ssl; Ref<StreamPeer> peer; diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index 9f53b31567..5829711698 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -2360,10 +2360,10 @@ void DisplayServerX11::cursor_set_custom_image(const Ref<Resource> &p_cursor, Cu _THREAD_SAFE_METHOD_ if (p_cursor.is_valid()) { - Map<CursorShape, Vector<Variant>>::Element *cursor_c = cursors_cache.find(p_shape); + HashMap<CursorShape, Vector<Variant>>::Iterator cursor_c = cursors_cache.find(p_shape); if (cursor_c) { - if (cursor_c->get()[0] == p_cursor && cursor_c->get()[1] == p_hotspot) { + if (cursor_c->value[0] == p_cursor && cursor_c->value[1] == p_hotspot) { cursor_set_shape(p_shape); return; } @@ -3456,9 +3456,9 @@ void DisplayServerX11::process_events() { } if (XIMaskIsSet(raw_event->valuators.mask, VALUATOR_PRESSURE)) { - Map<int, Vector2>::Element *pen_pressure = xi.pen_pressure_range.find(device_id); + HashMap<int, Vector2>::Iterator pen_pressure = xi.pen_pressure_range.find(device_id); if (pen_pressure) { - Vector2 pen_pressure_range = pen_pressure->value(); + Vector2 pen_pressure_range = pen_pressure->value; if (pen_pressure_range != Vector2()) { xi.pressure_supported = true; xi.pressure = (*values - pen_pressure_range[0]) / @@ -3470,9 +3470,9 @@ void DisplayServerX11::process_events() { } if (XIMaskIsSet(raw_event->valuators.mask, VALUATOR_TILTX)) { - Map<int, Vector2>::Element *pen_tilt_x = xi.pen_tilt_x_range.find(device_id); + HashMap<int, Vector2>::Iterator pen_tilt_x = xi.pen_tilt_x_range.find(device_id); if (pen_tilt_x) { - Vector2 pen_tilt_x_range = pen_tilt_x->value(); + Vector2 pen_tilt_x_range = pen_tilt_x->value; if (pen_tilt_x_range[0] != 0 && *values < 0) { xi.tilt.x = *values / -pen_tilt_x_range[0]; } else if (pen_tilt_x_range[1] != 0) { @@ -3484,9 +3484,9 @@ void DisplayServerX11::process_events() { } if (XIMaskIsSet(raw_event->valuators.mask, VALUATOR_TILTY)) { - Map<int, Vector2>::Element *pen_tilt_y = xi.pen_tilt_y_range.find(device_id); + HashMap<int, Vector2>::Iterator pen_tilt_y = xi.pen_tilt_y_range.find(device_id); if (pen_tilt_y) { - Vector2 pen_tilt_y_range = pen_tilt_y->value(); + Vector2 pen_tilt_y_range = pen_tilt_y->value; if (pen_tilt_y_range[0] != 0 && *values < 0) { xi.tilt.y = *values / -pen_tilt_y_range[0]; } else if (pen_tilt_y_range[1] != 0) { @@ -3508,11 +3508,11 @@ void DisplayServerX11::process_events() { xi.raw_pos.x = rel_x; xi.raw_pos.y = rel_y; - Map<int, Vector2>::Element *abs_info = xi.absolute_devices.find(device_id); + HashMap<int, Vector2>::Iterator abs_info = xi.absolute_devices.find(device_id); if (abs_info) { // Absolute mode device - Vector2 mult = abs_info->value(); + Vector2 mult = abs_info->value; xi.relative_motion.x += (xi.raw_pos.x - xi.old_raw_pos.x) * mult.x; xi.relative_motion.y += (xi.raw_pos.y - xi.old_raw_pos.y) * mult.y; @@ -3557,21 +3557,21 @@ void DisplayServerX11::process_events() { } break; case XI_TouchUpdate: { - Map<int, Vector2>::Element *curr_pos_elem = xi.state.find(index); + HashMap<int, Vector2>::Iterator curr_pos_elem = xi.state.find(index); if (!curr_pos_elem) { // Defensive break; } - if (curr_pos_elem->value() != pos) { + if (curr_pos_elem->value != pos) { Ref<InputEventScreenDrag> sd; sd.instantiate(); sd->set_window_id(window_id); sd->set_index(index); sd->set_position(pos); - sd->set_relative(pos - curr_pos_elem->value()); + sd->set_relative(pos - curr_pos_elem->value); Input::get_singleton()->parse_input_event(sd); - curr_pos_elem->value() = pos; + curr_pos_elem->value = pos; } } break; #endif diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h index ee47d1a12c..66941fbe29 100644 --- a/platform/linuxbsd/display_server_x11.h +++ b/platform/linuxbsd/display_server_x11.h @@ -137,7 +137,7 @@ class DisplayServerX11 : public DisplayServer { Callable drop_files_callback; WindowID transient_parent = INVALID_WINDOW_ID; - Set<WindowID> transient_children; + RBSet<WindowID> transient_children; ObjectID instance_id; @@ -159,7 +159,7 @@ class DisplayServerX11 : public DisplayServer { unsigned int focus_order = 0; }; - Map<WindowID, WindowData> windows; + HashMap<WindowID, WindowData> windows; unsigned int last_mouse_monitor_mask = 0; Vector2i last_mouse_monitor_pos; @@ -197,12 +197,12 @@ class DisplayServerX11 : public DisplayServer { struct { int opcode; Vector<int> touch_devices; - Map<int, Vector2> absolute_devices; - Map<int, Vector2> pen_pressure_range; - Map<int, Vector2> pen_tilt_x_range; - Map<int, Vector2> pen_tilt_y_range; + HashMap<int, Vector2> absolute_devices; + HashMap<int, Vector2> pen_pressure_range; + HashMap<int, Vector2> pen_tilt_x_range; + HashMap<int, Vector2> pen_tilt_y_range; XIEventMask all_event_mask; - Map<int, Vector2> state; + HashMap<int, Vector2> state; double pressure; bool pressure_supported; Vector2 tilt; @@ -241,7 +241,7 @@ class DisplayServerX11 : public DisplayServer { Cursor cursors[CURSOR_MAX]; Cursor null_cursor; CursorShape current_cursor = CURSOR_ARROW; - Map<CursorShape, Vector<Variant>> cursors_cache; + HashMap<CursorShape, Vector<Variant>> cursors_cache; bool layered_window = false; diff --git a/platform/linuxbsd/export/export_plugin.h b/platform/linuxbsd/export/export_plugin.h index f46fc68e1d..9ae5cf827a 100644 --- a/platform/linuxbsd/export/export_plugin.h +++ b/platform/linuxbsd/export/export_plugin.h @@ -38,7 +38,7 @@ #include "scene/resources/texture.h" class EditorExportPlatformLinuxBSD : public EditorExportPlatformPC { - Map<String, String> extensions; + HashMap<String, String> extensions; Error _export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path); public: diff --git a/platform/linuxbsd/tts_linux.h b/platform/linuxbsd/tts_linux.h index 4d39af8970..4e3f348ae4 100644 --- a/platform/linuxbsd/tts_linux.h +++ b/platform/linuxbsd/tts_linux.h @@ -35,7 +35,7 @@ #include "core/os/thread_safe.h" #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @@ -49,7 +49,7 @@ class TTS_Linux { bool speaking = false; bool paused = false; int last_msg_id = -1; - Map<int, int> ids; + HashMap<int, int> ids; Thread init_thread; diff --git a/platform/osx/display_server_osx.h b/platform/osx/display_server_osx.h index 538a9bc04c..76df8b400a 100644 --- a/platform/osx/display_server_osx.h +++ b/platform/osx/display_server_osx.h @@ -97,7 +97,7 @@ public: WindowID transient_parent = INVALID_WINDOW_ID; bool exclusive = false; - Set<WindowID> transient_children; + RBSet<WindowID> transient_children; bool layered_window = false; bool fullscreen = false; @@ -125,7 +125,7 @@ private: NSMenu *apple_menu = nullptr; NSMenu *dock_menu = nullptr; - Map<String, NSMenu *> submenu; + HashMap<String, NSMenu *> submenu; struct WarpEvent { NSTimeInterval timestamp; @@ -167,9 +167,9 @@ private: CursorShape cursor_shape = CURSOR_ARROW; NSCursor *cursors[CURSOR_MAX]; - Map<CursorShape, Vector<Variant>> cursors_cache; + HashMap<CursorShape, Vector<Variant>> cursors_cache; - Map<WindowID, WindowData> windows; + HashMap<WindowID, WindowData> windows; const NSMenu *_get_menu_root(const String &p_menu_root) const; NSMenu *_get_menu_root(const String &p_menu_root); diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index a16bd2e8de..536751432b 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -1071,9 +1071,9 @@ String DisplayServerOSX::global_menu_get_item_submenu(const String &p_menu_root, if (menu_item) { const NSMenu *sub_menu = [menu_item submenu]; if (sub_menu) { - for (Map<String, NSMenu *>::Element *E = submenu.front(); E; E = E->next()) { - if (E->get() == sub_menu) { - return E->key(); + for (const KeyValue<String, NSMenu *> &E : submenu) { + if (E.value == sub_menu) { + return E.key; } } } @@ -1901,8 +1901,8 @@ Vector<DisplayServer::WindowID> DisplayServerOSX::get_window_list() const { _THREAD_SAFE_METHOD_ Vector<int> ret; - for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { - ret.push_back(E->key()); + for (const KeyValue<WindowID, WindowData> &E : windows) { + ret.push_back(E.key); } return ret; } @@ -2468,8 +2468,8 @@ bool DisplayServerOSX::window_can_draw(WindowID p_window) const { bool DisplayServerOSX::can_any_window_draw() const { _THREAD_SAFE_METHOD_ - for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { - if (window_get_mode(E->key()) != WINDOW_MODE_MINIMIZED) { + for (const KeyValue<WindowID, WindowData> &E : windows) { + if (window_get_mode(E.key) != WINDOW_MODE_MINIMIZED) { return true; } } @@ -2505,9 +2505,9 @@ DisplayServer::WindowID DisplayServerOSX::get_window_at_screen_position(const Po position /= screen_get_max_scale(); NSInteger wnum = [NSWindow windowNumberAtPoint:NSMakePoint(position.x, position.y) belowWindowWithWindowNumber:0 /*topmost*/]; - for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { - if ([E->get().window_object windowNumber] == wnum) { - return E->key(); + for (const KeyValue<WindowID, WindowData> &E : windows) { + if ([E.value.window_object windowNumber] == wnum) { + return E.key; } } return INVALID_WINDOW_ID; @@ -2678,10 +2678,10 @@ void DisplayServerOSX::cursor_set_custom_image(const Ref<Resource> &p_cursor, Cu _THREAD_SAFE_METHOD_ if (p_cursor.is_valid()) { - Map<CursorShape, Vector<Variant>>::Element *cursor_c = cursors_cache.find(p_shape); + HashMap<CursorShape, Vector<Variant>>::Iterator cursor_c = cursors_cache.find(p_shape); if (cursor_c) { - if (cursor_c->get()[0] == p_cursor && cursor_c->get()[1] == p_hotspot) { + if (cursor_c->value[0] == p_cursor && cursor_c->value[1] == p_hotspot) { cursor_set_shape(p_shape); return; } @@ -2886,8 +2886,8 @@ void DisplayServerOSX::process_events() { Input::get_singleton()->flush_buffered_events(); } - for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) { - WindowData &wd = E->get(); + for (KeyValue<WindowID, WindowData> &E : windows) { + WindowData &wd = E.value; if (wd.mpath.size() > 0) { update_mouse_pos(wd, [wd.window_object mouseLocationOutsideOfEventStream]); if (Geometry2D::is_point_in_polygon(wd.mouse_pos, wd.mpath)) { @@ -3266,11 +3266,11 @@ DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode DisplayServerOSX::~DisplayServerOSX() { // Destroy all windows. - for (Map<WindowID, WindowData>::Element *E = windows.front(); E;) { - Map<WindowID, WindowData>::Element *F = E; - E = E->next(); - [F->get().window_object setContentView:nil]; - [F->get().window_object close]; + for (HashMap<WindowID, WindowData>::Iterator E = windows.begin(); E;) { + HashMap<WindowID, WindowData>::Iterator F = E; + ++E; + [F->value.window_object setContentView:nil]; + [F->value.window_object close]; } // Destroy drivers. diff --git a/platform/osx/export/export_plugin.cpp b/platform/osx/export/export_plugin.cpp index 465925524c..9309b9f89b 100644 --- a/platform/osx/export/export_plugin.cpp +++ b/platform/osx/export/export_plugin.cpp @@ -51,7 +51,7 @@ void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset> r_features->push_back("64"); } -bool EditorExportPlatformOSX::get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool EditorExportPlatformOSX::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const { // These options are not supported by built-in codesign, used on non macOS host. if (!OS::get_singleton()->has_feature("macos")) { if (p_option == "codesign/identity" || p_option == "codesign/timestamp" || p_option == "codesign/hardened_runtime" || p_option == "codesign/custom_options" || p_option.begins_with("notarization/")) { diff --git a/platform/osx/export/export_plugin.h b/platform/osx/export/export_plugin.h index 013e5eaa71..c90c5c29b2 100644 --- a/platform/osx/export/export_plugin.h +++ b/platform/osx/export/export_plugin.h @@ -101,7 +101,7 @@ class EditorExportPlatformOSX : public EditorExportPlatform { protected: virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override; virtual void get_export_options(List<ExportOption> *r_options) override; - virtual bool get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const override; public: virtual String get_name() const override { return "macOS"; } @@ -127,7 +127,7 @@ public: r_features->push_back("macos"); } - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override { + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override { } EditorExportPlatformOSX(); diff --git a/platform/osx/export/plist.cpp b/platform/osx/export/plist.cpp index d089233b80..36de9dd34b 100644 --- a/platform/osx/export/plist.cpp +++ b/platform/osx/export/plist.cpp @@ -140,10 +140,11 @@ size_t PListNode::get_asn1_size(uint8_t p_len_octets) const { } break; case PList::PLNodeType::PL_NODE_TYPE_DICT: { size_t size = 0; - for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) { + + for (const KeyValue<String, Ref<PListNode>> &E : data_dict) { size += 1 + _asn1_size_len(p_len_octets); // Sequence. - size += 1 + _asn1_size_len(p_len_octets) + it->key().utf8().length(); //Key. - size += 1 + _asn1_size_len(p_len_octets) + it->value()->get_asn1_size(p_len_octets); // Value. + size += 1 + _asn1_size_len(p_len_octets) + E.key.utf8().length(); //Key. + size += 1 + _asn1_size_len(p_len_octets) + E.value->get_asn1_size(p_len_octets); // Value. } return size; } break; @@ -225,13 +226,13 @@ bool PListNode::store_asn1(PackedByteArray &p_stream, uint8_t p_len_octets) cons case PList::PLNodeType::PL_NODE_TYPE_DICT: { p_stream.push_back(0x31); // Set. store_asn1_size(p_stream, p_len_octets); - for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) { - CharString cs = it->key().utf8(); + for (const KeyValue<String, Ref<PListNode>> &E : data_dict) { + CharString cs = E.key.utf8(); uint32_t size = cs.length(); // Sequence. p_stream.push_back(0x30); - uint32_t seq_size = 2 * (1 + _asn1_size_len(p_len_octets)) + size + it->value()->get_asn1_size(p_len_octets); + uint32_t seq_size = 2 * (1 + _asn1_size_len(p_len_octets)) + size + E.value->get_asn1_size(p_len_octets); if (p_len_octets > 1) { p_stream.push_back(0x80 + p_len_octets); } @@ -252,7 +253,7 @@ bool PListNode::store_asn1(PackedByteArray &p_stream, uint8_t p_len_octets) cons p_stream.push_back(cs[i]); } // Value. - valid = valid && it->value()->store_asn1(p_stream, p_len_octets); + valid = valid && E.value->store_asn1(p_stream, p_len_octets); } } break; } @@ -317,12 +318,12 @@ void PListNode::store_text(String &p_stream, uint8_t p_indent) const { case PList::PLNodeType::PL_NODE_TYPE_DICT: { p_stream += String("\t").repeat(p_indent); p_stream += "<dict>\n"; - for (const Map<String, Ref<PListNode>>::Element *it = data_dict.front(); it; it = it->next()) { + for (const KeyValue<String, Ref<PListNode>> &E : data_dict) { p_stream += String("\t").repeat(p_indent + 1); p_stream += "<key>"; - p_stream += it->key(); + p_stream += E.key; p_stream += "</key>\n"; - it->value()->store_text(p_stream, p_indent + 1); + E.value->store_text(p_stream, p_indent + 1); } p_stream += String("\t").repeat(p_indent); p_stream += "</dict>\n"; diff --git a/platform/osx/export/plist.h b/platform/osx/export/plist.h index fb4aaaa935..ba9eaec196 100644 --- a/platform/osx/export/plist.h +++ b/platform/osx/export/plist.h @@ -83,7 +83,7 @@ public: CharString data_string; Vector<Ref<PListNode>> data_array; - Map<String, Ref<PListNode>> data_dict; + HashMap<String, Ref<PListNode>> data_dict; union { int32_t data_int; bool data_bool; diff --git a/platform/osx/gl_manager_osx_legacy.h b/platform/osx/gl_manager_osx_legacy.h index 76d58de229..2d4913a7a6 100644 --- a/platform/osx/gl_manager_osx_legacy.h +++ b/platform/osx/gl_manager_osx_legacy.h @@ -57,7 +57,7 @@ private: NSOpenGLContext *context = nullptr; }; - Map<DisplayServer::WindowID, GLWindow> windows; + RBMap<DisplayServer::WindowID, GLWindow> windows; NSOpenGLContext *shared_context = nullptr; DisplayServer::WindowID current_window = DisplayServer::INVALID_WINDOW_ID; diff --git a/platform/osx/gl_manager_osx_legacy.mm b/platform/osx/gl_manager_osx_legacy.mm index fbe64e32a3..c769d7f5c5 100644 --- a/platform/osx/gl_manager_osx_legacy.mm +++ b/platform/osx/gl_manager_osx_legacy.mm @@ -167,8 +167,8 @@ void GLManager_OSX::make_current() { } void GLManager_OSX::swap_buffers() { - for (Map<DisplayServer::WindowID, GLWindow>::Element *E = windows.front(); E; E = E->next()) { - [E->get().context flushBuffer]; + for (const KeyValue<DisplayServer::WindowID, GLWindow> &E : windows) { + [E.value.context flushBuffer]; } } diff --git a/platform/osx/tts_osx.h b/platform/osx/tts_osx.h index 54d419e573..449418e48f 100644 --- a/platform/osx/tts_osx.h +++ b/platform/osx/tts_osx.h @@ -33,7 +33,7 @@ #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @@ -48,7 +48,7 @@ @interface TTS_OSX : NSObject <AVSpeechSynthesizerDelegate> { // AVSpeechSynthesizer bool speaking; - Map<id, int> ids; + HashMap<id, int> ids; // NSSpeechSynthesizer bool paused; diff --git a/platform/uwp/export/app_packager.cpp b/platform/uwp/export/app_packager.cpp index 2f70c3e74c..09717b9d69 100644 --- a/platform/uwp/export/app_packager.cpp +++ b/platform/uwp/export/app_packager.cpp @@ -91,7 +91,7 @@ void AppxPackager::make_content_types(const String &p_path) { tmp_file->store_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); tmp_file->store_string("<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">"); - Map<String, String> types; + HashMap<String, String> types; for (int i = 0; i < file_metadata.size(); i++) { String ext = file_metadata[i].name.get_extension().to_lower(); diff --git a/platform/uwp/export/app_packager.h b/platform/uwp/export/app_packager.h index ea42e9bdfe..430f42d85f 100644 --- a/platform/uwp/export/app_packager.h +++ b/platform/uwp/export/app_packager.h @@ -89,7 +89,7 @@ class AppxPackager { String progress_task; Ref<FileAccess> package; - Set<String> mime_types; + RBSet<String> mime_types; Vector<FileMeta> file_metadata; diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp index 65a5ee7140..e2e84131a3 100644 --- a/platform/uwp/export/export_plugin.cpp +++ b/platform/uwp/export/export_plugin.cpp @@ -499,7 +499,7 @@ void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) { r_features->push_back("uwp"); } -void EditorExportPlatformUWP::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) { +void EditorExportPlatformUWP::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) { } EditorExportPlatformUWP::EditorExportPlatformUWP() { diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h index ceb6d613b3..4eff96a432 100644 --- a/platform/uwp/export/export_plugin.h +++ b/platform/uwp/export/export_plugin.h @@ -441,7 +441,7 @@ public: virtual void get_platform_features(List<String> *r_features) override; - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override; + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override; EditorExportPlatformUWP(); }; diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 341eb58f9f..e771057d2e 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -1501,7 +1501,7 @@ void DisplayServerWindows::cursor_set_custom_image(const Ref<Resource> &p_cursor _THREAD_SAFE_METHOD_ if (p_cursor.is_valid()) { - Map<CursorShape, Vector<Variant>>::Element *cursor_c = cursors_cache.find(p_shape); + RBMap<CursorShape, Vector<Variant>>::Element *cursor_c = cursors_cache.find(p_shape); if (cursor_c) { if (cursor_c->get()[0] == p_cursor && cursor_c->get()[1] == p_hotspot) { @@ -2006,7 +2006,7 @@ void DisplayServerWindows::_touch_event(WindowID p_window, bool p_pressed, float } void DisplayServerWindows::_drag_event(WindowID p_window, float p_x, float p_y, int idx) { - Map<int, Vector2>::Element *curr = touch_state.find(idx); + RBMap<int, Vector2>::Element *curr = touch_state.find(idx); if (!curr) { return; } @@ -2158,7 +2158,10 @@ void DisplayServerWindows::popup_close(WindowID p_window) { WindowID win_id = E->get(); popup_list.erase(E); - _send_window_event(windows[win_id], DisplayServerWindows::WINDOW_EVENT_CLOSE_REQUEST); + if (win_id != p_window) { + // Only request close on related windows, not this window. We are already processing it. + _send_window_event(windows[win_id], DisplayServerWindows::WINDOW_EVENT_CLOSE_REQUEST); + } E = F; } } @@ -2173,6 +2176,7 @@ LRESULT DisplayServerWindows::MouseProc(int code, WPARAM wParam, LPARAM lParam) case WM_NCRBUTTONDOWN: case WM_NCMBUTTONDOWN: case WM_LBUTTONDOWN: + case WM_RBUTTONDOWN: case WM_MBUTTONDOWN: { MOUSEHOOKSTRUCT *ms = (MOUSEHOOKSTRUCT *)lParam; Point2i pos = Point2i(ms->pt.x, ms->pt.y); diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index e8e207401e..90f7b27b0c 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -314,7 +314,7 @@ class DisplayServerWindows : public DisplayServer { RenderingDeviceVulkan *rendering_device_vulkan = nullptr; #endif - Map<int, Vector2> touch_state; + RBMap<int, Vector2> touch_state; int pressrc; HINSTANCE hInstance; // Holds The Instance Of The Application @@ -389,7 +389,7 @@ class DisplayServerWindows : public DisplayServer { Callable drop_files_callback; WindowID transient_parent = INVALID_WINDOW_ID; - Set<WindowID> transient_children; + RBSet<WindowID> transient_children; bool is_popup = false; Rect2i parent_safe_rect; @@ -403,7 +403,7 @@ class DisplayServerWindows : public DisplayServer { WindowID _create_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect); WindowID window_id_counter = MAIN_WINDOW_ID; - Map<WindowID, WindowData> windows; + RBMap<WindowID, WindowData> windows; WindowID last_focused_window = INVALID_WINDOW_ID; @@ -430,7 +430,7 @@ class DisplayServerWindows : public DisplayServer { HCURSOR cursors[CURSOR_MAX] = { nullptr }; CursorShape cursor_shape = CursorShape::CURSOR_ARROW; - Map<CursorShape, Vector<Variant>> cursors_cache; + RBMap<CursorShape, Vector<Variant>> cursors_cache; void _drag_event(WindowID p_window, float p_x, float p_y, int idx); void _touch_event(WindowID p_window, bool p_pressed, float p_x, float p_y, int idx); diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp index 7627a3cba3..45281f037c 100644 --- a/platform/windows/export/export_plugin.cpp +++ b/platform/windows/export/export_plugin.cpp @@ -106,7 +106,7 @@ List<String> EditorExportPlatformWindows::get_binary_extensions(const Ref<Editor return list; } -bool EditorExportPlatformWindows::get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const { +bool EditorExportPlatformWindows::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const { // This option is not supported by "osslsigncode", used on non-Windows host. if (!OS::get_singleton()->has_feature("windows") && p_option == "codesign/identity_type") { return false; diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h index b48ee7c985..61184a8987 100644 --- a/platform/windows/export/export_plugin.h +++ b/platform/windows/export/export_plugin.h @@ -48,7 +48,7 @@ public: virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) override; virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override; virtual void get_export_options(List<ExportOption> *r_options) override; - virtual bool get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override; + virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const override; virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; virtual String get_template_file_name(const String &p_target, const String &p_arch) const override; virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) const override; diff --git a/platform/windows/gl_manager_windows.h b/platform/windows/gl_manager_windows.h index 0d544a5715..5e43a3de2a 100644 --- a/platform/windows/gl_manager_windows.h +++ b/platform/windows/gl_manager_windows.h @@ -67,7 +67,7 @@ private: HGLRC hRC; }; - Map<DisplayServer::WindowID, GLWindow> _windows; + RBMap<DisplayServer::WindowID, GLWindow> _windows; LocalVector<GLDisplay> _displays; GLWindow *_current_window = nullptr; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 55483cfc83..6f414c094c 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -178,7 +178,7 @@ void OS_Windows::initialize() { // long as the windows scheduler resolution (~16-30ms) even for calls like Sleep(1) timeBeginPeriod(1); - process_map = memnew((Map<ProcessID, ProcessInfo>)); + process_map = memnew((HashMap<ProcessID, ProcessInfo>)); // Add current Godot PID to the list of known PIDs ProcessInfo current_pi = {}; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index d06d30f958..dc702c66e1 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -110,7 +110,7 @@ protected: STARTUPINFO si; PROCESS_INFORMATION pi; }; - Map<ProcessID, ProcessInfo> *process_map; + HashMap<ProcessID, ProcessInfo> *process_map; public: virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override; diff --git a/platform/windows/tts_windows.h b/platform/windows/tts_windows.h index 5da404baf9..d84a3d273a 100644 --- a/platform/windows/tts_windows.h +++ b/platform/windows/tts_windows.h @@ -33,7 +33,7 @@ #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @@ -54,7 +54,7 @@ class TTS_Windows { int offset; int id; }; - Map<ULONG, UTData> ids; + RBMap<ULONG, UTData> ids; static void __stdcall speech_event_callback(WPARAM wParam, LPARAM lParam); void _update_tts(); diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp index 4734f97e23..221d52bc20 100644 --- a/scene/2d/animated_sprite_2d.cpp +++ b/scene/2d/animated_sprite_2d.cpp @@ -388,6 +388,7 @@ void AnimatedSprite2D::play(const StringName &p_animation, const bool p_backward } } + is_over = false; set_playing(true); } @@ -496,7 +497,7 @@ void AnimatedSprite2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "set_playing", "is_playing"); ADD_GROUP("Offset", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset", PROPERTY_HINT_NONE, "suffix:px"), "set_offset", "get_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "is_flipped_h"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_v"), "set_flip_v", "is_flipped_v"); } diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 70b9b769cd..02d9198e43 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -137,14 +137,14 @@ void Area2D::_body_enter_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, BodyState>::Element *E = body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; emit_signal(SceneStringNames::get_singleton()->body_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].area_shape); } } @@ -152,13 +152,13 @@ void Area2D::_body_exit_tree(ObjectID p_id) { Object *obj = ObjectDB::get_instance(p_id); Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, BodyState>::Element *E = body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; emit_signal(SceneStringNames::get_singleton()->body_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].area_shape); } } @@ -169,7 +169,7 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i Object *obj = ObjectDB::get_instance(objid); Node *node = Object::cast_to<Node>(obj); - Map<ObjectID, BodyState>::Element *E = body_map.find(objid); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(objid); if (!body_in && !E) { return; //does not exist because it was likely removed from the tree @@ -180,36 +180,36 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i if (body_in) { if (!E) { E = body_map.insert(objid, BodyState()); - E->get().rid = p_body; - E->get().rc = 0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_body; + E->value.rc = 0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } } } - E->get().rc++; + E->value.rc++; if (node) { - E->get().shapes.insert(ShapePair(p_body_shape, p_area_shape)); + E->value.shapes.insert(ShapePair(p_body_shape, p_area_shape)); } - if (!node || E->get().in_tree) { + if (!node || E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_entered, p_body, node, p_body_shape, p_area_shape); } } else { - E->get().rc--; + E->value.rc--; if (node) { - E->get().shapes.erase(ShapePair(p_body_shape, p_area_shape)); + E->value.shapes.erase(ShapePair(p_body_shape, p_area_shape)); } - bool in_tree = E->get().in_tree; - if (E->get().rc == 0) { - body_map.erase(E); + bool in_tree = E->value.in_tree; + if (E->value.rc == 0) { + body_map.remove(E); if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree)); @@ -231,14 +231,14 @@ void Area2D::_area_enter_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, AreaState>::Element *E = area_map.find(p_id); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; emit_signal(SceneStringNames::get_singleton()->area_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->area_shape_entered, E->get().rid, node, E->get().shapes[i].area_shape, E->get().shapes[i].self_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->area_shape_entered, E->value.rid, node, E->value.shapes[i].area_shape, E->value.shapes[i].self_shape); } } @@ -246,13 +246,13 @@ void Area2D::_area_exit_tree(ObjectID p_id) { Object *obj = ObjectDB::get_instance(p_id); Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, AreaState>::Element *E = area_map.find(p_id); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; emit_signal(SceneStringNames::get_singleton()->area_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->area_shape_exited, E->get().rid, node, E->get().shapes[i].area_shape, E->get().shapes[i].self_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->area_shape_exited, E->value.rid, node, E->value.shapes[i].area_shape, E->value.shapes[i].self_shape); } } @@ -263,7 +263,7 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i Object *obj = ObjectDB::get_instance(objid); Node *node = Object::cast_to<Node>(obj); - Map<ObjectID, AreaState>::Element *E = area_map.find(objid); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(objid); if (!area_in && !E) { return; //likely removed from the tree @@ -273,36 +273,36 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i if (area_in) { if (!E) { E = area_map.insert(objid, AreaState()); - E->get().rid = p_area; - E->get().rc = 0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_area; + E->value.rc = 0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->area_entered, node); } } } - E->get().rc++; + E->value.rc++; if (node) { - E->get().shapes.insert(AreaShapePair(p_area_shape, p_self_shape)); + E->value.shapes.insert(AreaShapePair(p_area_shape, p_self_shape)); } - if (!node || E->get().in_tree) { + if (!node || E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->area_shape_entered, p_area, node, p_area_shape, p_self_shape); } } else { - E->get().rc--; + E->value.rc--; if (node) { - E->get().shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); + E->value.shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); } - bool in_tree = E->get().in_tree; - if (E->get().rc == 0) { - area_map.erase(E); + bool in_tree = E->value.in_tree; + if (E->value.rc == 0) { + area_map.remove(E); if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree)); @@ -323,7 +323,7 @@ void Area2D::_clear_monitoring() { ERR_FAIL_COND_MSG(locked, "This function can't be used during the in/out signal."); { - Map<ObjectID, BodyState> bmcopy = body_map; + HashMap<ObjectID, BodyState> bmcopy = body_map; body_map.clear(); //disconnect all monitored stuff @@ -351,7 +351,7 @@ void Area2D::_clear_monitoring() { } { - Map<ObjectID, AreaState> bmcopy = area_map; + HashMap<ObjectID, AreaState> bmcopy = area_map; area_map.clear(); //disconnect all monitored stuff @@ -461,20 +461,20 @@ TypedArray<Area2D> Area2D::get_overlapping_areas() const { bool Area2D::overlaps_area(Node *p_area) const { ERR_FAIL_NULL_V(p_area, false); - const Map<ObjectID, AreaState>::Element *E = area_map.find(p_area->get_instance_id()); + HashMap<ObjectID, AreaState>::ConstIterator E = area_map.find(p_area->get_instance_id()); if (!E) { return false; } - return E->get().in_tree; + return E->value.in_tree; } bool Area2D::overlaps_body(Node *p_body) const { ERR_FAIL_NULL_V(p_body, false); - const Map<ObjectID, BodyState>::Element *E = body_map.find(p_body->get_instance_id()); + HashMap<ObjectID, BodyState>::ConstIterator E = body_map.find(p_body->get_instance_id()); if (!E) { return false; } - return E->get().in_tree; + return E->value.in_tree; } void Area2D::set_audio_bus_override(bool p_override) { @@ -607,7 +607,7 @@ void Area2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_point_distance_scale", PROPERTY_HINT_RANGE, "0,1024,0.001,or_greater,exp"), "set_gravity_point_distance_scale", "get_gravity_point_distance_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity_point_center"), "set_gravity_point_center", "get_gravity_point_center"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity_direction"), "set_gravity_direction", "get_gravity_direction"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-4096,4096,0.001,or_lesser,or_greater"), "set_gravity", "get_gravity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, U"-4096,4096,0.001,or_lesser,or_greater,suffix:px/s\u00B2"), "set_gravity", "get_gravity"); ADD_GROUP("Linear Damp", "linear_damp_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "linear_damp_space_override", PROPERTY_HINT_ENUM, "Disabled,Combine,Combine-Replace,Replace,Replace-Combine", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_linear_damp_space_override_mode", "get_linear_damp_space_override_mode"); diff --git a/scene/2d/area_2d.h b/scene/2d/area_2d.h index a42e7722b0..a584420ced 100644 --- a/scene/2d/area_2d.h +++ b/scene/2d/area_2d.h @@ -94,7 +94,7 @@ private: VSet<ShapePair> shapes; }; - Map<ObjectID, BodyState> body_map; + HashMap<ObjectID, BodyState> body_map; void _area_inout(int p_status, const RID &p_area, ObjectID p_instance, int p_area_shape, int p_self_shape); @@ -126,7 +126,7 @@ private: VSet<AreaShapePair> shapes; }; - Map<ObjectID, AreaState> area_map; + HashMap<ObjectID, AreaState> area_map; void _clear_monitoring(); bool audio_bus_override = false; diff --git a/scene/2d/audio_listener_2d.cpp b/scene/2d/audio_listener_2d.cpp index eb463864e1..f7dd20d7c0 100644 --- a/scene/2d/audio_listener_2d.cpp +++ b/scene/2d/audio_listener_2d.cpp @@ -57,7 +57,7 @@ bool AudioListener2D::_get(const StringName &p_name, Variant &r_ret) const { } void AudioListener2D::_get_property_list(List<PropertyInfo> *p_list) const { - p_list->push_back(PropertyInfo(Variant::BOOL, "current")); + p_list->push_back(PropertyInfo(Variant::BOOL, PNAME("current"))); } void AudioListener2D::_notification(int p_what) { diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index c1328badfb..d2a08af76c 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -148,7 +148,7 @@ void AudioStreamPlayer2D::_update_panning() { Vector2 global_pos = get_global_position(); - Set<Viewport *> viewports = world_2d->get_viewports(); + RBSet<Viewport *> viewports = world_2d->get_viewports(); viewports.insert(get_viewport()); // TODO: This is a mediocre workaround for #50958. Remove when that bug is fixed! volume_vector.resize(4); @@ -435,12 +435,12 @@ void AudioStreamPlayer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer2D::get_stream_playback); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,suffix:dB"), "set_volume_db", "get_volume_db"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "1,4096,1,or_greater,exp"), "set_max_distance", "get_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "1,4096,1,or_greater,exp,suffix:px"), "set_max_distance", "get_max_distance"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_polyphony", PROPERTY_HINT_NONE, ""), "set_max_polyphony", "get_max_polyphony"); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index 50863f2c4d..a8c12f4893 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -606,7 +606,7 @@ void CollisionObject2D::_bind_methods() { ADD_SIGNAL(MethodInfo("mouse_shape_entered", PropertyInfo(Variant::INT, "shape_idx"))); ADD_SIGNAL(MethodInfo("mouse_shape_exited", PropertyInfo(Variant::INT, "shape_idx"))); - ADD_PROPERTY(PropertyInfo(Variant::INT, "disable_mode", PROPERTY_HINT_ENUM, "Remove,MakeStatic,KeepActive"), "set_disable_mode", "get_disable_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "disable_mode", PROPERTY_HINT_ENUM, "Remove,Make Static,Keep Active"), "set_disable_mode", "get_disable_mode"); ADD_GROUP("Collision", "collision_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer"); diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h index f2b7eecc7b..997afee6c4 100644 --- a/scene/2d/collision_object_2d.h +++ b/scene/2d/collision_object_2d.h @@ -75,7 +75,7 @@ private: int total_subshapes = 0; - Map<uint32_t, ShapeData> shapes; + RBMap<uint32_t, ShapeData> shapes; bool only_update_transform_changes = false; // This is used for sync to physics. void _apply_disabled(); diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index 5a25b1705a..9c0c26f6d9 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -239,7 +239,7 @@ void CollisionShape2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", "get_shape"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_way_collision"), "set_one_way_collision", "is_one_way_collision_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1,suffix:px"), "set_one_way_collision_margin", "get_one_way_collision_margin"); } CollisionShape2D::CollisionShape2D() { diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index f5c14b6845..07b58e9721 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -1282,14 +1282,14 @@ void CPUParticles2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting"); ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_RANGE, "1,1000000,1,exp"), "set_amount", "get_amount"); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater,suffix:s"), "set_lifetime", "get_lifetime"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01,suffix:s"), "set_pre_process_time", "get_pre_process_time"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1,suffix:FPS"), "set_fixed_fps", "get_fixed_fps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta"); ADD_GROUP("Drawing", ""); // No visibility_rect property contrarily to Particles2D, it's updated automatically. @@ -1305,7 +1305,7 @@ void CPUParticles2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_direction", "direction"), &CPUParticles2D::set_direction); ClassDB::bind_method(D_METHOD("get_direction"), &CPUParticles2D::get_direction); - ClassDB::bind_method(D_METHOD("set_spread", "degrees"), &CPUParticles2D::set_spread); + ClassDB::bind_method(D_METHOD("set_spread", "spread"), &CPUParticles2D::set_spread); ClassDB::bind_method(D_METHOD("get_spread"), &CPUParticles2D::get_spread); ClassDB::bind_method(D_METHOD("set_param_min", "param", "value"), &CPUParticles2D::set_param_min); @@ -1363,7 +1363,7 @@ void CPUParticles2D::_bind_methods() { ADD_GROUP("Emission Shape", "emission_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Sphere Surface,Box,Points,Directed Points", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_emission_shape", "get_emission_shape"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01,suffix:px"), "set_emission_sphere_radius", "get_emission_sphere_radius"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "emission_rect_extents"), "set_emission_rect_extents", "get_emission_rect_extents"); ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_points"), "set_emission_points", "get_emission_points"); ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals"); @@ -1374,10 +1374,10 @@ void CPUParticles2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "direction"), "set_direction", "get_direction"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread"); ADD_GROUP("Gravity", ""); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity"), "set_gravity", "get_gravity"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity", PROPERTY_HINT_NONE, U"suffix:px/s\u00B2"), "set_gravity", "get_gravity"); ADD_GROUP("Initial Velocity", "initial_"); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_min", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_min", "get_param_min", PARAM_INITIAL_LINEAR_VELOCITY); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_max", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_max", "get_param_max", PARAM_INITIAL_LINEAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_min", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater,suffix:px/s"), "set_param_min", "get_param_min", PARAM_INITIAL_LINEAR_VELOCITY); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_max", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater,suffix:px/s"), "set_param_max", "get_param_max", PARAM_INITIAL_LINEAR_VELOCITY); ADD_GROUP("Angular Velocity", "angular_"); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_min", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ANGULAR_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_max", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ANGULAR_VELOCITY); diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index d509d93172..d1b5f16e08 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -605,17 +605,17 @@ void GPUParticles2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_RANGE, "1,1000000,1,exp"), "set_amount", "get_amount"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "sub_emitter", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "GPUParticles2D"), "set_sub_emitter", "get_sub_emitter"); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater,suffix:s"), "set_lifetime", "get_lifetime"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01,suffix:s"), "set_pre_process_time", "get_pre_process_time"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1,suffix:FPS"), "set_fixed_fps", "get_fixed_fps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interpolate"), "set_interpolate", "get_interpolate"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta"); ADD_GROUP("Collision", "collision_"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_base_size", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_collision_base_size", "get_collision_base_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_base_size", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater,suffix:px"), "set_collision_base_size", "get_collision_base_size"); ADD_GROUP("Drawing", ""); ADD_PROPERTY(PropertyInfo(Variant::RECT2, "visibility_rect"), "set_visibility_rect", "get_visibility_rect"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "local_coords"), "set_use_local_coordinates", "get_use_local_coordinates"); diff --git a/scene/2d/joint_2d.cpp b/scene/2d/joint_2d.cpp index cd82b47333..b527a72de6 100644 --- a/scene/2d/joint_2d.cpp +++ b/scene/2d/joint_2d.cpp @@ -343,8 +343,8 @@ void GrooveJoint2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_initial_offset", "offset"), &GrooveJoint2D::set_initial_offset); ClassDB::bind_method(D_METHOD("get_initial_offset"), &GrooveJoint2D::get_initial_offset); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "1,65535,1,exp"), "set_length", "get_length"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "initial_offset", PROPERTY_HINT_RANGE, "1,65535,1,exp"), "set_initial_offset", "get_initial_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "1,65535,1,exp,suffix:px"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "initial_offset", PROPERTY_HINT_RANGE, "1,65535,1,exp,suffix:px"), "set_initial_offset", "get_initial_offset"); } GrooveJoint2D::GrooveJoint2D() { @@ -440,8 +440,8 @@ void DampedSpringJoint2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_damping", "damping"), &DampedSpringJoint2D::set_damping); ClassDB::bind_method(D_METHOD("get_damping"), &DampedSpringJoint2D::get_damping); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "1,65535,1,exp"), "set_length", "get_length"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rest_length", PROPERTY_HINT_RANGE, "0,65535,1,exp"), "set_rest_length", "get_rest_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "1,65535,1,exp,suffix:px"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rest_length", PROPERTY_HINT_RANGE, "0,65535,1,exp,suffix:px"), "set_rest_length", "get_rest_length"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stiffness", PROPERTY_HINT_RANGE, "0.1,64,0.1,exp"), "set_stiffness", "get_stiffness"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0.01,16,0.01,exp"), "set_damping", "get_damping"); } diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index b09b1b5047..28d9b284e6 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -425,9 +425,9 @@ void PointLight2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_texture_scale"), &PointLight2D::get_texture_scale); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_texture_offset", "get_texture_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset", PROPERTY_HINT_NONE, "suffix:px"), "set_texture_offset", "get_texture_offset"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_scale", PROPERTY_HINT_RANGE, "0.01,50,0.01"), "set_texture_scale", "get_texture_scale"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0,1024,1,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0,1024,1,or_greater,suffix:px"), "set_height", "get_height"); } PointLight2D::PointLight2D() { @@ -449,8 +449,8 @@ void DirectionalLight2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_max_distance", "pixels"), &DirectionalLight2D::set_max_distance); ClassDB::bind_method(D_METHOD("get_max_distance"), &DirectionalLight2D::get_max_distance); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_height", "get_height"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "0,16384.0,1.0,or_greater"), "set_max_distance", "get_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0,1,0.01,suffix:px"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "0,16384.0,1.0,or_greater,suffix:px"), "set_max_distance", "get_max_distance"); } DirectionalLight2D::DirectionalLight2D() { diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 8cbcc9acf6..06e5cbc97e 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -393,7 +393,7 @@ void Line2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_antialiased"), &Line2D::get_antialiased); ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "points"), "set_points", "get_points"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width"), "set_width", "get_width"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width", PROPERTY_HINT_NONE, "suffix:px"), "set_width", "get_width"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "width_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_curve", "get_curve"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "default_color"), "set_default_color", "get_default_color"); ADD_GROUP("Fill", ""); diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index 91549d75f0..daa6d83867 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -75,13 +75,13 @@ void NavigationAgent2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_avoidance_done", "new_velocity"), &NavigationAgent2D::_avoidance_done); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_dist", "get_neighbor_dist"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01,suffix:px"), "set_target_desired_distance", "get_target_desired_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01,suffix:px"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01,suffix:px"), "set_neighbor_dist", "get_neighbor_dist"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_time_horizon", "get_time_horizon"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_max_speed", "get_max_speed"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "10,100,1"), "set_path_max_distance", "get_path_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.1,10000,0.01,suffix:s"), "set_time_horizon", "get_time_horizon"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,100000,0.01,suffix:px/s"), "set_max_speed", "get_max_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "10,100,1,suffix:px"), "set_path_max_distance", "get_path_max_distance"); ADD_PROPERTY(PropertyInfo(Variant::INT, "navigable_layers", PROPERTY_HINT_LAYERS_2D_NAVIGATION), "set_navigable_layers", "get_navigable_layers"); ADD_SIGNAL(MethodInfo("path_changed")); @@ -102,6 +102,26 @@ void NavigationAgent2D::_notification(int p_what) { set_physics_process_internal(true); } break; + case NOTIFICATION_PAUSED: { + if (agent_parent && !agent_parent->can_process()) { + map_before_pause = NavigationServer2D::get_singleton()->agent_get_map(get_rid()); + NavigationServer2D::get_singleton()->agent_set_map(get_rid(), RID()); + } else if (agent_parent && agent_parent->can_process() && !(map_before_pause == RID())) { + NavigationServer2D::get_singleton()->agent_set_map(get_rid(), map_before_pause); + map_before_pause = RID(); + } + } break; + + case NOTIFICATION_UNPAUSED: { + if (agent_parent && !agent_parent->can_process()) { + map_before_pause = NavigationServer2D::get_singleton()->agent_get_map(get_rid()); + NavigationServer2D::get_singleton()->agent_set_map(get_rid(), RID()); + } else if (agent_parent && agent_parent->can_process() && !(map_before_pause == RID())) { + NavigationServer2D::get_singleton()->agent_set_map(get_rid(), map_before_pause); + map_before_pause = RID(); + } + } break; + case NOTIFICATION_EXIT_TREE: { agent_parent = nullptr; set_physics_process_internal(false); diff --git a/scene/2d/navigation_agent_2d.h b/scene/2d/navigation_agent_2d.h index 1447e25e8c..2a401190d0 100644 --- a/scene/2d/navigation_agent_2d.h +++ b/scene/2d/navigation_agent_2d.h @@ -41,6 +41,7 @@ class NavigationAgent2D : public Node { Node2D *agent_parent = nullptr; RID agent; + RID map_before_pause; uint32_t navigable_layers = 1; diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index d1e5bc11bc..0320c6c917 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -31,10 +31,13 @@ #include "navigation_obstacle_2d.h" #include "scene/2d/collision_shape_2d.h" +#include "scene/2d/physics_body_2d.h" #include "scene/resources/world_2d.h" #include "servers/navigation_server_2d.h" void NavigationObstacle2D::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_rid"), &NavigationObstacle2D::get_rid); + ClassDB::bind_method(D_METHOD("set_estimate_radius", "estimate_radius"), &NavigationObstacle2D::set_estimate_radius); ClassDB::bind_method(D_METHOD("is_radius_estimated"), &NavigationObstacle2D::is_radius_estimated); ClassDB::bind_method(D_METHOD("set_radius", "radius"), &NavigationObstacle2D::set_radius); @@ -78,8 +81,28 @@ void NavigationObstacle2D::_notification(int p_what) { parent_node2d = nullptr; } break; + case NOTIFICATION_PAUSED: { + if (parent_node2d && !parent_node2d->can_process()) { + map_before_pause = NavigationServer2D::get_singleton()->agent_get_map(get_rid()); + NavigationServer2D::get_singleton()->agent_set_map(get_rid(), RID()); + } else if (parent_node2d && parent_node2d->can_process() && !(map_before_pause == RID())) { + NavigationServer2D::get_singleton()->agent_set_map(get_rid(), map_before_pause); + map_before_pause = RID(); + } + } break; + + case NOTIFICATION_UNPAUSED: { + if (parent_node2d && !parent_node2d->can_process()) { + map_before_pause = NavigationServer2D::get_singleton()->agent_get_map(get_rid()); + NavigationServer2D::get_singleton()->agent_set_map(get_rid(), RID()); + } else if (parent_node2d && parent_node2d->can_process() && !(map_before_pause == RID())) { + NavigationServer2D::get_singleton()->agent_set_map(get_rid(), map_before_pause); + map_before_pause = RID(); + } + } break; + case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { - if (parent_node2d) { + if (parent_node2d && parent_node2d->is_inside_tree()) { NavigationServer2D::get_singleton()->agent_set_position(agent, parent_node2d->get_global_position()); } } break; @@ -103,6 +126,11 @@ TypedArray<String> NavigationObstacle2D::get_configuration_warnings() const { warnings.push_back(RTR("The NavigationObstacle2D only serves to provide collision avoidance to a Node2D object.")); } + if (Object::cast_to<StaticBody2D>(get_parent())) { + warnings.push_back(RTR("The NavigationObstacle2D is intended for constantly moving bodies like CharacterBody2D or RigidDynamicBody2D as it creates only an RVO avoidance radius and does not follow scene geometry exactly." + "\nNot constantly moving or complete static objects should be captured with a refreshed NavigationPolygon so agents can not only avoid them but also move along those objects outline at high detail")); + } + return warnings; } @@ -122,13 +150,13 @@ void NavigationObstacle2D::reevaluate_agent_radius() { } real_t NavigationObstacle2D::estimate_agent_radius() const { - if (parent_node2d) { + if (parent_node2d && parent_node2d->is_inside_tree()) { // Estimate the radius of this physics body real_t radius = 0.0; for (int i(0); i < parent_node2d->get_child_count(); i++) { // For each collision shape CollisionShape2D *cs = Object::cast_to<CollisionShape2D>(parent_node2d->get_child(i)); - if (cs) { + if (cs && cs->is_inside_tree()) { // Take the distance between the Body center to the shape center real_t r = cs->get_transform().get_origin().length(); if (cs->get_shape().is_valid()) { @@ -139,6 +167,9 @@ real_t NavigationObstacle2D::estimate_agent_radius() const { r *= MAX(s.x, s.y); // Takes the biggest radius radius = MAX(radius, r); + } else if (cs && !cs->is_inside_tree()) { + WARN_PRINT("A CollisionShape2D of the NavigationObstacle2D parent node was not inside the SceneTree when estimating the obstacle radius." + "\nMove the NavigationObstacle2D to a child position below any CollisionShape2D node of the parent node so the CollisionShape2D is already inside the SceneTree."); } } Vector2 s = parent_node2d->get_global_scale(); diff --git a/scene/2d/navigation_obstacle_2d.h b/scene/2d/navigation_obstacle_2d.h index 2a0ef14e73..948cf5b61a 100644 --- a/scene/2d/navigation_obstacle_2d.h +++ b/scene/2d/navigation_obstacle_2d.h @@ -39,6 +39,7 @@ class NavigationObstacle2D : public Node { Node2D *parent_node2d = nullptr; RID agent; + RID map_before_pause; bool estimate_radius = true; real_t radius = 1.0; diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 3cc9f3f2c4..260faf1d68 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -302,19 +302,19 @@ void NavigationPolygon::make_polygons_from_outlines() { polygons.clear(); vertices.clear(); - Map<Vector2, int> points; + HashMap<Vector2, int> points; for (List<TPPLPoly>::Element *I = out_poly.front(); I; I = I->next()) { TPPLPoly &tp = I->get(); struct Polygon p; for (int64_t i = 0; i < tp.GetNumPoints(); i++) { - Map<Vector2, int>::Element *E = points.find(tp[i]); + HashMap<Vector2, int>::Iterator E = points.find(tp[i]); if (!E) { E = points.insert(tp[i], vertices.size()); vertices.push_back(tp[i]); } - p.indices.push_back(E->get()); + p.indices.push_back(E->value); } polygons.push_back(p); @@ -509,6 +509,9 @@ void NavigationRegion2D::_navpoly_changed() { if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_navigation_hint())) { update(); } + if (navpoly.is_valid()) { + NavigationServer2D::get_singleton()->region_set_navpoly(region, navpoly); + } } void NavigationRegion2D::_map_changed(RID p_map) { if (enabled && get_world_2d()->get_navigation_map() == p_map) { diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 0e8bb1aad7..2ed5ef905a 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -416,12 +416,12 @@ void Node2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater,radians"), "set_rotation", "get_rotation"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "skew", PROPERTY_HINT_RANGE, "-89.9,89.9,0.1,radians"), "set_skew", "get_skew"); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_transform", "get_transform"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_NONE), "set_transform", "get_transform"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_global_position", "get_global_position"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_global_rotation", "get_global_rotation"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_position", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_NONE), "set_global_position", "get_global_position"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rotation", PROPERTY_HINT_NONE, "radians", PROPERTY_USAGE_NONE), "set_global_rotation", "get_global_rotation"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_scale", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_global_scale", "get_global_scale"); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "global_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_global_transform", "get_global_transform"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "global_transform", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_NONE), "set_global_transform", "get_global_transform"); ADD_GROUP("Ordering", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "z_index", PROPERTY_HINT_RANGE, itos(RS::CANVAS_ITEM_Z_MIN) + "," + itos(RS::CANVAS_ITEM_Z_MAX) + ",1"), "set_z_index", "get_z_index"); diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp index 335f2404f2..506761d959 100644 --- a/scene/2d/parallax_background.cpp +++ b/scene/2d/parallax_background.cpp @@ -177,11 +177,11 @@ void ParallaxBackground::_bind_methods() { ClassDB::bind_method(D_METHOD("is_ignore_camera_zoom"), &ParallaxBackground::is_ignore_camera_zoom); ADD_GROUP("Scroll", "scroll_"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_offset"), "set_scroll_offset", "get_scroll_offset"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_base_offset"), "set_scroll_base_offset", "get_scroll_base_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_offset", PROPERTY_HINT_NONE, "suffix:px"), "set_scroll_offset", "get_scroll_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_base_offset", PROPERTY_HINT_NONE, "suffix:px"), "set_scroll_base_offset", "get_scroll_base_offset"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_base_scale"), "set_scroll_base_scale", "get_scroll_base_scale"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_limit_begin"), "set_limit_begin", "get_limit_begin"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_limit_end"), "set_limit_end", "get_limit_end"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_limit_begin", PROPERTY_HINT_NONE, "suffix:px"), "set_limit_begin", "get_limit_begin"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_limit_end", PROPERTY_HINT_NONE, "suffix:px"), "set_limit_end", "get_limit_end"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_ignore_camera_zoom"), "set_ignore_camera_zoom", "is_ignore_camera_zoom"); } diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index 9e8ab224dc..d716f01a82 100644 --- a/scene/2d/parallax_layer.cpp +++ b/scene/2d/parallax_layer.cpp @@ -159,7 +159,7 @@ void ParallaxLayer::_bind_methods() { ADD_GROUP("Motion", "motion_"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion_scale"), "set_motion_scale", "get_motion_scale"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion_offset"), "set_motion_offset", "get_motion_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion_offset", PROPERTY_HINT_NONE, "suffix:px"), "set_motion_offset", "get_motion_offset"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion_mirroring"), "set_mirroring", "get_mirroring"); } diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index a21cb7db62..ba90a275e6 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -295,7 +295,7 @@ void PathFollow2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_lookahead", "lookahead"), &PathFollow2D::set_lookahead); ClassDB::bind_method(D_METHOD("get_lookahead"), &PathFollow2D::get_lookahead); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater,suffix:px"), "set_offset", "get_offset"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset"); diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 88f68e4142..e7ac6432c6 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -56,13 +56,11 @@ PhysicsBody2D::~PhysicsBody2D() { Ref<KinematicCollision2D> PhysicsBody2D::_move(const Vector2 &p_distance, bool p_test_only, real_t p_margin) { PhysicsServer2D::MotionParameters parameters(get_global_transform(), p_distance, p_margin); + parameters.recovery_as_collision = false; // Don't report collisions generated only from recovery. PhysicsServer2D::MotionResult result; - bool collided = move_and_collide(parameters, result, p_test_only); - - // Don't report collision when the whole motion is done. - if (collided && result.collision_safe_fraction < 1) { + if (move_and_collide(parameters, result, p_test_only)) { // Create a new instance when the cached reference is invalid or still in use in script. if (motion_cache.is_null() || motion_cache->reference_get_count() > 1) { motion_cache.instantiate(); @@ -143,15 +141,9 @@ bool PhysicsBody2D::test_move(const Transform2D &p_from, const Vector2 &p_distan } PhysicsServer2D::MotionParameters parameters(p_from, p_distance, p_margin); + parameters.recovery_as_collision = false; // Don't report collisions generated only from recovery. - bool colliding = PhysicsServer2D::get_singleton()->body_test_motion(get_rid(), parameters, r); - - if (colliding) { - // Don't report collision when the whole motion is done. - return (r->collision_safe_fraction < 1.0); - } else { - return false; - } + return PhysicsServer2D::get_singleton()->body_test_motion(get_rid(), parameters, r); } TypedArray<PhysicsBody2D> PhysicsBody2D::get_collision_exceptions() { @@ -339,17 +331,17 @@ void RigidDynamicBody2D::_body_enter_tree(ObjectID p_id) { ERR_FAIL_COND(!node); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_scene); + ERR_FAIL_COND(E->value.in_scene); contact_monitor->locked = true; - E->get().in_scene = true; + E->value.in_scene = true; emit_signal(SceneStringNames::get_singleton()->body_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].local_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].local_shape); } contact_monitor->locked = false; @@ -360,17 +352,17 @@ void RigidDynamicBody2D::_body_exit_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_scene); - E->get().in_scene = false; + ERR_FAIL_COND(!E->value.in_scene); + E->value.in_scene = false; contact_monitor->locked = true; emit_signal(SceneStringNames::get_singleton()->body_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].local_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].local_shape); } contact_monitor->locked = false; @@ -384,45 +376,45 @@ void RigidDynamicBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(objid); ERR_FAIL_COND(!body_in && !E); if (body_in) { if (!E) { E = contact_monitor->body_map.insert(objid, BodyState()); - E->get().rid = p_body; - //E->get().rc=0; - E->get().in_scene = node && node->is_inside_tree(); + E->value.rid = p_body; + //E->value.rc=0; + E->value.in_scene = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree), make_binds(objid)); - if (E->get().in_scene) { + if (E->value.in_scene) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } } - //E->get().rc++; + //E->value.rc++; } if (node) { - E->get().shapes.insert(ShapePair(p_body_shape, p_local_shape)); + E->value.shapes.insert(ShapePair(p_body_shape, p_local_shape)); } - if (E->get().in_scene) { + if (E->value.in_scene) { emit_signal(SceneStringNames::get_singleton()->body_shape_entered, p_body, node, p_body_shape, p_local_shape); } } else { - //E->get().rc--; + //E->value.rc--; if (node) { - E->get().shapes.erase(ShapePair(p_body_shape, p_local_shape)); + E->value.shapes.erase(ShapePair(p_body_shape, p_local_shape)); } - bool in_scene = E->get().in_scene; + bool in_scene = E->value.in_scene; - if (E->get().shapes.is_empty()) { + if (E->value.shapes.is_empty()) { if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree)); @@ -431,7 +423,7 @@ void RigidDynamicBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p } } - contact_monitor->body_map.erase(E); + contact_monitor->body_map.remove(E); } if (node && in_scene) { emit_signal(SceneStringNames::get_singleton()->body_shape_exited, p_body, node, p_body_shape, p_local_shape); @@ -494,7 +486,7 @@ void RigidDynamicBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) int local_shape = p_state->get_contact_local_shape(i); int shape = p_state->get_contact_collider_shape(i); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(obj); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(obj); if (!E) { toadd[toadd_count].rid = rid; toadd[toadd_count].local_shape = local_shape; @@ -505,7 +497,7 @@ void RigidDynamicBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) } ShapePair sp(shape, local_shape); - int idx = E->get().shapes.find(sp); + int idx = E->value.shapes.find(sp); if (idx == -1) { toadd[toadd_count].rid = rid; toadd[toadd_count].local_shape = local_shape; @@ -515,7 +507,7 @@ void RigidDynamicBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) continue; } - E->get().shapes[idx].tagged = true; + E->value.shapes[idx].tagged = true; } //put the ones to remove @@ -1022,10 +1014,10 @@ void RigidDynamicBody2D::_bind_methods() { GDVIRTUAL_BIND(_integrate_forces, "state"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp"), "set_mass", "get_mass"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inertia", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater,exp"), "set_inertia", "get_inertia"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp,suffix:kg"), "set_mass", "get_mass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inertia", PROPERTY_HINT_RANGE, U"0,1000,0.01,or_greater,exp,suffix:kg\u22C5px\u00B2"), "set_inertia", "get_inertia"); ADD_PROPERTY(PropertyInfo(Variant::INT, "center_of_mass_mode", PROPERTY_HINT_ENUM, "Auto,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_center_of_mass_mode", "get_center_of_mass_mode"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "center_of_mass", PROPERTY_HINT_RANGE, "-10,10,0.01,or_lesser,or_greater"), "set_center_of_mass", "get_center_of_mass"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "center_of_mass", PROPERTY_HINT_RANGE, "-10,10,0.01,or_lesser,or_greater,suffix:px"), "set_center_of_mass", "get_center_of_mass"); ADD_LINKED_PROPERTY("center_of_mass_mode", "center_of_mass"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale"); @@ -1039,16 +1031,16 @@ void RigidDynamicBody2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "freeze"), "set_freeze_enabled", "is_freeze_enabled"); ADD_PROPERTY(PropertyInfo(Variant::INT, "freeze_mode", PROPERTY_HINT_ENUM, "Static,Kinematic"), "set_freeze_mode", "get_freeze_mode"); ADD_GROUP("Linear", "linear_"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity", PROPERTY_HINT_NONE, "suffix:px/s"), "set_linear_velocity", "get_linear_velocity"); ADD_PROPERTY(PropertyInfo(Variant::INT, "linear_damp_mode", PROPERTY_HINT_ENUM, "Combine,Replace"), "set_linear_damp_mode", "get_linear_damp_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); ADD_GROUP("Angular", "angular_"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_NONE, "suffix:rad/s"), "set_angular_velocity", "get_angular_velocity"); ADD_PROPERTY(PropertyInfo(Variant::INT, "angular_damp_mode", PROPERTY_HINT_ENUM, "Combine,Replace"), "set_angular_damp_mode", "get_angular_damp_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); ADD_GROUP("Constant Forces", "constant_"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "constant_force"), "set_constant_force", "get_constant_force"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant_torque"), "set_constant_torque", "get_constant_torque"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "constant_force", PROPERTY_HINT_NONE, U"suffix:kg\u22C5px/s\u00B2"), "set_constant_force", "get_constant_force"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant_torque", PROPERTY_HINT_NONE, U"suffix:kg\u22C5px\u00B2/s\u00B2/rad"), "set_constant_torque", "get_constant_torque"); ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::RID, "body_rid"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape_index"), PropertyInfo(Variant::INT, "local_shape_index"))); ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::RID, "body_rid"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape_index"), PropertyInfo(Variant::INT, "local_shape_index"))); @@ -1145,6 +1137,7 @@ bool CharacterBody2D::move_and_slide() { if (!current_platform_velocity.is_equal_approx(Vector2())) { PhysicsServer2D::MotionParameters parameters(get_global_transform(), current_platform_velocity * delta, margin); + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. parameters.exclude_bodies.insert(platform_rid); if (platform_object_id.is_valid()) { parameters.exclude_objects.insert(platform_object_id); @@ -1203,6 +1196,7 @@ void CharacterBody2D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo for (int iteration = 0; iteration < max_slides; ++iteration) { PhysicsServer2D::MotionParameters parameters(get_global_transform(), motion, margin); + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. Vector2 prev_position = parameters.from.columns[2]; @@ -1359,6 +1353,7 @@ void CharacterBody2D::_move_and_slide_floating(double p_delta) { bool first_slide = true; for (int iteration = 0; iteration < max_slides; ++iteration) { PhysicsServer2D::MotionParameters parameters(get_global_transform(), motion, margin); + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. PhysicsServer2D::MotionResult result; bool collided = move_and_collide(parameters, result, false, false); @@ -1405,6 +1400,7 @@ void CharacterBody2D::_snap_on_floor(bool p_was_on_floor, bool p_vel_dir_facing_ real_t length = MAX(floor_snap_length, margin); PhysicsServer2D::MotionParameters parameters(get_global_transform(), -up_direction * length, margin); + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. parameters.collide_separation_ray = true; PhysicsServer2D::MotionResult result; @@ -1440,6 +1436,7 @@ bool CharacterBody2D::_on_floor_if_snapped(bool p_was_on_floor, bool p_vel_dir_f real_t length = MAX(floor_snap_length, margin); PhysicsServer2D::MotionParameters parameters(get_global_transform(), -up_direction * length, margin); + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. parameters.collide_separation_ray = true; PhysicsServer2D::MotionResult result; @@ -1755,7 +1752,7 @@ void CharacterBody2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "motion_mode", PROPERTY_HINT_ENUM, "Grounded,Floating", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_motion_mode", "get_motion_mode"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "up_direction"), "set_up_direction", "get_up_direction"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_velocity", "get_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "velocity", PROPERTY_HINT_NONE, "suffix:px/s", PROPERTY_USAGE_NO_EDITOR), "set_velocity", "get_velocity"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slide_on_ceiling"), "set_slide_on_ceiling_enabled", "is_slide_on_ceiling_enabled"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_slides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_max_slides", "get_max_slides"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wall_min_slide_angle", PROPERTY_HINT_RANGE, "0,180,0.1,radians", PROPERTY_USAGE_DEFAULT), "set_wall_min_slide_angle", "get_wall_min_slide_angle"); @@ -1769,7 +1766,7 @@ void CharacterBody2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_apply_velocity_on_leave", PROPERTY_HINT_ENUM, "Always,Upward Only,Never", PROPERTY_USAGE_DEFAULT), "set_moving_platform_apply_velocity_on_leave", "get_moving_platform_apply_velocity_on_leave"); ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_floor_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_floor_layers", "get_moving_platform_floor_layers"); ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_wall_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_wall_layers", "get_moving_platform_wall_layers"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001,suffix:px"), "set_safe_margin", "get_safe_margin"); BIND_ENUM_CONSTANT(MOTION_MODE_GROUNDED); BIND_ENUM_CONSTANT(MOTION_MODE_FLOATING); diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 1e4483b4d0..7401fc7578 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -200,7 +200,7 @@ private: struct ContactMonitor { bool locked = false; - Map<ObjectID, BodyState> body_map; + HashMap<ObjectID, BodyState> body_map; }; ContactMonitor *contact_monitor = nullptr; diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index f9986c2f30..4752d3148b 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -638,7 +638,7 @@ void Polygon2D::_bind_methods() { ADD_GROUP("Texture2D", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture"); ADD_GROUP("Texture2D", "texture_"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_offset"), "set_texture_offset", "get_texture_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_offset", PROPERTY_HINT_NONE, "suffix:px"), "set_texture_offset", "get_texture_offset"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_scale"), "set_texture_scale", "get_texture_scale"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater,radians"), "set_texture_rotation", "get_texture_rotation"); ADD_GROUP("Skeleton", ""); diff --git a/scene/2d/position_2d.cpp b/scene/2d/position_2d.cpp index d946ea63bf..cfa4d0401e 100644 --- a/scene/2d/position_2d.cpp +++ b/scene/2d/position_2d.cpp @@ -113,7 +113,7 @@ void Position2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_gizmo_extents", "extents"), &Position2D::set_gizmo_extents); ClassDB::bind_method(D_METHOD("get_gizmo_extents"), &Position2D::get_gizmo_extents); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gizmo_extents", PROPERTY_HINT_RANGE, "0,1000,0.1,or_greater"), "set_gizmo_extents", "get_gizmo_extents"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gizmo_extents", PROPERTY_HINT_RANGE, "0,1000,0.1,or_greater,suffix:px"), "set_gizmo_extents", "get_gizmo_extents"); } Position2D::Position2D() { diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index 37db9211e1..8953813452 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -353,7 +353,7 @@ void RayCast2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "is_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exclude_parent"), "set_exclude_parent_body", "get_exclude_parent_body"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "target_position"), "set_target_position", "get_target_position"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "target_position", PROPERTY_HINT_NONE, "suffix:px"), "set_target_position", "get_target_position"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_mask", "get_collision_mask"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hit_from_inside"), "set_hit_from_inside", "is_hit_from_inside_enabled"); diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h index 2c6f2d5c00..b809bc4b8e 100644 --- a/scene/2d/ray_cast_2d.h +++ b/scene/2d/ray_cast_2d.h @@ -44,7 +44,7 @@ class RayCast2D : public Node2D { int against_shape = 0; Vector2 collision_point; Vector2 collision_normal; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = 1; bool exclude_parent_body = true; diff --git a/scene/2d/shape_cast_2d.h b/scene/2d/shape_cast_2d.h index 15436d6e3d..78125b08bd 100644 --- a/scene/2d/shape_cast_2d.h +++ b/scene/2d/shape_cast_2d.h @@ -46,7 +46,7 @@ class ShapeCast2D : public Node2D { RID shape_rid; Vector2 target_position = Vector2(0, 50); - Set<RID> exclude; + RBSet<RID> exclude; real_t margin = 0.0; uint32_t collision_mask = 1; bool exclude_parent_body = true; diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp index aa039e07ee..cbacb7f579 100644 --- a/scene/2d/skeleton_2d.cpp +++ b/scene/2d/skeleton_2d.cpp @@ -81,14 +81,14 @@ bool Bone2D::_get(const StringName &p_path, Variant &r_ret) const { } void Bone2D::_get_property_list(List<PropertyInfo> *p_list) const { - p_list->push_back(PropertyInfo(Variant::BOOL, "auto_calculate_length_and_angle", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT)); + p_list->push_back(PropertyInfo(Variant::BOOL, PNAME("auto_calculate_length_and_angle"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT)); if (!autocalculate_length_and_angle) { - p_list->push_back(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "1, 1024, 1", PROPERTY_USAGE_DEFAULT)); - p_list->push_back(PropertyInfo(Variant::FLOAT, "bone_angle", PROPERTY_HINT_RANGE, "-360, 360, 0.01", PROPERTY_USAGE_DEFAULT)); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("length"), PROPERTY_HINT_RANGE, "1, 1024, 1", PROPERTY_USAGE_DEFAULT)); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("bone_angle"), PROPERTY_HINT_RANGE, "-360, 360, 0.01", PROPERTY_USAGE_DEFAULT)); } #ifdef TOOLS_ENABLED - p_list->push_back(PropertyInfo(Variant::BOOL, "editor_settings/show_bone_gizmo", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT)); + p_list->push_back(PropertyInfo(Variant::BOOL, PNAME("editor_settings/show_bone_gizmo"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT)); #endif // TOOLS_ENABLED } @@ -390,7 +390,7 @@ void Bone2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_bone_angle", "angle"), &Bone2D::set_bone_angle); ClassDB::bind_method(D_METHOD("get_bone_angle"), &Bone2D::get_bone_angle); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "rest"), "set_rest", "get_rest"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "rest", PROPERTY_HINT_NONE, "suffix:px"), "set_rest", "get_rest"); } void Bone2D::set_rest(const Transform2D &p_rest) { @@ -560,7 +560,7 @@ bool Skeleton2D::_get(const StringName &p_path, Variant &r_ret) const { void Skeleton2D::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back( - PropertyInfo(Variant::OBJECT, "modification_stack", + PropertyInfo(Variant::OBJECT, PNAME("modification_stack"), PROPERTY_HINT_RESOURCE_TYPE, "SkeletonModificationStack2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_DEFERRED_SET_RESOURCE | PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE)); diff --git a/scene/2d/sprite_2d.cpp b/scene/2d/sprite_2d.cpp index facd164a0e..b3062ca02a 100644 --- a/scene/2d/sprite_2d.cpp +++ b/scene/2d/sprite_2d.cpp @@ -439,14 +439,14 @@ void Sprite2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture"); ADD_GROUP("Offset", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset", PROPERTY_HINT_NONE, "suffix:px"), "set_offset", "get_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "is_flipped_h"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_v"), "set_flip_v", "is_flipped_v"); ADD_GROUP("Animation", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "hframes", PROPERTY_HINT_RANGE, "1,16384,1"), "set_hframes", "get_hframes"); ADD_PROPERTY(PropertyInfo(Variant::INT, "vframes", PROPERTY_HINT_RANGE, "1,16384,1"), "set_vframes", "get_vframes"); ADD_PROPERTY(PropertyInfo(Variant::INT, "frame"), "set_frame", "get_frame"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "frame_coords", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_frame_coords", "get_frame_coords"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "frame_coords", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_EDITOR), "set_frame_coords", "get_frame_coords"); ADD_GROUP("Region", "region_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "region_enabled"), "set_region_enabled", "is_region_enabled"); diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index cab57146b1..c4b923ff34 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -34,8 +34,8 @@ #include "scene/resources/world_2d.h" #include "servers/navigation_server_2d.h" -Map<Vector2i, TileSet::CellNeighbor> TileMap::TerrainConstraint::get_overlapping_coords_and_peering_bits() const { - Map<Vector2i, TileSet::CellNeighbor> output; +HashMap<Vector2i, TileSet::CellNeighbor> TileMap::TerrainConstraint::get_overlapping_coords_and_peering_bits() const { + HashMap<Vector2i, TileSet::CellNeighbor> output; Ref<TileSet> tile_set = tile_map->get_tileset(); ERR_FAIL_COND_V(!tile_set.is_valid(), output); @@ -742,7 +742,7 @@ Vector2i TileMap::_coords_to_quadrant_coords(int p_layer, const Vector2i &p_coor p_coords.y > 0 ? p_coords.y / quadrant_size : (p_coords.y - (quadrant_size - 1)) / quadrant_size); } -Map<Vector2i, TileMapQuadrant>::Element *TileMap::_create_quadrant(int p_layer, const Vector2i &p_qk) { +HashMap<Vector2i, TileMapQuadrant>::Iterator TileMap::_create_quadrant(int p_layer, const Vector2i &p_qk) { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), nullptr); TileMapQuadrant q; @@ -765,9 +765,9 @@ Map<Vector2i, TileMapQuadrant>::Element *TileMap::_create_quadrant(int p_layer, return layers[p_layer].quadrant_map.insert(p_qk, q); } -void TileMap::_make_quadrant_dirty(Map<Vector2i, TileMapQuadrant>::Element *Q) { +void TileMap::_make_quadrant_dirty(HashMap<Vector2i, TileMapQuadrant>::Iterator Q) { // Make the given quadrant dirty, then trigger an update later. - TileMapQuadrant &q = Q->get(); + TileMapQuadrant &q = Q->value; if (!q.dirty_list_element.in_list()) { layers[q.layer].dirty_quadrant_list.add(&q.dirty_list_element); } @@ -810,8 +810,8 @@ void TileMap::_update_dirty_quadrants() { for (SelfList<TileMapQuadrant> *q = dirty_quadrant_list.first(); q; q = q->next()) { q->self()->map_to_world.clear(); q->self()->world_to_map.clear(); - for (Set<Vector2i>::Element *E = q->self()->cells.front(); E; E = E->next()) { - Vector2i pk = E->get(); + for (const Vector2i &E : q->self()->cells) { + Vector2i pk = E; Vector2i pk_world_coords = map_to_world(pk); q->self()->map_to_world[pk] = pk_world_coords; q->self()->world_to_map[pk_world_coords] = pk; @@ -871,18 +871,18 @@ void TileMap::_recreate_layer_internals(int p_layer) { _rendering_update_layer(p_layer); // Recreate the quadrants. - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; for (const KeyValue<Vector2i, TileMapCell> &E : tile_map) { Vector2i qk = _coords_to_quadrant_coords(p_layer, Vector2i(E.key.x, E.key.y)); - Map<Vector2i, TileMapQuadrant>::Element *Q = layers[p_layer].quadrant_map.find(qk); + HashMap<Vector2i, TileMapQuadrant>::Iterator Q = layers[p_layer].quadrant_map.find(qk); if (!Q) { Q = _create_quadrant(p_layer, qk); - layers[p_layer].dirty_quadrant_list.add(&Q->get().dirty_list_element); + layers[p_layer].dirty_quadrant_list.add(&Q->value.dirty_list_element); } Vector2i pk = E.key; - Q->get().cells.insert(pk); + Q->value.cells.insert(pk); _make_quadrant_dirty(Q); } @@ -896,9 +896,9 @@ void TileMap::_recreate_internals() { } } -void TileMap::_erase_quadrant(Map<Vector2i, TileMapQuadrant>::Element *Q) { +void TileMap::_erase_quadrant(HashMap<Vector2i, TileMapQuadrant>::Iterator Q) { // Remove a quadrant. - TileMapQuadrant *q = &(Q->get()); + TileMapQuadrant *q = &(Q->value); // Call the cleanup_quadrant method on plugins. if (tile_set.is_valid()) { @@ -917,7 +917,7 @@ void TileMap::_erase_quadrant(Map<Vector2i, TileMapQuadrant>::Element *Q) { RenderingServer *rs = RenderingServer::get_singleton(); rs->free(q->debug_canvas_item); - layers[q->layer].quadrant_map.erase(Q); + layers[q->layer].quadrant_map.remove(Q); rect_cache_dirty = true; } @@ -926,7 +926,7 @@ void TileMap::_clear_layer_internals(int p_layer) { // Clear quadrants. while (layers[p_layer].quadrant_map.size()) { - _erase_quadrant(layers[p_layer].quadrant_map.front()); + _erase_quadrant(layers[p_layer].quadrant_map.begin()); } // Clear the layers internals. @@ -954,15 +954,17 @@ void TileMap::_recompute_rect_cache() { } Rect2 r_total; + bool first = true; for (unsigned int layer = 0; layer < layers.size(); layer++) { - for (const Map<Vector2i, TileMapQuadrant>::Element *E = layers[layer].quadrant_map.front(); E; E = E->next()) { + for (const KeyValue<Vector2i, TileMapQuadrant> &E : layers[layer].quadrant_map) { Rect2 r; - r.position = map_to_world(E->key() * get_effective_quadrant_size(layer)); - r.expand_to(map_to_world((E->key() + Vector2i(1, 0)) * get_effective_quadrant_size(layer))); - r.expand_to(map_to_world((E->key() + Vector2i(1, 1)) * get_effective_quadrant_size(layer))); - r.expand_to(map_to_world((E->key() + Vector2i(0, 1)) * get_effective_quadrant_size(layer))); - if (E == layers[layer].quadrant_map.front()) { + r.position = map_to_world(E.key * get_effective_quadrant_size(layer)); + r.expand_to(map_to_world((E.key + Vector2i(1, 0)) * get_effective_quadrant_size(layer))); + r.expand_to(map_to_world((E.key + Vector2i(1, 1)) * get_effective_quadrant_size(layer))); + r.expand_to(map_to_world((E.key + Vector2i(0, 1)) * get_effective_quadrant_size(layer))); + if (first) { r_total = r; + first = false; } else { r_total = r_total.merge(r); } @@ -1201,7 +1203,7 @@ void TileMap::_rendering_update_dirty_quadrants(SelfList<TileMapQuadrant>::List for (int layer = 0; layer < (int)layers.size(); layer++) { // Sort the quadrants coords per world coordinates - Map<Vector2i, Vector2i, TileMapQuadrant::CoordsWorldComparator> world_to_map; + RBMap<Vector2i, Vector2i, TileMapQuadrant::CoordsWorldComparator> world_to_map; for (const KeyValue<Vector2i, TileMapQuadrant> &E : layers[layer].quadrant_map) { world_to_map[map_to_world(E.key)] = E.key; } @@ -1248,8 +1250,8 @@ void TileMap::_rendering_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { // Draw a placeholder for scenes needing one. RenderingServer *rs = RenderingServer::get_singleton(); Vector2 quadrant_pos = map_to_world(p_quadrant->coords * get_effective_quadrant_size(p_quadrant->layer)); - for (Set<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { - const TileMapCell &c = get_cell(p_quadrant->layer, E_cell->get(), true); + for (const Vector2i &E_cell : p_quadrant->cells) { + const TileMapCell &c = get_cell(p_quadrant->layer, E_cell, true); TileSetSource *source; if (tile_set->has_source(c.source_id)) { @@ -1279,7 +1281,7 @@ void TileMap::_rendering_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { // Draw a placeholder tile. Transform2D xform; - xform.set_origin(map_to_world(E_cell->get()) - quadrant_pos); + xform.set_origin(map_to_world(E_cell) - quadrant_pos); rs->canvas_item_add_set_transform(p_quadrant->debug_canvas_item, xform); rs->canvas_item_add_circle(p_quadrant->debug_canvas_item, Vector2(), MIN(tile_set->get_tile_size().x, tile_set->get_tile_size().y) / 4.0, color); } @@ -1462,8 +1464,8 @@ void TileMap::_physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r q.bodies.clear(); // Recreate bodies and shapes. - for (Set<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { - TileMapCell c = get_cell(q.layer, E_cell->get(), true); + for (const Vector2i &E_cell : q.cells) { + TileMapCell c = get_cell(q.layer, E_cell, true); TileSetSource *source; if (tile_set->has_source(c.source_id)) { @@ -1476,8 +1478,8 @@ void TileMap::_physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); if (atlas_source) { const TileData *tile_data; - if (q.runtime_tile_data_cache.has(E_cell->get())) { - tile_data = q.runtime_tile_data_cache[E_cell->get()]; + if (q.runtime_tile_data_cache.has(E_cell)) { + tile_data = q.runtime_tile_data_cache[E_cell]; } else { tile_data = atlas_source->get_tile_data(c.get_atlas_coords(), c.alternative_tile); } @@ -1488,12 +1490,12 @@ void TileMap::_physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r // Create the body. RID body = ps->body_create(); - bodies_coords[body] = E_cell->get(); + bodies_coords[body] = E_cell; ps->body_set_mode(body, collision_animatable ? PhysicsServer2D::BODY_MODE_KINEMATIC : PhysicsServer2D::BODY_MODE_STATIC); ps->body_set_space(body, space); Transform2D xform; - xform.set_origin(map_to_world(E_cell->get())); + xform.set_origin(map_to_world(E_cell)); xform = global_transform * xform; ps->body_set_state(body, PhysicsServer2D::BODY_STATE_TRANSFORM, xform); @@ -1659,8 +1661,8 @@ void TileMap::_navigation_update_dirty_quadrants(SelfList<TileMapQuadrant>::List q.navigation_regions.clear(); // Get the navigation polygons and create regions. - for (Set<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { - TileMapCell c = get_cell(q.layer, E_cell->get(), true); + for (const Vector2i &E_cell : q.cells) { + TileMapCell c = get_cell(q.layer, E_cell, true); TileSetSource *source; if (tile_set->has_source(c.source_id)) { @@ -1673,12 +1675,12 @@ void TileMap::_navigation_update_dirty_quadrants(SelfList<TileMapQuadrant>::List TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); if (atlas_source) { const TileData *tile_data; - if (q.runtime_tile_data_cache.has(E_cell->get())) { - tile_data = q.runtime_tile_data_cache[E_cell->get()]; + if (q.runtime_tile_data_cache.has(E_cell)) { + tile_data = q.runtime_tile_data_cache[E_cell]; } else { tile_data = atlas_source->get_tile_data(c.get_atlas_coords(), c.alternative_tile); } - q.navigation_regions[E_cell->get()].resize(tile_set->get_navigation_layers_count()); + q.navigation_regions[E_cell].resize(tile_set->get_navigation_layers_count()); for (int layer_index = 0; layer_index < tile_set->get_navigation_layers_count(); layer_index++) { Ref<NavigationPolygon> navpoly; @@ -1686,13 +1688,13 @@ void TileMap::_navigation_update_dirty_quadrants(SelfList<TileMapQuadrant>::List if (navpoly.is_valid()) { Transform2D tile_transform; - tile_transform.set_origin(map_to_world(E_cell->get())); + tile_transform.set_origin(map_to_world(E_cell)); RID region = NavigationServer2D::get_singleton()->region_create(); NavigationServer2D::get_singleton()->region_set_map(region, get_world_2d()->get_navigation_map()); NavigationServer2D::get_singleton()->region_set_transform(region, tilemap_xform * tile_transform); NavigationServer2D::get_singleton()->region_set_navpoly(region, navpoly); - q.navigation_regions[E_cell->get()].write[layer_index] = region; + q.navigation_regions[E_cell].write[layer_index] = region; } } } @@ -1748,8 +1750,8 @@ void TileMap::_navigation_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { Vector2 quadrant_pos = map_to_world(p_quadrant->coords * get_effective_quadrant_size(p_quadrant->layer)); - for (Set<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { - TileMapCell c = get_cell(p_quadrant->layer, E_cell->get(), true); + for (const Vector2i &E_cell : p_quadrant->cells) { + TileMapCell c = get_cell(p_quadrant->layer, E_cell, true); TileSetSource *source; if (tile_set->has_source(c.source_id)) { @@ -1762,14 +1764,14 @@ void TileMap::_navigation_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source); if (atlas_source) { const TileData *tile_data; - if (p_quadrant->runtime_tile_data_cache.has(E_cell->get())) { - tile_data = p_quadrant->runtime_tile_data_cache[E_cell->get()]; + if (p_quadrant->runtime_tile_data_cache.has(E_cell)) { + tile_data = p_quadrant->runtime_tile_data_cache[E_cell]; } else { tile_data = atlas_source->get_tile_data(c.get_atlas_coords(), c.alternative_tile); } Transform2D xform; - xform.set_origin(map_to_world(E_cell->get()) - quadrant_pos); + xform.set_origin(map_to_world(E_cell) - quadrant_pos); rs->canvas_item_add_set_transform(p_quadrant->debug_canvas_item, xform); for (int layer_index = 0; layer_index < tile_set->get_navigation_layers_count(); layer_index++) { @@ -1823,8 +1825,8 @@ void TileMap::_scenes_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r_ q.scenes.clear(); // Recreate the scenes. - for (Set<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) { - const TileMapCell &c = get_cell(q.layer, E_cell->get(), true); + for (const Vector2i &E_cell : q.cells) { + const TileMapCell &c = get_cell(q.layer, E_cell, true); TileSetSource *source; if (tile_set->has_source(c.source_id)) { @@ -1843,13 +1845,13 @@ void TileMap::_scenes_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r_ Control *scene_as_control = Object::cast_to<Control>(scene); Node2D *scene_as_node2d = Object::cast_to<Node2D>(scene); if (scene_as_control) { - scene_as_control->set_position(map_to_world(E_cell->get()) + scene_as_control->get_position()); + scene_as_control->set_position(map_to_world(E_cell) + scene_as_control->get_position()); } else if (scene_as_node2d) { Transform2D xform; - xform.set_origin(map_to_world(E_cell->get())); + xform.set_origin(map_to_world(E_cell)); scene_as_node2d->set_transform(xform * scene_as_node2d->get_transform()); } - q.scenes[E_cell->get()] = scene->get_name(); + q.scenes[E_cell] = scene->get_name(); } } } @@ -1881,8 +1883,8 @@ void TileMap::_scenes_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { // Draw a placeholder for scenes needing one. RenderingServer *rs = RenderingServer::get_singleton(); Vector2 quadrant_pos = map_to_world(p_quadrant->coords * get_effective_quadrant_size(p_quadrant->layer)); - for (Set<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) { - const TileMapCell &c = get_cell(p_quadrant->layer, E_cell->get(), true); + for (const Vector2i &E_cell : p_quadrant->cells) { + const TileMapCell &c = get_cell(p_quadrant->layer, E_cell, true); TileSetSource *source; if (tile_set->has_source(c.source_id)) { @@ -1910,7 +1912,7 @@ void TileMap::_scenes_draw_quadrant_debug(TileMapQuadrant *p_quadrant) { // Draw a placeholder tile. Transform2D xform; - xform.set_origin(map_to_world(E_cell->get()) - quadrant_pos); + xform.set_origin(map_to_world(E_cell) - quadrant_pos); rs->canvas_item_add_set_transform(p_quadrant->debug_canvas_item, xform); rs->canvas_item_add_circle(p_quadrant->debug_canvas_item, Vector2(), MIN(tile_set->get_tile_size().x, tile_set->get_tile_size().y) / 4.0, color); } @@ -1923,9 +1925,9 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c ERR_FAIL_INDEX(p_layer, (int)layers.size()); // Set the current cell tile (using integer position). - Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; Vector2i pk(p_coords); - Map<Vector2i, TileMapCell>::Element *E = tile_map.find(pk); + HashMap<Vector2i, TileMapCell>::Iterator E = tile_map.find(pk); int source_id = p_source_id; Vector2i atlas_coords = p_atlas_coords; @@ -1946,7 +1948,7 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c // Get the quadrant Vector2i qk = _coords_to_quadrant_coords(p_layer, pk); - Map<Vector2i, TileMapQuadrant>::Element *Q = layers[p_layer].quadrant_map.find(qk); + HashMap<Vector2i, TileMapQuadrant>::Iterator Q = layers[p_layer].quadrant_map.find(qk); if (source_id == TileSet::INVALID_SOURCE) { // Erase existing cell in the tile map. @@ -1954,7 +1956,7 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c // Erase existing cell in the quadrant. ERR_FAIL_COND(!Q); - TileMapQuadrant &q = Q->get(); + TileMapQuadrant &q = Q->value; q.cells.erase(pk); @@ -1975,18 +1977,18 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c if (!Q) { Q = _create_quadrant(p_layer, qk); } - TileMapQuadrant &q = Q->get(); + TileMapQuadrant &q = Q->value; q.cells.insert(pk); } else { ERR_FAIL_COND(!Q); // TileMapQuadrant should exist... - if (E->get().source_id == source_id && E->get().get_atlas_coords() == atlas_coords && E->get().alternative_tile == alternative_tile) { + if (E->value.source_id == source_id && E->value.get_atlas_coords() == atlas_coords && E->value.alternative_tile == alternative_tile) { return; // Nothing changed. } } - TileMapCell &c = E->get(); + TileMapCell &c = E->value; c.source_id = source_id; c.set_atlas_coords(atlas_coords); @@ -2005,57 +2007,57 @@ int TileMap::get_cell_source_id(int p_layer, const Vector2i &p_coords, bool p_us ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), TileSet::INVALID_SOURCE); // Get a cell source id from position - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; - const Map<Vector2i, TileMapCell>::Element *E = tile_map.find(p_coords); + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + HashMap<Vector2i, TileMapCell>::ConstIterator E = tile_map.find(p_coords); if (!E) { return TileSet::INVALID_SOURCE; } if (p_use_proxies && tile_set.is_valid()) { - Array proxyed = tile_set->map_tile_proxy(E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + Array proxyed = tile_set->map_tile_proxy(E->value.source_id, E->value.get_atlas_coords(), E->value.alternative_tile); return proxyed[0]; } - return E->get().source_id; + return E->value.source_id; } Vector2i TileMap::get_cell_atlas_coords(int p_layer, const Vector2i &p_coords, bool p_use_proxies) const { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), TileSetSource::INVALID_ATLAS_COORDS); // Get a cell source id from position - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; - const Map<Vector2i, TileMapCell>::Element *E = tile_map.find(p_coords); + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + HashMap<Vector2i, TileMapCell>::ConstIterator E = tile_map.find(p_coords); if (!E) { return TileSetSource::INVALID_ATLAS_COORDS; } if (p_use_proxies && tile_set.is_valid()) { - Array proxyed = tile_set->map_tile_proxy(E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + Array proxyed = tile_set->map_tile_proxy(E->value.source_id, E->value.get_atlas_coords(), E->value.alternative_tile); return proxyed[1]; } - return E->get().get_atlas_coords(); + return E->value.get_atlas_coords(); } int TileMap::get_cell_alternative_tile(int p_layer, const Vector2i &p_coords, bool p_use_proxies) const { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), TileSetSource::INVALID_TILE_ALTERNATIVE); // Get a cell source id from position - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; - const Map<Vector2i, TileMapCell>::Element *E = tile_map.find(p_coords); + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + HashMap<Vector2i, TileMapCell>::ConstIterator E = tile_map.find(p_coords); if (!E) { return TileSetSource::INVALID_TILE_ALTERNATIVE; } if (p_use_proxies && tile_set.is_valid()) { - Array proxyed = tile_set->map_tile_proxy(E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile); + Array proxyed = tile_set->map_tile_proxy(E->value.source_id, E->value.get_atlas_coords(), E->value.alternative_tile); return proxyed[2]; } - return E->get().alternative_tile; + return E->value.alternative_tile; } Ref<TileMapPattern> TileMap::get_pattern(int p_layer, TypedArray<Vector2i> p_coords_array) { @@ -2147,13 +2149,13 @@ void TileMap::set_pattern(int p_layer, Vector2i p_position, const Ref<TileMapPat } } -Set<TileSet::TerrainsPattern> TileMap::_get_valid_terrains_patterns_for_constraints(int p_terrain_set, const Vector2i &p_position, Set<TerrainConstraint> p_constraints) { +RBSet<TileSet::TerrainsPattern> TileMap::_get_valid_terrains_patterns_for_constraints(int p_terrain_set, const Vector2i &p_position, RBSet<TerrainConstraint> p_constraints) { if (!tile_set.is_valid()) { - return Set<TileSet::TerrainsPattern>(); + return RBSet<TileSet::TerrainsPattern>(); } // Returns all tiles compatible with the given constraints. - Set<TileSet::TerrainsPattern> compatible_terrain_tile_patterns; + RBSet<TileSet::TerrainsPattern> compatible_terrain_tile_patterns; for (TileSet::TerrainsPattern &terrain_pattern : tile_set->get_terrains_pattern_set(p_terrain_set)) { int valid = true; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { @@ -2161,7 +2163,7 @@ Set<TileSet::TerrainsPattern> TileMap::_get_valid_terrains_patterns_for_constrai if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, bit)) { // Check if the bit is compatible with the constraints. TerrainConstraint terrain_bit_constraint = TerrainConstraint(this, p_position, bit, terrain_pattern.get_terrain(bit)); - Set<TerrainConstraint>::Element *in_set_constraint_element = p_constraints.find(terrain_bit_constraint); + RBSet<TerrainConstraint>::Element *in_set_constraint_element = p_constraints.find(terrain_bit_constraint); if (in_set_constraint_element && in_set_constraint_element->get().get_terrain() != terrain_bit_constraint.get_terrain()) { valid = false; break; @@ -2177,34 +2179,34 @@ Set<TileSet::TerrainsPattern> TileMap::_get_valid_terrains_patterns_for_constrai return compatible_terrain_tile_patterns; } -Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_removed_cells_list(int p_layer, const Set<Vector2i> &p_to_replace, int p_terrain_set, bool p_ignore_empty_terrains) const { +RBSet<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_removed_cells_list(int p_layer, const RBSet<Vector2i> &p_to_replace, int p_terrain_set, bool p_ignore_empty_terrains) const { if (!tile_set.is_valid()) { - return Set<TerrainConstraint>(); + return RBSet<TerrainConstraint>(); } - ERR_FAIL_INDEX_V(p_terrain_set, tile_set->get_terrain_sets_count(), Set<TerrainConstraint>()); - ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), Set<TerrainConstraint>()); + ERR_FAIL_INDEX_V(p_terrain_set, tile_set->get_terrain_sets_count(), RBSet<TerrainConstraint>()); + ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), RBSet<TerrainConstraint>()); // Build a set of dummy constraints get the constrained points. - Set<TerrainConstraint> dummy_constraints; - for (Set<Vector2i>::Element *E = p_to_replace.front(); E; E = E->next()) { + RBSet<TerrainConstraint> dummy_constraints; + for (const Vector2i &E : p_to_replace) { for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { // Iterates over sides. TileSet::CellNeighbor bit = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, bit)) { - dummy_constraints.insert(TerrainConstraint(this, E->get(), bit, -1)); + dummy_constraints.insert(TerrainConstraint(this, E, bit, -1)); } } } // For each constrained point, we get all overlapping tiles, and select the most adequate terrain for it. - Set<TerrainConstraint> constraints; - for (Set<TerrainConstraint>::Element *E = dummy_constraints.front(); E; E = E->next()) { - TerrainConstraint c = E->get(); + RBSet<TerrainConstraint> constraints; + for (const TerrainConstraint &E : dummy_constraints) { + TerrainConstraint c = E; - Map<int, int> terrain_count; + HashMap<int, int> terrain_count; // Count the number of occurrences per terrain. - Map<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = c.get_overlapping_coords_and_peering_bits(); + HashMap<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = c.get_overlapping_coords_and_peering_bits(); for (const KeyValue<Vector2i, TileSet::CellNeighbor> &E_overlapping : overlapping_terrain_bits) { if (!p_to_replace.has(E_overlapping.key)) { TileData *neighbor_tile_data = nullptr; @@ -2250,13 +2252,13 @@ Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_removed_ce return constraints; } -Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_added_tile(Vector2i p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const { +RBSet<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_added_tile(Vector2i p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const { if (!tile_set.is_valid()) { - return Set<TerrainConstraint>(); + return RBSet<TerrainConstraint>(); } // Compute the constraints needed from the surrounding tiles. - Set<TerrainConstraint> output; + RBSet<TerrainConstraint> output; for (uint32_t i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { TileSet::CellNeighbor side = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, side)) { @@ -2268,35 +2270,35 @@ Set<TileMap::TerrainConstraint> TileMap::get_terrain_constraints_from_added_tile return output; } -Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse(const Set<Vector2i> &p_to_replace, int p_terrain_set, const Set<TerrainConstraint> p_constraints) { +HashMap<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse(const RBSet<Vector2i> &p_to_replace, int p_terrain_set, const RBSet<TerrainConstraint> p_constraints) { if (!tile_set.is_valid()) { - return Map<Vector2i, TileSet::TerrainsPattern>(); + return HashMap<Vector2i, TileSet::TerrainsPattern>(); } // Copy the constraints set. - Set<TerrainConstraint> constraints = p_constraints; + RBSet<TerrainConstraint> constraints = p_constraints; // Compute all acceptable patterns for each cell. - Map<Vector2i, Set<TileSet::TerrainsPattern>> per_cell_acceptable_tiles; + HashMap<Vector2i, RBSet<TileSet::TerrainsPattern>> per_cell_acceptable_tiles; for (Vector2i cell : p_to_replace) { per_cell_acceptable_tiles[cell] = _get_valid_terrains_patterns_for_constraints(p_terrain_set, cell, constraints); } // Output map. - Map<Vector2i, TileSet::TerrainsPattern> output; + HashMap<Vector2i, TileSet::TerrainsPattern> output; // Add all positions to a set. - Set<Vector2i> to_replace = Set<Vector2i>(p_to_replace); + RBSet<Vector2i> to_replace = RBSet<Vector2i>(p_to_replace); while (!to_replace.is_empty()) { // Compute the minimum number of tile possibilities for each cell. int min_nb_possibilities = 100000000; - for (const KeyValue<Vector2i, Set<TileSet::TerrainsPattern>> &E : per_cell_acceptable_tiles) { + for (const KeyValue<Vector2i, RBSet<TileSet::TerrainsPattern>> &E : per_cell_acceptable_tiles) { min_nb_possibilities = MIN(min_nb_possibilities, E.value.size()); } // Get the set of possible cells to fill, out of the most constrained ones. LocalVector<Vector2i> to_choose_from; - for (const KeyValue<Vector2i, Set<TileSet::TerrainsPattern>> &E : per_cell_acceptable_tiles) { + for (const KeyValue<Vector2i, RBSet<TileSet::TerrainsPattern>> &E : per_cell_acceptable_tiles) { if (E.value.size() == min_nb_possibilities) { to_choose_from.push_back(E.key); } @@ -2306,7 +2308,7 @@ Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse( Vector2i selected_cell_to_replace = to_choose_from[Math::random(0, to_choose_from.size() - 1)]; // Get the list of acceptable patterns for the given cell. - Set<TileSet::TerrainsPattern> valid_tiles = per_cell_acceptable_tiles[selected_cell_to_replace]; + RBSet<TileSet::TerrainsPattern> valid_tiles = per_cell_acceptable_tiles[selected_cell_to_replace]; if (valid_tiles.is_empty()) { break; // No possibilities :/ } @@ -2317,7 +2319,7 @@ Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse( LocalVector<int> terrains_counts; int pattern_index = 0; for (const TileSet::TerrainsPattern &pattern : valid_tiles) { - Set<int> terrains; + RBSet<int> terrains; for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) { TileSet::CellNeighbor side = TileSet::CellNeighbor(i); if (tile_set->is_valid_peering_bit_terrain(p_terrain_set, side)) { @@ -2345,9 +2347,9 @@ Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse( per_cell_acceptable_tiles.erase(selected_cell_to_replace); // Add the new constraints from the added tiles. - Set<TerrainConstraint> new_constraints = get_terrain_constraints_from_added_tile(selected_cell_to_replace, p_terrain_set, selected_terrain_tile_pattern); - for (Set<TerrainConstraint>::Element *E_constraint = new_constraints.front(); E_constraint; E_constraint = E_constraint->next()) { - constraints.insert(E_constraint->get()); + RBSet<TerrainConstraint> new_constraints = get_terrain_constraints_from_added_tile(selected_cell_to_replace, p_terrain_set, selected_terrain_tile_pattern); + for (const TerrainConstraint &E_constraint : new_constraints) { + constraints.insert(E_constraint); } // Compute valid tiles again for neighbors. @@ -2369,14 +2371,14 @@ void TileMap::set_cells_from_surrounding_terrains(int p_layer, TypedArray<Vector ERR_FAIL_INDEX(p_layer, (int)layers.size()); ERR_FAIL_INDEX(p_terrain_set, tile_set->get_terrain_sets_count()); - Set<Vector2i> coords_set; + RBSet<Vector2i> coords_set; for (int i = 0; i < p_coords_array.size(); i++) { coords_set.insert(p_coords_array[i]); } - Set<TileMap::TerrainConstraint> constraints = get_terrain_constraints_from_removed_cells_list(p_layer, coords_set, p_terrain_set, p_ignore_empty_terrains); + RBSet<TileMap::TerrainConstraint> constraints = get_terrain_constraints_from_removed_cells_list(p_layer, coords_set, p_terrain_set, p_ignore_empty_terrains); - Map<Vector2i, TileSet::TerrainsPattern> wfc_output = terrain_wave_function_collapse(coords_set, p_terrain_set, constraints); + HashMap<Vector2i, TileSet::TerrainsPattern> wfc_output = terrain_wave_function_collapse(coords_set, p_terrain_set, constraints); for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &kv : wfc_output) { TileMapCell cell = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, kv.value); set_cell(p_layer, kv.key, cell.source_id, cell.get_atlas_coords(), cell.alternative_tile); @@ -2385,11 +2387,11 @@ void TileMap::set_cells_from_surrounding_terrains(int p_layer, TypedArray<Vector TileMapCell TileMap::get_cell(int p_layer, const Vector2i &p_coords, bool p_use_proxies) const { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), TileMapCell()); - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; if (!tile_map.has(p_coords)) { return TileMapCell(); } else { - TileMapCell c = tile_map.find(p_coords)->get(); + TileMapCell c = tile_map.find(p_coords)->value; if (p_use_proxies && tile_set.is_valid()) { Array proxyed = tile_set->map_tile_proxy(c.source_id, c.get_atlas_coords(), c.alternative_tile); c.source_id = proxyed[0]; @@ -2400,7 +2402,7 @@ TileMapCell TileMap::get_cell(int p_layer, const Vector2i &p_coords, bool p_use_ } } -Map<Vector2i, TileMapQuadrant> *TileMap::get_quadrant_map(int p_layer) { +HashMap<Vector2i, TileMapQuadrant> *TileMap::get_quadrant_map(int p_layer) { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), nullptr); return &layers[p_layer].quadrant_map; @@ -2415,16 +2417,16 @@ void TileMap::fix_invalid_tiles() { ERR_FAIL_COND_MSG(tile_set.is_null(), "Cannot fix invalid tiles if Tileset is not open."); for (unsigned int i = 0; i < layers.size(); i++) { - const Map<Vector2i, TileMapCell> &tile_map = layers[i].tile_map; - Set<Vector2i> coords; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[i].tile_map; + RBSet<Vector2i> coords; for (const KeyValue<Vector2i, TileMapCell> &E : tile_map) { TileSetSource *source = *tile_set->get_source(E.value.source_id); if (!source || !source->has_tile(E.value.get_atlas_coords()) || !source->has_alternative_tile(E.value.get_atlas_coords(), E.value.alternative_tile)) { coords.insert(E.key); } } - for (Set<Vector2i>::Element *E = coords.front(); E; E = E->next()) { - set_cell(i, E->get(), TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); + for (const Vector2i &E : coords) { + set_cell(i, E, TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE); } } } @@ -2546,7 +2548,7 @@ Vector<int> TileMap::_get_tile_data(int p_layer) const { ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), Vector<int>()); // Export tile data to raw format - const Map<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[p_layer].tile_map; Vector<int> data; data.resize(tile_map.size() * 3); int *w = data.ptrw(); @@ -3375,10 +3377,10 @@ Rect2 TileMap::get_used_rect() { // Not const because of cache used_rect_cache = Rect2i(); for (unsigned int i = 0; i < layers.size(); i++) { - const Map<Vector2i, TileMapCell> &tile_map = layers[i].tile_map; + const HashMap<Vector2i, TileMapCell> &tile_map = layers[i].tile_map; if (tile_map.size() > 0) { if (first) { - used_rect_cache = Rect2i(tile_map.front()->key().x, tile_map.front()->key().y, 0, 0); + used_rect_cache = Rect2i(tile_map.begin()->key.x, tile_map.begin()->key.y, 0, 0); first = false; } @@ -3448,8 +3450,8 @@ void TileMap::set_texture_filter(TextureFilter p_texture_filter) { // Set a default texture filter for the whole tilemap CanvasItem::set_texture_filter(p_texture_filter); for (unsigned int layer = 0; layer < layers.size(); layer++) { - for (Map<Vector2i, TileMapQuadrant>::Element *F = layers[layer].quadrant_map.front(); F; F = F->next()) { - TileMapQuadrant &q = F->get(); + for (HashMap<Vector2i, TileMapQuadrant>::Iterator F = layers[layer].quadrant_map.begin(); F; ++F) { + TileMapQuadrant &q = F->value; for (const RID &ci : q.canvas_items) { RenderingServer::get_singleton()->canvas_item_set_default_texture_filter(ci, RS::CanvasItemTextureFilter(p_texture_filter)); _make_quadrant_dirty(F); @@ -3463,8 +3465,8 @@ void TileMap::set_texture_repeat(CanvasItem::TextureRepeat p_texture_repeat) { // Set a default texture repeat for the whole tilemap CanvasItem::set_texture_repeat(p_texture_repeat); for (unsigned int layer = 0; layer < layers.size(); layer++) { - for (Map<Vector2i, TileMapQuadrant>::Element *F = layers[layer].quadrant_map.front(); F; F = F->next()) { - TileMapQuadrant &q = F->get(); + for (HashMap<Vector2i, TileMapQuadrant>::Iterator F = layers[layer].quadrant_map.begin(); F; ++F) { + TileMapQuadrant &q = F->value; for (const RID &ci : q.canvas_items) { RenderingServer::get_singleton()->canvas_item_set_default_texture_repeat(ci, RS::CanvasItemTextureRepeat(p_texture_repeat)); _make_quadrant_dirty(F); @@ -3512,7 +3514,7 @@ TypedArray<Vector2i> TileMap::get_surrounding_tiles(Vector2i coords) { return around; } -void TileMap::draw_cells_outline(Control *p_control, Set<Vector2i> p_cells, Color p_color, Transform2D p_transform) { +void TileMap::draw_cells_outline(Control *p_control, RBSet<Vector2i> p_cells, Color p_color, Transform2D p_transform) { if (!tile_set.is_valid()) { return; } @@ -3522,11 +3524,11 @@ void TileMap::draw_cells_outline(Control *p_control, Set<Vector2i> p_cells, Colo Vector<Vector2> polygon = tile_set->get_tile_shape_polygon(); TileSet::TileShape shape = tile_set->get_tile_shape(); - for (Set<Vector2i>::Element *E = p_cells.front(); E; E = E->next()) { - Vector2 center = map_to_world(E->get()); + for (const Vector2i &E : p_cells) { + Vector2 center = map_to_world(E); #define DRAW_SIDE_IF_NEEDED(side, polygon_index_from, polygon_index_to) \ - if (!p_cells.has(get_neighbor_cell(E->get(), side))) { \ + if (!p_cells.has(get_neighbor_cell(E, side))) { \ Vector2 from = p_transform.xform(center + polygon[polygon_index_from] * tile_size); \ Vector2 to = p_transform.xform(center + polygon[polygon_index_to] * tile_size); \ p_control->draw_line(from, to, p_color); \ @@ -3576,7 +3578,7 @@ TypedArray<String> TileMap::get_configuration_warnings() const { TypedArray<String> warnings = Node::get_configuration_warnings(); // Retrieve the set of Z index values with a Y-sorted layer. - Set<int> y_sorted_z_index; + RBSet<int> y_sorted_z_index; for (int layer = 0; layer < (int)layers.size(); layer++) { if (layers[layer].y_sort_enabled) { y_sorted_z_index.insert(layers[layer].z_index); diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index a0655dea2a..02a2b3a1c6 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -57,11 +57,11 @@ struct TileMapQuadrant { Vector2i coords; // TileMapCells - Set<Vector2i> cells; + RBSet<Vector2i> cells; // We need those two maps to sort by world position for rendering // This is kind of workaround, it would be better to sort the cells directly in the "cells" set instead. - Map<Vector2i, Vector2i> map_to_world; - Map<Vector2i, Vector2i, CoordsWorldComparator> world_to_map; + RBMap<Vector2i, Vector2i> map_to_world; + RBMap<Vector2i, Vector2i, CoordsWorldComparator> world_to_map; // Debug. RID debug_canvas_item; @@ -74,13 +74,13 @@ struct TileMapQuadrant { List<RID> bodies; // Navigation. - Map<Vector2i, Vector<RID>> navigation_regions; + HashMap<Vector2i, Vector<RID>> navigation_regions; // Scenes. - Map<Vector2i, String> scenes; + HashMap<Vector2i, String> scenes; // Runtime TileData cache. - Map<Vector2i, TileData *> runtime_tile_data_cache; + HashMap<Vector2i, TileData *> runtime_tile_data_cache; void operator=(const TileMapQuadrant &q) { layer = q.layer; @@ -135,7 +135,7 @@ public: return base_cell_coords; } - Map<Vector2i, TileSet::CellNeighbor> get_overlapping_coords_and_peering_bits() const; + HashMap<Vector2i, TileSet::CellNeighbor> get_overlapping_coords_and_peering_bits() const; void set_terrain(int p_terrain) { terrain = p_terrain; @@ -193,22 +193,22 @@ private: int y_sort_origin = 0; int z_index = 0; RID canvas_item; - Map<Vector2i, TileMapCell> tile_map; - Map<Vector2i, TileMapQuadrant> quadrant_map; + HashMap<Vector2i, TileMapCell> tile_map; + HashMap<Vector2i, TileMapQuadrant> quadrant_map; SelfList<TileMapQuadrant>::List dirty_quadrant_list; }; LocalVector<TileMapLayer> layers; int selected_layer = -1; // Mapping for RID to coords. - Map<RID, Vector2i> bodies_coords; + HashMap<RID, Vector2i> bodies_coords; // Quadrants and internals management. Vector2i _coords_to_quadrant_coords(int p_layer, const Vector2i &p_coords) const; - Map<Vector2i, TileMapQuadrant>::Element *_create_quadrant(int p_layer, const Vector2i &p_qk); + HashMap<Vector2i, TileMapQuadrant>::Iterator _create_quadrant(int p_layer, const Vector2i &p_qk); - void _make_quadrant_dirty(Map<Vector2i, TileMapQuadrant>::Element *Q); + void _make_quadrant_dirty(HashMap<Vector2i, TileMapQuadrant>::Iterator Q); void _make_all_quadrants_dirty(); void _queue_update_dirty_quadrants(); @@ -217,7 +217,7 @@ private: void _recreate_layer_internals(int p_layer); void _recreate_internals(); - void _erase_quadrant(Map<Vector2i, TileMapQuadrant>::Element *Q); + void _erase_quadrant(HashMap<Vector2i, TileMapQuadrant>::Iterator Q); void _clear_layer_internals(int p_layer); void _clear_internals(); @@ -251,7 +251,7 @@ private: void _scenes_draw_quadrant_debug(TileMapQuadrant *p_quadrant); // Terrains. - Set<TileSet::TerrainsPattern> _get_valid_terrains_patterns_for_constraints(int p_terrain_set, const Vector2i &p_position, Set<TerrainConstraint> p_constraints); + RBSet<TileSet::TerrainsPattern> _get_valid_terrains_patterns_for_constraints(int p_terrain_set, const Vector2i &p_position, RBSet<TerrainConstraint> p_constraints); // Set and get tiles from data arrays. void _set_tile_data(int p_layer, const Vector<int> &p_data); @@ -333,14 +333,14 @@ public: void set_pattern(int p_layer, Vector2i p_position, const Ref<TileMapPattern> p_pattern); // Terrains. - Set<TerrainConstraint> get_terrain_constraints_from_removed_cells_list(int p_layer, const Set<Vector2i> &p_to_replace, int p_terrain_set, bool p_ignore_empty_terrains = true) const; // Not exposed. - Set<TerrainConstraint> get_terrain_constraints_from_added_tile(Vector2i p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const; // Not exposed. - Map<Vector2i, TileSet::TerrainsPattern> terrain_wave_function_collapse(const Set<Vector2i> &p_to_replace, int p_terrain_set, const Set<TerrainConstraint> p_constraints); // Not exposed. + RBSet<TerrainConstraint> get_terrain_constraints_from_removed_cells_list(int p_layer, const RBSet<Vector2i> &p_to_replace, int p_terrain_set, bool p_ignore_empty_terrains = true) const; // Not exposed. + RBSet<TerrainConstraint> get_terrain_constraints_from_added_tile(Vector2i p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const; // Not exposed. + HashMap<Vector2i, TileSet::TerrainsPattern> terrain_wave_function_collapse(const RBSet<Vector2i> &p_to_replace, int p_terrain_set, const RBSet<TerrainConstraint> p_constraints); // Not exposed. void set_cells_from_surrounding_terrains(int p_layer, TypedArray<Vector2i> p_coords_array, int p_terrain_set, bool p_ignore_empty_terrains = true); // Not exposed to users TileMapCell get_cell(int p_layer, const Vector2i &p_coords, bool p_use_proxies = false) const; - Map<Vector2i, TileMapQuadrant> *get_quadrant_map(int p_layer); + HashMap<Vector2i, TileMapQuadrant> *get_quadrant_map(int p_layer); int get_effective_quadrant_size(int p_layer) const; //--- @@ -377,7 +377,7 @@ public: // Helpers? TypedArray<Vector2i> get_surrounding_tiles(Vector2i coords); - void draw_cells_outline(Control *p_control, Set<Vector2i> p_cells, Color p_color, Transform2D p_transform = Transform2D()); + void draw_cells_outline(Control *p_control, RBSet<Vector2i> p_cells, Color p_color, Transform2D p_transform = Transform2D()); // Virtual function to modify the TileData at runtime GDVIRTUAL2R(bool, _use_tile_data_runtime_update, int, Vector2i); diff --git a/scene/2d/visible_on_screen_notifier_2d.cpp b/scene/2d/visible_on_screen_notifier_2d.cpp index 4bceaf71c6..33dd737416 100644 --- a/scene/2d/visible_on_screen_notifier_2d.cpp +++ b/scene/2d/visible_on_screen_notifier_2d.cpp @@ -101,7 +101,7 @@ void VisibleOnScreenNotifier2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_rect"), &VisibleOnScreenNotifier2D::get_rect); ClassDB::bind_method(D_METHOD("is_on_screen"), &VisibleOnScreenNotifier2D::is_on_screen); - ADD_PROPERTY(PropertyInfo(Variant::RECT2, "rect"), "set_rect", "get_rect"); + ADD_PROPERTY(PropertyInfo(Variant::RECT2, "rect", PROPERTY_HINT_NONE, "suffix:px"), "set_rect", "get_rect"); ADD_SIGNAL(MethodInfo("screen_entered")); ADD_SIGNAL(MethodInfo("screen_exited")); @@ -198,7 +198,7 @@ void VisibleOnScreenEnabler2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_enable_node_path"), &VisibleOnScreenEnabler2D::get_enable_node_path); ADD_GROUP("Enabling", "enable_"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "enable_mode", PROPERTY_HINT_ENUM, "Inherit,Always,WhenPaused"), "set_enable_mode", "get_enable_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "enable_mode", PROPERTY_HINT_ENUM, "Inherit,Always,When Paused"), "set_enable_mode", "get_enable_mode"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "enable_node_path"), "set_enable_node_path", "get_enable_node_path"); BIND_ENUM_CONSTANT(ENABLE_MODE_INHERIT); diff --git a/scene/2d/visible_on_screen_notifier_2d.h b/scene/2d/visible_on_screen_notifier_2d.h index e0d580f174..3165eb92df 100644 --- a/scene/2d/visible_on_screen_notifier_2d.h +++ b/scene/2d/visible_on_screen_notifier_2d.h @@ -37,7 +37,7 @@ class Viewport; class VisibleOnScreenNotifier2D : public Node2D { GDCLASS(VisibleOnScreenNotifier2D, Node2D); - Set<Viewport *> viewports; + RBSet<Viewport *> viewports; Rect2 rect; diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp index fb37e64a1a..c8c8c6a4e5 100644 --- a/scene/3d/area_3d.cpp +++ b/scene/3d/area_3d.cpp @@ -192,14 +192,14 @@ void Area3D::_body_enter_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, BodyState>::Element *E = body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; emit_signal(SceneStringNames::get_singleton()->body_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].area_shape); } } @@ -207,13 +207,13 @@ void Area3D::_body_exit_tree(ObjectID p_id) { Object *obj = ObjectDB::get_instance(p_id); Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, BodyState>::Element *E = body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; emit_signal(SceneStringNames::get_singleton()->body_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].area_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].area_shape); } } @@ -224,7 +224,7 @@ void Area3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i Object *obj = ObjectDB::get_instance(objid); Node *node = Object::cast_to<Node>(obj); - Map<ObjectID, BodyState>::Element *E = body_map.find(objid); + HashMap<ObjectID, BodyState>::Iterator E = body_map.find(objid); if (!body_in && !E) { return; //likely removed from the tree @@ -235,36 +235,36 @@ void Area3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i if (body_in) { if (!E) { E = body_map.insert(objid, BodyState()); - E->get().rid = p_body; - E->get().rc = 0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_body; + E->value.rc = 0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_body_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_body_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } } } - E->get().rc++; + E->value.rc++; if (node) { - E->get().shapes.insert(ShapePair(p_body_shape, p_area_shape)); + E->value.shapes.insert(ShapePair(p_body_shape, p_area_shape)); } - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_entered, p_body, node, p_body_shape, p_area_shape); } } else { - E->get().rc--; + E->value.rc--; if (node) { - E->get().shapes.erase(ShapePair(p_body_shape, p_area_shape)); + E->value.shapes.erase(ShapePair(p_body_shape, p_area_shape)); } - bool in_tree = E->get().in_tree; - if (E->get().rc == 0) { - body_map.erase(E); + bool in_tree = E->value.in_tree; + if (E->value.rc == 0) { + body_map.remove(E); if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_body_exit_tree)); @@ -285,7 +285,7 @@ void Area3D::_clear_monitoring() { ERR_FAIL_COND_MSG(locked, "This function can't be used during the in/out signal."); { - Map<ObjectID, BodyState> bmcopy = body_map; + HashMap<ObjectID, BodyState> bmcopy = body_map; body_map.clear(); //disconnect all monitored stuff @@ -314,7 +314,7 @@ void Area3D::_clear_monitoring() { } { - Map<ObjectID, AreaState> bmcopy = area_map; + HashMap<ObjectID, AreaState> bmcopy = area_map; area_map.clear(); //disconnect all monitored stuff @@ -379,14 +379,14 @@ void Area3D::_area_enter_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, AreaState>::Element *E = area_map.find(p_id); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; emit_signal(SceneStringNames::get_singleton()->area_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->area_shape_entered, E->get().rid, node, E->get().shapes[i].area_shape, E->get().shapes[i].self_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->area_shape_entered, E->value.rid, node, E->value.shapes[i].area_shape, E->value.shapes[i].self_shape); } } @@ -394,13 +394,13 @@ void Area3D::_area_exit_tree(ObjectID p_id) { Object *obj = ObjectDB::get_instance(p_id); Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); - Map<ObjectID, AreaState>::Element *E = area_map.find(p_id); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; emit_signal(SceneStringNames::get_singleton()->area_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->area_shape_exited, E->get().rid, node, E->get().shapes[i].area_shape, E->get().shapes[i].self_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->area_shape_exited, E->value.rid, node, E->value.shapes[i].area_shape, E->value.shapes[i].self_shape); } } @@ -411,7 +411,7 @@ void Area3D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i Object *obj = ObjectDB::get_instance(objid); Node *node = Object::cast_to<Node>(obj); - Map<ObjectID, AreaState>::Element *E = area_map.find(objid); + HashMap<ObjectID, AreaState>::Iterator E = area_map.find(objid); if (!area_in && !E) { return; //likely removed from the tree @@ -422,36 +422,36 @@ void Area3D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i if (area_in) { if (!E) { E = area_map.insert(objid, AreaState()); - E->get().rid = p_area; - E->get().rc = 0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_area; + E->value.rc = 0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_area_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_area_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->area_entered, node); } } } - E->get().rc++; + E->value.rc++; if (node) { - E->get().shapes.insert(AreaShapePair(p_area_shape, p_self_shape)); + E->value.shapes.insert(AreaShapePair(p_area_shape, p_self_shape)); } - if (!node || E->get().in_tree) { + if (!node || E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->area_shape_entered, p_area, node, p_area_shape, p_self_shape); } } else { - E->get().rc--; + E->value.rc--; if (node) { - E->get().shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); + E->value.shapes.erase(AreaShapePair(p_area_shape, p_self_shape)); } - bool in_tree = E->get().in_tree; - if (E->get().rc == 0) { - area_map.erase(E); + bool in_tree = E->value.in_tree; + if (E->value.rc == 0) { + area_map.remove(E); if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_area_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_area_exit_tree)); @@ -524,20 +524,20 @@ TypedArray<Area3D> Area3D::get_overlapping_areas() const { bool Area3D::overlaps_area(Node *p_area) const { ERR_FAIL_NULL_V(p_area, false); - const Map<ObjectID, AreaState>::Element *E = area_map.find(p_area->get_instance_id()); + HashMap<ObjectID, AreaState>::ConstIterator E = area_map.find(p_area->get_instance_id()); if (!E) { return false; } - return E->get().in_tree; + return E->value.in_tree; } bool Area3D::overlaps_body(Node *p_body) const { ERR_FAIL_NULL_V(p_body, false); - const Map<ObjectID, BodyState>::Element *E = body_map.find(p_body->get_instance_id()); + HashMap<ObjectID, BodyState>::ConstIterator E = body_map.find(p_body->get_instance_id()); if (!E) { return false; } - return E->get().in_tree; + return E->value.in_tree; } void Area3D::set_audio_bus_override(bool p_override) { @@ -730,7 +730,7 @@ void Area3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_point_distance_scale", PROPERTY_HINT_RANGE, "0,1024,0.001,or_greater,exp"), "set_gravity_point_distance_scale", "get_gravity_point_distance_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity_point_center"), "set_gravity_point_center", "get_gravity_point_center"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity_direction"), "set_gravity_direction", "get_gravity_direction"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-32,32,0.001,or_lesser,or_greater"), "set_gravity", "get_gravity"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, U"-32,32,0.001,or_lesser,or_greater,suffix:m/s\u00B2"), "set_gravity", "get_gravity"); ADD_GROUP("Linear Damp", "linear_damp_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "linear_damp_space_override", PROPERTY_HINT_ENUM, "Disabled,Combine,Combine-Replace,Replace,Replace-Combine", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_linear_damp_space_override_mode", "get_linear_damp_space_override_mode"); diff --git a/scene/3d/area_3d.h b/scene/3d/area_3d.h index 31ded00fb7..3b892baf57 100644 --- a/scene/3d/area_3d.h +++ b/scene/3d/area_3d.h @@ -98,7 +98,7 @@ private: VSet<ShapePair> shapes; }; - Map<ObjectID, BodyState> body_map; + HashMap<ObjectID, BodyState> body_map; void _area_inout(int p_status, const RID &p_area, ObjectID p_instance, int p_area_shape, int p_self_shape); @@ -130,7 +130,7 @@ private: VSet<AreaShapePair> shapes; }; - Map<ObjectID, AreaState> area_map; + HashMap<ObjectID, AreaState> area_map; void _clear_monitoring(); bool audio_bus_override = false; diff --git a/scene/3d/audio_listener_3d.cpp b/scene/3d/audio_listener_3d.cpp index 1ead9bb384..4f3f403ab7 100644 --- a/scene/3d/audio_listener_3d.cpp +++ b/scene/3d/audio_listener_3d.cpp @@ -68,7 +68,7 @@ bool AudioListener3D::_get(const StringName &p_name, Variant &r_ret) const { } void AudioListener3D::_get_property_list(List<PropertyInfo> *p_list) const { - p_list->push_back(PropertyInfo(Variant::BOOL, "current")); + p_list->push_back(PropertyInfo(Variant::BOOL, PNAME("current"))); } void AudioListener3D::_update_listener() { diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index f057c72012..c63803c015 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -281,7 +281,7 @@ void AudioStreamPlayer3D::_notification(int p_what) { active.set(); Ref<AudioStreamPlayback> new_playback = stream->instance_playback(); ERR_FAIL_COND_MSG(new_playback.is_null(), "Failed to instantiate playback."); - Map<StringName, Vector<AudioFrame>> bus_map; + HashMap<StringName, Vector<AudioFrame>> bus_map; bus_map[_get_actual_bus()] = volume_vector; AudioServer::get_singleton()->start_playback_stream(new_playback, bus_map, setplay.get(), actual_pitch_scale, linear_attenuation, attenuation_filter_cutoff_hz); stream_playbacks.push_back(new_playback); @@ -387,7 +387,7 @@ Vector<AudioFrame> AudioStreamPlayer3D::_update_panning() { Ref<World3D> world_3d = get_world_3d(); ERR_FAIL_COND_V(world_3d.is_null(), output_volume_vector); - Set<Camera3D *> cameras = world_3d->get_cameras(); + RBSet<Camera3D *> cameras = world_3d->get_cameras(); cameras.insert(get_viewport()->get_camera_3d()); PhysicsDirectSpaceState3D *space_state = PhysicsServer3D::get_singleton()->space_get_direct_state(world_3d->get_space()); @@ -466,7 +466,7 @@ Vector<AudioFrame> AudioStreamPlayer3D::_update_panning() { output_volume_vector.write[k] = multiplier * output_volume_vector[k]; } - Map<StringName, Vector<AudioFrame>> bus_volumes; + HashMap<StringName, Vector<AudioFrame>> bus_volumes; if (area) { if (area->is_overriding_audio_bus()) { //override audio bus @@ -854,24 +854,24 @@ void AudioStreamPlayer3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream"); ADD_PROPERTY(PropertyInfo(Variant::INT, "attenuation_model", PROPERTY_HINT_ENUM, "Inverse,Inverse Square,Logarithmic,Disabled"), "set_attenuation_model", "get_attenuation_model"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_db", PROPERTY_HINT_RANGE, "-80,80,suffix:dB"), "set_unit_db", "get_unit_db"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.01,or_greater"), "set_unit_size", "get_unit_size"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_db", PROPERTY_HINT_RANGE, "-24,6,suffix:dB"), "set_max_db", "get_max_db"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01,or_greater"), "set_max_distance", "get_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01,or_greater,suffix:m"), "set_max_distance", "get_max_distance"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_polyphony", PROPERTY_HINT_NONE, ""), "set_max_polyphony", "get_max_polyphony"); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask"); ADD_GROUP("Emission Angle", "emission_angle"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emission_angle_enabled"), "set_emission_angle_enabled", "is_emission_angle_enabled"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_degrees", PROPERTY_HINT_RANGE, "0.1,90,0.1,degrees"), "set_emission_angle", "get_emission_angle"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_filter_attenuation_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_emission_angle_filter_attenuation_db", "get_emission_angle_filter_attenuation_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_filter_attenuation_db", PROPERTY_HINT_RANGE, "-80,0,0.1,suffix:dB"), "set_emission_angle_filter_attenuation_db", "get_emission_angle_filter_attenuation_db"); ADD_GROUP("Attenuation Filter", "attenuation_filter_"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_attenuation_filter_cutoff_hz", "get_attenuation_filter_cutoff_hz"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_attenuation_filter_db", "get_attenuation_filter_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1,suffix:Hz"), "set_attenuation_filter_cutoff_hz", "get_attenuation_filter_cutoff_hz"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_db", PROPERTY_HINT_RANGE, "-80,0,0.1,suffix:dB"), "set_attenuation_filter_db", "get_attenuation_filter_db"); ADD_GROUP("Doppler", "doppler_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Physics"), "set_doppler_tracking", "get_doppler_tracking"); diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp index 4c53776bba..10348b1eb6 100644 --- a/scene/3d/camera_3d.cpp +++ b/scene/3d/camera_3d.cpp @@ -501,16 +501,16 @@ void Camera3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_environment", "get_environment"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "effects", PROPERTY_HINT_RESOURCE_TYPE, "CameraEffects"), "set_effects", "get_effects"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_h_offset", "get_h_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_v_offset", "get_v_offset"); ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Physics"), "set_doppler_tracking", "get_doppler_tracking"); ADD_PROPERTY(PropertyInfo(Variant::INT, "projection", PROPERTY_HINT_ENUM, "Perspective,Orthogonal,Frustum"), "set_projection", "get_projection"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "current"), "set_current", "is_current"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fov", PROPERTY_HINT_RANGE, "1,179,0.1,degrees"), "set_fov", "get_fov"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size", PROPERTY_HINT_RANGE, "0.001,16384,0.001"), "set_size", "get_size"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "frustum_offset"), "set_frustum_offset", "get_frustum_offset"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "near", PROPERTY_HINT_RANGE, "0.001,10,0.001,or_greater,exp"), "set_near", "get_near"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "far", PROPERTY_HINT_RANGE, "0.01,4000,0.01,or_greater,exp"), "set_far", "get_far"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size", PROPERTY_HINT_RANGE, "0.001,16384,0.01,suffix:m"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "frustum_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_frustum_offset", "get_frustum_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "near", PROPERTY_HINT_RANGE, "0.001,10,0.001,or_greater,exp,suffix:m"), "set_near", "get_near"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "far", PROPERTY_HINT_RANGE, "0.01,4000,0.01,or_greater,exp,suffix:m"), "set_far", "get_far"); BIND_ENUM_CONSTANT(PROJECTION_PERSPECTIVE); BIND_ENUM_CONSTANT(PROJECTION_ORTHOGONAL); diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp index 40c09593a4..a36357555a 100644 --- a/scene/3d/collision_object_3d.cpp +++ b/scene/3d/collision_object_3d.cpp @@ -345,9 +345,9 @@ void CollisionObject3D::_update_debug_shapes() { return; } - for (Set<uint32_t>::Element *shapedata_idx = debug_shapes_to_update.front(); shapedata_idx; shapedata_idx = shapedata_idx->next()) { - if (shapes.has(shapedata_idx->get())) { - ShapeData &shapedata = shapes[shapedata_idx->get()]; + for (const uint32_t &shapedata_idx : debug_shapes_to_update) { + if (shapes.has(shapedata_idx)) { + ShapeData &shapedata = shapes[shapedata_idx]; ShapeData::ShapeBase *shapes = shapedata.shapes.ptrw(); for (int i = 0; i < shapedata.shapes.size(); i++) { ShapeData::ShapeBase &s = shapes[i]; @@ -459,7 +459,7 @@ void CollisionObject3D::_bind_methods() { ADD_SIGNAL(MethodInfo("mouse_entered")); ADD_SIGNAL(MethodInfo("mouse_exited")); - ADD_PROPERTY(PropertyInfo(Variant::INT, "disable_mode", PROPERTY_HINT_ENUM, "Remove,MakeStatic,KeepActive"), "set_disable_mode", "get_disable_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "disable_mode", PROPERTY_HINT_ENUM, "Remove,Make Static,Keep Active"), "set_disable_mode", "get_disable_mode"); ADD_GROUP("Collision", "collision_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_layer", "get_collision_layer"); diff --git a/scene/3d/collision_object_3d.h b/scene/3d/collision_object_3d.h index e92843d784..84b00de9c9 100644 --- a/scene/3d/collision_object_3d.h +++ b/scene/3d/collision_object_3d.h @@ -71,14 +71,14 @@ private: int total_subshapes = 0; - Map<uint32_t, ShapeData> shapes; + RBMap<uint32_t, ShapeData> shapes; bool only_update_transform_changes = false; // This is used for sync to physics. bool capture_input_on_drag = false; bool ray_pickable = true; - Set<uint32_t> debug_shapes_to_update; + RBSet<uint32_t> debug_shapes_to_update; int debug_shapes_count = 0; Transform3D debug_shape_old_transform; diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp index 5a286d7b55..bd6a70e566 100644 --- a/scene/3d/collision_polygon_3d.cpp +++ b/scene/3d/collision_polygon_3d.cpp @@ -200,10 +200,10 @@ void CollisionPolygon3D::_bind_methods() { ClassDB::bind_method(D_METHOD("_is_editable_3d_polygon"), &CollisionPolygon3D::_is_editable_3d_polygon); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth"), "set_depth", "get_depth"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_NONE, "suffix:m"), "set_depth", "get_depth"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled"); ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001,suffix:m"), "set_margin", "get_margin"); } CollisionPolygon3D::CollisionPolygon3D() { diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 9666994b95..8585f3bdfc 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -1439,14 +1439,14 @@ void CPUParticles3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting"); ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_RANGE, "1,1000000,1,exp"), "set_amount", "get_amount"); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater,exp"), "set_lifetime", "get_lifetime"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater,exp,suffix:s"), "set_lifetime", "get_lifetime"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01,exp"), "set_pre_process_time", "get_pre_process_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01,exp,suffix:s"), "set_pre_process_time", "get_pre_process_time"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1,suffix:FPS"), "set_fixed_fps", "get_fixed_fps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta"); ADD_GROUP("Drawing", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "local_coords"), "set_use_local_coordinates", "get_use_local_coordinates"); diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp index a50f75f127..ab07f33ace 100644 --- a/scene/3d/decal.cpp +++ b/scene/3d/decal.cpp @@ -214,7 +214,7 @@ void Decal::_bind_methods() { ClassDB::bind_method(D_METHOD("set_cull_mask", "mask"), &Decal::set_cull_mask); ClassDB::bind_method(D_METHOD("get_cull_mask"), &Decal::get_cull_mask); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0,1024,0.001,or_greater"), "set_extents", "get_extents"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0,1024,0.001,or_greater,suffix:m"), "set_extents", "get_extents"); ADD_GROUP("Textures", "texture_"); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_albedo", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TEXTURE_ALBEDO); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_normal", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TEXTURE_NORMAL); @@ -232,8 +232,8 @@ void Decal::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lower_fade", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_lower_fade", "get_lower_fade"); ADD_GROUP("Distance Fade", "distance_fade_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distance_fade_enabled"), "set_enable_distance_fade", "is_distance_fade_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_begin"), "set_distance_fade_begin", "get_distance_fade_begin"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_length"), "set_distance_fade_length", "get_distance_fade_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_begin", PROPERTY_HINT_NONE, "suffix:m"), "set_distance_fade_begin", "get_distance_fade_begin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_length", PROPERTY_HINT_NONE, "suffix:m"), "set_distance_fade_length", "get_distance_fade_length"); ADD_GROUP("Cull Mask", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask"); diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 33ce9fc6fe..f2eb2cef2d 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -567,17 +567,17 @@ void GPUParticles3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_RANGE, "1,1000000,1,exp"), "set_amount", "get_amount"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "sub_emitter", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "GPUParticles3D"), "set_sub_emitter", "get_sub_emitter"); ADD_GROUP("Time", ""); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater,exp"), "set_lifetime", "get_lifetime"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater,exp,suffix:s"), "set_lifetime", "get_lifetime"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01,exp"), "set_pre_process_time", "get_pre_process_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01,exp,suffix:s"), "set_pre_process_time", "get_pre_process_time"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1,suffix:FPS"), "set_fixed_fps", "get_fixed_fps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interpolate"), "set_interpolate", "get_interpolate"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta"); ADD_GROUP("Collision", "collision_"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_base_size", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_collision_base_size", "get_collision_base_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_base_size", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater,suffix:m"), "set_collision_base_size", "get_collision_base_size"); ADD_GROUP("Drawing", ""); ADD_PROPERTY(PropertyInfo(Variant::AABB, "visibility_aabb"), "set_visibility_aabb", "get_visibility_aabb"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "local_coords"), "set_use_local_coordinates", "get_use_local_coordinates"); @@ -585,7 +585,7 @@ void GPUParticles3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "transform_align", PROPERTY_HINT_ENUM, "Disabled,ZBillboard,YToVelocity,ZBillboardYToVelocity"), "set_transform_align", "get_transform_align"); ADD_GROUP("Trails", "trail_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "trail_enabled"), "set_trail_enabled", "is_trail_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "trail_length_secs", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_trail_length", "get_trail_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "trail_length_secs", PROPERTY_HINT_RANGE, "0.01,10,0.01,suffix:s"), "set_trail_length", "get_trail_length"); ADD_GROUP("Process Material", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "process_material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,ParticlesMaterial"), "set_process_material", "get_process_material"); ADD_GROUP("Draw Passes", "draw_"); diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp index 4552ed9537..c1c5a2a631 100644 --- a/scene/3d/gpu_particles_collision_3d.cpp +++ b/scene/3d/gpu_particles_collision_3d.cpp @@ -66,7 +66,7 @@ void GPUParticlesCollisionSphere3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_radius", "radius"), &GPUParticlesCollisionSphere3D::set_radius); ClassDB::bind_method(D_METHOD("get_radius"), &GPUParticlesCollisionSphere3D::get_radius); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:m"), "set_radius", "get_radius"); } void GPUParticlesCollisionSphere3D::set_radius(real_t p_radius) { @@ -96,7 +96,7 @@ void GPUParticlesCollisionBox3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_extents", "extents"), &GPUParticlesCollisionBox3D::set_extents); ClassDB::bind_method(D_METHOD("get_extents"), &GPUParticlesCollisionBox3D::get_extents); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_extents", "get_extents"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:m"), "set_extents", "get_extents"); } void GPUParticlesCollisionBox3D::set_extents(const Vector3 &p_extents) { @@ -514,8 +514,8 @@ void GPUParticlesCollisionSDF3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_thickness", "thickness"), &GPUParticlesCollisionSDF3D::set_thickness); ClassDB::bind_method(D_METHOD("get_thickness"), &GPUParticlesCollisionSDF3D::get_thickness); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_extents", "get_extents"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "resolution", PROPERTY_HINT_ENUM, "16,32,64,128,256,512"), "set_resolution", "get_resolution"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:m"), "set_extents", "get_extents"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "resolution", PROPERTY_HINT_ENUM, "16,32,64,128,256,512,suffix:px"), "set_resolution", "get_resolution"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "thickness", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"), "set_thickness", "get_thickness"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture3D"), "set_texture", "get_texture"); @@ -643,7 +643,7 @@ void GPUParticlesCollisionHeightField3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_follow_camera_enabled", "enabled"), &GPUParticlesCollisionHeightField3D::set_follow_camera_enabled); ClassDB::bind_method(D_METHOD("is_follow_camera_enabled"), &GPUParticlesCollisionHeightField3D::is_follow_camera_enabled); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_extents", "get_extents"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:m"), "set_extents", "get_extents"); ADD_PROPERTY(PropertyInfo(Variant::INT, "resolution", PROPERTY_HINT_ENUM, "256 (Fastest),512 (Fast),1024 (Average),2048 (Slow),4096 (Slower),8192 (Slowest)"), "set_resolution", "get_resolution"); ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "When Moved (Fast),Always (Slow)"), "set_update_mode", "get_update_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_camera_enabled"), "set_follow_camera_enabled", "is_follow_camera_enabled"); @@ -785,7 +785,7 @@ void GPUParticlesAttractorSphere3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_radius", "radius"), &GPUParticlesAttractorSphere3D::set_radius); ClassDB::bind_method(D_METHOD("get_radius"), &GPUParticlesAttractorSphere3D::get_radius); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:m"), "set_radius", "get_radius"); } void GPUParticlesAttractorSphere3D::set_radius(real_t p_radius) { @@ -815,7 +815,7 @@ void GPUParticlesAttractorBox3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_extents", "extents"), &GPUParticlesAttractorBox3D::set_extents); ClassDB::bind_method(D_METHOD("get_extents"), &GPUParticlesAttractorBox3D::get_extents); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_extents", "get_extents"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:m"), "set_extents", "get_extents"); } void GPUParticlesAttractorBox3D::set_extents(const Vector3 &p_extents) { @@ -848,7 +848,7 @@ void GPUParticlesAttractorVectorField3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_texture", "texture"), &GPUParticlesAttractorVectorField3D::set_texture); ClassDB::bind_method(D_METHOD("get_texture"), &GPUParticlesAttractorVectorField3D::get_texture); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_extents", "get_extents"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:m"), "set_extents", "get_extents"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture3D"), "set_texture", "get_texture"); } diff --git a/scene/3d/label_3d.cpp b/scene/3d/label_3d.cpp index 9375190151..2d7da48ab1 100644 --- a/scene/3d/label_3d.cpp +++ b/scene/3d/label_3d.cpp @@ -469,8 +469,8 @@ void Label3D::_shape() { aabb = AABB(); // Clear materials. - for (Map<uint64_t, SurfaceData>::Element *E = surfaces.front(); E; E = E->next()) { - RenderingServer::get_singleton()->free(E->get().material); + for (const KeyValue<uint64_t, SurfaceData> &E : surfaces) { + RenderingServer::get_singleton()->free(E.value.material); } surfaces.clear(); @@ -599,20 +599,20 @@ void Label3D::_shape() { offset.y -= (TS->shaped_text_get_descent(lines_rid[i]) + line_spacing + font->get_spacing(TextServer::SPACING_BOTTOM)) * pixel_size; } - for (Map<uint64_t, SurfaceData>::Element *E = surfaces.front(); E; E = E->next()) { + for (const KeyValue<uint64_t, SurfaceData> &E : surfaces) { Array mesh_array; mesh_array.resize(RS::ARRAY_MAX); - mesh_array[RS::ARRAY_VERTEX] = E->get().mesh_vertices; - mesh_array[RS::ARRAY_NORMAL] = E->get().mesh_normals; - mesh_array[RS::ARRAY_TANGENT] = E->get().mesh_tangents; - mesh_array[RS::ARRAY_COLOR] = E->get().mesh_colors; - mesh_array[RS::ARRAY_TEX_UV] = E->get().mesh_uvs; - mesh_array[RS::ARRAY_INDEX] = E->get().indices; + mesh_array[RS::ARRAY_VERTEX] = E.value.mesh_vertices; + mesh_array[RS::ARRAY_NORMAL] = E.value.mesh_normals; + mesh_array[RS::ARRAY_TANGENT] = E.value.mesh_tangents; + mesh_array[RS::ARRAY_COLOR] = E.value.mesh_colors; + mesh_array[RS::ARRAY_TEX_UV] = E.value.mesh_uvs; + mesh_array[RS::ARRAY_INDEX] = E.value.indices; RS::SurfaceData sd; RS::get_singleton()->mesh_create_surface_data_from_arrays(&sd, RS::PRIMITIVE_TRIANGLES, mesh_array); - sd.material = E->get().material; + sd.material = E.value.material; RS::get_singleton()->mesh_add_surface(mesh, sd); } @@ -1003,8 +1003,8 @@ Label3D::~Label3D() { TS->free_rid(text_rid); RenderingServer::get_singleton()->free(mesh); - for (Map<uint64_t, SurfaceData>::Element *E = surfaces.front(); E; E = E->next()) { - RenderingServer::get_singleton()->free(E->get().material); + for (KeyValue<uint64_t, SurfaceData> E : surfaces) { + RenderingServer::get_singleton()->free(E.value.material); } surfaces.clear(); } diff --git a/scene/3d/label_3d.h b/scene/3d/label_3d.h index 86b8faa617..f57797a247 100644 --- a/scene/3d/label_3d.h +++ b/scene/3d/label_3d.h @@ -83,7 +83,7 @@ private: RID material; }; - Map<uint64_t, SurfaceData> surfaces; + HashMap<uint64_t, SurfaceData> surfaces; HorizontalAlignment horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER; VerticalAlignment vertical_alignment = VERTICAL_ALIGNMENT_CENTER; diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index c95806b2d0..2568defe0f 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -281,7 +281,7 @@ void Light3D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_indirect_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_INDIRECT_ENERGY); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "light_projector", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_projector", "get_projector"); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_size", PROPERTY_HINT_RANGE, "0,1,0.01,or_greater"), "set_param", "get_param", PARAM_SIZE); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_angular_distance", PROPERTY_HINT_RANGE, "0,90,0.01"), "set_param", "get_param", PARAM_SIZE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_angular_distance", PROPERTY_HINT_RANGE, "0,90,0.01,radians"), "set_param", "get_param", PARAM_SIZE); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "light_negative"), "set_negative", "is_negative"); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SPECULAR); ADD_PROPERTY(PropertyInfo(Variant::INT, "light_bake_mode", PROPERTY_HINT_ENUM, "Disabled,Static (VoxelGI/SDFGI/LightmapGI),Dynamic (VoxelGI/SDFGI only)"), "set_bake_mode", "get_bake_mode"); @@ -539,7 +539,7 @@ TypedArray<String> SpotLight3D::get_configuration_warnings() const { void SpotLight3D::_bind_methods() { ADD_GROUP("Spot", "spot_"); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_range", PROPERTY_HINT_RANGE, "0,4096,0.1,or_greater,exp"), "set_param", "get_param", PARAM_RANGE); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_range", PROPERTY_HINT_RANGE, "0,4096,0.1,or_greater,exp,suffix:m"), "set_param", "get_param", PARAM_RANGE); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_angle", PROPERTY_HINT_RANGE, "0,180,0.1,degrees"), "set_param", "get_param", PARAM_SPOT_ANGLE); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_angle_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_SPOT_ATTENUATION); diff --git a/scene/3d/lightmapper.h b/scene/3d/lightmapper.h index f641c99ec1..55d9a52a28 100644 --- a/scene/3d/lightmapper.h +++ b/scene/3d/lightmapper.h @@ -88,7 +88,9 @@ public: instID(INVALID_GEOMETRY_ID) {} /*! Tests if we hit something. */ - _FORCE_INLINE_ explicit operator bool() const { return geomID != INVALID_GEOMETRY_ID; } + _FORCE_INLINE_ explicit operator bool() const { + return geomID != INVALID_GEOMETRY_ID; + } public: Vector3 org; //!< Ray origin + tnear @@ -116,7 +118,7 @@ public: virtual void set_mesh_alpha_texture(Ref<Image> p_alpha_texture, unsigned int p_id) = 0; virtual void commit() = 0; - virtual void set_mesh_filter(const Set<int> &p_mesh_ids) = 0; + virtual void set_mesh_filter(const RBSet<int> &p_mesh_ids) = 0; virtual void clear_mesh_filter() = 0; static Ref<LightmapRaycaster> create(); diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp index 31c33a6b61..31993f898d 100644 --- a/scene/3d/mesh_instance_3d.cpp +++ b/scene/3d/mesh_instance_3d.cpp @@ -42,9 +42,9 @@ bool MeshInstance3D::_set(const StringName &p_name, const Variant &p_value) { return false; } - Map<StringName, int>::Element *E = blend_shape_properties.find(p_name); + HashMap<StringName, int>::Iterator E = blend_shape_properties.find(p_name); if (E) { - set_blend_shape_value(E->get(), p_value); + set_blend_shape_value(E->value, p_value); return true; } @@ -66,9 +66,9 @@ bool MeshInstance3D::_get(const StringName &p_name, Variant &r_ret) const { return false; } - const Map<StringName, int>::Element *E = blend_shape_properties.find(p_name); + HashMap<StringName, int>::ConstIterator E = blend_shape_properties.find(p_name); if (E) { - r_ret = get_blend_shape_value(E->get()); + r_ret = get_blend_shape_value(E->value); return true; } @@ -97,7 +97,7 @@ void MeshInstance3D::_get_property_list(List<PropertyInfo> *p_list) const { if (mesh.is_valid()) { for (int i = 0; i < mesh->get_surface_count(); i++) { - p_list->push_back(PropertyInfo(Variant::OBJECT, "surface_material_override/" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, "BaseMaterial3D,ShaderMaterial", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_DEFERRED_SET_RESOURCE)); + p_list->push_back(PropertyInfo(Variant::OBJECT, vformat("%s/%d", PNAME("surface_material_override"), i), PROPERTY_HINT_RESOURCE_TYPE, "BaseMaterial3D,ShaderMaterial", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_DEFERRED_SET_RESOURCE)); } } } diff --git a/scene/3d/mesh_instance_3d.h b/scene/3d/mesh_instance_3d.h index 0bf5c32410..dc9c64fa41 100644 --- a/scene/3d/mesh_instance_3d.h +++ b/scene/3d/mesh_instance_3d.h @@ -47,7 +47,7 @@ protected: NodePath skeleton_path = NodePath(".."); LocalVector<float> blend_shape_tracks; - Map<StringName, int> blend_shape_properties; + HashMap<StringName, int> blend_shape_properties; Vector<Ref<Material>> surface_override_materials; void _mesh_changed(); diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index 86c11b3789..fb19479eb9 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -79,14 +79,14 @@ void NavigationAgent3D::_bind_methods() { ClassDB::bind_method(D_METHOD("_avoidance_done", "new_velocity"), &NavigationAgent3D::_avoidance_done); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent_height_offset", PROPERTY_HINT_RANGE, "-100.0,100,0.01"), "set_agent_height_offset", "get_agent_height_offset"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_dist", "get_neighbor_dist"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01,suffix:m"), "set_target_desired_distance", "get_target_desired_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,100,0.01,suffix:m"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent_height_offset", PROPERTY_HINT_RANGE, "-100.0,100,0.01,suffix:m"), "set_agent_height_offset", "get_agent_height_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01,suffix:m"), "set_neighbor_dist", "get_neighbor_dist"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.01,100,0.01"), "set_time_horizon", "get_time_horizon"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_max_speed", "get_max_speed"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "0.01,100,0.1"), "set_path_max_distance", "get_path_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.01,100,0.01,suffix:s"), "set_time_horizon", "get_time_horizon"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,10000,0.01,suffix:m/s"), "set_max_speed", "get_max_speed"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "0.01,100,0.1,suffix:m"), "set_path_max_distance", "get_path_max_distance"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ignore_y"), "set_ignore_y", "get_ignore_y"); ADD_PROPERTY(PropertyInfo(Variant::INT, "navigable_layers", PROPERTY_HINT_LAYERS_3D_NAVIGATION), "set_navigable_layers", "get_navigable_layers"); @@ -113,6 +113,26 @@ void NavigationAgent3D::_notification(int p_what) { set_physics_process_internal(false); } break; + case NOTIFICATION_PAUSED: { + if (agent_parent && !agent_parent->can_process()) { + map_before_pause = NavigationServer3D::get_singleton()->agent_get_map(get_rid()); + NavigationServer3D::get_singleton()->agent_set_map(get_rid(), RID()); + } else if (agent_parent && agent_parent->can_process() && !(map_before_pause == RID())) { + NavigationServer3D::get_singleton()->agent_set_map(get_rid(), map_before_pause); + map_before_pause = RID(); + } + } break; + + case NOTIFICATION_UNPAUSED: { + if (agent_parent && !agent_parent->can_process()) { + map_before_pause = NavigationServer3D::get_singleton()->agent_get_map(get_rid()); + NavigationServer3D::get_singleton()->agent_set_map(get_rid(), RID()); + } else if (agent_parent && agent_parent->can_process() && !(map_before_pause == RID())) { + NavigationServer3D::get_singleton()->agent_set_map(get_rid(), map_before_pause); + map_before_pause = RID(); + } + } break; + case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { if (agent_parent) { NavigationServer3D::get_singleton()->agent_set_position(agent, agent_parent->get_global_transform().origin); diff --git a/scene/3d/navigation_agent_3d.h b/scene/3d/navigation_agent_3d.h index 283b99a24f..6a88bd13e2 100644 --- a/scene/3d/navigation_agent_3d.h +++ b/scene/3d/navigation_agent_3d.h @@ -41,6 +41,7 @@ class NavigationAgent3D : public Node { Node3D *agent_parent = nullptr; RID agent; + RID map_before_pause; uint32_t navigable_layers = 1; diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp index 78dbecc0c5..c6eda1f9cd 100644 --- a/scene/3d/navigation_obstacle_3d.cpp +++ b/scene/3d/navigation_obstacle_3d.cpp @@ -35,6 +35,8 @@ #include "servers/navigation_server_3d.h" void NavigationObstacle3D::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_rid"), &NavigationObstacle3D::get_rid); + ClassDB::bind_method(D_METHOD("set_estimate_radius", "estimate_radius"), &NavigationObstacle3D::set_estimate_radius); ClassDB::bind_method(D_METHOD("is_radius_estimated"), &NavigationObstacle3D::is_radius_estimated); ClassDB::bind_method(D_METHOD("set_radius", "radius"), &NavigationObstacle3D::set_radius); @@ -78,8 +80,28 @@ void NavigationObstacle3D::_notification(int p_what) { parent_node3d = nullptr; } break; + case NOTIFICATION_PAUSED: { + if (parent_node3d && !parent_node3d->can_process()) { + map_before_pause = NavigationServer3D::get_singleton()->agent_get_map(get_rid()); + NavigationServer3D::get_singleton()->agent_set_map(get_rid(), RID()); + } else if (parent_node3d && parent_node3d->can_process() && !(map_before_pause == RID())) { + NavigationServer3D::get_singleton()->agent_set_map(get_rid(), map_before_pause); + map_before_pause = RID(); + } + } break; + + case NOTIFICATION_UNPAUSED: { + if (parent_node3d && !parent_node3d->can_process()) { + map_before_pause = NavigationServer3D::get_singleton()->agent_get_map(get_rid()); + NavigationServer3D::get_singleton()->agent_set_map(get_rid(), RID()); + } else if (parent_node3d && parent_node3d->can_process() && !(map_before_pause == RID())) { + NavigationServer3D::get_singleton()->agent_set_map(get_rid(), map_before_pause); + map_before_pause = RID(); + } + } break; + case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { - if (parent_node3d) { + if (parent_node3d && parent_node3d->is_inside_tree()) { NavigationServer3D::get_singleton()->agent_set_position(agent, parent_node3d->get_global_transform().origin); PhysicsBody3D *rigid = Object::cast_to<PhysicsBody3D>(get_parent()); @@ -107,7 +129,12 @@ TypedArray<String> NavigationObstacle3D::get_configuration_warnings() const { TypedArray<String> warnings = Node::get_configuration_warnings(); if (!Object::cast_to<Node3D>(get_parent())) { - warnings.push_back(RTR("The NavigationObstacle3D only serves to provide collision avoidance to a spatial object.")); + warnings.push_back(RTR("The NavigationObstacle3D only serves to provide collision avoidance to a Node3D inheriting parent object.")); + } + + if (Object::cast_to<StaticBody3D>(get_parent())) { + warnings.push_back(RTR("The NavigationObstacle3D is intended for constantly moving bodies like CharacterBody3D or RigidDynamicBody3D as it creates only an RVO avoidance radius and does not follow scene geometry exactly." + "\nNot constantly moving or complete static objects should be (re)baked to a NavigationMesh so agents can not only avoid them but also move along those objects outline at high detail")); } return warnings; @@ -129,13 +156,13 @@ void NavigationObstacle3D::reevaluate_agent_radius() { } real_t NavigationObstacle3D::estimate_agent_radius() const { - if (parent_node3d) { + if (parent_node3d && parent_node3d->is_inside_tree()) { // Estimate the radius of this physics body real_t radius = 0.0; for (int i(0); i < parent_node3d->get_child_count(); i++) { // For each collision shape CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(parent_node3d->get_child(i)); - if (cs) { + if (cs && cs->is_inside_tree()) { // Take the distance between the Body center to the shape center real_t r = cs->get_transform().origin.length(); if (cs->get_shape().is_valid()) { @@ -146,6 +173,9 @@ real_t NavigationObstacle3D::estimate_agent_radius() const { r *= MAX(s.x, MAX(s.y, s.z)); // Takes the biggest radius radius = MAX(radius, r); + } else if (cs && !cs->is_inside_tree()) { + WARN_PRINT("A CollisionShape3D of the NavigationObstacle3D parent node was not inside the SceneTree when estimating the obstacle radius." + "\nMove the NavigationObstacle3D to a child position below any CollisionShape3D node of the parent node so the CollisionShape3D is already inside the SceneTree."); } } diff --git a/scene/3d/navigation_obstacle_3d.h b/scene/3d/navigation_obstacle_3d.h index 542d603a0a..0ddde64c0e 100644 --- a/scene/3d/navigation_obstacle_3d.h +++ b/scene/3d/navigation_obstacle_3d.h @@ -38,6 +38,7 @@ class NavigationObstacle3D : public Node { Node3D *parent_node3d = nullptr; RID agent; + RID map_before_pause; bool estimate_radius = true; real_t radius = 1.0; diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 80be770dfc..6404432631 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -171,7 +171,12 @@ void NavigationRegion3D::bake_navigation_mesh(bool p_on_thread) { BakeThreadsArgs *args = memnew(BakeThreadsArgs); args->nav_region = this; - if (p_on_thread) { + if (p_on_thread && !OS::get_singleton()->can_use_threads()) { + WARN_PRINT("NavigationMesh bake 'on_thread' will be disabled as the current OS does not support multiple threads." + "\nAs a fallback the navigation mesh will bake on the main thread which can cause framerate issues."); + } + + if (p_on_thread && OS::get_singleton()->can_use_threads()) { bake_thread.start(_bake_navigation_mesh, args); } else { _bake_navigation_mesh(args); diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index bbc977647e..a76d57a09f 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -180,7 +180,7 @@ void Node3D::_notification(int p_what) { #ifdef TOOLS_ENABLED if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) { - get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this); } #endif } break; @@ -418,7 +418,7 @@ void Node3D::update_gizmos() { } if (data.gizmos.is_empty()) { - get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this); return; } if (data.gizmos_dirty) { @@ -436,7 +436,7 @@ void Node3D::set_subgizmo_selection(Ref<Node3DGizmo> p_gizmo, int p_id, Transfor } if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) { - get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_set_subgizmo_selection, this, p_gizmo, p_id, p_transform); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_set_subgizmo_selection, this, p_gizmo, p_id, p_transform); } #endif } @@ -452,7 +452,7 @@ void Node3D::clear_subgizmo_selection() { } if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) { - get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_clear_subgizmo_selection, this); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_clear_subgizmo_selection, this); } #endif } @@ -977,10 +977,9 @@ void Node3D::_bind_methods() { BIND_ENUM_CONSTANT(ROTATION_ORDER_ZXY); BIND_ENUM_CONSTANT(ROTATION_ORDER_ZYX); - //ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM3D,"transform/global",PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR ), "set_global_transform", "get_global_transform") ; ADD_GROUP("Transform", ""); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_transform", "get_transform"); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "global_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_global_transform", "get_global_transform"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "transform", PROPERTY_HINT_NONE, "suffix:m", PROPERTY_USAGE_NO_EDITOR), "set_transform", "get_transform"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "global_transform", PROPERTY_HINT_NONE, "suffix:m", PROPERTY_USAGE_NONE), "set_global_transform", "get_global_transform"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "position", PROPERTY_HINT_RANGE, "-99999,99999,0.001,or_greater,or_lesser,noslider,suffix:m", PROPERTY_USAGE_EDITOR), "set_position", "get_position"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater,radians", PROPERTY_USAGE_EDITOR), "set_rotation", "get_rotation"); ADD_PROPERTY(PropertyInfo(Variant::QUATERNION, "quaternion", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_quaternion", "get_quaternion"); diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 17a68f38f5..8c2b1c6889 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -287,10 +287,10 @@ void PathFollow3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_loop", "loop"), &PathFollow3D::set_loop); ClassDB::bind_method(D_METHOD("has_loop"), &PathFollow3D::has_loop); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater,suffix:m"), "set_offset", "get_offset"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_h_offset", "get_h_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_v_offset", "get_v_offset"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rotation_mode", PROPERTY_HINT_ENUM, "None,Y,XY,XYZ,Oriented"), "set_rotation_mode", "get_rotation_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cubic_interp"), "set_cubic_interpolation", "get_cubic_interpolation"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop"); diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 5f9bca7c49..982254c94d 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -94,13 +94,11 @@ void PhysicsBody3D::remove_collision_exception_with(Node *p_node) { Ref<KinematicCollision3D> PhysicsBody3D::_move(const Vector3 &p_distance, bool p_test_only, real_t p_margin, int p_max_collisions) { PhysicsServer3D::MotionParameters parameters(get_global_transform(), p_distance, p_margin); parameters.max_collisions = p_max_collisions; + parameters.recovery_as_collision = false; // Don't report collisions generated only from recovery. PhysicsServer3D::MotionResult result; - bool collided = move_and_collide(parameters, result, p_test_only); - - // Don't report collision when the whole motion is done. - if (collided && result.collision_safe_fraction < 1) { + if (move_and_collide(parameters, result, p_test_only)) { // Create a new instance when the cached reference is invalid or still in use in script. if (motion_cache.is_null() || motion_cache->reference_get_count() > 1) { motion_cache.instantiate(); @@ -184,15 +182,9 @@ bool PhysicsBody3D::test_move(const Transform3D &p_from, const Vector3 &p_distan } PhysicsServer3D::MotionParameters parameters(p_from, p_distance, p_margin); + parameters.recovery_as_collision = false; // Don't report collisions generated only from recovery. - bool colliding = PhysicsServer3D::get_singleton()->body_test_motion(get_rid(), parameters, r); - - if (colliding) { - // Don't report collision when the whole motion is done. - return (r->collision_safe_fraction < 1.0); - } else { - return false; - } + return PhysicsServer3D::get_singleton()->body_test_motion(get_rid(), parameters, r); } void PhysicsBody3D::set_axis_lock(PhysicsServer3D::BodyAxis p_axis, bool p_lock) { @@ -390,18 +382,18 @@ void RigidDynamicBody3D::_body_enter_tree(ObjectID p_id) { ERR_FAIL_COND(!node); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(E->get().in_tree); + ERR_FAIL_COND(E->value.in_tree); - E->get().in_tree = true; + E->value.in_tree = true; contact_monitor->locked = true; emit_signal(SceneStringNames::get_singleton()->body_entered, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].local_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_entered, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].local_shape); } contact_monitor->locked = false; @@ -412,17 +404,17 @@ void RigidDynamicBody3D::_body_exit_tree(ObjectID p_id) { Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!node); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(p_id); ERR_FAIL_COND(!E); - ERR_FAIL_COND(!E->get().in_tree); - E->get().in_tree = false; + ERR_FAIL_COND(!E->value.in_tree); + E->value.in_tree = false; contact_monitor->locked = true; emit_signal(SceneStringNames::get_singleton()->body_exited, node); - for (int i = 0; i < E->get().shapes.size(); i++) { - emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->get().rid, node, E->get().shapes[i].body_shape, E->get().shapes[i].local_shape); + for (int i = 0; i < E->value.shapes.size(); i++) { + emit_signal(SceneStringNames::get_singleton()->body_shape_exited, E->value.rid, node, E->value.shapes[i].body_shape, E->value.shapes[i].local_shape); } contact_monitor->locked = false; @@ -436,43 +428,43 @@ void RigidDynamicBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p Node *node = Object::cast_to<Node>(obj); ERR_FAIL_COND(!contact_monitor); - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(objid); ERR_FAIL_COND(!body_in && !E); if (body_in) { if (!E) { E = contact_monitor->body_map.insert(objid, BodyState()); - E->get().rid = p_body; - //E->get().rc=0; - E->get().in_tree = node && node->is_inside_tree(); + E->value.rid = p_body; + //E->value.rc=0; + E->value.in_tree = node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree), make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree), make_binds(objid)); - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_entered, node); } } } - //E->get().rc++; + //E->value.rc++; if (node) { - E->get().shapes.insert(ShapePair(p_body_shape, p_local_shape)); + E->value.shapes.insert(ShapePair(p_body_shape, p_local_shape)); } - if (E->get().in_tree) { + if (E->value.in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_entered, p_body, node, p_body_shape, p_local_shape); } } else { - //E->get().rc--; + //E->value.rc--; if (node) { - E->get().shapes.erase(ShapePair(p_body_shape, p_local_shape)); + E->value.shapes.erase(ShapePair(p_body_shape, p_local_shape)); } - bool in_tree = E->get().in_tree; + bool in_tree = E->value.in_tree; - if (E->get().shapes.is_empty()) { + if (E->value.shapes.is_empty()) { if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree)); @@ -481,7 +473,7 @@ void RigidDynamicBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p } } - contact_monitor->body_map.erase(E); + contact_monitor->body_map.remove(E); } if (node && in_tree) { emit_signal(SceneStringNames::get_singleton()->body_shape_exited, p_body, obj, p_body_shape, p_local_shape); @@ -547,7 +539,7 @@ void RigidDynamicBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) //bool found=false; - Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(obj); + HashMap<ObjectID, BodyState>::Iterator E = contact_monitor->body_map.find(obj); if (!E) { toadd[toadd_count].rid = rid; toadd[toadd_count].local_shape = local_shape; @@ -558,7 +550,7 @@ void RigidDynamicBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) } ShapePair sp(shape, local_shape); - int idx = E->get().shapes.find(sp); + int idx = E->value.shapes.find(sp); if (idx == -1) { toadd[toadd_count].rid = rid; toadd[toadd_count].local_shape = local_shape; @@ -568,7 +560,7 @@ void RigidDynamicBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) continue; } - E->get().shapes[idx].tagged = true; + E->value.shapes[idx].tagged = true; } //put the ones to remove @@ -1088,10 +1080,10 @@ void RigidDynamicBody3D::_bind_methods() { GDVIRTUAL_BIND(_integrate_forces, "state"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp"), "set_mass", "get_mass"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "inertia", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater,exp"), "set_inertia", "get_inertia"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp,suffix:kg"), "set_mass", "get_mass"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "inertia", PROPERTY_HINT_RANGE, U"0,1000,0.01,or_greater,exp,suffix:kg\u22C5m\u00B2"), "set_inertia", "get_inertia"); ADD_PROPERTY(PropertyInfo(Variant::INT, "center_of_mass_mode", PROPERTY_HINT_ENUM, "Auto,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_center_of_mass_mode", "get_center_of_mass_mode"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_of_mass", PROPERTY_HINT_RANGE, "-10,10,0.01,or_lesser,or_greater"), "set_center_of_mass", "get_center_of_mass"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_of_mass", PROPERTY_HINT_RANGE, "-10,10,0.01,or_lesser,or_greater,suffix:m"), "set_center_of_mass", "get_center_of_mass"); ADD_LINKED_PROPERTY("center_of_mass_mode", "center_of_mass"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale"); @@ -1105,11 +1097,11 @@ void RigidDynamicBody3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "freeze"), "set_freeze_enabled", "is_freeze_enabled"); ADD_PROPERTY(PropertyInfo(Variant::INT, "freeze_mode", PROPERTY_HINT_ENUM, "Static,Kinematic"), "set_freeze_mode", "get_freeze_mode"); ADD_GROUP("Linear", "linear_"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity"), "set_linear_velocity", "get_linear_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity", PROPERTY_HINT_NONE, "suffix:m/s"), "set_linear_velocity", "get_linear_velocity"); ADD_PROPERTY(PropertyInfo(Variant::INT, "linear_damp_mode", PROPERTY_HINT_ENUM, "Combine,Replace"), "set_linear_damp_mode", "get_linear_damp_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp"); ADD_GROUP("Angular", "angular_"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity", PROPERTY_HINT_NONE, "suffix:rad/s"), "set_angular_velocity", "get_angular_velocity"); ADD_PROPERTY(PropertyInfo(Variant::INT, "angular_damp_mode", PROPERTY_HINT_ENUM, "Combine,Replace"), "set_angular_damp_mode", "get_angular_damp_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp"); ADD_GROUP("Constant Forces", "constant_"); @@ -1214,6 +1206,8 @@ bool CharacterBody3D::move_and_slide() { if (!current_platform_velocity.is_equal_approx(Vector3())) { PhysicsServer3D::MotionParameters parameters(get_global_transform(), current_platform_velocity * delta, margin); + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. + parameters.exclude_bodies.insert(platform_rid); if (platform_object_id.is_valid()) { parameters.exclude_objects.insert(platform_object_id); @@ -1277,6 +1271,7 @@ void CharacterBody3D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo for (int iteration = 0; iteration < max_slides; ++iteration) { PhysicsServer3D::MotionParameters parameters(get_global_transform(), motion, margin); parameters.max_collisions = 4; + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. PhysicsServer3D::MotionResult result; bool collided = move_and_collide(parameters, result, false, !sliding_enabled); @@ -1521,6 +1516,7 @@ void CharacterBody3D::_move_and_slide_floating(double p_delta) { bool first_slide = true; for (int iteration = 0; iteration < max_slides; ++iteration) { PhysicsServer3D::MotionParameters parameters(get_global_transform(), motion, margin); + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. PhysicsServer3D::MotionResult result; bool collided = move_and_collide(parameters, result, false, false); @@ -1575,6 +1571,7 @@ void CharacterBody3D::_snap_on_floor(bool p_was_on_floor, bool p_vel_dir_facing_ PhysicsServer3D::MotionParameters parameters(get_global_transform(), -up_direction * length, margin); parameters.max_collisions = 4; + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. parameters.collide_separation_ray = true; PhysicsServer3D::MotionResult result; @@ -1610,6 +1607,7 @@ bool CharacterBody3D::_on_floor_if_snapped(bool p_was_on_floor, bool p_vel_dir_f PhysicsServer3D::MotionParameters parameters(get_global_transform(), -up_direction * length, margin); parameters.max_collisions = 4; + parameters.recovery_as_collision = true; // Also report collisions generated only from recovery. parameters.collide_separation_ray = true; PhysicsServer3D::MotionResult result; @@ -2001,7 +1999,7 @@ void CharacterBody3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "motion_mode", PROPERTY_HINT_ENUM, "Grounded,Floating", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_motion_mode", "get_motion_mode"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "up_direction"), "set_up_direction", "get_up_direction"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slide_on_ceiling"), "set_slide_on_ceiling_enabled", "is_slide_on_ceiling_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_velocity", "get_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "velocity", PROPERTY_HINT_NONE, "suffix:m/s", PROPERTY_USAGE_NO_EDITOR), "set_velocity", "get_velocity"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_slides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_max_slides", "get_max_slides"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wall_min_slide_angle", PROPERTY_HINT_RANGE, "0,180,0.1,radians", PROPERTY_USAGE_DEFAULT), "set_wall_min_slide_angle", "get_wall_min_slide_angle"); ADD_GROUP("Floor", "floor_"); @@ -2014,7 +2012,7 @@ void CharacterBody3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_apply_velocity_on_leave", PROPERTY_HINT_ENUM, "Always,Upward Only,Never", PROPERTY_USAGE_DEFAULT), "set_moving_platform_apply_velocity_on_leave", "get_moving_platform_apply_velocity_on_leave"); ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_floor_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_floor_layers", "get_moving_platform_floor_layers"); ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_wall_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_wall_layers", "get_moving_platform_wall_layers"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001,suffix:m"), "set_safe_margin", "get_safe_margin"); BIND_ENUM_CONSTANT(MOTION_MODE_GROUNDED); BIND_ENUM_CONSTANT(MOTION_MODE_FLOATING); @@ -2263,9 +2261,9 @@ bool PhysicalBone3D::PinJointData::_get(const StringName &p_name, Variant &r_ret void PhysicalBone3D::PinJointData::_get_property_list(List<PropertyInfo> *p_list) const { JointData::_get_property_list(p_list); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/bias"), PROPERTY_HINT_RANGE, "0.01,0.99,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/damping"), PROPERTY_HINT_RANGE, "0.01,8.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/impulse_clamp"), PROPERTY_HINT_RANGE, "0.0,64.0,0.01")); } bool PhysicalBone3D::ConeJointData::_set(const StringName &p_name, const Variant &p_value, RID j) { @@ -2335,11 +2333,11 @@ bool PhysicalBone3D::ConeJointData::_get(const StringName &p_name, Variant &r_re void PhysicalBone3D::ConeJointData::_get_property_list(List<PropertyInfo> *p_list) const { JointData::_get_property_list(p_list); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/swing_span", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1,or_lesser,or_greater")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/swing_span"), PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/twist_span"), PROPERTY_HINT_RANGE, "-40000,40000,0.1,or_lesser,or_greater")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/bias"), PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/softness"), PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/relaxation"), PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); } bool PhysicalBone3D::HingeJointData::_set(const StringName &p_name, const Variant &p_value, RID j) { @@ -2417,12 +2415,12 @@ bool PhysicalBone3D::HingeJointData::_get(const StringName &p_name, Variant &r_r void PhysicalBone3D::HingeJointData::_get_property_list(List<PropertyInfo> *p_list) const { JointData::_get_property_list(p_list); - p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/angular_limit_enabled")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::BOOL, PNAME("joint_constraints/angular_limit_enabled"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_upper"), PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_lower"), PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_bias"), PROPERTY_HINT_RANGE, "0.01,0.99,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_softness"), PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_relaxation"), PROPERTY_HINT_RANGE, "0.01,16,0.01")); } bool PhysicalBone3D::SliderJointData::_set(const StringName &p_name, const Variant &p_value, RID j) { @@ -2532,17 +2530,17 @@ bool PhysicalBone3D::SliderJointData::_get(const StringName &p_name, Variant &r_ void PhysicalBone3D::SliderJointData::_get_property_list(List<PropertyInfo> *p_list) const { JointData::_get_property_list(p_list); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_upper")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_lower")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/linear_limit_upper"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/linear_limit_lower"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/linear_limit_softness"), PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/linear_limit_restitution"), PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/linear_limit_damping"), PROPERTY_HINT_RANGE, "0,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_upper"), PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_lower"), PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_softness"), PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_restitution"), PROPERTY_HINT_RANGE, "0.01,16.0,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("joint_constraints/angular_limit_damping"), PROPERTY_HINT_RANGE, "0,16.0,0.01")); } bool PhysicalBone3D::SixDOFJointData::_set(const StringName &p_name, const Variant &p_value, RID j) { @@ -2782,29 +2780,30 @@ bool PhysicalBone3D::SixDOFJointData::_get(const StringName &p_name, Variant &r_ } void PhysicalBone3D::SixDOFJointData::_get_property_list(List<PropertyInfo> *p_list) const { - const StringName axis_names[] = { "x", "y", "z" }; + const StringName axis_names[] = { PNAME("x"), PNAME("y"), PNAME("z") }; for (int i = 0; i < 3; ++i) { - p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/linear_limit_enabled")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_upper")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_lower")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/linear_spring_enabled")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_spring_stiffness")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_spring_damping")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_equilibrium_point")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/angular_limit_enabled")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/erp")); - p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/angular_spring_enabled")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_spring_stiffness")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_spring_damping")); - p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_equilibrium_point")); + const String prefix = vformat("%s/%s/", PNAME("joint_constraints"), axis_names[i]); + p_list->push_back(PropertyInfo(Variant::BOOL, prefix + PNAME("linear_limit_enabled"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("linear_limit_upper"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("linear_limit_lower"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("linear_limit_softness"), PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::BOOL, prefix + PNAME("linear_spring_enabled"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("linear_spring_stiffness"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("linear_spring_damping"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("linear_equilibrium_point"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("linear_restitution"), PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("linear_damping"), PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::BOOL, prefix + PNAME("angular_limit_enabled"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("angular_limit_upper"), PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("angular_limit_lower"), PROPERTY_HINT_RANGE, "-180,180,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("angular_limit_softness"), PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("angular_restitution"), PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("angular_damping"), PROPERTY_HINT_RANGE, "0.01,16,0.01")); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("erp"))); + p_list->push_back(PropertyInfo(Variant::BOOL, prefix + PNAME("angular_spring_enabled"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("angular_spring_stiffness"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("angular_spring_damping"))); + p_list->push_back(PropertyInfo(Variant::FLOAT, prefix + PNAME("angular_equilibrium_point"))); } } @@ -2851,9 +2850,9 @@ void PhysicalBone3D::_get_property_list(List<PropertyInfo> *p_list) const { names += parent->get_bone_name(i); } - p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bone_name", PROPERTY_HINT_ENUM, names)); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("bone_name"), PROPERTY_HINT_ENUM, names)); } else { - p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bone_name")); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("bone_name"))); } if (joint_data) { @@ -2985,12 +2984,12 @@ void PhysicalBone3D::_bind_methods() { ADD_GROUP("Joint", "joint_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "joint_type", PROPERTY_HINT_ENUM, "None,PinJoint,ConeJoint,HingeJoint,SliderJoint,6DOFJoint"), "set_joint_type", "get_joint_type"); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "joint_offset"), "set_joint_offset", "get_joint_offset"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "joint_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_joint_offset", "get_joint_offset"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "joint_rotation", PROPERTY_HINT_RANGE, "-360,360,0.01,or_lesser,or_greater,radians"), "set_joint_rotation", "get_joint_rotation"); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "body_offset"), "set_body_offset", "get_body_offset"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "body_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_body_offset", "get_body_offset"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp"), "set_mass", "get_mass"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp,suffix:kg"), "set_mass", "get_mass"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-10,10,0.01"), "set_gravity_scale", "get_gravity_scale"); diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index e64987b73e..22dcb218bc 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -212,7 +212,7 @@ private: struct ContactMonitor { bool locked = false; - Map<ObjectID, BodyState> body_map; + HashMap<ObjectID, BodyState> body_map; }; ContactMonitor *contact_monitor = nullptr; @@ -714,7 +714,9 @@ public: const JointData *get_joint_data() const; Skeleton3D *find_skeleton_parent(); - int get_bone_id() const { return bone_id; } + int get_bone_id() const { + return bone_id; + } void set_joint_type(JointType p_joint_type); JointType get_joint_type() const; diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp index f5e08b92ca..2db5ab2d4e 100644 --- a/scene/3d/ray_cast_3d.cpp +++ b/scene/3d/ray_cast_3d.cpp @@ -340,7 +340,7 @@ void RayCast3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "is_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exclude_parent"), "set_exclude_parent_body", "get_exclude_parent_body"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "target_position"), "set_target_position", "get_target_position"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "target_position", PROPERTY_HINT_NONE, "suffix:m"), "set_target_position", "get_target_position"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hit_from_inside"), "set_hit_from_inside", "is_hit_from_inside_enabled"); diff --git a/scene/3d/ray_cast_3d.h b/scene/3d/ray_cast_3d.h index ad85001591..d6062969d8 100644 --- a/scene/3d/ray_cast_3d.h +++ b/scene/3d/ray_cast_3d.h @@ -46,7 +46,7 @@ class RayCast3D : public Node3D { Vector3 collision_normal; Vector3 target_position = Vector3(0, -1, 0); - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = 1; bool exclude_parent_body = true; diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp index 1bebd8e335..0a9d6cbbeb 100644 --- a/scene/3d/reflection_probe.cpp +++ b/scene/3d/reflection_probe.cpp @@ -229,9 +229,9 @@ void ReflectionProbe::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "Once (Fast),Always (Slow)"), "set_update_mode", "get_update_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "intensity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_intensity", "get_intensity"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "0,16384,0.1,or_greater,exp"), "set_max_distance", "get_max_distance"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents"), "set_extents", "get_extents"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "origin_offset"), "set_origin_offset", "get_origin_offset"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "0,16384,0.1,or_greater,exp,suffix:m"), "set_max_distance", "get_max_distance"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_NONE, "suffix:m"), "set_extents", "get_extents"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "origin_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_origin_offset", "get_origin_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "box_projection"), "set_enable_box_projection", "is_box_projection_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interior"), "set_as_interior", "is_set_as_interior"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enable_shadows"), "set_enable_shadows", "are_shadows_enabled"); diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 9e403a6ecd..ba2029788e 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -153,14 +153,14 @@ bool Skeleton3D::_get(const StringName &p_path, Variant &r_ret) const { void Skeleton3D::_get_property_list(List<PropertyInfo> *p_list) const { for (int i = 0; i < bones.size(); i++) { - String prep = "bones/" + itos(i) + "/"; - p_list->push_back(PropertyInfo(Variant::STRING, prep + "name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); - p_list->push_back(PropertyInfo(Variant::INT, prep + "parent", PROPERTY_HINT_RANGE, "-1," + itos(bones.size() - 1) + ",1", PROPERTY_USAGE_NO_EDITOR)); - p_list->push_back(PropertyInfo(Variant::TRANSFORM3D, prep + "rest", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); - p_list->push_back(PropertyInfo(Variant::BOOL, prep + "enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); - p_list->push_back(PropertyInfo(Variant::VECTOR3, prep + "position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); - p_list->push_back(PropertyInfo(Variant::QUATERNION, prep + "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); - p_list->push_back(PropertyInfo(Variant::VECTOR3, prep + "scale", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); + const String prep = vformat("%s/%d/", PNAME("bones"), i); + p_list->push_back(PropertyInfo(Variant::STRING, prep + PNAME("name"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); + p_list->push_back(PropertyInfo(Variant::INT, prep + PNAME("parent"), PROPERTY_HINT_RANGE, "-1," + itos(bones.size() - 1) + ",1", PROPERTY_USAGE_NO_EDITOR)); + p_list->push_back(PropertyInfo(Variant::TRANSFORM3D, prep + PNAME("rest"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); + p_list->push_back(PropertyInfo(Variant::BOOL, prep + PNAME("enabled"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); + p_list->push_back(PropertyInfo(Variant::VECTOR3, prep + PNAME("position"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); + p_list->push_back(PropertyInfo(Variant::QUATERNION, prep + PNAME("rotation"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); + p_list->push_back(PropertyInfo(Variant::VECTOR3, prep + PNAME("scale"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR)); } #ifndef _3D_DISABLED @@ -263,19 +263,19 @@ void Skeleton3D::_notification(int p_what) { force_update_all_bone_transforms(); // Update skins. - for (Set<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { - const Skin *skin = E->get()->skin.operator->(); - RID skeleton = E->get()->skeleton; + for (SkinReference *E : skin_bindings) { + const Skin *skin = E->skin.operator->(); + RID skeleton = E->skeleton; uint32_t bind_count = skin->get_bind_count(); - if (E->get()->bind_count != bind_count) { + if (E->bind_count != bind_count) { RS::get_singleton()->skeleton_allocate_data(skeleton, bind_count); - E->get()->bind_count = bind_count; - E->get()->skin_bone_indices.resize(bind_count); - E->get()->skin_bone_indices_ptrs = E->get()->skin_bone_indices.ptrw(); + E->bind_count = bind_count; + E->skin_bone_indices.resize(bind_count); + E->skin_bone_indices_ptrs = E->skin_bone_indices.ptrw(); } - if (E->get()->skeleton_version != version) { + if (E->skeleton_version != version) { for (uint32_t i = 0; i < bind_count; i++) { StringName bind_name = skin->get_bind_name(i); @@ -284,7 +284,7 @@ void Skeleton3D::_notification(int p_what) { bool found = false; for (int j = 0; j < len; j++) { if (bonesptr[j].name == bind_name) { - E->get()->skin_bone_indices_ptrs[i] = j; + E->skin_bone_indices_ptrs[i] = j; found = true; break; } @@ -292,27 +292,27 @@ void Skeleton3D::_notification(int p_what) { if (!found) { ERR_PRINT("Skin bind #" + itos(i) + " contains named bind '" + String(bind_name) + "' but Skeleton3D has no bone by that name."); - E->get()->skin_bone_indices_ptrs[i] = 0; + E->skin_bone_indices_ptrs[i] = 0; } } else if (skin->get_bind_bone(i) >= 0) { int bind_index = skin->get_bind_bone(i); if (bind_index >= len) { ERR_PRINT("Skin bind #" + itos(i) + " contains bone index bind: " + itos(bind_index) + " , which is greater than the skeleton bone count: " + itos(len) + "."); - E->get()->skin_bone_indices_ptrs[i] = 0; + E->skin_bone_indices_ptrs[i] = 0; } else { - E->get()->skin_bone_indices_ptrs[i] = bind_index; + E->skin_bone_indices_ptrs[i] = bind_index; } } else { ERR_PRINT("Skin bind #" + itos(i) + " does not contain a name nor a bone index."); - E->get()->skin_bone_indices_ptrs[i] = 0; + E->skin_bone_indices_ptrs[i] = 0; } } - E->get()->skeleton_version = version; + E->skeleton_version = version; } for (uint32_t i = 0; i < bind_count; i++) { - uint32_t bone_index = E->get()->skin_bone_indices_ptrs[i]; + uint32_t bone_index = E->skin_bone_indices_ptrs[i]; ERR_CONTINUE(bone_index >= (uint32_t)len); rs->skeleton_bone_set_transform(skeleton, i, bonesptr[bone_index].pose_global * skin->get_bind_pose(i)); } @@ -1000,9 +1000,9 @@ Ref<Skin> Skeleton3D::create_skin_from_rest_transforms() { Ref<SkinReference> Skeleton3D::register_skin(const Ref<Skin> &p_skin) { ERR_FAIL_COND_V(p_skin.is_null(), Ref<SkinReference>()); - for (Set<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { - if (E->get()->skin == p_skin) { - return Ref<SkinReference>(E->get()); + for (const SkinReference *E : skin_bindings) { + if (E->skin == p_skin) { + return Ref<SkinReference>(E); } } @@ -1303,7 +1303,7 @@ Skeleton3D::Skeleton3D() { Skeleton3D::~Skeleton3D() { // Some skins may remain bound. - for (Set<SkinReference *>::Element *E = skin_bindings.front(); E; E = E->next()) { - E->get()->skeleton_node = nullptr; + for (SkinReference *E : skin_bindings) { + E->skeleton_node = nullptr; } } diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h index ca706bea98..c72792bd47 100644 --- a/scene/3d/skeleton_3d.h +++ b/scene/3d/skeleton_3d.h @@ -131,7 +131,7 @@ private: } }; - Set<SkinReference *> skin_bindings; + RBSet<SkinReference *> skin_bindings; void _skin_changed(); diff --git a/scene/3d/skeleton_ik_3d.cpp b/scene/3d/skeleton_ik_3d.cpp index 5e1f9d047f..55bbba26c3 100644 --- a/scene/3d/skeleton_ik_3d.cpp +++ b/scene/3d/skeleton_ik_3d.cpp @@ -391,10 +391,10 @@ void SkeletonIK3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "root_bone"), "set_root_bone", "get_root_bone"); ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "tip_bone"), "set_tip_bone", "get_tip_bone"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interpolation", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_interpolation", "get_interpolation"); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "target"), "set_target_transform", "get_target_transform"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "target", PROPERTY_HINT_NONE, "suffix:m"), "set_target_transform", "get_target_transform"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_tip_basis"), "set_override_tip_basis", "is_override_tip_basis"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_magnet"), "set_use_magnet", "is_using_magnet"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "magnet"), "set_magnet_position", "get_magnet_position"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "magnet", PROPERTY_HINT_NONE, "suffix:m"), "set_magnet_position", "get_magnet_position"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target_node"), "set_target_node", "get_target_node"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_distance"), "set_min_distance", "get_min_distance"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_iterations"), "set_max_iterations", "get_max_iterations"); diff --git a/scene/3d/soft_dynamic_body_3d.cpp b/scene/3d/soft_dynamic_body_3d.cpp index 7d786a41bf..5816c0650f 100644 --- a/scene/3d/soft_dynamic_body_3d.cpp +++ b/scene/3d/soft_dynamic_body_3d.cpp @@ -162,12 +162,13 @@ bool SoftDynamicBody3D::_get(const StringName &p_name, Variant &r_ret) const { void SoftDynamicBody3D::_get_property_list(List<PropertyInfo> *p_list) const { const int pinned_points_indices_size = pinned_points.size(); - p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "pinned_points")); + p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, PNAME("pinned_points"))); for (int i = 0; i < pinned_points_indices_size; ++i) { - p_list->push_back(PropertyInfo(Variant::INT, "attachments/" + itos(i) + "/point_index")); - p_list->push_back(PropertyInfo(Variant::NODE_PATH, "attachments/" + itos(i) + "/spatial_attachment_path")); - p_list->push_back(PropertyInfo(Variant::VECTOR3, "attachments/" + itos(i) + "/offset")); + const String prefix = vformat("%s/%d", PNAME("attachments"), i); + p_list->push_back(PropertyInfo(Variant::INT, prefix + PNAME("point_index"))); + p_list->push_back(PropertyInfo(Variant::NODE_PATH, prefix + PNAME("spatial_attachment_path"))); + p_list->push_back(PropertyInfo(Variant::VECTOR3, prefix + PNAME("offset"))); } } diff --git a/scene/3d/spring_arm_3d.cpp b/scene/3d/spring_arm_3d.cpp index 230801bd52..f855fce318 100644 --- a/scene/3d/spring_arm_3d.cpp +++ b/scene/3d/spring_arm_3d.cpp @@ -73,8 +73,8 @@ void SpringArm3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape3D"), "set_shape", "get_shape"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spring_length"), "set_length", "get_length"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin"), "set_margin", "get_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spring_length", PROPERTY_HINT_NONE, "suffix:m"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_NONE, "suffix:m"), "set_margin", "get_margin"); } real_t SpringArm3D::get_length() const { diff --git a/scene/3d/spring_arm_3d.h b/scene/3d/spring_arm_3d.h index b247ea1707..78d9db7259 100644 --- a/scene/3d/spring_arm_3d.h +++ b/scene/3d/spring_arm_3d.h @@ -37,7 +37,7 @@ class SpringArm3D : public Node3D { GDCLASS(SpringArm3D, Node3D); Ref<Shape3D> shape; - Set<RID> excluded_objects; + RBSet<RID> excluded_objects; real_t spring_length = 1.0; real_t current_spring_length = 0.0; bool keep_child_basis = false; diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index 19c90cdeb5..42ed52c9f2 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -274,21 +274,21 @@ void VehicleWheel3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_steering"), &VehicleWheel3D::get_steering); ADD_GROUP("Per-Wheel Motion", ""); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "-1024,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, U"-1024,1024.0,0.01,or_greater,suffix:kg\u22C5m/s\u00B2 (N)"), "set_engine_force", "get_engine_force"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, U"0.0,1.0,0.01,suffix:kg\u22C5m/s\u00B2 (N)"), "set_brake", "get_brake"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01,radians"), "set_steering", "get_steering"); ADD_GROUP("VehicleBody3D Motion", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_traction"), "set_use_as_traction", "is_used_as_traction"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_steering"), "set_use_as_steering", "is_used_as_steering"); ADD_GROUP("Wheel", "wheel_"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_roll_influence"), "set_roll_influence", "get_roll_influence"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_radius"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_rest_length"), "set_suspension_rest_length", "get_suspension_rest_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_radius", PROPERTY_HINT_NONE, "suffix:m"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_rest_length", PROPERTY_HINT_NONE, "suffix:m"), "set_suspension_rest_length", "get_suspension_rest_length"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_friction_slip"), "set_friction_slip", "get_friction_slip"); ADD_GROUP("Suspension", "suspension_"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_travel"), "set_suspension_travel", "get_suspension_travel"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_travel", PROPERTY_HINT_NONE, "suffix:m"), "set_suspension_travel", "get_suspension_travel"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_stiffness"), "set_suspension_stiffness", "get_suspension_stiffness"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_max_force"), "set_suspension_max_force", "get_suspension_max_force"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_max_force", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m/s\u00B2 (N)"), "set_suspension_max_force", "get_suspension_max_force"); ADD_GROUP("Damping", "damping_"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_compression"), "set_damping_compression", "get_damping_compression"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_relaxation"), "set_damping_relaxation", "get_damping_relaxation"); @@ -918,9 +918,9 @@ void VehicleBody3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_steering"), &VehicleBody3D::get_steering); ADD_GROUP("Motion", ""); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "-1024,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, U"-1024,1024.0,0.01,or_greater,suffix:kg\u22C5m/s\u00B2 (N)"), "set_engine_force", "get_engine_force"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, U"0.0,1.0,0.01,suffix:kg\u22C5m/s\u00B2 (N)"), "set_brake", "get_brake"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01,radians"), "set_steering", "get_steering"); } VehicleBody3D::VehicleBody3D() { diff --git a/scene/3d/vehicle_body_3d.h b/scene/3d/vehicle_body_3d.h index d2371d819b..4ef70f7764 100644 --- a/scene/3d/vehicle_body_3d.h +++ b/scene/3d/vehicle_body_3d.h @@ -162,7 +162,7 @@ class VehicleBody3D : public RigidDynamicBody3D { real_t m_steeringValue = 0.0; real_t m_currentVehicleSpeedKmHour = 0.0; - Set<RID> exclude; + RBSet<RID> exclude; Vector<Vector3> m_forwardWS; Vector<Vector3> m_axle; diff --git a/scene/3d/visible_on_screen_notifier_3d.cpp b/scene/3d/visible_on_screen_notifier_3d.cpp index 41cd604a4f..bcf294e216 100644 --- a/scene/3d/visible_on_screen_notifier_3d.cpp +++ b/scene/3d/visible_on_screen_notifier_3d.cpp @@ -83,7 +83,7 @@ void VisibleOnScreenNotifier3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_aabb", "rect"), &VisibleOnScreenNotifier3D::set_aabb); ClassDB::bind_method(D_METHOD("is_on_screen"), &VisibleOnScreenNotifier3D::is_on_screen); - ADD_PROPERTY(PropertyInfo(Variant::AABB, "aabb"), "set_aabb", "get_aabb"); + ADD_PROPERTY(PropertyInfo(Variant::AABB, "aabb", PROPERTY_HINT_NONE, "suffix:m"), "set_aabb", "get_aabb"); ADD_SIGNAL(MethodInfo("screen_entered")); ADD_SIGNAL(MethodInfo("screen_exited")); diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp index 669017c4b4..273e01989a 100644 --- a/scene/3d/visual_instance_3d.cpp +++ b/scene/3d/visual_instance_3d.cpp @@ -458,7 +458,7 @@ void GeometryInstance3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material_overlay", PROPERTY_HINT_RESOURCE_TYPE, "BaseMaterial3D,ShaderMaterial", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_DEFERRED_SET_RESOURCE), "set_material_overlay", "get_material_overlay"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "transparency", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_transparency", "get_transparency"); ADD_PROPERTY(PropertyInfo(Variant::INT, "cast_shadow", PROPERTY_HINT_ENUM, "Off,On,Double-Sided,Shadows Only"), "set_cast_shadows_setting", "get_cast_shadows_setting"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01"), "set_extra_cull_margin", "get_extra_cull_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01,suffix:m"), "set_extra_cull_margin", "get_extra_cull_margin"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lod_bias", PROPERTY_HINT_RANGE, "0.001,128,0.001"), "set_lod_bias", "get_lod_bias"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ignore_occlusion_culling"), "set_ignore_occlusion_culling", "is_ignoring_occlusion_culling"); ADD_GROUP("Global Illumination", "gi_"); diff --git a/scene/3d/voxelizer.h b/scene/3d/voxelizer.h index dc7569d17c..0179795ddc 100644 --- a/scene/3d/voxelizer.h +++ b/scene/3d/voxelizer.h @@ -86,7 +86,7 @@ private: Vector<Color> emission; }; - Map<Ref<Material>, MaterialCache> material_cache; + HashMap<Ref<Material>, MaterialCache> material_cache; AABB original_bounds; AABB po2_bounds; int axis_cell_size[3] = {}; diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp index 849316c568..594f98410e 100644 --- a/scene/animation/animation_blend_space_1d.cpp +++ b/scene/animation/animation_blend_space_1d.cpp @@ -219,14 +219,14 @@ void AnimationNodeBlendSpace1D::_add_blend_point(int p_index, const Ref<Animatio } } -double AnimationNodeBlendSpace1D::process(double p_time, bool p_seek) { +double AnimationNodeBlendSpace1D::process(double p_time, bool p_seek, bool p_seek_root) { if (blend_points_used == 0) { return 0.0; } if (blend_points_used == 1) { // only one point available, just play that animation - return blend_node(blend_points[0].name, blend_points[0].node, p_time, p_seek, 1.0, FILTER_IGNORE, false); + return blend_node(blend_points[0].name, blend_points[0].node, p_time, p_seek, p_seek_root, 1.0, FILTER_IGNORE, false); } double blend_pos = get_parameter(blend_position); @@ -295,7 +295,7 @@ double AnimationNodeBlendSpace1D::process(double p_time, bool p_seek) { double max_time_remaining = 0.0; for (int i = 0; i < blend_points_used; i++) { - double remaining = blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, weights[i], FILTER_IGNORE, false); + double remaining = blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, p_seek_root, weights[i], FILTER_IGNORE, false); max_time_remaining = MAX(max_time_remaining, remaining); } diff --git a/scene/animation/animation_blend_space_1d.h b/scene/animation/animation_blend_space_1d.h index 7038cece06..b2075c8c93 100644 --- a/scene/animation/animation_blend_space_1d.h +++ b/scene/animation/animation_blend_space_1d.h @@ -93,7 +93,7 @@ public: void set_value_label(const String &p_label); String get_value_label() const; - double process(double p_time, bool p_seek) override; + double process(double p_time, bool p_seek, bool p_seek_root) override; String get_caption() const override; Ref<AnimationNode> get_child_by_name(const StringName &p_name) override; diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp index a3aa3f6cc8..acdce2d7de 100644 --- a/scene/animation/animation_blend_space_2d.cpp +++ b/scene/animation/animation_blend_space_2d.cpp @@ -432,7 +432,7 @@ void AnimationNodeBlendSpace2D::_blend_triangle(const Vector2 &p_pos, const Vect r_weights[2] = w; } -double AnimationNodeBlendSpace2D::process(double p_time, bool p_seek) { +double AnimationNodeBlendSpace2D::process(double p_time, bool p_seek, bool p_seek_root) { _update_triangles(); Vector2 blend_pos = get_parameter(blend_position); @@ -502,7 +502,7 @@ double AnimationNodeBlendSpace2D::process(double p_time, bool p_seek) { for (int j = 0; j < 3; j++) { if (i == triangle_points[j]) { //blend with the given weight - double t = blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, blend_weights[j], FILTER_IGNORE, false); + double t = blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, p_seek_root, blend_weights[j], FILTER_IGNORE, false); if (first || t < mind) { mind = t; first = false; @@ -514,7 +514,7 @@ double AnimationNodeBlendSpace2D::process(double p_time, bool p_seek) { if (!found) { //ignore - blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, 0, FILTER_IGNORE, false); + blend_node(blend_points[i].name, blend_points[i].node, p_time, p_seek, p_seek_root, 0, FILTER_IGNORE, false); } } } else { @@ -539,16 +539,16 @@ double AnimationNodeBlendSpace2D::process(double p_time, bool p_seek) { na_n->set_backward(na_c->is_backward()); } //see how much animation remains - from = length_internal - blend_node(blend_points[closest].name, blend_points[closest].node, p_time, false, 0.0, FILTER_IGNORE, false); + from = length_internal - blend_node(blend_points[closest].name, blend_points[closest].node, p_time, false, p_seek_root, 0.0, FILTER_IGNORE, false); } - mind = blend_node(blend_points[new_closest].name, blend_points[new_closest].node, from, true, 1.0, FILTER_IGNORE, false); + mind = blend_node(blend_points[new_closest].name, blend_points[new_closest].node, from, true, p_seek_root, 1.0, FILTER_IGNORE, false); length_internal = from + mind; closest = new_closest; } else { - mind = blend_node(blend_points[closest].name, blend_points[closest].node, p_time, p_seek, 1.0, FILTER_IGNORE, false); + mind = blend_node(blend_points[closest].name, blend_points[closest].node, p_time, p_seek, p_seek_root, 1.0, FILTER_IGNORE, false); } } diff --git a/scene/animation/animation_blend_space_2d.h b/scene/animation/animation_blend_space_2d.h index 1356656bf8..01f53ed25a 100644 --- a/scene/animation/animation_blend_space_2d.h +++ b/scene/animation/animation_blend_space_2d.h @@ -126,7 +126,7 @@ public: void set_y_label(const String &p_label); String get_y_label() const; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; virtual String get_caption() const override; Vector2 get_closest_point(const Vector2 &p_point); diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index 433f21f91f..17a99ed034 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -64,7 +64,7 @@ void AnimationNodeAnimation::_validate_property(PropertyInfo &property) const { } } -double AnimationNodeAnimation::process(double p_time, bool p_seek) { +double AnimationNodeAnimation::process(double p_time, bool p_seek, bool p_seek_root) { AnimationPlayer *ap = state->player; ERR_FAIL_COND_V(!ap, 0); @@ -101,8 +101,8 @@ double AnimationNodeAnimation::process(double p_time, bool p_seek) { } } - if (anim->get_loop_mode() == Animation::LoopMode::LOOP_PINGPONG) { - if (anim_size) { + if (anim->get_loop_mode() == Animation::LOOP_PINGPONG) { + if (!Math::is_zero_approx(anim_size)) { if ((int)Math::floor(abs(time - prev_time) / anim_size) % 2 == 0) { if (prev_time > 0 && time <= 0) { backward = !backward; @@ -116,22 +116,24 @@ double AnimationNodeAnimation::process(double p_time, bool p_seek) { time = Math::pingpong(time, anim_size); } } else { - if (anim->get_loop_mode() == Animation::LoopMode::LOOP_LINEAR) { - if (anim_size) { + if (anim->get_loop_mode() == Animation::LOOP_LINEAR) { + if (!Math::is_zero_approx(anim_size)) { time = Math::fposmod(time, anim_size); } } else if (time < 0) { + step += time; time = 0; } else if (time > anim_size) { + step += anim_size - time; time = anim_size; } backward = false; } if (play_mode == PLAY_MODE_FORWARD) { - blend_animation(animation, time, step, p_seek, 1.0, pingponged); + blend_animation(animation, time, step, p_seek, p_seek_root, 1.0, pingponged); } else { - blend_animation(animation, anim_size - time, -step, p_seek, 1.0, pingponged); + blend_animation(animation, anim_size - time, -step, p_seek, p_seek_root, 1.0, pingponged); } set_parameter(this->time, time); @@ -251,7 +253,7 @@ bool AnimationNodeOneShot::has_filter() const { return true; } -double AnimationNodeOneShot::process(double p_time, bool p_seek) { +double AnimationNodeOneShot::process(double p_time, bool p_seek, bool p_seek_root) { bool active = get_parameter(this->active); bool prev_active = get_parameter(this->prev_active); double time = get_parameter(this->time); @@ -274,7 +276,7 @@ double AnimationNodeOneShot::process(double p_time, bool p_seek) { } if (!active) { - return blend_input(0, p_time, p_seek, 1.0, FILTER_IGNORE, !sync); + return blend_input(0, p_time, p_seek, p_seek_root, 1.0, FILTER_IGNORE, !sync); } } @@ -311,12 +313,12 @@ double AnimationNodeOneShot::process(double p_time, bool p_seek) { double main_rem; if (mix == MIX_MODE_ADD) { - main_rem = blend_input(0, p_time, p_seek, 1.0, FILTER_IGNORE, !sync); + main_rem = blend_input(0, p_time, p_seek, p_seek_root, 1.0, FILTER_IGNORE, !sync); } else { - main_rem = blend_input(0, p_time, p_seek, 1.0 - blend, FILTER_BLEND, !sync); + main_rem = blend_input(0, p_time, p_seek, p_seek_root, 1.0 - blend, FILTER_BLEND, !sync); } - double os_rem = blend_input(1, os_seek ? time : p_time, os_seek, blend, FILTER_PASS, false); + double os_rem = blend_input(1, os_seek ? time : p_time, os_seek, p_seek_root, blend, FILTER_PASS, false); if (do_start) { remaining = os_rem; @@ -420,10 +422,10 @@ bool AnimationNodeAdd2::has_filter() const { return true; } -double AnimationNodeAdd2::process(double p_time, bool p_seek) { +double AnimationNodeAdd2::process(double p_time, bool p_seek, bool p_seek_root) { double amount = get_parameter(add_amount); - double rem0 = blend_input(0, p_time, p_seek, 1.0, FILTER_IGNORE, !sync); - blend_input(1, p_time, p_seek, amount, FILTER_PASS, !sync); + double rem0 = blend_input(0, p_time, p_seek, p_seek_root, 1.0, FILTER_IGNORE, !sync); + blend_input(1, p_time, p_seek, p_seek_root, amount, FILTER_PASS, !sync); return rem0; } @@ -466,11 +468,11 @@ bool AnimationNodeAdd3::has_filter() const { return true; } -double AnimationNodeAdd3::process(double p_time, bool p_seek) { +double AnimationNodeAdd3::process(double p_time, bool p_seek, bool p_seek_root) { double amount = get_parameter(add_amount); - blend_input(0, p_time, p_seek, MAX(0, -amount), FILTER_PASS, !sync); - double rem0 = blend_input(1, p_time, p_seek, 1.0, FILTER_IGNORE, !sync); - blend_input(2, p_time, p_seek, MAX(0, amount), FILTER_PASS, !sync); + blend_input(0, p_time, p_seek, p_seek_root, MAX(0, -amount), FILTER_PASS, !sync); + double rem0 = blend_input(1, p_time, p_seek, p_seek_root, 1.0, FILTER_IGNORE, !sync); + blend_input(2, p_time, p_seek, p_seek_root, MAX(0, amount), FILTER_PASS, !sync); return rem0; } @@ -502,11 +504,11 @@ String AnimationNodeBlend2::get_caption() const { return "Blend2"; } -double AnimationNodeBlend2::process(double p_time, bool p_seek) { +double AnimationNodeBlend2::process(double p_time, bool p_seek, bool p_seek_root) { double amount = get_parameter(blend_amount); - double rem0 = blend_input(0, p_time, p_seek, 1.0 - amount, FILTER_BLEND, !sync); - double rem1 = blend_input(1, p_time, p_seek, amount, FILTER_PASS, !sync); + double rem0 = blend_input(0, p_time, p_seek, p_seek_root, 1.0 - amount, FILTER_BLEND, !sync); + double rem1 = blend_input(1, p_time, p_seek, p_seek_root, amount, FILTER_PASS, !sync); return amount > 0.5 ? rem1 : rem0; //hacky but good enough } @@ -557,11 +559,11 @@ bool AnimationNodeBlend3::is_using_sync() const { return sync; } -double AnimationNodeBlend3::process(double p_time, bool p_seek) { +double AnimationNodeBlend3::process(double p_time, bool p_seek, bool p_seek_root) { double amount = get_parameter(blend_amount); - double rem0 = blend_input(0, p_time, p_seek, MAX(0, -amount), FILTER_IGNORE, !sync); - double rem1 = blend_input(1, p_time, p_seek, 1.0 - ABS(amount), FILTER_IGNORE, !sync); - double rem2 = blend_input(2, p_time, p_seek, MAX(0, amount), FILTER_IGNORE, !sync); + double rem0 = blend_input(0, p_time, p_seek, p_seek_root, MAX(0, -amount), FILTER_IGNORE, !sync); + double rem1 = blend_input(1, p_time, p_seek, p_seek_root, 1.0 - ABS(amount), FILTER_IGNORE, !sync); + double rem2 = blend_input(2, p_time, p_seek, p_seek_root, MAX(0, amount), FILTER_IGNORE, !sync); return amount > 0.5 ? rem2 : (amount < -0.5 ? rem0 : rem1); //hacky but good enough } @@ -574,7 +576,6 @@ void AnimationNodeBlend3::_bind_methods() { } AnimationNodeBlend3::AnimationNodeBlend3() { - blend_amount = "blend_amount"; add_input("-blend"); add_input("in"); add_input("+blend"); @@ -595,12 +596,12 @@ String AnimationNodeTimeScale::get_caption() const { return "TimeScale"; } -double AnimationNodeTimeScale::process(double p_time, bool p_seek) { +double AnimationNodeTimeScale::process(double p_time, bool p_seek, bool p_seek_root) { double scale = get_parameter(this->scale); if (p_seek) { - return blend_input(0, p_time, true, 1.0, FILTER_IGNORE, false); + return blend_input(0, p_time, true, p_seek_root, 1.0, FILTER_IGNORE, false); } else { - return blend_input(0, p_time * scale, false, 1.0, FILTER_IGNORE, false); + return blend_input(0, p_time * scale, false, p_seek_root, 1.0, FILTER_IGNORE, false); } } @@ -625,16 +626,16 @@ String AnimationNodeTimeSeek::get_caption() const { return "Seek"; } -double AnimationNodeTimeSeek::process(double p_time, bool p_seek) { +double AnimationNodeTimeSeek::process(double p_time, bool p_seek, bool p_seek_root) { double seek_pos = get_parameter(this->seek_pos); if (p_seek) { - return blend_input(0, p_time, true, 1.0, FILTER_IGNORE, false); + return blend_input(0, p_time, true, p_seek_root, 1.0, FILTER_IGNORE, false); } else if (seek_pos >= 0) { - double ret = blend_input(0, seek_pos, true, 1.0, FILTER_IGNORE, false); + double ret = blend_input(0, seek_pos, true, true, 1.0, FILTER_IGNORE, false); set_parameter(this->seek_pos, -1.0); //reset return ret; } else { - return blend_input(0, p_time, false, 1.0, FILTER_IGNORE, false); + return blend_input(0, p_time, false, p_seek_root, 1.0, FILTER_IGNORE, false); } } @@ -726,7 +727,7 @@ float AnimationNodeTransition::get_cross_fade_time() const { return xfade; } -double AnimationNodeTransition::process(double p_time, bool p_seek) { +double AnimationNodeTransition::process(double p_time, bool p_seek, bool p_seek_root) { int current = get_parameter(this->current); int prev = get_parameter(this->prev); int prev_current = get_parameter(this->prev_current); @@ -754,7 +755,7 @@ double AnimationNodeTransition::process(double p_time, bool p_seek) { if (prev < 0) { // process current animation, check for transition - rem = blend_input(current, p_time, p_seek, 1.0, FILTER_IGNORE, false); + rem = blend_input(current, p_time, p_seek, p_seek_root, 1.0, FILTER_IGNORE, false); if (p_seek) { time = p_time; @@ -772,16 +773,16 @@ double AnimationNodeTransition::process(double p_time, bool p_seek) { if (!p_seek && switched) { //just switched, seek to start of current - rem = blend_input(current, 0, true, 1.0 - blend, FILTER_IGNORE, false); + rem = blend_input(current, 0, true, p_seek_root, 1.0 - blend, FILTER_IGNORE, false); } else { - rem = blend_input(current, p_time, p_seek, 1.0 - blend, FILTER_IGNORE, false); + rem = blend_input(current, p_time, p_seek, p_seek_root, 1.0 - blend, FILTER_IGNORE, false); } if (p_seek) { // don't seek prev animation - blend_input(prev, 0, false, blend, FILTER_IGNORE, false); + blend_input(prev, 0, false, p_seek_root, blend, FILTER_IGNORE, false); time = p_time; } else { - blend_input(prev, p_time, false, blend, FILTER_IGNORE, false); + blend_input(prev, p_time, false, p_seek_root, blend, FILTER_IGNORE, false); time += p_time; prev_xfading -= p_time; if (prev_xfading < 0) { @@ -844,8 +845,8 @@ String AnimationNodeOutput::get_caption() const { return "Output"; } -double AnimationNodeOutput::process(double p_time, bool p_seek) { - return blend_input(0, p_time, p_seek, 1.0); +double AnimationNodeOutput::process(double p_time, bool p_seek, bool p_seek_root) { + return blend_input(0, p_time, p_seek, p_seek_root, 1.0); } AnimationNodeOutput::AnimationNodeOutput() { @@ -1057,9 +1058,9 @@ String AnimationNodeBlendTree::get_caption() const { return "BlendTree"; } -double AnimationNodeBlendTree::process(double p_time, bool p_seek) { +double AnimationNodeBlendTree::process(double p_time, bool p_seek, bool p_seek_root) { Ref<AnimationNodeOutput> output = nodes[SceneStringNames::get_singleton()->output].node; - return _blend_node("output", nodes[SceneStringNames::get_singleton()->output].connections, this, output, p_time, p_seek, 1.0); + return _blend_node("output", nodes[SceneStringNames::get_singleton()->output].connections, this, output, p_time, p_seek, p_seek_root, 1.0); } void AnimationNodeBlendTree::get_node_list(List<StringName> *r_list) { diff --git a/scene/animation/animation_blend_tree.h b/scene/animation/animation_blend_tree.h index 2acacd7396..0a2305b8d6 100644 --- a/scene/animation/animation_blend_tree.h +++ b/scene/animation/animation_blend_tree.h @@ -53,7 +53,7 @@ public: static Vector<String> (*get_editable_animation_list)(); virtual String get_caption() const override; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; void set_animation(const StringName &p_name); StringName get_animation() const; @@ -87,8 +87,8 @@ public: }; private: - float fade_in = 0.1; - float fade_out = 0.1; + float fade_in = 0.0; + float fade_out = 0.0; bool autorestart = false; float autorestart_delay = 1.0; @@ -102,7 +102,7 @@ private: float time; float remaining;*/ - StringName active = "active"; + StringName active = PNAME("active"); StringName prev_active = "prev_active"; StringName time = "time"; StringName remaining = "remaining"; @@ -138,7 +138,7 @@ public: bool is_using_sync() const; virtual bool has_filter() const override; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; AnimationNodeOneShot(); }; @@ -148,7 +148,7 @@ VARIANT_ENUM_CAST(AnimationNodeOneShot::MixMode) class AnimationNodeAdd2 : public AnimationNode { GDCLASS(AnimationNodeAdd2, AnimationNode); - StringName add_amount = "add_amount"; + StringName add_amount = PNAME("add_amount"); bool sync = false; protected: @@ -164,7 +164,7 @@ public: bool is_using_sync() const; virtual bool has_filter() const override; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; AnimationNodeAdd2(); }; @@ -172,7 +172,7 @@ public: class AnimationNodeAdd3 : public AnimationNode { GDCLASS(AnimationNodeAdd3, AnimationNode); - StringName add_amount = "add_amount"; + StringName add_amount = PNAME("add_amount"); bool sync = false; protected: @@ -188,7 +188,7 @@ public: bool is_using_sync() const; virtual bool has_filter() const override; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; AnimationNodeAdd3(); }; @@ -196,7 +196,7 @@ public: class AnimationNodeBlend2 : public AnimationNode { GDCLASS(AnimationNodeBlend2, AnimationNode); - StringName blend_amount = "blend_amount"; + StringName blend_amount = PNAME("blend_amount"); bool sync = false; protected: @@ -207,7 +207,7 @@ public: virtual Variant get_parameter_default_value(const StringName &p_parameter) const override; virtual String get_caption() const override; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; void set_use_sync(bool p_sync); bool is_using_sync() const; @@ -219,7 +219,7 @@ public: class AnimationNodeBlend3 : public AnimationNode { GDCLASS(AnimationNodeBlend3, AnimationNode); - StringName blend_amount; + StringName blend_amount = PNAME("blend_amount"); bool sync; protected: @@ -234,14 +234,14 @@ public: void set_use_sync(bool p_sync); bool is_using_sync() const; - double process(double p_time, bool p_seek) override; + double process(double p_time, bool p_seek, bool p_seek_root) override; AnimationNodeBlend3(); }; class AnimationNodeTimeScale : public AnimationNode { GDCLASS(AnimationNodeTimeScale, AnimationNode); - StringName scale = "scale"; + StringName scale = PNAME("scale"); protected: static void _bind_methods(); @@ -252,7 +252,7 @@ public: virtual String get_caption() const override; - double process(double p_time, bool p_seek) override; + double process(double p_time, bool p_seek, bool p_seek_root) override; AnimationNodeTimeScale(); }; @@ -260,7 +260,7 @@ public: class AnimationNodeTimeSeek : public AnimationNode { GDCLASS(AnimationNodeTimeSeek, AnimationNode); - StringName seek_pos = "seek_position"; + StringName seek_pos = PNAME("seek_position"); protected: static void _bind_methods(); @@ -271,7 +271,7 @@ public: virtual String get_caption() const override; - double process(double p_time, bool p_seek) override; + double process(double p_time, bool p_seek, bool p_seek_root) override; AnimationNodeTimeSeek(); }; @@ -300,7 +300,7 @@ class AnimationNodeTransition : public AnimationNode { StringName prev_xfading = "prev_xfading"; StringName prev = "prev"; StringName time = "time"; - StringName current = "current"; + StringName current = PNAME("current"); StringName prev_current = "prev_current"; float xfade = 0.0; @@ -329,7 +329,7 @@ public: void set_cross_fade_time(float p_fade); float get_cross_fade_time() const; - double process(double p_time, bool p_seek) override; + double process(double p_time, bool p_seek, bool p_seek_root) override; AnimationNodeTransition(); }; @@ -339,7 +339,7 @@ class AnimationNodeOutput : public AnimationNode { public: virtual String get_caption() const override; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; AnimationNodeOutput(); }; @@ -354,7 +354,7 @@ class AnimationNodeBlendTree : public AnimationRootNode { Vector<StringName> connections; }; - Map<StringName, Node> nodes; + HashMap<StringName, Node> nodes; Vector2 graph_offset; @@ -408,7 +408,7 @@ public: void get_node_connections(List<NodeConnection> *r_connections) const; virtual String get_caption() const override; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; void get_node_list(List<StringName> *r_list); diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index b3cae4f5b5..39849a0b00 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -188,7 +188,7 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta Vector2 current_pos = p_state_machine->states[current].position; Vector2 target_pos = p_state_machine->states[p_travel].position; - Map<StringName, AStarCost> cost_map; + HashMap<StringName, AStarCost> cost_map; List<int> open_list; @@ -292,7 +292,7 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationNodeStateMachine *p_sta return true; } -double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_state_machine, double p_time, bool p_seek) { +double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_state_machine, double p_time, bool p_seek, bool p_seek_root) { //if not playing and it can restart, then restart if (!playing && start_request == StringName()) { if (!stop_request && p_state_machine->start_node) { @@ -356,7 +356,7 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s current = p_state_machine->start_node; } - len_current = p_state_machine->blend_node(current, p_state_machine->states[current].node, 0, true, 1.0, AnimationNode::FILTER_IGNORE, false); + len_current = p_state_machine->blend_node(current, p_state_machine->states[current].node, 0, true, p_seek_root, 1.0, AnimationNode::FILTER_IGNORE, false); pos_current = 0; } @@ -381,10 +381,10 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s } } - float rem = p_state_machine->blend_node(current, p_state_machine->states[current].node, p_time, p_seek, fade_blend, AnimationNode::FILTER_IGNORE, false); + float rem = p_state_machine->blend_node(current, p_state_machine->states[current].node, p_time, p_seek, p_seek_root, fade_blend, AnimationNode::FILTER_IGNORE, false); if (fading_from != StringName()) { - p_state_machine->blend_node(fading_from, p_state_machine->states[fading_from].node, p_time, p_seek, 1.0 - fade_blend, AnimationNode::FILTER_IGNORE, false); + p_state_machine->blend_node(fading_from, p_state_machine->states[fading_from].node, p_time, p_seek, p_seek_root, 1.0 - fade_blend, AnimationNode::FILTER_IGNORE, false); } //guess playback position @@ -538,12 +538,12 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s } current = next; if (switch_mode == AnimationNodeStateMachineTransition::SWITCH_MODE_SYNC) { - len_current = p_state_machine->blend_node(current, p_state_machine->states[current].node, 0, true, 0, AnimationNode::FILTER_IGNORE, false); + len_current = p_state_machine->blend_node(current, p_state_machine->states[current].node, 0, true, p_seek_root, 0, AnimationNode::FILTER_IGNORE, false); pos_current = MIN(pos_current, len_current); - p_state_machine->blend_node(current, p_state_machine->states[current].node, pos_current, true, 0, AnimationNode::FILTER_IGNORE, false); + p_state_machine->blend_node(current, p_state_machine->states[current].node, pos_current, true, p_seek_root, 0, AnimationNode::FILTER_IGNORE, false); } else { - len_current = p_state_machine->blend_node(current, p_state_machine->states[current].node, 0, true, 0, AnimationNode::FILTER_IGNORE, false); + len_current = p_state_machine->blend_node(current, p_state_machine->states[current].node, 0, true, p_seek_root, 0, AnimationNode::FILTER_IGNORE, false); pos_current = 0; } @@ -1071,11 +1071,11 @@ Vector2 AnimationNodeStateMachine::get_graph_offset() const { return graph_offset; } -double AnimationNodeStateMachine::process(double p_time, bool p_seek) { +double AnimationNodeStateMachine::process(double p_time, bool p_seek, bool p_seek_root) { Ref<AnimationNodeStateMachinePlayback> playback = get_parameter(this->playback); ERR_FAIL_COND_V(playback.is_null(), 0.0); - return playback->process(this, p_time, p_seek); + return playback->process(this, p_time, p_seek, p_seek_root); } String AnimationNodeStateMachine::get_caption() const { diff --git a/scene/animation/animation_node_state_machine.h b/scene/animation/animation_node_state_machine.h index 39a84358fb..9eeac6a183 100644 --- a/scene/animation/animation_node_state_machine.h +++ b/scene/animation/animation_node_state_machine.h @@ -120,7 +120,7 @@ class AnimationNodeStateMachinePlayback : public Resource { bool _travel(AnimationNodeStateMachine *p_state_machine, const StringName &p_travel); - double process(AnimationNodeStateMachine *p_state_machine, double p_time, bool p_seek); + double process(AnimationNodeStateMachine *p_state_machine, double p_time, bool p_seek, bool p_seek_root); bool _check_advance_condition(const Ref<AnimationNodeStateMachine> p_state_machine, const Ref<AnimationNodeStateMachineTransition> p_transition) const; @@ -152,7 +152,7 @@ private: Vector2 position; }; - Map<StringName, State> states; + HashMap<StringName, State> states; struct Transition { StringName from; @@ -226,7 +226,7 @@ public: void set_graph_offset(const Vector2 &p_offset); Vector2 get_graph_offset() const; - virtual double process(double p_time, bool p_seek) override; + virtual double process(double p_time, bool p_seek, bool p_seek_root) override; virtual String get_caption() const override; virtual Ref<AnimationNode> get_child_by_name(const StringName &p_name) override; diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 081e6e809a..921a06b73c 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -163,7 +163,7 @@ bool AnimationPlayer::_get(const StringName &p_name, Variant &r_ret) const { for (int i = 0; i < keys.size(); i++) { array.push_back(keys[i].from); array.push_back(keys[i].to); - array.push_back(blend_times[keys[i]]); + array.push_back(blend_times.get(keys[i])); } r_ret = array; @@ -588,10 +588,10 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double //StringName property=a->track_get_path(i).get_property(); - Map<StringName, TrackNodeCache::PropertyAnim>::Element *E = nc->property_anim.find(a->track_get_path(i).get_concatenated_subnames()); + HashMap<StringName, TrackNodeCache::PropertyAnim>::Iterator E = nc->property_anim.find(a->track_get_path(i).get_concatenated_subnames()); ERR_CONTINUE(!E); //should it continue, or create a new one? - TrackNodeCache::PropertyAnim *pa = &E->get(); + TrackNodeCache::PropertyAnim *pa = &E->value; Animation::UpdateMode update_mode = a->value_track_get_update_mode(i); @@ -738,10 +738,10 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double continue; } - Map<StringName, TrackNodeCache::BezierAnim>::Element *E = nc->bezier_anim.find(a->track_get_path(i).get_concatenated_subnames()); + HashMap<StringName, TrackNodeCache::BezierAnim>::Iterator E = nc->bezier_anim.find(a->track_get_path(i).get_concatenated_subnames()); ERR_CONTINUE(!E); //should it continue, or create a new one? - TrackNodeCache::BezierAnim *ba = &E->get(); + TrackNodeCache::BezierAnim *ba = &E->value; real_t bezier = a->bezier_track_interpolate(i, p_time); if (ba->accum_pass != accum_pass) { @@ -832,7 +832,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double nc->audio_start = p_time; } } else if (nc->audio_playing) { - bool loop = a->get_loop_mode() != Animation::LoopMode::LOOP_NONE; + bool loop = a->get_loop_mode() != Animation::LOOP_NONE; bool stop = false; @@ -883,15 +883,15 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double double at_anim_pos = 0.0; switch (anim->get_loop_mode()) { - case Animation::LoopMode::LOOP_NONE: { + case Animation::LOOP_NONE: { at_anim_pos = MIN((double)anim->get_length(), p_time - pos); //seek to end } break; - case Animation::LoopMode::LOOP_LINEAR: { + case Animation::LOOP_LINEAR: { at_anim_pos = Math::fposmod(p_time - pos, (double)anim->get_length()); //seek to loop } break; - case Animation::LoopMode::LOOP_PINGPONG: { + case Animation::LOOP_PINGPONG: { at_anim_pos = Math::pingpong(p_time - pos, (double)anim->get_length()); } break; @@ -944,7 +944,7 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, double p_delta, int pingponged = 0; switch (cd.from->animation->get_loop_mode()) { - case Animation::LoopMode::LOOP_NONE: { + case Animation::LOOP_NONE: { if (next_pos < 0) { next_pos = 0; } else if (next_pos > len) { @@ -969,7 +969,7 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, double p_delta, } } break; - case Animation::LoopMode::LOOP_LINEAR: { + case Animation::LOOP_LINEAR: { double looped_next_pos = Math::fposmod(next_pos, (double)len); if (looped_next_pos == 0 && next_pos != 0) { // Loop multiples of the length to it, rather than 0 @@ -980,7 +980,7 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, double p_delta, } } break; - case Animation::LoopMode::LOOP_PINGPONG: { + case Animation::LOOP_PINGPONG: { if ((int)Math::floor(abs(next_pos - cd.pos) / len) % 2 == 0) { if (next_pos < 0 && cd.pos >= 0) { cd.speed_scale *= -1.0; @@ -1272,7 +1272,7 @@ void AnimationPlayer::_animation_removed(const StringName &p_name, const StringN void AnimationPlayer::_rename_animation(const StringName &p_from_name, const StringName &p_to_name) { // Rename autoplay or blends if needed. List<BlendKey> to_erase; - Map<BlendKey, float> to_insert; + HashMap<BlendKey, float, BlendKey> to_insert; for (const KeyValue<BlendKey, float> &E : blend_times) { BlendKey bk = E.key; BlendKey new_bk = bk; @@ -1298,8 +1298,8 @@ void AnimationPlayer::_rename_animation(const StringName &p_from_name, const Str } while (to_insert.size()) { - blend_times[to_insert.front()->key()] = to_insert.front()->get(); - to_insert.erase(to_insert.front()); + blend_times[to_insert.begin()->key] = to_insert.begin()->value; + to_insert.remove(to_insert.begin()); } if (autoplay == p_from_name) { @@ -1766,12 +1766,12 @@ void AnimationPlayer::_animation_changed() { } void AnimationPlayer::_stop_playing_caches() { - for (Set<TrackNodeCache *>::Element *E = playing_caches.front(); E; E = E->next()) { - if (E->get()->node && E->get()->audio_playing) { - E->get()->node->call(SNAME("stop")); + for (TrackNodeCache *E : playing_caches) { + if (E->node && E->audio_playing) { + E->node->call(SNAME("stop")); } - if (E->get()->node && E->get()->animation_playing) { - AnimationPlayer *player = Object::cast_to<AnimationPlayer>(E->get()->node); + if (E->node && E->animation_playing) { + AnimationPlayer *player = Object::cast_to<AnimationPlayer>(E->node); if (!player) { continue; } diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index 8c2f0e390b..3ef87dba28 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -132,7 +132,7 @@ private: Variant capture; }; - Map<StringName, PropertyAnim> property_anim; + HashMap<StringName, PropertyAnim> property_anim; struct BezierAnim { Vector<StringName> bezier_property; @@ -142,7 +142,7 @@ private: uint64_t accum_pass = 0; }; - Map<StringName, BezierAnim> bezier_anim; + HashMap<StringName, BezierAnim> bezier_anim; uint32_t last_setup_pass = 0; TrackNodeCache() {} @@ -153,6 +153,16 @@ private: int bone_idx = -1; int blend_shape_idx = -1; + static uint32_t hash(const TrackNodeCacheKey &p_key) { + uint32_t h = hash_one_uint64(p_key.id); + h = hash_djb2_one_32(p_key.bone_idx, h); + return hash_djb2_one_32(p_key.blend_shape_idx, h); + } + + inline bool operator==(const TrackNodeCacheKey &p_right) const { + return id == p_right.id && bone_idx == p_right.bone_idx && blend_shape_idx == p_right.blend_shape_idx; + } + inline bool operator<(const TrackNodeCacheKey &p_right) const { if (id == p_right.id) { if (blend_shape_idx == p_right.blend_shape_idx) { @@ -166,7 +176,7 @@ private: } }; - Map<TrackNodeCacheKey, TrackNodeCache> node_cache_map; + HashMap<TrackNodeCacheKey, TrackNodeCache, TrackNodeCacheKey> node_cache_map; TrackNodeCache *cache_update[NODE_CACHE_UPDATE_MAX]; int cache_update_size = 0; @@ -174,7 +184,7 @@ private: int cache_update_prop_size = 0; TrackNodeCache::BezierAnim *cache_update_bezier[NODE_CACHE_UPDATE_MAX]; int cache_update_bezier_size = 0; - Set<TrackNodeCache *> playing_caches; + RBSet<TrackNodeCache *> playing_caches; uint64_t accum_pass = 1; float speed_scale = 1.0; @@ -189,7 +199,7 @@ private: uint64_t last_update = 0; }; - Map<StringName, AnimationData> animation_set; + HashMap<StringName, AnimationData> animation_set; struct AnimationLibraryData { StringName name; @@ -202,10 +212,22 @@ private: struct BlendKey { StringName from; StringName to; - bool operator<(const BlendKey &bk) const { return from == bk.from ? String(to) < String(bk.to) : String(from) < String(bk.from); } + static uint32_t hash(const BlendKey &p_key) { + return hash_one_uint64((uint64_t(p_key.from.hash()) << 32) | uint32_t(p_key.to.hash())); + } + bool operator==(const BlendKey &bk) const { + return from == bk.from && to == bk.to; + } + bool operator<(const BlendKey &bk) const { + if (from == bk.from) { + return to < bk.to; + } else { + return from < bk.from; + } + } }; - Map<BlendKey, float> blend_times; + HashMap<BlendKey, float, BlendKey> blend_times; struct PlaybackData { AnimationData *from = nullptr; diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index d957c7f2de..d34e8db093 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -88,7 +88,7 @@ void AnimationNode::get_child_nodes(List<ChildNode> *r_child_nodes) { } } -void AnimationNode::blend_animation(const StringName &p_animation, double p_time, double p_delta, bool p_seeked, real_t p_blend, int p_pingponged) { +void AnimationNode::blend_animation(const StringName &p_animation, double p_time, double p_delta, bool p_seeked, bool p_seek_root, real_t p_blend, int p_pingponged) { ERR_FAIL_COND(!state); ERR_FAIL_COND(!state->player->has_animation(p_animation)); @@ -115,17 +115,18 @@ void AnimationNode::blend_animation(const StringName &p_animation, double p_time anim_state.animation = animation; anim_state.seeked = p_seeked; anim_state.pingponged = p_pingponged; + anim_state.seek_root = p_seek_root; state->animation_states.push_back(anim_state); } -double AnimationNode::_pre_process(const StringName &p_base_path, AnimationNode *p_parent, State *p_state, double p_time, bool p_seek, const Vector<StringName> &p_connections) { +double AnimationNode::_pre_process(const StringName &p_base_path, AnimationNode *p_parent, State *p_state, double p_time, bool p_seek, bool p_seek_root, const Vector<StringName> &p_connections) { base_path = p_base_path; parent = p_parent; connections = p_connections; state = p_state; - double t = process(p_time, p_seek); + double t = process(p_time, p_seek, p_seek_root); state = nullptr; parent = nullptr; @@ -144,7 +145,7 @@ void AnimationNode::make_invalid(const String &p_reason) { state->invalid_reasons += String::utf8("• ") + p_reason; } -double AnimationNode::blend_input(int p_input, double p_time, bool p_seek, real_t p_blend, FilterAction p_filter, bool p_optimize) { +double AnimationNode::blend_input(int p_input, double p_time, bool p_seek, bool p_seek_root, real_t p_blend, FilterAction p_filter, bool p_optimize) { ERR_FAIL_INDEX_V(p_input, inputs.size(), 0); ERR_FAIL_COND_V(!state, 0); @@ -163,7 +164,7 @@ double AnimationNode::blend_input(int p_input, double p_time, bool p_seek, real_ //inputs.write[p_input].last_pass = state->last_pass; real_t activity = 0.0; - double ret = _blend_node(node_name, blend_tree->get_node_connection_array(node_name), nullptr, node, p_time, p_seek, p_blend, p_filter, p_optimize, &activity); + double ret = _blend_node(node_name, blend_tree->get_node_connection_array(node_name), nullptr, node, p_time, p_seek, p_seek_root, p_blend, p_filter, p_optimize, &activity); Vector<AnimationTree::Activity> *activity_ptr = state->tree->input_activity_map.getptr(base_path); @@ -174,11 +175,11 @@ double AnimationNode::blend_input(int p_input, double p_time, bool p_seek, real_ return ret; } -double AnimationNode::blend_node(const StringName &p_sub_path, Ref<AnimationNode> p_node, double p_time, bool p_seek, real_t p_blend, FilterAction p_filter, bool p_optimize) { - return _blend_node(p_sub_path, Vector<StringName>(), this, p_node, p_time, p_seek, p_blend, p_filter, p_optimize); +double AnimationNode::blend_node(const StringName &p_sub_path, Ref<AnimationNode> p_node, double p_time, bool p_seek, bool p_seek_root, real_t p_blend, FilterAction p_filter, bool p_optimize) { + return _blend_node(p_sub_path, Vector<StringName>(), this, p_node, p_time, p_seek, p_seek_root, p_blend, p_filter, p_optimize); } -double AnimationNode::_blend_node(const StringName &p_subpath, const Vector<StringName> &p_connections, AnimationNode *p_new_parent, Ref<AnimationNode> p_node, double p_time, bool p_seek, real_t p_blend, FilterAction p_filter, bool p_optimize, real_t *r_max) { +double AnimationNode::_blend_node(const StringName &p_subpath, const Vector<StringName> &p_connections, AnimationNode *p_new_parent, Ref<AnimationNode> p_node, double p_time, bool p_seek, bool p_seek_root, real_t p_blend, FilterAction p_filter, bool p_optimize, real_t *r_max) { ERR_FAIL_COND_V(!p_node.is_valid(), 0); ERR_FAIL_COND_V(!state, 0); @@ -286,9 +287,9 @@ double AnimationNode::_blend_node(const StringName &p_subpath, const Vector<Stri } if (!p_seek && p_optimize && !any_valid) { - return p_node->_pre_process(new_path, new_parent, state, 0, p_seek, p_connections); + return p_node->_pre_process(new_path, new_parent, state, 0, p_seek, p_seek_root, p_connections); } - return p_node->_pre_process(new_path, new_parent, state, p_time, p_seek, p_connections); + return p_node->_pre_process(new_path, new_parent, state, p_time, p_seek, p_seek_root, p_connections); } int AnimationNode::get_input_count() const { @@ -332,9 +333,9 @@ void AnimationNode::remove_input(int p_index) { emit_changed(); } -double AnimationNode::process(double p_time, bool p_seek) { +double AnimationNode::process(double p_time, bool p_seek, bool p_seek_root) { double ret; - if (GDVIRTUAL_CALL(_process, p_time, p_seek, ret)) { + if (GDVIRTUAL_CALL(_process, p_time, p_seek, p_seek_root, ret)) { return ret; } @@ -418,9 +419,9 @@ void AnimationNode::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_filters", "filters"), &AnimationNode::_set_filters); ClassDB::bind_method(D_METHOD("_get_filters"), &AnimationNode::_get_filters); - ClassDB::bind_method(D_METHOD("blend_animation", "animation", "time", "delta", "seeked", "blend", "pingponged"), &AnimationNode::blend_animation, DEFVAL(0)); - ClassDB::bind_method(D_METHOD("blend_node", "name", "node", "time", "seek", "blend", "filter", "optimize"), &AnimationNode::blend_node, DEFVAL(FILTER_IGNORE), DEFVAL(true)); - ClassDB::bind_method(D_METHOD("blend_input", "input_index", "time", "seek", "blend", "filter", "optimize"), &AnimationNode::blend_input, DEFVAL(FILTER_IGNORE), DEFVAL(true)); + ClassDB::bind_method(D_METHOD("blend_animation", "animation", "time", "delta", "seeked", "seek_root", "blend", "pingponged"), &AnimationNode::blend_animation, DEFVAL(0)); + ClassDB::bind_method(D_METHOD("blend_node", "name", "node", "time", "seek", "seek_root", "blend", "filter", "optimize"), &AnimationNode::blend_node, DEFVAL(FILTER_IGNORE), DEFVAL(true)); + ClassDB::bind_method(D_METHOD("blend_input", "input_index", "time", "seek", "seek_root", "blend", "filter", "optimize"), &AnimationNode::blend_input, DEFVAL(FILTER_IGNORE), DEFVAL(true)); ClassDB::bind_method(D_METHOD("set_parameter", "name", "value"), &AnimationNode::set_parameter); ClassDB::bind_method(D_METHOD("get_parameter", "name"), &AnimationNode::get_parameter); @@ -432,7 +433,7 @@ void AnimationNode::_bind_methods() { GDVIRTUAL_BIND(_get_parameter_list); GDVIRTUAL_BIND(_get_child_by_name, "name"); GDVIRTUAL_BIND(_get_parameter_default_value, "parameter"); - GDVIRTUAL_BIND(_process, "time", "seek"); + GDVIRTUAL_BIND(_process, "time", "seek", "seek_root"); GDVIRTUAL_BIND(_get_caption); GDVIRTUAL_BIND(_has_filter); @@ -486,9 +487,9 @@ void AnimationTree::set_active(bool p_active) { } if (!active && is_inside_tree()) { - for (Set<TrackCache *>::Element *E = playing_caches.front(); E; E = E->next()) { - if (ObjectDB::get_instance(E->get()->object_id)) { - E->get()->object->call(SNAME("stop")); + for (const TrackCache *E : playing_caches) { + if (ObjectDB::get_instance(E->object_id)) { + E->object->call(SNAME("stop")); } } @@ -859,7 +860,6 @@ void AnimationTree::_process_graph(double p_delta) { _update_properties(); //if properties need updating, update them //check all tracks, see if they need modification - root_motion_transform = Transform3D(); if (!root.is_valid()) { @@ -938,11 +938,11 @@ void AnimationTree::_process_graph(double p_delta) { { if (started) { //if started, seek - root->_pre_process(SceneStringNames::get_singleton()->parameters_base_path, nullptr, &state, 0, true, Vector<StringName>()); + root->_pre_process(SceneStringNames::get_singleton()->parameters_base_path, nullptr, &state, 0, true, false, Vector<StringName>()); started = false; } - root->_pre_process(SceneStringNames::get_singleton()->parameters_base_path, nullptr, &state, p_delta, false, Vector<StringName>()); + root->_pre_process(SceneStringNames::get_singleton()->parameters_base_path, nullptr, &state, p_delta, false, false, Vector<StringName>()); } if (!state.valid) { @@ -962,6 +962,7 @@ void AnimationTree::_process_graph(double p_delta) { int pingponged = as.pingponged; #ifndef _3D_DISABLED bool backward = signbit(delta); + bool calc_root = !seeked || as.seek_root; #endif // _3D_DISABLED for (int i = 0; i < a->get_track_count(); i++) { @@ -990,7 +991,7 @@ void AnimationTree::_process_graph(double p_delta) { case Animation::TYPE_POSITION_3D: { #ifndef _3D_DISABLED TrackCacheTransform *t = static_cast<TrackCacheTransform *>(track); - if (track->root_motion) { + if (track->root_motion && calc_root) { if (t->process_pass != process_pass) { t->process_pass = process_pass; t->loc = Vector3(0, 0, 0); @@ -1052,7 +1053,7 @@ void AnimationTree::_process_graph(double p_delta) { } a->position_track_interpolate(i, 0, &loc[1]); t->loc += (loc[1] - loc[0]) * blend; - prev_time = 0; + prev_time = (double)a->get_length(); } } @@ -1086,7 +1087,7 @@ void AnimationTree::_process_graph(double p_delta) { case Animation::TYPE_ROTATION_3D: { #ifndef _3D_DISABLED TrackCacheTransform *t = static_cast<TrackCacheTransform *>(track); - if (track->root_motion) { + if (track->root_motion && calc_root) { if (t->process_pass != process_pass) { t->process_pass = process_pass; t->loc = Vector3(0, 0, 0); @@ -1148,7 +1149,7 @@ void AnimationTree::_process_graph(double p_delta) { } a->rotation_track_interpolate(i, 0, &rot[1]); t->rot = (t->rot * Quaternion().slerp(rot[0].inverse() * rot[1], blend)).normalized(); - prev_time = 0; + prev_time = (double)a->get_length(); } } @@ -1182,7 +1183,7 @@ void AnimationTree::_process_graph(double p_delta) { case Animation::TYPE_SCALE_3D: { #ifndef _3D_DISABLED TrackCacheTransform *t = static_cast<TrackCacheTransform *>(track); - if (track->root_motion) { + if (track->root_motion && calc_root) { if (t->process_pass != process_pass) { t->process_pass = process_pass; t->loc = Vector3(0, 0, 0); @@ -1244,7 +1245,7 @@ void AnimationTree::_process_graph(double p_delta) { } a->scale_track_interpolate(i, 0, &scale[1]); t->scale += (scale[1] - scale[0]) * blend; - prev_time = 0; + prev_time = (double)a->get_length(); } } @@ -1301,8 +1302,7 @@ void AnimationTree::_process_graph(double p_delta) { Animation::UpdateMode update_mode = a->value_track_get_update_mode(i); - if (update_mode == Animation::UPDATE_CONTINUOUS || update_mode == Animation::UPDATE_CAPTURE) { //delta == 0 means seek - + if (update_mode == Animation::UPDATE_CONTINUOUS || update_mode == Animation::UPDATE_CAPTURE) { Variant value = a->value_track_interpolate(i, time); if (value == Variant()) { @@ -1443,7 +1443,7 @@ void AnimationTree::_process_graph(double p_delta) { t->start = time; } } else if (t->playing) { - bool loop = a->get_loop_mode() != Animation::LoopMode::LOOP_NONE; + bool loop = a->get_loop_mode() != Animation::LOOP_NONE; bool stop = false; @@ -1512,13 +1512,13 @@ void AnimationTree::_process_graph(double p_delta) { double at_anim_pos = 0.0; switch (anim->get_loop_mode()) { - case Animation::LoopMode::LOOP_NONE: { + case Animation::LOOP_NONE: { at_anim_pos = MAX((double)anim->get_length(), time - pos); //seek to end } break; - case Animation::LoopMode::LOOP_LINEAR: { + case Animation::LOOP_LINEAR: { at_anim_pos = Math::fposmod(time - pos, (double)anim->get_length()); //seek to loop } break; - case Animation::LoopMode::LOOP_PINGPONG: { + case Animation::LOOP_PINGPONG: { at_anim_pos = Math::pingpong(time - pos, (double)a->get_length()); } break; default: diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h index 3f09bf7f4b..37cd22568a 100644 --- a/scene/animation/animation_tree.h +++ b/scene/animation/animation_tree.h @@ -68,6 +68,7 @@ public: const Vector<real_t> *track_blends = nullptr; real_t blend = 0.0; bool seeked = false; + bool seek_root = false; int pingponged = 0; }; @@ -85,7 +86,7 @@ public: Vector<real_t> blends; State *state = nullptr; - double _pre_process(const StringName &p_base_path, AnimationNode *p_parent, State *p_state, double p_time, bool p_seek, const Vector<StringName> &p_connections); + double _pre_process(const StringName &p_base_path, AnimationNode *p_parent, State *p_state, double p_time, bool p_seek, bool p_seek_root, const Vector<StringName> &p_connections); //all this is temporary StringName base_path; @@ -98,12 +99,12 @@ public: Array _get_filters() const; void _set_filters(const Array &p_filters); friend class AnimationNodeBlendTree; - double _blend_node(const StringName &p_subpath, const Vector<StringName> &p_connections, AnimationNode *p_new_parent, Ref<AnimationNode> p_node, double p_time, bool p_seek, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true, real_t *r_max = nullptr); + double _blend_node(const StringName &p_subpath, const Vector<StringName> &p_connections, AnimationNode *p_new_parent, Ref<AnimationNode> p_node, double p_time, bool p_seek, bool p_seek_root, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true, real_t *r_max = nullptr); protected: - void blend_animation(const StringName &p_animation, double p_time, double p_delta, bool p_seeked, real_t p_blend, int p_pingponged = 0); - double blend_node(const StringName &p_sub_path, Ref<AnimationNode> p_node, double p_time, bool p_seek, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true); - double blend_input(int p_input, double p_time, bool p_seek, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true); + void blend_animation(const StringName &p_animation, double p_time, double p_delta, bool p_seeked, bool p_seek_root, real_t p_blend, int p_pingponged = 0); + double blend_node(const StringName &p_sub_path, Ref<AnimationNode> p_node, double p_time, bool p_seek, bool p_seek_root, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true); + double blend_input(int p_input, double p_time, bool p_seek, bool p_seek_root, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true); void make_invalid(const String &p_reason); @@ -115,7 +116,7 @@ protected: GDVIRTUAL0RC(Array, _get_parameter_list) GDVIRTUAL1RC(Ref<AnimationNode>, _get_child_by_name, StringName) GDVIRTUAL1RC(Variant, _get_parameter_default_value, StringName) - GDVIRTUAL2RC(double, _process, double, bool) + GDVIRTUAL3RC(double, _process, double, bool, bool) GDVIRTUAL0RC(String, _get_caption) GDVIRTUAL0RC(bool, _has_filter) @@ -133,7 +134,7 @@ public: virtual void get_child_nodes(List<ChildNode> *r_child_nodes); - virtual double process(double p_time, bool p_seek); + virtual double process(double p_time, bool p_seek, bool p_seek_root); virtual String get_caption() const; int get_input_count() const; @@ -266,7 +267,7 @@ private: }; HashMap<NodePath, TrackCache *> track_cache; - Set<TrackCache *> playing_caches; + RBSet<TrackCache *> playing_caches; Ref<AnimationNode> root; diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp index c8e8ff1cd1..efb647af29 100644 --- a/scene/audio/audio_stream_player.cpp +++ b/scene/audio/audio_stream_player.cpp @@ -349,7 +349,7 @@ void AudioStreamPlayer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer::get_stream_playback); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,suffix:dB"), "set_volume_db", "get_volume_db"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled"); diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp index 17b573b776..dfad91ecd5 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -68,7 +68,7 @@ bool SceneDebugger::RPCProfilerFrame::deserialize(const Array &p_arr) { } class SceneDebugger::RPCProfiler : public EngineProfiler { - Map<ObjectID, RPCNodeInfo> rpc_node_data; + HashMap<ObjectID, RPCNodeInfo> rpc_node_data; uint64_t last_profile_time = 0; void init_node(const ObjectID p_node) { @@ -345,22 +345,22 @@ void SceneDebugger::remove_from_cache(const String &p_filename, Node *p_node) { return; } - Map<String, Set<Node *>> &edit_cache = debugger->live_scene_edit_cache; - Map<String, Set<Node *>>::Element *E = edit_cache.find(p_filename); + HashMap<String, RBSet<Node *>> &edit_cache = debugger->live_scene_edit_cache; + HashMap<String, RBSet<Node *>>::Iterator E = edit_cache.find(p_filename); if (E) { - E->get().erase(p_node); - if (E->get().size() == 0) { - edit_cache.erase(E); + E->value.erase(p_node); + if (E->value.size() == 0) { + edit_cache.remove(E); } } - Map<Node *, Map<ObjectID, Node *>> &remove_list = debugger->live_edit_remove_list; - Map<Node *, Map<ObjectID, Node *>>::Element *F = remove_list.find(p_node); + HashMap<Node *, HashMap<ObjectID, Node *>> &remove_list = debugger->live_edit_remove_list; + HashMap<Node *, HashMap<ObjectID, Node *>>::Iterator F = remove_list.find(p_node); if (F) { - for (const KeyValue<ObjectID, Node *> &G : F->get()) { + for (const KeyValue<ObjectID, Node *> &G : F->value) { memdelete(G.value); } - remove_list.erase(F); + remove_list.remove(F); } } @@ -408,47 +408,47 @@ SceneDebuggerObject::SceneDebuggerObject(ObjectID p_id) { } void SceneDebuggerObject::_parse_script_properties(Script *p_script, ScriptInstance *p_instance) { - typedef Map<const Script *, Set<StringName>> ScriptMemberMap; - typedef Map<const Script *, Map<StringName, Variant>> ScriptConstantsMap; + typedef HashMap<const Script *, RBSet<StringName>> ScriptMemberMap; + typedef HashMap<const Script *, HashMap<StringName, Variant>> ScriptConstantsMap; ScriptMemberMap members; if (p_instance) { - members[p_script] = Set<StringName>(); + members[p_script] = RBSet<StringName>(); p_script->get_members(&(members[p_script])); } ScriptConstantsMap constants; - constants[p_script] = Map<StringName, Variant>(); + constants[p_script] = HashMap<StringName, Variant>(); p_script->get_constants(&(constants[p_script])); Ref<Script> base = p_script->get_base_script(); while (base.is_valid()) { if (p_instance) { - members[base.ptr()] = Set<StringName>(); + members[base.ptr()] = RBSet<StringName>(); base->get_members(&(members[base.ptr()])); } - constants[base.ptr()] = Map<StringName, Variant>(); + constants[base.ptr()] = HashMap<StringName, Variant>(); base->get_constants(&(constants[base.ptr()])); base = base->get_base_script(); } // Members - for (ScriptMemberMap::Element *sm = members.front(); sm; sm = sm->next()) { - for (Set<StringName>::Element *E = sm->get().front(); E; E = E->next()) { + for (KeyValue<const Script *, RBSet<StringName>> sm : members) { + for (const StringName &E : sm.value) { Variant m; - if (p_instance->get(E->get(), m)) { - String script_path = sm->key() == p_script ? "" : sm->key()->get_path().get_file() + "/"; - PropertyInfo pi(m.get_type(), "Members/" + script_path + E->get()); + if (p_instance->get(E, m)) { + String script_path = sm.key == p_script ? "" : sm.key->get_path().get_file() + "/"; + PropertyInfo pi(m.get_type(), "Members/" + script_path + E); properties.push_back(SceneDebuggerProperty(pi, m)); } } } // Constants - for (ScriptConstantsMap::Element *sc = constants.front(); sc; sc = sc->next()) { - for (const KeyValue<StringName, Variant> &E : sc->get()) { - String script_path = sc->key() == p_script ? "" : sc->key()->get_path().get_file() + "/"; + for (KeyValue<const Script *, HashMap<StringName, Variant>> &sc : constants) { + for (const KeyValue<StringName, Variant> &E : sc.value) { + String script_path = sc.key == p_script ? "" : sc.key->get_path().get_file() + "/"; if (E.value.get_type() == Variant::OBJECT) { Variant id = ((Object *)E.value)->get_instance_id(); PropertyInfo pi(id.get_type(), "Constants/" + E.key, PROPERTY_HINT_OBJECT_ID, "Object"); @@ -624,13 +624,13 @@ void LiveEditor::_node_set_func(int p_id, const StringName &p_prop, const Varian base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -668,13 +668,13 @@ void LiveEditor::_node_call_func(int p_id, const StringName &p_method, const Var base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -753,13 +753,13 @@ void LiveEditor::_create_node_func(const NodePath &p_parent, const String &p_typ base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -797,13 +797,13 @@ void LiveEditor::_instance_node_func(const NodePath &p_parent, const String &p_p base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -835,13 +835,13 @@ void LiveEditor::_remove_node_func(const NodePath &p_at) { base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F;) { - Set<Node *>::Element *N = F->next(); + for (RBSet<Node *>::Element *F = E->value.front(); F;) { + RBSet<Node *>::Element *N = F->next(); Node *n = F->get(); @@ -871,13 +871,13 @@ void LiveEditor::_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_kee base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F;) { - Set<Node *>::Element *N = F->next(); + for (RBSet<Node *>::Element *F = E->value.front(); F;) { + RBSet<Node *>::Element *N = F->next(); Node *n = F->get(); @@ -910,13 +910,13 @@ void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_a base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F;) { - Set<Node *>::Element *N = F->next(); + for (RBSet<Node *>::Element *F = E->value.front(); F;) { + RBSet<Node *>::Element *N = F->next(); Node *n = F->get(); @@ -929,23 +929,23 @@ void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_a } Node *n2 = n->get_node(p_at); - Map<Node *, Map<ObjectID, Node *>>::Element *EN = live_edit_remove_list.find(n); + HashMap<Node *, HashMap<ObjectID, Node *>>::Iterator EN = live_edit_remove_list.find(n); if (!EN) { continue; } - Map<ObjectID, Node *>::Element *FN = EN->get().find(p_id); + HashMap<ObjectID, Node *>::Iterator FN = EN->value.find(p_id); if (!FN) { continue; } - n2->add_child(FN->get()); + n2->add_child(FN->value); - EN->get().erase(FN); + EN->value.remove(FN); - if (EN->get().size() == 0) { - live_edit_remove_list.erase(EN); + if (EN->value.size() == 0) { + live_edit_remove_list.remove(EN); } F = N; @@ -963,13 +963,13 @@ void LiveEditor::_duplicate_node_func(const NodePath &p_at, const String &p_new_ base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -1002,13 +1002,13 @@ void LiveEditor::_reparent_node_func(const NodePath &p_at, const NodePath &p_new base = scene_tree->root->get_node(live_edit_root); } - Map<String, Set<Node *>>::Element *E = live_scene_edit_cache.find(live_edit_scene); + HashMap<String, RBSet<Node *>>::Iterator E = live_scene_edit_cache.find(live_edit_scene); if (!E) { return; //scene not editable } - for (Set<Node *>::Element *F = E->get().front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; diff --git a/scene/debugger/scene_debugger.h b/scene/debugger/scene_debugger.h index 29d7da7d11..0daefa9609 100644 --- a/scene/debugger/scene_debugger.h +++ b/scene/debugger/scene_debugger.h @@ -132,14 +132,14 @@ public: class LiveEditor { private: friend class SceneDebugger; - Map<int, NodePath> live_edit_node_path_cache; - Map<int, String> live_edit_resource_cache; + HashMap<int, NodePath> live_edit_node_path_cache; + HashMap<int, String> live_edit_resource_cache; NodePath live_edit_root; String live_edit_scene; - Map<String, Set<Node *>> live_scene_edit_cache; - Map<Node *, Map<ObjectID, Node *>> live_edit_remove_list; + HashMap<String, RBSet<Node *>> live_scene_edit_cache; + HashMap<Node *, HashMap<ObjectID, Node *>> live_edit_remove_list; void _send_tree(); diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 789c01adf3..776623f7ce 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -43,12 +43,12 @@ void BaseButton::_unpress_group() { status.pressed = true; } - for (Set<BaseButton *>::Element *E = button_group->buttons.front(); E; E = E->next()) { - if (E->get() == this) { + for (BaseButton *E : button_group->buttons) { + if (E == this) { continue; } - E->get()->set_pressed(false); + E->set_pressed(false); } } @@ -485,24 +485,24 @@ BaseButton::~BaseButton() { } void ButtonGroup::get_buttons(List<BaseButton *> *r_buttons) { - for (Set<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { - r_buttons->push_back(E->get()); + for (BaseButton *E : buttons) { + r_buttons->push_back(E); } } Array ButtonGroup::_get_buttons() { Array btns; - for (Set<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { - btns.push_back(E->get()); + for (const BaseButton *E : buttons) { + btns.push_back(E); } return btns; } BaseButton *ButtonGroup::get_pressed_button() { - for (Set<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) { - if (E->get()->is_pressed()) { - return E->get(); + for (BaseButton *E : buttons) { + if (E->is_pressed()) { + return E; } } diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index f4f9b88868..0b70d285ee 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -143,7 +143,7 @@ VARIANT_ENUM_CAST(BaseButton::ActionMode) class ButtonGroup : public Resource { GDCLASS(ButtonGroup, Resource); friend class BaseButton; - Set<BaseButton *> buttons; + RBSet<BaseButton *> buttons; protected: static void _bind_methods(); diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index 251648da69..df695feba8 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -52,7 +52,7 @@ void BoxContainer::_resort() { int stretch_min = 0; int stretch_avail = 0; float stretch_ratio_total = 0.0; - Map<Control *, _MinSizeCache> min_size_cache; + HashMap<Control *, _MinSizeCache> min_size_cache; for (int i = 0; i < get_child_count(); i++) { Control *c = Object::cast_to<Control>(get_child(i)); diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index ff194f979d..c54897035a 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -60,11 +60,11 @@ Size2 Button::get_minimum_size() const { } } } - - Ref<Font> font = get_theme_font(SNAME("font")); - float font_height = font->get_height(get_theme_font_size(SNAME("font_size"))); - - minsize.height = MAX(font_height, minsize.height); + if (!xl_text.is_empty()) { + Ref<Font> font = get_theme_font(SNAME("font")); + float font_height = font->get_height(get_theme_font_size(SNAME("font_size"))); + minsize.height = MAX(font_height, minsize.height); + } return get_theme_stylebox(SNAME("normal"))->get_minimum_size() + minsize; } diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index b2aa4030b7..22e9763929 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -740,8 +740,8 @@ void CodeEdit::set_auto_indent_prefixes(const TypedArray<String> &p_prefixes) { TypedArray<String> CodeEdit::get_auto_indent_prefixes() const { TypedArray<String> prefixes; - for (const Set<char32_t>::Element *E = auto_indent_prefixes.front(); E; E = E->next()) { - prefixes.push_back(String::chr(E->get())); + for (const char32_t &E : auto_indent_prefixes) { + prefixes.push_back(String::chr(E)); } return prefixes; } @@ -1628,7 +1628,7 @@ Point2 CodeEdit::get_delimiter_start_position(int p_line, int p_column) const { start_position.y = -1; start_position.x = -1; - bool in_region = ((p_line <= 0 || delimiter_cache[p_line - 1].size() < 1) ? -1 : delimiter_cache[p_line - 1].back()->value()) != -1; + bool in_region = ((p_line <= 0 || delimiter_cache[p_line - 1].size() < 1) ? -1 : delimiter_cache[p_line - 1].back()->get()) != -1; /* Check the keys for this line. */ for (const KeyValue<int, int> &E : delimiter_cache[p_line]) { @@ -1752,8 +1752,8 @@ void CodeEdit::set_code_completion_prefixes(const TypedArray<String> &p_prefixes TypedArray<String> CodeEdit::get_code_completion_prefixes() const { TypedArray<String> prefixes; - for (const Set<char32_t>::Element *E = code_completion_prefixes.front(); E; E = E->next()) { - prefixes.push_back(String::chr(E->get())); + for (const char32_t &E : code_completion_prefixes) { + prefixes.push_back(String::chr(E)); } return prefixes; } @@ -2402,7 +2402,7 @@ void CodeEdit::_update_delimiter_cache(int p_from_line, int p_to_line) { } } else { for (int i = start_line; i < end_line; i++) { - delimiter_cache.insert(i, Map<int, int>()); + delimiter_cache.insert(i, RBMap<int, int>()); } } } @@ -2539,7 +2539,7 @@ int CodeEdit::_is_in_delimiter(int p_line, int p_column, DelimiterType p_type) c int region = (p_line <= 0 || delimiter_cache[p_line - 1].size() < 1) ? -1 : delimiter_cache[p_line - 1].back()->value(); bool in_region = region != -1 && delimiters[region].type == p_type; - for (Map<int, int>::Element *E = delimiter_cache[p_line].front(); E; E = E->next()) { + for (RBMap<int, int>::Element *E = delimiter_cache[p_line].front(); E; E = E->next()) { /* If column is specified, loop until the key is larger then the column. */ if (p_column != -1) { if (E->key() > p_column) { diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h index 135dd32780..0b00735f46 100644 --- a/scene/gui/code_edit.h +++ b/scene/gui/code_edit.h @@ -58,7 +58,7 @@ private: String indent_text = "\t"; bool auto_indent = false; - Set<char32_t> auto_indent_prefixes; + RBSet<char32_t> auto_indent_prefixes; bool indent_using_spaces = false; int _calculate_spaces_till_next_left_indent(int p_column) const; @@ -176,7 +176,7 @@ private: * ] * ] */ - Vector<Map<int, int>> delimiter_cache; + Vector<RBMap<int, int>> delimiter_cache; void _update_delimiter_cache(int p_from_line = 0, int p_to_line = -1); int _is_in_delimiter(int p_line, int p_column, DelimiterType p_type) const; @@ -214,7 +214,7 @@ private: int code_completion_longest_line = 0; Rect2i code_completion_rect; - Set<char32_t> code_completion_prefixes; + RBSet<char32_t> code_completion_prefixes; List<ScriptLanguage::CodeCompletionOption> code_completion_option_submitted; List<ScriptLanguage::CodeCompletionOption> code_completion_option_sources; String code_completion_base; diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 54fa726260..903e7a26a1 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -471,6 +471,13 @@ void Control::_validate_property(PropertyInfo &property) const { property.hint_string = hint_string; } + if (property.name == "mouse_force_pass_scroll_events") { + // Disable force pass if the control is not stopping the event. + if (data.mouse_filter != MOUSE_FILTER_STOP) { + property.usage |= PROPERTY_USAGE_READ_ONLY; + } + } + // Validate which positioning properties should be displayed depending on the parent and the layout mode. Node *parent_node = get_parent_control(); if (!parent_node) { @@ -712,35 +719,25 @@ void Control::_notification(int p_notification) { data.parent_window = Object::cast_to<Window>(get_parent()); data.is_rtl_dirty = true; - Node *parent = this; //meh + CanvasItem *node = this; Control *parent_control = nullptr; - bool subwindow = false; - - while (parent) { - parent = parent->get_parent(); + while (!node->is_set_as_top_level()) { + CanvasItem *parent = Object::cast_to<CanvasItem>(node->get_parent()); if (!parent) { break; } - CanvasItem *ci = Object::cast_to<CanvasItem>(parent); - if (ci && ci->is_set_as_top_level()) { - subwindow = true; - break; - } - parent_control = Object::cast_to<Control>(parent); - if (parent_control) { break; - } else if (ci) { - } else { - break; } + + node = parent; } - if (parent_control && !subwindow) { - //do nothing, has a parent control and not top_level + if (parent_control) { + // Do nothing, has a parent control. if (data.theme.is_null() && parent_control->data.theme_owner) { data.theme_owner = parent_control->data.theme_owner; notification(NOTIFICATION_THEME_CHANGED); @@ -2931,6 +2928,7 @@ int Control::get_v_size_flags() const { void Control::set_mouse_filter(MouseFilter p_filter) { ERR_FAIL_INDEX(p_filter, 3); data.mouse_filter = p_filter; + notify_property_list_changed(); update_configuration_warnings(); } @@ -2938,6 +2936,14 @@ Control::MouseFilter Control::get_mouse_filter() const { return data.mouse_filter; } +void Control::set_force_pass_scroll_events(bool p_force_pass_scroll_events) { + data.force_pass_scroll_events = p_force_pass_scroll_events; +} + +bool Control::is_force_pass_scroll_events() const { + return data.force_pass_scroll_events; +} + void Control::warp_mouse(const Point2 &p_position) { ERR_FAIL_COND(!is_inside_tree()); get_viewport()->warp_mouse(get_global_transform_with_canvas().xform(p_position)); @@ -3250,6 +3256,9 @@ void Control::_bind_methods() { ClassDB::bind_method(D_METHOD("set_mouse_filter", "filter"), &Control::set_mouse_filter); ClassDB::bind_method(D_METHOD("get_mouse_filter"), &Control::get_mouse_filter); + ClassDB::bind_method(D_METHOD("set_force_pass_scroll_events", "force_pass_scroll_events"), &Control::set_force_pass_scroll_events); + ClassDB::bind_method(D_METHOD("is_force_pass_scroll_events"), &Control::is_force_pass_scroll_events); + ClassDB::bind_method(D_METHOD("set_clip_contents", "enable"), &Control::set_clip_contents); ClassDB::bind_method(D_METHOD("is_clipping_contents"), &Control::is_clipping_contents); @@ -3292,19 +3301,19 @@ void Control::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_bottom", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", SIDE_BOTTOM); ADD_SUBGROUP_INDENT("Anchor Offsets", "offset_", 1); - ADD_PROPERTYI(PropertyInfo(Variant::INT, "offset_left", PROPERTY_HINT_RANGE, "-4096,4096"), "set_offset", "get_offset", SIDE_LEFT); - ADD_PROPERTYI(PropertyInfo(Variant::INT, "offset_top", PROPERTY_HINT_RANGE, "-4096,4096"), "set_offset", "get_offset", SIDE_TOP); - ADD_PROPERTYI(PropertyInfo(Variant::INT, "offset_right", PROPERTY_HINT_RANGE, "-4096,4096"), "set_offset", "get_offset", SIDE_RIGHT); - ADD_PROPERTYI(PropertyInfo(Variant::INT, "offset_bottom", PROPERTY_HINT_RANGE, "-4096,4096"), "set_offset", "get_offset", SIDE_BOTTOM); + ADD_PROPERTYI(PropertyInfo(Variant::INT, "offset_left", PROPERTY_HINT_RANGE, "-4096,4096,suffix:px"), "set_offset", "get_offset", SIDE_LEFT); + ADD_PROPERTYI(PropertyInfo(Variant::INT, "offset_top", PROPERTY_HINT_RANGE, "-4096,4096,suffix:px"), "set_offset", "get_offset", SIDE_TOP); + ADD_PROPERTYI(PropertyInfo(Variant::INT, "offset_right", PROPERTY_HINT_RANGE, "-4096,4096,suffix:px"), "set_offset", "get_offset", SIDE_RIGHT); + ADD_PROPERTYI(PropertyInfo(Variant::INT, "offset_bottom", PROPERTY_HINT_RANGE, "-4096,4096,suffix:px"), "set_offset", "get_offset", SIDE_BOTTOM); ADD_SUBGROUP_INDENT("Grow Direction", "grow_", 1); ADD_PROPERTY(PropertyInfo(Variant::INT, "grow_horizontal", PROPERTY_HINT_ENUM, "Left,Right,Both"), "set_h_grow_direction", "get_h_grow_direction"); ADD_PROPERTY(PropertyInfo(Variant::INT, "grow_vertical", PROPERTY_HINT_ENUM, "Top,Bottom,Both"), "set_v_grow_direction", "get_v_grow_direction"); ADD_SUBGROUP("Transform", ""); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_size", "get_size"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_position", "get_position"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "_set_global_position", "get_global_position"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_EDITOR), "_set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_EDITOR), "_set_position", "get_position"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_position", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_NONE), "_set_global_position", "get_global_position"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater,radians"), "set_rotation", "get_rotation"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "pivot_offset"), "set_pivot_offset", "get_pivot_offset"); @@ -3331,6 +3340,7 @@ void Control::_bind_methods() { ADD_GROUP("Mouse", "mouse_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mouse_filter", PROPERTY_HINT_ENUM, "Stop,Pass,Ignore"), "set_mouse_filter", "get_mouse_filter"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mouse_force_pass_scroll_events"), "set_force_pass_scroll_events", "is_force_pass_scroll_events"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mouse_default_cursor_shape", PROPERTY_HINT_ENUM, "Arrow,I-Beam,Pointing Hand,Cross,Wait,Busy,Drag,Can Drop,Forbidden,Vertical Resize,Horizontal Resize,Secondary Diagonal Resize,Main Diagonal Resize,Move,Vertical Split,Horizontal Split,Help"), "set_default_cursor_shape", "get_default_cursor_shape"); ADD_GROUP("Theme", "theme_"); diff --git a/scene/gui/control.h b/scene/gui/control.h index 65b71d74f8..f18dd99bff 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -190,6 +190,7 @@ private: Point2 custom_minimum_size; MouseFilter mouse_filter = MOUSE_FILTER_STOP; + bool force_pass_scroll_events = true; bool clip_contents = false; @@ -216,12 +217,12 @@ private: NodePath focus_prev; bool bulk_theme_override = false; - HashMap<StringName, Ref<Texture2D>> icon_override; - HashMap<StringName, Ref<StyleBox>> style_override; - HashMap<StringName, Ref<Font>> font_override; - HashMap<StringName, int> font_size_override; - HashMap<StringName, Color> color_override; - HashMap<StringName, int> constant_override; + Theme::ThemeIconMap icon_override; + Theme::ThemeStyleMap style_override; + Theme::ThemeFontMap font_override; + Theme::ThemeFontSizeMap font_size_override; + Theme::ThemeColorMap color_override; + Theme::ThemeConstantMap constant_override; } data; @@ -468,6 +469,9 @@ public: void set_mouse_filter(MouseFilter p_filter); MouseFilter get_mouse_filter() const; + void set_force_pass_scroll_events(bool p_force_pass_scroll_events); + bool is_force_pass_scroll_events() const; + /* SKINNING */ void begin_bulk_theme_override(); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 6da5340ca4..1725816c31 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -915,7 +915,7 @@ void FileDialog::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mode_overrides_title"), "set_mode_overrides_title", "is_mode_overriding_title"); ADD_PROPERTY(PropertyInfo(Variant::INT, "file_mode", PROPERTY_HINT_ENUM, "Open File,Open Files,Open Folder,Open Any,Save"), "set_file_mode", "get_file_mode"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User Data,File System"), "set_access", "get_access"); ADD_PROPERTY(PropertyInfo(Variant::PACKED_STRING_ARRAY, "filters"), "set_filters", "get_filters"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_dir", PROPERTY_HINT_DIR, "", PROPERTY_USAGE_NONE), "set_current_dir", "get_current_dir"); diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp index 1e5863b845..30b694da76 100644 --- a/scene/gui/flow_container.cpp +++ b/scene/gui/flow_container.cpp @@ -49,7 +49,7 @@ void FlowContainer::_resort() { bool rtl = is_layout_rtl(); - Map<Control *, Size2i> children_minsize_cache; + HashMap<Control *, Size2i> children_minsize_cache; Vector<_LineData> lines_data; diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 4c8006e33d..ccf7e2828a 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -1343,7 +1343,19 @@ void GraphEdit::gui_input(const Ref<InputEvent> &p_ev) { emit_signal(SNAME("paste_nodes_request")); accept_event(); } else if (p_ev->is_action("ui_graph_delete")) { - emit_signal(SNAME("delete_nodes_request")); + TypedArray<StringName> nodes; + + for (int i = 0; i < get_child_count(); i++) { + GraphNode *gn = Object::cast_to<GraphNode>(get_child(i)); + if (!gn) { + continue; + } + if (gn->is_selected() && gn->is_close_button_visible()) { + nodes.push_back(gn->get_name()); + } + } + + emit_signal(SNAME("delete_nodes_request"), nodes); accept_event(); } } @@ -1684,11 +1696,11 @@ void GraphEdit::set_warped_panning(bool p_warped) { warped_panning = p_warped; } -int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, const Set<StringName> &r_v) { +int GraphEdit::_set_operations(SET_OPERATIONS p_operation, RBSet<StringName> &r_u, const RBSet<StringName> &r_v) { switch (p_operation) { case GraphEdit::IS_EQUAL: { - for (Set<StringName>::Element *E = r_u.front(); E; E = E->next()) { - if (!r_v.has(E->get())) { + for (const StringName &E : r_u) { + if (!r_v.has(E)) { return 0; } } @@ -1698,15 +1710,15 @@ int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, if (r_u.size() == r_v.size() && !r_u.size()) { return 1; } - for (Set<StringName>::Element *E = r_u.front(); E; E = E->next()) { - if (!r_v.has(E->get())) { + for (const StringName &E : r_u) { + if (!r_v.has(E)) { return 0; } } return 1; } break; case GraphEdit::DIFFERENCE: { - for (Set<StringName>::Element *E = r_u.front(); E; E = E->next()) { + for (RBSet<StringName>::Element *E = r_u.front(); E; E = E->next()) { if (r_v.has(E->get())) { r_u.erase(E->get()); } @@ -1714,9 +1726,9 @@ int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, return r_u.size(); } break; case GraphEdit::UNION: { - for (Set<StringName>::Element *E = r_v.front(); E; E = E->next()) { - if (!r_u.has(E->get())) { - r_u.insert(E->get()); + for (const StringName &E : r_v) { + if (!r_u.has(E)) { + r_u.insert(E); } } return r_u.size(); @@ -1727,28 +1739,28 @@ int GraphEdit::_set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, return -1; } -HashMap<int, Vector<StringName>> GraphEdit::_layering(const Set<StringName> &r_selected_nodes, const HashMap<StringName, Set<StringName>> &r_upper_neighbours) { +HashMap<int, Vector<StringName>> GraphEdit::_layering(const RBSet<StringName> &r_selected_nodes, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours) { HashMap<int, Vector<StringName>> l; - Set<StringName> p = r_selected_nodes, q = r_selected_nodes, u, z; + RBSet<StringName> p = r_selected_nodes, q = r_selected_nodes, u, z; int current_layer = 0; bool selected = false; while (!_set_operations(GraphEdit::IS_EQUAL, q, u)) { _set_operations(GraphEdit::DIFFERENCE, p, u); - for (const Set<StringName>::Element *E = p.front(); E; E = E->next()) { - Set<StringName> n = r_upper_neighbours[E->get()]; + for (const StringName &E : p) { + RBSet<StringName> n = r_upper_neighbours[E]; if (_set_operations(GraphEdit::IS_SUBSET, n, z)) { Vector<StringName> t; - t.push_back(E->get()); + t.push_back(E); if (!l.has(current_layer)) { l.insert(current_layer, Vector<StringName>{}); } selected = true; t.append_array(l[current_layer]); l.insert(current_layer, t); - Set<StringName> V; - V.insert(E->get()); + RBSet<StringName> V; + V.insert(E); _set_operations(GraphEdit::UNION, u, V); } } @@ -1789,10 +1801,10 @@ Vector<StringName> GraphEdit::_split(const Vector<StringName> &r_layer, const Ha return left; } -void GraphEdit::_horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, Set<StringName>> &r_upper_neighbours, const Set<StringName> &r_selected_nodes) { - for (const Set<StringName>::Element *E = r_selected_nodes.front(); E; E = E->next()) { - r_root[E->get()] = E->get(); - r_align[E->get()] = E->get(); +void GraphEdit::_horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours, const RBSet<StringName> &r_selected_nodes) { + for (const StringName &E : r_selected_nodes) { + r_root[E] = E; + r_align[E] = E; } if (r_layers.size() == 1) { @@ -1829,7 +1841,7 @@ void GraphEdit::_horizontal_alignment(Dictionary &r_root, Dictionary &r_align, c } } -void GraphEdit::_crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, Set<StringName>> &r_upper_neighbours) { +void GraphEdit::_crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours) { if (r_layers.size() == 1) { return; } @@ -1867,10 +1879,10 @@ void GraphEdit::_crossing_minimisation(HashMap<int, Vector<StringName>> &r_layer } } -void GraphEdit::_calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const Set<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info) { - for (const Set<StringName>::Element *E = r_block_heads.front(); E; E = E->next()) { +void GraphEdit::_calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const RBSet<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info) { + for (const StringName &E : r_block_heads) { real_t left = 0; - StringName u = E->get(); + StringName u = E; StringName v = r_align[u]; while (u != v && (StringName)r_root[u] != v) { String _connection = String(u) + " " + String(v); @@ -1891,11 +1903,11 @@ void GraphEdit::_calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictio v = (StringName)r_align[v]; } - u = E->get(); + u = E; do { r_inner_shifts[u] = (real_t)r_inner_shifts[u] - left; u = (StringName)r_align[u]; - } while (u != E->get()); + } while (u != E); } } @@ -2040,7 +2052,7 @@ void GraphEdit::arrange_nodes() { } Dictionary node_names; - Set<StringName> selected_nodes; + RBSet<StringName> selected_nodes; for (int i = get_child_count() - 1; i >= 0; i--) { GraphNode *gn = Object::cast_to<GraphNode>(get_child(i)); @@ -2051,7 +2063,7 @@ void GraphEdit::arrange_nodes() { node_names[gn->get_name()] = gn; } - HashMap<StringName, Set<StringName>> upper_neighbours; + HashMap<StringName, RBSet<StringName>> upper_neighbours; HashMap<StringName, Pair<int, int>> port_info; Vector2 origin(FLT_MAX, FLT_MAX); @@ -2066,7 +2078,7 @@ void GraphEdit::arrange_nodes() { if (gn->is_selected()) { selected_nodes.insert(gn->get_name()); - Set<StringName> s; + RBSet<StringName> s; for (List<Connection>::Element *E = connections.front(); E; E = E->next()) { GraphNode *p_from = Object::cast_to<GraphNode>(node_names[E->get().from]); if (E->get().to == gn->get_name() && p_from->is_selected()) { @@ -2103,35 +2115,35 @@ void GraphEdit::arrange_nodes() { HashMap<StringName, Vector2> new_positions; Vector2 default_position(FLT_MAX, FLT_MAX); Dictionary inner_shift; - Set<StringName> block_heads; + RBSet<StringName> block_heads; - for (const Set<StringName>::Element *E = selected_nodes.front(); E; E = E->next()) { - inner_shift[E->get()] = 0.0f; - sink[E->get()] = E->get(); - shift[E->get()] = FLT_MAX; - new_positions.insert(E->get(), default_position); - if ((StringName)root[E->get()] == E->get()) { - block_heads.insert(E->get()); + for (const StringName &E : selected_nodes) { + inner_shift[E] = 0.0f; + sink[E] = E; + shift[E] = FLT_MAX; + new_positions.insert(E, default_position); + if ((StringName)root[E] == E) { + block_heads.insert(E); } } _calculate_inner_shifts(inner_shift, root, node_names, align, block_heads, port_info); - for (const Set<StringName>::Element *E = block_heads.front(); E; E = E->next()) { - _place_block(E->get(), gap_v, layers, root, align, node_names, inner_shift, sink, shift, new_positions); + for (const StringName &E : block_heads) { + _place_block(E, gap_v, layers, root, align, node_names, inner_shift, sink, shift, new_positions); } origin.y = Object::cast_to<GraphNode>(node_names[layers[0][0]])->get_position_offset().y - (new_positions[layers[0][0]].y + (float)inner_shift[layers[0][0]]); origin.x = Object::cast_to<GraphNode>(node_names[layers[0][0]])->get_position_offset().x; - for (const Set<StringName>::Element *E = block_heads.front(); E; E = E->next()) { - StringName u = E->get(); - float start_from = origin.y + new_positions[E->get()].y; + for (const StringName &E : block_heads) { + StringName u = E; + float start_from = origin.y + new_positions[E].y; do { Vector2 cal_pos; cal_pos.y = start_from + (real_t)inner_shift[u]; new_positions.insert(u, cal_pos); u = align[u]; - } while (u != E->get()); + } while (u != E); } // Compute horizontal coordinates individually for layers to get uniform gap. @@ -2169,10 +2181,10 @@ void GraphEdit::arrange_nodes() { } emit_signal(SNAME("begin_node_move")); - for (const Set<StringName>::Element *E = selected_nodes.front(); E; E = E->next()) { - GraphNode *gn = Object::cast_to<GraphNode>(node_names[E->get()]); + for (const StringName &E : selected_nodes) { + GraphNode *gn = Object::cast_to<GraphNode>(node_names[E]); gn->set_drag(true); - Vector2 pos = (new_positions[E->get()]); + Vector2 pos = (new_positions[E]); if (is_using_snap()) { const int snap = get_snap(); @@ -2290,7 +2302,7 @@ void GraphEdit::_bind_methods() { ADD_SIGNAL(MethodInfo("node_deselected", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_position"))); ADD_SIGNAL(MethodInfo("connection_from_empty", PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot"), PropertyInfo(Variant::VECTOR2, "release_position"))); - ADD_SIGNAL(MethodInfo("delete_nodes_request")); + ADD_SIGNAL(MethodInfo("delete_nodes_request", PropertyInfo(Variant::ARRAY, "nodes", PROPERTY_HINT_ARRAY_TYPE, "StringName"))); ADD_SIGNAL(MethodInfo("begin_node_move")); ADD_SIGNAL(MethodInfo("end_node_move")); ADD_SIGNAL(MethodInfo("scroll_offset_changed", PropertyInfo(Variant::VECTOR2, "offset"))); diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index f556fcdd23..9e34d5528f 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -228,9 +228,9 @@ private: } }; - Set<ConnType> valid_connection_types; - Set<int> valid_left_disconnect_types; - Set<int> valid_right_disconnect_types; + RBSet<ConnType> valid_connection_types; + RBSet<int> valid_left_disconnect_types; + RBSet<int> valid_right_disconnect_types; HashMap<StringName, Vector<GraphNode *>> comment_enclosed_nodes; void _update_comment_enclosed_nodes_list(GraphNode *p_node, HashMap<StringName, Vector<GraphNode *>> &p_comment_enclosed_nodes); @@ -258,12 +258,12 @@ private: UNION, }; - int _set_operations(SET_OPERATIONS p_operation, Set<StringName> &r_u, const Set<StringName> &r_v); - HashMap<int, Vector<StringName>> _layering(const Set<StringName> &r_selected_nodes, const HashMap<StringName, Set<StringName>> &r_upper_neighbours); + int _set_operations(SET_OPERATIONS p_operation, RBSet<StringName> &r_u, const RBSet<StringName> &r_v); + HashMap<int, Vector<StringName>> _layering(const RBSet<StringName> &r_selected_nodes, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours); Vector<StringName> _split(const Vector<StringName> &r_layer, const HashMap<StringName, Dictionary> &r_crossings); - void _horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, Set<StringName>> &r_upper_neighbours, const Set<StringName> &r_selected_nodes); - void _crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, Set<StringName>> &r_upper_neighbours); - void _calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const Set<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info); + void _horizontal_alignment(Dictionary &r_root, Dictionary &r_align, const HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours, const RBSet<StringName> &r_selected_nodes); + void _crossing_minimisation(HashMap<int, Vector<StringName>> &r_layers, const HashMap<StringName, RBSet<StringName>> &r_upper_neighbours); + void _calculate_inner_shifts(Dictionary &r_inner_shifts, const Dictionary &r_root, const Dictionary &r_node_names, const Dictionary &r_align, const RBSet<StringName> &r_block_heads, const HashMap<StringName, Pair<int, int>> &r_port_info); float _calculate_threshold(StringName p_v, StringName p_w, const Dictionary &r_node_names, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_inner_shift, real_t p_current_threshold, const HashMap<StringName, Vector2> &r_node_positions); void _place_block(StringName p_v, float p_delta, const HashMap<int, Vector<StringName>> &r_layers, const Dictionary &r_root, const Dictionary &r_align, const Dictionary &r_node_name, const Dictionary &r_inner_shift, Dictionary &r_sink, Dictionary &r_shift, HashMap<StringName, Vector2> &r_node_positions); diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index e3ecd17ed8..45f036d8fc 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -93,11 +93,13 @@ bool GraphNode::_set(const StringName &p_name, const Variant &p_value) { si.color_right = p_value; } else if (what == "right_icon") { si.custom_slot_right = p_value; + } else if (what == "draw_stylebox") { + si.draw_stylebox = p_value; } else { return false; } - set_slot(idx, si.enable_left, si.type_left, si.color_left, si.enable_right, si.type_right, si.color_right, si.custom_slot_left, si.custom_slot_right); + set_slot(idx, si.enable_left, si.type_left, si.color_left, si.enable_right, si.type_right, si.color_right, si.custom_slot_left, si.custom_slot_right, si.draw_stylebox); update(); return true; } @@ -144,6 +146,8 @@ bool GraphNode::_get(const StringName &p_name, Variant &r_ret) const { r_ret = si.color_right; } else if (what == "right_icon") { r_ret = si.custom_slot_right; + } else if (what == "draw_stylebox") { + r_ret = si.draw_stylebox; } else { return false; } @@ -175,7 +179,7 @@ void GraphNode::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::INT, base + "right_type")); p_list->push_back(PropertyInfo(Variant::COLOR, base + "right_color")); p_list->push_back(PropertyInfo(Variant::OBJECT, base + "right_icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); - + p_list->push_back(PropertyInfo(Variant::BOOL, base + "draw_stylebox")); idx++; } } @@ -185,6 +189,7 @@ void GraphNode::_resort() { Size2i new_size = get_size(); Ref<StyleBox> sb = get_theme_stylebox(SNAME("frame")); + Ref<StyleBox> sb_slot = get_theme_stylebox(SNAME("slot")); int sep = get_theme_constant(SNAME("separation")); @@ -193,7 +198,7 @@ void GraphNode::_resort() { int stretch_min = 0; int stretch_avail = 0; float stretch_ratio_total = 0; - Map<Control *, _MinSizeCache> min_size_cache; + HashMap<Control *, _MinSizeCache> min_size_cache; for (int i = 0; i < get_child_count(); i++) { Control *c = Object::cast_to<Control>(get_child(i)); @@ -204,7 +209,7 @@ void GraphNode::_resort() { continue; } - Size2i size = c->get_combined_minimum_size(); + Size2i size = c->get_combined_minimum_size() + (slot_info[i].draw_stylebox ? sb_slot->get_minimum_size() : Size2()); _MinSizeCache msc; stretch_min += size.height; @@ -312,7 +317,9 @@ void GraphNode::_resort() { int size = to - from; - Rect2 rect(sb->get_margin(SIDE_LEFT), from, w, size); + float margin = sb->get_margin(SIDE_LEFT) + (slot_info[i].draw_stylebox ? sb_slot->get_margin(SIDE_LEFT) : 0); + float width = w - (slot_info[i].draw_stylebox ? sb_slot->get_minimum_size().x : 0); + Rect2 rect(margin, from, width, size); fit_child_in_rect(c, rect); cache_y.push_back(from - sb->get_margin(SIDE_TOP) + size * 0.5); @@ -351,14 +358,14 @@ void GraphNode::_notification(int p_what) { Ref<StyleBox> sb; if (comment) { - sb = get_theme_stylebox(selected ? "comment_focus" : "comment"); + sb = get_theme_stylebox(selected ? SNAME("comment_focus") : SNAME("comment")); } else { - sb = get_theme_stylebox(selected ? "selected_frame" : "frame"); + sb = get_theme_stylebox(selected ? SNAME("selected_frame") : SNAME("frame")); } - //sb=sb->duplicate(); - //sb->call("set_modulate",modulate); + Ref<StyleBox> sb_slot = get_theme_stylebox(SNAME("slot")); + Ref<Texture2D> port = get_theme_icon(SNAME("port")); Ref<Texture2D> close = get_theme_icon(SNAME("close")); Ref<Texture2D> resizer = get_theme_icon(SNAME("resizer")); @@ -389,13 +396,9 @@ void GraphNode::_notification(int p_what) { int w = get_size().width - sb->get_minimum_size().x; - if (show_close) { - w -= close->get_width(); - } - title_buf->draw(get_canvas_item(), Point2(sb->get_margin(SIDE_LEFT) + title_h_offset, -title_buf->get_size().y + title_offset), title_color); if (show_close) { - Vector2 cpos = Point2(w + sb->get_margin(SIDE_LEFT) + close_h_offset, -close->get_height() + close_offset); + Vector2 cpos = Point2(w + sb->get_margin(SIDE_LEFT) + close_h_offset - close->get_width(), -close->get_height() + close_offset); draw_texture(close, cpos, close_color); close_rect.position = cpos; close_rect.size = close->get_size(); @@ -411,7 +414,7 @@ void GraphNode::_notification(int p_what) { continue; } const Slot &s = slot_info[E.key]; - //left + // Left port. if (s.enable_left) { Ref<Texture2D> p = port; if (s.custom_slot_left.is_valid()) { @@ -419,6 +422,7 @@ void GraphNode::_notification(int p_what) { } p->draw(get_canvas_item(), icofs + Point2(edgeofs, cache_y[E.key]), s.color_left); } + // Right port. if (s.enable_right) { Ref<Texture2D> p = port; if (s.custom_slot_right.is_valid()) { @@ -426,6 +430,15 @@ void GraphNode::_notification(int p_what) { } p->draw(get_canvas_item(), icofs + Point2(get_size().x - edgeofs, cache_y[E.key]), s.color_right); } + + // Draw slot stylebox. + if (s.draw_stylebox) { + Control *c = Object::cast_to<Control>(get_child(E.key)); + Rect2 c_rect = c->get_rect(); + c_rect.position.x = sb->get_margin(SIDE_LEFT); + c_rect.size.width = w; + draw_style_box(sb_slot, c_rect); + } } if (resizable) { @@ -482,7 +495,7 @@ void GraphNode::_validate_property(PropertyInfo &property) const { } #endif -void GraphNode::set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref<Texture2D> &p_custom_left, const Ref<Texture2D> &p_custom_right) { +void GraphNode::set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref<Texture2D> &p_custom_left, const Ref<Texture2D> &p_custom_right, bool p_draw_stylebox) { ERR_FAIL_COND_MSG(p_idx < 0, vformat("Cannot set slot with p_idx (%d) lesser than zero.", p_idx)); if (!p_enable_left && p_type_left == 0 && p_color_left == Color(1, 1, 1, 1) && @@ -501,6 +514,7 @@ void GraphNode::set_slot(int p_idx, bool p_enable_left, int p_type_left, const C s.color_right = p_color_right; s.custom_slot_left = p_custom_left; s.custom_slot_right = p_custom_right; + s.draw_stylebox = p_draw_stylebox; slot_info[p_idx] = s; update(); connpos_dirty = true; @@ -622,16 +636,39 @@ Color GraphNode::get_slot_color_right(int p_idx) const { return slot_info[p_idx].color_right; } +bool GraphNode::is_slot_draw_stylebox(int p_idx) const { + if (!slot_info.has(p_idx)) { + return false; + } + return slot_info[p_idx].draw_stylebox; +} + +void GraphNode::set_slot_draw_stylebox(int p_idx, bool p_enable) { + ERR_FAIL_COND_MSG(p_idx < 0, vformat("Cannot set draw_stylebox for the slot with p_idx (%d) lesser than zero.", p_idx)); + + slot_info[p_idx].draw_stylebox = p_enable; + update(); + connpos_dirty = true; + + emit_signal(SNAME("slot_updated"), p_idx); +} + Size2 GraphNode::get_minimum_size() const { - int sep = get_theme_constant(SNAME("separation")); Ref<StyleBox> sb = get_theme_stylebox(SNAME("frame")); + Ref<StyleBox> sb_slot = get_theme_stylebox(SNAME("slot")); + + int sep = get_theme_constant(SNAME("separation")); + int title_h_offset = get_theme_constant(SNAME("title_h_offset")); + bool first = true; Size2 minsize; - minsize.x = title_buf->get_size().x; + minsize.x = title_buf->get_size().x + title_h_offset; if (show_close) { + int close_h_offset = get_theme_constant(SNAME("close_h_offset")); Ref<Texture2D> close = get_theme_icon(SNAME("close")); - minsize.x += sep + close->get_width(); + //TODO: Remove this magic number after GraphNode rework. + minsize.x += 12 + close->get_width() + close_h_offset; } for (int i = 0; i < get_child_count(); i++) { @@ -644,6 +681,9 @@ Size2 GraphNode::get_minimum_size() const { } Size2i size = c->get_combined_minimum_size(); + if (slot_info.has(i)) { + size += slot_info[i].draw_stylebox ? sb_slot->get_minimum_size() : Size2(); + } minsize.y += size.y; minsize.x = MAX(minsize.x, size.x); @@ -989,7 +1029,7 @@ void GraphNode::_bind_methods() { ClassDB::bind_method(D_METHOD("set_language", "language"), &GraphNode::set_language); ClassDB::bind_method(D_METHOD("get_language"), &GraphNode::get_language); - ClassDB::bind_method(D_METHOD("set_slot", "idx", "enable_left", "type_left", "color_left", "enable_right", "type_right", "color_right", "custom_left", "custom_right"), &GraphNode::set_slot, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>())); + ClassDB::bind_method(D_METHOD("set_slot", "idx", "enable_left", "type_left", "color_left", "enable_right", "type_right", "color_right", "custom_left", "custom_right", "enable"), &GraphNode::set_slot, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()), DEFVAL(true)); ClassDB::bind_method(D_METHOD("clear_slot", "idx"), &GraphNode::clear_slot); ClassDB::bind_method(D_METHOD("clear_all_slots"), &GraphNode::clear_all_slots); @@ -1011,6 +1051,9 @@ void GraphNode::_bind_methods() { ClassDB::bind_method(D_METHOD("set_slot_color_right", "idx", "color_right"), &GraphNode::set_slot_color_right); ClassDB::bind_method(D_METHOD("get_slot_color_right", "idx"), &GraphNode::get_slot_color_right); + ClassDB::bind_method(D_METHOD("is_slot_draw_stylebox", "idx"), &GraphNode::is_slot_draw_stylebox); + ClassDB::bind_method(D_METHOD("set_slot_draw_stylebox", "idx", "draw_stylebox"), &GraphNode::set_slot_draw_stylebox); + ClassDB::bind_method(D_METHOD("set_position_offset", "offset"), &GraphNode::set_position_offset); ClassDB::bind_method(D_METHOD("get_position_offset"), &GraphNode::get_position_offset); diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h index 7eb5f27cff..9481a7452d 100644 --- a/scene/gui/graph_node.h +++ b/scene/gui/graph_node.h @@ -54,6 +54,7 @@ private: Color color_right = Color(1, 1, 1, 1); Ref<Texture2D> custom_slot_left; Ref<Texture2D> custom_slot_right; + bool draw_stylebox = true; }; String title; @@ -85,7 +86,7 @@ private: Vector<ConnCache> conn_input_cache; Vector<ConnCache> conn_output_cache; - Map<int, Slot> slot_info; + HashMap<int, Slot> slot_info; bool connpos_dirty = true; @@ -115,7 +116,7 @@ protected: public: bool has_point(const Point2 &p_point) const override; - void set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref<Texture2D> &p_custom_left = Ref<Texture2D>(), const Ref<Texture2D> &p_custom_right = Ref<Texture2D>()); + void set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref<Texture2D> &p_custom_left = Ref<Texture2D>(), const Ref<Texture2D> &p_custom_right = Ref<Texture2D>(), bool p_draw_stylebox = true); void clear_slot(int p_idx); void clear_all_slots(); @@ -137,6 +138,9 @@ public: void set_slot_color_right(int p_idx, const Color &p_color_right); Color get_slot_color_right(int p_idx) const; + bool is_slot_draw_stylebox(int p_idx) const; + void set_slot_draw_stylebox(int p_idx, bool p_enable); + void set_title(const String &p_title); String get_title() const; @@ -185,7 +189,9 @@ public: virtual Vector<int> get_allowed_size_flags_horizontal() const override; virtual Vector<int> get_allowed_size_flags_vertical() const override; - bool is_resizing() const { return resizing; } + bool is_resizing() const { + return resizing; + } GraphNode(); }; diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index b58bb4d74a..5d9484806b 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -33,10 +33,10 @@ void GridContainer::_notification(int p_what) { switch (p_what) { case NOTIFICATION_SORT_CHILDREN: { - Map<int, int> col_minw; // Max of min_width of all controls in each col (indexed by col). - Map<int, int> row_minh; // Max of min_height of all controls in each row (indexed by row). - Set<int> col_expanded; // Columns which have the SIZE_EXPAND flag set. - Set<int> row_expanded; // Rows which have the SIZE_EXPAND flag set. + HashMap<int, int> col_minw; // Max of min_width of all controls in each col (indexed by col). + HashMap<int, int> row_minh; // Max of min_height of all controls in each row (indexed by row). + RBSet<int> col_expanded; // Columns which have the SIZE_EXPAND flag set. + RBSet<int> row_expanded; // Rows which have the SIZE_EXPAND flag set. int hsep = get_theme_constant(SNAME("h_separation")); int vsep = get_theme_constant(SNAME("v_separation")); @@ -104,11 +104,11 @@ void GridContainer::_notification(int p_what) { // Check if all minwidth constraints are OK if we use the remaining space. can_fit = true; int max_index = col_expanded.front()->get(); - for (Set<int>::Element *E = col_expanded.front(); E; E = E->next()) { - if (col_minw[E->get()] > col_minw[max_index]) { - max_index = E->get(); + for (const int &E : col_expanded) { + if (col_minw[E] > col_minw[max_index]) { + max_index = E; } - if (can_fit && (remaining_space.width / col_expanded.size()) < col_minw[E->get()]) { + if (can_fit && (remaining_space.width / col_expanded.size()) < col_minw[E]) { can_fit = false; } } @@ -125,11 +125,11 @@ void GridContainer::_notification(int p_what) { // Check if all minheight constraints are OK if we use the remaining space. can_fit = true; int max_index = row_expanded.front()->get(); - for (Set<int>::Element *E = row_expanded.front(); E; E = E->next()) { - if (row_minh[E->get()] > row_minh[max_index]) { - max_index = E->get(); + for (const int &E : row_expanded) { + if (row_minh[E] > row_minh[max_index]) { + max_index = E; } - if (can_fit && (remaining_space.height / row_expanded.size()) < row_minh[E->get()]) { + if (can_fit && (remaining_space.height / row_expanded.size()) < row_minh[E]) { can_fit = false; } } @@ -142,13 +142,47 @@ void GridContainer::_notification(int p_what) { } // Finally, fit the nodes. - int col_expand = col_expanded.size() > 0 ? remaining_space.width / col_expanded.size() : 0; - int row_expand = row_expanded.size() > 0 ? remaining_space.height / row_expanded.size() : 0; + int col_remaining_pixel = 0; + int col_expand = 0; + if (col_expanded.size() > 0) { + col_expand = remaining_space.width / col_expanded.size(); + col_remaining_pixel = remaining_space.width - col_expanded.size() * col_expand; + } + + int row_remaining_pixel = 0; + int row_expand = 0; + if (row_expanded.size() > 0) { + row_expand = remaining_space.height / row_expanded.size(); + row_remaining_pixel = remaining_space.height - row_expanded.size() * row_expand; + } + bool rtl = is_layout_rtl(); int col_ofs = 0; int row_ofs = 0; + // Calculate the index of rows and columns that receive the remaining pixel. + int col_remaining_pixel_index = 0; + for (int i = 0; i < max_col; i++) { + if (col_remaining_pixel == 0) { + break; + } + if (col_expanded.has(i)) { + col_remaining_pixel_index = i + 1; + col_remaining_pixel--; + } + } + int row_remaining_pixel_index = 0; + for (int i = 0; i < max_row; i++) { + if (row_remaining_pixel == 0) { + break; + } + if (row_expanded.has(i)) { + row_remaining_pixel_index = i + 1; + row_remaining_pixel--; + } + } + valid_controls_index = 0; for (int i = 0; i < get_child_count(); i++) { Control *c = Object::cast_to<Control>(get_child(i)); @@ -167,17 +201,30 @@ void GridContainer::_notification(int p_what) { } if (row > 0) { row_ofs += (row_expanded.has(row - 1) ? row_expand : row_minh[row - 1]) + vsep; + + if (row_expanded.has(row - 1) && row - 1 < row_remaining_pixel_index) { + // Apply the remaining pixel of the previous row. + row_ofs++; + } } } + Size2 s(col_expanded.has(col) ? col_expand : col_minw[col], row_expanded.has(row) ? row_expand : row_minh[row]); + + // Add the remaining pixel to the expanding columns and rows, starting from left and top. + if (col_expanded.has(col) && col < col_remaining_pixel_index) { + s.x++; + } + if (row_expanded.has(row) && row < row_remaining_pixel_index) { + s.y++; + } + if (rtl) { - Size2 s(col_expanded.has(col) ? col_expand : col_minw[col], row_expanded.has(row) ? row_expand : row_minh[row]); Point2 p(col_ofs - s.width, row_ofs); fit_child_in_rect(c, Rect2(p, s)); col_ofs -= s.width + hsep; } else { Point2 p(col_ofs, row_ofs); - Size2 s(col_expanded.has(col) ? col_expand : col_minw[col], row_expanded.has(row) ? row_expand : row_minh[row]); fit_child_in_rect(c, Rect2(p, s)); col_ofs += s.width + hsep; } @@ -214,8 +261,8 @@ void GridContainer::_bind_methods() { } Size2 GridContainer::get_minimum_size() const { - Map<int, int> col_minw; - Map<int, int> row_minh; + HashMap<int, int> col_minw; + HashMap<int, int> row_minh; int hsep = get_theme_constant(SNAME("h_separation")); int vsep = get_theme_constant(SNAME("v_separation")); diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 1feee017c2..316fee53fe 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -187,7 +187,7 @@ void MenuButton::_get_property_list(List<PropertyInfo> *p_list) const { pi.usage &= ~(popup->get_item_icon(i).is_null() ? PROPERTY_USAGE_STORAGE : 0); p_list->push_back(pi); - pi = PropertyInfo(Variant::INT, vformat("popup/item_%d/checkable", i), PROPERTY_HINT_ENUM, "No,As checkbox,As radio button"); + pi = PropertyInfo(Variant::INT, vformat("popup/item_%d/checkable", i), PROPERTY_HINT_ENUM, "No,As Checkbox,As Radio Button"); pi.usage &= ~(!popup->is_item_checkable(i) ? PROPERTY_USAGE_STORAGE : 0); p_list->push_back(pi); diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index b9e3e7814e..6532fc5934 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -108,11 +108,25 @@ void Popup::_close_pressed() { _deinitialize_visible_parents(); - call_deferred(SNAME("hide")); + // Hide after returning to process events, but only if we don't + // get popped up in the interim. + call_deferred(SNAME("_popup_conditional_hide")); +} + +void Popup::_post_popup() { + Window::_post_popup(); + popped_up = true; +} + +void Popup::_popup_conditional_hide() { + if (!popped_up) { + hide(); + } } void Popup::_bind_methods() { ADD_SIGNAL(MethodInfo("popup_hide")); + ClassDB::bind_method(D_METHOD("_popup_conditional_hide"), &Popup::_popup_conditional_hide); } Rect2i Popup::_popup_adjust_rect() const { diff --git a/scene/gui/popup.h b/scene/gui/popup.h index 6211af4d20..27f46d4a97 100644 --- a/scene/gui/popup.h +++ b/scene/gui/popup.h @@ -57,6 +57,10 @@ protected: void _notification(int p_what); static void _bind_methods(); + void _popup_conditional_hide(); + + virtual void _post_popup() override; + public: Popup(); ~Popup(); diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index 98d76875cb..12587b7e73 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -117,7 +117,7 @@ class PopupMenu : public Popup { bool hide_on_multistate_item_selection = false; Vector2 moved; - Map<Ref<Shortcut>, int> shortcut_refcount; + HashMap<Ref<Shortcut>, int> shortcut_refcount; void _ref_shortcut(Ref<Shortcut> p_sc); void _unref_shortcut(Ref<Shortcut> p_sc); diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 8e66826e9d..fae6688452 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -50,8 +50,8 @@ void Range::_value_changed_notify() { } void Range::Shared::emit_value_changed() { - for (Set<Range *>::Element *E = owners.front(); E; E = E->next()) { - Range *r = E->get(); + for (Range *E : owners) { + Range *r = E; if (!r->is_inside_tree()) { continue; } @@ -70,8 +70,8 @@ void Range::_validate_values() { } void Range::Shared::emit_changed(const char *p_what) { - for (Set<Range *>::Element *E = owners.front(); E; E = E->next()) { - Range *r = E->get(); + for (Range *E : owners) { + Range *r = E; if (!r->is_inside_tree()) { continue; } diff --git a/scene/gui/range.h b/scene/gui/range.h index 46b0d39202..a59bfa9677 100644 --- a/scene/gui/range.h +++ b/scene/gui/range.h @@ -45,7 +45,7 @@ class Range : public Control { bool exp_ratio = false; bool allow_greater = false; bool allow_lesser = false; - Set<Range *> owners; + RBSet<Range *> owners; void emit_value_changed(); void emit_changed(const char *p_what = ""); }; diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 7ed28ac3c8..78fd682c35 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -209,9 +209,10 @@ String RichTextLabel::_letters(int p_num, bool p_capitalize) const { void RichTextLabel::_update_line_font(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size) { ERR_FAIL_COND(p_frame == nullptr); - ERR_FAIL_COND(p_line < 0 || p_line >= p_frame->lines.size()); + ERR_FAIL_COND(p_line < 0 || p_line >= (int)p_frame->lines.size()); - Line &l = p_frame->lines.write[p_line]; + Line &l = p_frame->lines[p_line]; + MutexLock lock(l.text_buf->get_mutex()); RID t = l.text_buf->get_rid(); int spans = TS->shaped_get_span_count(t); @@ -231,7 +232,7 @@ void RichTextLabel::_update_line_font(ItemFrame *p_frame, int p_line, const Ref< } } - Item *it_to = (p_line + 1 < p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; + Item *it_to = (p_line + 1 < (int)p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; for (Item *it = l.from; it && it != it_to; it = _get_next_item(it)) { switch (it->type) { case ITEM_TABLE: { @@ -239,7 +240,7 @@ void RichTextLabel::_update_line_font(ItemFrame *p_frame, int p_line, const Ref< for (Item *E : table->subitems) { ERR_CONTINUE(E->type != ITEM_FRAME); // Children should all be frames. ItemFrame *frame = static_cast<ItemFrame *>(E); - for (int i = 0; i < frame->lines.size(); i++) { + for (int i = 0; i < (int)frame->lines.size(); i++) { _update_line_font(frame, i, p_base_font, p_base_font_size); } } @@ -250,11 +251,12 @@ void RichTextLabel::_update_line_font(ItemFrame *p_frame, int p_line, const Ref< } } -void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width) { - ERR_FAIL_COND(p_frame == nullptr); - ERR_FAIL_COND(p_line < 0 || p_line >= p_frame->lines.size()); +float RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width, float p_h) { + ERR_FAIL_COND_V(p_frame == nullptr, p_h); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)p_frame->lines.size(), p_h); - Line &l = p_frame->lines.write[p_line]; + Line &l = p_frame->lines[p_line]; + MutexLock lock(l.text_buf->get_mutex()); l.offset.x = _find_margin(l.from, p_base_font, p_base_font_size); l.text_buf->set_width(p_width - l.offset.x); @@ -265,7 +267,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> l.text_buf->tab_align(tabs); } - Item *it_to = (p_line + 1 < p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; + Item *it_to = (p_line + 1 < (int)p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; for (Item *it = l.from; it && it != it_to; it = _get_next_item(it)) { switch (it->type) { case ITEM_TABLE: { @@ -275,16 +277,18 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> int col_count = table->columns.size(); for (int i = 0; i < col_count; i++) { - table->columns.write[i].width = 0; + table->columns[i].width = 0; } int idx = 0; for (Item *E : table->subitems) { ERR_CONTINUE(E->type != ITEM_FRAME); // Children should all be frames. ItemFrame *frame = static_cast<ItemFrame *>(E); - for (int i = 0; i < frame->lines.size(); i++) { + float prev_h = 0; + for (int i = 0; i < (int)frame->lines.size(); i++) { + MutexLock sub_lock(frame->lines[i].text_buf->get_mutex()); int w = _find_margin(frame->lines[i].from, p_base_font, p_base_font_size) + 1; - _resize_line(frame, i, p_base_font, p_base_font_size, w); + prev_h = _resize_line(frame, i, p_base_font, p_base_font_size, w, prev_h); } idx++; } @@ -300,7 +304,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> for (int i = 0; i < col_count; i++) { remaining_width -= table->columns[i].min_width; if (table->columns[i].max_width > table->columns[i].min_width) { - table->columns.write[i].expand = true; + table->columns[i].expand = true; } if (table->columns[i].expand) { total_ratio += table->columns[i].expand_ratio; @@ -309,9 +313,9 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> // Assign actual widths. for (int i = 0; i < col_count; i++) { - table->columns.write[i].width = table->columns[i].min_width; + table->columns[i].width = table->columns[i].min_width; if (table->columns[i].expand && total_ratio > 0 && remaining_width > 0) { - table->columns.write[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio; + table->columns[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio; } table->total_width += table->columns[i].width + hseparation; } @@ -328,7 +332,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> int dif = table->columns[i].width - table->columns[i].max_width; if (dif > 0) { table_need_fit = true; - table->columns.write[i].width = table->columns[i].max_width; + table->columns[i].width = table->columns[i].max_width; table->total_width -= dif; total_ratio -= table->columns[i].expand_ratio; } @@ -342,7 +346,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> if (dif > 0) { int slice = table->columns[i].expand_ratio * remaining_width / total_ratio; int incr = MIN(dif, slice); - table->columns.write[i].width += incr; + table->columns[i].width += incr; table->total_width += incr; } } @@ -366,16 +370,14 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> offset.x += frame->padding.position.x; float yofs = frame->padding.position.y; - for (int i = 0; i < frame->lines.size(); i++) { - frame->lines.write[i].text_buf->set_width(table->columns[column].width); - table->columns.write[column].width = MAX(table->columns.write[column].width, ceil(frame->lines[i].text_buf->get_size().x)); + float prev_h = 0; + for (int i = 0; i < (int)frame->lines.size(); i++) { + MutexLock sub_lock(frame->lines[i].text_buf->get_mutex()); + frame->lines[i].text_buf->set_width(table->columns[column].width); + table->columns[column].width = MAX(table->columns[column].width, ceil(frame->lines[i].text_buf->get_size().x)); - if (i > 0) { - frame->lines.write[i].offset.y = frame->lines[i - 1].offset.y + frame->lines[i - 1].text_buf->get_size().y + frame->lines[i - 1].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); - } else { - frame->lines.write[i].offset.y = 0; - } - frame->lines.write[i].offset += offset; + frame->lines[i].offset.y = prev_h; + frame->lines[i].offset += offset; float h = frame->lines[i].text_buf->get_size().y + (frame->lines[i].text_buf->get_line_count() - 1) * get_theme_constant(SNAME("line_separation")); if (i > 0) { @@ -388,6 +390,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> h = MIN(h, frame->max_size_over.y); } yofs += h; + prev_h = frame->lines[i].offset.y + frame->lines[i].text_buf->get_size().y + frame->lines[i].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); } yofs += frame->padding.size.y; offset.x += table->columns[column].width + hseparation + frame->padding.size.x; @@ -410,18 +413,16 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> } } - if (p_line > 0) { - l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y + p_frame->lines[p_line - 1].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); - } else { - l.offset.y = 0; - } + l.offset.y = p_h; + return l.offset.y + l.text_buf->get_size().y + l.text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); } -void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width, int *r_char_offset) { - ERR_FAIL_COND(p_frame == nullptr); - ERR_FAIL_COND(p_line < 0 || p_line >= p_frame->lines.size()); +float RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width, float p_h, int *r_char_offset) { + ERR_FAIL_COND_V(p_frame == nullptr, p_h); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)p_frame->lines.size(), p_h); - Line &l = p_frame->lines.write[p_line]; + Line &l = p_frame->lines[p_line]; + MutexLock lock(l.text_buf->get_mutex()); uint16_t autowrap_flags = TextServer::BREAK_MANDATORY; switch (autowrap_mode) { @@ -458,7 +459,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> // Shape current paragraph. String text; - Item *it_to = (p_line + 1 < p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; + Item *it_to = (p_line + 1 < (int)p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; int remaining_characters = visible_characters - l.char_offset; for (Item *it = l.from; it && it != it_to; it = _get_next_item(it)) { if (visible_chars_behavior == VC_CHARS_BEFORE_SHAPING && visible_characters >= 0 && remaining_characters <= 0) { @@ -524,9 +525,9 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> int t_char_count = 0; // Set minimums to zero. for (int i = 0; i < col_count; i++) { - table->columns.write[i].min_width = 0; - table->columns.write[i].max_width = 0; - table->columns.write[i].width = 0; + table->columns[i].min_width = 0; + table->columns[i].max_width = 0; + table->columns[i].width = 0; } // Compute minimum width for each cell. const int available_width = p_width - hseparation * (col_count - 1); @@ -537,17 +538,20 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> ItemFrame *frame = static_cast<ItemFrame *>(E); int column = idx % col_count; - for (int i = 0; i < frame->lines.size(); i++) { + float prev_h = 0; + for (int i = 0; i < (int)frame->lines.size(); i++) { + MutexLock sub_lock(frame->lines[i].text_buf->get_mutex()); + int char_offset = l.char_offset + l.char_count; int w = _find_margin(frame->lines[i].from, p_base_font, p_base_font_size) + 1; - _shape_line(frame, i, p_base_font, p_base_font_size, w, &char_offset); + prev_h = _shape_line(frame, i, p_base_font, p_base_font_size, w, prev_h, &char_offset); int cell_ch = (char_offset - (l.char_offset + l.char_count)); l.char_count += cell_ch; t_char_count += cell_ch; remaining_characters -= cell_ch; - table->columns.write[column].min_width = MAX(table->columns[column].min_width, ceil(frame->lines[i].text_buf->get_size().x)); - table->columns.write[column].max_width = MAX(table->columns[column].max_width, ceil(frame->lines[i].text_buf->get_non_wrapped_size().x)); + table->columns[column].min_width = MAX(table->columns[column].min_width, ceil(frame->lines[i].text_buf->get_size().x)); + table->columns[column].max_width = MAX(table->columns[column].max_width, ceil(frame->lines[i].text_buf->get_non_wrapped_size().x)); } idx++; } @@ -560,7 +564,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> for (int i = 0; i < col_count; i++) { remaining_width -= table->columns[i].min_width; if (table->columns[i].max_width > table->columns[i].min_width) { - table->columns.write[i].expand = true; + table->columns[i].expand = true; } if (table->columns[i].expand) { total_ratio += table->columns[i].expand_ratio; @@ -569,9 +573,9 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> // Assign actual widths. for (int i = 0; i < col_count; i++) { - table->columns.write[i].width = table->columns[i].min_width; + table->columns[i].width = table->columns[i].min_width; if (table->columns[i].expand && total_ratio > 0 && remaining_width > 0) { - table->columns.write[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio; + table->columns[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio; } table->total_width += table->columns[i].width + hseparation; } @@ -588,7 +592,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> int dif = table->columns[i].width - table->columns[i].max_width; if (dif > 0) { table_need_fit = true; - table->columns.write[i].width = table->columns[i].max_width; + table->columns[i].width = table->columns[i].max_width; table->total_width -= dif; total_ratio -= table->columns[i].expand_ratio; } @@ -602,7 +606,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> if (dif > 0) { int slice = table->columns[i].expand_ratio * remaining_width / total_ratio; int incr = MIN(dif, slice); - table->columns.write[i].width += incr; + table->columns[i].width += incr; table->total_width += incr; } } @@ -626,16 +630,15 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> offset.x += frame->padding.position.x; float yofs = frame->padding.position.y; - for (int i = 0; i < frame->lines.size(); i++) { - frame->lines.write[i].text_buf->set_width(table->columns[column].width); - table->columns.write[column].width = MAX(table->columns.write[column].width, ceil(frame->lines[i].text_buf->get_size().x)); + float prev_h = 0; + for (int i = 0; i < (int)frame->lines.size(); i++) { + MutexLock sub_lock(frame->lines[i].text_buf->get_mutex()); - if (i > 0) { - frame->lines.write[i].offset.y = frame->lines[i - 1].offset.y + frame->lines[i - 1].text_buf->get_size().y + frame->lines[i - 1].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); - } else { - frame->lines.write[i].offset.y = 0; - } - frame->lines.write[i].offset += offset; + frame->lines[i].text_buf->set_width(table->columns[column].width); + table->columns[column].width = MAX(table->columns[column].width, ceil(frame->lines[i].text_buf->get_size().x)); + + frame->lines[i].offset.y = prev_h; + frame->lines[i].offset += offset; float h = frame->lines[i].text_buf->get_size().y + (frame->lines[i].text_buf->get_line_count() - 1) * get_theme_constant(SNAME("line_separation")); if (i > 0) { @@ -648,6 +651,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> h = MIN(h, frame->max_size_over.y); } yofs += h; + prev_h = frame->lines[i].offset.y + frame->lines[i].text_buf->get_size().y + frame->lines[i].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); } yofs += frame->padding.size.y; offset.x += table->columns[column].width + hseparation + frame->padding.size.x; @@ -678,24 +682,22 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> *r_char_offset = l.char_offset + l.char_count; - if (p_line > 0) { - l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y + p_frame->lines[p_line - 1].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); - } else { - l.offset.y = 0; - } + l.offset.y = p_h; + return l.offset.y + l.text_buf->get_size().y + l.text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); } int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Color &p_base_color, int p_outline_size, const Color &p_outline_color, const Color &p_font_shadow_color, int p_shadow_outline_size, const Point2 &p_shadow_ofs, int &r_processed_glyphs) { ERR_FAIL_COND_V(p_frame == nullptr, 0); - ERR_FAIL_COND_V(p_line < 0 || p_line >= p_frame->lines.size(), 0); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)p_frame->lines.size(), 0); Vector2 off; int line_spacing = get_theme_constant(SNAME("line_separation")); - Line &l = p_frame->lines.write[p_line]; + Line &l = p_frame->lines[p_line]; + MutexLock lock(l.text_buf->get_mutex()); Item *it_from = l.from; - Item *it_to = (p_line + 1 < p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; + Item *it_to = (p_line + 1 < (int)p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; if (it_from == nullptr) { return 0; @@ -877,7 +879,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o draw_rect(Rect2(p_ofs + rect.position + off + coff - frame->padding.position, Size2(table->columns[col].width + hseparation + frame->padding.position.x + frame->padding.size.x, table->rows[row])), (frame->border != Color(0, 0, 0, 0) ? frame->border : border), false); } - for (int j = 0; j < frame->lines.size(); j++) { + for (int j = 0; j < (int)frame->lines.size(); j++) { _draw_line(frame, j, p_ofs + rect.position + off + Vector2(0, frame->lines[j].offset.y), rect.size.x, p_base_color, p_outline_size, p_outline_color, p_font_shadow_color, p_shadow_outline_size, p_shadow_ofs, r_processed_glyphs); } idx++; @@ -1299,22 +1301,12 @@ void RichTextLabel::_find_click(ItemFrame *p_frame, const Point2i &p_click, Item int vofs = vscroll->get_value(); // Search for the first line. - int from_line = 0; - - //TODO, change to binary search ? - while (from_line < main->lines.size()) { - if (main->lines[from_line].offset.y + main->lines[from_line].text_buf->get_size().y + main->lines[from_line].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")) >= vofs) { - break; - } - from_line++; - } - - if (from_line >= main->lines.size()) { - return; - } + int to_line = main->first_invalid_line.load(); + int from_line = _find_first_line(0, to_line, vofs); Point2 ofs = text_rect.get_position() + Vector2(0, main->lines[from_line].offset.y - vofs); - while (ofs.y < size.height && from_line < main->lines.size()) { + while (ofs.y < size.height && from_line < to_line) { + MutexLock lock(main->lines[from_line].text_buf->get_mutex()); _find_click_in_line(p_frame, from_line, ofs, text_rect.size.x, p_click, r_click_frame, r_click_line, r_click_item, r_click_char); ofs.y += main->lines[from_line].text_buf->get_size().y + main->lines[from_line].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); if (((r_click_item != nullptr) && ((*r_click_item) != nullptr)) || ((r_click_frame != nullptr) && ((*r_click_frame) != nullptr))) { @@ -1331,7 +1323,9 @@ float RichTextLabel::_find_click_in_line(ItemFrame *p_frame, int p_line, const V Vector2 off; int char_pos = -1; - Line &l = p_frame->lines.write[p_line]; + Line &l = p_frame->lines[p_line]; + MutexLock lock(l.text_buf->get_mutex()); + bool rtl = (l.text_buf->get_direction() == TextServer::DIRECTION_RTL); bool lrtl = is_layout_rtl(); @@ -1420,14 +1414,14 @@ float RichTextLabel::_find_click_in_line(ItemFrame *p_frame, int p_line, const V } } if (crect.has_point(p_click)) { - for (int j = 0; j < frame->lines.size(); j++) { + for (int j = 0; j < (int)frame->lines.size(); j++) { _find_click_in_line(frame, j, rect.position + Vector2(0, frame->lines[j].offset.y), rect.size.x, p_click, &table_click_frame, &table_click_line, &table_click_item, &table_click_char, true); if (table_click_frame && table_click_item) { // Save cell detected cell hit data. table_range = Vector2i(INT32_MAX, 0); for (Item *F : table->subitems) { ItemFrame *sub_frame = static_cast<ItemFrame *>(F); - for (int k = 0; k < sub_frame->lines.size(); k++) { + for (int k = 0; k < (int)sub_frame->lines.size(); k++) { table_range.x = MIN(table_range.x, sub_frame->lines[k].char_offset); table_range.y = MAX(table_range.y, sub_frame->lines[k].char_offset + sub_frame->lines[k].char_count); } @@ -1484,7 +1478,7 @@ float RichTextLabel::_find_click_in_line(ItemFrame *p_frame, int p_line, const V // Find item. if (r_click_item != nullptr) { Item *it = p_frame->lines[p_line].from; - Item *it_to = (p_line + 1 < p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; + Item *it_to = (p_line + 1 < (int)p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; if (char_pos == p_frame->lines[p_line].char_count) { // Selection after the end of line, select last item. if (it_to != nullptr) { @@ -1532,28 +1526,6 @@ void RichTextLabel::_scroll_changed(double) { update(); } -void RichTextLabel::_update_scroll() { - int total_height = get_content_height(); - - bool exceeds = total_height > get_size().height && scroll_active; - - if (exceeds != scroll_visible) { - if (exceeds) { - scroll_visible = true; - scroll_w = vscroll->get_combined_minimum_size().width; - vscroll->show(); - vscroll->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -scroll_w); - } else { - scroll_visible = false; - scroll_w = 0; - vscroll->hide(); - } - - main->first_resized_line = 0; //invalidate ALL - _validate_line_caches(main); - } -} - void RichTextLabel::_update_fx(RichTextLabel::ItemFrame *p_frame, double p_delta_time) { Item *it = p_frame; while (it) { @@ -1588,6 +1560,22 @@ void RichTextLabel::_update_fx(RichTextLabel::ItemFrame *p_frame, double p_delta } } +int RichTextLabel::_find_first_line(int p_from, int p_to, int p_vofs) const { + int l = p_from; + int r = p_to; + while (l < r) { + int m = Math::floor(double(l + r) / 2.0); + MutexLock lock(main->lines[m].text_buf->get_mutex()); + int ofs = main->lines[m].offset.y + main->lines[m].text_buf->get_size().y + main->lines[m].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); + if (ofs < p_vofs) { + l = m + 1; + } else { + r = m; + } + } + return l; +} + void RichTextLabel::_notification(int p_what) { switch (p_what) { case NOTIFICATION_MOUSE_EXIT: { @@ -1600,38 +1588,45 @@ void RichTextLabel::_notification(int p_what) { } break; case NOTIFICATION_RESIZED: { - main->first_resized_line = 0; //invalidate ALL + _stop_thread(); + main->first_resized_line.store(0); //invalidate ALL update(); } break; case NOTIFICATION_THEME_CHANGED: { - main->first_invalid_font_line = 0; //invalidate ALL + _stop_thread(); + main->first_invalid_font_line.store(0); //invalidate ALL update(); } break; case NOTIFICATION_ENTER_TREE: { + _stop_thread(); if (!text.is_empty()) { set_text(text); } - main->first_invalid_line = 0; //invalidate ALL + main->first_invalid_line.store(0); //invalidate ALL update(); } break; + case NOTIFICATION_EXIT_TREE: { + _stop_thread(); + } break; + case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: case NOTIFICATION_TRANSLATION_CHANGED: { - main->first_invalid_line = 0; //invalidate ALL + _stop_thread(); + main->first_invalid_line.store(0); //invalidate ALL update(); } break; - case NOTIFICATION_DRAW: { - _validate_line_caches(main); - _update_scroll(); + case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { + update(); + } break; + case NOTIFICATION_DRAW: { RID ci = get_canvas_item(); - Size2 size = get_size(); - Rect2 text_rect = _get_text_rect(); draw_style_box(get_theme_stylebox(SNAME("normal")), Rect2(Point2(), size)); @@ -1641,22 +1636,42 @@ void RichTextLabel::_notification(int p_what) { RenderingServer::get_singleton()->canvas_item_add_clip_ignore(ci, false); } + // Start text shaping. + if (_validate_line_caches()) { + set_physics_process_internal(false); // Disable auto refresh, if text is fully processed. + } else { + // Draw loading progress bar. + if ((progress_delay > 0) && (OS::get_singleton()->get_ticks_msec() - loading_started >= (uint64_t)progress_delay)) { + Ref<StyleBox> bg = get_theme_stylebox(SNAME("bg"), SNAME("ProgressBar")); + Ref<StyleBox> fg = get_theme_stylebox(SNAME("fg"), SNAME("ProgressBar")); + Ref<StyleBox> style = get_theme_stylebox(SNAME("normal")); + + Vector2 p_size = Vector2(size.width - (style->get_offset().x + vscroll->get_combined_minimum_size().width) * 2, vscroll->get_combined_minimum_size().width); + Vector2 p_pos = Vector2(style->get_offset().x, size.height - style->get_offset().y - vscroll->get_combined_minimum_size().width); + + draw_style_box(bg, Rect2(p_pos, p_size)); + + bool right_to_left = is_layout_rtl(); + double r = loaded.load(); + int mp = fg->get_minimum_size().width; + int p = round(r * (p_size.width - mp)); + if (right_to_left) { + int p_remaining = round((1.0 - r) * (p_size.width - mp)); + draw_style_box(fg, Rect2(p_pos + Point2(p_remaining, 0), Size2(p + fg->get_minimum_size().width, p_size.height))); + } else { + draw_style_box(fg, Rect2(p_pos, Size2(p + fg->get_minimum_size().width, p_size.height))); + } + } + } + + // Draw main text. + Rect2 text_rect = _get_text_rect(); float vofs = vscroll->get_value(); // Search for the first line. - int from_line = 0; - - //TODO, change to binary search ? - while (from_line < main->lines.size()) { - if (main->lines[from_line].offset.y + main->lines[from_line].text_buf->get_size().y + main->lines[from_line].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")) >= vofs) { - break; - } - from_line++; - } + int to_line = main->first_invalid_line.load(); + int from_line = _find_first_line(0, to_line, vofs); - if (from_line >= main->lines.size()) { - break; //nothing to draw - } Ref<Font> base_font = get_theme_font(SNAME("normal_font")); Color base_color = get_theme_color(SNAME("default_color")); Color outline_color = get_theme_color(SNAME("font_outline_color")); @@ -1671,7 +1686,9 @@ void RichTextLabel::_notification(int p_what) { // New cache draw. Point2 ofs = text_rect.get_position() + Vector2(0, main->lines[from_line].offset.y - vofs); int processed_glyphs = 0; - while (ofs.y < size.height && from_line < main->lines.size()) { + while (ofs.y < size.height && from_line < to_line) { + MutexLock lock(main->lines[from_line].text_buf->get_mutex()); + visible_paragraph_count++; visible_line_count += _draw_line(main, from_line, ofs, text_rect.size.x, base_color, outline_size, outline_color, font_shadow_color, shadow_outline_size, shadow_ofs, processed_glyphs); ofs.y += main->lines[from_line].text_buf->get_size().y + main->lines[from_line].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); @@ -1681,6 +1698,9 @@ void RichTextLabel::_notification(int p_what) { case NOTIFICATION_INTERNAL_PROCESS: { if (is_visible_in_tree()) { + if (!is_ready()) { + return; + } double dt = get_process_delta_time(); _update_fx(main, dt); update(); @@ -1708,18 +1728,6 @@ Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const return CURSOR_IBEAM; } - if (main->first_invalid_line < main->lines.size()) { - return get_default_cursor_shape(); //invalid - } - - if (main->first_invalid_font_line < main->lines.size()) { - return get_default_cursor_shape(); //invalid - } - - if (main->first_resized_line < main->lines.size()) { - return get_default_cursor_shape(); //invalid - } - Item *item = nullptr; bool outside = true; const_cast<RichTextLabel *>(this)->_find_click(main, p_pos, nullptr, nullptr, &item, nullptr, &outside); @@ -1727,7 +1735,6 @@ Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const if (item && !outside && const_cast<RichTextLabel *>(this)->_find_meta(item, nullptr)) { return CURSOR_POINTING_HAND; } - return get_default_cursor_shape(); } @@ -1737,16 +1744,6 @@ void RichTextLabel::gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> b = p_event; if (b.is_valid()) { - if (main->first_invalid_line < main->lines.size()) { - return; - } - if (main->first_invalid_font_line < main->lines.size()) { - return; - } - if (main->first_resized_line < main->lines.size()) { - return; - } - if (b->get_button_index() == MouseButton::LEFT) { if (b->is_pressed() && !b->is_double_click()) { scroll_updated = false; @@ -1800,6 +1797,7 @@ void RichTextLabel::gui_input(const Ref<InputEvent> &p_event) { if (c_frame) { const Line &l = c_frame->lines[c_line]; + MutexLock lock(l.text_buf->get_mutex()); PackedInt32Array words = TS->shaped_text_get_word_breaks(l.text_buf->get_rid()); for (int i = 0; i < words.size(); i = i + 2) { if (c_index >= words[i] && c_index < words[i + 1]) { @@ -1945,18 +1943,7 @@ void RichTextLabel::gui_input(const Ref<InputEvent> &p_event) { } Ref<InputEventMouseMotion> m = p_event; - if (m.is_valid()) { - if (main->first_invalid_line < main->lines.size()) { - return; - } - if (main->first_invalid_font_line < main->lines.size()) { - return; - } - if (main->first_resized_line < main->lines.size()) { - return; - } - ItemFrame *c_frame = nullptr; int c_line = 0; Item *c_item = nullptr; @@ -2434,93 +2421,215 @@ bool RichTextLabel::_find_layout_subitem(Item *from, Item *to) { return false; } -void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) { - if (p_frame->first_invalid_line == p_frame->lines.size()) { +void RichTextLabel::_thread_function(void *self) { + RichTextLabel *rtl = reinterpret_cast<RichTextLabel *>(self); + rtl->_process_line_caches(); + rtl->updating.store(false); + rtl->call_deferred(SNAME("update")); +} + +void RichTextLabel::_stop_thread() { + if (threaded) { + stop_thread.store(true); + thread.wait_to_finish(); + } +} + +bool RichTextLabel::is_ready() const { + if (updating.load()) { + return false; + } + return (main->first_invalid_line.load() == (int)main->lines.size() && main->first_resized_line.load() == (int)main->lines.size() && main->first_invalid_font_line.load() == (int)main->lines.size()); +} + +void RichTextLabel::set_threaded(bool p_threaded) { + if (threaded != p_threaded) { + _stop_thread(); + threaded = p_threaded; + update(); + } +} + +bool RichTextLabel::is_threaded() const { + return threaded; +} + +void RichTextLabel::set_progress_bar_delay(int p_delay_ms) { + progress_delay = p_delay_ms; +} + +int RichTextLabel::get_progress_bar_delay() const { + return progress_delay; +} + +bool RichTextLabel::_validate_line_caches() { + if (updating.load()) { + return false; + } + if (main->first_invalid_line.load() == (int)main->lines.size()) { + MutexLock data_lock(data_mutex); + Rect2 text_rect = _get_text_rect(); + Ref<Font> base_font = get_theme_font(SNAME("normal_font")); int base_font_size = get_theme_font_size(SNAME("normal_font_size")); + int ctrl_height = get_size().height; // Update fonts. - if (p_frame->first_invalid_font_line != p_frame->lines.size()) { - for (int i = p_frame->first_invalid_font_line; i < p_frame->lines.size(); i++) { - _update_line_font(p_frame, i, base_font, base_font_size); + if (main->first_invalid_font_line.load() != (int)main->lines.size()) { + for (int i = main->first_invalid_font_line.load(); i < (int)main->lines.size(); i++) { + _update_line_font(main, i, base_font, base_font_size); } - p_frame->first_resized_line = p_frame->first_invalid_font_line; - p_frame->first_invalid_font_line = p_frame->lines.size(); + main->first_resized_line.store(main->first_invalid_font_line.load()); + main->first_invalid_font_line.store(main->lines.size()); } - if (p_frame->first_resized_line == p_frame->lines.size()) { - return; + if (main->first_resized_line.load() == (int)main->lines.size()) { + return true; } // Resize lines without reshaping. - Rect2 text_rect = _get_text_rect(); + int fi = main->first_resized_line.load(); + + float total_height = 0; + for (int i = fi; i < (int)main->lines.size(); i++) { + total_height = _resize_line(main, i, base_font, base_font_size, text_rect.get_size().width - scroll_w, total_height); + + updating_scroll = true; + bool exceeds = total_height > ctrl_height && scroll_active; + if (exceeds != scroll_visible) { + if (exceeds) { + scroll_visible = true; + scroll_w = vscroll->get_combined_minimum_size().width; + vscroll->show(); + vscroll->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -scroll_w); + } else { + scroll_visible = false; + scroll_w = 0; + vscroll->hide(); + } - for (int i = p_frame->first_resized_line; i < p_frame->lines.size(); i++) { - _resize_line(p_frame, i, base_font, base_font_size, text_rect.get_size().width - scroll_w); - } + main->first_resized_line.store(0); - int total_height = 0; - if (p_frame->lines.size()) { - total_height = p_frame->lines[p_frame->lines.size() - 1].offset.y + p_frame->lines[p_frame->lines.size() - 1].text_buf->get_size().y + p_frame->lines[p_frame->lines.size() - 1].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); - } + total_height = 0; + for (int j = 0; j <= i; j++) { + total_height = _resize_line(main, j, base_font, base_font_size, text_rect.get_size().width - scroll_w, total_height); + + main->first_resized_line.store(j); + } + } - p_frame->first_resized_line = p_frame->lines.size(); + vscroll->set_max(total_height); + vscroll->set_page(text_rect.size.height); + if (scroll_follow && scroll_following) { + vscroll->set_value(total_height); + } + updating_scroll = false; - updating_scroll = true; - vscroll->set_max(total_height); - vscroll->set_page(text_rect.size.height); - if (scroll_follow && scroll_following) { - vscroll->set_value(total_height); + main->first_resized_line.store(i); } - updating_scroll = false; + + main->first_resized_line.store(main->lines.size()); if (fit_content_height) { update_minimum_size(); } - return; + return true; } + stop_thread.store(false); + if (threaded) { + updating.store(true); + loaded.store(true); + thread.start(RichTextLabel::_thread_function, reinterpret_cast<void *>(this)); + loading_started = OS::get_singleton()->get_ticks_msec(); + set_physics_process_internal(true); + return false; + } else { + _process_line_caches(); + update(); + return true; + } +} +void RichTextLabel::_process_line_caches() { // Shape invalid lines. + MutexLock data_lock(data_mutex); Rect2 text_rect = _get_text_rect(); Ref<Font> base_font = get_theme_font(SNAME("normal_font")); int base_font_size = get_theme_font_size(SNAME("normal_font_size")); + int ctrl_height = get_size().height; + int fi = main->first_invalid_line.load(); + int total_chars = (fi == 0) ? 0 : (main->lines[fi].char_offset + main->lines[fi].char_count); - int total_chars = (p_frame->first_invalid_line == 0) ? 0 : (p_frame->lines[p_frame->first_invalid_line].char_offset + p_frame->lines[p_frame->first_invalid_line].char_count); - for (int i = p_frame->first_invalid_line; i < p_frame->lines.size(); i++) { - _shape_line(p_frame, i, base_font, base_font_size, text_rect.get_size().width - scroll_w, &total_chars); - } + float total_height = 0; + for (int i = fi; i < (int)main->lines.size(); i++) { + total_height = _shape_line(main, i, base_font, base_font_size, text_rect.get_size().width - scroll_w, total_height, &total_chars); - int total_height = 0; - if (p_frame->lines.size()) { - total_height = p_frame->lines[p_frame->lines.size() - 1].offset.y + p_frame->lines[p_frame->lines.size() - 1].text_buf->get_size().y + p_frame->lines[p_frame->lines.size() - 1].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); - } + updating_scroll = true; + bool exceeds = total_height > ctrl_height && scroll_active; + if (exceeds != scroll_visible) { + if (exceeds) { + scroll_visible = true; + scroll_w = vscroll->get_combined_minimum_size().width; + vscroll->show(); + vscroll->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -scroll_w); + } else { + scroll_visible = false; + scroll_w = 0; + vscroll->hide(); + } - p_frame->first_invalid_line = p_frame->lines.size(); - p_frame->first_resized_line = p_frame->lines.size(); - p_frame->first_invalid_font_line = p_frame->lines.size(); + main->first_invalid_line.store(0); + main->first_resized_line.store(0); + main->first_invalid_font_line.store(0); - updating_scroll = true; - vscroll->set_max(total_height); - vscroll->set_page(text_rect.size.height); - if (scroll_follow && scroll_following) { - vscroll->set_value(total_height); + total_height = 0; + for (int j = 0; j <= i; j++) { + total_height = _resize_line(main, j, base_font, base_font_size, text_rect.get_size().width - scroll_w, total_height); + + main->first_invalid_line.store(j); + main->first_resized_line.store(j); + main->first_invalid_font_line.store(j); + } + } + + vscroll->set_max(total_height); + vscroll->set_page(text_rect.size.height); + if (scroll_follow && scroll_following) { + vscroll->set_value(total_height); + } + updating_scroll = false; + + main->first_invalid_line.store(i); + main->first_resized_line.store(i); + main->first_invalid_font_line.store(i); + + if (stop_thread.load()) { + return; + } + loaded.store(double(i) / double(main->lines.size())); } - updating_scroll = false; + + main->first_invalid_line.store(main->lines.size()); + main->first_resized_line.store(main->lines.size()); + main->first_invalid_font_line.store(main->lines.size()); if (fit_content_height) { update_minimum_size(); } + emit_signal(SNAME("finished")); } void RichTextLabel::_invalidate_current_line(ItemFrame *p_frame) { - if (p_frame->lines.size() - 1 <= p_frame->first_invalid_line) { - p_frame->first_invalid_line = p_frame->lines.size() - 1; - update(); + if ((int)p_frame->lines.size() - 1 <= p_frame->first_invalid_line) { + p_frame->first_invalid_line = (int)p_frame->lines.size() - 1; } } void RichTextLabel::add_text(const String &p_text) { + _stop_thread(); + MutexLock data_lock(data_mutex); + if (current->type == ITEM_TABLE) { return; //can't add anything here } @@ -2564,13 +2673,14 @@ void RichTextLabel::add_text(const String &p_text) { _add_item(item, false); current_frame->lines.resize(current_frame->lines.size() + 1); if (item->type != ITEM_NEWLINE) { - current_frame->lines.write[current_frame->lines.size() - 1].from = item; + current_frame->lines[current_frame->lines.size() - 1].from = item; } _invalidate_current_line(current_frame); } pos = end + 1; } + update(); } void RichTextLabel::_add_item(Item *p_item, bool p_enter, bool p_ensure_newline) { @@ -2599,7 +2709,7 @@ void RichTextLabel::_add_item(Item *p_item, bool p_enter, bool p_ensure_newline) } if (current_frame->lines[current_frame->lines.size() - 1].from == nullptr) { - current_frame->lines.write[current_frame->lines.size() - 1].from = p_item; + current_frame->lines[current_frame->lines.size() - 1].from = p_item; } p_item->line = current_frame->lines.size() - 1; @@ -2608,6 +2718,7 @@ void RichTextLabel::_add_item(Item *p_item, bool p_enter, bool p_ensure_newline) if (fixed_width != -1) { update_minimum_size(); } + update(); } void RichTextLabel::_remove_item(Item *p_item, const int p_line, const int p_subitem_line) { @@ -2635,6 +2746,9 @@ void RichTextLabel::_remove_item(Item *p_item, const int p_line, const int p_sub } void RichTextLabel::add_image(const Ref<Texture2D> &p_image, const int p_width, const int p_height, const Color &p_color, InlineAlignment p_alignment) { + _stop_thread(); + MutexLock data_lock(data_mutex); + if (current->type == ITEM_TABLE) { return; } @@ -2674,6 +2788,9 @@ void RichTextLabel::add_image(const Ref<Texture2D> &p_image, const int p_width, } void RichTextLabel::add_newline() { + _stop_thread(); + MutexLock data_lock(data_mutex); + if (current->type == ITEM_TABLE) { return; } @@ -2682,10 +2799,14 @@ void RichTextLabel::add_newline() { _add_item(item, false); current_frame->lines.resize(current_frame->lines.size() + 1); _invalidate_current_line(current_frame); + update(); } bool RichTextLabel::remove_line(const int p_line) { - if (p_line >= current_frame->lines.size() || p_line < 0) { + _stop_thread(); + MutexLock data_lock(data_mutex); + + if (p_line >= (int)current_frame->lines.size() || p_line < 0) { return false; } @@ -2713,16 +2834,19 @@ bool RichTextLabel::remove_line(const int p_line) { } if (p_line == 0 && current->subitems.size() > 0) { - main->lines.write[0].from = main; + main->lines[0].from = main; } - main->first_invalid_line = 0; // p_line ??? + main->first_invalid_line.store(0); update(); return true; } void RichTextLabel::push_dropcap(const String &p_string, const Ref<Font> &p_font, int p_size, const Rect2 &p_dropcap_margins, const Color &p_color, int p_ol_size, const Color &p_ol_color) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ERR_FAIL_COND(p_string.is_empty()); ERR_FAIL_COND(p_font.is_null()); @@ -2741,6 +2865,9 @@ void RichTextLabel::push_dropcap(const String &p_string, const Ref<Font> &p_font } void RichTextLabel::push_font(const Ref<Font> &p_font) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ERR_FAIL_COND(p_font.is_null()); ItemFont *item = memnew(ItemFont); @@ -2785,6 +2912,9 @@ void RichTextLabel::push_mono() { } void RichTextLabel::push_font_size(int p_font_size) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemFontSize *item = memnew(ItemFontSize); @@ -2793,6 +2923,9 @@ void RichTextLabel::push_font_size(int p_font_size) { } void RichTextLabel::push_font_features(const Dictionary &p_features) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemFontFeatures *item = memnew(ItemFontFeatures); @@ -2801,6 +2934,9 @@ void RichTextLabel::push_font_features(const Dictionary &p_features) { } void RichTextLabel::push_outline_size(int p_font_size) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemOutlineSize *item = memnew(ItemOutlineSize); @@ -2809,6 +2945,9 @@ void RichTextLabel::push_outline_size(int p_font_size) { } void RichTextLabel::push_color(const Color &p_color) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemColor *item = memnew(ItemColor); @@ -2817,6 +2956,9 @@ void RichTextLabel::push_color(const Color &p_color) { } void RichTextLabel::push_outline_color(const Color &p_color) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemOutlineColor *item = memnew(ItemOutlineColor); @@ -2825,6 +2967,9 @@ void RichTextLabel::push_outline_color(const Color &p_color) { } void RichTextLabel::push_underline() { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemUnderline *item = memnew(ItemUnderline); @@ -2832,6 +2977,9 @@ void RichTextLabel::push_underline() { } void RichTextLabel::push_strikethrough() { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemStrikethrough *item = memnew(ItemStrikethrough); @@ -2839,6 +2987,9 @@ void RichTextLabel::push_strikethrough() { } void RichTextLabel::push_paragraph(HorizontalAlignment p_alignment, Control::TextDirection p_direction, const String &p_language, TextServer::StructuredTextParser p_st_parser) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemParagraph *item = memnew(ItemParagraph); @@ -2850,6 +3001,9 @@ void RichTextLabel::push_paragraph(HorizontalAlignment p_alignment, Control::Tex } void RichTextLabel::push_indent(int p_level) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ERR_FAIL_COND(p_level < 0); @@ -2859,6 +3013,9 @@ void RichTextLabel::push_indent(int p_level) { } void RichTextLabel::push_list(int p_level, ListType p_list, bool p_capitalize) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ERR_FAIL_COND(p_level < 0); @@ -2871,6 +3028,9 @@ void RichTextLabel::push_list(int p_level, ListType p_list, bool p_capitalize) { } void RichTextLabel::push_meta(const Variant &p_meta) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemMeta *item = memnew(ItemMeta); @@ -2879,6 +3039,9 @@ void RichTextLabel::push_meta(const Variant &p_meta) { } void RichTextLabel::push_hint(const String &p_string) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemHint *item = memnew(ItemHint); @@ -2887,20 +3050,26 @@ void RichTextLabel::push_hint(const String &p_string) { } void RichTextLabel::push_table(int p_columns, InlineAlignment p_alignment) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(p_columns < 1); ItemTable *item = memnew(ItemTable); item->columns.resize(p_columns); item->total_width = 0; item->inline_align = p_alignment; - for (int i = 0; i < item->columns.size(); i++) { - item->columns.write[i].expand = false; - item->columns.write[i].expand_ratio = 1; + for (int i = 0; i < (int)item->columns.size(); i++) { + item->columns[i].expand = false; + item->columns[i].expand_ratio = 1; } _add_item(item, true, false); } void RichTextLabel::push_fade(int p_start_index, int p_length) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ItemFade *item = memnew(ItemFade); item->starting_index = p_start_index; item->length = p_length; @@ -2908,6 +3077,9 @@ void RichTextLabel::push_fade(int p_start_index, int p_length) { } void RichTextLabel::push_shake(int p_strength = 10, float p_rate = 24.0f) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ItemShake *item = memnew(ItemShake); item->strength = p_strength; item->rate = p_rate; @@ -2915,6 +3087,9 @@ void RichTextLabel::push_shake(int p_strength = 10, float p_rate = 24.0f) { } void RichTextLabel::push_wave(float p_frequency = 1.0f, float p_amplitude = 10.0f) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ItemWave *item = memnew(ItemWave); item->frequency = p_frequency; item->amplitude = p_amplitude; @@ -2922,6 +3097,9 @@ void RichTextLabel::push_wave(float p_frequency = 1.0f, float p_amplitude = 10.0 } void RichTextLabel::push_tornado(float p_frequency = 1.0f, float p_radius = 10.0f) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ItemTornado *item = memnew(ItemTornado); item->frequency = p_frequency; item->radius = p_radius; @@ -2929,6 +3107,9 @@ void RichTextLabel::push_tornado(float p_frequency = 1.0f, float p_radius = 10.0 } void RichTextLabel::push_rainbow(float p_saturation, float p_value, float p_frequency) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ItemRainbow *item = memnew(ItemRainbow); item->frequency = p_frequency; item->saturation = p_saturation; @@ -2937,6 +3118,9 @@ void RichTextLabel::push_rainbow(float p_saturation, float p_value, float p_freq } void RichTextLabel::push_bgcolor(const Color &p_color) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemBGColor *item = memnew(ItemBGColor); @@ -2945,6 +3129,9 @@ void RichTextLabel::push_bgcolor(const Color &p_color) { } void RichTextLabel::push_fgcolor(const Color &p_color) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type == ITEM_TABLE); ItemFGColor *item = memnew(ItemFGColor); @@ -2953,6 +3140,9 @@ void RichTextLabel::push_fgcolor(const Color &p_color) { } void RichTextLabel::push_customfx(Ref<RichTextEffect> p_custom_effect, Dictionary p_environment) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ItemCustomFX *item = memnew(ItemCustomFX); item->custom_effect = p_custom_effect; item->char_fx_transform->environment = p_environment; @@ -2960,15 +3150,23 @@ void RichTextLabel::push_customfx(Ref<RichTextEffect> p_custom_effect, Dictionar } void RichTextLabel::set_table_column_expand(int p_column, bool p_expand, int p_ratio) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type != ITEM_TABLE); + ItemTable *table = static_cast<ItemTable *>(current); - ERR_FAIL_INDEX(p_column, table->columns.size()); - table->columns.write[p_column].expand = p_expand; - table->columns.write[p_column].expand_ratio = p_ratio; + ERR_FAIL_INDEX(p_column, (int)table->columns.size()); + table->columns[p_column].expand = p_expand; + table->columns[p_column].expand_ratio = p_ratio; } void RichTextLabel::set_cell_row_background_color(const Color &p_odd_row_bg, const Color &p_even_row_bg) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type != ITEM_FRAME); + ItemFrame *cell = static_cast<ItemFrame *>(current); ERR_FAIL_COND(!cell->cell); cell->odd_row_bg = p_odd_row_bg; @@ -2976,14 +3174,22 @@ void RichTextLabel::set_cell_row_background_color(const Color &p_odd_row_bg, con } void RichTextLabel::set_cell_border_color(const Color &p_color) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type != ITEM_FRAME); + ItemFrame *cell = static_cast<ItemFrame *>(current); ERR_FAIL_COND(!cell->cell); cell->border = p_color; } void RichTextLabel::set_cell_size_override(const Size2 &p_min_size, const Size2 &p_max_size) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type != ITEM_FRAME); + ItemFrame *cell = static_cast<ItemFrame *>(current); ERR_FAIL_COND(!cell->cell); cell->min_size_over = p_min_size; @@ -2991,13 +3197,20 @@ void RichTextLabel::set_cell_size_override(const Size2 &p_min_size, const Size2 } void RichTextLabel::set_cell_padding(const Rect2 &p_padding) { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type != ITEM_FRAME); + ItemFrame *cell = static_cast<ItemFrame *>(current); ERR_FAIL_COND(!cell->cell); cell->padding = p_padding; } void RichTextLabel::push_cell() { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(current->type != ITEM_TABLE); ItemFrame *item = memnew(ItemFrame); @@ -3006,20 +3219,23 @@ void RichTextLabel::push_cell() { current_frame = item; item->cell = true; item->lines.resize(1); - item->lines.write[0].from = nullptr; - item->first_invalid_line = 0; // parent frame last line ??? + item->lines[0].from = nullptr; + item->first_invalid_line.store(0); // parent frame last line ??? } int RichTextLabel::get_current_table_column() const { ERR_FAIL_COND_V(current->type != ITEM_TABLE, -1); ItemTable *table = static_cast<ItemTable *>(current); - return table->subitems.size() % table->columns.size(); } void RichTextLabel::pop() { + _stop_thread(); + MutexLock data_lock(data_mutex); + ERR_FAIL_COND(!current->parent); + if (current->type == ITEM_FRAME) { current_frame = static_cast<ItemFrame *>(current)->parent_frame; } @@ -3027,12 +3243,15 @@ void RichTextLabel::pop() { } void RichTextLabel::clear() { + _stop_thread(); + MutexLock data_lock(data_mutex); + main->_clear_children(); current = main; current_frame = main; main->lines.clear(); main->lines.resize(1); - main->first_invalid_line = 0; + main->first_invalid_line.store(0); selection.click_frame = nullptr; selection.click_item = nullptr; @@ -3050,8 +3269,10 @@ void RichTextLabel::clear() { } void RichTextLabel::set_tab_size(int p_spaces) { + _stop_thread(); + tab_size = p_spaces; - main->first_resized_line = 0; + main->first_resized_line.store(0); update(); } @@ -3131,6 +3352,9 @@ void RichTextLabel::parse_bbcode(const String &p_bbcode) { } void RichTextLabel::append_text(const String &p_bbcode) { + _stop_thread(); + MutexLock data_lock(data_mutex); + int pos = 0; List<String> tag_stack; @@ -3177,7 +3401,7 @@ void RichTextLabel::append_text(const String &p_bbcode) { // Find optional parameters. String bbcode_name; - typedef Map<String, String> OptionMap; + typedef HashMap<String, String> OptionMap; OptionMap bbcode_options; if (!split_tag_block.is_empty()) { bbcode_name = split_tag_block[0]; @@ -3620,9 +3844,9 @@ void RichTextLabel::append_text(const String &p_bbcode) { Ref<Texture2D> texture = ResourceLoader::load(image, "Texture2D"); if (texture.is_valid()) { Color color = Color(1.0, 1.0, 1.0); - OptionMap::Element *color_option = bbcode_options.find("color"); + OptionMap::Iterator color_option = bbcode_options.find("color"); if (color_option) { - color = Color::from_string(color_option->value(), color); + color = Color::from_string(color_option->value, color); } int width = 0; @@ -3636,14 +3860,14 @@ void RichTextLabel::append_text(const String &p_bbcode) { height = bbcode_value.substr(sep + 1).to_int(); } } else { - OptionMap::Element *width_option = bbcode_options.find("width"); + OptionMap::Iterator width_option = bbcode_options.find("width"); if (width_option) { - width = width_option->value().to_int(); + width = width_option->value.to_int(); } - OptionMap::Element *height_option = bbcode_options.find("height"); + OptionMap::Iterator height_option = bbcode_options.find("height"); if (height_option) { - height = height_option->value().to_int(); + height = height_option->value.to_int(); } } @@ -3729,15 +3953,15 @@ void RichTextLabel::append_text(const String &p_bbcode) { } else if (bbcode_name == "fade") { int start_index = 0; - OptionMap::Element *start_option = bbcode_options.find("start"); + OptionMap::Iterator start_option = bbcode_options.find("start"); if (start_option) { - start_index = start_option->value().to_int(); + start_index = start_option->value.to_int(); } int length = 10; - OptionMap::Element *length_option = bbcode_options.find("length"); + OptionMap::Iterator length_option = bbcode_options.find("length"); if (length_option) { - length = length_option->value().to_int(); + length = length_option->value.to_int(); } push_fade(start_index, length); @@ -3745,15 +3969,15 @@ void RichTextLabel::append_text(const String &p_bbcode) { tag_stack.push_front("fade"); } else if (bbcode_name == "shake") { int strength = 5; - OptionMap::Element *strength_option = bbcode_options.find("level"); + OptionMap::Iterator strength_option = bbcode_options.find("level"); if (strength_option) { - strength = strength_option->value().to_int(); + strength = strength_option->value.to_int(); } float rate = 20.0f; - OptionMap::Element *rate_option = bbcode_options.find("rate"); + OptionMap::Iterator rate_option = bbcode_options.find("rate"); if (rate_option) { - rate = rate_option->value().to_float(); + rate = rate_option->value.to_float(); } push_shake(strength, rate); @@ -3762,15 +3986,15 @@ void RichTextLabel::append_text(const String &p_bbcode) { set_process_internal(true); } else if (bbcode_name == "wave") { float amplitude = 20.0f; - OptionMap::Element *amplitude_option = bbcode_options.find("amp"); + OptionMap::Iterator amplitude_option = bbcode_options.find("amp"); if (amplitude_option) { - amplitude = amplitude_option->value().to_float(); + amplitude = amplitude_option->value.to_float(); } float period = 5.0f; - OptionMap::Element *period_option = bbcode_options.find("freq"); + OptionMap::Iterator period_option = bbcode_options.find("freq"); if (period_option) { - period = period_option->value().to_float(); + period = period_option->value.to_float(); } push_wave(period, amplitude); @@ -3779,15 +4003,15 @@ void RichTextLabel::append_text(const String &p_bbcode) { set_process_internal(true); } else if (bbcode_name == "tornado") { float radius = 10.0f; - OptionMap::Element *radius_option = bbcode_options.find("radius"); + OptionMap::Iterator radius_option = bbcode_options.find("radius"); if (radius_option) { - radius = radius_option->value().to_float(); + radius = radius_option->value.to_float(); } float frequency = 1.0f; - OptionMap::Element *frequency_option = bbcode_options.find("freq"); + OptionMap::Iterator frequency_option = bbcode_options.find("freq"); if (frequency_option) { - frequency = frequency_option->value().to_float(); + frequency = frequency_option->value.to_float(); } push_tornado(frequency, radius); @@ -3796,21 +4020,21 @@ void RichTextLabel::append_text(const String &p_bbcode) { set_process_internal(true); } else if (bbcode_name == "rainbow") { float saturation = 0.8f; - OptionMap::Element *saturation_option = bbcode_options.find("sat"); + OptionMap::Iterator saturation_option = bbcode_options.find("sat"); if (saturation_option) { - saturation = saturation_option->value().to_float(); + saturation = saturation_option->value.to_float(); } float value = 0.8f; - OptionMap::Element *value_option = bbcode_options.find("val"); + OptionMap::Iterator value_option = bbcode_options.find("val"); if (value_option) { - value = value_option->value().to_float(); + value = value_option->value.to_float(); } float frequency = 1.0f; - OptionMap::Element *frequency_option = bbcode_options.find("freq"); + OptionMap::Iterator frequency_option = bbcode_options.find("freq"); if (frequency_option) { - frequency = frequency_option->value().to_float(); + frequency = frequency_option->value.to_float(); } push_rainbow(saturation, value, frequency); @@ -3871,9 +4095,13 @@ void RichTextLabel::append_text(const String &p_bbcode) { } void RichTextLabel::scroll_to_paragraph(int p_paragraph) { - ERR_FAIL_INDEX(p_paragraph, main->lines.size()); - _validate_line_caches(main); - vscroll->set_value(main->lines[p_paragraph].offset.y); + if (p_paragraph <= 0) { + vscroll->set_value(0); + } else if (p_paragraph >= main->first_invalid_line.load()) { + vscroll->set_value(vscroll->get_max()); + } else { + vscroll->set_value(main->lines[p_paragraph].offset.y); + } } int RichTextLabel::get_paragraph_count() const { @@ -3888,10 +4116,14 @@ int RichTextLabel::get_visible_paragraph_count() const { } void RichTextLabel::scroll_to_line(int p_line) { - _validate_line_caches(main); - + if (p_line <= 0) { + vscroll->set_value(0); + return; + } int line_count = 0; - for (int i = 0; i < main->lines.size(); i++) { + int to_line = main->first_invalid_line.load(); + for (int i = 0; i < to_line; i++) { + MutexLock lock(main->lines[i].text_buf->get_mutex()); if ((line_count <= p_line) && (line_count + main->lines[i].text_buf->get_line_count() >= p_line)) { float line_offset = 0.f; for (int j = 0; j < p_line - line_count; j++) { @@ -3902,11 +4134,14 @@ void RichTextLabel::scroll_to_line(int p_line) { } line_count += main->lines[i].text_buf->get_line_count(); } + vscroll->set_value(vscroll->get_max()); } float RichTextLabel::get_line_offset(int p_line) { int line_count = 0; - for (int i = 0; i < main->lines.size(); i++) { + int to_line = main->first_invalid_line.load(); + for (int i = 0; i < to_line; i++) { + MutexLock lock(main->lines[i].text_buf->get_mutex()); if ((line_count <= p_line) && (p_line <= line_count + main->lines[i].text_buf->get_line_count())) { float line_offset = 0.f; for (int j = 0; j < p_line - line_count; j++) { @@ -3920,7 +4155,8 @@ float RichTextLabel::get_line_offset(int p_line) { } float RichTextLabel::get_paragraph_offset(int p_paragraph) { - if (0 <= p_paragraph && p_paragraph < main->lines.size()) { + int to_line = main->first_invalid_line.load(); + if (0 <= p_paragraph && p_paragraph < to_line) { return main->lines[p_paragraph].offset.y; } return 0; @@ -3928,7 +4164,9 @@ float RichTextLabel::get_paragraph_offset(int p_paragraph) { int RichTextLabel::get_line_count() const { int line_count = 0; - for (int i = 0; i < main->lines.size(); i++) { + int to_line = main->first_invalid_line.load(); + for (int i = 0; i < to_line; i++) { + MutexLock lock(main->lines[i].text_buf->get_mutex()); line_count += main->lines[i].text_buf->get_line_count(); } return line_count; @@ -3989,13 +4227,13 @@ bool RichTextLabel::_search_table(ItemTable *p_table, List<Item *>::Element *p_f ERR_CONTINUE(E->get()->type != ITEM_FRAME); // Children should all be frames. ItemFrame *frame = static_cast<ItemFrame *>(E->get()); if (p_reverse_search) { - for (int i = frame->lines.size() - 1; i >= 0; i--) { + for (int i = (int)frame->lines.size() - 1; i >= 0; i--) { if (_search_line(frame, i, p_string, -1, p_reverse_search)) { return true; } } } else { - for (int i = 0; i < frame->lines.size(); i++) { + for (int i = 0; i < (int)frame->lines.size(); i++) { if (_search_line(frame, i, p_string, 0, p_reverse_search)) { return true; } @@ -4008,12 +4246,12 @@ bool RichTextLabel::_search_table(ItemTable *p_table, List<Item *>::Element *p_f bool RichTextLabel::_search_line(ItemFrame *p_frame, int p_line, const String &p_string, int p_char_idx, bool p_reverse_search) { ERR_FAIL_COND_V(p_frame == nullptr, false); - ERR_FAIL_COND_V(p_line < 0 || p_line >= p_frame->lines.size(), false); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)p_frame->lines.size(), false); - Line &l = p_frame->lines.write[p_line]; + Line &l = p_frame->lines[p_line]; String text; - Item *it_to = (p_line + 1 < p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; + Item *it_to = (p_line + 1 < (int)p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; for (Item *it = l.from; it && it != it_to; it = _get_next_item(it)) { switch (it->type) { case ITEM_NEWLINE: { @@ -4071,7 +4309,8 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection, bool p int char_idx = p_search_previous ? -1 : 0; int current_line = 0; - int ending_line = main->lines.size() - 1; + int to_line = main->first_invalid_line.load(); + int ending_line = to_line - 1; if (p_from_selection && selection.active) { // First check to see if other results exist in current line char_idx = p_search_previous ? selection.from_char - 1 : selection.to_char; @@ -4120,8 +4359,8 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection, bool p while (current_line != ending_line) { // Wrap around if (current_line < 0) { - current_line = main->lines.size() - 1; - } else if (current_line >= main->lines.size()) { + current_line = to_line - 1; + } else if (current_line >= to_line) { current_line = 0; } @@ -4143,12 +4382,13 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection, bool p String RichTextLabel::_get_line_text(ItemFrame *p_frame, int p_line, Selection p_selection) const { String text; + ERR_FAIL_COND_V(p_frame == nullptr, text); - ERR_FAIL_COND_V(p_line < 0 || p_line >= p_frame->lines.size(), text); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)p_frame->lines.size(), text); - Line &l = p_frame->lines.write[p_line]; + Line &l = p_frame->lines[p_line]; - Item *it_to = (p_line + 1 < p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; + Item *it_to = (p_line + 1 < (int)p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr; int end_idx = 0; if (it_to != nullptr) { end_idx = it_to->index; @@ -4163,7 +4403,7 @@ String RichTextLabel::_get_line_text(ItemFrame *p_frame, int p_line, Selection p for (Item *E : table->subitems) { ERR_CONTINUE(E->type != ITEM_FRAME); // Children should all be frames. ItemFrame *frame = static_cast<ItemFrame *>(E); - for (int i = 0; i < frame->lines.size(); i++) { + for (int i = 0; i < (int)frame->lines.size(); i++) { text += _get_line_text(frame, i, p_selection); } } @@ -4227,7 +4467,8 @@ String RichTextLabel::get_selected_text() const { } String text; - for (int i = 0; i < main->lines.size(); i++) { + int to_line = main->first_invalid_line.load(); + for (int i = 0; i < to_line; i++) { text += _get_line_text(main, i, selection); } return text; @@ -4368,19 +4609,23 @@ String RichTextLabel::get_parsed_text() const { void RichTextLabel::set_text_direction(Control::TextDirection p_text_direction) { ERR_FAIL_COND((int)p_text_direction < -1 || (int)p_text_direction > 3); + _stop_thread(); + if (text_direction != p_text_direction) { text_direction = p_text_direction; - main->first_invalid_line = 0; //invalidate ALL - _validate_line_caches(main); + main->first_invalid_line.store(0); //invalidate ALL + _validate_line_caches(); update(); } } void RichTextLabel::set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser) { if (st_parser != p_parser) { + _stop_thread(); + st_parser = p_parser; - main->first_invalid_line = 0; //invalidate ALL - _validate_line_caches(main); + main->first_invalid_line.store(0); //invalidate ALL + _validate_line_caches(); update(); } } @@ -4390,10 +4635,14 @@ TextServer::StructuredTextParser RichTextLabel::get_structured_text_bidi_overrid } void RichTextLabel::set_structured_text_bidi_override_options(Array p_args) { - st_args = p_args; - main->first_invalid_line = 0; //invalidate ALL - _validate_line_caches(main); - update(); + if (st_args != p_args) { + _stop_thread(); + + st_args = p_args; + main->first_invalid_line.store(0); //invalidate ALL + _validate_line_caches(); + update(); + } } Array RichTextLabel::get_structured_text_bidi_override_options() const { @@ -4406,9 +4655,11 @@ Control::TextDirection RichTextLabel::get_text_direction() const { void RichTextLabel::set_language(const String &p_language) { if (language != p_language) { + _stop_thread(); + language = p_language; - main->first_invalid_line = 0; //invalidate ALL - _validate_line_caches(main); + main->first_invalid_line.store(0); //invalidate ALL + _validate_line_caches(); update(); } } @@ -4419,9 +4670,11 @@ String RichTextLabel::get_language() const { void RichTextLabel::set_autowrap_mode(RichTextLabel::AutowrapMode p_mode) { if (autowrap_mode != p_mode) { + _stop_thread(); + autowrap_mode = p_mode; main->first_invalid_line = 0; //invalidate ALL - _validate_line_caches(main); + _validate_line_caches(); update(); } } @@ -4432,6 +4685,8 @@ RichTextLabel::AutowrapMode RichTextLabel::get_autowrap_mode() const { void RichTextLabel::set_percent_visible(float p_percent) { if (percent_visible != p_percent) { + _stop_thread(); + if (p_percent < 0 || p_percent >= 1) { visible_characters = -1; percent_visible = 1; @@ -4440,8 +4695,8 @@ void RichTextLabel::set_percent_visible(float p_percent) { percent_visible = p_percent; } if (visible_chars_behavior == VC_CHARS_BEFORE_SHAPING) { - main->first_invalid_line = 0; //invalidate ALL - _validate_line_caches(main); + main->first_invalid_line.store(0); //invalidate ALL + _validate_line_caches(); } update(); } @@ -4476,15 +4731,19 @@ void RichTextLabel::install_effect(const Variant effect) { int RichTextLabel::get_content_height() const { int total_height = 0; - if (main->lines.size()) { - total_height = main->lines[main->lines.size() - 1].offset.y + main->lines[main->lines.size() - 1].text_buf->get_size().y + main->lines[main->lines.size() - 1].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); + int to_line = main->first_invalid_line.load(); + if (to_line) { + MutexLock lock(main->lines[to_line - 1].text_buf->get_mutex()); + total_height = main->lines[to_line - 1].offset.y + main->lines[to_line - 1].text_buf->get_size().y + main->lines[to_line - 1].text_buf->get_line_count() * get_theme_constant(SNAME("line_separation")); } return total_height; } int RichTextLabel::get_content_width() const { int total_width = 0; - for (int i = 0; i < main->lines.size(); i++) { + int to_line = main->first_invalid_line.load(); + for (int i = 0; i < to_line; i++) { + MutexLock lock(main->lines[i].text_buf->get_mutex()); total_width = MAX(total_width, main->lines[i].offset.x + main->lines[i].text_buf->get_size().x); } return total_width; @@ -4603,6 +4862,14 @@ void RichTextLabel::_bind_methods() { ClassDB::bind_method(D_METHOD("get_text"), &RichTextLabel::get_text); + ClassDB::bind_method(D_METHOD("is_ready"), &RichTextLabel::is_ready); + + ClassDB::bind_method(D_METHOD("set_threaded", "threaded"), &RichTextLabel::set_threaded); + ClassDB::bind_method(D_METHOD("is_threaded"), &RichTextLabel::is_threaded); + + ClassDB::bind_method(D_METHOD("set_progress_bar_delay", "delay_ms"), &RichTextLabel::set_progress_bar_delay); + ClassDB::bind_method(D_METHOD("get_progress_bar_delay"), &RichTextLabel::get_progress_bar_delay); + ClassDB::bind_method(D_METHOD("set_visible_characters", "amount"), &RichTextLabel::set_visible_characters); ClassDB::bind_method(D_METHOD("get_visible_characters"), &RichTextLabel::get_visible_characters); @@ -4643,6 +4910,9 @@ void RichTextLabel::_bind_methods() { // Note: set "bbcode_enabled" first, to avoid unnecessary "text" resets. ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bbcode_enabled"), "set_use_bbcode", "is_using_bbcode"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "threaded"), "set_threaded", "is_threaded"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "progress_bar_delay"), "set_progress_bar_delay", "get_progress_bar_delay"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_size", PROPERTY_HINT_RANGE, "0,24,1"), "set_tab_size", "get_tab_size"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT), "set_text", "get_text"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fit_content_height"), "set_fit_content_height", "is_fit_content_height_enabled"); @@ -4676,6 +4946,8 @@ void RichTextLabel::_bind_methods() { ADD_SIGNAL(MethodInfo("meta_hover_started", PropertyInfo(Variant::NIL, "meta", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); ADD_SIGNAL(MethodInfo("meta_hover_ended", PropertyInfo(Variant::NIL, "meta", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); + ADD_SIGNAL(MethodInfo("finished")); + BIND_ENUM_CONSTANT(AUTOWRAP_OFF); BIND_ENUM_CONSTANT(AUTOWRAP_ARBITRARY); BIND_ENUM_CONSTANT(AUTOWRAP_WORD); @@ -4727,15 +4999,19 @@ RichTextLabel::VisibleCharactersBehavior RichTextLabel::get_visible_characters_b void RichTextLabel::set_visible_characters_behavior(RichTextLabel::VisibleCharactersBehavior p_behavior) { if (visible_chars_behavior != p_behavior) { + _stop_thread(); + visible_chars_behavior = p_behavior; - main->first_invalid_line = 0; //invalidate ALL - _validate_line_caches(main); + main->first_invalid_line.store(0); //invalidate ALL + _validate_line_caches(); update(); } } void RichTextLabel::set_visible_characters(int p_visible) { if (visible_characters != p_visible) { + _stop_thread(); + visible_characters = p_visible; if (p_visible == -1) { percent_visible = 1; @@ -4746,8 +5022,8 @@ void RichTextLabel::set_visible_characters(int p_visible) { } } if (visible_chars_behavior == VC_CHARS_BEFORE_SHAPING) { - main->first_invalid_line = 0; //invalidate ALL - _validate_line_caches(main); + main->first_invalid_line.store(0); //invalidate ALL + _validate_line_caches(); } update(); } @@ -4759,7 +5035,9 @@ int RichTextLabel::get_visible_characters() const { int RichTextLabel::get_character_line(int p_char) { int line_count = 0; - for (int i = 0; i < main->lines.size(); i++) { + int to_line = main->first_invalid_line.load(); + for (int i = 0; i < to_line; i++) { + MutexLock lock(main->lines[i].text_buf->get_mutex()); if (main->lines[i].char_offset < p_char && p_char <= main->lines[i].char_offset + main->lines[i].char_count) { for (int j = 0; j < main->lines[i].text_buf->get_line_count(); j++) { Vector2i range = main->lines[i].text_buf->get_line_range(j); @@ -4777,7 +5055,8 @@ int RichTextLabel::get_character_line(int p_char) { int RichTextLabel::get_character_paragraph(int p_char) { int para_count = 0; - for (int i = 0; i < main->lines.size(); i++) { + int to_line = main->first_invalid_line.load(); + for (int i = 0; i < to_line; i++) { if (main->lines[i].char_offset < p_char && p_char <= main->lines[i].char_offset + main->lines[i].char_count) { return para_count; } else { @@ -4802,7 +5081,6 @@ int RichTextLabel::get_total_character_count() const { } it = _get_next_item(it, true); } - return tc; } @@ -4812,7 +5090,8 @@ int RichTextLabel::get_total_glyph_count() const { while (it) { if (it->type == ITEM_FRAME) { ItemFrame *f = static_cast<ItemFrame *>(it); - for (int i = 0; i < f->lines.size(); i++) { + for (int i = 0; i < (int)f->lines.size(); i++) { + MutexLock lock(f->lines[i].text_buf->get_mutex()); tg += TS->shaped_text_get_glyph_count(f->lines[i].text_buf->get_rid()); } } @@ -4836,7 +5115,6 @@ Size2 RichTextLabel::get_minimum_size() const { } if (fit_content_height) { - const_cast<RichTextLabel *>(this)->_validate_line_caches(main); size.y += get_content_height(); } @@ -5034,10 +5312,10 @@ RichTextLabel::RichTextLabel(const String &p_text) { main->index = 0; current = main; main->lines.resize(1); - main->lines.write[0].from = main; - main->first_invalid_line = 0; - main->first_resized_line = 0; - main->first_invalid_font_line = 0; + main->lines[0].from = main; + main->first_invalid_line.store(0); + main->first_resized_line.store(0); + main->first_invalid_font_line.store(0); current_frame = main; vscroll = memnew(VScrollBar); @@ -5052,10 +5330,13 @@ RichTextLabel::RichTextLabel(const String &p_text) { vscroll->hide(); set_text(p_text); + updating.store(false); + stop_thread.store(false); set_clip_contents(true); } RichTextLabel::~RichTextLabel() { + _stop_thread(); memdelete(main); } diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index c6d0d0875d..7fbd5f1745 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -141,10 +141,10 @@ private: struct ItemFrame : public Item { bool cell = false; - Vector<Line> lines; - int first_invalid_line = 0; - int first_invalid_font_line = 0; - int first_resized_line = 0; + LocalVector<Line> lines; + std::atomic<int> first_invalid_line; + std::atomic<int> first_invalid_font_line; + std::atomic<int> first_resized_line; ItemFrame *parent_frame = nullptr; @@ -155,7 +155,12 @@ private: Size2 max_size_over = Size2(-1, -1); Rect2 padding; - ItemFrame() { type = ITEM_FRAME; } + ItemFrame() { + type = ITEM_FRAME; + first_invalid_line.store(0); + first_invalid_font_line.store(0); + first_resized_line.store(0); + } }; struct ItemText : public Item { @@ -263,8 +268,8 @@ private: int width = 0; }; - Vector<Column> columns; - Vector<float> rows; + LocalVector<Column> columns; + LocalVector<float> rows; int total_width = 0; int total_height = 0; @@ -363,6 +368,16 @@ private: Item *current = nullptr; ItemFrame *current_frame = nullptr; + Thread thread; + Mutex data_mutex; + bool threaded = false; + std::atomic<bool> stop_thread; + std::atomic<bool> updating; + std::atomic<double> loaded; + + uint64_t loading_started = 0; + int progress_delay = 1000; + VScrollBar *vscroll = nullptr; AutowrapMode autowrap_mode = AUTOWRAP_WORD_SMART; @@ -392,7 +407,11 @@ private: Array custom_effects; void _invalidate_current_line(ItemFrame *p_frame); - void _validate_line_caches(ItemFrame *p_frame); + + static void _thread_function(void *self); + void _stop_thread(); + bool _validate_line_caches(); + void _process_line_caches(); void _add_item(Item *p_item, bool p_enter = false, bool p_ensure_newline = false); void _remove_item(Item *p_item, const int p_line, const int p_subitem_line); @@ -446,8 +465,9 @@ private: bool _search_line(ItemFrame *p_frame, int p_line, const String &p_string, int p_char_idx, bool p_reverse_search); bool _search_table(ItemTable *p_table, List<Item *>::Element *p_from, const String &p_string, bool p_reverse_search); - void _shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width, int *r_char_offset); - void _resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width); + float _shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width, float p_h, int *r_char_offset); + float _resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width, float p_h); + void _update_line_font(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size); int _draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Color &p_base_color, int p_outline_size, const Color &p_outline_color, const Color &p_font_shadow_color, int p_shadow_outline_size, const Point2 &p_shadow_ofs, int &r_processed_glyphs); float _find_click_in_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Point2i &p_click, ItemFrame **r_click_frame = nullptr, int *r_click_line = nullptr, Item **r_click_item = nullptr, int *r_click_char = nullptr, bool p_table = false); @@ -480,9 +500,9 @@ private: bool _find_layout_subitem(Item *from, Item *to); void _fetch_item_fx_stack(Item *p_item, Vector<ItemFX *> &r_stack); - void _update_scroll(); void _update_fx(ItemFrame *p_frame, double p_delta_time); void _scroll_changed(double); + int _find_first_line(int p_from, int p_to, int p_vofs) const; virtual void gui_input(const Ref<InputEvent> &p_event) override; virtual String get_tooltip(const Point2 &p_pos) const override; @@ -611,6 +631,14 @@ public: bool is_deselect_on_focus_loss_enabled() const; void deselect(); + bool is_ready() const; + + void set_threaded(bool p_threaded); + bool is_threaded() const; + + void set_progress_bar_delay(int p_delay_ms); + int get_progress_bar_delay() const; + // Context menu. PopupMenu *get_menu() const; bool is_menu_visible() const; diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 315ffbd419..050c510a96 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4756,9 +4756,7 @@ void TextEdit::add_gutter(int p_at) { gutters.insert(p_at, GutterInfo()); } - for (int i = 0; i < text.size() + 1; i++) { - text.add_gutter(p_at); - } + text.add_gutter(p_at); emit_signal(SNAME("gutter_added")); update(); } @@ -4768,9 +4766,7 @@ void TextEdit::remove_gutter(int p_gutter) { gutters.remove_at(p_gutter); - for (int i = 0; i < text.size() + 1; i++) { - text.remove_gutter(p_gutter); - } + text.remove_gutter(p_gutter); emit_signal(SNAME("gutter_removed")); update(); } diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 194cad72d1..993203bee6 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -356,7 +356,7 @@ private: Vector<int> last_visible_chars; }; - Map<int, LineDrawingCache> line_drawing_cache; + HashMap<int, LineDrawingCache> line_drawing_cache; int _get_char_pos_for_line(int p_px, int p_line, int p_wrap_index = 0) const; @@ -511,7 +511,6 @@ private: /* Syntax highlighting. */ Ref<SyntaxHighlighter> syntax_highlighter; - Map<int, Dictionary> syntax_highlighting_cache; Dictionary _get_line_syntax_highlighting(int p_line); diff --git a/scene/gui/texture_progress_bar.cpp b/scene/gui/texture_progress_bar.cpp index f79c68671c..081d065efe 100644 --- a/scene/gui/texture_progress_bar.cpp +++ b/scene/gui/texture_progress_bar.cpp @@ -650,8 +650,8 @@ void TextureProgressBar::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_progress"), "set_tint_progress", "get_tint_progress"); ADD_GROUP("Radial Fill", "radial_"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider,degrees"), "set_radial_initial_angle", "get_radial_initial_angle"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider,degrees"), "set_fill_degrees", "get_fill_degrees"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "radial_center_offset"), "set_radial_center_offset", "get_radial_center_offset"); BIND_ENUM_CONSTANT(FILL_LEFT_TO_RIGHT); diff --git a/scene/gui/video_stream_player.cpp b/scene/gui/video_stream_player.cpp index ca2dad71af..20bc9a1028 100644 --- a/scene/gui/video_stream_player.cpp +++ b/scene/gui/video_stream_player.cpp @@ -443,7 +443,7 @@ void VideoStreamPlayer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "audio_track", PROPERTY_HINT_RANGE, "0,128,1"), "set_audio_track", "get_audio_track"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "VideoStream"), "set_stream", "get_stream"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01,suffix:dB"), "set_volume_db", "get_volume_db"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume", PROPERTY_HINT_RANGE, "0,15,0.01,exp", PROPERTY_USAGE_NONE), "set_volume", "get_volume"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "has_autoplay"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused"), "set_paused", "is_paused"); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 8961b5ba54..bd791dff2a 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1637,7 +1637,7 @@ Node *Node::find_common_parent_with(const Node *p_node) const { return const_cast<Node *>(p_node); } - Set<const Node *> visited; + RBSet<const Node *> visited; const Node *n = this; @@ -1669,7 +1669,7 @@ NodePath Node::get_path_to(const Node *p_node) const { return NodePath("."); } - Set<const Node *> visited; + RBSet<const Node *> visited; const Node *n = this; @@ -1763,15 +1763,15 @@ void Node::add_to_group(const StringName &p_identifier, bool p_persistent) { void Node::remove_from_group(const StringName &p_identifier) { ERR_FAIL_COND(!data.grouped.has(p_identifier)); - Map<StringName, GroupData>::Element *E = data.grouped.find(p_identifier); + HashMap<StringName, GroupData>::Iterator E = data.grouped.find(p_identifier); ERR_FAIL_COND(!E); if (data.tree) { - data.tree->remove_from_group(E->key(), this); + data.tree->remove_from_group(E->key, this); } - data.grouped.erase(E); + data.grouped.remove(E); } Array Node::_get_groups() const { @@ -2042,7 +2042,7 @@ StringName Node::get_property_store_alias(const StringName &p_property) const { } #endif -void Node::get_storable_properties(Set<StringName> &r_storable_properties) const { +void Node::get_storable_properties(RBSet<StringName> &r_storable_properties) const { List<PropertyInfo> pi; get_property_list(&pi); for (List<PropertyInfo>::Element *E = pi.front(); E; E = E->next()) { @@ -2088,7 +2088,7 @@ bool Node::get_scene_instance_load_placeholder() const { return data.use_placeholder; } -Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const { +Node *Node::_duplicate(int p_flags, HashMap<const Node *, Node *> *r_duplimap) const { Node *node = nullptr; bool instantiated = false; @@ -2280,11 +2280,11 @@ Node *Node::duplicate(int p_flags) const { } #ifdef TOOLS_ENABLED -Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap) const { - return duplicate_from_editor(r_duplimap, Map<Ref<Resource>, Ref<Resource>>()); +Node *Node::duplicate_from_editor(HashMap<const Node *, Node *> &r_duplimap) const { + return duplicate_from_editor(r_duplimap, HashMap<Ref<Resource>, Ref<Resource>>()); } -Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap, const Map<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { +Node *Node::duplicate_from_editor(HashMap<const Node *, Node *> &r_duplimap, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { Node *dupe = _duplicate(DUPLICATE_SIGNALS | DUPLICATE_GROUPS | DUPLICATE_SCRIPTS | DUPLICATE_USE_INSTANCING | DUPLICATE_FROM_EDITOR, &r_duplimap); // This is used by SceneTreeDock's paste functionality. When pasting to foreign scene, resources are duplicated. @@ -2300,7 +2300,7 @@ Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap, const M return dupe; } -void Node::remap_node_resources(Node *p_node, const Map<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { +void Node::remap_node_resources(Node *p_node, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { List<PropertyInfo> props; p_node->get_property_list(&props); @@ -2326,7 +2326,7 @@ void Node::remap_node_resources(Node *p_node, const Map<Ref<Resource>, Ref<Resou } } -void Node::remap_nested_resources(Ref<Resource> p_resource, const Map<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { +void Node::remap_nested_resources(Ref<Resource> p_resource, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const { List<PropertyInfo> props; p_resource->get_property_list(&props); @@ -2528,9 +2528,10 @@ Node *Node::get_node_and_resource(const NodePath &p_path, Ref<Resource> &r_res, int j = 0; // If not p_last_is_property, we shouldn't consider the last one as part of the resource for (; j < p_path.get_subname_count() - (int)p_last_is_property; j++) { - Variant new_res_v = j == 0 ? node->get(p_path.get_subname(j)) : r_res->get(p_path.get_subname(j)); + bool is_valid = false; + Variant new_res_v = j == 0 ? node->get(p_path.get_subname(j), &is_valid) : r_res->get(p_path.get_subname(j), &is_valid); - if (new_res_v.get_type() == Variant::NIL) { // Found nothing on that path + if (!is_valid) { // Found nothing on that path return nullptr; } diff --git a/scene/main/node.h b/scene/main/node.h index 72f340bbc3..8505d2618f 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -32,7 +32,7 @@ #define NODE_H #include "core/string/node_path.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/typed_array.h" #include "scene/main/scene_tree.h" @@ -119,7 +119,7 @@ private: Viewport *viewport = nullptr; - Map<StringName, GroupData> grouped; + HashMap<StringName, GroupData> grouped; List<Node *>::Element *OW = nullptr; // Owned element. List<Node *> owned; @@ -177,7 +177,7 @@ private: Array _get_node_and_resource(const NodePath &p_path); void _duplicate_signals(const Node *p_original, Node *p_copy) const; - Node *_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap = nullptr) const; + Node *_duplicate(int p_flags, HashMap<const Node *, Node *> *r_duplimap = nullptr) const; TypedArray<Node> _get_children(bool p_include_internal = true) const; Array _get_groups() const; @@ -378,7 +378,7 @@ public: bool is_property_pinned(const StringName &p_property) const; virtual StringName get_property_store_alias(const StringName &p_property) const; #endif - void get_storable_properties(Set<StringName> &r_storable_properties) const; + void get_storable_properties(RBSet<StringName> &r_storable_properties) const; virtual String to_string() override; @@ -420,10 +420,10 @@ public: Node *duplicate(int p_flags = DUPLICATE_GROUPS | DUPLICATE_SIGNALS | DUPLICATE_SCRIPTS) const; #ifdef TOOLS_ENABLED - Node *duplicate_from_editor(Map<const Node *, Node *> &r_duplimap) const; - Node *duplicate_from_editor(Map<const Node *, Node *> &r_duplimap, const Map<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; - void remap_node_resources(Node *p_node, const Map<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; - void remap_nested_resources(Ref<Resource> p_resource, const Map<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; + Node *duplicate_from_editor(HashMap<const Node *, Node *> &r_duplimap) const; + Node *duplicate_from_editor(HashMap<const Node *, Node *> &r_duplimap, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; + void remap_node_resources(Node *p_node, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; + void remap_nested_resources(Ref<Resource> p_resource, const HashMap<Ref<Resource>, Ref<Resource>> &p_resource_remap) const; #endif // used by editors, to save what has changed only @@ -522,6 +522,6 @@ public: VARIANT_ENUM_CAST(Node::DuplicateFlags); -typedef Set<Node *, Node::Comparator> NodeSet; +typedef RBSet<Node *, Node::Comparator> NodeSet; #endif diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp index 8fb7456335..71e62fe804 100644 --- a/scene/main/resource_preloader.cpp +++ b/scene/main/resource_preloader.cpp @@ -55,16 +55,16 @@ Array ResourcePreloader::_get_resources() const { arr.resize(resources.size()); names.resize(resources.size()); - Set<String> sorted_names; + RBSet<String> sorted_names; for (const KeyValue<StringName, Ref<Resource>> &E : resources) { sorted_names.insert(E.key); } int i = 0; - for (Set<String>::Element *E = sorted_names.front(); E; E = E->next()) { - names.set(i, E->get()); - arr[i] = resources[E->get()]; + for (const String &E : sorted_names) { + names.set(i, E); + arr[i] = resources[E]; i++; } @@ -123,8 +123,9 @@ Vector<String> ResourcePreloader::_get_resource_list() const { Vector<String> res; res.resize(resources.size()); int i = 0; - for (Map<StringName, Ref<Resource>>::Element *E = resources.front(); E; E = E->next(), i++) { - res.set(i, E->key()); + for (const KeyValue<StringName, Ref<Resource>> &E : resources) { + res.set(i, E.key); + i++; } return res; diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h index 2df8b5cda7..fe59bc8ae3 100644 --- a/scene/main/resource_preloader.h +++ b/scene/main/resource_preloader.h @@ -36,7 +36,7 @@ class ResourcePreloader : public Node { GDCLASS(ResourcePreloader, Node); - Map<StringName, Ref<Resource>> resources; + HashMap<StringName, Ref<Resource>> resources; void _set_resources(const Array &p_data); Array _get_resources() const; diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index f99b4abd57..b695dddf65 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -65,7 +65,7 @@ void SceneTreeTimer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_time_left", "time"), &SceneTreeTimer::set_time_left); ClassDB::bind_method(D_METHOD("get_time_left"), &SceneTreeTimer::get_time_left); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left"), "set_time_left", "get_time_left"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left", PROPERTY_HINT_NONE, "suffix:s"), "set_time_left", "get_time_left"); ADD_SIGNAL(MethodInfo("timeout")); } @@ -129,32 +129,32 @@ void SceneTree::node_renamed(Node *p_node) { } SceneTree::Group *SceneTree::add_to_group(const StringName &p_group, Node *p_node) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { E = group_map.insert(p_group, Group()); } - ERR_FAIL_COND_V_MSG(E->get().nodes.has(p_node), &E->get(), "Already in group: " + p_group + "."); - E->get().nodes.push_back(p_node); - //E->get().last_tree_version=0; - E->get().changed = true; - return &E->get(); + ERR_FAIL_COND_V_MSG(E->value.nodes.has(p_node), &E->value, "Already in group: " + p_group + "."); + E->value.nodes.push_back(p_node); + //E->value.last_tree_version=0; + E->value.changed = true; + return &E->value; } void SceneTree::remove_from_group(const StringName &p_group, Node *p_node) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); ERR_FAIL_COND(!E); - E->get().nodes.erase(p_node); - if (E->get().nodes.is_empty()) { - group_map.erase(E); + E->value.nodes.erase(p_node); + if (E->value.nodes.is_empty()) { + group_map.remove(E); } } void SceneTree::make_group_changed(const StringName &p_group) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (E) { - E->get().changed = true; + E->value.changed = true; } } @@ -173,17 +173,17 @@ void SceneTree::_flush_ugc() { ugc_locked = true; while (unique_group_calls.size()) { - Map<UGCall, Vector<Variant>>::Element *E = unique_group_calls.front(); + HashMap<UGCall, Vector<Variant>, UGCall>::Iterator E = unique_group_calls.begin(); - const Variant **argptrs = (const Variant **)alloca(E->get().size() * sizeof(Variant *)); + const Variant **argptrs = (const Variant **)alloca(E->value.size() * sizeof(Variant *)); - for (int i = 0; i < E->get().size(); i++) { - argptrs[i] = &E->get()[i]; + for (int i = 0; i < E->value.size(); i++) { + argptrs[i] = &E->value[i]; } - call_group_flagsp(GROUP_CALL_DEFAULT, E->key().group, E->key().call, argptrs, E->get().size()); + call_group_flagsp(GROUP_CALL_DEFAULT, E->key.group, E->key.call, argptrs, E->value.size()); - unique_group_calls.erase(E); + unique_group_calls.remove(E); } ugc_locked = false; @@ -211,11 +211,11 @@ void SceneTree::_update_group_order(Group &g, bool p_use_priority) { } void SceneTree::call_group_flagsp(uint32_t p_call_flags, const StringName &p_group, const StringName &p_function, const Variant **p_args, int p_argcount) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -284,11 +284,11 @@ void SceneTree::call_group_flagsp(uint32_t p_call_flags, const StringName &p_gro } void SceneTree::notify_group_flags(uint32_t p_call_flags, const StringName &p_group, int p_notification) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -335,11 +335,11 @@ void SceneTree::notify_group_flags(uint32_t p_call_flags, const StringName &p_gr } void SceneTree::set_group_flags(uint32_t p_call_flags, const StringName &p_group, const String &p_name, const Variant &p_value) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -826,11 +826,11 @@ bool SceneTree::is_paused() const { } void SceneTree::_notify_group_pause(const StringName &p_group, int p_notification) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -870,11 +870,11 @@ void SceneTree::_notify_group_pause(const StringName &p_group, int p_notificatio } void SceneTree::_call_input_pause(const StringName &p_group, CallInputType p_call_type, const Ref<InputEvent> &p_input, Viewport *p_viewport) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - Group &g = E->get(); + Group &g = E->value; if (g.nodes.is_empty()) { return; } @@ -960,20 +960,20 @@ int64_t SceneTree::get_frame() const { Array SceneTree::_get_nodes_in_group(const StringName &p_group) { Array ret; - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return ret; } - _update_group_order(E->get()); //update order just in case - int nc = E->get().nodes.size(); + _update_group_order(E->value); //update order just in case + int nc = E->value.nodes.size(); if (nc == 0) { return ret; } ret.resize(nc); - Node **ptr = E->get().nodes.ptrw(); + Node **ptr = E->value.nodes.ptrw(); for (int i = 0; i < nc; i++) { ret[i] = ptr[i]; } @@ -986,32 +986,32 @@ bool SceneTree::has_group(const StringName &p_identifier) const { } Node *SceneTree::get_first_node_in_group(const StringName &p_group) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return nullptr; // No group. } - _update_group_order(E->get()); // Update order just in case. + _update_group_order(E->value); // Update order just in case. - if (E->get().nodes.is_empty()) { + if (E->value.nodes.is_empty()) { return nullptr; } - return E->get().nodes[0]; + return E->value.nodes[0]; } void SceneTree::get_nodes_in_group(const StringName &p_group, List<Node *> *p_list) { - Map<StringName, Group>::Element *E = group_map.find(p_group); + HashMap<StringName, Group>::Iterator E = group_map.find(p_group); if (!E) { return; } - _update_group_order(E->get()); //update order just in case - int nc = E->get().nodes.size(); + _update_group_order(E->value); //update order just in case + int nc = E->value.nodes.size(); if (nc == 0) { return; } - Node **ptr = E->get().nodes.ptrw(); + Node **ptr = E->value.nodes.ptrw(); for (int i = 0; i < nc; i++) { p_list->push_back(ptr[i]); } diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 5454bb34e9..cb5e9cc1ee 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -102,7 +102,7 @@ private: bool paused = false; int root_lock = 0; - Map<StringName, Group> group_map; + HashMap<StringName, Group> group_map; bool _quit = false; bool initialized = false; @@ -121,16 +121,20 @@ private: StringName group; StringName call; + static uint32_t hash(const UGCall &p_val) { + return p_val.group.hash() ^ p_val.call.hash(); + } + bool operator==(const UGCall &p_with) const { return group == p_with.group && call == p_with.call; } bool operator<(const UGCall &p_with) const { return group == p_with.group ? call < p_with.call : group < p_with.group; } }; // Safety for when a node is deleted while a group is being called. int call_lock = 0; - Set<Node *> call_skip; // Skip erased nodes. + RBSet<Node *> call_skip; // Skip erased nodes. List<ObjectID> delete_queue; - Map<UGCall, Vector<Variant>> unique_group_calls; + HashMap<UGCall, Vector<Variant>, UGCall> unique_group_calls; bool ugc_locked = false; void _flush_ugc(); diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp index 5a5747e122..bb9359ef59 100644 --- a/scene/main/timer.cpp +++ b/scene/main/timer.cpp @@ -216,11 +216,11 @@ void Timer::_bind_methods() { ADD_SIGNAL(MethodInfo("timeout")); ADD_PROPERTY(PropertyInfo(Variant::INT, "process_callback", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_timer_process_callback", "get_timer_process_callback"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wait_time", PROPERTY_HINT_RANGE, "0.001,4096,0.001,or_greater,exp"), "set_wait_time", "get_wait_time"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wait_time", PROPERTY_HINT_RANGE, "0.001,4096,0.001,or_greater,exp,suffix:s"), "set_wait_time", "get_wait_time"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_paused", "is_paused"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "", "get_time_left"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left", PROPERTY_HINT_NONE, "suffix:s", PROPERTY_USAGE_NONE), "", "get_time_left"); BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS); BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE); diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index e4037c2843..590c73de0b 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -412,9 +412,9 @@ void Viewport::_notification(int p_what) { #ifndef _3D_DISABLED if (audio_listener_3d_set.size() && !audio_listener_3d) { AudioListener3D *first = nullptr; - for (Set<AudioListener3D *>::Element *E = audio_listener_3d_set.front(); E; E = E->next()) { - if (first == nullptr || first->is_greater_than(E->get())) { - first = E->get(); + for (AudioListener3D *E : audio_listener_3d_set) { + if (first == nullptr || first->is_greater_than(E)) { + first = E; } } @@ -426,9 +426,9 @@ void Viewport::_notification(int p_what) { if (camera_3d_set.size() && !camera_3d) { // There are cameras but no current camera, pick first in tree and make it current. Camera3D *first = nullptr; - for (Set<Camera3D *>::Element *E = camera_3d_set.front(); E; E = E->next()) { - if (first == nullptr || first->is_greater_than(E->get())) { - first = E->get(); + for (Camera3D *E : camera_3d_set) { + if (first == nullptr || first->is_greater_than(E)) { + first = E; } } @@ -647,13 +647,13 @@ void Viewport::_process_picking() { uint64_t frame = get_tree()->get_frame(); PhysicsDirectSpaceState2D::ShapeResult res[64]; - for (Set<CanvasLayer *>::Element *E = canvas_layers.front(); E; E = E->next()) { + for (const CanvasLayer *E : canvas_layers) { Transform2D canvas_transform; ObjectID canvas_layer_id; - if (E->get()) { + if (E) { // A descendant CanvasLayer. - canvas_transform = E->get()->get_transform(); - canvas_layer_id = E->get()->get_instance_id(); + canvas_transform = E->get_transform(); + canvas_layer_id = E->get_instance_id(); } else { // This Viewport's builtin canvas. canvas_transform = get_canvas_transform(); @@ -675,23 +675,23 @@ void Viewport::_process_picking() { if (co && co->can_process()) { bool send_event = true; if (is_mouse) { - Map<ObjectID, uint64_t>::Element *F = physics_2d_mouseover.find(res[i].collider_id); + HashMap<ObjectID, uint64_t>::Iterator F = physics_2d_mouseover.find(res[i].collider_id); if (!F) { physics_2d_mouseover.insert(res[i].collider_id, frame); co->_mouse_enter(); } else { - F->get() = frame; + F->value = frame; // It was already hovered, so don't send the event if it's faked. if (mm.is_valid() && mm->get_device() == InputEvent::DEVICE_ID_INTERNAL) { send_event = false; } } - Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>>::Element *SF = physics_2d_shape_mouseover.find(Pair(res[i].collider_id, res[i].shape)); + HashMap<Pair<ObjectID, int>, uint64_t, PairHash<ObjectID, int>>::Iterator SF = physics_2d_shape_mouseover.find(Pair(res[i].collider_id, res[i].shape)); if (!SF) { physics_2d_shape_mouseover.insert(Pair(res[i].collider_id, res[i].shape), frame); co->_mouse_shape_enter(res[i].shape); } else { - SF->get() = frame; + SF->value = frame; } } @@ -1277,21 +1277,19 @@ void Viewport::_gui_show_tooltip() { gui.tooltip_popup->child_controls_changed(); } -void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_input) { +bool Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_input) { + bool stopped = false; Ref<InputEvent> ev = p_input; - // Mouse wheel events can't be stopped. - Ref<InputEventMouseButton> mb = p_input; + // Returns true if an event should be impacted by a control's mouse filter. + bool is_mouse_event = Ref<InputEventMouse>(p_input).is_valid(); - bool cant_stop_me_now = (mb.is_valid() && + Ref<InputEventMouseButton> mb = p_input; + bool is_scroll_event = mb.is_valid() && (mb->get_button_index() == MouseButton::WHEEL_DOWN || mb->get_button_index() == MouseButton::WHEEL_UP || mb->get_button_index() == MouseButton::WHEEL_LEFT || - mb->get_button_index() == MouseButton::WHEEL_RIGHT)); - Ref<InputEventPanGesture> pn = p_input; - cant_stop_me_now = pn.is_valid() || cant_stop_me_now; - - bool ismouse = ev.is_valid() || Object::cast_to<InputEventMouseMotion>(*p_input) != nullptr; + mb->get_button_index() == MouseButton::WHEEL_RIGHT); CanvasItem *ci = p_control; while (ci) { @@ -1305,9 +1303,12 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu break; } if (gui.key_event_accepted) { + stopped = true; break; } - if (!cant_stop_me_now && control->data.mouse_filter == Control::MOUSE_FILTER_STOP && ismouse) { + if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP && is_mouse_event && !(is_scroll_event && control->data.force_pass_scroll_events)) { + // Mouse events are stopped by default with MOUSE_FILTER_STOP, unless we have a scroll event and force_pass_scroll_events set to true + stopped = true; break; } } @@ -1319,6 +1320,7 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu ev = ev->xformed_by(ci->get_transform()); // Transform event upwards. ci = ci->get_parent_item(); } + return stopped; } void Viewport::_gui_call_notification(Control *p_control, int p_what) { @@ -1530,11 +1532,14 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { } } + bool stopped = false; if (gui.mouse_focus && gui.mouse_focus->can_process()) { - _gui_call_input(gui.mouse_focus, mb); + stopped = _gui_call_input(gui.mouse_focus, mb); } - set_input_as_handled(); + if (stopped) { + set_input_as_handled(); + } if (gui.drag_data.get_type() != Variant::NIL && mb->get_button_index() == MouseButton::LEFT) { // Alternate drop use (when using force_drag(), as proposed by #5342). @@ -1600,11 +1605,14 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { gui.forced_mouse_focus = false; } + bool stopped = false; if (mouse_focus && mouse_focus->can_process()) { - _gui_call_input(mouse_focus, mb); + stopped = _gui_call_input(mouse_focus, mb); } - set_input_as_handled(); + if (stopped) { + set_input_as_handled(); + } } } @@ -1767,11 +1775,14 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { ds_cursor_shape = (DisplayServer::CursorShape)cursor_shape; + bool stopped = false; if (over && over->can_process()) { - _gui_call_input(over, mm); + stopped = _gui_call_input(over, mm); } - set_input_as_handled(); + if (stopped) { + set_input_as_handled(); + } } if (gui.drag_data.get_type() != Variant::NIL) { @@ -1884,6 +1895,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { if (touch_event->is_pressed()) { Control *over = gui_find_control(pos); if (over) { + bool stopped = false; if (over->can_process()) { touch_event = touch_event->xformed_by(Transform2D()); // Make a copy. if (over == gui.mouse_focus) { @@ -1892,19 +1904,24 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { pos = over->get_global_transform_with_canvas().affine_inverse().xform(pos); } touch_event->set_position(pos); - _gui_call_input(over, touch_event); + stopped = _gui_call_input(over, touch_event); + } + if (stopped) { + set_input_as_handled(); } - set_input_as_handled(); return; } } else if (touch_event->get_index() == 0 && gui.last_mouse_focus) { + bool stopped = false; if (gui.last_mouse_focus->can_process()) { touch_event = touch_event->xformed_by(Transform2D()); // Make a copy. touch_event->set_position(gui.focus_inv_xform.xform(pos)); - _gui_call_input(gui.last_mouse_focus, touch_event); + stopped = _gui_call_input(gui.last_mouse_focus, touch_event); + } + if (stopped) { + set_input_as_handled(); } - set_input_as_handled(); return; } } @@ -1919,6 +1936,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { Control *over = gui_find_control(pos); if (over) { + bool stopped = false; if (over->can_process()) { gesture_event = gesture_event->xformed_by(Transform2D()); // Make a copy. if (over == gui.mouse_focus) { @@ -1927,9 +1945,11 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { pos = over->get_global_transform_with_canvas().affine_inverse().xform(pos); } gesture_event->set_position(pos); - _gui_call_input(over, gesture_event); + stopped = _gui_call_input(over, gesture_event); + } + if (stopped) { + set_input_as_handled(); } - set_input_as_handled(); return; } } @@ -1941,6 +1961,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { over = gui_find_control(drag_event->get_position()); } if (over) { + bool stopped = false; if (over->can_process()) { Transform2D localizer = over->get_global_transform_with_canvas().affine_inverse(); Size2 pos = localizer.xform(drag_event->get_position()); @@ -1953,10 +1974,12 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { drag_event->set_relative(rel); drag_event->set_position(pos); - _gui_call_input(over, drag_event); + stopped = _gui_call_input(over, drag_event); } - set_input_as_handled(); + if (stopped) { + set_input_as_handled(); + } return; } } @@ -2250,14 +2273,14 @@ void Viewport::_drop_physics_mouseover(bool p_paused_only) { } void Viewport::_cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paused_only, uint64_t p_frame_reference) { - List<Map<ObjectID, uint64_t>::Element *> to_erase; + List<ObjectID> to_erase; - for (Map<ObjectID, uint64_t>::Element *E = physics_2d_mouseover.front(); E; E = E->next()) { - if (!p_clean_all_frames && E->get() == p_frame_reference) { + for (const KeyValue<ObjectID, uint64_t> &E : physics_2d_mouseover) { + if (!p_clean_all_frames && E.value == p_frame_reference) { continue; } - Object *o = ObjectDB::get_instance(E->key()); + Object *o = ObjectDB::get_instance(E.key); if (o) { CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o); if (co && co->is_inside_tree()) { @@ -2267,7 +2290,7 @@ void Viewport::_cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paus co->_mouse_exit(); } } - to_erase.push_back(E); + to_erase.push_back(E.key); } while (to_erase.size()) { @@ -2276,24 +2299,24 @@ void Viewport::_cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paus } // Per-shape. - List<Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>>::Element *> shapes_to_erase; + List<Pair<ObjectID, int>> shapes_to_erase; - for (Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>>::Element *E = physics_2d_shape_mouseover.front(); E; E = E->next()) { - if (!p_clean_all_frames && E->get() == p_frame_reference) { + for (KeyValue<Pair<ObjectID, int>, uint64_t> &E : physics_2d_shape_mouseover) { + if (!p_clean_all_frames && E.value == p_frame_reference) { continue; } - Object *o = ObjectDB::get_instance(E->key().first); + Object *o = ObjectDB::get_instance(E.key.first); if (o) { CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o); if (co && co->is_inside_tree()) { if (p_clean_all_frames && p_paused_only && co->can_process()) { continue; } - co->_mouse_shape_exit(E->key().second); + co->_mouse_shape_exit(E.key.second); } } - shapes_to_erase.push_back(E); + shapes_to_erase.push_back(E.key); } while (shapes_to_erase.size()) { @@ -3179,18 +3202,18 @@ void Viewport::_audio_listener_3d_remove(AudioListener3D *p_listener) { void Viewport::_audio_listener_3d_make_next_current(AudioListener3D *p_exclude) { if (audio_listener_3d_set.size() > 0) { - for (Set<AudioListener3D *>::Element *E = audio_listener_3d_set.front(); E; E = E->next()) { - if (p_exclude == E->get()) { + for (AudioListener3D *E : audio_listener_3d_set) { + if (p_exclude == E) { continue; } - if (!E->get()->is_inside_tree()) { + if (!E->is_inside_tree()) { continue; } if (audio_listener_3d != nullptr) { return; } - E->get()->make_current(); + E->make_current(); } } else { // Attempt to reset listener to the camera position. @@ -3267,18 +3290,18 @@ void Viewport::_camera_3d_remove(Camera3D *p_camera) { } void Viewport::_camera_3d_make_next_current(Camera3D *p_exclude) { - for (Set<Camera3D *>::Element *E = camera_3d_set.front(); E; E = E->next()) { - if (p_exclude == E->get()) { + for (Camera3D *E : camera_3d_set) { + if (p_exclude == E) { continue; } - if (!E->get()->is_inside_tree()) { + if (!E->is_inside_tree()) { continue; } if (camera_3d != nullptr) { return; } - E->get()->make_current(); + E->make_current(); } } @@ -3913,8 +3936,8 @@ Viewport::Viewport() { Viewport::~Viewport() { // Erase itself from viewport textures. - for (Set<ViewportTexture *>::Element *E = viewport_textures.front(); E; E = E->next()) { - E->get()->vp = nullptr; + for (ViewportTexture *E : viewport_textures) { + E->vp = nullptr; } RenderingServer::get_singleton()->free(viewport); } diff --git a/scene/main/viewport.h b/scene/main/viewport.h index c1e71c69a3..48e4b175b6 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -203,7 +203,7 @@ private: AudioListener2D *audio_listener_2d = nullptr; Camera2D *camera_2d = nullptr; - Set<CanvasLayer *> canvas_layers; + RBSet<CanvasLayer *> canvas_layers; RID viewport; RID current_canvas; @@ -258,9 +258,9 @@ private: bool local_input_handled = false; // Collider to frame - Map<ObjectID, uint64_t> physics_2d_mouseover; + HashMap<ObjectID, uint64_t> physics_2d_mouseover; // Collider & shape to frame - Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>> physics_2d_shape_mouseover; + HashMap<Pair<ObjectID, int>, uint64_t, PairHash<ObjectID, int>> physics_2d_shape_mouseover; // Cleans up colliders corresponding to old frames or all of them. void _cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paused_only, uint64_t p_frame_reference = 0); @@ -301,7 +301,7 @@ private: bool use_occlusion_culling = false; Ref<ViewportTexture> default_texture; - Set<ViewportTexture *> viewport_textures; + RBSet<ViewportTexture *> viewport_textures; SDFOversize sdf_oversize = SDF_OVERSIZE_120_PERCENT; SDFScale sdf_scale = SDF_SCALE_50_PERCENT; @@ -381,7 +381,7 @@ private: bool disable_input = false; - void _gui_call_input(Control *p_control, const Ref<InputEvent> &p_input); + bool _gui_call_input(Control *p_control, const Ref<InputEvent> &p_input); void _gui_call_notification(Control *p_control, int p_what); void _gui_sort_roots(); @@ -615,7 +615,7 @@ public: bool use_xr = false; friend class AudioListener3D; AudioListener3D *audio_listener_3d = nullptr; - Set<AudioListener3D *> audio_listener_3d_set; + RBSet<AudioListener3D *> audio_listener_3d_set; bool is_audio_listener_3d_enabled = false; RID internal_audio_listener_3d; AudioListener3D *get_audio_listener_3d() const; @@ -650,7 +650,7 @@ public: friend class Camera3D; Camera3D *camera_3d = nullptr; - Set<Camera3D *> camera_3d_set; + RBSet<Camera3D *> camera_3d_set; Camera3D *get_camera_3d() const; void _camera_3d_transform_changed_notify(); void _camera_3d_set(Camera3D *p_camera); diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 6feccb7eec..193f18c075 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -263,9 +263,9 @@ void Window::_make_window() { DisplayServer::get_singleton()->window_set_transient(window_id, transient_parent->window_id); } - for (Set<Window *>::Element *E = transient_children.front(); E; E = E->next()) { - if (E->get()->window_id != DisplayServer::INVALID_WINDOW_ID) { - DisplayServer::get_singleton()->window_set_transient(E->get()->window_id, transient_parent->window_id); + for (const Window *E : transient_children) { + if (E->window_id != DisplayServer::INVALID_WINDOW_ID) { + DisplayServer::get_singleton()->window_set_transient(E->window_id, transient_parent->window_id); } } @@ -290,9 +290,9 @@ void Window::_clear_window() { DisplayServer::get_singleton()->window_set_transient(window_id, DisplayServer::INVALID_WINDOW_ID); } - for (Set<Window *>::Element *E = transient_children.front(); E; E = E->next()) { - if (E->get()->window_id != DisplayServer::INVALID_WINDOW_ID) { - DisplayServer::get_singleton()->window_set_transient(E->get()->window_id, DisplayServer::INVALID_WINDOW_ID); + for (const Window *E : transient_children) { + if (E->window_id != DisplayServer::INVALID_WINDOW_ID) { + DisplayServer::get_singleton()->window_set_transient(E->window_id, DisplayServer::INVALID_WINDOW_ID); } } diff --git a/scene/main/window.h b/scene/main/window.h index f674f6425a..80dd9a854c 100644 --- a/scene/main/window.h +++ b/scene/main/window.h @@ -131,7 +131,7 @@ private: void _make_transient(); Window *transient_parent = nullptr; Window *exclusive_child = nullptr; - Set<Window *> transient_children; + RBSet<Window *> transient_children; friend class Control; Ref<Theme> theme; diff --git a/scene/multiplayer/multiplayer_spawner.h b/scene/multiplayer/multiplayer_spawner.h index 63948e39a5..ac35df7ff3 100644 --- a/scene/multiplayer/multiplayer_spawner.h +++ b/scene/multiplayer/multiplayer_spawner.h @@ -47,7 +47,7 @@ public: private: TypedArray<PackedScene> spawnable_scenes; - Set<ResourceUID::ID> spawnable_ids; + RBSet<ResourceUID::ID> spawnable_ids; NodePath spawn_path; struct SpawnInfo { diff --git a/scene/multiplayer/scene_cache_interface.cpp b/scene/multiplayer/scene_cache_interface.cpp index a933758946..7c271341db 100644 --- a/scene/multiplayer/scene_cache_interface.cpp +++ b/scene/multiplayer/scene_cache_interface.cpp @@ -132,9 +132,9 @@ void SceneCacheInterface::process_confirm_path(int p_from, const uint8_t *p_pack PathSentCache *psc = path_send_cache.getptr(path); ERR_FAIL_COND_MSG(!psc, "Invalid packet received. Tries to confirm a path which was not found in cache."); - Map<int, bool>::Element *E = psc->confirmed_peers.find(p_from); + HashMap<int, bool>::Iterator E = psc->confirmed_peers.find(p_from); ERR_FAIL_COND_MSG(!E, "Invalid packet received. Source peer was not found in cache for the given path."); - E->get() = true; + E->value = true; } Error SceneCacheInterface::_send_confirm_path(Node *p_node, NodePath p_path, PathSentCache *psc, const List<int> &p_peers) { @@ -182,9 +182,9 @@ Error SceneCacheInterface::_send_confirm_path(Node *p_node, NodePath p_path, Pat bool SceneCacheInterface::is_cache_confirmed(NodePath p_path, int p_peer) { const PathSentCache *psc = path_send_cache.getptr(p_path); ERR_FAIL_COND_V(!psc, false); - const Map<int, bool>::Element *F = psc->confirmed_peers.find(p_peer); + HashMap<int, bool>::ConstIterator F = psc->confirmed_peers.find(p_peer); ERR_FAIL_COND_V(!F, false); // Should never happen. - return F->get(); + return F->value; } bool SceneCacheInterface::send_object_cache(Object *p_obj, NodePath p_path, int p_peer_id, int &r_id) { @@ -205,28 +205,28 @@ bool SceneCacheInterface::send_object_cache(Object *p_obj, NodePath p_path, int if (p_peer_id > 0) { // Fast single peer check. - Map<int, bool>::Element *F = psc->confirmed_peers.find(p_peer_id); + HashMap<int, bool>::Iterator F = psc->confirmed_peers.find(p_peer_id); if (!F) { peers_to_add.push_back(p_peer_id); // Need to also be notified. has_all_peers = false; - } else if (!F->get()) { + } else if (!F->value) { has_all_peers = false; } } else { // Long and painful. - for (const Set<int>::Element *E = multiplayer->get_connected_peers().front(); E; E = E->next()) { - if (p_peer_id < 0 && E->get() == -p_peer_id) { + for (const int &E : multiplayer->get_connected_peers()) { + if (p_peer_id < 0 && E == -p_peer_id) { continue; // Continue, excluded. } - if (p_peer_id > 0 && E->get() != p_peer_id) { + if (p_peer_id > 0 && E != p_peer_id) { continue; // Continue, not for this peer. } - Map<int, bool>::Element *F = psc->confirmed_peers.find(E->get()); + HashMap<int, bool>::Iterator F = psc->confirmed_peers.find(E); if (!F) { - peers_to_add.push_back(E->get()); // Need to also be notified. + peers_to_add.push_back(E); // Need to also be notified. has_all_peers = false; - } else if (!F->get()) { + } else if (!F->value) { has_all_peers = false; } } @@ -242,13 +242,13 @@ bool SceneCacheInterface::send_object_cache(Object *p_obj, NodePath p_path, int Object *SceneCacheInterface::get_cached_object(int p_from, uint32_t p_cache_id) { Node *root_node = SceneTree::get_singleton()->get_root()->get_node(multiplayer->get_root_path()); ERR_FAIL_COND_V(!root_node, nullptr); - Map<int, PathGetCache>::Element *E = path_get_cache.find(p_from); + HashMap<int, PathGetCache>::Iterator E = path_get_cache.find(p_from); ERR_FAIL_COND_V_MSG(!E, nullptr, vformat("No cache found for peer %d.", p_from)); - Map<int, PathGetCache::NodeInfo>::Element *F = E->get().nodes.find(p_cache_id); + HashMap<int, PathGetCache::NodeInfo>::Iterator F = E->value.nodes.find(p_cache_id); ERR_FAIL_COND_V_MSG(!F, nullptr, vformat("ID %d not found in cache of peer %d.", p_cache_id, p_from)); - PathGetCache::NodeInfo *ni = &F->get(); + PathGetCache::NodeInfo *ni = &F->value; Node *node = root_node->get_node(ni->path); if (!node) { ERR_PRINT("Failed to get cached path: " + String(ni->path) + "."); diff --git a/scene/multiplayer/scene_cache_interface.h b/scene/multiplayer/scene_cache_interface.h index d53cf387fb..3116233b5b 100644 --- a/scene/multiplayer/scene_cache_interface.h +++ b/scene/multiplayer/scene_cache_interface.h @@ -41,7 +41,7 @@ private: //path sent caches struct PathSentCache { - Map<int, bool> confirmed_peers; + HashMap<int, bool> confirmed_peers; int id; }; @@ -52,11 +52,11 @@ private: ObjectID instance; }; - Map<int, NodeInfo> nodes; + HashMap<int, NodeInfo> nodes; }; HashMap<NodePath, PathSentCache> path_send_cache; - Map<int, PathGetCache> path_get_cache; + HashMap<int, PathGetCache> path_get_cache; int last_send_cache_id = 1; protected: diff --git a/scene/multiplayer/scene_replication_interface.cpp b/scene/multiplayer/scene_replication_interface.cpp index 63259bcd39..55266c53ad 100644 --- a/scene/multiplayer/scene_replication_interface.cpp +++ b/scene/multiplayer/scene_replication_interface.cpp @@ -316,7 +316,7 @@ Error SceneReplicationInterface::on_despawn_receive(int p_from, const uint8_t *p } void SceneReplicationInterface::_send_sync(int p_peer, uint64_t p_msec) { - const Set<ObjectID> &known = rep_state->get_known_nodes(p_peer); + const RBSet<ObjectID> &known = rep_state->get_known_nodes(p_peer); if (known.is_empty()) { return; } diff --git a/scene/multiplayer/scene_replication_state.cpp b/scene/multiplayer/scene_replication_state.cpp index 9a9b08b67b..e5cc57ff31 100644 --- a/scene/multiplayer/scene_replication_state.cpp +++ b/scene/multiplayer/scene_replication_state.cpp @@ -93,8 +93,8 @@ bool SceneReplicationState::update_sync_time(const ObjectID &p_id, uint64_t p_ms return false; } -const Set<ObjectID> SceneReplicationState::get_known_nodes(int p_peer) { - ERR_FAIL_COND_V(!peers_info.has(p_peer), Set<ObjectID>()); +const RBSet<ObjectID> SceneReplicationState::get_known_nodes(int p_peer) { + ERR_FAIL_COND_V(!peers_info.has(p_peer), RBSet<ObjectID>()); return peers_info[p_peer].known_nodes; } diff --git a/scene/multiplayer/scene_replication_state.h b/scene/multiplayer/scene_replication_state.h index 6ac9265b67..33f72363ac 100644 --- a/scene/multiplayer/scene_replication_state.h +++ b/scene/multiplayer/scene_replication_state.h @@ -62,27 +62,27 @@ private: }; struct PeerInfo { - Set<ObjectID> known_nodes; + RBSet<ObjectID> known_nodes; HashMap<uint32_t, ObjectID> recv_nodes; uint16_t last_sent_sync = 0; uint16_t last_recv_sync = 0; }; - Set<int> known_peers; + RBSet<int> known_peers; uint32_t last_net_id = 0; HashMap<ObjectID, TrackedNode> tracked_nodes; HashMap<int, PeerInfo> peers_info; - Set<ObjectID> spawned_nodes; - Set<ObjectID> path_only_nodes; + RBSet<ObjectID> spawned_nodes; + RBSet<ObjectID> path_only_nodes; TrackedNode &_track(const ObjectID &p_id); void _untrack(const ObjectID &p_id); bool is_tracked(const ObjectID &p_id) const { return tracked_nodes.has(p_id); } public: - const Set<int> get_peers() const { return known_peers; } - const Set<ObjectID> &get_spawned_nodes() const { return spawned_nodes; } - const Set<ObjectID> &get_path_only_nodes() const { return path_only_nodes; } + const RBSet<int> get_peers() const { return known_peers; } + const RBSet<ObjectID> &get_spawned_nodes() const { return spawned_nodes; } + const RBSet<ObjectID> &get_path_only_nodes() const { return path_only_nodes; } MultiplayerSynchronizer *get_synchronizer(const ObjectID &p_id) { return tracked_nodes.has(p_id) ? tracked_nodes[p_id].get_synchronizer() : nullptr; } MultiplayerSpawner *get_spawner(const ObjectID &p_id) { return tracked_nodes.has(p_id) ? tracked_nodes[p_id].get_spawner() : nullptr; } @@ -90,7 +90,7 @@ public: bool update_last_node_sync(const ObjectID &p_id, uint16_t p_time); bool update_sync_time(const ObjectID &p_id, uint64_t p_msec); - const Set<ObjectID> get_known_nodes(int p_peer); + const RBSet<ObjectID> get_known_nodes(int p_peer); uint32_t get_net_id(const ObjectID &p_id) const; void set_net_id(const ObjectID &p_id, uint32_t p_net_id); uint32_t ensure_net_id(const ObjectID &p_id); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 632952c2cb..f70d57291f 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -769,6 +769,7 @@ void register_scene_types() { GDREGISTER_CLASS(PrismMesh); GDREGISTER_CLASS(QuadMesh); GDREGISTER_CLASS(SphereMesh); + GDREGISTER_CLASS(TextMesh); GDREGISTER_CLASS(TubeTrailMesh); GDREGISTER_CLASS(RibbonTrailMesh); GDREGISTER_CLASS(PointMesh); @@ -1076,15 +1077,15 @@ void register_scene_types() { OS::get_singleton()->yield(); // may take time to init for (int i = 0; i < 20; i++) { - GLOBAL_DEF_BASIC(vformat("layer_names/2d_render/layer_%d", i + 1), ""); - GLOBAL_DEF_BASIC(vformat("layer_names/3d_render/layer_%d", i + 1), ""); + GLOBAL_DEF_BASIC(vformat("%s/layer_%d", PNAME("layer_names/2d_render"), i + 1), ""); + GLOBAL_DEF_BASIC(vformat("%s/layer_%d", PNAME("layer_names/3d_render"), i + 1), ""); } for (int i = 0; i < 32; i++) { - GLOBAL_DEF_BASIC(vformat("layer_names/2d_physics/layer_%d", i + 1), ""); - GLOBAL_DEF_BASIC(vformat("layer_names/2d_navigation/layer_%d", i + 1), ""); - GLOBAL_DEF_BASIC(vformat("layer_names/3d_physics/layer_%d", i + 1), ""); - GLOBAL_DEF_BASIC(vformat("layer_names/3d_navigation/layer_%d", i + 1), ""); + GLOBAL_DEF_BASIC(vformat("%s/layer_%d", PNAME("layer_names/2d_physics"), i + 1), ""); + GLOBAL_DEF_BASIC(vformat("%s/layer_%d", PNAME("layer_names/2d_navigation"), i + 1), ""); + GLOBAL_DEF_BASIC(vformat("%s/layer_%d", PNAME("layer_names/3d_physics"), i + 1), ""); + GLOBAL_DEF_BASIC(vformat("%s/layer_%d", PNAME("layer_names/3d_navigation"), i + 1), ""); } if (RenderingServer::get_singleton()) { diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index a26aa10f42..dbbbb72a49 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -3827,7 +3827,7 @@ void Animation::_bind_methods() { ClassDB::bind_method(D_METHOD("compress", "page_size", "fps", "split_tolerance"), &Animation::compress, DEFVAL(8192), DEFVAL(120), DEFVAL(4.0)); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001"), "set_length", "get_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001,suffix:s"), "set_length", "get_length"); ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_mode", PROPERTY_HINT_ENUM, "None,Linear,Ping-Pong"), "set_loop_mode", "get_loop_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step"); diff --git a/scene/resources/animation_library.h b/scene/resources/animation_library.h index 21f0162eb3..7a69cd140a 100644 --- a/scene/resources/animation_library.h +++ b/scene/resources/animation_library.h @@ -43,7 +43,7 @@ class AnimationLibrary : public Resource { TypedArray<StringName> _get_animation_list() const; friend class AnimationPlayer; //for faster access - Map<StringName, Ref<Animation>> animations; + HashMap<StringName, Ref<Animation>> animations; protected: static void _bind_methods(); diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index c2988c2e8c..634fb3ef2f 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -170,8 +170,8 @@ Vector<Vector2> BitMap::_march_square(const Rect2i &rect, const Point2i &start) int curx = startx; int cury = starty; unsigned int count = 0; - Set<Point2i> case9s; - Set<Point2i> case6s; + RBSet<Point2i> case9s; + RBSet<Point2i> case6s; Vector<Vector2> _points; do { int sv = 0; diff --git a/scene/resources/box_shape_3d.cpp b/scene/resources/box_shape_3d.cpp index 1abbf366fd..aac334b4be 100644 --- a/scene/resources/box_shape_3d.cpp +++ b/scene/resources/box_shape_3d.cpp @@ -91,7 +91,7 @@ void BoxShape3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_size", "size"), &BoxShape3D::set_size); ClassDB::bind_method(D_METHOD("get_size"), &BoxShape3D::get_size); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size", PROPERTY_HINT_NONE, "suffix:m"), "set_size", "get_size"); } BoxShape3D::BoxShape3D() : diff --git a/scene/resources/camera_effects.cpp b/scene/resources/camera_effects.cpp index ebe2aa4dba..97617adbae 100644 --- a/scene/resources/camera_effects.cpp +++ b/scene/resources/camera_effects.cpp @@ -175,10 +175,10 @@ void CameraEffects::_bind_methods() { ADD_GROUP("DOF Blur", "dof_blur_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dof_blur_far_enabled"), "set_dof_blur_far_enabled", "is_dof_blur_far_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_distance", PROPERTY_HINT_RANGE, "0.01,8192,0.01,exp"), "set_dof_blur_far_distance", "get_dof_blur_far_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_distance", PROPERTY_HINT_RANGE, "0.01,8192,0.01,exp,suffix:m"), "set_dof_blur_far_distance", "get_dof_blur_far_distance"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_transition", PROPERTY_HINT_RANGE, "0.01,8192,0.01,exp"), "set_dof_blur_far_transition", "get_dof_blur_far_transition"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dof_blur_near_enabled"), "set_dof_blur_near_enabled", "is_dof_blur_near_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_distance", PROPERTY_HINT_RANGE, "0.01,8192,0.01,exp"), "set_dof_blur_near_distance", "get_dof_blur_near_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_distance", PROPERTY_HINT_RANGE, "0.01,8192,0.01,exp,suffix:m"), "set_dof_blur_near_distance", "get_dof_blur_near_distance"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_transition", PROPERTY_HINT_RANGE, "0.01,8192,0.01,exp"), "set_dof_blur_near_transition", "get_dof_blur_near_transition"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dof_blur_amount", "get_dof_blur_amount"); diff --git a/scene/resources/canvas_item_material.cpp b/scene/resources/canvas_item_material.cpp index 2d668cdf7f..aa6cc4aded 100644 --- a/scene/resources/canvas_item_material.cpp +++ b/scene/resources/canvas_item_material.cpp @@ -34,7 +34,7 @@ Mutex CanvasItemMaterial::material_mutex; SelfList<CanvasItemMaterial>::List *CanvasItemMaterial::dirty_materials = nullptr; -Map<CanvasItemMaterial::MaterialKey, CanvasItemMaterial::ShaderData> CanvasItemMaterial::shader_map; +HashMap<CanvasItemMaterial::MaterialKey, CanvasItemMaterial::ShaderData, CanvasItemMaterial::MaterialKey> CanvasItemMaterial::shader_map; CanvasItemMaterial::ShaderNames *CanvasItemMaterial::shader_names = nullptr; void CanvasItemMaterial::init_shaders() { diff --git a/scene/resources/canvas_item_material.h b/scene/resources/canvas_item_material.h index b097d174f0..7c44c125a8 100644 --- a/scene/resources/canvas_item_material.h +++ b/scene/resources/canvas_item_material.h @@ -63,8 +63,11 @@ private: uint32_t key = 0; - bool operator<(const MaterialKey &p_key) const { - return key < p_key.key; + static uint32_t hash(const MaterialKey &p_key) { + return hash_djb2_one_32(p_key.key); + } + bool operator==(const MaterialKey &p_key) const { + return key == p_key.key; } }; @@ -81,7 +84,7 @@ private: int users = 0; }; - static Map<MaterialKey, ShaderData> shader_map; + static HashMap<MaterialKey, ShaderData, MaterialKey> shader_map; MaterialKey current_key; diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp index c7bd4cb698..eb27ffaf35 100644 --- a/scene/resources/capsule_shape_2d.cpp +++ b/scene/resources/capsule_shape_2d.cpp @@ -109,8 +109,8 @@ void CapsuleShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_height", "height"), &CapsuleShape2D::set_height); ClassDB::bind_method(D_METHOD("get_height"), &CapsuleShape2D::get_height); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:px"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:px"), "set_height", "get_height"); ADD_LINKED_PROPERTY("radius", "height"); ADD_LINKED_PROPERTY("height", "radius"); } diff --git a/scene/resources/capsule_shape_3d.cpp b/scene/resources/capsule_shape_3d.cpp index d708706ff2..214004824f 100644 --- a/scene/resources/capsule_shape_3d.cpp +++ b/scene/resources/capsule_shape_3d.cpp @@ -113,8 +113,8 @@ void CapsuleShape3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_height", "height"), &CapsuleShape3D::set_height); ClassDB::bind_method(D_METHOD("get_height"), &CapsuleShape3D::get_height); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater,suffix:m"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater,suffix:m"), "set_height", "get_height"); ADD_LINKED_PROPERTY("radius", "height"); ADD_LINKED_PROPERTY("height", "radius"); } diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp index c287de9ede..ff60162180 100644 --- a/scene/resources/circle_shape_2d.cpp +++ b/scene/resources/circle_shape_2d.cpp @@ -56,7 +56,7 @@ void CircleShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_radius", "radius"), &CircleShape2D::set_radius); ClassDB::bind_method(D_METHOD("get_radius"), &CircleShape2D::get_radius); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:px"), "set_radius", "get_radius"); } Rect2 CircleShape2D::get_rect() const { diff --git a/scene/resources/concave_polygon_shape_3d.cpp b/scene/resources/concave_polygon_shape_3d.cpp index 3e178108c4..081271c2fc 100644 --- a/scene/resources/concave_polygon_shape_3d.cpp +++ b/scene/resources/concave_polygon_shape_3d.cpp @@ -33,7 +33,7 @@ #include "servers/physics_server_3d.h" Vector<Vector3> ConcavePolygonShape3D::get_debug_mesh_lines() const { - Set<DrawEdge> edges; + RBSet<DrawEdge> edges; int index_count = faces.size(); ERR_FAIL_COND_V((index_count % 3) != 0, Vector<Vector3>()); @@ -50,9 +50,9 @@ Vector<Vector3> ConcavePolygonShape3D::get_debug_mesh_lines() const { Vector<Vector3> points; points.resize(edges.size() * 2); int idx = 0; - for (Set<DrawEdge>::Element *E = edges.front(); E; E = E->next()) { - points.write[idx + 0] = E->get().a; - points.write[idx + 1] = E->get().b; + for (const DrawEdge &E : edges) { + points.write[idx + 0] = E.a; + points.write[idx + 1] = E.b; idx += 2; } diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index c719455a0a..c99f71b13e 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -49,6 +49,18 @@ const char *Curve::SIGNAL_RANGE_CHANGED = "range_changed"; Curve::Curve() { } +void Curve::set_point_count(int p_count) { + ERR_FAIL_COND(p_count < 0); + if (_points.size() >= p_count) { + _points.resize(p_count); + mark_dirty(); + } else { + for (int i = p_count - _points.size(); i > 0; i--) { + add_point(Vector2()); + } + } +} + int Curve::add_point(Vector2 p_position, real_t p_left_tangent, real_t p_right_tangent, TangentMode p_left_mode, TangentMode p_right_mode) { // Add a point and preserve order @@ -358,6 +370,7 @@ real_t Curve::interpolate_local_nocheck(int p_index, real_t p_local_offset) cons void Curve::mark_dirty() { _baked_cache_dirty = true; emit_signal(CoreStringNames::get_singleton()->changed); + notify_property_list_changed(); } Array Curve::get_data() const { @@ -409,7 +422,6 @@ void Curve::set_data(const Array p_input) { p.position = p_input[i]; p.left_tangent = p_input[i + 1]; p.right_tangent = p_input[i + 2]; - // TODO For some reason the compiler won't convert from Variant to enum int left_mode = p_input[i + 3]; int right_mode = p_input[i + 4]; p.left_mode = (TangentMode)left_mode; @@ -490,8 +502,91 @@ void Curve::ensure_default_setup(real_t p_min, real_t p_max) { } } +bool Curve::_set(const StringName &p_name, const Variant &p_value) { + Vector<String> components = String(p_name).split("/", true, 2); + if (components.size() >= 2 && components[0].begins_with("point_") && components[0].trim_prefix("point_").is_valid_int()) { + int point_index = components[0].trim_prefix("point_").to_int(); + String property = components[1]; + if (property == "position") { + Vector2 position = p_value.operator Vector2(); + set_point_offset(point_index, position.x); + set_point_value(point_index, position.y); + return true; + } else if (property == "left_tangent") { + set_point_left_tangent(point_index, p_value); + return true; + } else if (property == "left_mode") { + int mode = p_value; + set_point_left_mode(point_index, (TangentMode)mode); + return true; + } else if (property == "right_tangent") { + set_point_right_tangent(point_index, p_value); + return true; + } else if (property == "right_mode") { + int mode = p_value; + set_point_right_mode(point_index, (TangentMode)mode); + return true; + } + } + return false; +} + +bool Curve::_get(const StringName &p_name, Variant &r_ret) const { + Vector<String> components = String(p_name).split("/", true, 2); + if (components.size() >= 2 && components[0].begins_with("point_") && components[0].trim_prefix("point_").is_valid_int()) { + int point_index = components[0].trim_prefix("point_").to_int(); + String property = components[1]; + if (property == "position") { + r_ret = get_point_position(point_index); + return true; + } else if (property == "left_tangent") { + r_ret = get_point_left_tangent(point_index); + return true; + } else if (property == "left_mode") { + r_ret = get_point_left_mode(point_index); + return true; + } else if (property == "right_tangent") { + r_ret = get_point_right_tangent(point_index); + return true; + } else if (property == "right_mode") { + r_ret = get_point_right_mode(point_index); + return true; + } + } + return false; +} + +void Curve::_get_property_list(List<PropertyInfo> *p_list) const { + for (int i = 0; i < _points.size(); i++) { + PropertyInfo pi = PropertyInfo(Variant::VECTOR2, vformat("point_%d/position", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + + if (i != 0) { + pi = PropertyInfo(Variant::FLOAT, vformat("point_%d/left_tangent", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + + pi = PropertyInfo(Variant::INT, vformat("point_%d/left_mode", i), PROPERTY_HINT_ENUM, "Free,Linear"); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + } + + if (i != _points.size() - 1) { + pi = PropertyInfo(Variant::FLOAT, vformat("point_%d/right_tangent", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + + pi = PropertyInfo(Variant::INT, vformat("point_%d/right_mode", i), PROPERTY_HINT_ENUM, "Free,Linear"); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + } + } +} + void Curve::_bind_methods() { ClassDB::bind_method(D_METHOD("get_point_count"), &Curve::get_point_count); + ClassDB::bind_method(D_METHOD("set_point_count", "count"), &Curve::set_point_count); ClassDB::bind_method(D_METHOD("add_point", "position", "left_tangent", "right_tangent", "left_mode", "right_mode"), &Curve::add_point, DEFVAL(0), DEFVAL(0), DEFVAL(TANGENT_FREE), DEFVAL(TANGENT_FREE)); ClassDB::bind_method(D_METHOD("remove_point", "index"), &Curve::remove_point); ClassDB::bind_method(D_METHOD("clear_points"), &Curve::clear_points); @@ -523,6 +618,7 @@ void Curve::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_max_value", "get_max_value"); ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_resolution", PROPERTY_HINT_RANGE, "1,1000,1"), "set_bake_resolution", "get_bake_resolution"); ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); + ADD_ARRAY_COUNT("Points", "point_count", "set_point_count", "get_point_count", "point_"); ADD_SIGNAL(MethodInfo(SIGNAL_RANGE_CHANGED)); @@ -535,6 +631,20 @@ int Curve2D::get_point_count() const { return points.size(); } +void Curve2D::set_point_count(int p_count) { + ERR_FAIL_COND(p_count < 0); + if (points.size() >= p_count) { + points.resize(p_count); + mark_dirty(); + baked_cache_dirty = true; + emit_signal(CoreStringNames::get_singleton()->changed); + } else { + for (int i = p_count - points.size(); i > 0; i--) { + add_point(Vector2()); + } + } +} + void Curve2D::add_point(const Vector2 &p_position, const Vector2 &p_in, const Vector2 &p_out, int p_atpos) { Point n; n.position = p_position; @@ -546,16 +656,14 @@ void Curve2D::add_point(const Vector2 &p_position, const Vector2 &p_in, const Ve points.push_back(n); } - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } void Curve2D::set_point_position(int p_index, const Vector2 &p_position) { ERR_FAIL_INDEX(p_index, points.size()); points.write[p_index].position = p_position; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } Vector2 Curve2D::get_point_position(int p_index) const { @@ -567,8 +675,7 @@ void Curve2D::set_point_in(int p_index, const Vector2 &p_in) { ERR_FAIL_INDEX(p_index, points.size()); points.write[p_index].in = p_in; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } Vector2 Curve2D::get_point_in(int p_index) const { @@ -580,8 +687,7 @@ void Curve2D::set_point_out(int p_index, const Vector2 &p_out) { ERR_FAIL_INDEX(p_index, points.size()); points.write[p_index].out = p_out; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } Vector2 Curve2D::get_point_out(int p_index) const { @@ -592,15 +698,13 @@ Vector2 Curve2D::get_point_out(int p_index) const { void Curve2D::remove_point(int p_index) { ERR_FAIL_INDEX(p_index, points.size()); points.remove_at(p_index); - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } void Curve2D::clear_points() { if (!points.is_empty()) { points.clear(); - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } } @@ -632,7 +736,13 @@ Vector2 Curve2D::interpolatef(real_t p_findex) const { return interpolate((int)p_findex, Math::fmod(p_findex, (real_t)1.0)); } -void Curve2D::_bake_segment2d(Map<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const { +void Curve2D::mark_dirty() { + baked_cache_dirty = true; + emit_signal(CoreStringNames::get_singleton()->changed); + notify_property_list_changed(); +} + +void Curve2D::_bake_segment2d(RBMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const { real_t mp = p_begin + (p_end - p_begin) * 0.5; Vector2 beg = _bezier_interp(p_begin, p_a, p_a + p_out, p_b + p_in, p_b); Vector2 mid = _bezier_interp(mp, p_a, p_a + p_out, p_b + p_in, p_b); @@ -825,8 +935,7 @@ PackedVector2Array Curve2D::get_baked_points() const { void Curve2D::set_bake_interval(real_t p_tolerance) { bake_interval = p_tolerance; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } real_t Curve2D::get_bake_interval() const { @@ -954,7 +1063,9 @@ PackedVector2Array Curve2D::tessellate(int p_max_stages, real_t p_tolerance) con if (points.size() == 0) { return tess; } - Vector<Map<real_t, Vector2>> midpoints; + + // The current implementation requires a sorted map. + Vector<RBMap<real_t, Vector2>> midpoints; midpoints.resize(points.size() - 1); @@ -983,8 +1094,67 @@ PackedVector2Array Curve2D::tessellate(int p_max_stages, real_t p_tolerance) con return tess; } +bool Curve2D::_set(const StringName &p_name, const Variant &p_value) { + Vector<String> components = String(p_name).split("/", true, 2); + if (components.size() >= 2 && components[0].begins_with("point_") && components[0].trim_prefix("point_").is_valid_int()) { + int point_index = components[0].trim_prefix("point_").to_int(); + String property = components[1]; + if (property == "position") { + set_point_position(point_index, p_value); + return true; + } else if (property == "in") { + set_point_in(point_index, p_value); + return true; + } else if (property == "out") { + set_point_out(point_index, p_value); + return true; + } + } + return false; +} + +bool Curve2D::_get(const StringName &p_name, Variant &r_ret) const { + Vector<String> components = String(p_name).split("/", true, 2); + if (components.size() >= 2 && components[0].begins_with("point_") && components[0].trim_prefix("point_").is_valid_int()) { + int point_index = components[0].trim_prefix("point_").to_int(); + String property = components[1]; + if (property == "position") { + r_ret = get_point_position(point_index); + return true; + } else if (property == "in") { + r_ret = get_point_in(point_index); + return true; + } else if (property == "out") { + r_ret = get_point_out(point_index); + return true; + } + } + return false; +} + +void Curve2D::_get_property_list(List<PropertyInfo> *p_list) const { + for (int i = 0; i < points.size(); i++) { + PropertyInfo pi = PropertyInfo(Variant::VECTOR2, vformat("point_%d/position", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + + if (i != 0) { + pi = PropertyInfo(Variant::VECTOR2, vformat("point_%d/in", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + } + + if (i != points.size() - 1) { + pi = PropertyInfo(Variant::VECTOR2, vformat("point_%d/out", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + } + } +} + void Curve2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_point_count"), &Curve2D::get_point_count); + ClassDB::bind_method(D_METHOD("set_point_count", "count"), &Curve2D::set_point_count); ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "at_position"), &Curve2D::add_point, DEFVAL(Vector2()), DEFVAL(Vector2()), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("set_point_position", "idx", "position"), &Curve2D::set_point_position); ClassDB::bind_method(D_METHOD("get_point_position", "idx"), &Curve2D::get_point_position); @@ -1012,6 +1182,7 @@ void Curve2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval"); ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); + ADD_ARRAY_COUNT("Points", "point_count", "set_point_count", "get_point_count", "point_"); } Curve2D::Curve2D() {} @@ -1027,6 +1198,18 @@ int Curve3D::get_point_count() const { return points.size(); } +void Curve3D::set_point_count(int p_count) { + ERR_FAIL_COND(p_count < 0); + if (points.size() >= p_count) { + points.resize(p_count); + mark_dirty(); + } else { + for (int i = p_count - points.size(); i > 0; i--) { + add_point(Vector3()); + } + } +} + void Curve3D::add_point(const Vector3 &p_position, const Vector3 &p_in, const Vector3 &p_out, int p_atpos) { Point n; n.position = p_position; @@ -1038,16 +1221,14 @@ void Curve3D::add_point(const Vector3 &p_position, const Vector3 &p_in, const Ve points.push_back(n); } - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } void Curve3D::set_point_position(int p_index, const Vector3 &p_position) { ERR_FAIL_INDEX(p_index, points.size()); points.write[p_index].position = p_position; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } Vector3 Curve3D::get_point_position(int p_index) const { @@ -1059,8 +1240,7 @@ void Curve3D::set_point_tilt(int p_index, real_t p_tilt) { ERR_FAIL_INDEX(p_index, points.size()); points.write[p_index].tilt = p_tilt; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } real_t Curve3D::get_point_tilt(int p_index) const { @@ -1072,8 +1252,7 @@ void Curve3D::set_point_in(int p_index, const Vector3 &p_in) { ERR_FAIL_INDEX(p_index, points.size()); points.write[p_index].in = p_in; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } Vector3 Curve3D::get_point_in(int p_index) const { @@ -1085,8 +1264,7 @@ void Curve3D::set_point_out(int p_index, const Vector3 &p_out) { ERR_FAIL_INDEX(p_index, points.size()); points.write[p_index].out = p_out; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } Vector3 Curve3D::get_point_out(int p_index) const { @@ -1097,15 +1275,13 @@ Vector3 Curve3D::get_point_out(int p_index) const { void Curve3D::remove_point(int p_index) { ERR_FAIL_INDEX(p_index, points.size()); points.remove_at(p_index); - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } void Curve3D::clear_points() { if (!points.is_empty()) { points.clear(); - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } } @@ -1137,7 +1313,13 @@ Vector3 Curve3D::interpolatef(real_t p_findex) const { return interpolate((int)p_findex, Math::fmod(p_findex, (real_t)1.0)); } -void Curve3D::_bake_segment3d(Map<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const { +void Curve3D::mark_dirty() { + baked_cache_dirty = true; + emit_signal(CoreStringNames::get_singleton()->changed); + notify_property_list_changed(); +} + +void Curve3D::_bake_segment3d(RBMap<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const { real_t mp = p_begin + (p_end - p_begin) * 0.5; Vector3 beg = _bezier_interp(p_begin, p_a, p_a + p_out, p_b + p_in, p_b); Vector3 mid = _bezier_interp(mp, p_a, p_a + p_out, p_b + p_in, p_b); @@ -1599,8 +1781,7 @@ real_t Curve3D::get_closest_offset(const Vector3 &p_to_point) const { void Curve3D::set_bake_interval(real_t p_tolerance) { bake_interval = p_tolerance; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } real_t Curve3D::get_bake_interval() const { @@ -1609,8 +1790,7 @@ real_t Curve3D::get_bake_interval() const { void Curve3D::set_up_vector_enabled(bool p_enable) { up_vector_enabled = p_enable; - baked_cache_dirty = true; - emit_signal(CoreStringNames::get_singleton()->changed); + mark_dirty(); } bool Curve3D::is_up_vector_enabled() const { @@ -1668,7 +1848,7 @@ PackedVector3Array Curve3D::tessellate(int p_max_stages, real_t p_tolerance) con if (points.size() == 0) { return tess; } - Vector<Map<real_t, Vector3>> midpoints; + Vector<RBMap<real_t, Vector3>> midpoints; midpoints.resize(points.size() - 1); @@ -1697,8 +1877,77 @@ PackedVector3Array Curve3D::tessellate(int p_max_stages, real_t p_tolerance) con return tess; } +bool Curve3D::_set(const StringName &p_name, const Variant &p_value) { + Vector<String> components = String(p_name).split("/", true, 2); + if (components.size() >= 2 && components[0].begins_with("point_") && components[0].trim_prefix("point_").is_valid_int()) { + int point_index = components[0].trim_prefix("point_").to_int(); + String property = components[1]; + if (property == "position") { + set_point_position(point_index, p_value); + return true; + } else if (property == "in") { + set_point_in(point_index, p_value); + return true; + } else if (property == "out") { + set_point_out(point_index, p_value); + return true; + } else if (property == "tilt") { + set_point_tilt(point_index, p_value); + return true; + } + } + return false; +} + +bool Curve3D::_get(const StringName &p_name, Variant &r_ret) const { + Vector<String> components = String(p_name).split("/", true, 2); + if (components.size() >= 2 && components[0].begins_with("point_") && components[0].trim_prefix("point_").is_valid_int()) { + int point_index = components[0].trim_prefix("point_").to_int(); + String property = components[1]; + if (property == "position") { + r_ret = get_point_position(point_index); + return true; + } else if (property == "in") { + r_ret = get_point_in(point_index); + return true; + } else if (property == "out") { + r_ret = get_point_out(point_index); + return true; + } else if (property == "tilt") { + r_ret = get_point_tilt(point_index); + return true; + } + } + return false; +} + +void Curve3D::_get_property_list(List<PropertyInfo> *p_list) const { + for (int i = 0; i < points.size(); i++) { + PropertyInfo pi = PropertyInfo(Variant::VECTOR3, vformat("point_%d/position", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + + if (i != 0) { + pi = PropertyInfo(Variant::VECTOR3, vformat("point_%d/in", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + } + + if (i != points.size() - 1) { + pi = PropertyInfo(Variant::VECTOR3, vformat("point_%d/out", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + } + + pi = PropertyInfo(Variant::FLOAT, vformat("point_%d/tilt", i)); + pi.usage &= ~PROPERTY_USAGE_STORAGE; + p_list->push_back(pi); + } +} + void Curve3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_point_count"), &Curve3D::get_point_count); + ClassDB::bind_method(D_METHOD("set_point_count", "count"), &Curve3D::set_point_count); ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "at_position"), &Curve3D::add_point, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("set_point_position", "idx", "position"), &Curve3D::set_point_position); ClassDB::bind_method(D_METHOD("get_point_position", "idx"), &Curve3D::get_point_position); @@ -1733,6 +1982,7 @@ void Curve3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval"); ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); + ADD_ARRAY_COUNT("Points", "point_count", "set_point_count", "get_point_count", "point_"); ADD_GROUP("Up Vector", "up_vector_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "up_vector_enabled"), "set_up_vector_enabled", "is_up_vector_enabled"); diff --git a/scene/resources/curve.h b/scene/resources/curve.h index 767900b843..834e7ffa07 100644 --- a/scene/resources/curve.h +++ b/scene/resources/curve.h @@ -76,6 +76,8 @@ public: int get_point_count() const { return _points.size(); } + void set_point_count(int p_count); + int add_point(Vector2 p_position, real_t left_tangent = 0, real_t right_tangent = 0, @@ -126,6 +128,10 @@ public: void ensure_default_setup(real_t p_min, real_t p_max); + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; + protected: static void _bind_methods(); @@ -164,19 +170,26 @@ class Curve2D : public Resource { mutable Vector<real_t> baked_dist_cache; mutable real_t baked_max_ofs = 0.0; + void mark_dirty(); + void _bake() const; real_t bake_interval = 5.0; - void _bake_segment2d(Map<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const; + void _bake_segment2d(RBMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const; Dictionary _get_data() const; void _set_data(const Dictionary &p_data); + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; + protected: static void _bind_methods(); public: int get_point_count() const; + void set_point_count(int p_count); void add_point(const Vector2 &p_position, const Vector2 &p_in = Vector2(), const Vector2 &p_out = Vector2(), int p_atpos = -1); void set_point_position(int p_index, const Vector2 &p_position); Vector2 get_point_position(int p_index) const; @@ -228,20 +241,27 @@ class Curve3D : public Resource { mutable Vector<real_t> baked_dist_cache; mutable real_t baked_max_ofs = 0.0; + void mark_dirty(); + void _bake() const; real_t bake_interval = 0.2; bool up_vector_enabled = true; - void _bake_segment3d(Map<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const; + void _bake_segment3d(RBMap<real_t, Vector3> &r_bake, real_t p_begin, real_t p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, real_t p_tol) const; Dictionary _get_data() const; void _set_data(const Dictionary &p_data); + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; + protected: static void _bind_methods(); public: int get_point_count() const; + void set_point_count(int p_count); void add_point(const Vector3 &p_position, const Vector3 &p_in = Vector3(), const Vector3 &p_out = Vector3(), int p_atpos = -1); void set_point_position(int p_index, const Vector3 &p_position); Vector3 get_point_position(int p_index) const; diff --git a/scene/resources/cylinder_shape_3d.cpp b/scene/resources/cylinder_shape_3d.cpp index a1fe5c46fb..345df5ffed 100644 --- a/scene/resources/cylinder_shape_3d.cpp +++ b/scene/resources/cylinder_shape_3d.cpp @@ -100,8 +100,8 @@ void CylinderShape3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_height", "height"), &CylinderShape3D::set_height); ClassDB::bind_method(D_METHOD("get_height"), &CylinderShape3D::get_height); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), "set_height", "get_height"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater,suffix:m"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater,suffix:m"), "set_radius", "get_radius"); } CylinderShape3D::CylinderShape3D() : diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 271cf61171..0c2999a700 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -686,6 +686,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const graphnode_breakpoint->set_border_color(Color(0.9, 0.29, 0.3)); Ref<StyleBoxFlat> graphnode_position = make_flat_stylebox(style_pressed_color, 18, 42, 18, 12, 6, true, 4); graphnode_position->set_border_color(Color(0.98, 0.89, 0.27)); + Ref<StyleBoxEmpty> graphnode_slot = make_empty_stylebox(0, 0, 0, 0); theme->set_stylebox("frame", "GraphNode", graphnode_normal); theme->set_stylebox("selected_frame", "GraphNode", graphnode_selected); @@ -693,6 +694,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_stylebox("comment_focus", "GraphNode", graphnode_comment_selected); theme->set_stylebox("breakpoint", "GraphNode", graphnode_breakpoint); theme->set_stylebox("position", "GraphNode", graphnode_position); + theme->set_stylebox("slot", "GraphNode", graphnode_slot); theme->set_icon("port", "GraphNode", icons["graph_port"]); theme->set_icon("close", "GraphNode", icons["close"]); @@ -704,6 +706,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("separation", "GraphNode", 2 * scale); theme->set_constant("title_offset", "GraphNode", 26 * scale); theme->set_constant("close_offset", "GraphNode", 22 * scale); + theme->set_constant("close_h_offset", "GraphNode", 22 * scale); theme->set_constant("port_offset", "GraphNode", 0); // Tree @@ -1066,6 +1069,7 @@ void make_default_theme(float p_scale, Ref<Font> p_font, TextServer::SubpixelPos bold_font.instantiate(); for (int i = 0; i < default_font->get_data_count(); i++) { Ref<FontData> data = default_font->get_data(i)->duplicate(); + // Try to match OpenSans ExtraBold. data->set_embolden(1.2); bold_font->add_data(data); } @@ -1073,15 +1077,17 @@ void make_default_theme(float p_scale, Ref<Font> p_font, TextServer::SubpixelPos bold_italics_font.instantiate(); for (int i = 0; i < default_font->get_data_count(); i++) { Ref<FontData> data = default_font->get_data(i)->duplicate(); + // Try to match OpenSans ExtraBold Italic. data->set_embolden(1.2); - data->set_transform(Transform2D(1.0, 0.4, 0.0, 1.0, 0.0, 0.0)); + data->set_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0)); bold_italics_font->add_data(data); } italics_font.instantiate(); for (int i = 0; i < default_font->get_data_count(); i++) { Ref<FontData> data = default_font->get_data(i)->duplicate(); - data->set_transform(Transform2D(1.0, 0.4, 0.0, 1.0, 0.0, 0.0)); + // Try to match OpenSans Italic. + data->set_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0)); italics_font->add_data(data); } } diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 5d1e07f6cd..8d515eca09 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -1178,7 +1178,7 @@ void Environment::_bind_methods() { ADD_GROUP("Sky", "sky_"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "sky", PROPERTY_HINT_RESOURCE_TYPE, "Sky"), "set_sky", "get_sky"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_sky_custom_fov", "get_sky_custom_fov"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1,degrees"), "set_sky_custom_fov", "get_sky_custom_fov"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "sky_rotation"), "set_sky_rotation", "get_sky_rotation"); // Ambient light diff --git a/scene/resources/font.h b/scene/resources/font.h index 9a90032605..96bfe3678b 100644 --- a/scene/resources/font.h +++ b/scene/resources/font.h @@ -33,7 +33,7 @@ #include "core/io/resource.h" #include "core/templates/lru.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "scene/resources/texture.h" #include "servers/text_server.h" diff --git a/scene/resources/importer_mesh.cpp b/scene/resources/importer_mesh.cpp index cca875f708..0fbd29b1a6 100644 --- a/scene/resources/importer_mesh.cpp +++ b/scene/resources/importer_mesh.cpp @@ -306,7 +306,7 @@ void ImporterMesh::generate_lods(float p_normal_merge_angle, float p_normal_spli float normal_split_threshold = Math::cos(Math::deg2rad(p_normal_split_angle)); const Vector3 *normals_ptr = normals.ptr(); - Map<Vector3, LocalVector<Pair<int, int>>> unique_vertices; + HashMap<Vector3, LocalVector<Pair<int, int>>> unique_vertices; LocalVector<int> vertex_remap; LocalVector<int> vertex_inverse_remap; @@ -320,10 +320,10 @@ void ImporterMesh::generate_lods(float p_normal_merge_angle, float p_normal_spli const Vector3 &v = vertices_ptr[j]; const Vector3 &n = normals_ptr[j]; - Map<Vector3, LocalVector<Pair<int, int>>>::Element *E = unique_vertices.find(v); + HashMap<Vector3, LocalVector<Pair<int, int>>>::Iterator E = unique_vertices.find(v); if (E) { - const LocalVector<Pair<int, int>> &close_verts = E->get(); + const LocalVector<Pair<int, int>> &close_verts = E->value; bool found = false; for (unsigned int k = 0; k < close_verts.size(); k++) { @@ -706,15 +706,15 @@ void ImporterMesh::create_shadow_mesh() { Vector<Vector3> vertices = surfaces[i].arrays[RS::ARRAY_VERTEX]; int vertex_count = vertices.size(); { - Map<Vector3, int> unique_vertices; + HashMap<Vector3, int> unique_vertices; const Vector3 *vptr = vertices.ptr(); for (int j = 0; j < vertex_count; j++) { const Vector3 &v = vptr[j]; - Map<Vector3, int>::Element *E = unique_vertices.find(v); + HashMap<Vector3, int>::Iterator E = unique_vertices.find(v); if (E) { - vertex_remap.push_back(E->get()); + vertex_remap.push_back(E->value); } else { int vcount = unique_vertices.size(); unique_vertices[v] = vcount; @@ -898,16 +898,16 @@ Vector<Ref<Shape3D>> ImporterMesh::convex_decompose(const Mesh::ConvexDecomposit Vector<uint32_t> indices; indices.resize(face_count * 3); { - Map<Vector3, uint32_t> vertex_map; + HashMap<Vector3, uint32_t> vertex_map; Vector3 *vertex_w = vertices.ptrw(); uint32_t *index_w = indices.ptrw(); for (int i = 0; i < face_count; i++) { for (int j = 0; j < 3; j++) { const Vector3 &vertex = faces[i].vertex[j]; - Map<Vector3, uint32_t>::Element *found_vertex = vertex_map.find(vertex); + HashMap<Vector3, uint32_t>::Iterator found_vertex = vertex_map.find(vertex); uint32_t index; if (found_vertex) { - index = found_vertex->get(); + index = found_vertex->value; } else { index = ++vertex_count; vertex_map[vertex] = index; @@ -960,7 +960,7 @@ Ref<NavigationMesh> ImporterMesh::create_navigation_mesh() { return Ref<NavigationMesh>(); } - Map<Vector3, int> unique_vertices; + HashMap<Vector3, int> unique_vertices; LocalVector<int> face_indices; for (int i = 0; i < faces.size(); i++) { diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 27e1590940..b8171ca4bd 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -187,9 +187,9 @@ bool ShaderMaterial::_get(const StringName &p_name, Variant &r_ret) const { } if (pr) { - const Map<StringName, Variant>::Element *E = param_cache.find(pr); + HashMap<StringName, Variant>::ConstIterator E = param_cache.find(pr); if (E) { - r_ret = E->get(); + r_ret = E->value; } else { r_ret = Variant(); } @@ -348,7 +348,7 @@ ShaderMaterial::~ShaderMaterial() { Mutex BaseMaterial3D::material_mutex; SelfList<BaseMaterial3D>::List *BaseMaterial3D::dirty_materials = nullptr; -Map<BaseMaterial3D::MaterialKey, BaseMaterial3D::ShaderData> BaseMaterial3D::shader_map; +HashMap<BaseMaterial3D::MaterialKey, BaseMaterial3D::ShaderData, BaseMaterial3D::MaterialKey> BaseMaterial3D::shader_map; BaseMaterial3D::ShaderNames *BaseMaterial3D::shader_names = nullptr; void BaseMaterial3D::init_shaders() { @@ -1788,8 +1788,6 @@ void BaseMaterial3D::_validate_property(PropertyInfo &property) const { _validate_high_end("refraction", property); _validate_high_end("subsurf_scatter", property); - _validate_high_end("anisotropy", property); - _validate_high_end("clearcoat", property); _validate_high_end("heightmap", property); if (property.name.begins_with("particles_anim_") && billboard_mode != BILLBOARD_PARTICLES) { diff --git a/scene/resources/material.h b/scene/resources/material.h index 7edb8b7317..b845fd68c8 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -82,7 +82,7 @@ class ShaderMaterial : public Material { GDCLASS(ShaderMaterial, Material); Ref<Shader> shader; - Map<StringName, Variant> param_cache; + HashMap<StringName, Variant> param_cache; protected: bool _set(const StringName &p_name, const Variant &p_value); @@ -323,6 +323,9 @@ private: memset(this, 0, sizeof(MaterialKey)); } + static uint32_t hash(const MaterialKey &p_key) { + return hash_djb2_buffer((const uint8_t *)&p_key, sizeof(MaterialKey)); + } bool operator==(const MaterialKey &p_key) const { return memcmp(this, &p_key, sizeof(MaterialKey)) == 0; } @@ -337,7 +340,7 @@ private: int users = 0; }; - static Map<MaterialKey, ShaderData> shader_map; + static HashMap<MaterialKey, ShaderData, MaterialKey> shader_map; MaterialKey current_key; diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 253ba53c35..ab1873ffe9 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -455,7 +455,7 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { has_indices = true; } - Map<Vector3, Vector3> normal_accum; + HashMap<Vector3, Vector3> normal_accum; //fill normals with triangle normals for (int i = 0; i < vc; i += 3) { @@ -474,13 +474,13 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { Vector3 n = Plane(t[0], t[1], t[2]).normal; for (int j = 0; j < 3; j++) { - Map<Vector3, Vector3>::Element *E = normal_accum.find(t[j]); + HashMap<Vector3, Vector3>::Iterator E = normal_accum.find(t[j]); if (!E) { normal_accum[t[j]] = n; } else { - float d = n.dot(E->get()); + float d = n.dot(E->value); if (d < 1.0) { - E->get() += n * (1.0 - d); + E->value += n * (1.0 - d); } //E->get()+=n; } @@ -499,10 +499,10 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const { for (int i = 0; i < vc2; i++) { Vector3 t = r[i]; - Map<Vector3, Vector3>::Element *E = normal_accum.find(t); + HashMap<Vector3, Vector3>::Iterator E = normal_accum.find(t); ERR_CONTINUE(!E); - t += E->get() * p_margin; + t += E->value * p_margin; r[i] = t; } diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp index 594f723a1d..33d63adc71 100644 --- a/scene/resources/mesh_data_tool.cpp +++ b/scene/resources/mesh_data_tool.cpp @@ -150,7 +150,7 @@ Error MeshDataTool::create_from_surface(const Ref<ArrayMesh> &p_mesh, int p_surf vertices.write[i] = v; } - Map<Point2i, int> edge_indices; + HashMap<Point2i, int> edge_indices; for (int i = 0; i < icount; i += 3) { Vertex *v[3] = { &vertices.write[r[i + 0]], &vertices.write[r[i + 1]], &vertices.write[r[i + 2]] }; diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp index 5168bf83eb..a90999bf07 100644 --- a/scene/resources/mesh_library.cpp +++ b/scene/resources/mesh_library.cpp @@ -100,14 +100,14 @@ bool MeshLibrary::_get(const StringName &p_name, Variant &r_ret) const { void MeshLibrary::_get_property_list(List<PropertyInfo> *p_list) const { for (const KeyValue<int, Item> &E : item_map) { - String name = "item/" + itos(E.key) + "/"; - p_list->push_back(PropertyInfo(Variant::STRING, name + "name")); - p_list->push_back(PropertyInfo(Variant::OBJECT, name + "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh")); - p_list->push_back(PropertyInfo(Variant::TRANSFORM3D, name + "mesh_transform")); - p_list->push_back(PropertyInfo(Variant::ARRAY, name + "shapes")); - p_list->push_back(PropertyInfo(Variant::OBJECT, name + "navmesh", PROPERTY_HINT_RESOURCE_TYPE, "NavigationMesh")); - p_list->push_back(PropertyInfo(Variant::TRANSFORM3D, name + "navmesh_transform")); - p_list->push_back(PropertyInfo(Variant::OBJECT, name + "preview", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_HELPER)); + String name = vformat("%s/%d/", PNAME("item"), E.key); + p_list->push_back(PropertyInfo(Variant::STRING, name + PNAME("name"))); + p_list->push_back(PropertyInfo(Variant::OBJECT, name + PNAME("mesh"), PROPERTY_HINT_RESOURCE_TYPE, "Mesh")); + p_list->push_back(PropertyInfo(Variant::TRANSFORM3D, name + PNAME("mesh_transform"))); + p_list->push_back(PropertyInfo(Variant::ARRAY, name + PNAME("shapes"))); + p_list->push_back(PropertyInfo(Variant::OBJECT, name + PNAME("navmesh"), PROPERTY_HINT_RESOURCE_TYPE, "NavigationMesh")); + p_list->push_back(PropertyInfo(Variant::TRANSFORM3D, name + PNAME("navmesh_transform"))); + p_list->push_back(PropertyInfo(Variant::OBJECT, name + PNAME("preview"), PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_HELPER)); } } diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h index e0f2ab2114..4105bd6960 100644 --- a/scene/resources/mesh_library.h +++ b/scene/resources/mesh_library.h @@ -32,7 +32,7 @@ #define MESH_LIBRARY_H #include "core/io/resource.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "mesh.h" #include "scene/3d/navigation_region_3d.h" #include "shape_3d.h" @@ -56,7 +56,7 @@ public: Ref<NavigationMesh> navmesh; }; - Map<int, Item> item_map; + RBMap<int, Item> item_map; void _set_item_shapes(int p_item, const Array &p_shapes); Array _get_item_shapes(int p_item) const; diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp index 552fa84bad..dd0a8472a4 100644 --- a/scene/resources/navigation_mesh.cpp +++ b/scene/resources/navigation_mesh.cpp @@ -38,6 +38,7 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) { for (int i = 0; i < p_mesh->get_surface_count(); i++) { if (p_mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) { + WARN_PRINT("A mesh surface was skipped when creating a NavigationMesh due to wrong primitive type in the source mesh. Mesh surface must be made out of triangles."); continue; } Array arr = p_mesh->surface_get_arrays(i); @@ -46,6 +47,7 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) { Vector<Vector3> varr = arr[Mesh::ARRAY_VERTEX]; Vector<int> iarr = arr[Mesh::ARRAY_INDEX]; if (varr.size() == 0 || iarr.size() == 0) { + WARN_PRINT("A mesh surface was skipped when creating a NavigationMesh due to an empty vertex or index array."); continue; } @@ -229,7 +231,7 @@ float NavigationMesh::get_verts_per_poly() const { } void NavigationMesh::set_detail_sample_distance(float p_value) { - ERR_FAIL_COND(p_value < 0); + ERR_FAIL_COND(p_value < 0.1); detail_sample_distance = p_value; } @@ -338,7 +340,7 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { } } - Map<_EdgeKey, bool> edge_map; + HashMap<_EdgeKey, bool, _EdgeKey> edge_map; Vector<Vector3> tmeshfaces; tmeshfaces.resize(faces.size() * 3); @@ -356,10 +358,10 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() { SWAP(ek.from, ek.to); } - Map<_EdgeKey, bool>::Element *F = edge_map.find(ek); + HashMap<_EdgeKey, bool, _EdgeKey>::Iterator F = edge_map.find(ek); if (F) { - F->get() = false; + F->value = false; } else { edge_map[ek] = true; @@ -501,7 +503,7 @@ void NavigationMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge/max_length", PROPERTY_HINT_RANGE, "0.0,50.0,0.01,or_greater"), "set_edge_max_length", "get_edge_max_length"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge/max_error", PROPERTY_HINT_RANGE, "0.1,3.0,0.01,or_greater"), "set_edge_max_error", "get_edge_max_error"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "polygon/verts_per_poly", PROPERTY_HINT_RANGE, "3.0,12.0,1.0,or_greater"), "set_verts_per_poly", "get_verts_per_poly"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_distance", "get_detail_sample_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.1,16.0,0.01,or_greater"), "set_detail_sample_distance", "get_detail_sample_distance"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_max_error", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_max_error", "get_detail_sample_max_error"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/low_hanging_obstacles"), "set_filter_low_hanging_obstacles", "get_filter_low_hanging_obstacles"); diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h index e43e8627e4..4d8611c3c9 100644 --- a/scene/resources/navigation_mesh.h +++ b/scene/resources/navigation_mesh.h @@ -49,7 +49,13 @@ class NavigationMesh : public Resource { Vector3 from; Vector3 to; - bool operator<(const _EdgeKey &p_with) const { return from == p_with.from ? to < p_with.to : from < p_with.from; } + static uint32_t hash(const _EdgeKey &p_key) { + return HashMapHasherDefault::hash(p_key.from) ^ HashMapHasherDefault::hash(p_key.to); + } + + bool operator==(const _EdgeKey &p_with) const { + return HashMapComparatorDefault<Vector3>::compare(from, p_with.from) && HashMapComparatorDefault<Vector3>::compare(to, p_with.to); + } }; protected: diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 12d1dc9925..c7b1981aed 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -53,7 +53,7 @@ static Array _sanitize_node_pinned_properties(Node *p_node) { if (pinned.is_empty()) { return Array(); } - Set<StringName> storable_properties; + RBSet<StringName> storable_properties; p_node->get_storable_properties(storable_properties); int i = 0; do { @@ -106,7 +106,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty(); - Map<Ref<Resource>, Ref<Resource>> resources_local_to_scene; + HashMap<Ref<Resource>, Ref<Resource>> resources_local_to_scene; for (int i = 0; i < nc; i++) { const NodeData &n = nd[i]; @@ -257,10 +257,10 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { Ref<Resource> res = value; if (res.is_valid()) { if (res->is_local_to_scene()) { - Map<Ref<Resource>, Ref<Resource>>::Element *E = resources_local_to_scene.find(res); + HashMap<Ref<Resource>, Ref<Resource>>::Iterator E = resources_local_to_scene.find(res); if (E) { - value = E->get(); + value = E->value; } else { Node *base = i == 0 ? node : ret_nodes[0]; @@ -430,7 +430,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { return ret_nodes[0]; } -static int _nm_get_string(const String &p_string, Map<StringName, int> &name_map) { +static int _nm_get_string(const String &p_string, HashMap<StringName, int> &name_map) { if (name_map.has(p_string)) { return name_map[p_string]; } @@ -450,7 +450,7 @@ static int _vm_get_variant(const Variant &p_variant, HashMap<Variant, int, Varia return idx; } -Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, Map<Node *, int> &node_map, Map<Node *, int> &nodepath_map) { +Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map) { // this function handles all the work related to properly packing scenes, be it // instantiated or inherited. // given the complexity of this process, an attempt will be made to properly @@ -672,7 +672,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map return OK; } -Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, Map<Node *, int> &node_map, Map<Node *, int> &nodepath_map) { +Error SceneState::_parse_connections(Node *p_owner, Node *p_node, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map) { if (p_node != p_owner && p_node->get_owner() && p_node->get_owner() != p_owner && !p_owner->is_editable_instance(p_node->get_owner())) { return OK; } @@ -879,10 +879,10 @@ Error SceneState::pack(Node *p_scene) { Node *scene = p_scene; - Map<StringName, int> name_map; + HashMap<StringName, int> name_map; HashMap<Variant, int, VariantHasher, VariantComparator> variant_map; - Map<Node *, int> node_map; - Map<Node *, int> nodepath_map; + HashMap<Node *, int> node_map; + HashMap<Node *, int> nodepath_map; // If using scene inheritance, pack the scene it inherits from. if (scene->get_scene_inherited_state().is_valid()) { diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h index 96222937d0..05abb23284 100644 --- a/scene/resources/packed_scene.h +++ b/scene/resources/packed_scene.h @@ -42,7 +42,7 @@ class SceneState : public RefCounted { Vector<NodePath> node_paths; Vector<NodePath> editable_instances; mutable HashMap<NodePath, int> node_path_cache; - mutable Map<int, int> base_scene_node_remap; + mutable HashMap<int, int> base_scene_node_remap; int base_scene_idx = -1; @@ -83,8 +83,8 @@ class SceneState : public RefCounted { Vector<ConnectionData> connections; - Error _parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, Map<Node *, int> &node_map, Map<Node *, int> &nodepath_map); - Error _parse_connections(Node *p_owner, Node *p_node, Map<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, Map<Node *, int> &node_map, Map<Node *, int> &nodepath_map); + Error _parse_node(Node *p_owner, Node *p_node, int p_parent_idx, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map); + Error _parse_connections(Node *p_owner, Node *p_node, HashMap<StringName, int> &name_map, HashMap<Variant, int, VariantHasher, VariantComparator> &variant_map, HashMap<Node *, int> &node_map, HashMap<Node *, int> &nodepath_map); String path; @@ -225,7 +225,9 @@ public: virtual void set_path(const String &p_path, bool p_take_over = false) override; #ifdef TOOLS_ENABLED - virtual void set_last_modified_time(uint64_t p_time) override { state->set_last_modified_time(p_time); } + virtual void set_last_modified_time(uint64_t p_time) override { + state->set_last_modified_time(p_time); + } #endif Ref<SceneState> get_state() const; diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index 597d070285..d060df760e 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -34,7 +34,7 @@ Mutex ParticlesMaterial::material_mutex; SelfList<ParticlesMaterial>::List *ParticlesMaterial::dirty_materials = nullptr; -Map<ParticlesMaterial::MaterialKey, ParticlesMaterial::ShaderData> ParticlesMaterial::shader_map; +HashMap<ParticlesMaterial::MaterialKey, ParticlesMaterial::ShaderData, ParticlesMaterial::MaterialKey> ParticlesMaterial::shader_map; ParticlesMaterial::ShaderNames *ParticlesMaterial::shader_names = nullptr; void ParticlesMaterial::init_shaders() { @@ -1473,7 +1473,7 @@ void ParticlesMaterial::_bind_methods() { ADD_GROUP("Sub Emitter", "sub_emitter_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sub_emitter_mode", PROPERTY_HINT_ENUM, "Disabled,Constant,At End,At Collision"), "set_sub_emitter_mode", "get_sub_emitter_mode"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sub_emitter_frequency", PROPERTY_HINT_RANGE, "0.01,100,0.01"), "set_sub_emitter_frequency", "get_sub_emitter_frequency"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sub_emitter_frequency", PROPERTY_HINT_RANGE, "0.01,100,0.01,suffix:Hz"), "set_sub_emitter_frequency", "get_sub_emitter_frequency"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sub_emitter_amount_at_end", PROPERTY_HINT_RANGE, "1,32,1"), "set_sub_emitter_amount_at_end", "get_sub_emitter_amount_at_end"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sub_emitter_keep_velocity"), "set_sub_emitter_keep_velocity", "get_sub_emitter_keep_velocity"); diff --git a/scene/resources/particles_material.h b/scene/resources/particles_material.h index 4c3a3ba16c..24341d964d 100644 --- a/scene/resources/particles_material.h +++ b/scene/resources/particles_material.h @@ -109,6 +109,14 @@ private: uint32_t key = 0; + static uint32_t hash(const MaterialKey &p_key) { + return hash_djb2_one_32(p_key.key); + } + + bool operator==(const MaterialKey &p_key) const { + return key == p_key.key; + } + bool operator<(const MaterialKey &p_key) const { return key < p_key.key; } @@ -119,7 +127,7 @@ private: int users = 0; }; - static Map<MaterialKey, ShaderData> shader_map; + static HashMap<MaterialKey, ShaderData, MaterialKey> shader_map; MaterialKey current_key; diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp index 94e7f46ea5..6b0c22d720 100644 --- a/scene/resources/polygon_path_finder.cpp +++ b/scene/resources/polygon_path_finder.cpp @@ -34,8 +34,8 @@ bool PolygonPathFinder::_is_point_inside(const Vector2 &p_point) const { int crosses = 0; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - const Edge &e = E->get(); + for (const Edge &E : edges) { + const Edge &e = E; Vector2 a = points[e.points[0]].pos; Vector2 b = points[e.points[1]].pos; @@ -105,8 +105,8 @@ void PolygonPathFinder::setup(const Vector<Vector2> &p_points, const Vector<int> bool valid = true; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - const Edge &e = E->get(); + for (const Edge &E : edges) { + const Edge &e = E; if (e.points[0] == i || e.points[1] == i || e.points[0] == j || e.points[1] == j) { continue; } @@ -140,8 +140,8 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector float closest_dist = 1e20f; Vector2 closest_point; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - const Edge &e = E->get(); + for (const Edge &E : edges) { + const Edge &e = E; Vector2 seg[2] = { points[e.points[0]].pos, points[e.points[1]].pos @@ -151,7 +151,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector float d = from.distance_squared_to(closest); if (d < closest_dist) { - ignore_from_edge = E->get(); + ignore_from_edge = E; closest_dist = d; closest_point = closest; } @@ -164,8 +164,8 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector float closest_dist = 1e20f; Vector2 closest_point; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - const Edge &e = E->get(); + for (const Edge &E : edges) { + const Edge &e = E; Vector2 seg[2] = { points[e.points[0]].pos, points[e.points[1]].pos @@ -175,7 +175,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector float d = to.distance_squared_to(closest); if (d < closest_dist) { - ignore_to_edge = E->get(); + ignore_to_edge = E; closest_dist = d; closest_point = closest; } @@ -188,8 +188,8 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector { bool can_see_eachother = true; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - const Edge &e = E->get(); + for (const Edge &E : edges) { + const Edge &e = E; if (e.points[0] == ignore_from_edge.points[0] && e.points[1] == ignore_from_edge.points[1]) { continue; } @@ -240,8 +240,8 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector valid_b = false; } - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - const Edge &e = E->get(); + for (const Edge &E : edges) { + const Edge &e = E; if (e.points[0] == i || e.points[1] == i) { continue; @@ -289,14 +289,14 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector } //solve graph - Set<int> open_list; + RBSet<int> open_list; points.write[aidx].distance = 0; points.write[aidx].prev = aidx; - for (Set<int>::Element *E = points[aidx].connections.front(); E; E = E->next()) { - open_list.insert(E->get()); - points.write[E->get()].distance = from.distance_to(points[E->get()].pos); - points.write[E->get()].prev = aidx; + for (const int &E : points[aidx].connections) { + open_list.insert(E); + points.write[E].distance = from.distance_to(points[E].pos); + points.write[E].prev = aidx; } bool found_route = false; @@ -312,14 +312,14 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector float least_cost = 1e30; //this could be faster (cache previous results) - for (Set<int>::Element *E = open_list.front(); E; E = E->next()) { - const Point &p = points[E->get()]; + for (const int &E : open_list) { + const Point &p = points[E]; float cost = p.distance; cost += p.pos.distance_to(to); cost += p.penalty; if (cost < least_cost) { - least_cost_point = E->get(); + least_cost_point = E; least_cost = cost; } } @@ -327,8 +327,8 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector const Point &np = points[least_cost_point]; //open the neighbours for search - for (Set<int>::Element *E = np.connections.front(); E; E = E->next()) { - Point &p = points.write[E->get()]; + for (const int &E : np.connections) { + Point &p = points.write[E]; float distance = np.pos.distance_to(p.pos) + np.distance; if (p.prev != -1) { @@ -343,9 +343,9 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector p.prev = least_cost_point; p.distance = distance; - open_list.insert(E->get()); + open_list.insert(E); - if (E->get() == bidx) { + if (E == bidx) { //oh my reached end! stop algorithm found_route = true; break; @@ -459,8 +459,8 @@ Dictionary PolygonPathFinder::_get_data() const { { int *cw = c.ptrw(); int idx = 0; - for (Set<int>::Element *E = points[i].connections.front(); E; E = E->next()) { - cw[idx++] = E->get(); + for (const int &E : points[i].connections) { + cw[idx++] = E; } } connections[i] = c; @@ -469,9 +469,9 @@ Dictionary PolygonPathFinder::_get_data() const { { int *iw = ind.ptrw(); int idx = 0; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - iw[idx++] = E->get().points[0]; - iw[idx++] = E->get().points[1]; + for (const Edge &E : edges) { + iw[idx++] = E.points[0]; + iw[idx++] = E.points[1]; } } @@ -492,8 +492,8 @@ Vector2 PolygonPathFinder::get_closest_point(const Vector2 &p_point) const { float closest_dist = 1e20f; Vector2 closest_point; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - const Edge &e = E->get(); + for (const Edge &E : edges) { + const Edge &e = E; Vector2 seg[2] = { points[e.points[0]].pos, points[e.points[1]].pos @@ -516,9 +516,9 @@ Vector2 PolygonPathFinder::get_closest_point(const Vector2 &p_point) const { Vector<Vector2> PolygonPathFinder::get_intersections(const Vector2 &p_from, const Vector2 &p_to) const { Vector<Vector2> inters; - for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) { - Vector2 a = points[E->get().points[0]].pos; - Vector2 b = points[E->get().points[1]].pos; + for (const Edge &E : edges) { + Vector2 a = points[E.points[0]].pos; + Vector2 b = points[E.points[1]].pos; Vector2 res; if (Geometry2D::segment_intersects_segment(a, b, p_from, p_to, &res)) { diff --git a/scene/resources/polygon_path_finder.h b/scene/resources/polygon_path_finder.h index db96192917..71ad77eb6e 100644 --- a/scene/resources/polygon_path_finder.h +++ b/scene/resources/polygon_path_finder.h @@ -38,7 +38,7 @@ class PolygonPathFinder : public Resource { struct Point { Vector2 pos; - Set<int> connections; + RBSet<int> connections; float distance = 0.0; float penalty = 0.0; int prev = 0; @@ -68,7 +68,7 @@ class PolygonPathFinder : public Resource { Rect2 bounds; Vector<Point> points; - Set<Edge> edges; + RBSet<Edge> edges; bool _is_point_inside(const Vector2 &p_point) const; diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index c9a890194d..4d83f8772e 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -29,7 +29,12 @@ /*************************************************************************/ #include "primitive_meshes.h" + +#include "core/core_string_names.h" +#include "scene/resources/theme.h" #include "servers/rendering_server.h" +#include "thirdparty/misc/clipper.hpp" +#include "thirdparty/misc/polypartition.h" /** PrimitiveMesh @@ -430,8 +435,8 @@ void CapsuleMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CapsuleMesh::set_rings); ClassDB::bind_method(D_METHOD("get_rings"), &CapsuleMesh::get_rings); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater,suffix:m"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater,suffix:m"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings"); } @@ -691,7 +696,7 @@ void BoxMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_subdivide_depth", "divisions"), &BoxMesh::set_subdivide_depth); ClassDB::bind_method(D_METHOD("get_subdivide_depth"), &BoxMesh::get_subdivide_depth); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size", PROPERTY_HINT_NONE, "suffix:m"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_width", "get_subdivide_width"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_height", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_height", "get_subdivide_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_depth", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_depth", "get_subdivide_depth"); @@ -892,9 +897,9 @@ void CylinderMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CylinderMesh::set_rings); ClassDB::bind_method(D_METHOD("get_rings"), &CylinderMesh::get_rings); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "top_radius", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_top_radius", "get_top_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bottom_radius", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_bottom_radius", "get_bottom_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "top_radius", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater,suffix:m"), "set_top_radius", "get_top_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bottom_radius", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater,suffix:m"), "set_bottom_radius", "get_bottom_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater,suffix:m"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings"); } @@ -1022,7 +1027,7 @@ void PlaneMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_center_offset", "offset"), &PlaneMesh::set_center_offset); ClassDB::bind_method(D_METHOD("get_center_offset"), &PlaneMesh::get_center_offset); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, "suffix:m"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_width", "get_subdivide_width"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_depth", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_depth", "get_subdivide_depth"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_offset"), "set_center_offset", "get_center_offset"); @@ -1293,7 +1298,7 @@ void PrismMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("get_subdivide_depth"), &PrismMesh::get_subdivide_depth); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "left_to_right", PROPERTY_HINT_RANGE, "-2.0,2.0,0.1"), "set_left_to_right", "get_left_to_right"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size", PROPERTY_HINT_NONE, "suffix:m"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_width", "get_subdivide_width"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_height", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_height", "get_subdivide_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_depth", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_depth", "get_subdivide_depth"); @@ -1406,8 +1411,8 @@ void QuadMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_center_offset", "center_offset"), &QuadMesh::set_center_offset); ClassDB::bind_method(D_METHOD("get_center_offset"), &QuadMesh::get_center_offset); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_offset"), "set_center_offset", "get_center_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, "suffix:m"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_offset", PROPERTY_HINT_NONE, "suffix:m"), "set_center_offset", "get_center_offset"); } uint32_t QuadMesh::surface_get_format(int p_idx) const { @@ -1533,8 +1538,8 @@ void SphereMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_is_hemisphere", "is_hemisphere"), &SphereMesh::set_is_hemisphere); ClassDB::bind_method(D_METHOD("get_is_hemisphere"), &SphereMesh::get_is_hemisphere); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater,suffix:m"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater,suffix:m"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "is_hemisphere"), "set_is_hemisphere", "get_is_hemisphere"); @@ -1912,12 +1917,12 @@ void TubeTrailMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_curve", "curve"), &TubeTrailMesh::set_curve); ClassDB::bind_method(D_METHOD("get_curve"), &TubeTrailMesh::get_curve); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater,suffix:m"), "set_radius", "get_radius"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_steps", PROPERTY_HINT_RANGE, "3,128,1"), "set_radial_steps", "get_radial_steps"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sections", PROPERTY_HINT_RANGE, "2,128,1"), "set_sections", "get_sections"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "section_length", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001,or_greater"), "set_section_length", "get_section_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "section_length", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001,or_greater,suffix:m"), "set_section_length", "get_section_length"); ADD_PROPERTY(PropertyInfo(Variant::INT, "section_rings", PROPERTY_HINT_RANGE, "1,128,1"), "set_section_rings", "get_section_rings"); @@ -2139,9 +2144,9 @@ void RibbonTrailMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("get_shape"), &RibbonTrailMesh::get_shape); ADD_PROPERTY(PropertyInfo(Variant::INT, "shape", PROPERTY_HINT_ENUM, "Flat,Cross"), "set_shape", "get_shape"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater,suffix:m"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sections", PROPERTY_HINT_RANGE, "2,128,1"), "set_sections", "get_sections"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "section_length", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001,or_greater"), "set_section_length", "get_section_length"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "section_length", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001,or_greater,suffix:m"), "set_section_length", "get_section_length"); ADD_PROPERTY(PropertyInfo(Variant::INT, "section_segments", PROPERTY_HINT_RANGE, "1,128,1"), "set_section_segments", "get_section_segments"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_curve", "get_curve"); @@ -2151,3 +2156,819 @@ void RibbonTrailMesh::_bind_methods() { RibbonTrailMesh::RibbonTrailMesh() { } + +/*************************************************************************/ +/* TextMesh */ +/*************************************************************************/ + +void TextMesh::_generate_glyph_mesh_data(uint32_t p_hash, const Glyph &p_gl) const { + if (cache.has(p_hash)) { + return; + } + + GlyphMeshData &gl_data = cache[p_hash]; + + Dictionary d = TS->font_get_glyph_contours(p_gl.font_rid, p_gl.font_size, p_gl.index); + Vector2 origin = Vector2(p_gl.x_off, p_gl.y_off) * pixel_size; + + PackedVector3Array points = d["points"]; + PackedInt32Array contours = d["contours"]; + bool orientation = d["orientation"]; + + if (points.size() < 3 || contours.size() < 1) { + return; // No full contours, only glyph control points (or nothing), ignore. + } + + // Approximate Bezier curves as polygons. + // See https://freetype.org/freetype2/docs/glyphs/glyphs-6.html, for more info. + for (int i = 0; i < contours.size(); i++) { + int32_t start = (i == 0) ? 0 : (contours[i - 1] + 1); + int32_t end = contours[i]; + Vector<ContourPoint> polygon; + + for (int32_t j = start; j <= end; j++) { + if (points[j].z == TextServer::CONTOUR_CURVE_TAG_ON) { + // Point on the curve. + Vector2 p = Vector2(points[j].x, points[j].y) * pixel_size + origin; + polygon.push_back(ContourPoint(p, true)); + } else if (points[j].z == TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) { + // Conic Bezier arc. + int32_t next = (j == end) ? start : (j + 1); + int32_t prev = (j == start) ? end : (j - 1); + Vector2 p0; + Vector2 p1 = Vector2(points[j].x, points[j].y); + Vector2 p2; + + // For successive conic OFF points add a virtual ON point in the middle. + if (points[prev].z == TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) { + p0 = (Vector2(points[prev].x, points[prev].y) + Vector2(points[j].x, points[j].y)) / 2.0; + } else if (points[prev].z == TextServer::CONTOUR_CURVE_TAG_ON) { + p0 = Vector2(points[prev].x, points[prev].y); + } else { + ERR_FAIL_MSG(vformat("Invalid conic arc point sequence at %d:%d", i, j)); + } + if (points[next].z == TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) { + p2 = (Vector2(points[j].x, points[j].y) + Vector2(points[next].x, points[next].y)) / 2.0; + } else if (points[next].z == TextServer::CONTOUR_CURVE_TAG_ON) { + p2 = Vector2(points[next].x, points[next].y); + } else { + ERR_FAIL_MSG(vformat("Invalid conic arc point sequence at %d:%d", i, j)); + } + + real_t step = CLAMP(curve_step / (p0 - p2).length(), 0.01, 0.5); + real_t t = step; + while (t < 1.0) { + real_t omt = (1.0 - t); + real_t omt2 = omt * omt; + real_t t2 = t * t; + + Vector2 point = p1 + omt2 * (p0 - p1) + t2 * (p2 - p1); + Vector2 p = point * pixel_size + origin; + polygon.push_back(ContourPoint(p, false)); + t += step; + } + } else if (points[j].z == TextServer::CONTOUR_CURVE_TAG_OFF_CUBIC) { + // Cubic Bezier arc. + int32_t next1 = (j == end) ? start : (j + 1); + int32_t next2 = (next1 == end) ? start : (next1 + 1); + int32_t prev = (j == start) ? end : (j - 1); + + // There must be exactly two OFF points and two ON points for each cubic arc. + ERR_FAIL_COND_MSG(points[prev].z != TextServer::CONTOUR_CURVE_TAG_ON, vformat("Invalid cubic arc point sequence at %d:%d", i, prev)); + ERR_FAIL_COND_MSG(points[next1].z != TextServer::CONTOUR_CURVE_TAG_OFF_CUBIC, vformat("Invalid cubic arc point sequence at %d:%d", i, next1)); + ERR_FAIL_COND_MSG(points[next2].z != TextServer::CONTOUR_CURVE_TAG_ON, vformat("Invalid cubic arc point sequence at %d:%d", i, next2)); + + Vector2 p0 = Vector2(points[prev].x, points[prev].y); + Vector2 p1 = Vector2(points[j].x, points[j].y); + Vector2 p2 = Vector2(points[next1].x, points[next1].y); + Vector2 p3 = Vector2(points[next2].x, points[next2].y); + + real_t step = CLAMP(curve_step / (p0 - p3).length(), 0.01, 0.5); + real_t t = step; + while (t < 1.0) { + real_t omt = (1.0 - t); + real_t omt2 = omt * omt; + real_t omt3 = omt2 * omt; + real_t t2 = t * t; + real_t t3 = t2 * t; + + Vector2 point = p0 * omt3 + p1 * omt2 * t * 3.0 + p2 * omt * t2 * 3.0 + p3 * t3; + Vector2 p = point * pixel_size + origin; + polygon.push_back(ContourPoint(p, false)); + t += step; + } + i++; + } else { + ERR_FAIL_MSG(vformat("Unknown point tag at %d:%d", i, j)); + } + } + + if (polygon.size() < 3) { + continue; // Skip glyph control points. + } + + if (!orientation) { + polygon.reverse(); + } + + gl_data.contours.push_back(polygon); + } + + // Calculate bounds. + List<TPPLPoly> in_poly; + for (int i = 0; i < gl_data.contours.size(); i++) { + TPPLPoly inp; + inp.Init(gl_data.contours[i].size()); + real_t length = 0.0; + for (int j = 0; j < gl_data.contours[i].size(); j++) { + int next = (j + 1 == gl_data.contours[i].size()) ? 0 : (j + 1); + + gl_data.min_p.x = MIN(gl_data.min_p.x, gl_data.contours[i][j].point.x); + gl_data.min_p.y = MIN(gl_data.min_p.y, gl_data.contours[i][j].point.y); + gl_data.max_p.x = MAX(gl_data.max_p.x, gl_data.contours[i][j].point.x); + gl_data.max_p.y = MAX(gl_data.max_p.y, gl_data.contours[i][j].point.y); + length += (gl_data.contours[i][next].point - gl_data.contours[i][j].point).length(); + + inp.GetPoint(j) = gl_data.contours[i][j].point; + } + TPPLOrientation poly_orient = inp.GetOrientation(); + if (poly_orient == TPPL_ORIENTATION_CW) { + inp.SetHole(true); + } + in_poly.push_back(inp); + gl_data.contours_info.push_back(ContourInfo(length, poly_orient == TPPL_ORIENTATION_CCW)); + } + + TPPLPartition tpart; + + //Decompose and triangulate. + List<TPPLPoly> out_poly; + if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { + ERR_FAIL_MSG("Convex decomposing failed!"); + } + List<TPPLPoly> out_tris; + for (List<TPPLPoly>::Element *I = out_poly.front(); I; I = I->next()) { + if (tpart.Triangulate_OPT(&(I->get()), &out_tris) == 0) { + ERR_FAIL_MSG("Triangulation failed!"); + } + } + + for (List<TPPLPoly>::Element *I = out_tris.front(); I; I = I->next()) { + TPPLPoly &tp = I->get(); + ERR_FAIL_COND(tp.GetNumPoints() != 3); // Trianges only. + + for (int i = 0; i < 3; i++) { + gl_data.triangles.push_back(Vector2(tp.GetPoint(i).x, tp.GetPoint(i).y)); + } + } +} + +void TextMesh::_create_mesh_array(Array &p_arr) const { + Ref<Font> font = _get_font_or_default(); + ERR_FAIL_COND(font.is_null()); + + if (dirty_cache) { + cache.clear(); + dirty_cache = false; + } + + // Update text buffer. + if (dirty_text) { + TS->shaped_text_clear(text_rid); + TS->shaped_text_set_direction(text_rid, text_direction); + + String text = (uppercase) ? TS->string_to_upper(xl_text, language) : xl_text; + TS->shaped_text_add_string(text_rid, text, font->get_rids(), font_size, opentype_features, language); + + Array stt; + if (st_parser == TextServer::STRUCTURED_TEXT_CUSTOM) { + GDVIRTUAL_CALL(_structured_text_parser, st_args, text, stt); + } else { + stt = TS->parse_structured_text(st_parser, st_args, text); + } + TS->shaped_text_set_bidi_override(text_rid, stt); + + dirty_text = false; + dirty_font = false; + } else if (dirty_font) { + int spans = TS->shaped_get_span_count(text_rid); + for (int i = 0; i < spans; i++) { + TS->shaped_set_span_update_font(text_rid, i, font->get_rids(), font_size, opentype_features); + } + + dirty_font = false; + } + if (horizontal_alignment == HORIZONTAL_ALIGNMENT_FILL) { + TS->shaped_text_fit_to_width(text_rid, width, TextServer::JUSTIFICATION_WORD_BOUND | TextServer::JUSTIFICATION_KASHIDA); + } else { + TS->shaped_text_fit_to_width(text_rid, -1, TextServer::JUSTIFICATION_WORD_BOUND | TextServer::JUSTIFICATION_KASHIDA); + } + + Vector2 offset; + const Glyph *glyphs = TS->shaped_text_get_glyphs(text_rid); + int gl_size = TS->shaped_text_get_glyph_count(text_rid); + float line_width = TS->shaped_text_get_width(text_rid) * pixel_size; + + switch (horizontal_alignment) { + case HORIZONTAL_ALIGNMENT_LEFT: + offset.x = 0.0; + break; + case HORIZONTAL_ALIGNMENT_FILL: + case HORIZONTAL_ALIGNMENT_CENTER: { + offset.x = -line_width / 2.0; + } break; + case HORIZONTAL_ALIGNMENT_RIGHT: { + offset.x = -line_width; + } break; + } + + bool has_depth = !Math::is_zero_approx(depth); + + // Generate glyph data, precalculate size of the arrays and mesh bounds for UV. + int64_t p_size = 0; + int64_t i_size = 0; + + Vector2 min_p = Vector2(INFINITY, INFINITY); + Vector2 max_p = Vector2(-INFINITY, -INFINITY); + + Vector2 offset_pre = offset; + for (int i = 0; i < gl_size; i++) { + if (glyphs[i].font_rid != RID()) { + uint32_t hash = hash_one_uint64(glyphs[i].font_rid.get_id()); + hash = hash_djb2_one_32(glyphs[i].index, hash); + + _generate_glyph_mesh_data(hash, glyphs[i]); + GlyphMeshData &gl_data = cache[hash]; + + p_size += glyphs[i].repeat * gl_data.triangles.size() * ((has_depth) ? 2 : 1); + i_size += glyphs[i].repeat * gl_data.triangles.size() * ((has_depth) ? 2 : 1); + + if (has_depth) { + for (int j = 0; j < gl_data.contours.size(); j++) { + p_size += glyphs[i].repeat * gl_data.contours[j].size() * 4; + i_size += glyphs[i].repeat * gl_data.contours[j].size() * 6; + } + } + + for (int j = 0; j < glyphs[i].repeat; j++) { + min_p.x = MIN(gl_data.min_p.x + offset_pre.x, min_p.x); + min_p.y = MIN(gl_data.min_p.y + offset_pre.y, min_p.y); + max_p.x = MAX(gl_data.max_p.x + offset_pre.x, max_p.x); + max_p.y = MAX(gl_data.max_p.y + offset_pre.y, max_p.y); + + offset_pre.x += glyphs[i].advance * pixel_size; + } + } else { + p_size += glyphs[i].repeat * 4; + i_size += glyphs[i].repeat * 6; + + offset_pre.x += glyphs[i].advance * pixel_size * glyphs[i].repeat; + } + } + + Vector<Vector3> vertices; + Vector<Vector3> normals; + Vector<float> tangents; + Vector<Vector2> uvs; + Vector<int32_t> indices; + + vertices.resize(p_size); + normals.resize(p_size); + uvs.resize(p_size); + tangents.resize(p_size * 4); + indices.resize(i_size); + + Vector3 *vertices_ptr = vertices.ptrw(); + Vector3 *normals_ptr = normals.ptrw(); + float *tangents_ptr = tangents.ptrw(); + Vector2 *uvs_ptr = uvs.ptrw(); + int32_t *indices_ptr = indices.ptrw(); + + // Generate mesh. + int32_t p_idx = 0; + int32_t i_idx = 0; + for (int i = 0; i < gl_size; i++) { + if (glyphs[i].font_rid != RID()) { + uint32_t hash = hash_one_uint64(glyphs[i].font_rid.get_id()); + hash = hash_djb2_one_32(glyphs[i].index, hash); + + const GlyphMeshData &gl_data = cache[hash]; + + int64_t ts = gl_data.triangles.size(); + const Vector2 *ts_ptr = gl_data.triangles.ptr(); + + for (int j = 0; j < glyphs[i].repeat; j++) { + for (int k = 0; k < ts; k += 3) { + // Add front face. + for (int l = 0; l < 3; l++) { + Vector3 point = Vector3(ts_ptr[k + l].x + offset.x, -ts_ptr[k + l].y + offset.y, depth / 2.0); + vertices_ptr[p_idx] = point; + normals_ptr[p_idx] = Vector3(0.0, 0.0, 1.0); + if (has_depth) { + uvs_ptr[p_idx] = Vector2(Math::range_lerp(point.x, min_p.x, max_p.x, real_t(0.0), real_t(1.0)), Math::range_lerp(point.y, -min_p.y, -max_p.y, real_t(0.0), real_t(0.4))); + } else { + uvs_ptr[p_idx] = Vector2(Math::range_lerp(point.x, min_p.x, max_p.x, real_t(0.0), real_t(1.0)), Math::range_lerp(point.y, -min_p.y, -max_p.y, real_t(0.0), real_t(1.0))); + } + tangents_ptr[p_idx * 4 + 0] = 1.0; + tangents_ptr[p_idx * 4 + 1] = 0.0; + tangents_ptr[p_idx * 4 + 2] = 0.0; + tangents_ptr[p_idx * 4 + 3] = 1.0; + indices_ptr[i_idx++] = p_idx; + p_idx++; + } + if (has_depth) { + // Add back face. + for (int l = 2; l >= 0; l--) { + Vector3 point = Vector3(ts_ptr[k + l].x + offset.x, -ts_ptr[k + l].y + offset.y, -depth / 2.0); + vertices_ptr[p_idx] = point; + normals_ptr[p_idx] = Vector3(0.0, 0.0, -1.0); + uvs_ptr[p_idx] = Vector2(Math::range_lerp(point.x, min_p.x, max_p.x, real_t(0.0), real_t(1.0)), Math::range_lerp(point.y, -min_p.y, -max_p.y, real_t(0.4), real_t(0.8))); + tangents_ptr[p_idx * 4 + 0] = -1.0; + tangents_ptr[p_idx * 4 + 1] = 0.0; + tangents_ptr[p_idx * 4 + 2] = 0.0; + tangents_ptr[p_idx * 4 + 3] = 1.0; + indices_ptr[i_idx++] = p_idx; + p_idx++; + } + } + } + // Add sides. + if (has_depth) { + for (int k = 0; k < gl_data.contours.size(); k++) { + int64_t ps = gl_data.contours[k].size(); + const ContourPoint *ps_ptr = gl_data.contours[k].ptr(); + const ContourInfo &ps_info = gl_data.contours_info[k]; + real_t length = 0.0; + for (int l = 0; l < ps; l++) { + int prev = (l == 0) ? (ps - 1) : (l - 1); + int next = (l + 1 == ps) ? 0 : (l + 1); + Vector2 d1; + Vector2 d2 = (ps_ptr[next].point - ps_ptr[l].point).normalized(); + if (ps_ptr[l].sharp) { + d1 = d2; + } else { + d1 = (ps_ptr[l].point - ps_ptr[prev].point).normalized(); + } + real_t seg_len = (ps_ptr[next].point - ps_ptr[l].point).length(); + + Vector3 quad_faces[4] = { + Vector3(ps_ptr[l].point.x + offset.x, -ps_ptr[l].point.y + offset.y, -depth / 2.0), + Vector3(ps_ptr[next].point.x + offset.x, -ps_ptr[next].point.y + offset.y, -depth / 2.0), + Vector3(ps_ptr[l].point.x + offset.x, -ps_ptr[l].point.y + offset.y, depth / 2.0), + Vector3(ps_ptr[next].point.x + offset.x, -ps_ptr[next].point.y + offset.y, depth / 2.0), + }; + for (int m = 0; m < 4; m++) { + const Vector2 &d = ((m % 2) == 0) ? d1 : d2; + real_t u_pos = ((m % 2) == 0) ? length : length + seg_len; + vertices_ptr[p_idx + m] = quad_faces[m]; + normals_ptr[p_idx + m] = Vector3(d.y, d.x, 0.0); + if (m < 2) { + uvs_ptr[p_idx + m] = Vector2(Math::range_lerp(u_pos, 0, ps_info.length, real_t(0.0), real_t(1.0)), (ps_info.ccw) ? 0.8 : 0.9); + } else { + uvs_ptr[p_idx + m] = Vector2(Math::range_lerp(u_pos, 0, ps_info.length, real_t(0.0), real_t(1.0)), (ps_info.ccw) ? 0.9 : 1.0); + } + tangents_ptr[(p_idx + m) * 4 + 0] = d.x; + tangents_ptr[(p_idx + m) * 4 + 1] = -d.y; + tangents_ptr[(p_idx + m) * 4 + 2] = 0.0; + tangents_ptr[(p_idx + m) * 4 + 3] = 1.0; + } + + indices_ptr[i_idx++] = p_idx; + indices_ptr[i_idx++] = p_idx + 1; + indices_ptr[i_idx++] = p_idx + 2; + + indices_ptr[i_idx++] = p_idx + 1; + indices_ptr[i_idx++] = p_idx + 3; + indices_ptr[i_idx++] = p_idx + 2; + + length += seg_len; + p_idx += 4; + } + } + } + offset.x += glyphs[i].advance * pixel_size; + } + } else { + // Add fallback quad for missing glyphs. + for (int j = 0; j < glyphs[i].repeat; j++) { + Size2 sz = TS->get_hex_code_box_size(glyphs[i].font_size, glyphs[i].index) * pixel_size; + Vector3 quad_faces[4] = { + Vector3(offset.x, offset.y, 0.0), + Vector3(offset.x, sz.y + offset.y, 0.0), + Vector3(sz.x + offset.x, sz.y + offset.y, 0.0), + Vector3(sz.x + offset.x, offset.y, 0.0), + }; + for (int k = 0; k < 4; k++) { + vertices_ptr[p_idx + k] = quad_faces[k]; + normals_ptr[p_idx + k] = Vector3(0.0, 0.0, 1.0); + if (has_depth) { + uvs_ptr[p_idx + k] = Vector2(Math::range_lerp(quad_faces[k].x, min_p.x, max_p.x, real_t(0.0), real_t(1.0)), Math::range_lerp(quad_faces[k].y, -min_p.y, -max_p.y, real_t(0.0), real_t(0.4))); + } else { + uvs_ptr[p_idx + k] = Vector2(Math::range_lerp(quad_faces[k].x, min_p.x, max_p.x, real_t(0.0), real_t(1.0)), Math::range_lerp(quad_faces[k].y, -min_p.y, -max_p.y, real_t(0.0), real_t(1.0))); + } + tangents_ptr[(p_idx + k) * 4 + 0] = 1.0; + tangents_ptr[(p_idx + k) * 4 + 1] = 0.0; + tangents_ptr[(p_idx + k) * 4 + 2] = 0.0; + tangents_ptr[(p_idx + k) * 4 + 3] = 1.0; + } + + indices_ptr[i_idx++] = p_idx; + indices_ptr[i_idx++] = p_idx + 1; + indices_ptr[i_idx++] = p_idx + 2; + + indices_ptr[i_idx++] = p_idx + 0; + indices_ptr[i_idx++] = p_idx + 2; + indices_ptr[i_idx++] = p_idx + 3; + p_idx += 4; + + offset.x += glyphs[i].advance * pixel_size; + } + } + } + + if (p_size == 0) { + // If empty, add single trinagle to suppress errors. + vertices.push_back(Vector3()); + normals.push_back(Vector3()); + uvs.push_back(Vector2()); + tangents.push_back(1.0); + tangents.push_back(0.0); + tangents.push_back(0.0); + tangents.push_back(1.0); + indices.push_back(0); + indices.push_back(0); + indices.push_back(0); + } + + p_arr[RS::ARRAY_VERTEX] = vertices; + p_arr[RS::ARRAY_NORMAL] = normals; + p_arr[RS::ARRAY_TANGENT] = tangents; + p_arr[RS::ARRAY_TEX_UV] = uvs; + p_arr[RS::ARRAY_INDEX] = indices; +} + +void TextMesh::_bind_methods() { + ClassDB::bind_method(D_METHOD("set_horizontal_alignment", "alignment"), &TextMesh::set_horizontal_alignment); + ClassDB::bind_method(D_METHOD("get_horizontal_alignment"), &TextMesh::get_horizontal_alignment); + + ClassDB::bind_method(D_METHOD("set_text", "text"), &TextMesh::set_text); + ClassDB::bind_method(D_METHOD("get_text"), &TextMesh::get_text); + + ClassDB::bind_method(D_METHOD("set_font", "font"), &TextMesh::set_font); + ClassDB::bind_method(D_METHOD("get_font"), &TextMesh::get_font); + + ClassDB::bind_method(D_METHOD("set_font_size", "font_size"), &TextMesh::set_font_size); + ClassDB::bind_method(D_METHOD("get_font_size"), &TextMesh::get_font_size); + + ClassDB::bind_method(D_METHOD("set_depth", "depth"), &TextMesh::set_depth); + ClassDB::bind_method(D_METHOD("get_depth"), &TextMesh::get_depth); + + ClassDB::bind_method(D_METHOD("set_width", "width"), &TextMesh::set_width); + ClassDB::bind_method(D_METHOD("get_width"), &TextMesh::get_width); + + ClassDB::bind_method(D_METHOD("set_pixel_size", "pixel_size"), &TextMesh::set_pixel_size); + ClassDB::bind_method(D_METHOD("get_pixel_size"), &TextMesh::get_pixel_size); + + ClassDB::bind_method(D_METHOD("set_curve_step", "curve_step"), &TextMesh::set_curve_step); + ClassDB::bind_method(D_METHOD("get_curve_step"), &TextMesh::get_curve_step); + + ClassDB::bind_method(D_METHOD("set_text_direction", "direction"), &TextMesh::set_text_direction); + ClassDB::bind_method(D_METHOD("get_text_direction"), &TextMesh::get_text_direction); + + ClassDB::bind_method(D_METHOD("set_opentype_feature", "tag", "value"), &TextMesh::set_opentype_feature); + ClassDB::bind_method(D_METHOD("get_opentype_feature", "tag"), &TextMesh::get_opentype_feature); + ClassDB::bind_method(D_METHOD("clear_opentype_features"), &TextMesh::clear_opentype_features); + + ClassDB::bind_method(D_METHOD("set_language", "language"), &TextMesh::set_language); + ClassDB::bind_method(D_METHOD("get_language"), &TextMesh::get_language); + + ClassDB::bind_method(D_METHOD("set_structured_text_bidi_override", "parser"), &TextMesh::set_structured_text_bidi_override); + ClassDB::bind_method(D_METHOD("get_structured_text_bidi_override"), &TextMesh::get_structured_text_bidi_override); + + ClassDB::bind_method(D_METHOD("set_structured_text_bidi_override_options", "args"), &TextMesh::set_structured_text_bidi_override_options); + ClassDB::bind_method(D_METHOD("get_structured_text_bidi_override_options"), &TextMesh::get_structured_text_bidi_override_options); + + ClassDB::bind_method(D_METHOD("set_uppercase", "enable"), &TextMesh::set_uppercase); + ClassDB::bind_method(D_METHOD("is_uppercase"), &TextMesh::is_uppercase); + + ClassDB::bind_method(D_METHOD("_font_changed"), &TextMesh::_font_changed); + ClassDB::bind_method(D_METHOD("_request_update"), &TextMesh::_request_update); + + ADD_GROUP("Text", ""); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "font", PROPERTY_HINT_RESOURCE_TYPE, "Font"), "set_font", "get_font"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "font_size", PROPERTY_HINT_RANGE, "1,127,1"), "set_font_size", "get_font_size"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "horizontal_alignment", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), "set_horizontal_alignment", "get_horizontal_alignment"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "uppercase"), "set_uppercase", "is_uppercase"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "structured_text_bidi_override", PROPERTY_HINT_ENUM, "Default,URI,File,Email,List,None,Custom"), "set_structured_text_bidi_override", "get_structured_text_bidi_override"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "structured_text_bidi_override_options"), "set_structured_text_bidi_override_options", "get_structured_text_bidi_override_options"); + + ADD_GROUP("Mesh", ""); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pixel_size", PROPERTY_HINT_RANGE, "0.0001,128,0.0001"), "set_pixel_size", "get_pixel_size"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "curve_step", PROPERTY_HINT_RANGE, "0.1,10,0.1"), "set_curve_step", "get_curve_step"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_RANGE, "0.0,100.0,0.001,or_greater"), "set_depth", "get_depth"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width"), "set_width", "get_width"); + + ADD_GROUP("Locale", ""); + ADD_PROPERTY(PropertyInfo(Variant::INT, "text_direction", PROPERTY_HINT_ENUM, "Auto,Left-to-Right,Right-to-Left"), "set_text_direction", "get_text_direction"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "language", PROPERTY_HINT_LOCALE_ID, ""), "set_language", "get_language"); +} + +void TextMesh::_notification(int p_what) { + switch (p_what) { + case MainLoop::NOTIFICATION_TRANSLATION_CHANGED: { + String new_text = tr(text); + if (new_text == xl_text) { + return; // Nothing new. + } + xl_text = new_text; + dirty_text = true; + _request_update(); + } break; + } +} + +bool TextMesh::_set(const StringName &p_name, const Variant &p_value) { + String str = p_name; + if (str.begins_with("opentype_features/")) { + String name = str.get_slicec('/', 1); + int32_t tag = TS->name_to_tag(name); + int value = p_value; + if (value == -1) { + if (opentype_features.has(tag)) { + opentype_features.erase(tag); + dirty_font = true; + _request_update(); + } + } else { + if (!opentype_features.has(tag) || (int)opentype_features[tag] != value) { + opentype_features[tag] = value; + dirty_font = true; + _request_update(); + } + } + notify_property_list_changed(); + return true; + } + + return false; +} + +bool TextMesh::_get(const StringName &p_name, Variant &r_ret) const { + String str = p_name; + if (str.begins_with("opentype_features/")) { + String name = str.get_slicec('/', 1); + int32_t tag = TS->name_to_tag(name); + if (opentype_features.has(tag)) { + r_ret = opentype_features[tag]; + return true; + } else { + r_ret = -1; + return true; + } + } + return false; +} + +void TextMesh::_get_property_list(List<PropertyInfo> *p_list) const { + for (const Variant *ftr = opentype_features.next(nullptr); ftr != nullptr; ftr = opentype_features.next(ftr)) { + String name = TS->tag_to_name(*ftr); + p_list->push_back(PropertyInfo(Variant::INT, "opentype_features/" + name)); + } + p_list->push_back(PropertyInfo(Variant::NIL, "opentype_features/_new", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR)); +} + +TextMesh::TextMesh() { + primitive_type = PRIMITIVE_TRIANGLES; + text_rid = TS->create_shaped_text(); +} + +TextMesh::~TextMesh() { + TS->free_rid(text_rid); +} + +void TextMesh::set_horizontal_alignment(HorizontalAlignment p_alignment) { + ERR_FAIL_INDEX((int)p_alignment, 4); + if (horizontal_alignment != p_alignment) { + horizontal_alignment = p_alignment; + _request_update(); + } +} + +HorizontalAlignment TextMesh::get_horizontal_alignment() const { + return horizontal_alignment; +} + +void TextMesh::set_text(const String &p_string) { + if (text != p_string) { + text = p_string; + xl_text = tr(text); + dirty_text = true; + _request_update(); + } +} + +String TextMesh::get_text() const { + return text; +} + +void TextMesh::_font_changed() { + dirty_font = true; + dirty_cache = true; + call_deferred(SNAME("_request_update")); +} + +void TextMesh::set_font(const Ref<Font> &p_font) { + if (font_override != p_font) { + if (font_override.is_valid()) { + font_override->disconnect(CoreStringNames::get_singleton()->changed, Callable(this, "_font_changed")); + } + font_override = p_font; + dirty_font = true; + dirty_cache = true; + if (font_override.is_valid()) { + font_override->connect(CoreStringNames::get_singleton()->changed, Callable(this, "_font_changed")); + } + _request_update(); + } +} + +Ref<Font> TextMesh::get_font() const { + return font_override; +} + +Ref<Font> TextMesh::_get_font_or_default() const { + if (font_override.is_valid() && font_override->get_data_count() > 0) { + return font_override; + } + + // Check the project-defined Theme resource. + if (Theme::get_project_default().is_valid()) { + List<StringName> theme_types; + Theme::get_project_default()->get_type_dependencies(get_class_name(), StringName(), &theme_types); + + for (const StringName &E : theme_types) { + if (Theme::get_project_default()->has_theme_item(Theme::DATA_TYPE_FONT, "font", E)) { + return Theme::get_project_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", E); + } + } + } + + // Lastly, fall back on the items defined in the default Theme, if they exist. + { + List<StringName> theme_types; + Theme::get_default()->get_type_dependencies(get_class_name(), StringName(), &theme_types); + + for (const StringName &E : theme_types) { + if (Theme::get_default()->has_theme_item(Theme::DATA_TYPE_FONT, "font", E)) { + return Theme::get_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", E); + } + } + } + + // If they don't exist, use any type to return the default/empty value. + return Theme::get_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", StringName()); +} + +void TextMesh::set_font_size(int p_size) { + if (font_size != p_size) { + font_size = CLAMP(p_size, 1, 127); + dirty_font = true; + dirty_cache = true; + _request_update(); + } +} + +int TextMesh::get_font_size() const { + return font_size; +} + +void TextMesh::set_depth(real_t p_depth) { + if (depth != p_depth) { + depth = MAX(p_depth, 0.0); + _request_update(); + } +} + +real_t TextMesh::get_depth() const { + return depth; +} + +void TextMesh::set_width(real_t p_width) { + if (width != p_width) { + width = p_width; + _request_update(); + } +} + +real_t TextMesh::get_width() const { + return width; +} + +void TextMesh::set_pixel_size(real_t p_amount) { + if (pixel_size != p_amount) { + pixel_size = CLAMP(p_amount, 0.0001, 128.0); + dirty_cache = true; + _request_update(); + } +} + +real_t TextMesh::get_pixel_size() const { + return pixel_size; +} + +void TextMesh::set_curve_step(real_t p_step) { + if (curve_step != p_step) { + curve_step = CLAMP(p_step, 0.1, 10.0); + dirty_cache = true; + _request_update(); + } +} + +real_t TextMesh::get_curve_step() const { + return curve_step; +} + +void TextMesh::set_text_direction(TextServer::Direction p_text_direction) { + ERR_FAIL_COND((int)p_text_direction < -1 || (int)p_text_direction > 3); + if (text_direction != p_text_direction) { + text_direction = p_text_direction; + dirty_text = true; + _request_update(); + } +} + +TextServer::Direction TextMesh::get_text_direction() const { + return text_direction; +} + +void TextMesh::clear_opentype_features() { + opentype_features.clear(); + dirty_font = true; + _request_update(); +} + +void TextMesh::set_opentype_feature(const String &p_name, int p_value) { + int32_t tag = TS->name_to_tag(p_name); + if (!opentype_features.has(tag) || (int)opentype_features[tag] != p_value) { + opentype_features[tag] = p_value; + dirty_font = true; + _request_update(); + } +} + +int TextMesh::get_opentype_feature(const String &p_name) const { + int32_t tag = TS->name_to_tag(p_name); + if (!opentype_features.has(tag)) { + return -1; + } + return opentype_features[tag]; +} + +void TextMesh::set_language(const String &p_language) { + if (language != p_language) { + language = p_language; + dirty_text = true; + _request_update(); + } +} + +String TextMesh::get_language() const { + return language; +} + +void TextMesh::set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser) { + if (st_parser != p_parser) { + st_parser = p_parser; + dirty_text = true; + _request_update(); + } +} + +TextServer::StructuredTextParser TextMesh::get_structured_text_bidi_override() const { + return st_parser; +} + +void TextMesh::set_structured_text_bidi_override_options(Array p_args) { + if (st_args != p_args) { + st_args = p_args; + dirty_text = true; + _request_update(); + } +} + +Array TextMesh::get_structured_text_bidi_override_options() const { + return st_args; +} + +void TextMesh::set_uppercase(bool p_uppercase) { + if (uppercase != p_uppercase) { + uppercase = p_uppercase; + dirty_text = true; + _request_update(); + } +} + +bool TextMesh::is_uppercase() const { + return uppercase; +} diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h index 6b0d5993a1..3849c92a7b 100644 --- a/scene/resources/primitive_meshes.h +++ b/scene/resources/primitive_meshes.h @@ -31,7 +31,9 @@ #ifndef PRIMITIVE_MESHES_H #define PRIMITIVE_MESHES_H +#include "scene/resources/font.h" #include "scene/resources/mesh.h" +#include "servers/text_server.h" ///@TODO probably should change a few integers to unsigned integers... @@ -447,5 +449,129 @@ public: RibbonTrailMesh(); }; +/** + Text... +*/ + +class TextMesh : public PrimitiveMesh { + GDCLASS(TextMesh, PrimitiveMesh); + +private: + struct ContourPoint { + Vector2 point; + bool sharp = false; + + ContourPoint(){}; + ContourPoint(const Vector2 &p_pt, bool p_sharp) { + point = p_pt; + sharp = p_sharp; + }; + }; + struct ContourInfo { + real_t length = 0.0; + bool ccw = true; + ContourInfo(){}; + ContourInfo(real_t p_len, bool p_ccw) { + length = p_len; + ccw = p_ccw; + } + }; + struct GlyphMeshData { + Vector<Vector2> triangles; + Vector<Vector<ContourPoint>> contours; + Vector<ContourInfo> contours_info; + Vector2 min_p = Vector2(INFINITY, INFINITY); + Vector2 max_p = Vector2(-INFINITY, -INFINITY); + }; + mutable HashMap<uint32_t, GlyphMeshData> cache; + + RID text_rid; + String text; + String xl_text; + + int font_size = 16; + Ref<Font> font_override; + float width = 500.0; + + HorizontalAlignment horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER; + bool uppercase = false; + Dictionary opentype_features; + String language; + TextServer::Direction text_direction = TextServer::DIRECTION_AUTO; + TextServer::StructuredTextParser st_parser = TextServer::STRUCTURED_TEXT_DEFAULT; + Array st_args; + + real_t depth = 0.05; + real_t pixel_size = 0.01; + real_t curve_step = 0.5; + + mutable bool dirty_text = true; + mutable bool dirty_font = true; + mutable bool dirty_cache = true; + + void _generate_glyph_mesh_data(uint32_t p_hash, const Glyph &p_glyph) const; + void _font_changed(); + +protected: + static void _bind_methods(); + void _notification(int p_what); + + virtual void _create_mesh_array(Array &p_arr) const override; + + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; + +public: + GDVIRTUAL2RC(Array, _structured_text_parser, Array, String) + + TextMesh(); + ~TextMesh(); + + void set_horizontal_alignment(HorizontalAlignment p_alignment); + HorizontalAlignment get_horizontal_alignment() const; + + void set_text(const String &p_string); + String get_text() const; + + void set_font(const Ref<Font> &p_font); + Ref<Font> get_font() const; + Ref<Font> _get_font_or_default() const; + + void set_font_size(int p_size); + int get_font_size() const; + + void set_text_direction(TextServer::Direction p_text_direction); + TextServer::Direction get_text_direction() const; + + void set_opentype_feature(const String &p_name, int p_value); + int get_opentype_feature(const String &p_name) const; + void clear_opentype_features(); + + void set_language(const String &p_language); + String get_language() const; + + void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser); + TextServer::StructuredTextParser get_structured_text_bidi_override() const; + + void set_structured_text_bidi_override_options(Array p_args); + Array get_structured_text_bidi_override_options() const; + + void set_uppercase(bool p_uppercase); + bool is_uppercase() const; + + void set_width(real_t p_width); + real_t get_width() const; + + void set_depth(real_t p_depth); + real_t get_depth() const; + + void set_curve_step(real_t p_step); + real_t get_curve_step() const; + + void set_pixel_size(real_t p_amount); + real_t get_pixel_size() const; +}; + VARIANT_ENUM_CAST(RibbonTrailMesh::Shape) #endif diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/rectangle_shape_2d.cpp index 5e88c9974c..a64b262cb4 100644 --- a/scene/resources/rectangle_shape_2d.cpp +++ b/scene/resources/rectangle_shape_2d.cpp @@ -101,7 +101,7 @@ void RectangleShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_size", "size"), &RectangleShape2D::set_size); ClassDB::bind_method(D_METHOD("get_size"), &RectangleShape2D::get_size); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, "suffix:px"), "set_size", "get_size"); } RectangleShape2D::RectangleShape2D() : diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index ae321fd9a7..193bd0ac05 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -867,7 +867,7 @@ void ResourceLoaderText::get_dependencies(Ref<FileAccess> p_f, List<String> *p_d } } -Error ResourceLoaderText::rename_dependencies(Ref<FileAccess> p_f, const String &p_path, const Map<String, String> &p_map) { +Error ResourceLoaderText::rename_dependencies(Ref<FileAccess> p_f, const String &p_path, const HashMap<String, String> &p_map) { open(p_f, true); ERR_FAIL_COND_V(error != OK, error); ignore_resource_parsing = true; @@ -1232,7 +1232,7 @@ Error ResourceLoaderText::save_as_binary(Ref<FileAccess> p_f, const String &p_pa } if (!assign.is_empty()) { - Map<StringName, int> empty_string_map; //unused + HashMap<StringName, int> empty_string_map; //unused bs_save_unicode_string(wf2, assign, true); ResourceFormatSaverBinaryInstance::write_variant(wf2, value, dummy_read.resource_index_map, dummy_read.external_resources, empty_string_map); prop_count++; @@ -1293,7 +1293,7 @@ Error ResourceLoaderText::save_as_binary(Ref<FileAccess> p_f, const String &p_pa String name = E.name; Variant value = packed_scene->get(name); - Map<StringName, int> empty_string_map; //unused + HashMap<StringName, int> empty_string_map; //unused bs_save_unicode_string(wf2, name, true); ResourceFormatSaverBinaryInstance::write_variant(wf2, value, dummy_read.resource_index_map, dummy_read.external_resources, empty_string_map); prop_count++; @@ -1507,7 +1507,7 @@ void ResourceFormatLoaderText::get_dependencies(const String &p_path, List<Strin loader.get_dependencies(f, p_dependencies, p_add_types); } -Error ResourceFormatLoaderText::rename_dependencies(const String &p_path, const Map<String, String> &p_map) { +Error ResourceFormatLoaderText::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { Error err = OK; { Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); @@ -1737,7 +1737,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso #ifdef TOOLS_ENABLED // Keep order from cached ids. - Set<String> cached_ids_found; + RBSet<String> cached_ids_found; for (KeyValue<Ref<Resource>, String> &E : external_resources) { String cached_id = E.key->get_id_for_path(local_path); if (cached_id.is_empty() || cached_ids_found.has(cached_id)) { @@ -1809,7 +1809,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso f->store_line(String()); // Separate. } - Set<String> used_unique_ids; + RBSet<String> used_unique_ids; for (List<Ref<Resource>>::Element *E = saved_resources.front(); E; E = E->next()) { Ref<Resource> res = E->get(); diff --git a/scene/resources/resource_format_text.h b/scene/resources/resource_format_text.h index e67df72d7e..adab503599 100644 --- a/scene/resources/resource_format_text.h +++ b/scene/resources/resource_format_text.h @@ -58,8 +58,8 @@ class ResourceLoaderText { bool ignore_resource_parsing = false; - Map<String, ExtResource> ext_resources; - Map<String, Ref<Resource>> int_resources; + HashMap<String, ExtResource> ext_resources; + HashMap<String, Ref<Resource>> int_resources; int resources_total = 0; int resource_current = 0; @@ -76,7 +76,7 @@ class ResourceLoaderText { ResourceUID::ID res_uid = ResourceUID::INVALID_ID; - Map<String, String> remaps; + HashMap<String, String> remaps; static Error _parse_sub_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceLoaderText *>(p_self)->_parse_sub_resource(p_stream, r_res, line, r_err_str); } static Error _parse_ext_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceLoaderText *>(p_self)->_parse_ext_resource(p_stream, r_res, line, r_err_str); } @@ -90,10 +90,10 @@ class ResourceLoaderText { }; struct DummyReadData { - Map<Ref<Resource>, int> external_resources; - Map<String, Ref<Resource>> rev_external_resources; - Map<Ref<Resource>, int> resource_index_map; - Map<String, Ref<Resource>> resource_map; + HashMap<Ref<Resource>, int> external_resources; + HashMap<String, Ref<Resource>> rev_external_resources; + HashMap<Ref<Resource>, int> resource_index_map; + HashMap<String, Ref<Resource>> resource_map; }; static Error _parse_sub_resource_dummys(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return _parse_sub_resource_dummy(static_cast<DummyReadData *>(p_self), p_stream, r_res, line, r_err_str); } @@ -124,7 +124,7 @@ public: String recognize(Ref<FileAccess> p_f); ResourceUID::ID get_uid(Ref<FileAccess> p_f); void get_dependencies(Ref<FileAccess> p_f, List<String> *p_dependencies, bool p_add_types); - Error rename_dependencies(Ref<FileAccess> p_f, const String &p_path, const Map<String, String> &p_map); + Error rename_dependencies(Ref<FileAccess> p_f, const String &p_path, const HashMap<String, String> &p_map); Error save_as_binary(Ref<FileAccess> p_f, const String &p_path); ResourceLoaderText(); @@ -140,7 +140,7 @@ public: virtual String get_resource_type(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); - virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); + virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); static Error convert_file_to_binary(const String &p_src_path, const String &p_dst_path); @@ -163,12 +163,12 @@ class ResourceFormatSaverTextInstance { bool operator<(const NonPersistentKey &p_key) const { return base == p_key.base ? property < p_key.property : base < p_key.base; } }; - Map<NonPersistentKey, Ref<Resource>> non_persistent_map; + RBMap<NonPersistentKey, Ref<Resource>> non_persistent_map; - Set<Ref<Resource>> resource_set; + RBSet<Ref<Resource>> resource_set; List<Ref<Resource>> saved_resources; - Map<Ref<Resource>, String> external_resources; - Map<Ref<Resource>, String> internal_resources; + HashMap<Ref<Resource>, String> external_resources; + HashMap<Ref<Resource>, String> internal_resources; struct ResourceSort { Ref<Resource> resource; diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp index cea8ca1b29..d53c777492 100644 --- a/scene/resources/segment_shape_2d.cpp +++ b/scene/resources/segment_shape_2d.cpp @@ -88,8 +88,8 @@ void SegmentShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_b", "b"), &SegmentShape2D::set_b); ClassDB::bind_method(D_METHOD("get_b"), &SegmentShape2D::get_b); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "a"), "set_a", "get_a"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "b"), "set_b", "get_b"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "a", PROPERTY_HINT_NONE, "suffix:px"), "set_a", "get_a"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "b", PROPERTY_HINT_NONE, "suffix:px"), "set_b", "get_b"); } SegmentShape2D::SegmentShape2D() : diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp index 6b1f89454f..d49157b1b8 100644 --- a/scene/resources/shader.cpp +++ b/scene/resources/shader.cpp @@ -100,7 +100,7 @@ RID Shader::get_rid() const { void Shader::set_default_texture_param(const StringName &p_param, const Ref<Texture2D> &p_texture, int p_index) { if (p_texture.is_valid()) { if (!default_textures.has(p_param)) { - default_textures[p_param] = Map<int, Ref<Texture2D>>(); + default_textures[p_param] = HashMap<int, Ref<Texture2D>>(); } default_textures[p_param][p_index] = p_texture; RS::get_singleton()->shader_set_default_texture_param(shader, p_param, p_texture->get_rid(), p_index); @@ -126,7 +126,7 @@ Ref<Texture2D> Shader::get_default_texture_param(const StringName &p_param, int } void Shader::get_default_texture_param_list(List<StringName> *r_textures) const { - for (const KeyValue<StringName, Map<int, Ref<Texture2D>>> &E : default_textures) { + for (const KeyValue<StringName, HashMap<int, Ref<Texture2D>>> &E : default_textures) { r_textures->push_back(E.key); } } diff --git a/scene/resources/shader.h b/scene/resources/shader.h index 3212dcd287..11c9f60ce8 100644 --- a/scene/resources/shader.h +++ b/scene/resources/shader.h @@ -58,8 +58,8 @@ private: // shaders keep a list of ShaderMaterial -> RenderingServer name translations, to make // conversion fast and save memory. mutable bool params_cache_dirty = true; - mutable Map<StringName, StringName> params_cache; //map a shader param to a material param.. - Map<StringName, Map<int, Ref<Texture2D>>> default_textures; + mutable HashMap<StringName, StringName> params_cache; //map a shader param to a material param.. + HashMap<StringName, HashMap<int, Ref<Texture2D>>> default_textures; virtual void _update_shader() const; //used for visual shader protected: @@ -86,9 +86,9 @@ public: get_param_list(nullptr); } - const Map<StringName, StringName>::Element *E = params_cache.find(p_param); + const HashMap<StringName, StringName>::Iterator E = params_cache.find(p_param); if (E) { - return E->get(); + return E->value; } return StringName(); } diff --git a/scene/resources/shape_3d.cpp b/scene/resources/shape_3d.cpp index ffb2b27644..4423c1d7bb 100644 --- a/scene/resources/shape_3d.cpp +++ b/scene/resources/shape_3d.cpp @@ -117,7 +117,7 @@ void Shape3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_debug_mesh"), &Shape3D::get_debug_mesh); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "custom_solver_bias", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_custom_solver_bias", "get_custom_solver_bias"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001,suffix:m"), "set_margin", "get_margin"); } Shape3D::Shape3D() { diff --git a/scene/resources/skin.cpp b/scene/resources/skin.cpp index 54ed71999c..1c04ba0cd4 100644 --- a/scene/resources/skin.cpp +++ b/scene/resources/skin.cpp @@ -130,11 +130,12 @@ bool Skin::_get(const StringName &p_name, Variant &r_ret) const { } void Skin::_get_property_list(List<PropertyInfo> *p_list) const { - p_list->push_back(PropertyInfo(Variant::INT, "bind_count", PROPERTY_HINT_RANGE, "0,16384,1,or_greater")); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("bind_count"), PROPERTY_HINT_RANGE, "0,16384,1,or_greater")); for (int i = 0; i < get_bind_count(); i++) { - p_list->push_back(PropertyInfo(Variant::STRING_NAME, "bind/" + itos(i) + "/name")); - p_list->push_back(PropertyInfo(Variant::INT, "bind/" + itos(i) + "/bone", PROPERTY_HINT_RANGE, "0,16384,1,or_greater", get_bind_name(i) != StringName() ? PROPERTY_USAGE_NO_EDITOR : PROPERTY_USAGE_DEFAULT)); - p_list->push_back(PropertyInfo(Variant::TRANSFORM3D, "bind/" + itos(i) + "/pose")); + const String prefix = vformat("%s/%d/", PNAME("bind"), i); + p_list->push_back(PropertyInfo(Variant::STRING_NAME, prefix + PNAME("name"))); + p_list->push_back(PropertyInfo(Variant::INT, prefix + PNAME("bone"), PROPERTY_HINT_RANGE, "0,16384,1,or_greater", get_bind_name(i) != StringName() ? PROPERTY_USAGE_NO_EDITOR : PROPERTY_USAGE_DEFAULT)); + p_list->push_back(PropertyInfo(Variant::TRANSFORM3D, prefix + PNAME("pose"))); } } diff --git a/scene/resources/sky.cpp b/scene/resources/sky.cpp index 9cb6a16f5c..735134e27b 100644 --- a/scene/resources/sky.cpp +++ b/scene/resources/sky.cpp @@ -83,7 +83,7 @@ void Sky::_bind_methods() { ClassDB::bind_method(D_METHOD("get_material"), &Sky::get_material); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "sky_material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,PanoramaSkyMaterial,ProceduralSkyMaterial,PhysicalSkyMaterial"), "set_material", "get_material"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Automatic,HighQuality,HighQualityIncremental,RealTime"), "set_process_mode", "get_process_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Automatic,High-Quality,High-Quality Incremental,Real-Time"), "set_process_mode", "get_process_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radiance_size", PROPERTY_HINT_ENUM, "32,64,128,256,512,1024,2048"), "set_radiance_size", "get_radiance_size"); BIND_ENUM_CONSTANT(RADIANCE_SIZE_32); diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp index 7874d77298..593689fbcb 100644 --- a/scene/resources/sky_material.cpp +++ b/scene/resources/sky_material.cpp @@ -226,7 +226,7 @@ void ProceduralSkyMaterial::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_ground_energy", "get_ground_energy"); ADD_GROUP("Sun", "sun_"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_max", "get_sun_angle_max"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01,degrees"), "set_sun_angle_max", "get_sun_angle_max"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_curve", PROPERTY_HINT_EXP_EASING), "set_sun_curve", "get_sun_curve"); ADD_GROUP("", ""); diff --git a/scene/resources/sphere_shape_3d.cpp b/scene/resources/sphere_shape_3d.cpp index 8de0dc1650..fc1e610e98 100644 --- a/scene/resources/sphere_shape_3d.cpp +++ b/scene/resources/sphere_shape_3d.cpp @@ -78,7 +78,7 @@ void SphereShape3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_radius", "radius"), &SphereShape3D::set_radius); ClassDB::bind_method(D_METHOD("get_radius"), &SphereShape3D::get_radius); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), "set_radius", "get_radius"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater,suffix:m"), "set_radius", "get_radius"); } SphereShape3D::SphereShape3D() : diff --git a/scene/resources/sprite_frames.cpp b/scene/resources/sprite_frames.cpp index ff5a85392c..ba21b9fd17 100644 --- a/scene/resources/sprite_frames.cpp +++ b/scene/resources/sprite_frames.cpp @@ -33,38 +33,38 @@ #include "scene/scene_string_names.h" void SpriteFrames::add_frame(const StringName &p_anim, const Ref<Texture2D> &p_frame, int p_at_pos) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - if (p_at_pos >= 0 && p_at_pos < E->get().frames.size()) { - E->get().frames.insert(p_at_pos, p_frame); + if (p_at_pos >= 0 && p_at_pos < E->value.frames.size()) { + E->value.frames.insert(p_at_pos, p_frame); } else { - E->get().frames.push_back(p_frame); + E->value.frames.push_back(p_frame); } emit_changed(); } int SpriteFrames::get_frame_count(const StringName &p_anim) const { - const Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::ConstIterator E = animations.find(p_anim); ERR_FAIL_COND_V_MSG(!E, 0, "Animation '" + String(p_anim) + "' doesn't exist."); - return E->get().frames.size(); + return E->value.frames.size(); } void SpriteFrames::remove_frame(const StringName &p_anim, int p_idx) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - E->get().frames.remove_at(p_idx); + E->value.frames.remove_at(p_idx); emit_changed(); } void SpriteFrames::clear(const StringName &p_anim) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - E->get().frames.clear(); + E->value.frames.clear(); emit_changed(); } @@ -124,37 +124,37 @@ Vector<String> SpriteFrames::get_animation_names() const { void SpriteFrames::set_animation_speed(const StringName &p_anim, double p_fps) { ERR_FAIL_COND_MSG(p_fps < 0, "Animation speed cannot be negative (" + itos(p_fps) + ")."); - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - E->get().speed = p_fps; + E->value.speed = p_fps; } double SpriteFrames::get_animation_speed(const StringName &p_anim) const { - const Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::ConstIterator E = animations.find(p_anim); ERR_FAIL_COND_V_MSG(!E, 0, "Animation '" + String(p_anim) + "' doesn't exist."); - return E->get().speed; + return E->value.speed; } void SpriteFrames::set_animation_loop(const StringName &p_anim, bool p_loop) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); - E->get().loop = p_loop; + E->value.loop = p_loop; } bool SpriteFrames::get_animation_loop(const StringName &p_anim) const { - const Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::ConstIterator E = animations.find(p_anim); ERR_FAIL_COND_V_MSG(!E, false, "Animation '" + String(p_anim) + "' doesn't exist."); - return E->get().loop; + return E->value.loop; } void SpriteFrames::_set_frames(const Array &p_frames) { clear_all(); - Map<StringName, Anim>::Element *E = animations.find(SceneStringNames::get_singleton()->_default); + HashMap<StringName, Anim>::Iterator E = animations.find(SceneStringNames::get_singleton()->_default); ERR_FAIL_COND(!E); - E->get().frames.resize(p_frames.size()); - for (int i = 0; i < E->get().frames.size(); i++) { - E->get().frames.write[i] = p_frames[i]; + E->value.frames.resize(p_frames.size()); + for (int i = 0; i < E->value.frames.size(); i++) { + E->value.frames.write[i] = p_frames[i]; } } diff --git a/scene/resources/sprite_frames.h b/scene/resources/sprite_frames.h index 12b69afde1..e32ccc1336 100644 --- a/scene/resources/sprite_frames.h +++ b/scene/resources/sprite_frames.h @@ -42,7 +42,7 @@ class SpriteFrames : public Resource { Vector<Ref<Texture2D>> frames; }; - Map<StringName, Anim> animations; + HashMap<StringName, Anim> animations; Array _get_frames() const; void _set_frames(const Array &p_frames); @@ -73,24 +73,24 @@ public: void add_frame(const StringName &p_anim, const Ref<Texture2D> &p_frame, int p_at_pos = -1); int get_frame_count(const StringName &p_anim) const; _FORCE_INLINE_ Ref<Texture2D> get_frame(const StringName &p_anim, int p_idx) const { - const Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::ConstIterator E = animations.find(p_anim); ERR_FAIL_COND_V_MSG(!E, Ref<Texture2D>(), "Animation '" + String(p_anim) + "' doesn't exist."); ERR_FAIL_COND_V(p_idx < 0, Ref<Texture2D>()); - if (p_idx >= E->get().frames.size()) { + if (p_idx >= E->value.frames.size()) { return Ref<Texture2D>(); } - return E->get().frames[p_idx]; + return E->value.frames[p_idx]; } void set_frame(const StringName &p_anim, int p_idx, const Ref<Texture2D> &p_frame) { - Map<StringName, Anim>::Element *E = animations.find(p_anim); + HashMap<StringName, Anim>::Iterator E = animations.find(p_anim); ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist."); ERR_FAIL_COND(p_idx < 0); - if (p_idx >= E->get().frames.size()) { + if (p_idx >= E->value.frames.size()) { return; } - E->get().frames.write[p_idx] = p_frame; + E->value.frames.write[p_idx] = p_frame; } void remove_frame(const StringName &p_anim, int p_idx); void clear(const StringName &p_anim); diff --git a/scene/resources/syntax_highlighter.h b/scene/resources/syntax_highlighter.h index 143f1679c6..1243a9dbf7 100644 --- a/scene/resources/syntax_highlighter.h +++ b/scene/resources/syntax_highlighter.h @@ -41,7 +41,7 @@ class SyntaxHighlighter : public Resource { GDCLASS(SyntaxHighlighter, Resource) private: - Map<int, Dictionary> highlighting_cache; + RBMap<int, Dictionary> highlighting_cache; void _lines_edited_from(int p_from_line, int p_to_line); protected: @@ -83,7 +83,7 @@ private: bool line_only = false; }; Vector<ColorRegion> color_regions; - Map<int, int> color_region_cache; + HashMap<int, int> color_region_cache; Dictionary keywords; Dictionary member_keywords; diff --git a/scene/resources/text_line.cpp b/scene/resources/text_line.cpp index 337776fd47..f9390ca528 100644 --- a/scene/resources/text_line.cpp +++ b/scene/resources/text_line.cpp @@ -36,7 +36,7 @@ void TextLine::_bind_methods() { ClassDB::bind_method(D_METHOD("set_direction", "direction"), &TextLine::set_direction); ClassDB::bind_method(D_METHOD("get_direction"), &TextLine::get_direction); - ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Light-to-right,Right-to-left"), "set_direction", "get_direction"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Left-to-right,Right-to-left"), "set_direction", "get_direction"); ClassDB::bind_method(D_METHOD("set_orientation", "orientation"), &TextLine::set_orientation); ClassDB::bind_method(D_METHOD("get_orientation"), &TextLine::get_orientation); diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp index 61adaf43dd..477b41efaa 100644 --- a/scene/resources/text_paragraph.cpp +++ b/scene/resources/text_paragraph.cpp @@ -139,7 +139,7 @@ void TextParagraph::_bind_methods() { void TextParagraph::_shape_lines() { if (lines_dirty) { - for (int i = 0; i < lines_rid.size(); i++) { + for (int i = 0; i < (int)lines_rid.size(); i++) { TS->free_rid(lines_rid[i]); } lines_rid.clear(); @@ -218,14 +218,14 @@ void TextParagraph::_shape_lines() { // Fill after min_size calculation. if (autowrap_enabled) { - int visible_lines = (max_lines_visible >= 0) ? MIN(max_lines_visible, lines_rid.size()) : lines_rid.size(); - bool lines_hidden = visible_lines > 0 && visible_lines < lines_rid.size(); + int visible_lines = (max_lines_visible >= 0) ? MIN(max_lines_visible, (int)lines_rid.size()) : (int)lines_rid.size(); + bool lines_hidden = visible_lines > 0 && visible_lines < (int)lines_rid.size(); if (lines_hidden) { overrun_flags |= TextServer::OVERRUN_ENFORCE_ELLIPSIS; } if (alignment == HORIZONTAL_ALIGNMENT_FILL) { - for (int i = 0; i < lines_rid.size(); i++) { - if (i < visible_lines - 1 || lines_rid.size() == 1) { + for (int i = 0; i < (int)lines_rid.size(); i++) { + if (i < visible_lines - 1 || (int)lines_rid.size() == 1) { TS->shaped_text_fit_to_width(lines_rid[i], width, flags); } else if (i == (visible_lines - 1)) { TS->shaped_text_overrun_trim_to_width(lines_rid[visible_lines - 1], width, overrun_flags); @@ -238,7 +238,7 @@ void TextParagraph::_shape_lines() { } else { // Autowrap disabled. - for (int i = 0; i < lines_rid.size(); i++) { + for (int i = 0; i < (int)lines_rid.size(); i++) { if (alignment == HORIZONTAL_ALIGNMENT_FILL) { TS->shaped_text_fit_to_width(lines_rid[i], width, flags); overrun_flags |= TextServer::OVERRUN_JUSTIFICATION_AWARE; @@ -258,8 +258,10 @@ RID TextParagraph::get_rid() const { } RID TextParagraph::get_line_rid(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), RID()); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), RID()); return lines_rid[p_line]; } @@ -268,9 +270,11 @@ RID TextParagraph::get_dropcap_rid() const { } void TextParagraph::clear() { + _THREAD_SAFE_METHOD_ + spacing_top = 0; spacing_bottom = 0; - for (int i = 0; i < lines_rid.size(); i++) { + for (int i = 0; i < (int)lines_rid.size(); i++) { TS->free_rid(lines_rid[i]); } lines_rid.clear(); @@ -279,57 +283,79 @@ void TextParagraph::clear() { } void TextParagraph::set_preserve_invalid(bool p_enabled) { + _THREAD_SAFE_METHOD_ + TS->shaped_text_set_preserve_invalid(rid, p_enabled); TS->shaped_text_set_preserve_invalid(dropcap_rid, p_enabled); lines_dirty = true; } bool TextParagraph::get_preserve_invalid() const { + _THREAD_SAFE_METHOD_ + return TS->shaped_text_get_preserve_invalid(rid); } void TextParagraph::set_preserve_control(bool p_enabled) { + _THREAD_SAFE_METHOD_ + TS->shaped_text_set_preserve_control(rid, p_enabled); TS->shaped_text_set_preserve_control(dropcap_rid, p_enabled); lines_dirty = true; } bool TextParagraph::get_preserve_control() const { + _THREAD_SAFE_METHOD_ + return TS->shaped_text_get_preserve_control(rid); } void TextParagraph::set_direction(TextServer::Direction p_direction) { + _THREAD_SAFE_METHOD_ + TS->shaped_text_set_direction(rid, p_direction); TS->shaped_text_set_direction(dropcap_rid, p_direction); lines_dirty = true; } TextServer::Direction TextParagraph::get_direction() const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); return TS->shaped_text_get_direction(rid); } void TextParagraph::set_custom_punctuation(const String &p_punct) { + _THREAD_SAFE_METHOD_ + TS->shaped_text_set_custom_punctuation(rid, p_punct); lines_dirty = true; } String TextParagraph::get_custom_punctuation() const { + _THREAD_SAFE_METHOD_ + return TS->shaped_text_get_custom_punctuation(rid); } void TextParagraph::set_orientation(TextServer::Orientation p_orientation) { + _THREAD_SAFE_METHOD_ + TS->shaped_text_set_orientation(rid, p_orientation); TS->shaped_text_set_orientation(dropcap_rid, p_orientation); lines_dirty = true; } TextServer::Orientation TextParagraph::get_orientation() const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); return TS->shaped_text_get_orientation(rid); } bool TextParagraph::set_dropcap(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Rect2 &p_dropcap_margins, const Dictionary &p_opentype_features, const String &p_language) { + _THREAD_SAFE_METHOD_ + ERR_FAIL_COND_V(p_fonts.is_null(), false); TS->shaped_text_clear(dropcap_rid); dropcap_margins = p_dropcap_margins; @@ -339,12 +365,16 @@ bool TextParagraph::set_dropcap(const String &p_text, const Ref<Font> &p_fonts, } void TextParagraph::clear_dropcap() { + _THREAD_SAFE_METHOD_ + dropcap_margins = Rect2(); TS->shaped_text_clear(dropcap_rid); lines_dirty = true; } bool TextParagraph::add_string(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language, const Variant &p_meta) { + _THREAD_SAFE_METHOD_ + ERR_FAIL_COND_V(p_fonts.is_null(), false); bool res = TS->shaped_text_add_string(rid, p_text, p_fonts->get_rids(), p_size, p_opentype_features, p_language, p_meta); spacing_top = p_fonts->get_spacing(TextServer::SPACING_TOP); @@ -362,23 +392,31 @@ int TextParagraph::get_spacing_bottom() const { } void TextParagraph::set_bidi_override(const Array &p_override) { + _THREAD_SAFE_METHOD_ + TS->shaped_text_set_bidi_override(rid, p_override); lines_dirty = true; } bool TextParagraph::add_object(Variant p_key, const Size2 &p_size, InlineAlignment p_inline_align, int p_length) { + _THREAD_SAFE_METHOD_ + bool res = TS->shaped_text_add_object(rid, p_key, p_size, p_inline_align, p_length); lines_dirty = true; return res; } bool TextParagraph::resize_object(Variant p_key, const Size2 &p_size, InlineAlignment p_inline_align) { + _THREAD_SAFE_METHOD_ + bool res = TS->shaped_text_resize_object(rid, p_key, p_size, p_inline_align); lines_dirty = true; return res; } void TextParagraph::set_alignment(HorizontalAlignment p_alignment) { + _THREAD_SAFE_METHOD_ + if (alignment != p_alignment) { if (alignment == HORIZONTAL_ALIGNMENT_FILL || p_alignment == HORIZONTAL_ALIGNMENT_FILL) { alignment = p_alignment; @@ -394,11 +432,15 @@ HorizontalAlignment TextParagraph::get_alignment() const { } void TextParagraph::tab_align(const Vector<float> &p_tab_stops) { + _THREAD_SAFE_METHOD_ + tab_stops = p_tab_stops; lines_dirty = true; } void TextParagraph::set_flags(uint16_t p_flags) { + _THREAD_SAFE_METHOD_ + if (flags != p_flags) { flags = p_flags; lines_dirty = true; @@ -410,6 +452,8 @@ uint16_t TextParagraph::get_flags() const { } void TextParagraph::set_text_overrun_behavior(TextParagraph::OverrunBehavior p_behavior) { + _THREAD_SAFE_METHOD_ + if (overrun_behavior != p_behavior) { overrun_behavior = p_behavior; lines_dirty = true; @@ -421,6 +465,8 @@ TextParagraph::OverrunBehavior TextParagraph::get_text_overrun_behavior() const } void TextParagraph::set_width(float p_width) { + _THREAD_SAFE_METHOD_ + if (width != p_width) { width = p_width; lines_dirty = true; @@ -432,6 +478,8 @@ float TextParagraph::get_width() const { } Size2 TextParagraph::get_non_wrapped_size() const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); if (TS->shaped_text_get_orientation(rid) == TextServer::ORIENTATION_HORIZONTAL) { return Size2(TS->shaped_text_get_size(rid).x, TS->shaped_text_get_size(rid).y + spacing_top + spacing_bottom); @@ -441,9 +489,11 @@ Size2 TextParagraph::get_non_wrapped_size() const { } Size2 TextParagraph::get_size() const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); Size2 size; - int visible_lines = (max_lines_visible >= 0) ? MIN(max_lines_visible, lines_rid.size()) : lines_rid.size(); + int visible_lines = (max_lines_visible >= 0) ? MIN(max_lines_visible, (int)lines_rid.size()) : (int)lines_rid.size(); for (int i = 0; i < visible_lines; i++) { Size2 lsize = TS->shaped_text_get_size(lines_rid[i]); if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) { @@ -458,11 +508,15 @@ Size2 TextParagraph::get_size() const { } int TextParagraph::get_line_count() const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - return lines_rid.size(); + return (int)lines_rid.size(); } void TextParagraph::set_max_lines_visible(int p_lines) { + _THREAD_SAFE_METHOD_ + if (p_lines != max_lines_visible) { max_lines_visible = p_lines; lines_dirty = true; @@ -474,14 +528,18 @@ int TextParagraph::get_max_lines_visible() const { } Array TextParagraph::get_line_objects(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), Array()); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), Array()); return TS->shaped_text_get_objects(lines_rid[p_line]); } Rect2 TextParagraph::get_line_object_rect(int p_line, Variant p_key) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), Rect2()); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), Rect2()); Rect2 xrect = TS->shaped_text_get_object_rect(lines_rid[p_line], p_key); for (int i = 0; i < p_line; i++) { Size2 lsize = TS->shaped_text_get_size(lines_rid[i]); @@ -495,8 +553,10 @@ Rect2 TextParagraph::get_line_object_rect(int p_line, Variant p_key) const { } Size2 TextParagraph::get_line_size(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), Size2()); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), Size2()); if (TS->shaped_text_get_orientation(lines_rid[p_line]) == TextServer::ORIENTATION_HORIZONTAL) { return Size2(TS->shaped_text_get_size(lines_rid[p_line]).x, TS->shaped_text_get_size(lines_rid[p_line]).y + spacing_top + spacing_bottom); } else { @@ -505,42 +565,56 @@ Size2 TextParagraph::get_line_size(int p_line) const { } Vector2i TextParagraph::get_line_range(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), Vector2i()); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), Vector2i()); return TS->shaped_text_get_range(lines_rid[p_line]); } float TextParagraph::get_line_ascent(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), 0.f); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), 0.f); return TS->shaped_text_get_ascent(lines_rid[p_line]) + spacing_top; } float TextParagraph::get_line_descent(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), 0.f); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), 0.f); return TS->shaped_text_get_descent(lines_rid[p_line]) + spacing_bottom; } float TextParagraph::get_line_width(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), 0.f); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), 0.f); return TS->shaped_text_get_width(lines_rid[p_line]); } float TextParagraph::get_line_underline_position(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), 0.f); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), 0.f); return TS->shaped_text_get_underline_position(lines_rid[p_line]); } float TextParagraph::get_line_underline_thickness(int p_line) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND_V(p_line < 0 || p_line >= lines_rid.size(), 0.f); + ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), 0.f); return TS->shaped_text_get_underline_thickness(lines_rid[p_line]); } Size2 TextParagraph::get_dropcap_size() const { + _THREAD_SAFE_METHOD_ + return TS->shaped_text_get_size(dropcap_rid) + dropcap_margins.size + dropcap_margins.position; } @@ -549,6 +623,8 @@ int TextParagraph::get_dropcap_lines() const { } void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_color, const Color &p_dc_color) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); Vector2 ofs = p_pos; float h_offset = 0.f; @@ -571,7 +647,7 @@ void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_colo TS->shaped_text_draw(dropcap_rid, p_canvas, dc_off + Vector2(0, TS->shaped_text_get_ascent(dropcap_rid) + dropcap_margins.size.y + dropcap_margins.position.y / 2), -1, -1, p_dc_color); } - int lines_visible = (max_lines_visible >= 0) ? MIN(max_lines_visible, lines_rid.size()) : lines_rid.size(); + int lines_visible = (max_lines_visible >= 0) ? MIN(max_lines_visible, (int)lines_rid.size()) : (int)lines_rid.size(); for (int i = 0; i < lines_visible; i++) { float l_width = width; @@ -650,6 +726,8 @@ void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_colo } void TextParagraph::draw_outline(RID p_canvas, const Vector2 &p_pos, int p_outline_size, const Color &p_color, const Color &p_dc_color) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); Vector2 ofs = p_pos; @@ -673,7 +751,7 @@ void TextParagraph::draw_outline(RID p_canvas, const Vector2 &p_pos, int p_outli TS->shaped_text_draw_outline(dropcap_rid, p_canvas, dc_off + Vector2(dropcap_margins.position.x, TS->shaped_text_get_ascent(dropcap_rid) + dropcap_margins.position.y), -1, -1, p_outline_size, p_dc_color); } - for (int i = 0; i < lines_rid.size(); i++) { + for (int i = 0; i < (int)lines_rid.size(); i++) { float l_width = width; if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) { ofs.x = p_pos.x; @@ -750,6 +828,8 @@ void TextParagraph::draw_outline(RID p_canvas, const Vector2 &p_pos, int p_outli } int TextParagraph::hit_test(const Point2 &p_coords) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); Vector2 ofs; if (TS->shaped_text_get_orientation(rid) == TextServer::ORIENTATION_HORIZONTAL) { @@ -761,7 +841,7 @@ int TextParagraph::hit_test(const Point2 &p_coords) const { return 0; } } - for (int i = 0; i < lines_rid.size(); i++) { + for (int i = 0; i < (int)lines_rid.size(); i++) { if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) { if ((p_coords.y >= ofs.y) && (p_coords.y <= ofs.y + TS->shaped_text_get_size(lines_rid[i]).y)) { return TS->shaped_text_hit_test_position(lines_rid[i], p_coords.x); @@ -778,6 +858,8 @@ int TextParagraph::hit_test(const Point2 &p_coords) const { } void TextParagraph::draw_dropcap(RID p_canvas, const Vector2 &p_pos, const Color &p_color) const { + _THREAD_SAFE_METHOD_ + Vector2 ofs = p_pos; float h_offset = 0.f; if (TS->shaped_text_get_orientation(dropcap_rid) == TextServer::ORIENTATION_HORIZONTAL) { @@ -800,6 +882,8 @@ void TextParagraph::draw_dropcap(RID p_canvas, const Vector2 &p_pos, const Color } void TextParagraph::draw_dropcap_outline(RID p_canvas, const Vector2 &p_pos, int p_outline_size, const Color &p_color) const { + _THREAD_SAFE_METHOD_ + Vector2 ofs = p_pos; float h_offset = 0.f; if (TS->shaped_text_get_orientation(dropcap_rid) == TextServer::ORIENTATION_HORIZONTAL) { @@ -822,8 +906,10 @@ void TextParagraph::draw_dropcap_outline(RID p_canvas, const Vector2 &p_pos, int } void TextParagraph::draw_line(RID p_canvas, const Vector2 &p_pos, int p_line, const Color &p_color) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND(p_line < 0 || p_line >= lines_rid.size()); + ERR_FAIL_COND(p_line < 0 || p_line >= (int)lines_rid.size()); Vector2 ofs = p_pos; @@ -836,8 +922,10 @@ void TextParagraph::draw_line(RID p_canvas, const Vector2 &p_pos, int p_line, co } void TextParagraph::draw_line_outline(RID p_canvas, const Vector2 &p_pos, int p_line, int p_outline_size, const Color &p_color) const { + _THREAD_SAFE_METHOD_ + const_cast<TextParagraph *>(this)->_shape_lines(); - ERR_FAIL_COND(p_line < 0 || p_line >= lines_rid.size()); + ERR_FAIL_COND(p_line < 0 || p_line >= (int)lines_rid.size()); Vector2 ofs = p_pos; if (TS->shaped_text_get_orientation(lines_rid[p_line]) == TextServer::ORIENTATION_HORIZONTAL) { @@ -862,7 +950,7 @@ TextParagraph::TextParagraph() { } TextParagraph::~TextParagraph() { - for (int i = 0; i < lines_rid.size(); i++) { + for (int i = 0; i < (int)lines_rid.size(); i++) { TS->free_rid(lines_rid[i]); } lines_rid.clear(); diff --git a/scene/resources/text_paragraph.h b/scene/resources/text_paragraph.h index 8a8a53943b..4f1aad16b5 100644 --- a/scene/resources/text_paragraph.h +++ b/scene/resources/text_paragraph.h @@ -31,6 +31,7 @@ #ifndef TEXT_PARAGRAPH_H #define TEXT_PARAGRAPH_H +#include "core/templates/local_vector.h" #include "scene/resources/font.h" #include "servers/text_server.h" @@ -38,6 +39,7 @@ class TextParagraph : public RefCounted { GDCLASS(TextParagraph, RefCounted); + _THREAD_SAFE_CLASS_ public: enum OverrunBehavior { @@ -54,7 +56,7 @@ private: Rect2 dropcap_margins; RID rid; - Vector<RID> lines_rid; + LocalVector<RID> lines_rid; int spacing_top = 0; int spacing_bottom = 0; @@ -156,6 +158,8 @@ public: int hit_test(const Point2 &p_coords) const; + Mutex &get_mutex() const { return _thread_safe_; }; + TextParagraph(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Dictionary &p_opentype_features = Dictionary(), const String &p_language = "", float p_width = -1.f, TextServer::Direction p_direction = TextServer::DIRECTION_AUTO, TextServer::Orientation p_orientation = TextServer::ORIENTATION_HORIZONTAL); TextParagraph(); ~TextParagraph(); diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 5850d253e3..9442a58ac1 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -175,8 +175,8 @@ bool ImageTexture::_get(const StringName &p_name, Variant &r_ret) const { } void ImageTexture::_get_property_list(List<PropertyInfo> *p_list) const { - p_list->push_back(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Image", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT)); - p_list->push_back(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::OBJECT, PNAME("image"), PROPERTY_HINT_RESOURCE_TYPE, "Image", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT)); + p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("size"), PROPERTY_HINT_NONE, "")); } void ImageTexture::create_from_image(const Ref<Image> &p_image) { diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 10806aef45..2981f38766 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -129,42 +129,42 @@ void Theme::_get_property_list(List<PropertyInfo> *p_list) const { } // Icons. - for (const KeyValue<StringName, HashMap<StringName, Ref<Texture2D>>> &E : icon_map) { + for (const KeyValue<StringName, ThemeIconMap> &E : icon_map) { for (const KeyValue<StringName, Ref<Texture2D>> &F : E.value) { list.push_back(PropertyInfo(Variant::OBJECT, String() + E.key + "/icons/" + F.key, PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); } } // Styles. - for (const KeyValue<StringName, HashMap<StringName, Ref<StyleBox>>> &E : style_map) { + for (const KeyValue<StringName, ThemeStyleMap> &E : style_map) { for (const KeyValue<StringName, Ref<StyleBox>> &F : E.value) { list.push_back(PropertyInfo(Variant::OBJECT, String() + E.key + "/styles/" + F.key, PROPERTY_HINT_RESOURCE_TYPE, "StyleBox", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); } } // Fonts. - for (const KeyValue<StringName, HashMap<StringName, Ref<Font>>> &E : font_map) { + for (const KeyValue<StringName, ThemeFontMap> &E : font_map) { for (const KeyValue<StringName, Ref<Font>> &F : E.value) { list.push_back(PropertyInfo(Variant::OBJECT, String() + E.key + "/fonts/" + F.key, PROPERTY_HINT_RESOURCE_TYPE, "Font", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL)); } } // Font sizes. - for (const KeyValue<StringName, HashMap<StringName, int>> &E : font_size_map) { + for (const KeyValue<StringName, ThemeFontSizeMap> &E : font_size_map) { for (const KeyValue<StringName, int> &F : E.value) { list.push_back(PropertyInfo(Variant::INT, String() + E.key + "/font_sizes/" + F.key, PROPERTY_HINT_RANGE, "0,256,1,or_greater")); } } // Colors. - for (const KeyValue<StringName, HashMap<StringName, Color>> &E : color_map) { + for (const KeyValue<StringName, ThemeColorMap> &E : color_map) { for (const KeyValue<StringName, Color> &F : E.value) { - list.push_back(PropertyInfo(Variant::INT, String() + E.key + "/colors/" + F.key)); + list.push_back(PropertyInfo(Variant::COLOR, String() + E.key + "/colors/" + F.key)); } } // Constants. - for (const KeyValue<StringName, HashMap<StringName, int>> &E : constant_map) { + for (const KeyValue<StringName, ThemeConstantMap> &E : constant_map) { for (const KeyValue<StringName, int> &F : E.value) { list.push_back(PropertyInfo(Variant::INT, String() + E.key + "/constants/" + F.key)); } @@ -172,7 +172,15 @@ void Theme::_get_property_list(List<PropertyInfo> *p_list) const { // Sort and store properties. list.sort(); + String prev_type; for (const PropertyInfo &E : list) { + // Add groups for types so that their names are left unchanged in the inspector. + String current_type = E.name.get_slice("/", 0); + if (prev_type != current_type) { + p_list->push_back(PropertyInfo(Variant::NIL, current_type, PROPERTY_HINT_NONE, current_type + "/", PROPERTY_USAGE_GROUP)); + prev_type = current_type; + } + p_list->push_back(E); } } @@ -399,7 +407,7 @@ void Theme::add_icon_type(const StringName &p_theme_type) { if (icon_map.has(p_theme_type)) { return; } - icon_map[p_theme_type] = HashMap<StringName, Ref<Texture2D>>(); + icon_map[p_theme_type] = ThemeIconMap(); } void Theme::remove_icon_type(const StringName &p_theme_type) { @@ -424,7 +432,7 @@ void Theme::remove_icon_type(const StringName &p_theme_type) { void Theme::get_icon_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - for (const KeyValue<StringName, HashMap<StringName, Ref<Texture2D>>> &E : icon_map) { + for (const KeyValue<StringName, ThemeIconMap> &E : icon_map) { p_list->push_back(E.key); } } @@ -509,7 +517,7 @@ void Theme::add_stylebox_type(const StringName &p_theme_type) { if (style_map.has(p_theme_type)) { return; } - style_map[p_theme_type] = HashMap<StringName, Ref<StyleBox>>(); + style_map[p_theme_type] = ThemeStyleMap(); } void Theme::remove_stylebox_type(const StringName &p_theme_type) { @@ -534,7 +542,7 @@ void Theme::remove_stylebox_type(const StringName &p_theme_type) { void Theme::get_stylebox_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - for (const KeyValue<StringName, HashMap<StringName, Ref<StyleBox>>> &E : style_map) { + for (const KeyValue<StringName, ThemeStyleMap> &E : style_map) { p_list->push_back(E.key); } } @@ -621,7 +629,7 @@ void Theme::add_font_type(const StringName &p_theme_type) { if (font_map.has(p_theme_type)) { return; } - font_map[p_theme_type] = HashMap<StringName, Ref<Font>>(); + font_map[p_theme_type] = ThemeFontMap(); } void Theme::remove_font_type(const StringName &p_theme_type) { @@ -646,7 +654,7 @@ void Theme::remove_font_type(const StringName &p_theme_type) { void Theme::get_font_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - for (const KeyValue<StringName, HashMap<StringName, Ref<Font>>> &E : font_map) { + for (const KeyValue<StringName, ThemeFontMap> &E : font_map) { p_list->push_back(E.key); } } @@ -720,7 +728,7 @@ void Theme::add_font_size_type(const StringName &p_theme_type) { if (font_size_map.has(p_theme_type)) { return; } - font_size_map[p_theme_type] = HashMap<StringName, int>(); + font_size_map[p_theme_type] = ThemeFontSizeMap(); } void Theme::remove_font_size_type(const StringName &p_theme_type) { @@ -734,7 +742,7 @@ void Theme::remove_font_size_type(const StringName &p_theme_type) { void Theme::get_font_size_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - for (const KeyValue<StringName, HashMap<StringName, int>> &E : font_size_map) { + for (const KeyValue<StringName, ThemeFontSizeMap> &E : font_size_map) { p_list->push_back(E.key); } } @@ -806,7 +814,7 @@ void Theme::add_color_type(const StringName &p_theme_type) { if (color_map.has(p_theme_type)) { return; } - color_map[p_theme_type] = HashMap<StringName, Color>(); + color_map[p_theme_type] = ThemeColorMap(); } void Theme::remove_color_type(const StringName &p_theme_type) { @@ -820,7 +828,7 @@ void Theme::remove_color_type(const StringName &p_theme_type) { void Theme::get_color_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - for (const KeyValue<StringName, HashMap<StringName, Color>> &E : color_map) { + for (const KeyValue<StringName, ThemeColorMap> &E : color_map) { p_list->push_back(E.key); } } @@ -892,7 +900,7 @@ void Theme::add_constant_type(const StringName &p_theme_type) { if (constant_map.has(p_theme_type)) { return; } - constant_map[p_theme_type] = HashMap<StringName, int>(); + constant_map[p_theme_type] = ThemeConstantMap(); } void Theme::remove_constant_type(const StringName &p_theme_type) { @@ -906,7 +914,7 @@ void Theme::remove_constant_type(const StringName &p_theme_type) { void Theme::get_constant_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - for (const KeyValue<StringName, HashMap<StringName, int>> &E : constant_map) { + for (const KeyValue<StringName, ThemeConstantMap> &E : constant_map) { p_list->push_back(E.key); } } @@ -1264,12 +1272,44 @@ void Theme::remove_type(const StringName &p_theme_type) { void Theme::get_type_list(List<StringName> *p_list) const { ERR_FAIL_NULL(p_list); - get_icon_type_list(p_list); - get_stylebox_type_list(p_list); - get_font_type_list(p_list); - get_font_size_type_list(p_list); - get_color_type_list(p_list); - get_constant_type_list(p_list); + // This Set guarantees uniqueness. + // Because each map can have the same type defined, but for this method + // we only want one occurrence of each type. + RBSet<StringName> types; + + // Icons. + for (const KeyValue<StringName, ThemeIconMap> &E : icon_map) { + types.insert(E.key); + } + + // Styles. + for (const KeyValue<StringName, ThemeStyleMap> &E : style_map) { + types.insert(E.key); + } + + // Fonts. + for (const KeyValue<StringName, ThemeFontMap> &E : font_map) { + types.insert(E.key); + } + + // Font sizes. + for (const KeyValue<StringName, ThemeFontSizeMap> &E : font_size_map) { + types.insert(E.key); + } + + // Colors. + for (const KeyValue<StringName, ThemeColorMap> &E : color_map) { + types.insert(E.key); + } + + // Constants. + for (const KeyValue<StringName, ThemeConstantMap> &E : constant_map) { + types.insert(E.key); + } + + for (const StringName &E : types) { + p_list->push_back(E); + } } void Theme::get_type_dependencies(const StringName &p_base_type, const StringName &p_type_variation, List<StringName> *p_list) { @@ -1580,7 +1620,7 @@ void Theme::merge_with(const Ref<Theme> &p_other) { // Colors. { - for (const KeyValue<StringName, HashMap<StringName, Color>> &E : p_other->color_map) { + for (const KeyValue<StringName, ThemeColorMap> &E : p_other->color_map) { for (const KeyValue<StringName, Color> &F : E.value) { set_color(F.key, E.key, F.value); } @@ -1589,7 +1629,7 @@ void Theme::merge_with(const Ref<Theme> &p_other) { // Constants. { - for (const KeyValue<StringName, HashMap<StringName, int>> &E : p_other->constant_map) { + for (const KeyValue<StringName, ThemeConstantMap> &E : p_other->constant_map) { for (const KeyValue<StringName, int> &F : E.value) { set_constant(F.key, E.key, F.value); } @@ -1598,7 +1638,7 @@ void Theme::merge_with(const Ref<Theme> &p_other) { // Fonts. { - for (const KeyValue<StringName, HashMap<StringName, Ref<Font>>> &E : p_other->font_map) { + for (const KeyValue<StringName, ThemeFontMap> &E : p_other->font_map) { for (const KeyValue<StringName, Ref<Font>> &F : E.value) { set_font(F.key, E.key, F.value); } @@ -1607,7 +1647,7 @@ void Theme::merge_with(const Ref<Theme> &p_other) { // Font sizes. { - for (const KeyValue<StringName, HashMap<StringName, int>> &E : p_other->font_size_map) { + for (const KeyValue<StringName, ThemeFontSizeMap> &E : p_other->font_size_map) { for (const KeyValue<StringName, int> &F : E.value) { set_font_size(F.key, E.key, F.value); } @@ -1616,7 +1656,7 @@ void Theme::merge_with(const Ref<Theme> &p_other) { // Icons. { - for (const KeyValue<StringName, HashMap<StringName, Ref<Texture2D>>> &E : p_other->icon_map) { + for (const KeyValue<StringName, ThemeIconMap> &E : p_other->icon_map) { for (const KeyValue<StringName, Ref<Texture2D>> &F : E.value) { set_icon(F.key, E.key, F.value); } @@ -1625,7 +1665,7 @@ void Theme::merge_with(const Ref<Theme> &p_other) { // Styleboxes. { - for (const KeyValue<StringName, HashMap<StringName, Ref<StyleBox>>> &E : p_other->style_map) { + for (const KeyValue<StringName, ThemeStyleMap> &E : p_other->style_map) { for (const KeyValue<StringName, Ref<StyleBox>> &F : E.value) { set_stylebox(F.key, E.key, F.value); } @@ -1645,7 +1685,7 @@ void Theme::merge_with(const Ref<Theme> &p_other) { void Theme::clear() { // These items need disconnecting. { - for (const KeyValue<StringName, HashMap<StringName, Ref<Texture2D>>> &E : icon_map) { + for (const KeyValue<StringName, ThemeIconMap> &E : icon_map) { for (const KeyValue<StringName, Ref<Texture2D>> &F : E.value) { if (F.value.is_valid()) { Ref<Texture2D> icon = F.value; @@ -1656,7 +1696,7 @@ void Theme::clear() { } { - for (const KeyValue<StringName, HashMap<StringName, Ref<StyleBox>>> &E : style_map) { + for (const KeyValue<StringName, ThemeStyleMap> &E : style_map) { for (const KeyValue<StringName, Ref<StyleBox>> &F : E.value) { if (F.value.is_valid()) { Ref<StyleBox> style = F.value; @@ -1667,7 +1707,7 @@ void Theme::clear() { } { - for (const KeyValue<StringName, HashMap<StringName, Ref<Font>>> &E : font_map) { + for (const KeyValue<StringName, ThemeFontMap> &E : font_map) { for (const KeyValue<StringName, Ref<Font>> &F : E.value) { if (F.value.is_valid()) { Ref<Font> font = F.value; diff --git a/scene/resources/theme.h b/scene/resources/theme.h index f8f1e95634..87d7d2fdea 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -47,6 +47,13 @@ class Theme : public Resource { #endif public: + using ThemeIconMap = HashMap<StringName, Ref<Texture2D>>; + using ThemeStyleMap = HashMap<StringName, Ref<StyleBox>>; + using ThemeFontMap = HashMap<StringName, Ref<Font>>; + using ThemeFontSizeMap = HashMap<StringName, int>; + using ThemeColorMap = HashMap<StringName, Color>; + using ThemeConstantMap = HashMap<StringName, int>; + enum DataType { DATA_TYPE_COLOR, DATA_TYPE_CONSTANT, @@ -62,12 +69,12 @@ private: void _emit_theme_changed(bool p_notify_list_changed = false); - HashMap<StringName, HashMap<StringName, Ref<Texture2D>>> icon_map; - HashMap<StringName, HashMap<StringName, Ref<StyleBox>>> style_map; - HashMap<StringName, HashMap<StringName, Ref<Font>>> font_map; - HashMap<StringName, HashMap<StringName, int>> font_size_map; - HashMap<StringName, HashMap<StringName, Color>> color_map; - HashMap<StringName, HashMap<StringName, int>> constant_map; + HashMap<StringName, ThemeIconMap> icon_map; + HashMap<StringName, ThemeStyleMap> style_map; + HashMap<StringName, ThemeFontMap> font_map; + HashMap<StringName, ThemeFontSizeMap> font_size_map; + HashMap<StringName, ThemeColorMap> color_map; + HashMap<StringName, ThemeConstantMap> constant_map; HashMap<StringName, StringName> variation_map; HashMap<StringName, List<StringName>> variation_base_map; diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 67b82af617..cdfe75f478 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -1345,19 +1345,19 @@ int TileSet::get_patterns_count() { return patterns.size(); } -Set<TileSet::TerrainsPattern> TileSet::get_terrains_pattern_set(int p_terrain_set) { - ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), Set<TileSet::TerrainsPattern>()); +RBSet<TileSet::TerrainsPattern> TileSet::get_terrains_pattern_set(int p_terrain_set) { + ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet<TileSet::TerrainsPattern>()); _update_terrains_cache(); - Set<TileSet::TerrainsPattern> output; - for (KeyValue<TileSet::TerrainsPattern, Set<TileMapCell>> kv : per_terrain_pattern_tiles[p_terrain_set]) { + RBSet<TileSet::TerrainsPattern> output; + for (KeyValue<TileSet::TerrainsPattern, RBSet<TileMapCell>> kv : per_terrain_pattern_tiles[p_terrain_set]) { output.insert(kv.key); } return output; } -Set<TileMapCell> TileSet::get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern) { - ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), Set<TileMapCell>()); +RBSet<TileMapCell> TileSet::get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern) { + ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet<TileMapCell>()); _update_terrains_cache(); return per_terrain_pattern_tiles[p_terrain_set][p_terrain_tile_pattern]; } @@ -1368,13 +1368,13 @@ TileMapCell TileSet::get_random_tile_from_terrains_pattern(int p_terrain_set, Ti // Count the sum of probabilities. double sum = 0.0; - Set<TileMapCell> set = per_terrain_pattern_tiles[p_terrain_set][p_terrain_tile_pattern]; - for (Set<TileMapCell>::Element *E = set.front(); E; E = E->next()) { - if (E->get().source_id >= 0) { - Ref<TileSetSource> source = sources[E->get().source_id]; + RBSet<TileMapCell> set = per_terrain_pattern_tiles[p_terrain_set][p_terrain_tile_pattern]; + for (const TileMapCell &E : set) { + if (E.source_id >= 0) { + Ref<TileSetSource> source = sources[E.source_id]; Ref<TileSetAtlasSource> atlas_source = source; if (atlas_source.is_valid()) { - TileData *tile_data = atlas_source->get_tile_data(E->get().get_atlas_coords(), E->get().alternative_tile); + TileData *tile_data = atlas_source->get_tile_data(E.get_atlas_coords(), E.alternative_tile); sum += tile_data->get_probability(); } else { sum += 1.0; @@ -1389,13 +1389,13 @@ TileMapCell TileSet::get_random_tile_from_terrains_pattern(int p_terrain_set, Ti double picked = Math::random(0.0, sum); // Pick the tile. - for (Set<TileMapCell>::Element *E = set.front(); E; E = E->next()) { - if (E->get().source_id >= 0) { - Ref<TileSetSource> source = sources[E->get().source_id]; + for (const TileMapCell &E : set) { + if (E.source_id >= 0) { + Ref<TileSetSource> source = sources[E.source_id]; Ref<TileSetAtlasSource> atlas_source = source; if (atlas_source.is_valid()) { - TileData *tile_data = atlas_source->get_tile_data(E->get().get_atlas_coords(), E->get().alternative_tile); + TileData *tile_data = atlas_source->get_tile_data(E.get_atlas_coords(), E.alternative_tile); count += tile_data->get_probability(); } else { count += 1.0; @@ -1405,7 +1405,7 @@ TileMapCell TileSet::get_random_tile_from_terrains_pattern(int p_terrain_set, Ti } if (count >= picked) { - return E->get(); + return E; } } @@ -2391,7 +2391,7 @@ void TileSet::_compatibility_conversion() { value_array.push_back(alternative_tile); if (!compatibility_tilemap_mapping.has(E.key)) { - compatibility_tilemap_mapping[E.key] = Map<Array, Array>(); + compatibility_tilemap_mapping[E.key] = RBMap<Array, Array>(); } compatibility_tilemap_mapping[E.key][key_array] = value_array; compatibility_tilemap_mapping_tile_modes[E.key] = COMPATIBILITY_TILE_MODE_SINGLE_TILE; @@ -2483,7 +2483,7 @@ void TileSet::_compatibility_conversion() { value_array.push_back(alternative_tile); if (!compatibility_tilemap_mapping.has(E.key)) { - compatibility_tilemap_mapping[E.key] = Map<Array, Array>(); + compatibility_tilemap_mapping[E.key] = RBMap<Array, Array>(); } compatibility_tilemap_mapping[E.key][key_array] = value_array; compatibility_tilemap_mapping_tile_modes[E.key] = COMPATIBILITY_TILE_MODE_ATLAS_TILE; @@ -2571,7 +2571,7 @@ void TileSet::_compatibility_conversion() { for (const KeyValue<int, CompatibilityTileData *> &E : compatibility_data) { memdelete(E.value); } - compatibility_data = Map<int, CompatibilityTileData *>(); + compatibility_data = HashMap<int, CompatibilityTileData *>(); } Array TileSet::compatibility_tilemap_map(int p_tile_id, Vector2i p_coords, bool p_flip_h, bool p_flip_v, bool p_transpose) { @@ -2622,12 +2622,12 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) { // Get or create the compatibility object CompatibilityTileData *ctd; - Map<int, CompatibilityTileData *>::Element *E = compatibility_data.find(id); + HashMap<int, CompatibilityTileData *>::Iterator E = compatibility_data.find(id); if (!E) { ctd = memnew(CompatibilityTileData); compatibility_data.insert(id, ctd); } else { - ctd = E->get(); + ctd = E->value; } if (components.size() < 2) { @@ -3099,7 +3099,7 @@ void TileSet::_get_property_list(List<PropertyInfo> *p_list) const { // Terrains. p_list->push_back(PropertyInfo(Variant::NIL, "Terrains", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP)); for (int terrain_set_index = 0; terrain_set_index < terrain_sets.size(); terrain_set_index++) { - p_list->push_back(PropertyInfo(Variant::INT, vformat("terrain_set_%d/mode", terrain_set_index), PROPERTY_HINT_ENUM, "Match corners and sides,Match corners,Match sides")); + p_list->push_back(PropertyInfo(Variant::INT, vformat("terrain_set_%d/mode", terrain_set_index), PROPERTY_HINT_ENUM, "Match Corners and Sides,Match Corners,Match Sides")); p_list->push_back(PropertyInfo(Variant::NIL, vformat("terrain_set_%d/terrains", terrain_set_index), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, vformat("terrain_set_%d/terrain_", terrain_set_index))); for (int terrain_index = 0; terrain_index < terrain_sets[terrain_set_index].terrains.size(); terrain_index++) { p_list->push_back(PropertyInfo(Variant::STRING, vformat("terrain_set_%d/terrain_%d/name", terrain_set_index, terrain_index))); @@ -3175,7 +3175,7 @@ void TileSet::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "tile_shape", PROPERTY_HINT_ENUM, "Square,Isometric,Half-Offset Square,Hexagon"), "set_tile_shape", "get_tile_shape"); ADD_PROPERTY(PropertyInfo(Variant::INT, "tile_layout", PROPERTY_HINT_ENUM, "Stacked,Stacked Offset,Stairs Right,Stairs Down,Diamond Right,Diamond Down"), "set_tile_layout", "get_tile_layout"); ADD_PROPERTY(PropertyInfo(Variant::INT, "tile_offset_axis", PROPERTY_HINT_ENUM, "Horizontal Offset,Vertical Offset"), "set_tile_offset_axis", "get_tile_offset_axis"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "tile_size"), "set_tile_size", "get_tile_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "tile_size", PROPERTY_HINT_NONE, "suffix:px"), "set_tile_size", "get_tile_size"); // Rendering. ClassDB::bind_method(D_METHOD("set_uv_clipping", "uv_clipping"), &TileSet::set_uv_clipping); @@ -4273,9 +4273,9 @@ void TileSetAtlasSource::_bind_methods() { ClassDB::bind_method(D_METHOD("get_use_texture_padding"), &TileSetAtlasSource::get_use_texture_padding); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_NO_EDITOR), "set_texture", "get_texture"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_margins", "get_margins"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_separation", "get_separation"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_texture_region_size", "get_texture_region_size"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_NO_EDITOR), "set_margins", "get_margins"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_NO_EDITOR), "set_separation", "get_separation"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "suffix:px", PROPERTY_USAGE_NO_EDITOR), "set_texture_region_size", "get_texture_region_size"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_texture_padding", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_use_texture_padding", "get_use_texture_padding"); // Base tiles @@ -5552,7 +5552,7 @@ void TileData::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "get_flip_h"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_v"), "set_flip_v", "get_flip_v"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "transpose"), "set_transpose", "get_transpose"); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "texture_offset"), "set_texture_offset", "get_texture_offset"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "texture_offset", PROPERTY_HINT_NONE, "suffix:px"), "set_texture_offset", "get_texture_offset"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate"), "set_modulate", "get_modulate"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial"), "set_material", "get_material"); ADD_PROPERTY(PropertyInfo(Variant::INT, "z_index"), "set_z_index", "get_z_index"); diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h index 95de46c9ab..633e1f4bed 100644 --- a/scene/resources/tile_set.h +++ b/scene/resources/tile_set.h @@ -69,6 +69,11 @@ union TileMapCell { }; uint64_t _u64t; + + static uint32_t hash(const TileMapCell &p_hash) { + return hash_one_uint64(p_hash._u64t); + } + TileMapCell(int p_source_id = -1, Vector2i p_atlas_coords = Vector2i(-1, -1), int p_alternative_tile = -1) { // default are INVALID_SOURCE, INVALID_ATLAS_COORDS, INVALID_TILE_ALTERNATIVE source_id = p_source_id; set_atlas_coords(p_atlas_coords); @@ -103,13 +108,16 @@ union TileMapCell { bool operator!=(const TileMapCell &p_other) const { return !(source_id == p_other.source_id && coord_x == p_other.coord_x && coord_y == p_other.coord_y && alternative_tile == p_other.alternative_tile); } + bool operator==(const TileMapCell &p_other) const { + return source_id == p_other.source_id && coord_x == p_other.coord_x && coord_y == p_other.coord_y && alternative_tile == p_other.alternative_tile; + } }; class TileMapPattern : public Resource { GDCLASS(TileMapPattern, Resource); Vector2i size; - Map<Vector2i, TileMapCell> pattern; + HashMap<Vector2i, TileMapCell> pattern; void _set_tile_data(const Vector<int> &p_data); Vector<int> _get_tile_data() const; @@ -166,11 +174,11 @@ private: Size2i autotile_tile_size = Size2i(16, 16); int autotile_spacing = 0; - Map<Vector2i, int> autotile_bitmask_flags; - Map<Vector2i, Ref<OccluderPolygon2D>> autotile_occluder_map; - Map<Vector2i, Ref<NavigationPolygon>> autotile_navpoly_map; - Map<Vector2i, int> autotile_priority_map; - Map<Vector2i, int> autotile_z_index_map; + HashMap<Vector2i, int> autotile_bitmask_flags; + HashMap<Vector2i, Ref<OccluderPolygon2D>> autotile_occluder_map; + HashMap<Vector2i, Ref<NavigationPolygon>> autotile_navpoly_map; + HashMap<Vector2i, int> autotile_priority_map; + HashMap<Vector2i, int> autotile_z_index_map; Vector<CompatibilityShapeData> shapes; Ref<OccluderPolygon2D> occluder; @@ -186,9 +194,9 @@ private: COMPATIBILITY_TILE_MODE_ATLAS_TILE, }; - Map<int, CompatibilityTileData *> compatibility_data; - Map<int, int> compatibility_tilemap_mapping_tile_modes; - Map<int, Map<Array, Array>> compatibility_tilemap_mapping; + HashMap<int, CompatibilityTileData *> compatibility_data; + HashMap<int, int> compatibility_tilemap_mapping_tile_modes; + HashMap<int, RBMap<Array, Array>> compatibility_tilemap_mapping; void _compatibility_conversion(); @@ -324,10 +332,10 @@ private: }; Vector<TerrainSet> terrain_sets; - Map<TerrainMode, Map<CellNeighbor, Ref<ArrayMesh>>> terrain_bits_meshes; + HashMap<TerrainMode, HashMap<CellNeighbor, Ref<ArrayMesh>>> terrain_bits_meshes; bool terrain_bits_meshes_dirty = true; - LocalVector<Map<TileSet::TerrainsPattern, Set<TileMapCell>>> per_terrain_pattern_tiles; // Cached data. + LocalVector<RBMap<TileSet::TerrainsPattern, RBSet<TileMapCell>>> per_terrain_pattern_tiles; // Cached data. bool terrains_cache_dirty = true; void _update_terrains_cache(); @@ -343,10 +351,10 @@ private: Variant::Type type = Variant::NIL; }; Vector<CustomDataLayer> custom_data_layers; - Map<String, int> custom_data_layers_by_name; + HashMap<String, int> custom_data_layers_by_name; // Per Atlas source data. - Map<int, Ref<TileSetSource>> sources; + HashMap<int, Ref<TileSetSource>> sources; Vector<int> source_ids; int next_source_id = 0; // --------------------- @@ -357,9 +365,9 @@ private: void _source_changed(); // Tile proxies - Map<int, int> source_level_proxies; - Map<Array, Array> coords_level_proxies; - Map<Array, Array> alternative_level_proxies; + RBMap<int, int> source_level_proxies; + RBMap<Array, Array> coords_level_proxies; + RBMap<Array, Array> alternative_level_proxies; // Helpers Vector<Point2> _get_square_corner_or_side_terrain_bit_polygon(Vector2i p_size, TileSet::CellNeighbor p_bit); @@ -499,8 +507,8 @@ public: int get_patterns_count(); // Terrains. - Set<TerrainsPattern> get_terrains_pattern_set(int p_terrain_set); - Set<TileMapCell> get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern); + RBSet<TerrainsPattern> get_terrains_pattern_set(int p_terrain_set); + RBSet<TileMapCell> get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern); TileMapCell get_random_tile_from_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern); // Helpers @@ -579,7 +587,7 @@ private: LocalVector<real_t> animation_frames_durations; // Alternatives - Map<int, TileData *> alternatives; + HashMap<int, TileData *> alternatives; Vector<int> alternatives_ids; int next_alternative_id = 1; }; @@ -589,9 +597,9 @@ private: Vector2i separation; Size2i texture_region_size = Size2i(16, 16); - Map<Vector2i, TileAlternativesData> tiles; + HashMap<Vector2i, TileAlternativesData> tiles; Vector<Vector2i> tiles_ids; - Map<Vector2i, Vector2i> _coords_mapping_cache; // Maps any coordinate to the including tile + HashMap<Vector2i, Vector2i> _coords_mapping_cache; // Maps any coordinate to the including tile TileData *_get_atlas_tile_data(Vector2i p_atlas_coords, int p_alternative_tile); const TileData *_get_atlas_tile_data(Vector2i p_atlas_coords, int p_alternative_tile) const; @@ -716,7 +724,7 @@ private: bool display_placeholder = false; }; Vector<int> scenes_ids; - Map<int, SceneData> scenes; + HashMap<int, SceneData> scenes; int next_scene_id = 1; void _compute_next_alternative_id(); diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 6848011228..d361aa876b 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -345,8 +345,8 @@ Vector<StringName> VisualShaderNode::get_editable_properties() const { return Vector<StringName>(); } -Map<StringName, String> VisualShaderNode::get_editable_properties_names() const { - return Map<StringName, String>(); +HashMap<StringName, String> VisualShaderNode::get_editable_properties_names() const { + return HashMap<StringName, String>(); } Array VisualShaderNode::get_default_input_values() const { @@ -1178,16 +1178,16 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port StringBuilder global_code; StringBuilder global_code_per_node; - Map<Type, StringBuilder> global_code_per_func; + HashMap<Type, StringBuilder> global_code_per_func; StringBuilder code; - Set<StringName> classes; + RBSet<StringName> classes; global_code += String() + "shader_type canvas_item;\n"; String global_expressions; for (int i = 0, index = 0; i < TYPE_MAX; i++) { - for (Map<int, Node>::Element *E = graph[i].nodes.front(); E; E = E->next()) { - Ref<VisualShaderNodeGlobalExpression> global_expression = Object::cast_to<VisualShaderNodeGlobalExpression>(E->get().node.ptr()); + for (const KeyValue<int, Node> &E : graph[i].nodes) { + Ref<VisualShaderNodeGlobalExpression> global_expression = E.value.node; if (global_expression.is_valid()) { String expr = ""; expr += "// " + global_expression->get_caption() + ":" + itos(index++) + "\n"; @@ -1222,7 +1222,7 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port code += "\nvoid fragment() {\n"; - Set<int> processed; + RBSet<int> processed; Error err = _write_node(p_type, &global_code, &global_code_per_node, &global_code_per_func, code, default_tex_params, input_connections, output_connections, p_node, processed, true, classes); ERR_FAIL_COND_V(err != OK, String()); @@ -1547,11 +1547,11 @@ void VisualShader::reset_state() { } void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { //mode - p_list->push_back(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Node3D,CanvasItem,Particles,Sky,Fog")); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("mode"), PROPERTY_HINT_ENUM, "Node3D,CanvasItem,Particles,Sky,Fog")); //render modes - Map<String, String> blend_mode_enums; - Set<String> toggles; + HashMap<String, String> blend_mode_enums; + RBSet<String> toggles; const Vector<ShaderLanguage::ModeInfo> &rmodes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader_mode)); @@ -1562,7 +1562,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { const String begin = String(info.name); for (int j = 0; j < info.options.size(); j++) { - const String option = String(info.options[j]); + const String option = String(info.options[j]).capitalize(); if (!blend_mode_enums.has(begin)) { blend_mode_enums[begin] = option; @@ -1576,15 +1576,15 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { } for (const KeyValue<String, String> &E : blend_mode_enums) { - p_list->push_back(PropertyInfo(Variant::INT, "modes/" + E.key, PROPERTY_HINT_ENUM, E.value)); + p_list->push_back(PropertyInfo(Variant::INT, vformat("%s/%s", PNAME("modes"), E.key), PROPERTY_HINT_ENUM, E.value)); } - for (Set<String>::Element *E = toggles.front(); E; E = E->next()) { - p_list->push_back(PropertyInfo(Variant::BOOL, "flags/" + E->get())); + for (const String &E : toggles) { + p_list->push_back(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("flags"), E))); } for (const KeyValue<String, Varying> &E : varyings) { - p_list->push_back(PropertyInfo(Variant::STRING, "varyings/" + E.key)); + p_list->push_back(PropertyInfo(Variant::STRING, vformat("%s/%s", PNAME("varyings"), E.key))); } for (int i = 0; i < TYPE_MAX; i++) { @@ -1611,7 +1611,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { } } -Error VisualShader::_write_node(Type type, StringBuilder *global_code, StringBuilder *global_code_per_node, Map<Type, StringBuilder> *global_code_per_func, StringBuilder &code, Vector<VisualShader::DefaultTextureParam> &def_tex_params, const VMap<ConnectionKey, const List<Connection>::Element *> &input_connections, const VMap<ConnectionKey, const List<Connection>::Element *> &output_connections, int node, Set<int> &processed, bool for_preview, Set<StringName> &r_classes) const { +Error VisualShader::_write_node(Type type, StringBuilder *global_code, StringBuilder *global_code_per_node, HashMap<Type, StringBuilder> *global_code_per_func, StringBuilder &code, Vector<VisualShader::DefaultTextureParam> &def_tex_params, const VMap<ConnectionKey, const List<Connection>::Element *> &input_connections, const VMap<ConnectionKey, const List<Connection>::Element *> &output_connections, int node, RBSet<int> &processed, bool for_preview, RBSet<StringName> &r_classes) const { const Ref<VisualShaderNode> vsnode = graph[type].nodes[node].node; if (vsnode->is_disabled()) { @@ -1903,7 +1903,7 @@ Error VisualShader::_write_node(Type type, StringBuilder *global_code, StringBui int output_count = vsnode->get_output_port_count(); int initial_output_count = output_count; - Map<int, bool> expanded_output_ports; + HashMap<int, bool> expanded_output_ports; for (int i = 0; i < initial_output_count; i++) { bool expanded = false; @@ -2133,11 +2133,11 @@ void VisualShader::_update_shader() const { StringBuilder global_code; StringBuilder global_code_per_node; - Map<Type, StringBuilder> global_code_per_func; + HashMap<Type, StringBuilder> global_code_per_func; StringBuilder code; Vector<VisualShader::DefaultTextureParam> default_tex_params; - Set<StringName> classes; - Map<int, int> insertion_pos; + RBSet<StringName> classes; + HashMap<int, int> insertion_pos; static const char *shader_mode_str[Shader::MODE_MAX] = { "spatial", "canvas_item", "particles", "sky", "fog" }; global_code += String() + "shader_type " + shader_mode_str[shader_mode] + ";\n"; @@ -2181,18 +2181,18 @@ void VisualShader::_update_shader() const { static const char *func_name[TYPE_MAX] = { "vertex", "fragment", "light", "start", "process", "collide", "start_custom", "process_custom", "sky", "fog" }; String global_expressions; - Set<String> used_uniform_names; + RBSet<String> used_uniform_names; List<VisualShaderNodeUniform *> uniforms; - Map<int, List<int>> emitters; - Map<int, List<int>> varying_setters; + HashMap<int, List<int>> emitters; + HashMap<int, List<int>> varying_setters; for (int i = 0, index = 0; i < TYPE_MAX; i++) { if (!has_func_name(RenderingServer::ShaderMode(shader_mode), func_name[i])) { continue; } - for (Map<int, Node>::Element *E = graph[i].nodes.front(); E; E = E->next()) { - Ref<VisualShaderNodeGlobalExpression> global_expression = Object::cast_to<VisualShaderNodeGlobalExpression>(E->get().node.ptr()); + for (const KeyValue<int, Node> &E : graph[i].nodes) { + Ref<VisualShaderNodeGlobalExpression> global_expression = E.value.node; if (global_expression.is_valid()) { String expr = ""; expr += "// " + global_expression->get_caption() + ":" + itos(index++) + "\n"; @@ -2201,27 +2201,27 @@ void VisualShader::_update_shader() const { expr += "\n"; global_expressions += expr; } - Ref<VisualShaderNodeUniformRef> uniform_ref = Object::cast_to<VisualShaderNodeUniformRef>(E->get().node.ptr()); + Ref<VisualShaderNodeUniformRef> uniform_ref = E.value.node; if (uniform_ref.is_valid()) { used_uniform_names.insert(uniform_ref->get_uniform_name()); } - Ref<VisualShaderNodeUniform> uniform = Object::cast_to<VisualShaderNodeUniform>(E->get().node.ptr()); + Ref<VisualShaderNodeUniform> uniform = E.value.node; if (uniform.is_valid()) { uniforms.push_back(uniform.ptr()); } - Ref<VisualShaderNodeVaryingSetter> varying_setter = Object::cast_to<VisualShaderNodeVaryingSetter>(E->get().node.ptr()); + Ref<VisualShaderNodeVaryingSetter> varying_setter = E.value.node; if (varying_setter.is_valid() && varying_setter->is_input_port_connected(0)) { if (!varying_setters.has(i)) { varying_setters.insert(i, List<int>()); } - varying_setters[i].push_back(E->key()); + varying_setters[i].push_back(E.key); } - Ref<VisualShaderNodeParticleEmit> emit_particle = Object::cast_to<VisualShaderNodeParticleEmit>(E->get().node.ptr()); + Ref<VisualShaderNodeParticleEmit> emit_particle = E.value.node; if (emit_particle.is_valid()) { if (!emitters.has(i)) { emitters.insert(i, List<int>()); } - emitters[i].push_back(E->key()); + emitters[i].push_back(E.key); } } } @@ -2269,8 +2269,8 @@ void VisualShader::_update_shader() const { global_code += "\n"; } - Map<int, String> code_map; - Set<int> empty_funcs; + HashMap<int, String> code_map; + RBSet<int> empty_funcs; for (int i = 0; i < TYPE_MAX; i++) { if (!has_func_name(RenderingServer::ShaderMode(shader_mode), func_name[i])) { @@ -2282,7 +2282,7 @@ void VisualShader::_update_shader() const { VMap<ConnectionKey, const List<Connection>::Element *> output_connections; StringBuilder func_code; - Set<int> processed; + RBSet<int> processed; bool is_empty_func = false; if (shader_mode != Shader::MODE_PARTICLES && shader_mode != Shader::MODE_SKY && shader_mode != Shader::MODE_FOG) { diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h index aaf570d98c..aa5263943b 100644 --- a/scene/resources/visual_shader.h +++ b/scene/resources/visual_shader.h @@ -127,7 +127,7 @@ private: }; struct Graph { - Map<int, Node> nodes; + RBMap<int, Node> nodes; List<Connection> connections; } graph[TYPE_MAX]; @@ -139,9 +139,9 @@ private: Vector2 graph_offset; HashMap<String, int> modes; - Set<StringName> flags; + RBSet<StringName> flags; - Map<String, Varying> varyings; + HashMap<String, Varying> varyings; List<Varying> varyings_list; mutable SafeFlag dirty; @@ -158,7 +158,7 @@ private: } }; - Error _write_node(Type p_type, StringBuilder *global_code, StringBuilder *global_code_per_node, Map<Type, StringBuilder> *global_code_per_func, StringBuilder &code, Vector<DefaultTextureParam> &def_tex_params, const VMap<ConnectionKey, const List<Connection>::Element *> &input_connections, const VMap<ConnectionKey, const List<Connection>::Element *> &output_connections, int node, Set<int> &processed, bool for_preview, Set<StringName> &r_classes) const; + Error _write_node(Type p_type, StringBuilder *global_code, StringBuilder *global_code_per_node, HashMap<Type, StringBuilder> *global_code_per_func, StringBuilder &code, Vector<DefaultTextureParam> &def_tex_params, const VMap<ConnectionKey, const List<Connection>::Element *> &input_connections, const VMap<ConnectionKey, const List<Connection>::Element *> &output_connections, int node, RBSet<int> &processed, bool for_preview, RBSet<StringName> &r_classes) const; void _input_type_changed(Type p_type, int p_id); bool has_func_name(RenderingServer::ShaderMode p_mode, const String &p_func_name) const; @@ -255,10 +255,10 @@ class VisualShaderNode : public Resource { int port_preview = -1; - Map<int, Variant> default_input_values; - Map<int, bool> connected_input_ports; - Map<int, int> connected_output_ports; - Map<int, bool> expanded_output_ports; + HashMap<int, Variant> default_input_values; + HashMap<int, bool> connected_input_ports; + HashMap<int, int> connected_output_ports; + HashMap<int, bool> expanded_output_ports; protected: bool simple_decl = true; @@ -328,7 +328,7 @@ public: void set_disabled(bool p_disabled = true); virtual Vector<StringName> get_editable_properties() const; - virtual Map<StringName, String> get_editable_properties_names() const; + virtual HashMap<StringName, String> get_editable_properties_names() const; virtual Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const; virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const; @@ -680,9 +680,9 @@ protected: String name; }; - Map<int, Port> input_ports; - Map<int, Port> output_ports; - Map<int, Control *> controls; + HashMap<int, Port> input_ports; + HashMap<int, Port> output_ports; + HashMap<int, Control *> controls; protected: static void _bind_methods(); diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index 6af34a8a82..dbd45793f9 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -5782,8 +5782,8 @@ bool VisualShaderNodeTextureUniform::is_show_prop_names() const { return true; } -Map<StringName, String> VisualShaderNodeTextureUniform::get_editable_properties_names() const { - Map<StringName, String> names; +HashMap<StringName, String> VisualShaderNodeTextureUniform::get_editable_properties_names() const { + HashMap<StringName, String> names; names.insert("texture_type", RTR("Type")); names.insert("color_default", RTR("Default Color")); names.insert("texture_filter", RTR("Filter")); diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h index 338f1157d3..b159d25eba 100644 --- a/scene/resources/visual_shader_nodes.h +++ b/scene/resources/visual_shader_nodes.h @@ -2175,7 +2175,7 @@ public: virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const override; virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; - virtual Map<StringName, String> get_editable_properties_names() const override; + virtual HashMap<StringName, String> get_editable_properties_names() const override; virtual bool is_show_prop_names() const override; Vector<StringName> get_editable_properties() const override; diff --git a/scene/resources/visual_shader_particle_nodes.cpp b/scene/resources/visual_shader_particle_nodes.cpp index 0879f2e735..54df935168 100644 --- a/scene/resources/visual_shader_particle_nodes.cpp +++ b/scene/resources/visual_shader_particle_nodes.cpp @@ -74,8 +74,8 @@ Vector<StringName> VisualShaderNodeParticleEmitter::get_editable_properties() co return props; } -Map<StringName, String> VisualShaderNodeParticleEmitter::get_editable_properties_names() const { - Map<StringName, String> names; +HashMap<StringName, String> VisualShaderNodeParticleEmitter::get_editable_properties_names() const { + HashMap<StringName, String> names; names.insert("mode_2d", RTR("2D Mode")); return names; } @@ -704,8 +704,8 @@ Vector<StringName> VisualShaderNodeParticleMeshEmitter::get_editable_properties( return props; } -Map<StringName, String> VisualShaderNodeParticleMeshEmitter::get_editable_properties_names() const { - Map<StringName, String> names = VisualShaderNodeParticleEmitter::get_editable_properties_names(); +HashMap<StringName, String> VisualShaderNodeParticleMeshEmitter::get_editable_properties_names() const { + HashMap<StringName, String> names = VisualShaderNodeParticleEmitter::get_editable_properties_names(); names.insert("mesh", RTR("Mesh")); names.insert("use_all_surfaces", RTR("Use All Surfaces")); diff --git a/scene/resources/visual_shader_particle_nodes.h b/scene/resources/visual_shader_particle_nodes.h index 0b91cba5e0..05a059373b 100644 --- a/scene/resources/visual_shader_particle_nodes.h +++ b/scene/resources/visual_shader_particle_nodes.h @@ -52,7 +52,7 @@ public: bool is_mode_2d() const; Vector<StringName> get_editable_properties() const override; - virtual Map<StringName, String> get_editable_properties_names() const override; + virtual HashMap<StringName, String> get_editable_properties_names() const override; bool is_show_prop_names() const override; VisualShaderNodeParticleEmitter(); @@ -153,7 +153,7 @@ public: int get_surface_index() const; Vector<StringName> get_editable_properties() const override; - Map<StringName, String> get_editable_properties_names() const override; + HashMap<StringName, String> get_editable_properties_names() const override; Vector<VisualShader::DefaultTextureParam> get_default_texture_parameters(VisualShader::Type p_type, int p_id) const override; VisualShaderNodeParticleMeshEmitter(); diff --git a/scene/resources/world_2d.h b/scene/resources/world_2d.h index 4a277c3d84..71ae40ec82 100644 --- a/scene/resources/world_2d.h +++ b/scene/resources/world_2d.h @@ -46,7 +46,7 @@ class World2D : public Resource { RID space; RID navigation_map; - Set<Viewport *> viewports; + RBSet<Viewport *> viewports; protected: static void _bind_methods(); @@ -62,7 +62,7 @@ public: PhysicsDirectSpaceState2D *get_direct_space_state(); - _FORCE_INLINE_ const Set<Viewport *> &get_viewports() { return viewports; } + _FORCE_INLINE_ const RBSet<Viewport *> &get_viewports() { return viewports; } World2D(); ~World2D(); diff --git a/scene/resources/world_3d.h b/scene/resources/world_3d.h index b34b7a2bfb..18d28e812f 100644 --- a/scene/resources/world_3d.h +++ b/scene/resources/world_3d.h @@ -53,7 +53,7 @@ private: Ref<Environment> fallback_environment; Ref<CameraEffects> camera_effects; - Set<Camera3D *> cameras; + RBSet<Camera3D *> cameras; protected: static void _bind_methods(); @@ -77,7 +77,7 @@ public: void set_camera_effects(const Ref<CameraEffects> &p_camera_effects); Ref<CameraEffects> get_camera_effects() const; - _FORCE_INLINE_ const Set<Camera3D *> &get_cameras() const { return cameras; } + _FORCE_INLINE_ const RBSet<Camera3D *> &get_cameras() const { return cameras; } PhysicsDirectSpaceState3D *get_direct_space_state(); diff --git a/scene/resources/world_boundary_shape_2d.cpp b/scene/resources/world_boundary_shape_2d.cpp index ac5be79d24..013ffb9e24 100644 --- a/scene/resources/world_boundary_shape_2d.cpp +++ b/scene/resources/world_boundary_shape_2d.cpp @@ -108,7 +108,7 @@ void WorldBoundaryShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_distance"), &WorldBoundaryShape2D::get_distance); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "normal"), "set_normal", "get_normal"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater"), "set_distance", "get_distance"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance", PROPERTY_HINT_RANGE, "0.01,1024,0.01,or_greater,suffix:px"), "set_distance", "get_distance"); } WorldBoundaryShape2D::WorldBoundaryShape2D() : diff --git a/scene/resources/world_boundary_shape_3d.cpp b/scene/resources/world_boundary_shape_3d.cpp index 09d41e8291..400cbae217 100644 --- a/scene/resources/world_boundary_shape_3d.cpp +++ b/scene/resources/world_boundary_shape_3d.cpp @@ -80,7 +80,7 @@ void WorldBoundaryShape3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_plane", "plane"), &WorldBoundaryShape3D::set_plane); ClassDB::bind_method(D_METHOD("get_plane"), &WorldBoundaryShape3D::get_plane); - ADD_PROPERTY(PropertyInfo(Variant::PLANE, "plane"), "set_plane", "get_plane"); + ADD_PROPERTY(PropertyInfo(Variant::PLANE, "plane", PROPERTY_HINT_NONE, "suffix:m"), "set_plane", "get_plane"); } WorldBoundaryShape3D::WorldBoundaryShape3D() : diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h index 9800707849..8851e1419b 100644 --- a/servers/audio/audio_stream.h +++ b/servers/audio/audio_stream.h @@ -125,7 +125,7 @@ class AudioStreamMicrophone : public AudioStream { GDCLASS(AudioStreamMicrophone, AudioStream); friend class AudioStreamPlaybackMicrophone; - Set<AudioStreamPlaybackMicrophone *> playbacks; + RBSet<AudioStreamPlaybackMicrophone *> playbacks; protected: static void _bind_methods(); @@ -192,7 +192,7 @@ private: float weight; }; - Set<AudioStreamPlaybackRandomizer *> playbacks; + RBSet<AudioStreamPlaybackRandomizer *> playbacks; Vector<PoolEntry> audio_stream_pool; float random_pitch_scale = 1.1f; float random_volume_offset_db = 5.0f; diff --git a/servers/audio/effects/audio_effect_amplify.cpp b/servers/audio/effects/audio_effect_amplify.cpp index b01160ea5c..87d46f8bbe 100644 --- a/servers/audio/effects/audio_effect_amplify.cpp +++ b/servers/audio/effects/audio_effect_amplify.cpp @@ -64,7 +64,7 @@ void AudioEffectAmplify::_bind_methods() { ClassDB::bind_method(D_METHOD("set_volume_db", "volume"), &AudioEffectAmplify::set_volume_db); ClassDB::bind_method(D_METHOD("get_volume_db"), &AudioEffectAmplify::get_volume_db); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01,suffix:dB"), "set_volume_db", "get_volume_db"); } AudioEffectAmplify::AudioEffectAmplify() { diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp index cc317031d4..b7c373479a 100644 --- a/servers/audio/effects/audio_effect_eq.cpp +++ b/servers/audio/effects/audio_effect_eq.cpp @@ -90,9 +90,9 @@ int AudioEffectEQ::get_band_count() const { } bool AudioEffectEQ::_set(const StringName &p_name, const Variant &p_value) { - const Map<StringName, int>::Element *E = prop_band_map.find(p_name); + HashMap<StringName, int>::ConstIterator E = prop_band_map.find(p_name); if (E) { - set_band_gain_db(E->get(), p_value); + set_band_gain_db(E->value, p_value); return true; } @@ -100,9 +100,9 @@ bool AudioEffectEQ::_set(const StringName &p_name, const Variant &p_value) { } bool AudioEffectEQ::_get(const StringName &p_name, Variant &r_ret) const { - const Map<StringName, int>::Element *E = prop_band_map.find(p_name); + HashMap<StringName, int>::ConstIterator E = prop_band_map.find(p_name); if (E) { - r_ret = get_band_gain_db(E->get()); + r_ret = get_band_gain_db(E->value); return true; } diff --git a/servers/audio/effects/audio_effect_eq.h b/servers/audio/effects/audio_effect_eq.h index 252f931e6c..9b0560223f 100644 --- a/servers/audio/effects/audio_effect_eq.h +++ b/servers/audio/effects/audio_effect_eq.h @@ -55,7 +55,7 @@ class AudioEffectEQ : public AudioEffect { EQ eq; Vector<float> gain; - Map<StringName, int> prop_band_map; + HashMap<StringName, int> prop_band_map; Vector<String> band_names; protected: diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index c8f48207e4..8ec3e469d3 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -1106,13 +1106,13 @@ float AudioServer::get_playback_speed_scale() const { void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time, float p_pitch_scale) { ERR_FAIL_COND(p_playback.is_null()); - Map<StringName, Vector<AudioFrame>> map; + HashMap<StringName, Vector<AudioFrame>> map; map[p_bus] = p_volume_db_vector; start_playback_stream(p_playback, map, p_start_time, p_pitch_scale); } -void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time, float p_pitch_scale, float p_highshelf_gain, float p_attenuation_cutoff_hz) { +void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time, float p_pitch_scale, float p_highshelf_gain, float p_attenuation_cutoff_hz) { ERR_FAIL_COND(p_playback.is_null()); AudioStreamPlaybackListNode *playback_node = new AudioStreamPlaybackListNode(); @@ -1173,13 +1173,13 @@ void AudioServer::stop_playback_stream(Ref<AudioStreamPlayback> p_playback) { void AudioServer::set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes) { ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS); - Map<StringName, Vector<AudioFrame>> map; + HashMap<StringName, Vector<AudioFrame>> map; map[p_bus] = p_volumes; set_playback_bus_volumes_linear(p_playback, map); } -void AudioServer::set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes) { +void AudioServer::set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes) { ERR_FAIL_COND(p_bus_volumes.size() > MAX_BUSES_PER_PLAYBACK); AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback); @@ -1215,7 +1215,7 @@ void AudioServer::set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p ERR_FAIL_COND(p_playback.is_null()); ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS); - Map<StringName, Vector<AudioFrame>> map; + HashMap<StringName, Vector<AudioFrame>> map; AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback); if (!playback_node) { diff --git a/servers/audio_server.h b/servers/audio_server.h index 3d8755071a..18e173ff0b 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -263,7 +263,7 @@ private: Vector<Vector<AudioFrame>> temp_buffer; //temp_buffer for each level Vector<AudioFrame> mix_buffer; Vector<Bus *> buses; - Map<StringName, Bus *> bus_map; + HashMap<StringName, Bus *> bus_map; void _update_bus_effects(int p_bus); @@ -365,11 +365,11 @@ public: // Convenience method. void start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0, float p_pitch_scale = 1); // Expose all parameters. - void start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_pitch_scale = 1, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0); + void start_playback_stream(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_pitch_scale = 1, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0); void stop_playback_stream(Ref<AudioStreamPlayback> p_playback); void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes); - void set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes); + void set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes); void set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Vector<AudioFrame> p_volumes); void set_playback_pitch_scale(Ref<AudioStreamPlayback> p_playback, float p_pitch_scale); void set_playback_paused(Ref<AudioStreamPlayback> p_playback, bool p_paused); diff --git a/servers/debugger/servers_debugger.cpp b/servers/debugger/servers_debugger.cpp index 02703cacbf..222b475be8 100644 --- a/servers/debugger/servers_debugger.cpp +++ b/servers/debugger/servers_debugger.cpp @@ -199,7 +199,7 @@ class ServersDebugger::ScriptsProfiler : public EngineProfiler { }; Vector<ScriptLanguage::ProfilingInfo> info; Vector<ScriptLanguage::ProfilingInfo *> ptrs; - Map<StringName, int> sig_map; + HashMap<StringName, int> sig_map; int max_frame_functions = 16; public: @@ -277,7 +277,7 @@ class ServersDebugger::ServersProfiler : public EngineProfiler { typedef ServersDebugger::ServerInfo ServerInfo; typedef ServersDebugger::ServerFunctionInfo ServerFunctionInfo; - Map<StringName, ServerInfo> server_data; + HashMap<StringName, ServerInfo> server_data; ScriptsProfiler scripts_profiler; double frame_time = 0; @@ -292,13 +292,13 @@ class ServersDebugger::ServersProfiler : public EngineProfiler { frame.process_time = process_time; frame.physics_time = physics_time; frame.physics_frame_time = physics_frame_time; - Map<StringName, ServerInfo>::Element *E = server_data.front(); + HashMap<StringName, ServerInfo>::Iterator E = server_data.begin(); while (E) { if (!p_final) { - frame.servers.push_back(E->get()); + frame.servers.push_back(E->value); } - E->get().functions.clear(); - E = E->next(); + E->value.functions.clear(); + ++E; } uint64_t time = 0; scripts_profiler.write_frame_data(frame.script_functions, time, p_final); @@ -357,7 +357,7 @@ class ServersDebugger::VisualProfiler : public EngineProfiler { typedef ServersDebugger::ServerInfo ServerInfo; typedef ServersDebugger::ServerFunctionInfo ServerFunctionInfo; - Map<StringName, ServerInfo> server_data; + HashMap<StringName, ServerInfo> server_data; public: void toggle(bool p_enable, const Array &p_opts) { diff --git a/servers/extensions/physics_server_3d_extension.cpp b/servers/extensions/physics_server_3d_extension.cpp index b2a9273538..b073e837e2 100644 --- a/servers/extensions/physics_server_3d_extension.cpp +++ b/servers/extensions/physics_server_3d_extension.cpp @@ -34,7 +34,7 @@ bool PhysicsDirectSpaceState3DExtension::is_body_excluded_from_query(const RID & return exclude && exclude->has(p_body); } -thread_local const Set<RID> *PhysicsDirectSpaceState3DExtension::exclude = nullptr; +thread_local const RBSet<RID> *PhysicsDirectSpaceState3DExtension::exclude = nullptr; void PhysicsDirectSpaceState3DExtension::_bind_methods() { GDVIRTUAL_BIND(_intersect_ray, "from", "to", "collision_mask", "collide_with_bodies", "collide_with_areas", "hit_from_inside", "hit_back_faces", "result"); @@ -113,8 +113,8 @@ void PhysicsDirectBodyState3DExtension::_bind_methods() { PhysicsDirectBodyState3DExtension::PhysicsDirectBodyState3DExtension() { } -thread_local const Set<RID> *PhysicsServer3DExtension::exclude_bodies = nullptr; -thread_local const Set<ObjectID> *PhysicsServer3DExtension::exclude_objects = nullptr; +thread_local const RBSet<RID> *PhysicsServer3DExtension::exclude_bodies = nullptr; +thread_local const RBSet<ObjectID> *PhysicsServer3DExtension::exclude_objects = nullptr; bool PhysicsServer3DExtension::body_test_motion_is_excluding_body(RID p_body) const { return exclude_bodies && exclude_bodies->has(p_body); diff --git a/servers/extensions/physics_server_3d_extension.h b/servers/extensions/physics_server_3d_extension.h index ce6bed41c9..8b49278306 100644 --- a/servers/extensions/physics_server_3d_extension.h +++ b/servers/extensions/physics_server_3d_extension.h @@ -122,7 +122,7 @@ GDVIRTUAL_NATIVE_PTR(PhysicsServer3DExtensionShapeRestInfo) class PhysicsDirectSpaceState3DExtension : public PhysicsDirectSpaceState3D { GDCLASS(PhysicsDirectSpaceState3DExtension, PhysicsDirectSpaceState3D); - thread_local static const Set<RID> *exclude; + thread_local static const RBSet<RID> *exclude; protected: static void _bind_methods(); @@ -388,8 +388,8 @@ public: GDVIRTUAL7RC(bool, _body_test_motion, RID, const Transform3D &, const Vector3 &, real_t, int, bool, GDNativePtr<PhysicsServer3DExtensionMotionResult>) - thread_local static const Set<RID> *exclude_bodies; - thread_local static const Set<ObjectID> *exclude_objects; + thread_local static const RBSet<RID> *exclude_bodies; + thread_local static const RBSet<ObjectID> *exclude_objects; bool body_test_motion_is_excluding_body(RID p_body) const; bool body_test_motion_is_excluding_object(ObjectID p_object) const; diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index a92fe8c79a..901d335017 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -170,8 +170,12 @@ void NavigationServer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("map_get_closest_point", "map", "to_point"), &NavigationServer2D::map_get_closest_point); ClassDB::bind_method(D_METHOD("map_get_closest_point_owner", "map", "to_point"), &NavigationServer2D::map_get_closest_point_owner); + ClassDB::bind_method(D_METHOD("map_get_regions", "map"), &NavigationServer2D::map_get_regions); + ClassDB::bind_method(D_METHOD("map_get_agents", "map"), &NavigationServer2D::map_get_agents); + ClassDB::bind_method(D_METHOD("region_create"), &NavigationServer2D::region_create); ClassDB::bind_method(D_METHOD("region_set_map", "region", "map"), &NavigationServer2D::region_set_map); + ClassDB::bind_method(D_METHOD("region_get_map", "region"), &NavigationServer2D::region_get_map); ClassDB::bind_method(D_METHOD("region_set_layers", "region", "layers"), &NavigationServer2D::region_set_layers); ClassDB::bind_method(D_METHOD("region_get_layers", "region"), &NavigationServer2D::region_get_layers); ClassDB::bind_method(D_METHOD("region_set_transform", "region", "transform"), &NavigationServer2D::region_set_transform); @@ -182,6 +186,7 @@ void NavigationServer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("agent_create"), &NavigationServer2D::agent_create); ClassDB::bind_method(D_METHOD("agent_set_map", "agent", "map"), &NavigationServer2D::agent_set_map); + ClassDB::bind_method(D_METHOD("agent_get_map", "agent"), &NavigationServer2D::agent_get_map); ClassDB::bind_method(D_METHOD("agent_set_neighbor_dist", "agent", "dist"), &NavigationServer2D::agent_set_neighbor_dist); ClassDB::bind_method(D_METHOD("agent_set_max_neighbors", "agent", "count"), &NavigationServer2D::agent_set_max_neighbors); ClassDB::bind_method(D_METHOD("agent_set_time_horizon", "agent", "time"), &NavigationServer2D::agent_set_time_horizon); @@ -208,6 +213,14 @@ NavigationServer2D::~NavigationServer2D() { singleton = nullptr; } +Array FORWARD_1_C(map_get_regions, RID, p_map, rid_to_rid); + +Array FORWARD_1_C(map_get_agents, RID, p_map, rid_to_rid); + +RID FORWARD_1_C(region_get_map, RID, p_region, rid_to_rid); + +RID FORWARD_1_C(agent_get_map, RID, p_agent, rid_to_rid); + RID FORWARD_0_C(map_create); void FORWARD_2_C(map_set_active, RID, p_map, bool, p_active, rid_to_rid, bool_to_bool); diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h index 7350eeb5b1..dfdcf5fca8 100644 --- a/servers/navigation_server_2d.h +++ b/servers/navigation_server_2d.h @@ -80,11 +80,15 @@ public: virtual Vector2 map_get_closest_point(RID p_map, const Vector2 &p_point) const; virtual RID map_get_closest_point_owner(RID p_map, const Vector2 &p_point) const; + virtual Array map_get_regions(RID p_map) const; + virtual Array map_get_agents(RID p_map) const; + /// Creates a new region. virtual RID region_create() const; /// Set the map of this region. virtual void region_set_map(RID p_region, RID p_map) const; + virtual RID region_get_map(RID p_region) const; /// Set the region's layers virtual void region_set_layers(RID p_region, uint32_t p_layers) const; @@ -106,6 +110,7 @@ public: /// Put the agent in the map. virtual void agent_set_map(RID p_agent, RID p_map) const; + virtual RID agent_get_map(RID p_agent) const; /// The maximum distance (center point to /// center point) to other agents this agent diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 46192772f6..0ce869ad1a 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -48,8 +48,12 @@ void NavigationServer3D::_bind_methods() { ClassDB::bind_method(D_METHOD("map_get_closest_point_normal", "map", "to_point"), &NavigationServer3D::map_get_closest_point_normal); ClassDB::bind_method(D_METHOD("map_get_closest_point_owner", "map", "to_point"), &NavigationServer3D::map_get_closest_point_owner); + ClassDB::bind_method(D_METHOD("map_get_regions", "map"), &NavigationServer3D::map_get_regions); + ClassDB::bind_method(D_METHOD("map_get_agents", "map"), &NavigationServer3D::map_get_agents); + ClassDB::bind_method(D_METHOD("region_create"), &NavigationServer3D::region_create); ClassDB::bind_method(D_METHOD("region_set_map", "region", "map"), &NavigationServer3D::region_set_map); + ClassDB::bind_method(D_METHOD("region_get_map", "region"), &NavigationServer3D::region_get_map); ClassDB::bind_method(D_METHOD("region_set_layers", "region", "layers"), &NavigationServer3D::region_set_layers); ClassDB::bind_method(D_METHOD("region_get_layers", "region"), &NavigationServer3D::region_get_layers); ClassDB::bind_method(D_METHOD("region_set_transform", "region", "transform"), &NavigationServer3D::region_set_transform); @@ -61,6 +65,7 @@ void NavigationServer3D::_bind_methods() { ClassDB::bind_method(D_METHOD("agent_create"), &NavigationServer3D::agent_create); ClassDB::bind_method(D_METHOD("agent_set_map", "agent", "map"), &NavigationServer3D::agent_set_map); + ClassDB::bind_method(D_METHOD("agent_get_map", "agent"), &NavigationServer3D::agent_get_map); ClassDB::bind_method(D_METHOD("agent_set_neighbor_dist", "agent", "dist"), &NavigationServer3D::agent_set_neighbor_dist); ClassDB::bind_method(D_METHOD("agent_set_max_neighbors", "agent", "count"), &NavigationServer3D::agent_set_max_neighbors); ClassDB::bind_method(D_METHOD("agent_set_time_horizon", "agent", "time"), &NavigationServer3D::agent_set_time_horizon); diff --git a/servers/navigation_server_3d.h b/servers/navigation_server_3d.h index 0a75b07931..c3d3a589a9 100644 --- a/servers/navigation_server_3d.h +++ b/servers/navigation_server_3d.h @@ -91,11 +91,15 @@ public: virtual Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const = 0; virtual RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const = 0; + virtual Array map_get_regions(RID p_map) const = 0; + virtual Array map_get_agents(RID p_map) const = 0; + /// Creates a new region. virtual RID region_create() const = 0; /// Set the map of this region. virtual void region_set_map(RID p_region, RID p_map) const = 0; + virtual RID region_get_map(RID p_region) const = 0; /// Set the region's layers virtual void region_set_layers(RID p_region, uint32_t p_layers) const = 0; @@ -120,6 +124,7 @@ public: /// Put the agent in the map. virtual void agent_set_map(RID p_agent, RID p_map) const = 0; + virtual RID agent_get_map(RID p_agent) const = 0; /// The maximum distance (center point to /// center point) to other agents this agent diff --git a/servers/physics_2d/godot_area_2d.cpp b/servers/physics_2d/godot_area_2d.cpp index 9937178550..11208f2d5b 100644 --- a/servers/physics_2d/godot_area_2d.cpp +++ b/servers/physics_2d/godot_area_2d.cpp @@ -225,22 +225,24 @@ void GodotArea2D::call_queries() { resptr[i] = &res[i]; } - for (Map<BodyKey, BodyState>::Element *E = monitored_bodies.front(); E;) { - if (E->get().state == 0) { // Nothing happened - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_bodies.erase(E); + for (HashMap<BodyKey, BodyState, BodyKey>::Iterator E = monitored_bodies.begin(); E;) { + if (E->value.state == 0) { // Nothing happened + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_bodies.remove(E); E = next; continue; } - res[0] = E->get().state > 0 ? PhysicsServer2D::AREA_BODY_ADDED : PhysicsServer2D::AREA_BODY_REMOVED; - res[1] = E->key().rid; - res[2] = E->key().instance_id; - res[3] = E->key().body_shape; - res[4] = E->key().area_shape; + res[0] = E->value.state > 0 ? PhysicsServer2D::AREA_BODY_ADDED : PhysicsServer2D::AREA_BODY_REMOVED; + res[1] = E->key.rid; + res[2] = E->key.instance_id; + res[3] = E->key.body_shape; + res[4] = E->key.area_shape; - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_bodies.erase(E); + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_bodies.remove(E); E = next; Callable::CallError ce; @@ -261,22 +263,24 @@ void GodotArea2D::call_queries() { resptr[i] = &res[i]; } - for (Map<BodyKey, BodyState>::Element *E = monitored_areas.front(); E;) { - if (E->get().state == 0) { // Nothing happened - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_areas.erase(E); + for (HashMap<BodyKey, BodyState, BodyKey>::Iterator E = monitored_areas.begin(); E;) { + if (E->value.state == 0) { // Nothing happened + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_areas.remove(E); E = next; continue; } - res[0] = E->get().state > 0 ? PhysicsServer2D::AREA_BODY_ADDED : PhysicsServer2D::AREA_BODY_REMOVED; - res[1] = E->key().rid; - res[2] = E->key().instance_id; - res[3] = E->key().body_shape; - res[4] = E->key().area_shape; + res[0] = E->value.state > 0 ? PhysicsServer2D::AREA_BODY_ADDED : PhysicsServer2D::AREA_BODY_REMOVED; + res[1] = E->key.rid; + res[2] = E->key.instance_id; + res[3] = E->key.body_shape; + res[4] = E->key.area_shape; - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_areas.erase(E); + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_areas.remove(E); E = next; Callable::CallError ce; diff --git a/servers/physics_2d/godot_area_2d.h b/servers/physics_2d/godot_area_2d.h index dadd9747b1..b825ea5cdb 100644 --- a/servers/physics_2d/godot_area_2d.h +++ b/servers/physics_2d/godot_area_2d.h @@ -68,16 +68,15 @@ class GodotArea2D : public GodotCollisionObject2D { uint32_t body_shape = 0; uint32_t area_shape = 0; - _FORCE_INLINE_ bool operator<(const BodyKey &p_key) const { - if (rid == p_key.rid) { - if (body_shape == p_key.body_shape) { - return area_shape < p_key.area_shape; - } else { - return body_shape < p_key.body_shape; - } - } else { - return rid < p_key.rid; - } + static uint32_t hash(const BodyKey &p_key) { + uint32_t h = hash_one_uint64(p_key.rid.get_id()); + h = hash_djb2_one_64(p_key.instance_id, h); + h = hash_djb2_one_32(p_key.area_shape, h); + return hash_djb2_one_32(p_key.body_shape, h); + } + + _FORCE_INLINE_ bool operator==(const BodyKey &p_key) const { + return rid == p_key.rid && instance_id == p_key.instance_id && body_shape == p_key.body_shape && area_shape == p_key.area_shape; } _FORCE_INLINE_ BodyKey() {} @@ -91,10 +90,10 @@ class GodotArea2D : public GodotCollisionObject2D { _FORCE_INLINE_ void dec() { state--; } }; - Map<BodyKey, BodyState> monitored_bodies; - Map<BodyKey, BodyState> monitored_areas; + HashMap<BodyKey, BodyState, BodyKey> monitored_bodies; + HashMap<BodyKey, BodyState, BodyKey> monitored_areas; - Set<GodotConstraint2D *> constraints; + RBSet<GodotConstraint2D *> constraints; virtual void _shapes_changed() override; void _queue_monitor_update(); @@ -143,7 +142,7 @@ public: _FORCE_INLINE_ void add_constraint(GodotConstraint2D *p_constraint) { constraints.insert(p_constraint); } _FORCE_INLINE_ void remove_constraint(GodotConstraint2D *p_constraint) { constraints.erase(p_constraint); } - _FORCE_INLINE_ const Set<GodotConstraint2D *> &get_constraints() const { return constraints; } + _FORCE_INLINE_ const RBSet<GodotConstraint2D *> &get_constraints() const { return constraints; } _FORCE_INLINE_ void clear_constraints() { constraints.clear(); } void set_monitorable(bool p_monitorable); diff --git a/servers/physics_2d/godot_physics_server_2d.cpp b/servers/physics_2d/godot_physics_server_2d.cpp index 650a95c914..cb829e5d91 100644 --- a/servers/physics_2d/godot_physics_server_2d.cpp +++ b/servers/physics_2d/godot_physics_server_2d.cpp @@ -1179,7 +1179,7 @@ void GodotPhysicsServer2D::free(RID p_rid) { GodotShape2D *shape = shape_owner.get_or_null(p_rid); while (shape->get_owners().size()) { - GodotShapeOwner2D *so = shape->get_owners().front()->key(); + GodotShapeOwner2D *so = shape->get_owners().begin()->key; so->remove_shape(shape); } @@ -1250,11 +1250,11 @@ void GodotPhysicsServer2D::step(real_t p_step) { island_count = 0; active_objects = 0; collision_pairs = 0; - for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { - stepper->step(const_cast<GodotSpace2D *>(E->get()), p_step); - island_count += E->get()->get_island_count(); - active_objects += E->get()->get_active_objects(); - collision_pairs += E->get()->get_collision_pairs(); + for (const GodotSpace2D *E : active_spaces) { + stepper->step(const_cast<GodotSpace2D *>(E), p_step); + island_count += E->get_island_count(); + active_objects += E->get_active_objects(); + collision_pairs += E->get_collision_pairs(); } } @@ -1271,8 +1271,8 @@ void GodotPhysicsServer2D::flush_queries() { uint64_t time_beg = OS::get_singleton()->get_ticks_usec(); - for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { - GodotSpace2D *space = const_cast<GodotSpace2D *>(E->get()); + for (const GodotSpace2D *E : active_spaces) { + GodotSpace2D *space = const_cast<GodotSpace2D *>(E); space->call_queries(); } @@ -1292,9 +1292,9 @@ void GodotPhysicsServer2D::flush_queries() { total_time[i] = 0; } - for (Set<const GodotSpace2D *>::Element *E = active_spaces.front(); E; E = E->next()) { + for (const GodotSpace2D *E : active_spaces) { for (int i = 0; i < GodotSpace2D::ELAPSED_TIME_MAX; i++) { - total_time[i] += E->get()->get_elapsed_time(GodotSpace2D::ElapsedTime(i)); + total_time[i] += E->get_elapsed_time(GodotSpace2D::ElapsedTime(i)); } } diff --git a/servers/physics_2d/godot_physics_server_2d.h b/servers/physics_2d/godot_physics_server_2d.h index 0a84caadc5..55a7b39b9e 100644 --- a/servers/physics_2d/godot_physics_server_2d.h +++ b/servers/physics_2d/godot_physics_server_2d.h @@ -56,7 +56,7 @@ class GodotPhysicsServer2D : public PhysicsServer2D { bool flushing_queries = false; GodotStep2D *stepper = nullptr; - Set<const GodotSpace2D *> active_spaces; + RBSet<const GodotSpace2D *> active_spaces; mutable RID_PtrOwner<GodotShape2D, true> shape_owner; mutable RID_PtrOwner<GodotSpace2D, true> space_owner; diff --git a/servers/physics_2d/godot_shape_2d.cpp b/servers/physics_2d/godot_shape_2d.cpp index 6c020f9e72..72ade3757b 100644 --- a/servers/physics_2d/godot_shape_2d.cpp +++ b/servers/physics_2d/godot_shape_2d.cpp @@ -50,20 +50,20 @@ Vector2 GodotShape2D::get_support(const Vector2 &p_normal) const { } void GodotShape2D::add_owner(GodotShapeOwner2D *p_owner) { - Map<GodotShapeOwner2D *, int>::Element *E = owners.find(p_owner); + HashMap<GodotShapeOwner2D *, int>::Iterator E = owners.find(p_owner); if (E) { - E->get()++; + E->value++; } else { owners[p_owner] = 1; } } void GodotShape2D::remove_owner(GodotShapeOwner2D *p_owner) { - Map<GodotShapeOwner2D *, int>::Element *E = owners.find(p_owner); + HashMap<GodotShapeOwner2D *, int>::Iterator E = owners.find(p_owner); ERR_FAIL_COND(!E); - E->get()--; - if (E->get() == 0) { - owners.erase(E); + E->value--; + if (E->value == 0) { + owners.remove(E); } } @@ -71,7 +71,7 @@ bool GodotShape2D::is_owner(GodotShapeOwner2D *p_owner) const { return owners.has(p_owner); } -const Map<GodotShapeOwner2D *, int> &GodotShape2D::get_owners() const { +const HashMap<GodotShapeOwner2D *, int> &GodotShape2D::get_owners() const { return owners; } @@ -841,7 +841,7 @@ void GodotConcavePolygonShape2D::set_data(const Variant &p_data) { const Vector2 *arr = p2arr.ptr(); - Map<Point2, int> pointmap; + HashMap<Point2, int> pointmap; for (int i = 0; i < len; i += 2) { Point2 p1 = arr[i]; Point2 p2 = arr[i + 1]; @@ -868,7 +868,7 @@ void GodotConcavePolygonShape2D::set_data(const Variant &p_data) { } points.resize(pointmap.size()); - aabb.position = pointmap.front()->key(); + aabb.position = pointmap.begin()->key; for (const KeyValue<Point2, int> &E : pointmap) { aabb.expand_to(E.key); points.write[E.value] = E.key; diff --git a/servers/physics_2d/godot_shape_2d.h b/servers/physics_2d/godot_shape_2d.h index 9b3477cea8..cede01e18d 100644 --- a/servers/physics_2d/godot_shape_2d.h +++ b/servers/physics_2d/godot_shape_2d.h @@ -50,7 +50,7 @@ class GodotShape2D { bool configured = false; real_t custom_bias = 0.0; - Map<GodotShapeOwner2D *, int> owners; + HashMap<GodotShapeOwner2D *, int> owners; protected: void configure(const Rect2 &p_aabb); @@ -86,7 +86,7 @@ public: void add_owner(GodotShapeOwner2D *p_owner); void remove_owner(GodotShapeOwner2D *p_owner); bool is_owner(GodotShapeOwner2D *p_owner) const; - const Map<GodotShapeOwner2D *, int> &get_owners() const; + const HashMap<GodotShapeOwner2D *, int> &get_owners() const; _FORCE_INLINE_ void get_supports_transformed_cast(const Vector2 &p_cast, const Vector2 &p_normal, const Transform2D &p_xform, Vector2 *r_supports, int &r_amount) const { get_supports(p_xform.basis_xform_inv(p_normal).normalized(), r_supports, r_amount); diff --git a/servers/physics_2d/godot_space_2d.cpp b/servers/physics_2d/godot_space_2d.cpp index 3ff7ab86bb..0a7859d86a 100644 --- a/servers/physics_2d/godot_space_2d.cpp +++ b/servers/physics_2d/godot_space_2d.cpp @@ -874,7 +874,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: bool collided = false; - if (recovered || (safe < 1)) { + if ((p_parameters.recovery_as_collision && recovered) || (safe < 1)) { if (safe >= 1) { best_shape = -1; //no best shape with cast, reset to -1 } @@ -1073,7 +1073,7 @@ void GodotSpace2D::remove_object(GodotCollisionObject2D *p_object) { objects.erase(p_object); } -const Set<GodotCollisionObject2D *> &GodotSpace2D::get_objects() const { +const RBSet<GodotCollisionObject2D *> &GodotSpace2D::get_objects() const { return objects; } diff --git a/servers/physics_2d/godot_space_2d.h b/servers/physics_2d/godot_space_2d.h index 5d97721176..e8b05fa4f9 100644 --- a/servers/physics_2d/godot_space_2d.h +++ b/servers/physics_2d/godot_space_2d.h @@ -92,7 +92,7 @@ private: static void *_broadphase_pair(GodotCollisionObject2D *A, int p_subindex_A, GodotCollisionObject2D *B, int p_subindex_B, void *p_self); static void _broadphase_unpair(GodotCollisionObject2D *A, int p_subindex_A, GodotCollisionObject2D *B, int p_subindex_B, void *p_data, void *p_self); - Set<GodotCollisionObject2D *> objects; + RBSet<GodotCollisionObject2D *> objects; GodotArea2D *area = nullptr; @@ -156,7 +156,7 @@ public: void add_object(GodotCollisionObject2D *p_object); void remove_object(GodotCollisionObject2D *p_object); - const Set<GodotCollisionObject2D *> &get_objects() const; + const RBSet<GodotCollisionObject2D *> &get_objects() const; _FORCE_INLINE_ int get_solver_iterations() const { return solver_iterations; } _FORCE_INLINE_ real_t get_contact_recycle_radius() const { return contact_recycle_radius; } diff --git a/servers/physics_2d/godot_step_2d.cpp b/servers/physics_2d/godot_step_2d.cpp index fd72038be3..551fd9329f 100644 --- a/servers/physics_2d/godot_step_2d.cpp +++ b/servers/physics_2d/godot_step_2d.cpp @@ -168,8 +168,8 @@ void GodotStep2D::step(GodotSpace2D *p_space, real_t p_delta) { const SelfList<GodotArea2D>::List &aml = p_space->get_moved_area_list(); while (aml.first()) { - for (const Set<GodotConstraint2D *>::Element *E = aml.first()->self()->get_constraints().front(); E; E = E->next()) { - GodotConstraint2D *constraint = E->get(); + for (GodotConstraint2D *E : aml.first()->self()->get_constraints()) { + GodotConstraint2D *constraint = E; if (constraint->get_island_step() == _step) { continue; } diff --git a/servers/physics_3d/godot_area_3d.cpp b/servers/physics_3d/godot_area_3d.cpp index e7df23d0d8..e2ad765d62 100644 --- a/servers/physics_3d/godot_area_3d.cpp +++ b/servers/physics_3d/godot_area_3d.cpp @@ -254,22 +254,24 @@ void GodotArea3D::call_queries() { resptr[i] = &res[i]; } - for (Map<BodyKey, BodyState>::Element *E = monitored_bodies.front(); E;) { - if (E->get().state == 0) { // Nothing happened - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_bodies.erase(E); + for (HashMap<BodyKey, BodyState, BodyKey>::Iterator E = monitored_bodies.begin(); E;) { + if (E->value.state == 0) { // Nothing happened + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_bodies.remove(E); E = next; continue; } - res[0] = E->get().state > 0 ? PhysicsServer3D::AREA_BODY_ADDED : PhysicsServer3D::AREA_BODY_REMOVED; - res[1] = E->key().rid; - res[2] = E->key().instance_id; - res[3] = E->key().body_shape; - res[4] = E->key().area_shape; + res[0] = E->value.state > 0 ? PhysicsServer3D::AREA_BODY_ADDED : PhysicsServer3D::AREA_BODY_REMOVED; + res[1] = E->key.rid; + res[2] = E->key.instance_id; + res[3] = E->key.body_shape; + res[4] = E->key.area_shape; - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_bodies.erase(E); + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_bodies.remove(E); E = next; Callable::CallError ce; @@ -290,22 +292,24 @@ void GodotArea3D::call_queries() { resptr[i] = &res[i]; } - for (Map<BodyKey, BodyState>::Element *E = monitored_areas.front(); E;) { - if (E->get().state == 0) { // Nothing happened - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_areas.erase(E); + for (HashMap<BodyKey, BodyState, BodyKey>::Iterator E = monitored_areas.begin(); E;) { + if (E->value.state == 0) { // Nothing happened + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_areas.remove(E); E = next; continue; } - res[0] = E->get().state > 0 ? PhysicsServer3D::AREA_BODY_ADDED : PhysicsServer3D::AREA_BODY_REMOVED; - res[1] = E->key().rid; - res[2] = E->key().instance_id; - res[3] = E->key().body_shape; - res[4] = E->key().area_shape; + res[0] = E->value.state > 0 ? PhysicsServer3D::AREA_BODY_ADDED : PhysicsServer3D::AREA_BODY_REMOVED; + res[1] = E->key.rid; + res[2] = E->key.instance_id; + res[3] = E->key.body_shape; + res[4] = E->key.area_shape; - Map<BodyKey, BodyState>::Element *next = E->next(); - monitored_areas.erase(E); + HashMap<BodyKey, BodyState, BodyKey>::Iterator next = E; + ++next; + monitored_areas.remove(E); E = next; Callable::CallError ce; diff --git a/servers/physics_3d/godot_area_3d.h b/servers/physics_3d/godot_area_3d.h index d15f8ec0a6..2a5e5a537a 100644 --- a/servers/physics_3d/godot_area_3d.h +++ b/servers/physics_3d/godot_area_3d.h @@ -72,16 +72,15 @@ class GodotArea3D : public GodotCollisionObject3D { uint32_t body_shape = 0; uint32_t area_shape = 0; - _FORCE_INLINE_ bool operator<(const BodyKey &p_key) const { - if (rid == p_key.rid) { - if (body_shape == p_key.body_shape) { - return area_shape < p_key.area_shape; - } else { - return body_shape < p_key.body_shape; - } - } else { - return rid < p_key.rid; - } + static uint32_t hash(const BodyKey &p_key) { + uint32_t h = hash_one_uint64(p_key.rid.get_id()); + h = hash_djb2_one_64(p_key.instance_id, h); + h = hash_djb2_one_32(p_key.area_shape, h); + return hash_djb2_one_32(p_key.body_shape, h); + } + + _FORCE_INLINE_ bool operator==(const BodyKey &p_key) const { + return rid == p_key.rid && instance_id == p_key.instance_id && body_shape == p_key.body_shape && area_shape == p_key.area_shape; } _FORCE_INLINE_ BodyKey() {} @@ -96,11 +95,11 @@ class GodotArea3D : public GodotCollisionObject3D { _FORCE_INLINE_ void dec() { state--; } }; - Map<BodyKey, BodyState> monitored_soft_bodies; - Map<BodyKey, BodyState> monitored_bodies; - Map<BodyKey, BodyState> monitored_areas; + HashMap<BodyKey, BodyState, BodyKey> monitored_soft_bodies; + HashMap<BodyKey, BodyState, BodyKey> monitored_bodies; + HashMap<BodyKey, BodyState, BodyKey> monitored_areas; - Set<GodotConstraint3D *> constraints; + RBSet<GodotConstraint3D *> constraints; virtual void _shapes_changed() override; void _queue_monitor_update(); @@ -164,7 +163,7 @@ public: _FORCE_INLINE_ void add_constraint(GodotConstraint3D *p_constraint) { constraints.insert(p_constraint); } _FORCE_INLINE_ void remove_constraint(GodotConstraint3D *p_constraint) { constraints.erase(p_constraint); } - _FORCE_INLINE_ const Set<GodotConstraint3D *> &get_constraints() const { return constraints; } + _FORCE_INLINE_ const RBSet<GodotConstraint3D *> &get_constraints() const { return constraints; } _FORCE_INLINE_ void clear_constraints() { constraints.clear(); } void set_monitorable(bool p_monitorable); diff --git a/servers/physics_3d/godot_body_3d.h b/servers/physics_3d/godot_body_3d.h index c0c847d920..93bd5a0071 100644 --- a/servers/physics_3d/godot_body_3d.h +++ b/servers/physics_3d/godot_body_3d.h @@ -112,7 +112,7 @@ class GodotBody3D : public GodotCollisionObject3D { virtual void _shapes_changed() override; Transform3D new_transform; - Map<GodotConstraint3D *, int> constraint_map; + HashMap<GodotConstraint3D *, int> constraint_map; Vector<AreaCMP> areas; @@ -196,7 +196,7 @@ public: _FORCE_INLINE_ void add_constraint(GodotConstraint3D *p_constraint, int p_pos) { constraint_map[p_constraint] = p_pos; } _FORCE_INLINE_ void remove_constraint(GodotConstraint3D *p_constraint) { constraint_map.erase(p_constraint); } - const Map<GodotConstraint3D *, int> &get_constraint_map() const { return constraint_map; } + const HashMap<GodotConstraint3D *, int> &get_constraint_map() const { return constraint_map; } _FORCE_INLINE_ void clear_constraint_map() { constraint_map.clear(); } _FORCE_INLINE_ void set_omit_force_integration(bool p_omit_force_integration) { omit_force_integration = p_omit_force_integration; } diff --git a/servers/physics_3d/godot_physics_server_3d.cpp b/servers/physics_3d/godot_physics_server_3d.cpp index e5107be74b..b3a384ba8f 100644 --- a/servers/physics_3d/godot_physics_server_3d.cpp +++ b/servers/physics_3d/godot_physics_server_3d.cpp @@ -1531,7 +1531,7 @@ void GodotPhysicsServer3D::free(RID p_rid) { GodotShape3D *shape = shape_owner.get_or_null(p_rid); while (shape->get_owners().size()) { - GodotShapeOwner3D *so = shape->get_owners().front()->key(); + GodotShapeOwner3D *so = shape->get_owners().begin()->key; so->remove_shape(shape); } @@ -1611,11 +1611,11 @@ void GodotPhysicsServer3D::step(real_t p_step) { island_count = 0; active_objects = 0; collision_pairs = 0; - for (Set<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { - stepper->step(const_cast<GodotSpace3D *>(E->get()), p_step); - island_count += E->get()->get_island_count(); - active_objects += E->get()->get_active_objects(); - collision_pairs += E->get()->get_collision_pairs(); + for (const GodotSpace3D *E : active_spaces) { + stepper->step(const_cast<GodotSpace3D *>(E), p_step); + island_count += E->get_island_count(); + active_objects += E->get_active_objects(); + collision_pairs += E->get_collision_pairs(); } #endif } @@ -1635,8 +1635,8 @@ void GodotPhysicsServer3D::flush_queries() { uint64_t time_beg = OS::get_singleton()->get_ticks_usec(); - for (Set<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { - GodotSpace3D *space = const_cast<GodotSpace3D *>(E->get()); + for (const GodotSpace3D *E : active_spaces) { + GodotSpace3D *space = const_cast<GodotSpace3D *>(E); space->call_queries(); } @@ -1656,9 +1656,9 @@ void GodotPhysicsServer3D::flush_queries() { total_time[i] = 0; } - for (Set<const GodotSpace3D *>::Element *E = active_spaces.front(); E; E = E->next()) { + for (const GodotSpace3D *E : active_spaces) { for (int i = 0; i < GodotSpace3D::ELAPSED_TIME_MAX; i++) { - total_time[i] += E->get()->get_elapsed_time(GodotSpace3D::ElapsedTime(i)); + total_time[i] += E->get_elapsed_time(GodotSpace3D::ElapsedTime(i)); } } diff --git a/servers/physics_3d/godot_physics_server_3d.h b/servers/physics_3d/godot_physics_server_3d.h index d2078a912c..65c53084ac 100644 --- a/servers/physics_3d/godot_physics_server_3d.h +++ b/servers/physics_3d/godot_physics_server_3d.h @@ -54,7 +54,7 @@ class GodotPhysicsServer3D : public PhysicsServer3D { bool flushing_queries = false; GodotStep3D *stepper = nullptr; - Set<const GodotSpace3D *> active_spaces; + RBSet<const GodotSpace3D *> active_spaces; mutable RID_PtrOwner<GodotShape3D, true> shape_owner; mutable RID_PtrOwner<GodotSpace3D, true> space_owner; diff --git a/servers/physics_3d/godot_shape_3d.cpp b/servers/physics_3d/godot_shape_3d.cpp index 2efc11a4c0..5e310670a5 100644 --- a/servers/physics_3d/godot_shape_3d.cpp +++ b/servers/physics_3d/godot_shape_3d.cpp @@ -76,20 +76,20 @@ Vector3 GodotShape3D::get_support(const Vector3 &p_normal) const { } void GodotShape3D::add_owner(GodotShapeOwner3D *p_owner) { - Map<GodotShapeOwner3D *, int>::Element *E = owners.find(p_owner); + HashMap<GodotShapeOwner3D *, int>::Iterator E = owners.find(p_owner); if (E) { - E->get()++; + E->value++; } else { owners[p_owner] = 1; } } void GodotShape3D::remove_owner(GodotShapeOwner3D *p_owner) { - Map<GodotShapeOwner3D *, int>::Element *E = owners.find(p_owner); + HashMap<GodotShapeOwner3D *, int>::Iterator E = owners.find(p_owner); ERR_FAIL_COND(!E); - E->get()--; - if (E->get() == 0) { - owners.erase(E); + E->value--; + if (E->value == 0) { + owners.remove(E); } } @@ -97,7 +97,7 @@ bool GodotShape3D::is_owner(GodotShapeOwner3D *p_owner) const { return owners.has(p_owner); } -const Map<GodotShapeOwner3D *, int> &GodotShape3D::get_owners() const { +const HashMap<GodotShapeOwner3D *, int> &GodotShape3D::get_owners() const { return owners; } diff --git a/servers/physics_3d/godot_shape_3d.h b/servers/physics_3d/godot_shape_3d.h index 9d171c3928..1fc8f7c711 100644 --- a/servers/physics_3d/godot_shape_3d.h +++ b/servers/physics_3d/godot_shape_3d.h @@ -51,7 +51,7 @@ class GodotShape3D { bool configured = false; real_t custom_bias = 0.0; - Map<GodotShapeOwner3D *, int> owners; + HashMap<GodotShapeOwner3D *, int> owners; protected: void configure(const AABB &p_aabb); @@ -93,7 +93,7 @@ public: void add_owner(GodotShapeOwner3D *p_owner); void remove_owner(GodotShapeOwner3D *p_owner); bool is_owner(GodotShapeOwner3D *p_owner) const; - const Map<GodotShapeOwner3D *, int> &get_owners() const; + const HashMap<GodotShapeOwner3D *, int> &get_owners() const; GodotShape3D() {} virtual ~GodotShape3D(); diff --git a/servers/physics_3d/godot_soft_body_3d.cpp b/servers/physics_3d/godot_soft_body_3d.cpp index be4b41292d..9cc7912a5a 100644 --- a/servers/physics_3d/godot_soft_body_3d.cpp +++ b/servers/physics_3d/godot_soft_body_3d.cpp @@ -33,7 +33,7 @@ #include "godot_space_3d.h" #include "core/math/geometry_3d.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "servers/rendering_server.h" // Based on Bullet soft body. @@ -494,7 +494,7 @@ bool GodotSoftBody3D::create_from_trimesh(const Vector<int> &p_indices, const Ve // Process vertices. { uint32_t vertex_count = 0; - Map<Vector3, uint32_t> unique_vertices; + HashMap<Vector3, uint32_t> unique_vertices; vertices.resize(visual_vertex_count); map_visual_to_physics.resize(visual_vertex_count); @@ -502,11 +502,11 @@ bool GodotSoftBody3D::create_from_trimesh(const Vector<int> &p_indices, const Ve for (int visual_vertex_index = 0; visual_vertex_index < visual_vertex_count; ++visual_vertex_index) { const Vector3 &vertex = p_vertices[visual_vertex_index]; - Map<Vector3, uint32_t>::Element *e = unique_vertices.find(vertex); + HashMap<Vector3, uint32_t>::Iterator e = unique_vertices.find(vertex); uint32_t vertex_id; if (e) { // Already existing. - vertex_id = e->value(); + vertex_id = e->value; } else { // Create new one. vertex_id = vertex_count++; diff --git a/servers/physics_3d/godot_soft_body_3d.h b/servers/physics_3d/godot_soft_body_3d.h index 96f63e5819..094ab39c47 100644 --- a/servers/physics_3d/godot_soft_body_3d.h +++ b/servers/physics_3d/godot_soft_body_3d.h @@ -38,7 +38,7 @@ #include "core/math/dynamic_bvh.h" #include "core/math/vector3.h" #include "core/templates/local_vector.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" #include "core/templates/vset.h" class GodotConstraint3D; @@ -103,7 +103,7 @@ class GodotSoftBody3D : public GodotCollisionObject3D { SelfList<GodotSoftBody3D> active_list; - Set<GodotConstraint3D *> constraints; + RBSet<GodotConstraint3D *> constraints; Vector<AreaCMP> areas; @@ -123,7 +123,7 @@ public: _FORCE_INLINE_ void add_constraint(GodotConstraint3D *p_constraint) { constraints.insert(p_constraint); } _FORCE_INLINE_ void remove_constraint(GodotConstraint3D *p_constraint) { constraints.erase(p_constraint); } - _FORCE_INLINE_ const Set<GodotConstraint3D *> &get_constraints() const { return constraints; } + _FORCE_INLINE_ const RBSet<GodotConstraint3D *> &get_constraints() const { return constraints; } _FORCE_INLINE_ void clear_constraints() { constraints.clear(); } _FORCE_INLINE_ void add_exception(const RID &p_exception) { exceptions.insert(p_exception); } diff --git a/servers/physics_3d/godot_space_3d.cpp b/servers/physics_3d/godot_space_3d.cpp index 0b84520c39..2bdaf581a1 100644 --- a/servers/physics_3d/godot_space_3d.cpp +++ b/servers/physics_3d/godot_space_3d.cpp @@ -906,7 +906,7 @@ bool GodotSpace3D::test_body_motion(GodotBody3D *p_body, const PhysicsServer3D:: } bool collided = false; - if (recovered || (safe < 1)) { + if ((p_parameters.recovery_as_collision && recovered) || (safe < 1)) { if (safe >= 1) { best_shape = -1; //no best shape with cast, reset to -1 } @@ -1096,7 +1096,7 @@ void GodotSpace3D::remove_object(GodotCollisionObject3D *p_object) { objects.erase(p_object); } -const Set<GodotCollisionObject3D *> &GodotSpace3D::get_objects() const { +const RBSet<GodotCollisionObject3D *> &GodotSpace3D::get_objects() const { return objects; } diff --git a/servers/physics_3d/godot_space_3d.h b/servers/physics_3d/godot_space_3d.h index 6308ede9a9..67dde30fb5 100644 --- a/servers/physics_3d/godot_space_3d.h +++ b/servers/physics_3d/godot_space_3d.h @@ -89,7 +89,7 @@ private: static void *_broadphase_pair(GodotCollisionObject3D *A, int p_subindex_A, GodotCollisionObject3D *B, int p_subindex_B, void *p_self); static void _broadphase_unpair(GodotCollisionObject3D *A, int p_subindex_A, GodotCollisionObject3D *B, int p_subindex_B, void *p_data, void *p_self); - Set<GodotCollisionObject3D *> objects; + RBSet<GodotCollisionObject3D *> objects; GodotArea3D *area = nullptr; @@ -158,7 +158,7 @@ public: void add_object(GodotCollisionObject3D *p_object); void remove_object(GodotCollisionObject3D *p_object); - const Set<GodotCollisionObject3D *> &get_objects() const; + const RBSet<GodotCollisionObject3D *> &get_objects() const; _FORCE_INLINE_ int get_solver_iterations() const { return solver_iterations; } _FORCE_INLINE_ real_t get_contact_recycle_radius() const { return contact_recycle_radius; } diff --git a/servers/physics_3d/godot_step_3d.cpp b/servers/physics_3d/godot_step_3d.cpp index 204adae450..99656d01a0 100644 --- a/servers/physics_3d/godot_step_3d.cpp +++ b/servers/physics_3d/godot_step_3d.cpp @@ -87,8 +87,8 @@ void GodotStep3D::_populate_island(GodotBody3D *p_body, LocalVector<GodotBody3D void GodotStep3D::_populate_island_soft_body(GodotSoftBody3D *p_soft_body, LocalVector<GodotBody3D *> &p_body_island, LocalVector<GodotConstraint3D *> &p_constraint_island) { p_soft_body->set_island_step(_step); - for (Set<GodotConstraint3D *>::Element *E = p_soft_body->get_constraints().front(); E; E = E->next()) { - GodotConstraint3D *constraint = const_cast<GodotConstraint3D *>(E->get()); + for (const GodotConstraint3D *E : p_soft_body->get_constraints()) { + GodotConstraint3D *constraint = const_cast<GodotConstraint3D *>(E); if (constraint->get_island_step() == _step) { continue; // Already processed. } @@ -236,8 +236,8 @@ void GodotStep3D::step(GodotSpace3D *p_space, real_t p_delta) { const SelfList<GodotArea3D>::List &aml = p_space->get_moved_area_list(); while (aml.first()) { - for (const Set<GodotConstraint3D *>::Element *E = aml.first()->self()->get_constraints().front(); E; E = E->next()) { - GodotConstraint3D *constraint = E->get(); + for (GodotConstraint3D *E : aml.first()->self()->get_constraints()) { + GodotConstraint3D *constraint = E; if (constraint->get_island_step() == _step) { continue; } diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index d6d23f8310..41aae36785 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -158,8 +158,8 @@ Vector<RID> PhysicsRayQueryParameters2D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { - ret.write[idx++] = E->get(); + for (const RID &E : parameters.exclude) { + ret.write[idx++] = E; } return ret; } @@ -208,8 +208,8 @@ Vector<RID> PhysicsPointQueryParameters2D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { - ret.write[idx++] = E->get(); + for (const RID &E : parameters.exclude) { + ret.write[idx++] = E; } return ret; } @@ -267,8 +267,8 @@ Vector<RID> PhysicsShapeQueryParameters2D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { - ret.write[idx++] = E->get(); + for (const RID &E : parameters.exclude) { + ret.write[idx++] = E; } return ret; } @@ -505,12 +505,16 @@ void PhysicsTestMotionParameters2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_exclude_objects"), &PhysicsTestMotionParameters2D::get_exclude_objects); ClassDB::bind_method(D_METHOD("set_exclude_objects", "exclude_list"), &PhysicsTestMotionParameters2D::set_exclude_objects); + ClassDB::bind_method(D_METHOD("is_recovery_as_collision_enabled"), &PhysicsTestMotionParameters2D::is_recovery_as_collision_enabled); + ClassDB::bind_method(D_METHOD("set_recovery_as_collision_enabled", "enabled"), &PhysicsTestMotionParameters2D::set_recovery_as_collision_enabled); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "from"), "set_from", "get_from"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion"), "set_motion", "get_motion"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin"), "set_margin", "get_margin"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collide_separation_ray"), "set_collide_separation_ray_enabled", "is_collide_separation_ray_enabled"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude_bodies", PROPERTY_HINT_ARRAY_TYPE, "RID"), "set_exclude_bodies", "get_exclude_bodies"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude_objects"), "set_exclude_objects", "get_exclude_objects"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "recovery_as_collision"), "set_recovery_as_collision_enabled", "is_recovery_as_collision_enabled"); } /////////////////////////////// @@ -857,7 +861,7 @@ PhysicsServer2D::~PhysicsServer2D() { Vector<PhysicsServer2DManager::ClassInfo> PhysicsServer2DManager::physics_2d_servers; int PhysicsServer2DManager::default_server_id = -1; int PhysicsServer2DManager::default_server_priority = -1; -const String PhysicsServer2DManager::setting_property_name("physics/2d/physics_engine"); +const String PhysicsServer2DManager::setting_property_name(PNAME("physics/2d/physics_engine")); void PhysicsServer2DManager::on_servers_changed() { String physics_servers("DEFAULT"); diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h index 2f70b88e30..745ee38ee1 100644 --- a/servers/physics_server_2d.h +++ b/servers/physics_server_2d.h @@ -127,7 +127,7 @@ public: struct RayParameters { Vector2 from; Vector2 to; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -157,7 +157,7 @@ public: struct PointParameters { Vector2 position; ObjectID canvas_instance_id; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -173,7 +173,7 @@ public: Transform2D transform; Vector2 motion; real_t margin = 0.0; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -483,8 +483,9 @@ public: Vector2 motion; real_t margin = 0.08; bool collide_separation_ray = false; - Set<RID> exclude_bodies; - Set<ObjectID> exclude_objects; + RBSet<RID> exclude_bodies; + RBSet<ObjectID> exclude_objects; + bool recovery_as_collision = false; MotionParameters() {} @@ -727,6 +728,9 @@ public: Array get_exclude_objects() const; void set_exclude_objects(const Array &p_exclude); + + bool is_recovery_as_collision_enabled() const { return parameters.recovery_as_collision; } + void set_recovery_as_collision_enabled(bool p_enabled) { parameters.recovery_as_collision = p_enabled; } }; class PhysicsTestMotionResult2D : public RefCounted { diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index bfe93f0dfb..a606d055f7 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -177,8 +177,8 @@ Vector<RID> PhysicsRayQueryParameters3D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { - ret.write[idx++] = E->get(); + for (const RID &E : parameters.exclude) { + ret.write[idx++] = E; } return ret; } @@ -231,8 +231,8 @@ Vector<RID> PhysicsPointQueryParameters3D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { - ret.write[idx++] = E->get(); + for (const RID &E : parameters.exclude) { + ret.write[idx++] = E; } return ret; } @@ -286,8 +286,8 @@ Vector<RID> PhysicsShapeQueryParameters3D::get_exclude() const { Vector<RID> ret; ret.resize(parameters.exclude.size()); int idx = 0; - for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) { - ret.write[idx++] = E->get(); + for (const RID &E : parameters.exclude) { + ret.write[idx++] = E; } return ret; } @@ -527,6 +527,9 @@ void PhysicsTestMotionParameters3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_exclude_objects"), &PhysicsTestMotionParameters3D::get_exclude_objects); ClassDB::bind_method(D_METHOD("set_exclude_objects", "exclude_list"), &PhysicsTestMotionParameters3D::set_exclude_objects); + ClassDB::bind_method(D_METHOD("is_recovery_as_collision_enabled"), &PhysicsTestMotionParameters3D::is_recovery_as_collision_enabled); + ClassDB::bind_method(D_METHOD("set_recovery_as_collision_enabled", "enabled"), &PhysicsTestMotionParameters3D::set_recovery_as_collision_enabled); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "from"), "set_from", "get_from"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "motion"), "set_motion", "get_motion"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin"), "set_margin", "get_margin"); @@ -534,6 +537,7 @@ void PhysicsTestMotionParameters3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collide_separation_ray"), "set_collide_separation_ray_enabled", "is_collide_separation_ray_enabled"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude_bodies", PROPERTY_HINT_ARRAY_TYPE, "RID"), "set_exclude_bodies", "get_exclude_bodies"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude_objects"), "set_exclude_objects", "get_exclude_objects"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "recovery_as_collision"), "set_recovery_as_collision_enabled", "is_recovery_as_collision_enabled"); } /////////////////////////////// @@ -1029,7 +1033,7 @@ PhysicsServer3D::~PhysicsServer3D() { Vector<PhysicsServer3DManager::ClassInfo> PhysicsServer3DManager::physics_servers; int PhysicsServer3DManager::default_server_id = -1; int PhysicsServer3DManager::default_server_priority = -1; -const String PhysicsServer3DManager::setting_property_name("physics/3d/physics_engine"); +const String PhysicsServer3DManager::setting_property_name(PNAME("physics/3d/physics_engine")); void PhysicsServer3DManager::on_servers_changed() { String physics_servers2("DEFAULT"); diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index 47f3fc2027..6a721f75a3 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -133,7 +133,7 @@ public: struct RayParameters { Vector3 from; Vector3 to; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -165,7 +165,7 @@ public: struct PointParameters { Vector3 position; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -179,7 +179,7 @@ public: Transform3D transform; Vector3 motion; real_t margin = 0.0; - Set<RID> exclude; + RBSet<RID> exclude; uint32_t collision_mask = UINT32_MAX; bool collide_with_bodies = true; @@ -520,8 +520,9 @@ public: real_t margin = 0.001; int max_collisions = 1; bool collide_separation_ray = false; - Set<RID> exclude_bodies; - Set<ObjectID> exclude_objects; + RBSet<RID> exclude_bodies; + RBSet<ObjectID> exclude_objects; + bool recovery_as_collision = false; MotionParameters() {} @@ -941,6 +942,9 @@ public: Array get_exclude_objects() const; void set_exclude_objects(const Array &p_exclude); + + bool is_recovery_as_collision_enabled() const { return parameters.recovery_as_collision; } + void set_recovery_as_collision_enabled(bool p_enabled) { parameters.recovery_as_collision = p_enabled; } }; class PhysicsTestMotionResult3D : public RefCounted { diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp index 84ab19880c..9291a89333 100644 --- a/servers/rendering/renderer_canvas_cull.cpp +++ b/servers/rendering/renderer_canvas_cull.cpp @@ -1831,8 +1831,8 @@ void RendererCanvasCull::canvas_occluder_polygon_set_shape(RID p_occluder_polygo RSG::canvas_render->occluder_polygon_set_shape(occluder_poly->occluder, p_shape, p_closed); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *E = occluder_poly->owners.front(); E; E = E->next()) { - E->get()->aabb_cache = occluder_poly->aabb; + for (RendererCanvasRender::LightOccluderInstance *E : occluder_poly->owners) { + E->aabb_cache = occluder_poly->aabb; } } @@ -1841,8 +1841,8 @@ void RendererCanvasCull::canvas_occluder_polygon_set_cull_mode(RID p_occluder_po ERR_FAIL_COND(!occluder_poly); occluder_poly->cull_mode = p_mode; RSG::canvas_render->occluder_polygon_set_cull_mode(occluder_poly->occluder, p_mode); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *E = occluder_poly->owners.front(); E; E = E->next()) { - E->get()->cull_cache = p_mode; + for (RendererCanvasRender::LightOccluderInstance *E : occluder_poly->owners) { + E->cull_cache = p_mode; } } @@ -1931,7 +1931,7 @@ bool RendererCanvasCull::free(RID p_rid) { RendererViewport::Viewport *vp = RSG::viewport->viewport_owner.get_or_null(canvas->viewports.front()->get()); ERR_FAIL_COND_V(!vp, true); - Map<RID, RendererViewport::Viewport::CanvasData>::Element *E = vp->canvas_map.find(p_rid); + HashMap<RID, RendererViewport::Viewport::CanvasData>::Iterator E = vp->canvas_map.find(p_rid); ERR_FAIL_COND_V(!E, true); vp->canvas_map.erase(p_rid); @@ -1942,12 +1942,12 @@ bool RendererCanvasCull::free(RID p_rid) { canvas->child_items[i].item->parent = RID(); } - for (Set<RendererCanvasRender::Light *>::Element *E = canvas->lights.front(); E; E = E->next()) { - E->get()->canvas = RID(); + for (RendererCanvasRender::Light *E : canvas->lights) { + E->canvas = RID(); } - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *E = canvas->occluders.front(); E; E = E->next()) { - E->get()->canvas = RID(); + for (RendererCanvasRender::LightOccluderInstance *E : canvas->occluders) { + E->canvas = RID(); } canvas_owner.free(p_rid); diff --git a/servers/rendering/renderer_canvas_cull.h b/servers/rendering/renderer_canvas_cull.h index 637245502d..6f3cd1d2c6 100644 --- a/servers/rendering/renderer_canvas_cull.h +++ b/servers/rendering/renderer_canvas_cull.h @@ -108,7 +108,7 @@ public: Rect2 aabb; RS::CanvasOccluderPolygonCullMode cull_mode; RID occluder; - Set<RendererCanvasRender::LightOccluderInstance *> owners; + RBSet<RendererCanvasRender::LightOccluderInstance *> owners; LightOccluderPolygon() { active = false; @@ -121,7 +121,7 @@ public: RID_Owner<RendererCanvasRender::LightOccluderInstance, true> canvas_light_occluder_owner; struct Canvas : public RendererViewport::CanvasBase { - Set<RID> viewports; + RBSet<RID> viewports; struct ChildItem { Point2 mirror; Item *item = nullptr; @@ -130,10 +130,10 @@ public: } }; - Set<RendererCanvasRender::Light *> lights; - Set<RendererCanvasRender::Light *> directional_lights; + RBSet<RendererCanvasRender::Light *> lights; + RBSet<RendererCanvasRender::Light *> directional_lights; - Set<RendererCanvasRender::LightOccluderInstance *> occluders; + RBSet<RendererCanvasRender::LightOccluderInstance *> occluders; bool children_order_dirty; Vector<ChildItem> child_items; diff --git a/servers/rendering/renderer_rd/effects_rd.h b/servers/rendering/renderer_rd/effects_rd.h index 4774864824..1963935236 100644 --- a/servers/rendering/renderer_rd/effects_rd.h +++ b/servers/rendering/renderer_rd/effects_rd.h @@ -608,10 +608,10 @@ private: RID index_buffer; RID index_array; - Map<RID, RID> texture_to_uniform_set_cache; - Map<RID, RID> input_to_uniform_set_cache; + HashMap<RID, RID> texture_to_uniform_set_cache; + HashMap<RID, RID> input_to_uniform_set_cache; - Map<RID, RID> image_to_uniform_set_cache; + HashMap<RID, RID> image_to_uniform_set_cache; struct TexturePair { RID texture1; @@ -637,11 +637,11 @@ private: } }; - Map<TexturePair, RID> texture_pair_to_uniform_set_cache; - Map<RID, RID> texture_to_compute_uniform_set_cache; - Map<TexturePair, RID> texture_pair_to_compute_uniform_set_cache; - Map<TexturePair, RID> image_pair_to_compute_uniform_set_cache; - Map<TextureSamplerPair, RID> texture_sampler_to_compute_uniform_set_cache; + RBMap<TexturePair, RID> texture_pair_to_uniform_set_cache; + RBMap<RID, RID> texture_to_compute_uniform_set_cache; + RBMap<TexturePair, RID> texture_pair_to_compute_uniform_set_cache; + RBMap<TexturePair, RID> image_pair_to_compute_uniform_set_cache; + RBMap<TextureSamplerPair, RID> texture_sampler_to_compute_uniform_set_cache; RID _get_uniform_set_from_image(RID p_texture); RID _get_uniform_set_from_texture(RID p_texture, bool p_use_mipmaps = false); diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp index 4bfaad9fe6..7b92e92f8c 100644 --- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp @@ -1523,7 +1523,7 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co Vector<Color> c; { Color cc = clear_color.srgb_to_linear(); - if (using_separate_specular) { + if (using_separate_specular || render_buffer) { cc.a = 0; //subsurf scatter must be 0 } c.push_back(cc); @@ -2006,14 +2006,14 @@ void RenderForwardClustered::_render_sdfgi(RID p_render_buffers, const Vector3i RID rp_uniform_set = _setup_sdfgi_render_pass_uniform_set(p_albedo_texture, p_emission_texture, p_emission_aniso_texture, p_geom_facing_texture); - Map<Size2i, RID>::Element *E = sdfgi_framebuffer_size_cache.find(fb_size); + HashMap<Size2i, RID>::Iterator E = sdfgi_framebuffer_size_cache.find(fb_size); if (!E) { RID fb = RD::get_singleton()->framebuffer_create_empty(fb_size); E = sdfgi_framebuffer_size_cache.insert(fb_size, fb); } RenderListParameters render_list_params(render_list[RENDER_LIST_SECONDARY].elements.ptr(), render_list[RENDER_LIST_SECONDARY].element_info.ptr(), render_list[RENDER_LIST_SECONDARY].elements.size(), true, pass_mode, 0, true, false, rp_uniform_set, false); - _render_list_with_threads(&render_list_params, E->get(), RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, Vector<Color>(), 1.0, 0, Rect2(), sbs); + _render_list_with_threads(&render_list_params, E->value, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, Vector<Color>(), 1.0, 0, Rect2(), sbs); } RD::get_singleton()->draw_command_end_label(); @@ -3276,8 +3276,8 @@ RenderForwardClustered::~RenderForwardClustered() { memdelete_arr(scene_state.lightmap_captures); } - while (sdfgi_framebuffer_size_cache.front()) { - RD::get_singleton()->free(sdfgi_framebuffer_size_cache.front()->get()); - sdfgi_framebuffer_size_cache.erase(sdfgi_framebuffer_size_cache.front()); + while (sdfgi_framebuffer_size_cache.begin()) { + RD::get_singleton()->free(sdfgi_framebuffer_size_cache.begin()->value); + sdfgi_framebuffer_size_cache.remove(sdfgi_framebuffer_size_cache.begin()); } } diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h index 0e588aecb4..bec10f7f0e 100644 --- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h +++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h @@ -106,7 +106,7 @@ class RenderForwardClustered : public RendererSceneRenderRD { RID color_only_fb; RID specular_only_fb; int width, height; - Map<uint32_t, RID> color_framebuffers; + HashMap<uint32_t, RID> color_framebuffers; uint32_t view_count; RID render_sdfgi_uniform_set; @@ -396,7 +396,7 @@ class RenderForwardClustered : public RendererSceneRenderRD { void _fill_instance_data(RenderListType p_render_list, int *p_render_info = nullptr, uint32_t p_offset = 0, int32_t p_max_elements = -1, bool p_update_buffer = true); void _fill_render_list(RenderListType p_render_list, const RenderDataRD *p_render_data, PassMode p_pass_mode, bool p_using_sdfgi = false, bool p_using_opaque_gi = false, bool p_append = false); - Map<Size2i, RID> sdfgi_framebuffer_size_cache; + HashMap<Size2i, RID> sdfgi_framebuffer_size_cache; struct GeometryInstanceData; struct GeometryInstanceForwardClustered; diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp index 036ad0f18a..bd39dd9c70 100644 --- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp @@ -154,7 +154,7 @@ void SceneShaderForwardClustered::ShaderData::set_code(const String &p_code) { print_line(gen_code.defines[i]); } - Map<String, String>::Element *el = gen_code.code.front(); + RBMap<String, String>::Element *el = gen_code.code.front(); while (el) { print_line("\n**code " + el->key() + ":\n" + el->value()); @@ -376,14 +376,14 @@ void SceneShaderForwardClustered::ShaderData::set_default_texture_param(const St } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void SceneShaderForwardClustered::ShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -477,7 +477,7 @@ void SceneShaderForwardClustered::MaterialData::set_next_pass(RID p_pass) { next_pass = p_pass; } -bool SceneShaderForwardClustered::MaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool SceneShaderForwardClustered::MaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { SceneShaderForwardClustered *shader_singleton = (SceneShaderForwardClustered *)SceneShaderForwardClustered::singleton; return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, shader_singleton->shader.version_get_shader(shader_data->version, 0), RenderForwardClustered::MATERIAL_UNIFORM_SET, RD::BARRIER_MASK_RASTER); diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h index 0b2df983ff..c22b2f243d 100644 --- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h +++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h @@ -138,14 +138,14 @@ public: String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; uint32_t ubo_size = 0; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; DepthDraw depth_draw; DepthTest depth_test; @@ -208,7 +208,7 @@ public: uint8_t priority; virtual void set_render_priority(int p_priority); virtual void set_next_pass(RID p_pass); - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~MaterialData(); }; @@ -239,7 +239,7 @@ public: ShaderData *overdraw_material_shader_ptr = nullptr; Vector<RD::PipelineSpecializationConstant> default_specialization_constants; - Set<uint32_t> valid_color_pass_pipelines; + RBSet<uint32_t> valid_color_pass_pipelines; SceneShaderForwardClustered(); ~SceneShaderForwardClustered(); diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp index cdddc35579..a3cabb0693 100644 --- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp @@ -154,7 +154,7 @@ void SceneShaderForwardMobile::ShaderData::set_code(const String &p_code) { print_line(gen_code.defines[i]); } - Map<String, String>::Element * el = gen_code.code.front(); + RBMap<String, String>::Element * el = gen_code.code.front(); while (el) { print_line("\n**code " + el->key() + ":\n" + el->value()); @@ -339,14 +339,14 @@ void SceneShaderForwardMobile::ShaderData::set_default_texture_param(const Strin } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void SceneShaderForwardMobile::ShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -440,7 +440,7 @@ void SceneShaderForwardMobile::MaterialData::set_next_pass(RID p_pass) { next_pass = p_pass; } -bool SceneShaderForwardMobile::MaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool SceneShaderForwardMobile::MaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { SceneShaderForwardMobile *shader_singleton = (SceneShaderForwardMobile *)SceneShaderForwardMobile::singleton; return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, shader_singleton->shader.version_get_shader(shader_data->version, 0), RenderForwardMobile::MATERIAL_UNIFORM_SET, RD::BARRIER_MASK_RASTER); diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h index 50b5fb26ec..f325d5c0a5 100644 --- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h +++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.h @@ -104,14 +104,14 @@ public: String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; uint32_t ubo_size = 0; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; DepthDraw depth_draw; DepthTest depth_test; @@ -171,7 +171,7 @@ public: uint8_t priority; virtual void set_render_priority(int p_priority); virtual void set_next_pass(RID p_pass); - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~MaterialData(); }; diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp index 386bc18fcd..3c2f3f8a42 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp @@ -2160,14 +2160,14 @@ void RendererCanvasRenderRD::CanvasShaderData::set_default_texture_param(const S } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void RendererCanvasRenderRD::CanvasShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { @@ -2246,7 +2246,7 @@ RendererRD::ShaderData *RendererCanvasRenderRD::_create_shader_func() { return shader_data; } -bool RendererCanvasRenderRD::CanvasMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool RendererCanvasRenderRD::CanvasMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { RendererCanvasRenderRD *canvas_singleton = static_cast<RendererCanvasRenderRD *>(RendererCanvasRender::singleton); return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, canvas_singleton->shader.canvas_shader.version_get_shader(shader_data->version, 0), MATERIAL_UNIFORM_SET); diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h index 06970acca6..04881ce7e6 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h @@ -166,14 +166,14 @@ class RendererCanvasRenderRD : public RendererCanvasRender { PipelineVariants pipeline_variants; String path; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; uint32_t ubo_size = 0; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; bool uses_screen_texture = false; bool uses_sdf = false; @@ -205,7 +205,7 @@ class RendererCanvasRenderRD : public RendererCanvasRender { virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~CanvasMaterialData(); }; diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.h b/servers/rendering/renderer_rd/renderer_compositor_rd.h index 1fd6550fb8..aefc189f68 100644 --- a/servers/rendering/renderer_rd/renderer_compositor_rd.h +++ b/servers/rendering/renderer_rd/renderer_compositor_rd.h @@ -90,7 +90,7 @@ protected: RID sampler; } blit; - Map<RID, RID> render_target_descriptors; + HashMap<RID, RID> render_target_descriptors; double time = 0.0; double delta = 0.0; diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp index 21b1b45802..3f3b087edb 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp @@ -3959,45 +3959,45 @@ void RendererSceneRenderRD::FogShaderData::set_default_texture_param(const Strin } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void RendererSceneRenderRD::FogShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + RBMap<int, StringName> order; - for (Map<StringName, ShaderLanguage::ShaderNode::Uniform>::Element *E = uniforms.front(); E; E = E->next()) { - if (E->get().scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E->get().scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { + for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { + if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { continue; } - if (E->get().texture_order >= 0) { - order[E->get().texture_order + 100000] = E->key(); + if (E.value.texture_order >= 0) { + order[E.value.texture_order + 100000] = E.key; } else { - order[E->get().order] = E->key(); + order[E.value.order] = E.key; } } - for (Map<int, StringName>::Element *E = order.front(); E; E = E->next()) { - PropertyInfo pi = ShaderLanguage::uniform_to_property_info(uniforms[E->get()]); - pi.name = E->get(); + for (const KeyValue<int, StringName> &E : order) { + PropertyInfo pi = ShaderLanguage::uniform_to_property_info(uniforms[E.value]); + pi.name = E.value; p_param_list->push_back(pi); } } void RendererSceneRenderRD::FogShaderData::get_instance_param_list(List<RendererMaterialStorage::InstanceShaderParam> *p_param_list) const { - for (Map<StringName, ShaderLanguage::ShaderNode::Uniform>::Element *E = uniforms.front(); E; E = E->next()) { - if (E->get().scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { + for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { + if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { continue; } RendererMaterialStorage::InstanceShaderParam p; - p.info = ShaderLanguage::uniform_to_property_info(E->get()); - p.info.name = E->key(); //supply name - p.index = E->get().instance_index; - p.default_value = ShaderLanguage::constant_value_to_variant(E->get().default_value, E->get().type, E->get().array_size, E->get().hint); + p.info = ShaderLanguage::uniform_to_property_info(E.value); + p.info.name = E.key; //supply name + p.index = E.value.instance_index; + p.default_value = ShaderLanguage::constant_value_to_variant(E.value.default_value, E.value.type, E.value.array_size, E.value.hint); p_param_list->push_back(p); } } @@ -4045,7 +4045,7 @@ RendererSceneRenderRD::FogShaderData::~FogShaderData() { //////////////////////////////////////////////////////////////////////////////// // Fog material -bool RendererSceneRenderRD::FogMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool RendererSceneRenderRD::FogMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { RendererSceneRenderRD *scene_singleton = static_cast<RendererSceneRenderRD *>(RendererSceneRenderRD::singleton); uniform_set_updated = true; @@ -5464,8 +5464,8 @@ bool RendererSceneRenderRD::free(RID p_rid) { LightInstance *light_instance = light_instance_owner.get_or_null(p_rid); //remove from shadow atlases.. - for (Set<RID>::Element *E = light_instance->shadow_atlases.front(); E; E = E->next()) { - ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(E->get()); + for (const RID &E : light_instance->shadow_atlases) { + ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(E); ERR_CONTINUE(!shadow_atlas->shadow_owners.has(p_rid)); uint32_t key = shadow_atlas->shadow_owners[p_rid]; uint32_t q = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3; diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h index f60b7c7232..4daee17525 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h @@ -297,7 +297,7 @@ private: RID depth; RID fb; //for copying - Map<RID, uint32_t> shadow_owners; + HashMap<RID, uint32_t> shadow_owners; }; RID_Owner<ShadowAtlas> shadow_atlas_owner; @@ -345,7 +345,7 @@ private: RID side_fb[6]; }; - Map<int, ShadowCubemap> shadow_cubemaps; + HashMap<int, ShadowCubemap> shadow_cubemaps; ShadowCubemap *_get_shadow_cubemap(int p_size); void _create_shadow_cubemaps(); @@ -387,7 +387,7 @@ private: Rect2 directional_rect; - Set<RID> shadow_atlases; //shadow atlases where this light is registered + RBSet<RID> shadow_atlases; //shadow atlases where this light is registered ForwardID forward_id = -1; @@ -921,7 +921,7 @@ private: RID version; RID pipeline; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; @@ -929,7 +929,7 @@ private: String path; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; bool uses_time = false; @@ -954,7 +954,7 @@ private: virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~FogMaterialData(); }; diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp index 4e62dee6af..14a5f02eee 100644 --- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp @@ -151,14 +151,14 @@ void RendererSceneSkyRD::SkyShaderData::set_default_texture_param(const StringNa } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void RendererSceneSkyRD::SkyShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { @@ -237,7 +237,7 @@ RendererSceneSkyRD::SkyShaderData::~SkyShaderData() { //////////////////////////////////////////////////////////////////////////////// // Sky material -bool RendererSceneSkyRD::SkyMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool RendererSceneSkyRD::SkyMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { RendererSceneRenderRD *scene_singleton = static_cast<RendererSceneRenderRD *>(RendererSceneRenderRD::singleton); uniform_set_updated = true; diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.h b/servers/rendering/renderer_rd/renderer_scene_sky_rd.h index ec225019c8..83a8fe6e77 100644 --- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.h +++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.h @@ -110,7 +110,7 @@ private: RID version; PipelineCacheRD pipelines[SKY_VERSION_MAX]; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; @@ -118,7 +118,7 @@ private: String path; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; bool uses_time = false; bool uses_position = false; @@ -235,7 +235,7 @@ public: virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~SkyMaterialData(); }; diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp index fdfecf2d2c..04e05380f1 100644 --- a/servers/rendering/renderer_rd/shader_rd.cpp +++ b/servers/rendering/renderer_rd/shader_rd.cpp @@ -522,7 +522,7 @@ void ShaderRD::_compile_version(Version *p_version) { p_version->valid = true; } -void ShaderRD::version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines) { +void ShaderRD::version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines) { ERR_FAIL_COND(is_compute); Version *version = version_owner.get_or_null(p_version); @@ -547,7 +547,7 @@ void ShaderRD::version_set_code(RID p_version, const Map<String, String> &p_code } } -void ShaderRD::version_set_compute_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines) { +void ShaderRD::version_set_compute_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines) { ERR_FAIL_COND(!is_compute); Version *version = version_owner.get_or_null(p_version); diff --git a/servers/rendering/renderer_rd/shader_rd.h b/servers/rendering/renderer_rd/shader_rd.h index 8e57f0d9af..40b10808c2 100644 --- a/servers/rendering/renderer_rd/shader_rd.h +++ b/servers/rendering/renderer_rd/shader_rd.h @@ -35,7 +35,7 @@ #include "core/string/string_builder.h" #include "core/templates/hash_map.h" #include "core/templates/local_vector.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/templates/rid_owner.h" #include "core/variant/variant.h" #include "servers/rendering_server.h" @@ -51,7 +51,7 @@ class ShaderRD { CharString vertex_globals; CharString compute_globals; CharString fragment_globals; - Map<StringName, CharString> code_sections; + HashMap<StringName, CharString> code_sections; Vector<CharString> custom_defines; Vector<uint8_t> *variant_data = nullptr; @@ -129,8 +129,8 @@ protected: public: RID version_create(); - void version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines); - void version_set_compute_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines); + void version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines); + void version_set_compute_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines); _FORCE_INLINE_ RID version_get_shader(RID p_version, int p_variant) { ERR_FAIL_INDEX_V(p_variant, variant_defines.size(), RID()); diff --git a/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl b/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl index 5a238452c0..a8ccdea60b 100644 --- a/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/tonemap.glsl @@ -426,12 +426,13 @@ vec3 screen_space_dither(vec2 frag_coord) { void main() { #ifdef SUBPASS // SUBPASS and MULTIVIEW can be combined but in that case we're already reading from the correct layer - vec3 color = subpassLoad(input_color).rgb * params.luminance_multiplier; + vec4 color = subpassLoad(input_color); #elif defined(MULTIVIEW) - vec3 color = textureLod(source_color, vec3(uv_interp, ViewIndex), 0.0f).rgb * params.luminance_multiplier; + vec4 color = textureLod(source_color, vec3(uv_interp, ViewIndex), 0.0f); #else - vec3 color = textureLod(source_color, uv_interp, 0.0f).rgb * params.luminance_multiplier; + vec4 color = textureLod(source_color, uv_interp, 0.0f); #endif + color.rgb *= params.luminance_multiplier; // Exposure @@ -443,7 +444,7 @@ void main() { } #endif - color *= exposure; + color.rgb *= exposure; // Early Tonemap & SRGB Conversion #ifndef SUBPASS @@ -456,19 +457,19 @@ void main() { } if (params.use_fxaa) { - color = do_fxaa(color, exposure, uv_interp); + color.rgb = do_fxaa(color.rgb, exposure, uv_interp); } #endif if (params.use_debanding) { // For best results, debanding should be done before tonemapping. // Otherwise, we're adding noise to an already-quantized image. - color += screen_space_dither(gl_FragCoord.xy); + color.rgb += screen_space_dither(gl_FragCoord.xy); } - color = apply_tonemapping(color, params.white); + color.rgb = apply_tonemapping(color.rgb, params.white); - color = linear_to_srgb(color); // regular linear -> SRGB conversion + color.rgb = linear_to_srgb(color.rgb); // regular linear -> SRGB conversion #ifndef SUBPASS // Glow @@ -482,19 +483,19 @@ void main() { glow = apply_tonemapping(glow, params.white); glow = linear_to_srgb(glow); - color = apply_glow(color, glow); + color.rgb = apply_glow(color.rgb, glow); } #endif // Additional effects if (params.use_bcs) { - color = apply_bcs(color, params.bcs); + color.rgb = apply_bcs(color.rgb, params.bcs); } if (params.use_color_correction) { - color = apply_color_correction(color); + color.rgb = apply_color_correction(color.rgb); } - frag_color = vec4(color, 1.0f); + frag_color = color; } diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl index 58b4ded9f4..4f49c186a6 100644 --- a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl +++ b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl @@ -679,7 +679,7 @@ void main() { float normal_map_depth = 1.0; - vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size + scene_data.screen_pixel_size * 0.5; //account for center + vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size; float sss_strength = 0.0; diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl index b6ba244665..fd0fefc5fd 100644 --- a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl +++ b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl @@ -650,7 +650,7 @@ void main() { float normal_map_depth = 1.0; - vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size + scene_data.screen_pixel_size * 0.5; //account for center + vec2 screen_uv = gl_FragCoord.xy * scene_data.screen_pixel_size; float sss_strength = 0.0; @@ -924,7 +924,7 @@ void main() { #endif // !USE_LIGHTMAP #if defined(CUSTOM_IRRADIANCE_USED) - ambient_light = mix(specular_light, custom_irradiance.rgb, custom_irradiance.a); + ambient_light = mix(ambient_light, custom_irradiance.rgb, custom_irradiance.a); #endif // CUSTOM_IRRADIANCE_USED #ifdef LIGHT_CLEARCOAT_USED diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp index 550fc7d788..93f1f4e0d9 100644 --- a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp @@ -896,7 +896,7 @@ _FORCE_INLINE_ static void _fill_std140_ubo_empty(ShaderLanguage::DataType type, /////////////////////////////////////////////////////////////////////////// // MaterialData -void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Map<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color) { +void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const HashMap<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color) { MaterialStorage *material_storage = MaterialStorage::get_singleton(); bool uses_global_buffer = false; @@ -943,11 +943,11 @@ void MaterialData::update_uniform_buffer(const Map<StringName, ShaderLanguage::S ERR_CONTINUE(offset + size > p_buffer_size); #endif uint8_t *data = &p_buffer[offset]; - const Map<StringName, Variant>::Element *V = p_parameters.find(E.key); + HashMap<StringName, Variant>::ConstIterator V = p_parameters.find(E.key); if (V) { //user provided - _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, V->get(), data, p_use_linear_color); + _fill_std140_variant_ubo_value(E.value.type, E.value.array_size, V->value, data, p_use_linear_color); } else if (E.value.default_value.size()) { //default value @@ -1001,7 +1001,7 @@ MaterialData::~MaterialData() { } } -void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, const Map<StringName, Map<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color) { +void MaterialData::update_textures(const HashMap<StringName, Variant> &p_parameters, const HashMap<StringName, HashMap<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color) { TextureStorage *texture_storage = TextureStorage::get_singleton(); MaterialStorage *material_storage = MaterialStorage::get_singleton(); @@ -1029,12 +1029,12 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it changed type and is no longer a texture!."); } else { - Map<StringName, uint64_t>::Element *E = used_global_textures.find(uniform_name); + HashMap<StringName, uint64_t>::Iterator E = used_global_textures.find(uniform_name); if (!E) { E = used_global_textures.insert(uniform_name, global_textures_pass); v->texture_materials.insert(self); } else { - E->get() = global_textures_pass; + E->value = global_textures_pass; } textures.push_back(v->override.get_type() != Variant::NIL ? v->override : v->value); @@ -1044,10 +1044,10 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it was removed at some point. Material will not display correctly."); } } else { - const Map<StringName, Variant>::Element *V = p_parameters.find(uniform_name); + HashMap<StringName, Variant>::ConstIterator V = p_parameters.find(uniform_name); if (V) { - if (V->get().is_array()) { - Array array = (Array)V->get(); + if (V->value.is_array()) { + Array array = (Array)V->value; if (uniform_array_size > 0) { for (int j = 0; j < array.size(); j++) { textures.push_back(array[j]); @@ -1058,25 +1058,25 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } } } else { - textures.push_back(V->get()); + textures.push_back(V->value); } } if (uniform_array_size > 0) { if (textures.size() < uniform_array_size) { - const Map<StringName, Map<int, RID>>::Element *W = p_default_textures.find(uniform_name); + HashMap<StringName, HashMap<int, RID>>::ConstIterator W = p_default_textures.find(uniform_name); for (int j = textures.size(); j < uniform_array_size; j++) { - if (W && W->get().has(j)) { - textures.push_back(W->get()[j]); + if (W && W->value.has(j)) { + textures.push_back(W->value[j]); } else { textures.push_back(RID()); } } } } else if (textures.is_empty()) { - const Map<StringName, Map<int, RID>>::Element *W = p_default_textures.find(uniform_name); - if (W && W->get().has(0)) { - textures.push_back(W->get()[0]); + HashMap<StringName, HashMap<int, RID>>::ConstIterator W = p_default_textures.find(uniform_name); + if (W && W->value.has(0)) { + textures.push_back(W->value[0]); } } } @@ -1190,12 +1190,12 @@ void MaterialData::update_textures(const Map<StringName, Variant> &p_parameters, } { //for textures no longer used, unregister them - List<Map<StringName, uint64_t>::Element *> to_delete; - for (Map<StringName, uint64_t>::Element *E = used_global_textures.front(); E; E = E->next()) { - if (E->get() != global_textures_pass) { - to_delete.push_back(E); + List<StringName> to_delete; + for (KeyValue<StringName, uint64_t> &E : used_global_textures) { + if (E.value != global_textures_pass) { + to_delete.push_back(E.key); - GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E->key()); + GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E.key); if (v) { v->texture_materials.erase(self); } @@ -1225,7 +1225,7 @@ void MaterialData::free_parameters_uniform_set(RID p_uniform_set) { } } -bool MaterialData::update_parameters_uniform_set(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const Map<StringName, Map<int, RID>> &p_default_texture_params, uint32_t p_ubo_size, RID &uniform_set, RID p_shader, uint32_t p_shader_uniform_set, uint32_t p_barrier) { +bool MaterialData::update_parameters_uniform_set(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const HashMap<StringName, HashMap<int, RID>> &p_default_texture_params, uint32_t p_ubo_size, RID &uniform_set, RID p_shader, uint32_t p_shader_uniform_set, uint32_t p_barrier) { if ((uint32_t)ubo_data.size() != p_ubo_size) { p_uniform_dirty = true; if (uniform_buffer.is_valid()) { @@ -1979,8 +1979,8 @@ void MaterialStorage::global_variable_set(const StringName &p_name, const Varian } else { //texture MaterialStorage *material_storage = MaterialStorage::get_singleton(); - for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { - Material *material = material_storage->get_material(E->get()); + for (const RID &E : gv.texture_materials) { + Material *material = material_storage->get_material(E); ERR_CONTINUE(!material); material_storage->_material_queue_update(material, false, true); } @@ -2011,8 +2011,8 @@ void MaterialStorage::global_variable_set_override(const StringName &p_name, con } else { //texture MaterialStorage *material_storage = MaterialStorage::get_singleton(); - for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) { - Material *material = material_storage->get_material(E->get()); + for (const RID &E : gv.texture_materials) { + Material *material = material_storage->get_material(E); ERR_CONTINUE(!material); material_storage->_material_queue_update(material, false, true); } @@ -2305,8 +2305,8 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->data = nullptr; } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { - Material *material = E->get(); + for (Material *E : shader->owners) { + Material *material = E; material->shader_type = new_type; if (material->data) { memdelete(material->data); @@ -2322,8 +2322,8 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->type = SHADER_TYPE_MAX; //invalid } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { - Material *material = E->get(); + for (Material *E : shader->owners) { + Material *material = E; if (shader->data) { material->data = material_get_data_request_function(new_type)(shader->data); material->data->self = material->self; @@ -2334,7 +2334,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { } if (shader->data) { - for (const KeyValue<StringName, Map<int, RID>> &E : shader->default_texture_parameter) { + for (const KeyValue<StringName, HashMap<int, RID>> &E : shader->default_texture_parameter) { for (const KeyValue<int, RID> &E2 : E.value) { shader->data->set_default_texture_param(E.key, E2.value, E2.key); } @@ -2346,8 +2346,8 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) { shader->data->set_code(p_code); } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { - Material *material = E->get(); + for (Material *E : shader->owners) { + Material *material = E; material->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MATERIAL); _material_queue_update(material, true, true); } @@ -2373,7 +2373,7 @@ void MaterialStorage::shader_set_default_texture_param(RID p_shader, const Strin if (p_texture.is_valid() && TextureStorage::get_singleton()->owns_texture(p_texture)) { if (!shader->default_texture_parameter.has(p_name)) { - shader->default_texture_parameter[p_name] = Map<int, RID>(); + shader->default_texture_parameter[p_name] = HashMap<int, RID>(); } shader->default_texture_parameter[p_name][p_index] = p_texture; } else { @@ -2388,8 +2388,8 @@ void MaterialStorage::shader_set_default_texture_param(RID p_shader, const Strin if (shader->data) { shader->data->set_default_texture_param(p_name, p_texture, p_index); } - for (Set<Material *>::Element *E = shader->owners.front(); E; E = E->next()) { - Material *material = E->get(); + for (Material *E : shader->owners) { + Material *material = E; _material_queue_update(material, false, true); } } diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.h b/servers/rendering/renderer_rd/storage_rd/material_storage.h index 0e899e37c8..7d4db49f78 100644 --- a/servers/rendering/renderer_rd/storage_rd/material_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/material_storage.h @@ -76,23 +76,23 @@ struct Shader { ShaderData *data = nullptr; String code; ShaderType type; - Map<StringName, Map<int, RID>> default_texture_parameter; - Set<Material *> owners; + HashMap<StringName, HashMap<int, RID>> default_texture_parameter; + RBSet<Material *> owners; }; /* Material structs */ struct MaterialData { - void update_uniform_buffer(const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Map<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color); - void update_textures(const Map<StringName, Variant> &p_parameters, const Map<StringName, Map<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color); + void update_uniform_buffer(const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const HashMap<StringName, Variant> &p_parameters, uint8_t *p_buffer, uint32_t p_buffer_size, bool p_use_linear_color); + void update_textures(const HashMap<StringName, Variant> &p_parameters, const HashMap<StringName, HashMap<int, RID>> &p_default_textures, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, RID *p_textures, bool p_use_linear_color); virtual void set_render_priority(int p_priority) = 0; virtual void set_next_pass(RID p_pass) = 0; - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) = 0; + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) = 0; virtual ~MaterialData(); //to be used internally by update_parameters, in the most common configuration of material parameters - bool update_parameters_uniform_set(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const Map<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const Map<StringName, Map<int, RID>> &p_default_texture_params, uint32_t p_ubo_size, RID &uniform_set, RID p_shader, uint32_t p_shader_uniform_set, uint32_t p_barrier = RD::BARRIER_MASK_ALL); + bool update_parameters_uniform_set(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty, const HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> &p_uniforms, const uint32_t *p_uniform_offsets, const Vector<ShaderCompiler::GeneratedCode::Texture> &p_texture_uniforms, const HashMap<StringName, HashMap<int, RID>> &p_default_texture_params, uint32_t p_ubo_size, RID &uniform_set, RID p_shader, uint32_t p_shader_uniform_set, uint32_t p_barrier = RD::BARRIER_MASK_ALL); void free_parameters_uniform_set(RID p_uniform_set); private: @@ -101,7 +101,7 @@ private: List<RID>::Element *global_buffer_E = nullptr; List<RID>::Element *global_texture_E = nullptr; uint64_t global_textures_pass = 0; - Map<StringName, uint64_t> used_global_textures; + HashMap<StringName, uint64_t> used_global_textures; //internally by update_parameters_uniform_set Vector<uint8_t> ubo_data; @@ -120,7 +120,7 @@ struct Material { uint32_t shader_id = 0; bool uniform_dirty = false; bool texture_dirty = false; - Map<StringName, Variant> params; + HashMap<StringName, Variant> params; int32_t priority = 0; RID next_pass; SelfList<Material> update_element; @@ -137,7 +137,7 @@ struct GlobalVariables { BUFFER_DIRTY_REGION_SIZE = 1024 }; struct Variable { - Set<RID> texture_materials; // materials using this + RBSet<RID> texture_materials; // materials using this RS::GlobalVariableType type; Variant value; diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index 9b7b0d2c25..1e0d67f269 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -215,8 +215,8 @@ void MeshStorage::mesh_free(RID p_rid) { ERR_PRINT("deleting mesh with active instances"); } if (mesh->shadow_owners.size()) { - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { - Mesh *shadow_owner = E->get(); + for (Mesh *E : mesh->shadow_owners) { + Mesh *shadow_owner = E; shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); } @@ -431,8 +431,8 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { - Mesh *shadow_owner = E->get(); + for (Mesh *E : mesh->shadow_owners) { + Mesh *shadow_owner = E; shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); } @@ -742,8 +742,8 @@ void MeshStorage::mesh_clear(RID p_mesh) { mesh->has_bone_weights = false; mesh->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); - for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) { - Mesh *shadow_owner = E->get(); + for (Mesh *E : mesh->shadow_owners) { + Mesh *shadow_owner = E; shadow_owner->shadow_mesh = RID(); shadow_owner->dependency.changed_notify(RendererStorage::DEPENDENCY_CHANGED_MESH); } diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h index 7d3f603afd..d90bb2f128 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h @@ -141,7 +141,7 @@ struct Mesh { List<MeshInstance *> instances; RID shadow_mesh; - Set<Mesh *> shadow_owners; + RBSet<Mesh *> shadow_owners; RendererStorage::Dependency dependency; }; diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp index 094120f908..e15d3e13a9 100644 --- a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp @@ -838,8 +838,8 @@ void ParticlesStorage::_particles_process(Particles *p_particles, double p_delta } uint32_t collision_3d_textures_used = 0; - for (const Set<RID>::Element *E = p_particles->collisions.front(); E; E = E->next()) { - ParticlesCollisionInstance *pci = particles_collision_instance_owner.get_or_null(E->get()); + for (const RID &E : p_particles->collisions) { + ParticlesCollisionInstance *pci = particles_collision_instance_owner.get_or_null(E); if (!pci || !pci->active) { continue; } @@ -1592,14 +1592,14 @@ void ParticlesStorage::ParticlesShaderData::set_default_texture_param(const Stri } } else { if (!default_texture_params.has(p_name)) { - default_texture_params[p_name] = Map<int, RID>(); + default_texture_params[p_name] = HashMap<int, RID>(); } default_texture_params[p_name][p_index] = p_texture; } } void ParticlesStorage::ParticlesShaderData::get_param_list(List<PropertyInfo> *p_param_list) const { - Map<int, StringName> order; + HashMap<int, StringName> order; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : uniforms) { if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL || E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) { @@ -1676,7 +1676,7 @@ ShaderData *ParticlesStorage::_create_particles_shader_func() { return shader_data; } -bool ParticlesStorage::ParticlesMaterialData::update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { +bool ParticlesStorage::ParticlesMaterialData::update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty) { return update_parameters_uniform_set(p_parameters, p_uniform_dirty, p_textures_dirty, shader_data->uniforms, shader_data->ubo_offsets.ptr(), shader_data->texture_uniforms, shader_data->default_texture_params, shader_data->ubo_size, uniform_set, ParticlesStorage::get_singleton()->particles_shader.shader.version_get_shader(shader_data->version, 0), 3); } diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.h b/servers/rendering/renderer_rd/storage_rd/particles_storage.h index c6480794c1..eb55db19fb 100644 --- a/servers/rendering/renderer_rd/storage_rd/particles_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.h @@ -224,7 +224,7 @@ struct Particles { ParticleEmissionBuffer *emission_buffer = nullptr; RID emission_storage_buffer; - Set<RID> collisions; + RBSet<RID> collisions; RendererStorage::Dependency dependency; @@ -345,7 +345,7 @@ private: RID version; bool uses_collision = false; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> uniforms; Vector<ShaderCompiler::GeneratedCode::Texture> texture_uniforms; Vector<uint32_t> ubo_offsets; @@ -353,7 +353,7 @@ private: String path; String code; - Map<StringName, Map<int, RID>> default_texture_params; + HashMap<StringName, HashMap<int, RID>> default_texture_params; RID pipeline; @@ -387,7 +387,7 @@ private: virtual void set_render_priority(int p_priority) {} virtual void set_next_pass(RID p_pass) {} - virtual bool update_parameters(const Map<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); + virtual bool update_parameters(const HashMap<StringName, Variant> &p_parameters, bool p_uniform_dirty, bool p_textures_dirty); virtual ~ParticlesMaterialData(); }; diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.h b/servers/rendering/renderer_rd/storage_rd/texture_storage.h index a6f50803e4..029816cbda 100644 --- a/servers/rendering/renderer_rd/storage_rd/texture_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.h @@ -124,7 +124,7 @@ public: RID proxy_to; Vector<RID> proxies; - Set<RID> lightmap_users; + RBSet<RID> lightmap_users; RS::TextureDetectCallback detect_3d_callback = nullptr; void *detect_3d_callback_ud = nullptr; diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index d85f314c5c..89bd12ea3d 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -653,8 +653,8 @@ void RendererSceneCull::instance_set_base(RID p_instance, RID p_base) { scene_render->geometry_instance_set_lightmap_capture(geom->geometry_instance, instance->lightmap_sh.ptr()); } - for (Set<Instance *>::Element *E = instance->visibility_dependencies.front(); E; E = E->next()) { - Instance *dep_instance = E->get(); + for (Instance *E : instance->visibility_dependencies) { + Instance *dep_instance = E; ERR_CONTINUE(dep_instance->array_index == -1); ERR_CONTINUE(dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index != -1); dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index = instance->array_index; @@ -1292,15 +1292,15 @@ void RendererSceneCull::instance_set_visibility_parent(RID p_instance, RID p_par bool RendererSceneCull::_update_instance_visibility_depth(Instance *p_instance) { bool cycle_detected = false; - Set<Instance *> traversed_nodes; + RBSet<Instance *> traversed_nodes; { Instance *instance = p_instance; while (instance) { if (!instance->visibility_dependencies.is_empty()) { uint32_t depth = 0; - for (Set<Instance *>::Element *E = instance->visibility_dependencies.front(); E; E = E->next()) { - depth = MAX(depth, E->get()->visibility_dependencies_depth); + for (const Instance *E : instance->visibility_dependencies) { + depth = MAX(depth, E->visibility_dependencies_depth); } instance->visibility_dependencies_depth = depth + 1; } else { @@ -1429,7 +1429,7 @@ void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, c ERR_FAIL_COND(p_value.get_type() == Variant::OBJECT); - Map<StringName, Instance::InstanceShaderParameter>::Element *E = instance->instance_shader_parameters.find(p_parameter); + HashMap<StringName, Instance::InstanceShaderParameter>::Iterator E = instance->instance_shader_parameters.find(p_parameter); if (!E) { Instance::InstanceShaderParameter isp; @@ -1438,10 +1438,10 @@ void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, c isp.value = p_value; instance->instance_shader_parameters[p_parameter] = isp; } else { - E->get().value = p_value; - if (E->get().index >= 0 && instance->instance_allocated_shader_parameters) { + E->value.value = p_value; + if (E->value.index >= 0 && instance->instance_allocated_shader_parameters) { //update directly - RSG::material_storage->global_variables_instance_update(p_instance, E->get().index, p_value); + RSG::material_storage->global_variables_instance_update(p_instance, E->value.index, p_value); } } } @@ -1559,8 +1559,8 @@ void RendererSceneCull::_update_instance(Instance *p_instance) { InstanceLightmapData *lightmap_data = static_cast<InstanceLightmapData *>(p_instance->base_data); //erase dependencies, since no longer a lightmap - for (Set<Instance *>::Element *E = lightmap_data->geometries.front(); E; E = E->next()) { - Instance *geom = E->get(); + for (Instance *E : lightmap_data->geometries) { + Instance *geom = E; _instance_queue_update(geom, true, false); } } @@ -1574,8 +1574,8 @@ void RendererSceneCull::_update_instance(Instance *p_instance) { //make sure lights are updated if it casts shadow if (geom->can_cast_shadows) { - for (Set<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { - InstanceLightData *light = static_cast<InstanceLightData *>(E->get()->base_data); + for (const Instance *E : geom->lights) { + InstanceLightData *light = static_cast<InstanceLightData *>(E->base_data); light->shadow_dirty = true; } } @@ -1632,8 +1632,8 @@ void RendererSceneCull::_update_instance(Instance *p_instance) { idata.parent_array_index = p_instance->visibility_parent ? p_instance->visibility_parent->array_index : -1; idata.visibility_index = p_instance->visibility_index; - for (Set<Instance *>::Element *E = p_instance->visibility_dependencies.front(); E; E = E->next()) { - Instance *dep_instance = E->get(); + for (Instance *E : p_instance->visibility_dependencies) { + Instance *dep_instance = E; if (dep_instance->array_index != -1) { dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index = p_instance->array_index; } @@ -1800,8 +1800,8 @@ void RendererSceneCull::_unpair_instance(Instance *p_instance) { swapped_instance->scenario->instance_visibility[swapped_instance->visibility_index].array_index = swapped_instance->array_index; } - for (Set<Instance *>::Element *E = swapped_instance->visibility_dependencies.front(); E; E = E->next()) { - Instance *dep_instance = E->get(); + for (Instance *E : swapped_instance->visibility_dependencies) { + Instance *dep_instance = E; if (dep_instance != p_instance && dep_instance->array_index != -1) { dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index = swapped_instance->array_index; } @@ -1824,8 +1824,8 @@ void RendererSceneCull::_unpair_instance(Instance *p_instance) { scene_render->geometry_instance_pair_voxel_gi_instances(geom->geometry_instance, nullptr, 0); } - for (Set<Instance *>::Element *E = p_instance->visibility_dependencies.front(); E; E = E->next()) { - Instance *dep_instance = E->get(); + for (Instance *E : p_instance->visibility_dependencies) { + Instance *dep_instance = E; if (dep_instance->array_index != -1) { dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index = -1; if ((1 << dep_instance->base_type) & RS::INSTANCE_GEOMETRY_MASK) { @@ -1923,8 +1923,8 @@ void RendererSceneCull::_update_instance_lightmap_captures(Instance *p_instance) float accum_blend = 0.0; InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(p_instance->base_data); - for (Set<Instance *>::Element *E = geom->lightmap_captures.front(); E; E = E->next()) { - Instance *lightmap = E->get(); + for (Instance *E : geom->lightmap_captures) { + Instance *lightmap = E; bool interior = RSG::light_storage->lightmap_is_interior(lightmap->base); @@ -2744,8 +2744,8 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data); uint32_t idx = 0; - for (Set<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { - InstanceLightData *light = static_cast<InstanceLightData *>(E->get()->base_data); + for (const Instance *E : geom->lights) { + InstanceLightData *light = static_cast<InstanceLightData *>(E->base_data); instance_pair_buffer[idx++] = light->instance; if (idx == MAX_INSTANCE_PAIRS) { break; @@ -2767,8 +2767,8 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data); uint32_t idx = 0; - for (Set<Instance *>::Element *E = geom->reflection_probes.front(); E; E = E->next()) { - InstanceReflectionProbeData *reflection_probe = static_cast<InstanceReflectionProbeData *>(E->get()->base_data); + for (const Instance *E : geom->reflection_probes) { + InstanceReflectionProbeData *reflection_probe = static_cast<InstanceReflectionProbeData *>(E->base_data); instance_pair_buffer[idx++] = reflection_probe->instance; if (idx == MAX_INSTANCE_PAIRS) { @@ -2784,8 +2784,8 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data); uint32_t idx = 0; - for (Set<Instance *>::Element *E = geom->decals.front(); E; E = E->next()) { - InstanceDecalData *decal = static_cast<InstanceDecalData *>(E->get()->base_data); + for (const Instance *E : geom->decals) { + InstanceDecalData *decal = static_cast<InstanceDecalData *>(E->base_data); instance_pair_buffer[idx++] = decal->instance; if (idx == MAX_INSTANCE_PAIRS) { @@ -2799,8 +2799,8 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul if (idata.flags & InstanceData::FLAG_GEOM_VOXEL_GI_DIRTY) { InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data); uint32_t idx = 0; - for (Set<Instance *>::Element *E = geom->voxel_gi_instances.front(); E; E = E->next()) { - InstanceVoxelGIData *voxel_gi = static_cast<InstanceVoxelGIData *>(E->get()->base_data); + for (const Instance *E : geom->voxel_gi_instances) { + InstanceVoxelGIData *voxel_gi = static_cast<InstanceVoxelGIData *>(E->base_data); instance_pair_buffer[idx++] = voxel_gi->probe_instance; if (idx == MAX_INSTANCE_PAIRS) { @@ -3420,8 +3420,8 @@ void RendererSceneCull::render_probes() { const RID *instance_caches = probe->light_instances.ptr(); int idx = 0; //must count visible lights - for (Set<Instance *>::Element *E = probe->lights.front(); E; E = E->next()) { - Instance *instance = E->get(); + for (Instance *E : probe->lights) { + Instance *instance = E; InstanceLightData *instance_light = (InstanceLightData *)instance->base_data; if (!instance->visible) { continue; @@ -3502,8 +3502,8 @@ void RendererSceneCull::render_probes() { RID *instance_caches = probe->light_instances.ptrw(); int idx = 0; //must count visible lights - for (Set<Instance *>::Element *E = probe->lights.front(); E; E = E->next()) { - Instance *instance = E->get(); + for (Instance *E : probe->lights) { + Instance *instance = E; InstanceLightData *instance_light = (InstanceLightData *)instance->base_data; if (!instance->visible) { continue; @@ -3557,8 +3557,8 @@ void RendererSceneCull::render_probes() { RID instance_pair_buffer[MAX_INSTANCE_PAIRS]; - for (Set<Instance *>::Element *E = probe->dynamic_geometries.front(); E; E = E->next()) { - Instance *ins = E->get(); + for (Instance *E : probe->dynamic_geometries) { + Instance *ins = E; if (!ins->visible) { continue; } @@ -3566,8 +3566,8 @@ void RendererSceneCull::render_probes() { if (ins->scenario && ins->array_index >= 0 && (ins->scenario->instance_data[ins->array_index].flags & InstanceData::FLAG_GEOM_VOXEL_GI_DIRTY)) { uint32_t idx = 0; - for (Set<Instance *>::Element *F = geom->voxel_gi_instances.front(); F; F = F->next()) { - InstanceVoxelGIData *voxel_gi2 = static_cast<InstanceVoxelGIData *>(F->get()->base_data); + for (const Instance *F : geom->voxel_gi_instances) { + InstanceVoxelGIData *voxel_gi2 = static_cast<InstanceVoxelGIData *>(F->base_data); instance_pair_buffer[idx++] = voxel_gi2->probe_instance; if (idx == MAX_INSTANCE_PAIRS) { @@ -3629,7 +3629,7 @@ void RendererSceneCull::render_particle_colliders() { } } -void RendererSceneCull::_update_instance_shader_parameters_from_material(Map<StringName, Instance::InstanceShaderParameter> &isparams, const Map<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material) { +void RendererSceneCull::_update_instance_shader_parameters_from_material(HashMap<StringName, Instance::InstanceShaderParameter> &isparams, const HashMap<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material) { List<RendererMaterialStorage::InstanceShaderParam> plist; RSG::material_storage->material_get_instance_shader_parameters(p_material, &plist); for (const RendererMaterialStorage::InstanceShaderParam &E : plist) { @@ -3700,7 +3700,7 @@ void RendererSceneCull::_update_dirty_instance(Instance *p_instance) { bool can_cast_shadows = true; bool is_animated = false; - Map<StringName, Instance::InstanceShaderParameter> isparams; + HashMap<StringName, Instance::InstanceShaderParameter> isparams; if (p_instance->cast_shadows == RS::SHADOW_CASTING_SETTING_OFF) { can_cast_shadows = false; @@ -3823,8 +3823,8 @@ void RendererSceneCull::_update_dirty_instance(Instance *p_instance) { if (can_cast_shadows != geom->can_cast_shadows) { //ability to cast shadows change, let lights now - for (Set<Instance *>::Element *E = geom->lights.front(); E; E = E->next()) { - InstanceLightData *light = static_cast<InstanceLightData *>(E->get()->base_data); + for (const Instance *E : geom->lights) { + InstanceLightData *light = static_cast<InstanceLightData *>(E->base_data); light->shadow_dirty = true; } diff --git a/servers/rendering/renderer_scene_cull.h b/servers/rendering/renderer_scene_cull.h index b5e8cf702f..c5325ef30a 100644 --- a/servers/rendering/renderer_scene_cull.h +++ b/servers/rendering/renderer_scene_cull.h @@ -324,7 +324,7 @@ public: RID reflection_probe_shadow_atlas; RID reflection_atlas; uint64_t used_viewport_visibility_bits; - Map<RID, uint64_t> viewport_visibility_masks; + HashMap<RID, uint64_t> viewport_visibility_masks; SelfList<Instance>::List instances; @@ -426,7 +426,7 @@ public: PropertyInfo info; }; - Map<StringName, InstanceShaderParameter> instance_shader_parameters; + HashMap<StringName, InstanceShaderParameter> instance_shader_parameters; bool instance_allocated_shader_parameters = false; int32_t instance_allocated_shader_parameters_offset = -1; @@ -443,7 +443,7 @@ public: float visibility_range_end_margin = 0.0f; RS::VisibilityRangeFadeMode visibility_range_fade_mode = RS::VISIBILITY_RANGE_FADE_DISABLED; Instance *visibility_parent = nullptr; - Set<Instance *> visibility_dependencies; + RBSet<Instance *> visibility_dependencies; uint32_t visibility_dependencies_depth = 0; float transparency = 0.0f; Scenario *scenario = nullptr; @@ -579,16 +579,16 @@ public: struct InstanceGeometryData : public InstanceBaseData { RendererSceneRender::GeometryInstance *geometry_instance = nullptr; - Set<Instance *> lights; + RBSet<Instance *> lights; bool can_cast_shadows; bool material_is_animated; uint32_t projector_count = 0; uint32_t softshadow_count = 0; - Set<Instance *> decals; - Set<Instance *> reflection_probes; - Set<Instance *> voxel_gi_instances; - Set<Instance *> lightmap_captures; + RBSet<Instance *> decals; + RBSet<Instance *> reflection_probes; + RBSet<Instance *> voxel_gi_instances; + RBSet<Instance *> lightmap_captures; InstanceGeometryData() { can_cast_shadows = true; @@ -599,7 +599,7 @@ public: struct InstanceReflectionProbeData : public InstanceBaseData { Instance *owner = nullptr; - Set<Instance *> geometries; + RBSet<Instance *> geometries; RID instance; SelfList<InstanceReflectionProbeData> update_list; @@ -616,7 +616,7 @@ public: Instance *owner = nullptr; RID instance; - Set<Instance *> geometries; + RBSet<Instance *> geometries; InstanceDecalData() { } @@ -654,7 +654,7 @@ public: bool uses_projector = false; bool uses_softshadow = false; - Set<Instance *> geometries; + RBSet<Instance *> geometries; Instance *baked_light = nullptr; @@ -673,10 +673,10 @@ public: struct InstanceVoxelGIData : public InstanceBaseData { Instance *owner = nullptr; - Set<Instance *> geometries; - Set<Instance *> dynamic_geometries; + RBSet<Instance *> geometries; + RBSet<Instance *> dynamic_geometries; - Set<Instance *> lights; + RBSet<Instance *> lights; struct LightCache { RS::LightType type; @@ -713,8 +713,8 @@ public: struct InstanceLightmapData : public InstanceBaseData { RID instance; - Set<Instance *> geometries; - Set<Instance *> users; + RBSet<Instance *> geometries; + RBSet<Instance *> users; InstanceLightmapData() { } @@ -779,7 +779,7 @@ public: } }; - Set<Instance *> heightfield_particle_colliders_update_list; + RBSet<Instance *> heightfield_particle_colliders_update_list; PagedArrayPool<Instance *> instance_cull_page_pool; PagedArrayPool<RendererSceneRender::GeometryInstance *> geometry_instance_cull_page_pool; @@ -964,7 +964,7 @@ public: virtual void instance_geometry_set_lightmap(RID p_instance, RID p_lightmap, const Rect2 &p_lightmap_uv_scale, int p_slice_index); virtual void instance_geometry_set_lod_bias(RID p_instance, float p_lod_bias); - void _update_instance_shader_parameters_from_material(Map<StringName, Instance::InstanceShaderParameter> &isparams, const Map<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material); + void _update_instance_shader_parameters_from_material(HashMap<StringName, Instance::InstanceShaderParameter> &isparams, const HashMap<StringName, Instance::InstanceShaderParameter> &existing_isparams, RID p_material); virtual void instance_geometry_set_shader_parameter(RID p_instance, const StringName &p_parameter, const Variant &p_value); virtual void instance_geometry_get_shader_parameter_list(RID p_instance, List<PropertyInfo> *p_parameters) const; diff --git a/servers/rendering/renderer_storage.h b/servers/rendering/renderer_storage.h index 7cf4fd0aff..672fd4e4f1 100644 --- a/servers/rendering/renderer_storage.h +++ b/servers/rendering/renderer_storage.h @@ -62,7 +62,7 @@ public: private: friend struct DependencyTracker; - Map<DependencyTracker *, uint32_t> instances; + HashMap<DependencyTracker *, uint32_t> instances; }; struct DependencyTracker { @@ -83,15 +83,16 @@ public: } void update_end() { //call after updating dependencies - List<Pair<Dependency *, Map<DependencyTracker *, uint32_t>::Element *>> to_clean_up; - for (Set<Dependency *>::Element *E = dependencies.front(); E; E = E->next()) { - Dependency *dep = E->get(); - Map<DependencyTracker *, uint32_t>::Element *F = dep->instances.find(this); + List<Pair<Dependency *, DependencyTracker *>> to_clean_up; + + for (Dependency *E : dependencies) { + Dependency *dep = E; + HashMap<DependencyTracker *, uint32_t>::Iterator F = dep->instances.find(this); ERR_CONTINUE(!F); - if (F->get() != instance_version) { - Pair<Dependency *, Map<DependencyTracker *, uint32_t>::Element *> p; + if (F->value != instance_version) { + Pair<Dependency *, DependencyTracker *> p; p.first = dep; - p.second = F; + p.second = F->key; to_clean_up.push_back(p); } } @@ -104,8 +105,8 @@ public: } void clear() { // clear all dependencies - for (Set<Dependency *>::Element *E = dependencies.front(); E; E = E->next()) { - Dependency *dep = E->get(); + for (Dependency *E : dependencies) { + Dependency *dep = E; dep->instances.erase(this); } dependencies.clear(); @@ -116,7 +117,7 @@ public: private: friend struct Dependency; uint32_t instance_version = 0; - Set<Dependency *> dependencies; + RBSet<Dependency *> dependencies; }; virtual void base_update_dependency(RID p_base, DependencyTracker *p_instance) = 0; diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index 3ea67ae115..7c2d7a1e1d 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -226,7 +226,7 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { } if (!p_viewport->disable_2d) { - Map<Viewport::CanvasKey, Viewport::CanvasData *> canvas_map; + RBMap<Viewport::CanvasKey, Viewport::CanvasData *> canvas_map; Rect2 clip_rect(0, 0, p_viewport->size.x, p_viewport->size.y); RendererCanvasRender::Light *lights = nullptr; @@ -247,15 +247,15 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RendererCanvasCull::Canvas *canvas = static_cast<RendererCanvasCull::Canvas *>(E.value.canvas); Transform2D xf = _canvas_get_transform(p_viewport, canvas, &E.value, clip_rect.size); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { - if (!F->get()->enabled) { + for (RendererCanvasRender::LightOccluderInstance *F : canvas->occluders) { + if (!F->enabled) { continue; } - F->get()->xform_cache = xf * F->get()->xform; + F->xform_cache = xf * F->xform; - if (sdf_rect.intersects_transformed(F->get()->xform_cache, F->get()->aabb_cache)) { - F->get()->next = occluders; - occluders = F->get(); + if (sdf_rect.intersects_transformed(F->xform_cache, F->aabb_cache)) { + F->next = occluders; + occluders = F; } } } @@ -281,8 +281,8 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { // Find lights in canvas. - for (Set<RendererCanvasRender::Light *>::Element *F = canvas->lights.front(); F; F = F->next()) { - RendererCanvasRender::Light *cl = F->get(); + for (RendererCanvasRender::Light *F : canvas->lights) { + RendererCanvasRender::Light *cl = F; if (cl->enabled && cl->texture.is_valid()) { //not super efficient.. Size2 tsize = RSG::texture_storage->texture_size_with_proxy(cl->texture); @@ -313,8 +313,8 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { } } - for (Set<RendererCanvasRender::Light *>::Element *F = canvas->directional_lights.front(); F; F = F->next()) { - RendererCanvasRender::Light *cl = F->get(); + for (RendererCanvasRender::Light *F : canvas->directional_lights) { + RendererCanvasRender::Light *cl = F; if (cl->enabled) { cl->filter_next_ptr = directional_lights; directional_lights = cl; @@ -349,14 +349,14 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RendererCanvasCull::Canvas *canvas = static_cast<RendererCanvasCull::Canvas *>(E.value.canvas); Transform2D xf = _canvas_get_transform(p_viewport, canvas, &E.value, clip_rect.size); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { - if (!F->get()->enabled) { + for (RendererCanvasRender::LightOccluderInstance *F : canvas->occluders) { + if (!F->enabled) { continue; } - F->get()->xform_cache = xf * F->get()->xform; - if (shadow_rect.intersects_transformed(F->get()->xform_cache, F->get()->aabb_cache)) { - F->get()->next = occluders; - occluders = F->get(); + F->xform_cache = xf * F->xform; + if (shadow_rect.intersects_transformed(F->xform_cache, F->aabb_cache)) { + F->next = occluders; + occluders = F; } } } @@ -429,19 +429,19 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RendererCanvasCull::Canvas *canvas = static_cast<RendererCanvasCull::Canvas *>(E.value.canvas); Transform2D xf = _canvas_get_transform(p_viewport, canvas, &E.value, clip_rect.size); - for (Set<RendererCanvasRender::LightOccluderInstance *>::Element *F = canvas->occluders.front(); F; F = F->next()) { - if (!F->get()->enabled) { + for (RendererCanvasRender::LightOccluderInstance *F : canvas->occluders) { + if (!F->enabled) { continue; } - F->get()->xform_cache = xf * F->get()->xform; - Transform2D localizer = F->get()->xform_cache.affine_inverse(); + F->xform_cache = xf * F->xform; + Transform2D localizer = F->xform_cache.affine_inverse(); for (int j = 0; j < point_count; j++) { xf_points[j] = localizer.xform(points[j]); } - if (F->get()->aabb_cache.intersects_filled_polygon(xf_points, point_count)) { - F->get()->next = occluders; - occluders = F->get(); + if (F->aabb_cache.intersects_filled_polygon(xf_points, point_count)) { + F->next = occluders; + occluders = F; } } } @@ -454,7 +454,7 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) { RENDER_TIMESTAMP("< Render DirectionalLight2D Shadows"); } - if (scenario_draw_canvas_bg && canvas_map.front() && canvas_map.front()->key().get_layer() > scenario_canvas_max_layer) { + if (scenario_draw_canvas_bg && canvas_map.begin() && canvas_map.begin()->key.get_layer() > scenario_canvas_max_layer) { if (!can_draw_3d) { RSG::scene->render_empty_scene(p_viewport->render_buffers, p_viewport->scenario, p_viewport->shadow_atlas); } else { @@ -547,7 +547,7 @@ void RendererViewport::draw_viewports() { //sort viewports active_viewports.sort_custom<ViewportSort>(); - Map<DisplayServer::WindowID, Vector<BlitToScreen>> blit_to_screen_list; + HashMap<DisplayServer::WindowID, Vector<BlitToScreen>> blit_to_screen_list; //draw viewports RENDER_TIMESTAMP("> Render Viewports"); @@ -1176,8 +1176,8 @@ bool RendererViewport::free(RID p_rid) { RSG::scene->free(viewport->render_buffers); } - while (viewport->canvas_map.front()) { - viewport_remove_canvas(p_rid, viewport->canvas_map.front()->key()); + while (viewport->canvas_map.begin()) { + viewport_remove_canvas(p_rid, viewport->canvas_map.begin()->key); } viewport_set_scenario(p_rid, RID()); diff --git a/servers/rendering/renderer_viewport.h b/servers/rendering/renderer_viewport.h index b6e44e8436..da8cf5396c 100644 --- a/servers/rendering/renderer_viewport.h +++ b/servers/rendering/renderer_viewport.h @@ -137,7 +137,7 @@ public: Transform2D global_transform; - Map<RID, CanvasData> canvas_map; + HashMap<RID, CanvasData> canvas_map; RendererScene::RenderInfo render_info; diff --git a/servers/rendering/rendering_device_binds.cpp b/servers/rendering/rendering_device_binds.cpp index e50ac42027..d03c4e0427 100644 --- a/servers/rendering/rendering_device_binds.cpp +++ b/servers/rendering/rendering_device_binds.cpp @@ -45,7 +45,7 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String }; String stage_code[RD::SHADER_STAGE_MAX]; int stages_found = 0; - Map<StringName, String> version_texts; + HashMap<StringName, String> version_texts; versions.clear(); base_error = ""; diff --git a/servers/rendering/rendering_device_binds.h b/servers/rendering/rendering_device_binds.h index ee5bf8b891..8bdd3deea1 100644 --- a/servers/rendering/rendering_device_binds.h +++ b/servers/rendering/rendering_device_binds.h @@ -329,7 +329,7 @@ protected: class RDShaderFile : public Resource { GDCLASS(RDShaderFile, Resource) - Map<StringName, Ref<RDShaderSPIRV>> versions; + HashMap<StringName, Ref<RDShaderSPIRV>> versions; String base_error; public: diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp index 5669cb2054..662016e6f4 100644 --- a/servers/rendering/shader_compiler.cpp +++ b/servers/rendering/shader_compiler.cpp @@ -289,7 +289,7 @@ String ShaderCompiler::_get_sampler_name(ShaderLanguage::TextureFilter p_filter, return actions.sampler_array_name + "[" + itos(p_filter + (p_repeat == ShaderLanguage::REPEAT_ENABLE ? ShaderLanguage::FILTER_DEFAULT : 0)) + "]"; } -void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const StringName &p_for_func, const Map<StringName, String> &p_func_code, String &r_to_add, Set<StringName> &added) { +void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const StringName &p_for_func, const HashMap<StringName, String> &p_func_code, String &r_to_add, RBSet<StringName> &added) { int fidx = -1; for (int i = 0; i < p_node->functions.size(); i++) { @@ -303,8 +303,8 @@ void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const Str Vector<StringName> uses_functions; - for (Set<StringName>::Element *E = p_node->functions[fidx].uses_function.front(); E; E = E->next()) { - uses_functions.push_back(E->get()); + for (const StringName &E : p_node->functions[fidx].uses_function) { + uses_functions.push_back(E); } uses_functions.sort_custom<StringName::AlphCompare>(); //ensure order is deterministic so the same shader is always produced @@ -735,7 +735,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene } } - Map<StringName, String> function_code; + HashMap<StringName, String> function_code; //code for functions for (int i = 0; i < pnode->functions.size(); i++) { @@ -748,7 +748,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene //place functions in actual code - Set<StringName> added_funcs_per_stage[STAGE_MAX]; + RBSet<StringName> added_funcs_per_stage[STAGE_MAX]; for (int i = 0; i < pnode->functions.size(); i++) { SL::FunctionNode *fnode = pnode->functions[i].function; diff --git a/servers/rendering/shader_compiler.h b/servers/rendering/shader_compiler.h index 347ecf2988..85b93c4063 100644 --- a/servers/rendering/shader_compiler.h +++ b/servers/rendering/shader_compiler.h @@ -45,14 +45,14 @@ public: }; struct IdentifierActions { - Map<StringName, Stage> entry_point_stages; + HashMap<StringName, Stage> entry_point_stages; - Map<StringName, Pair<int *, int>> render_mode_values; - Map<StringName, bool *> render_mode_flags; - Map<StringName, bool *> usage_flag_pointers; - Map<StringName, bool *> write_flag_pointers; + HashMap<StringName, Pair<int *, int>> render_mode_values; + HashMap<StringName, bool *> render_mode_flags; + HashMap<StringName, bool *> usage_flag_pointers; + HashMap<StringName, bool *> write_flag_pointers; - Map<StringName, ShaderLanguage::ShaderNode::Uniform> *uniforms; + HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> *uniforms; }; struct GeneratedCode { @@ -74,7 +74,7 @@ public: String uniforms; String stage_globals[STAGE_MAX]; - Map<String, String> code; + HashMap<String, String> code; bool uses_global_textures; bool uses_fragment_time; @@ -82,10 +82,10 @@ public: }; struct DefaultIdentifierActions { - Map<StringName, String> renames; - Map<StringName, String> render_mode_defines; - Map<StringName, String> usage_defines; - Map<StringName, String> custom_samplers; + HashMap<StringName, String> renames; + HashMap<StringName, String> render_mode_defines; + HashMap<StringName, String> usage_defines; + HashMap<StringName, String> custom_samplers; ShaderLanguage::TextureFilter default_filter; ShaderLanguage::TextureRepeat default_repeat; String sampler_array_name; @@ -103,20 +103,20 @@ private: String _get_sampler_name(ShaderLanguage::TextureFilter p_filter, ShaderLanguage::TextureRepeat p_repeat); - void _dump_function_deps(const ShaderLanguage::ShaderNode *p_node, const StringName &p_for_func, const Map<StringName, String> &p_func_code, String &r_to_add, Set<StringName> &added); + void _dump_function_deps(const ShaderLanguage::ShaderNode *p_node, const StringName &p_for_func, const HashMap<StringName, String> &p_func_code, String &r_to_add, RBSet<StringName> &added); String _dump_node_code(const ShaderLanguage::Node *p_node, int p_level, GeneratedCode &r_gen_code, IdentifierActions &p_actions, const DefaultIdentifierActions &p_default_actions, bool p_assigning, bool p_scope = true); const ShaderLanguage::ShaderNode *shader = nullptr; const ShaderLanguage::FunctionNode *function = nullptr; StringName current_func_name; StringName time_name; - Set<StringName> texture_functions; + RBSet<StringName> texture_functions; - Set<StringName> used_name_defines; - Set<StringName> used_flag_pointers; - Set<StringName> used_rmode_defines; - Set<StringName> internal_functions; - Set<StringName> fragment_varyings; + RBSet<StringName> used_name_defines; + RBSet<StringName> used_flag_pointers; + RBSet<StringName> used_rmode_defines; + RBSet<StringName> internal_functions; + RBSet<StringName> fragment_varyings; DefaultIdentifierActions actions; diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 6f70a55948..d2e188a9a7 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -4019,7 +4019,7 @@ uint32_t ShaderLanguage::get_datatype_size(ShaderLanguage::DataType p_type) { } void ShaderLanguage::get_keyword_list(List<String> *r_keywords) { - Set<String> kws; + RBSet<String> kws; int idx = 0; @@ -4036,8 +4036,8 @@ void ShaderLanguage::get_keyword_list(List<String> *r_keywords) { idx++; } - for (Set<String>::Element *E = kws.front(); E; E = E->next()) { - r_keywords->push_back(E->get()); + for (const String &E : kws) { + r_keywords->push_back(E); } } @@ -4056,7 +4056,7 @@ bool ShaderLanguage::is_control_flow_keyword(String p_keyword) { } void ShaderLanguage::get_builtin_funcs(List<String> *r_keywords) { - Set<String> kws; + RBSet<String> kws; int idx = 0; @@ -4066,8 +4066,8 @@ void ShaderLanguage::get_builtin_funcs(List<String> *r_keywords) { idx++; } - for (Set<String>::Element *E = kws.front(); E; E = E->next()) { - r_keywords->push_back(E->get()); + for (const String &E : kws) { + r_keywords->push_back(E); } } @@ -4340,9 +4340,9 @@ bool ShaderLanguage::_propagate_function_call_sampler_uniform_settings(StringNam arg->tex_argument_check = true; arg->tex_argument_filter = p_filter; arg->tex_argument_repeat = p_repeat; - for (KeyValue<StringName, Set<int>> &E : arg->tex_argument_connect) { - for (Set<int>::Element *F = E.value.front(); F; F = F->next()) { - if (!_propagate_function_call_sampler_uniform_settings(E.key, F->get(), p_filter, p_repeat)) { + for (KeyValue<StringName, RBSet<int>> &E : arg->tex_argument_connect) { + for (const int &F : E.value) { + if (!_propagate_function_call_sampler_uniform_settings(E.key, F, p_filter, p_repeat)) { return false; } } @@ -4374,9 +4374,9 @@ bool ShaderLanguage::_propagate_function_call_sampler_builtin_reference(StringNa arg->tex_builtin_check = true; arg->tex_builtin = p_builtin; - for (KeyValue<StringName, Set<int>> &E : arg->tex_argument_connect) { - for (Set<int>::Element *F = E.value.front(); F; F = F->next()) { - if (!_propagate_function_call_sampler_builtin_reference(E.key, F->get(), p_builtin)) { + for (KeyValue<StringName, RBSet<int>> &E : arg->tex_argument_connect) { + for (const int &F : E.value) { + if (!_propagate_function_call_sampler_builtin_reference(E.key, F, p_builtin)) { return false; } } @@ -5096,7 +5096,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons for (int j = 0; j < base_function->arguments.size(); j++) { if (base_function->arguments[j].name == varname) { if (!base_function->arguments[j].tex_argument_connect.has(call_function->name)) { - base_function->arguments.write[j].tex_argument_connect[call_function->name] = Set<int>(); + base_function->arguments.write[j].tex_argument_connect[call_function->name] = RBSet<int>(); } base_function->arguments.write[j].tex_argument_connect[call_function->name].insert(i); found = true; @@ -5419,9 +5419,9 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons StringName member_struct_name = ""; int array_size = 0; - Set<char> position_symbols; - Set<char> color_symbols; - Set<char> texture_symbols; + RBSet<char> position_symbols; + RBSet<char> color_symbols; + RBSet<char> texture_symbols; bool mix_error = false; @@ -6648,7 +6648,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun StringName func_name = parent_function->name; if (!used_local_vars.has(func_name)) { - used_local_vars.insert(func_name, Map<StringName, Usage>()); + used_local_vars.insert(func_name, HashMap<StringName, Usage>()); } used_local_vars[func_name].insert(name, Usage(tk_line)); @@ -7062,7 +7062,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun _set_tkpos(pos); continue; } else { - Set<int> constants; + RBSet<int> constants; for (int i = 0; i < switch_block->statements.size(); i++) { // Checks for duplicates. ControlFlowNode *flow = static_cast<ControlFlowNode *>(switch_block->statements[i]); if (flow) { @@ -7565,15 +7565,15 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun return OK; } -String ShaderLanguage::_get_shader_type_list(const Set<String> &p_shader_types) const { +String ShaderLanguage::_get_shader_type_list(const RBSet<String> &p_shader_types) const { // Return a list of shader types as an human-readable string String valid_types; - for (const Set<String>::Element *E = p_shader_types.front(); E; E = E->next()) { + for (const String &E : p_shader_types) { if (!valid_types.is_empty()) { valid_types += ", "; } - valid_types += "'" + E->get() + "'"; + valid_types += "'" + E + "'"; } return valid_types; @@ -7639,7 +7639,7 @@ Error ShaderLanguage::_validate_datatype(DataType p_type) { return OK; } -Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Vector<ModeInfo> &p_render_modes, const Set<String> &p_shader_types) { +Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_functions, const Vector<ModeInfo> &p_render_modes, const RBSet<String> &p_shader_types) { Token tk = _get_token(); TkPos prev_pos; Token next; @@ -7699,7 +7699,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct stages = &p_functions; const FunctionInfo &constants = p_functions.has("constants") ? p_functions["constants"] : FunctionInfo(); - Map<String, String> defined_modes; + HashMap<String, String> defined_modes; while (tk.type != TK_EOF) { switch (tk.type) { @@ -7790,7 +7790,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct st.shader_struct = st_node; int member_count = 0; - Set<String> member_names; + RBSet<String> member_names; while (true) { // variables list #ifdef DEBUG_ENABLED @@ -9234,7 +9234,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct return OK; } -bool ShaderLanguage::has_builtin(const Map<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name) { +bool ShaderLanguage::has_builtin(const HashMap<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name) { for (const KeyValue<StringName, ShaderLanguage::FunctionInfo> &E : p_functions) { if (E.value.built_ins.has(p_name)) { return true; @@ -9376,19 +9376,19 @@ String ShaderLanguage::get_shader_type(const String &p_code) { #ifdef DEBUG_ENABLED void ShaderLanguage::_check_warning_accums() { - for (const KeyValue<ShaderWarning::Code, Map<StringName, Map<StringName, Usage>> *> &E : warnings_check_map2) { - for (Map<StringName, Map<StringName, Usage>>::Element *T = (*E.value).front(); T; T = T->next()) { - for (const KeyValue<StringName, Usage> &U : T->get()) { + for (const KeyValue<ShaderWarning::Code, HashMap<StringName, HashMap<StringName, Usage>> *> &E : warnings_check_map2) { + for (const KeyValue<StringName, HashMap<StringName, Usage>> &T : *E.value) { + for (const KeyValue<StringName, Usage> &U : T.value) { if (!U.value.used) { _add_warning(E.key, U.value.decl_line, U.key); } } } } - for (const KeyValue<ShaderWarning::Code, Map<StringName, Usage> *> &E : warnings_check_map) { - for (const Map<StringName, Usage>::Element *U = (*E.value).front(); U; U = U->next()) { - if (!U->get().used) { - _add_warning(E.key, U->get().decl_line, U->key()); + for (const KeyValue<ShaderWarning::Code, HashMap<StringName, Usage> *> &E : warnings_check_map) { + for (const KeyValue<StringName, Usage> &U : (*E.value)) { + if (!U.value.used) { + _add_warning(E.key, U.value.decl_line, U.key); } } } @@ -9546,7 +9546,7 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_ case COMPLETION_IDENTIFIER: case COMPLETION_FUNCTION_CALL: { bool comp_ident = completion_type == COMPLETION_IDENTIFIER; - Map<String, ScriptLanguage::CodeCompletionKind> matches; + HashMap<String, ScriptLanguage::CodeCompletionKind> matches; StringName skip_function; BlockNode *block = completion_block; @@ -9793,7 +9793,7 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_ } int idx2 = 0; - Set<int> out_args; + RBSet<int> out_args; while (builtin_func_out_args[idx2].name != nullptr) { if (builtin_func_out_args[idx2].name == builtin_func_defs[idx].name) { for (int i = 0; i < BuiltinFuncOutArgs::MAX_ARGS; i++) { diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h index 80230ed54c..d4a2e0b549 100644 --- a/servers/rendering/shader_language.h +++ b/servers/rendering/shader_language.h @@ -35,7 +35,7 @@ #include "core/string/string_name.h" #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/typedefs.h" #include "core/variant/variant.h" @@ -525,7 +525,7 @@ public: ConstantNode::Value value; }; - Map<StringName, Variable> variables; + HashMap<StringName, Variable> variables; List<Node *> statements; bool single_statement = false; bool use_comma_between_statements = false; @@ -589,7 +589,7 @@ public: bool is_const; int array_size; - Map<StringName, Set<int>> tex_argument_connect; + HashMap<StringName, RBSet<int>> tex_argument_connect; }; StringName name; @@ -622,7 +622,7 @@ public: struct Function { StringName name; FunctionNode *function = nullptr; - Set<StringName> uses_function; + RBSet<StringName> uses_function; bool callable; }; @@ -697,10 +697,10 @@ public: } }; - Map<StringName, Constant> constants; - Map<StringName, Varying> varyings; - Map<StringName, Uniform> uniforms; - Map<StringName, Struct> structs; + HashMap<StringName, Constant> constants; + HashMap<StringName, Varying> varyings; + HashMap<StringName, Uniform> uniforms; + HashMap<StringName, Struct> structs; Vector<StringName> render_modes; Vector<Function> functions; @@ -857,13 +857,13 @@ public: }; struct FunctionInfo { - Map<StringName, BuiltInInfo> built_ins; - Map<StringName, StageFunctionInfo> stage_functions; + HashMap<StringName, BuiltInInfo> built_ins; + HashMap<StringName, StageFunctionInfo> stage_functions; bool can_discard = false; bool main_function = false; }; - static bool has_builtin(const Map<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name); + static bool has_builtin(const HashMap<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name); typedef DataType (*GlobalVariableGetTypeFunc)(const StringName &p_name); @@ -893,15 +893,15 @@ private: } }; - Map<StringName, Usage> used_constants; - Map<StringName, Usage> used_varyings; - Map<StringName, Usage> used_uniforms; - Map<StringName, Usage> used_functions; - Map<StringName, Usage> used_structs; - Map<ShaderWarning::Code, Map<StringName, Usage> *> warnings_check_map; + HashMap<StringName, Usage> used_constants; + HashMap<StringName, Usage> used_varyings; + HashMap<StringName, Usage> used_uniforms; + HashMap<StringName, Usage> used_functions; + HashMap<StringName, Usage> used_structs; + HashMap<ShaderWarning::Code, HashMap<StringName, Usage> *> warnings_check_map; - Map<StringName, Map<StringName, Usage>> used_local_vars; - Map<ShaderWarning::Code, Map<StringName, Map<StringName, Usage>> *> warnings_check_map2; + HashMap<StringName, HashMap<StringName, Usage>> used_local_vars; + HashMap<ShaderWarning::Code, HashMap<StringName, HashMap<StringName, Usage>> *> warnings_check_map2; List<ShaderWarning> warnings; @@ -1039,7 +1039,7 @@ private: uint32_t keyword_completion_context; #endif // DEBUG_ENABLED - const Map<StringName, FunctionInfo> *stages = nullptr; + const HashMap<StringName, FunctionInfo> *stages = nullptr; bool _get_completable_identifier(BlockNode *p_block, CompletionType p_type, StringName &identifier); static const BuiltinFuncDef builtin_func_defs[]; @@ -1068,10 +1068,10 @@ private: Node *_parse_and_reduce_expression(BlockNode *p_block, const FunctionInfo &p_function_info); Error _parse_block(BlockNode *p_block, const FunctionInfo &p_function_info, bool p_just_one = false, bool p_can_break = false, bool p_can_continue = false); - String _get_shader_type_list(const Set<String> &p_shader_types) const; + String _get_shader_type_list(const RBSet<String> &p_shader_types) const; String _get_qualifier_str(ArgumentQualifier p_qualifier) const; - Error _parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Vector<ModeInfo> &p_render_modes, const Set<String> &p_shader_types); + Error _parse_shader(const HashMap<StringName, FunctionInfo> &p_functions, const Vector<ModeInfo> &p_render_modes, const RBSet<String> &p_shader_types); Error _find_last_flow_op_in_block(BlockNode *p_block, FlowOperation p_op); Error _find_last_flow_op_in_op(ControlFlowNode *p_flow, FlowOperation p_op); @@ -1094,10 +1094,10 @@ public: static String get_shader_type(const String &p_code); struct ShaderCompileInfo { - Map<StringName, FunctionInfo> functions; + HashMap<StringName, FunctionInfo> functions; Vector<ModeInfo> render_modes; VaryingFunctionNames varying_function_names = VaryingFunctionNames(); - Set<String> shader_types; + RBSet<String> shader_types; GlobalVariableGetTypeFunc global_variable_type_func = nullptr; }; diff --git a/servers/rendering/shader_types.cpp b/servers/rendering/shader_types.cpp index 27a69fbc2e..05700e7ff9 100644 --- a/servers/rendering/shader_types.cpp +++ b/servers/rendering/shader_types.cpp @@ -31,7 +31,7 @@ #include "shader_types.h" #include "core/math/math_defs.h" -const Map<StringName, ShaderLanguage::FunctionInfo> &ShaderTypes::get_functions(RS::ShaderMode p_mode) const { +const HashMap<StringName, ShaderLanguage::FunctionInfo> &ShaderTypes::get_functions(RS::ShaderMode p_mode) const { return shader_modes[p_mode].functions; } @@ -39,7 +39,7 @@ const Vector<ShaderLanguage::ModeInfo> &ShaderTypes::get_modes(RS::ShaderMode p_ return shader_modes[p_mode].modes; } -const Set<String> &ShaderTypes::get_types() const { +const RBSet<String> &ShaderTypes::get_types() const { return shader_types; } @@ -192,26 +192,26 @@ ShaderTypes::ShaderTypes() { // spatial render modes { - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "blend", "mix", "add", "sub", "mul" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "depth_draw", "opaque", "always", "never" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "depth_prepass_alpha" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "depth_test_disabled" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "sss_mode_skin" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "cull", "back", "front", "disabled" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "unshaded" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "wireframe" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "diffuse", "lambert", "lambert_wrap", "burley", "toon" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "specular", "schlick_ggx", "toon", "disabled" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "skip_vertex_transform" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "world_vertex_coords" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "ensure_correct_normals" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "shadows_disabled" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "ambient_light_disabled" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "shadow_to_opacity" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "vertex_lighting" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "particle_trails" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "alpha_to_coverage" }); - shader_modes[RS::SHADER_SPATIAL].modes.push_back({ "alpha_to_coverage_and_one" }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("blend"), "mix", "add", "sub", "mul" }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("depth_draw"), "opaque", "always", "never" }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("depth_prepass_alpha") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("depth_test_disabled") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("sss_mode_skin") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("cull"), "back", "front", "disabled" }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("unshaded") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("wireframe") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("diffuse"), "lambert", "lambert_wrap", "burley", "toon" }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("specular"), "schlick_ggx", "toon", "disabled" }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("skip_vertex_transform") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("world_vertex_coords") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("ensure_correct_normals") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("shadows_disabled") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("ambient_light_disabled") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("shadow_to_opacity") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("vertex_lighting") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("particle_trails") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("alpha_to_coverage") }); + shader_modes[RS::SHADER_SPATIAL].modes.push_back({ PNAME("alpha_to_coverage_and_one") }); } /************ CANVAS ITEM **************************/ @@ -299,10 +299,10 @@ ShaderTypes::ShaderTypes() { // canvasitem render modes { - shader_modes[RS::SHADER_CANVAS_ITEM].modes.push_back({ "skip_vertex_transform" }); - shader_modes[RS::SHADER_CANVAS_ITEM].modes.push_back({ "blend", "mix", "add", "sub", "mul", "premul_alpha", "disabled" }); - shader_modes[RS::SHADER_CANVAS_ITEM].modes.push_back({ "unshaded" }); - shader_modes[RS::SHADER_CANVAS_ITEM].modes.push_back({ "light_only" }); + shader_modes[RS::SHADER_CANVAS_ITEM].modes.push_back({ PNAME("skip_vertex_transform") }); + shader_modes[RS::SHADER_CANVAS_ITEM].modes.push_back({ PNAME("blend"), "mix", "add", "sub", "mul", "premul_alpha", "disabled" }); + shader_modes[RS::SHADER_CANVAS_ITEM].modes.push_back({ PNAME("unshaded") }); + shader_modes[RS::SHADER_CANVAS_ITEM].modes.push_back({ PNAME("light_only") }); } /************ PARTICLES **************************/ @@ -380,10 +380,10 @@ ShaderTypes::ShaderTypes() { // particles render modes { - shader_modes[RS::SHADER_PARTICLES].modes.push_back({ "collision_use_scale" }); - shader_modes[RS::SHADER_PARTICLES].modes.push_back({ "disable_force" }); - shader_modes[RS::SHADER_PARTICLES].modes.push_back({ "disable_velocity" }); - shader_modes[RS::SHADER_PARTICLES].modes.push_back({ "keep_data" }); + shader_modes[RS::SHADER_PARTICLES].modes.push_back({ PNAME("collision_use_scale") }); + shader_modes[RS::SHADER_PARTICLES].modes.push_back({ PNAME("disable_force") }); + shader_modes[RS::SHADER_PARTICLES].modes.push_back({ PNAME("disable_velocity") }); + shader_modes[RS::SHADER_PARTICLES].modes.push_back({ PNAME("keep_data") }); } /************ SKY **************************/ @@ -430,9 +430,9 @@ ShaderTypes::ShaderTypes() { // sky render modes { - shader_modes[RS::SHADER_SKY].modes.push_back({ "use_half_res_pass" }); - shader_modes[RS::SHADER_SKY].modes.push_back({ "use_quarter_res_pass" }); - shader_modes[RS::SHADER_SKY].modes.push_back({ "disable_fog" }); + shader_modes[RS::SHADER_SKY].modes.push_back({ PNAME("use_half_res_pass") }); + shader_modes[RS::SHADER_SKY].modes.push_back({ PNAME("use_quarter_res_pass") }); + shader_modes[RS::SHADER_SKY].modes.push_back({ PNAME("disable_fog") }); } /************ FOG **************************/ diff --git a/servers/rendering/shader_types.h b/servers/rendering/shader_types.h index 6ba05a3b43..e0fee0a822 100644 --- a/servers/rendering/shader_types.h +++ b/servers/rendering/shader_types.h @@ -31,29 +31,29 @@ #ifndef SHADERTYPES_H #define SHADERTYPES_H -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "servers/rendering_server.h" #include "shader_language.h" class ShaderTypes { struct Type { - Map<StringName, ShaderLanguage::FunctionInfo> functions; + HashMap<StringName, ShaderLanguage::FunctionInfo> functions; Vector<ShaderLanguage::ModeInfo> modes; }; - Map<RS::ShaderMode, Type> shader_modes; + HashMap<RS::ShaderMode, Type> shader_modes; static ShaderTypes *singleton; - Set<String> shader_types; + RBSet<String> shader_types; List<String> shader_types_list; public: static ShaderTypes *get_singleton() { return singleton; } - const Map<StringName, ShaderLanguage::FunctionInfo> &get_functions(RS::ShaderMode p_mode) const; + const HashMap<StringName, ShaderLanguage::FunctionInfo> &get_functions(RS::ShaderMode p_mode) const; const Vector<ShaderLanguage::ModeInfo> &get_modes(RS::ShaderMode p_mode) const; - const Set<String> &get_types() const; + const RBSet<String> &get_types() const; const List<String> &get_types_list() const; ShaderTypes(); diff --git a/servers/rendering/shader_warnings.cpp b/servers/rendering/shader_warnings.cpp index 639b9bd165..855dc23d94 100644 --- a/servers/rendering/shader_warnings.cpp +++ b/servers/rendering/shader_warnings.cpp @@ -109,10 +109,10 @@ ShaderWarning::Code ShaderWarning::get_code_from_name(const String &p_name) { ERR_FAIL_V_MSG(WARNING_MAX, "Invalid shader warning name: " + p_name); } -static Map<int, uint32_t> *code_to_flags_map = nullptr; +static HashMap<int, uint32_t> *code_to_flags_map = nullptr; static void init_code_to_flags_map() { - code_to_flags_map = memnew((Map<int, uint32_t>)); + code_to_flags_map = memnew((HashMap<int, uint32_t>)); code_to_flags_map->insert(ShaderWarning::FLOAT_COMPARISON, ShaderWarning::FLOAT_COMPARISON_FLAG); code_to_flags_map->insert(ShaderWarning::UNUSED_CONSTANT, ShaderWarning::UNUSED_CONSTANT_FLAG); code_to_flags_map->insert(ShaderWarning::UNUSED_FUNCTION, ShaderWarning::UNUSED_FUNCTION_FLAG); @@ -124,7 +124,7 @@ static void init_code_to_flags_map() { code_to_flags_map->insert(ShaderWarning::DEVICE_LIMIT_EXCEEDED, ShaderWarning::DEVICE_LIMIT_EXCEEDED_FLAG); } -ShaderWarning::CodeFlags ShaderWarning::get_flags_from_codemap(const Map<Code, bool> &p_map) { +ShaderWarning::CodeFlags ShaderWarning::get_flags_from_codemap(const HashMap<Code, bool> &p_map) { uint32_t result = 0U; if (code_to_flags_map == nullptr) { diff --git a/servers/rendering/shader_warnings.h b/servers/rendering/shader_warnings.h index e309907181..8edf85842f 100644 --- a/servers/rendering/shader_warnings.h +++ b/servers/rendering/shader_warnings.h @@ -34,8 +34,9 @@ #ifdef DEBUG_ENABLED #include "core/string/string_name.h" +#include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/variant.h" class ShaderWarning { @@ -82,7 +83,7 @@ public: static String get_name_from_code(Code p_code); static Code get_code_from_name(const String &p_name); - static CodeFlags get_flags_from_codemap(const Map<Code, bool> &p_map); + static CodeFlags get_flags_from_codemap(const HashMap<Code, bool> &p_map); ShaderWarning(Code p_code = WARNING_MAX, int p_line = -1, const StringName &p_subject = "", const Vector<Variant> &p_extra_args = Vector<Variant>()); }; diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index fc40f058aa..766ca88e34 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -3006,8 +3006,8 @@ RenderingServer::RenderingServer() { // OpenGL limits GLOBAL_DEF_RST("rendering/limits/opengl/max_renderable_elements", 65536); ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_renderable_elements", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_elements", PROPERTY_HINT_RANGE, "1024,65536,1")); - GLOBAL_DEF_RST("rendering/limits/opengl/max_renderable_lights", 256); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_renderable_lights", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_lights", PROPERTY_HINT_RANGE, "16,4096,1")); + GLOBAL_DEF_RST("rendering/limits/opengl/max_renderable_lights", 32); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_renderable_lights", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_lights", PROPERTY_HINT_RANGE, "2,256,1")); GLOBAL_DEF_RST("rendering/limits/opengl/max_lights_per_object", 8); ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_lights_per_object", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_lights_per_object", PROPERTY_HINT_RANGE, "2,1024,1")); diff --git a/servers/text_server.h b/servers/text_server.h index b08aa26917..f96146a549 100644 --- a/servers/text_server.h +++ b/servers/text_server.h @@ -159,7 +159,7 @@ public: void _draw_hex_code_box_number(const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, uint8_t p_index, const Color &p_color) const; protected: - Map<char32_t, char32_t> diacritics_map; + HashMap<char32_t, char32_t> diacritics_map; void _diacritics_map_add(const String &p_from, char32_t p_to); void _init_diacritics_map(); diff --git a/servers/xr/xr_positional_tracker.h b/servers/xr/xr_positional_tracker.h index cd06d4a087..8371dfcbb5 100644 --- a/servers/xr/xr_positional_tracker.h +++ b/servers/xr/xr_positional_tracker.h @@ -60,8 +60,8 @@ private: String profile; // this is interface dependent, for OpenXR this will be the interaction profile bound for to the tracker TrackerHand hand; // if known, the hand this tracker is held in - Map<StringName, Ref<XRPose>> poses; - Map<StringName, Variant> inputs; + HashMap<StringName, Ref<XRPose>> poses; + HashMap<StringName, Variant> inputs; protected: static void _bind_methods(); diff --git a/tests/core/object/test_class_db.h b/tests/core/object/test_class_db.h index 2e316a7d95..8aaca69d13 100644 --- a/tests/core/object/test_class_db.h +++ b/tests/core/object/test_class_db.h @@ -519,7 +519,7 @@ void add_exposed_classes(Context &r_context) { List<PropertyInfo> property_list; ClassDB::get_property_list(class_name, &property_list, true); - Map<StringName, StringName> accessor_methods; + HashMap<StringName, StringName> accessor_methods; for (const PropertyInfo &property : property_list) { if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY || (property.type == Variant::NIL && property.usage & PROPERTY_USAGE_ARRAY)) { diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h index 58372a0ed6..0b191d2d94 100644 --- a/tests/core/string/test_string.h +++ b/tests/core/string/test_string.h @@ -1447,6 +1447,20 @@ TEST_CASE("[String] validate_node_name") { CHECK(name_with_invalid_chars.validate_node_name() == "Name with invalid characters removed!"); } +TEST_CASE("[String] validate_identifier") { + String empty_string; + CHECK(empty_string.validate_identifier() == "_"); + + String numeric_only = "12345"; + CHECK(numeric_only.validate_identifier() == "_2345"); + + String name_with_spaces = "Name with spaces"; + CHECK(name_with_spaces.validate_identifier() == "Name_with_spaces"); + + String name_with_invalid_chars = String::utf8("Invalid characters:@*#&世界"); + CHECK(name_with_invalid_chars.validate_identifier() == "Invalid_characters_______"); +} + TEST_CASE("[String] Variant indexed get") { Variant s = String("abcd"); bool valid = false; diff --git a/tests/core/string/test_translation.h b/tests/core/string/test_translation.h index 85ac639bec..0a1903ccbf 100644 --- a/tests/core/string/test_translation.h +++ b/tests/core/string/test_translation.h @@ -154,7 +154,7 @@ TEST_CASE("[OptimizedTranslation] Generate from Translation and read messages") TEST_CASE("[Translation] CSV import") { Ref<ResourceImporterCSVTranslation> import_csv_translation = memnew(ResourceImporterCSVTranslation); - Map<StringName, Variant> options; + HashMap<StringName, Variant> options; options["compress"] = false; options["delimiter"] = 0; diff --git a/tests/test_macros.cpp b/tests/test_macros.cpp index aa07f8211a..8c510cb4a5 100644 --- a/tests/test_macros.cpp +++ b/tests/test_macros.cpp @@ -31,11 +31,11 @@ #define DOCTEST_CONFIG_IMPLEMENT #include "test_macros.h" -Map<String, TestFunc> *test_commands = nullptr; +HashMap<String, TestFunc> *test_commands = nullptr; int register_test_command(String p_command, TestFunc p_function) { if (!test_commands) { - test_commands = new Map<String, TestFunc>; + test_commands = new HashMap<String, TestFunc>; } test_commands->insert(p_command, p_function); return 0; diff --git a/tests/test_macros.h b/tests/test_macros.h index 9cb9624d52..778ba36517 100644 --- a/tests/test_macros.h +++ b/tests/test_macros.h @@ -122,13 +122,12 @@ DOCTEST_STRINGIFY_VARIANT(PackedColorArray); // Example usage: `godot --test gdscript-parser`. typedef void (*TestFunc)(); -extern Map<String, TestFunc> *test_commands; +extern HashMap<String, TestFunc> *test_commands; int register_test_command(String p_command, TestFunc p_function); -#define REGISTER_TEST_COMMAND(m_command, m_function) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_VAR_)) = \ - register_test_command(m_command, m_function); \ - DOCTEST_GLOBAL_NO_WARNINGS_END() +#define REGISTER_TEST_COMMAND(m_command, m_function) \ + DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), \ + register_test_command(m_command, m_function)) // Utility macros to send an event actions to a given object // Requires Message Queue and InputMap to be setup. @@ -233,8 +232,8 @@ class SignalWatcher : public Object { private: inline static SignalWatcher *singleton; - /* Equal to: Map<String, Vector<Vector<Variant>>> */ - Map<String, Array> _signals; + /* Equal to: RBMap<String, Vector<Vector<Variant>>> */ + HashMap<String, Array> _signals; void _add_signal_entry(const Array &p_args, const String &p_name) { if (!_signals.has(p_name)) { _signals[p_name] = Array(); diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 4cdc5ea1fa..a5f6fb9b88 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -105,9 +105,9 @@ int test_main(int argc, char *argv[]) { // Run custom test tools. if (test_commands) { - for (Map<String, TestFunc>::Element *E = test_commands->front(); E; E = E->next()) { - if (args.find(E->key())) { - const TestFunc &test_func = E->get(); + for (const KeyValue<String, TestFunc> &E : (*test_commands)) { + if (args.find(E.key)) { + const TestFunc &test_func = E.value; test_func(); run_tests = false; break; diff --git a/thirdparty/README.md b/thirdparty/README.md index bb30105c56..0047f1c66c 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -62,10 +62,13 @@ Files extracted from upstream source: ## doctest - Upstream: https://github.com/onqtam/doctest -- Version: 2.4.4 (97d5a9447e66cd5e107b7a6c463be4a468a40496, 2020) +- Version: 2.4.8 (7b9885133108ae301ddd16e2651320f54cafeba7, 2022) - License: MIT -Extracted from .zip provided. Extracted license and header only. +Files extracted from upstream source: + +- `doctest/doctest.h` as `doctest.h` +- `LICENSE.txt` ## embree @@ -154,13 +157,14 @@ Files extracted from upstream source: ## freetype - Upstream: https://www.freetype.org -- Version: 2.11.1 (3f83daeecb1a78d851b660eed025eeba362c0e4a, 2021) +- Version: 2.12.1 (e8ebfe988b5f57bfb9a3ecb13c70d9791bce9ecf, 2022) - License: FreeType License (BSD-like) Files extracted from upstream source: -- the `src/` folder, minus the `.mk` files and the `dlg` and `tools` subfolders -- the `include/` folder, minus the `dlg` subfolder +- `src/` folder, minus the `dlg` and `tools` subfolders + * These files can be removed: `.dat`, `.diff`, `.mk`, `.rc`, `README*` +- `include/` folder, minus the `dlg` subfolder - `LICENSE.TXT` and `docs/FTL.TXT` @@ -204,7 +208,7 @@ Files extracted from upstream source: ## harfbuzz - Upstream: https://github.com/harfbuzz/harfbuzz -- Version: 4.2.0 (9d5730b958974bc9db95e46e6bad52e9e9cd6e1c, 2022) +- Version: 4.2.1 (f7aee78e90bc53b3a95eb56d7550c9effe569ea2, 2022) - License: MIT Files extracted from upstream source: @@ -216,7 +220,7 @@ Files extracted from upstream source: ## icu4c - Upstream: https://github.com/unicode-org/icu -- Version: 70.1 (a56dde820dc35665a66f2e9ee8ba58e75049b668, 2021) +- Version: 71.1 (c205e7ee49a7086a28b9c275fcfdac9ca3dc815d, 2022) - License: Unicode Files extracted from upstream source: @@ -226,14 +230,14 @@ Files extracted from upstream source: Files generated from upstream source: -- the `icudt70l.dat` built with the provided `godot_data.json` config file (see +- the `icudt71l.dat` built with the provided `godot_data.json` config file (see https://github.com/unicode-org/icu/blob/master/docs/userguide/icu_data/buildtool.md for instructions). - Step 1: Build ICU with default options - `./runConfigureICU {PLATFORM} && make`. - Step 2: Reconfigure ICU with custom data config - `ICU_DATA_FILTER_FILE={GODOT_SOURCE}/thirdparty/icu4c/godot_data.json ./runConfigureICU {PLATFORM} --with-data-packaging=common`. - Step 3: Delete `data/out` folder and rebuild data - `cd data && rm -rf ./out && make`. -- Step 4: Copy `source/data/out/icudt70l.dat` to the `{GODOT_SOURCE}/thirdparty/icu4c/icudt70l.dat`. +- Step 4: Copy `source/data/out/icudt71l.dat` to the `{GODOT_SOURCE}/thirdparty/icu4c/icudt71l.dat`. ## jpeg-compressor @@ -336,7 +340,7 @@ File extracted from upstream release tarball: ## meshoptimizer - Upstream: https://github.com/zeux/meshoptimizer -- Version: git (f4c356d79fadb99cbf432f7e199d823581b0e19e, 2021) +- Version: git (8a7d69caa68f778cb559f1879b6beb7987c8c6b7, 2022) - License: MIT Files extracted from upstream repository: @@ -531,7 +535,7 @@ Exclude: ## pcre2 - Upstream: http://www.pcre.org -- Version: 10.39 (35fee4193b852cb504892352bd0155de10809889, 2021) +- Version: 10.40 (3103b8f20a3b9944b177e812fde29fbfb8b90558, 2022) - License: BSD-3-Clause Files extracted from upstream source: @@ -543,11 +547,14 @@ Files extracted from upstream source: - src/sljit/ - AUTHORS and LICENCE +A sljit patch from upstream was backported to fix macOS < 11.0 compilation +in 10.40, it can be found in the `patches` folder. + ## recastnavigation - Upstream: https://github.com/recastnavigation/recastnavigation -- Version: git (57610fa6ef31b39020231906f8c5d40eaa8294ae, 2019) +- Version: git (5a870d427e47abd4a8e4ce58a95582ec049434d5, 2022) - License: zlib Files extracted from upstream source: @@ -559,17 +566,17 @@ Files extracted from upstream source: ## rvo2 - Upstream: https://github.com/snape/RVO2-3D -- Version: 1.0.1 (e3883f288a9e55ecfed3633a01af3e12778c6acf, 2016) +- Version: git (bfc048670a4e85066e86a1f923d8ea92e3add3b2, 2021) - License: Apache 2.0 Files extracted from upstream source: -- All .cpp and .h files in the `src/` folder except for RVO.h, RVOSimulator.cpp and RVOSimulator.h +- All .cpp and .h files in the `src/` folder except for Export.h, RVO.h, RVOSimulator.cpp and RVOSimulator.h - LICENSE Important: Some files have Godot-made changes; so to enrich the features originally proposed by this library and better integrate this library with -Godot. Please check the file to know what's new. +Godot. See the patch in the `patches` folder for details. ## spirv-reflect @@ -625,7 +632,7 @@ instead of `miniz.h` as an external dependency. ## thorvg - Upstream: https://github.com/Samsung/thorvg -- Version: 0.8.0 (41093c17b3cac440bdcc53f8b69abeb5734696b5, 2022) +- Version: 0.8.1 (c4ccb1078f4390ec749ab8e05ba7e9e35f81285f, 2022) - License: MIT Files extracted from upstream source: @@ -714,7 +721,7 @@ File extracted from upstream release tarball: ## xatlas - Upstream: https://github.com/jpcy/xatlas -- Version: git (ec707faeac3b95e6b416076a9509718cce105b6a, 2021) +- Version: git (16ace528acd2cf1f16a7c0dde99c42c486488dbe, 2022) - License: MIT Files extracted from upstream source: diff --git a/thirdparty/certs/ca-certificates.crt b/thirdparty/certs/ca-certificates.crt index 7f89e81d01..e218b024d0 100644 --- a/thirdparty/certs/ca-certificates.crt +++ b/thirdparty/certs/ca-certificates.crt @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Mon Nov 1 15:39:58 2021 GMT +## Certificate data from Mozilla as of: Thu Mar 31 08:10:21 2022 GMT ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -13,8 +13,8 @@ ## an Apache+mod_ssl webserver for SSL client authentication. ## Just configure this file as the SSLCACertificateFile. ## -## Conversion done with mk-ca-bundle.pl version 1.28. -## SHA256: bb36818a81feaa4cca61101e6d6276cd09e972efcb08112dfed846918ca41d7f +## Conversion done with mk-ca-bundle.pl version 1.29. +## SHA256: d59c5c83ce7a7635fa95521d8d245677949b86d5574bfcc6f855b6a48f2d5566 ## @@ -39,28 +39,6 @@ hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== -----END CERTIFICATE----- -GlobalSign Root CA - R2 -======================= ------BEGIN CERTIFICATE----- -MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv -YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh -bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT -aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln -bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6 -ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp -s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN -S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL -TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C -ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E -FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i -YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN -BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp -9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu -01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7 -9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 -TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== ------END CERTIFICATE----- - Entrust.net Premium 2048 Secure Server CA ========================================= -----BEGIN CERTIFICATE----- @@ -573,28 +551,6 @@ PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== -----END CERTIFICATE----- -Cybertrust Global Root -====================== ------BEGIN CERTIFICATE----- -MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li -ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4 -MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD -ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -+Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW -0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL -AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin -89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT -8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP -BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2 -MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G -A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO -lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi -5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2 -hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T -X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW -WL1WMRJOEcgh4LMRkWXbtKaIOM5V ------END CERTIFICATE----- - ePKI Root Certification Authority ================================= -----BEGIN CERTIFICATE----- @@ -1037,36 +993,6 @@ tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 -----END CERTIFICATE----- -EC-ACC -====== ------BEGIN CERTIFICATE----- -MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE -BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w -ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD -VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE -CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT -BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7 -MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt -SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl -Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh -cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK -w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT -ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 -HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a -E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw -0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD -VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 -Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l -dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ -lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa -Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe -l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 -E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D -5EI= ------END CERTIFICATE----- - Hellenic Academic and Research Institutions RootCA 2011 ======================================================= -----BEGIN CERTIFICATE----- @@ -1737,20 +1663,6 @@ HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu 9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= -----END CERTIFICATE----- -GlobalSign ECC Root CA - R4 -=========================== ------BEGIN CERTIFICATE----- -MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb -R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD -EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb -R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD -EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl -OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P -AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV -MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF -JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q= ------END CERTIFICATE----- - GlobalSign ECC Root CA - R5 =========================== -----BEGIN CERTIFICATE----- @@ -2472,96 +2384,6 @@ AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 -----END CERTIFICATE----- -GTS Root R1 -=========== ------BEGIN CERTIFICATE----- -MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG -EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv -b3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG -A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx -9vaMf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7r -aKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnW -r4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqM -LnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly -4cpk9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr -06zqkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92 -wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om -3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNu -JLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD -VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEM -BQADggIBADiWCu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1 -d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6ZXPYfcX3v73sv -fuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZRgyFmxhE+885H7pwoHyXa/6xm -ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b -gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq -4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr -tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo -pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0 -sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql -CFF1pkgl ------END CERTIFICATE----- - -GTS Root R2 -=========== ------BEGIN CERTIFICATE----- -MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG -EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv -b3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG -A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTuk -k3LvCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo -7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWI -m8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5Gm -dFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbu -ak7MkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscsz -cTJGr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW -Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73Vululycsl -aVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy -5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD -VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEM -BQADggIBALZp8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT -vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiTz9D2PGcDFWEJ -+YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiApJiS4wGWAqoC7o87xdFtCjMw -c3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvbpxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3Da -WsYDQvTtN6LwG1BUSw7YhN4ZKJmBR64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5r -n/WkhLx3+WuXrD5RRaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56Gtmwfu -Nmsk0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC5AwiWVIQ -7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiFizoHCBy69Y9Vmhh1fuXs -gWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLnyOd/xCxgXS/Dr55FBcOEArf9LAhST4Ld -o/DUhgkC ------END CERTIFICATE----- - -GTS Root R3 -=========== ------BEGIN CERTIFICATE----- -MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV -UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg -UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE -ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq -hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU -Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej -QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP -0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0 -glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa -KaqW04MjyaR7YbPMAuhd ------END CERTIFICATE----- - -GTS Root R4 -=========== ------BEGIN CERTIFICATE----- -MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV -UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg -UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE -ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq -hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa -6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj -QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV -2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI -N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x -zPKwTdb+mciUqXWi4w== ------END CERTIFICATE----- - UCA Global G2 Root ================== -----BEGIN CERTIFICATE----- @@ -3230,3 +3052,230 @@ ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps -----END CERTIFICATE----- + +Autoridad de Certificacion Firmaprofesional CIF A62634068 +========================================================= +-----BEGIN CERTIFICATE----- +MIIGFDCCA/ygAwIBAgIIG3Dp0v+ubHEwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCRVMxQjBA +BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 +MjYzNDA2ODAeFw0xNDA5MjMxNTIyMDdaFw0zNjA1MDUxNTIyMDdaMFExCzAJBgNVBAYTAkVTMUIw +QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB +NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD +Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P +B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY +7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH +ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI +plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX +MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX +LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK +bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU +vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMB0GA1Ud +DgQWBBRlzeurNR4APn7VdMActHNHDhpkLzASBgNVHRMBAf8ECDAGAQH/AgEBMIGmBgNVHSAEgZ4w +gZswgZgGBFUdIAAwgY8wLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuZmlybWFwcm9mZXNpb25hbC5j +b20vY3BzMFwGCCsGAQUFBwICMFAeTgBQAGEAcwBlAG8AIABkAGUAIABsAGEAIABCAG8AbgBhAG4A +bwB2AGEAIAA0ADcAIABCAGEAcgBjAGUAbABvAG4AYQAgADAAOAAwADEANzAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQELBQADggIBAHSHKAIrdx9miWTtj3QuRhy7qPj4Cx2Dtjqn6EWKB7fgPiDL +4QjbEwj4KKE1soCzC1HA01aajTNFSa9J8OA9B3pFE1r/yJfY0xgsfZb43aJlQ3CTkBW6kN/oGbDb +LIpgD7dvlAceHabJhfa9NPhAeGIQcDq+fUs5gakQ1JZBu/hfHAsdCPKxsIl68veg4MSPi3i1O1il +I45PVf42O+AMt8oqMEEgtIDNrvx2ZnOorm7hfNoD6JQg5iKj0B+QXSBTFCZX2lSX3xZEEAEeiGaP +cjiT3SC3NL7X8e5jjkd5KAb881lFJWAiMxujX6i6KtoaPc1A6ozuBRWV1aUsIC+nmCjuRfzxuIgA +LI9C2lHVnOUTaHFFQ4ueCyE8S1wF3BqfmI7avSKecs2tCsvMo2ebKHTEm9caPARYpoKdrcd7b/+A +lun4jWq9GJAd/0kakFI3ky88Al2CdgtR5xbHV/g4+afNmyJU72OwFW1TZQNKXkqgsqeOSQBZONXH +9IBk9W6VULgRfhVwOEqwf9DEMnDAGf/JOC0ULGb0QkTmVXYbgBVX/8Cnp6o5qtjTcNAuuuuUavpf +NIbnYrX9ivAwhZTJryQCL2/W3Wf+47BVTwSYT6RBVuKT0Gro1vP7ZeDOdcQxWQzugsgMYDNKGbqE +ZycPvEJdvSRUDewdcAZfpLz6IHxV +-----END CERTIFICATE----- + +vTrus ECC Root CA +================= +-----BEGIN CERTIFICATE----- +MIICDzCCAZWgAwIBAgIUbmq8WapTvpg5Z6LSa6Q75m0c1towCgYIKoZIzj0EAwMwRzELMAkGA1UE +BhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBS +b290IENBMB4XDTE4MDczMTA3MjY0NFoXDTQzMDczMTA3MjY0NFowRzELMAkGA1UEBhMCQ04xHDAa +BgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBSb290IENBMHYw +EAYHKoZIzj0CAQYFK4EEACIDYgAEZVBKrox5lkqqHAjDo6LN/llWQXf9JpRCux3NCNtzslt188+c +ToL0v/hhJoVs1oVbcnDS/dtitN9Ti72xRFhiQgnH+n9bEOf+QP3A2MMrMudwpremIFUde4BdS49n +TPEQo0IwQDAdBgNVHQ4EFgQUmDnNvtiyjPeyq+GtJK97fKHbH88wDwYDVR0TAQH/BAUwAwEB/zAO +BgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwMDaAAwZQIwV53dVvHH4+m4SVBrm2nDb+zDfSXkV5UT +QJtS0zvzQBm8JsctBp61ezaf9SXUY2sAAjEA6dPGnlaaKsyh2j/IZivTWJwghfqrkYpwcBE4YGQL +YgmRWAD5Tfs0aNoJrSEGGJTO +-----END CERTIFICATE----- + +vTrus Root CA +============= +-----BEGIN CERTIFICATE----- +MIIFVjCCAz6gAwIBAgIUQ+NxE9izWRRdt86M/TX9b7wFjUUwDQYJKoZIhvcNAQELBQAwQzELMAkG +A1UEBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xFjAUBgNVBAMTDXZUcnVzIFJv +b3QgQ0EwHhcNMTgwNzMxMDcyNDA1WhcNNDMwNzMxMDcyNDA1WjBDMQswCQYDVQQGEwJDTjEcMBoG +A1UEChMTaVRydXNDaGluYSBDby4sTHRkLjEWMBQGA1UEAxMNdlRydXMgUm9vdCBDQTCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAL1VfGHTuB0EYgWgrmy3cLRB6ksDXhA/kFocizuwZots +SKYcIrrVQJLuM7IjWcmOvFjai57QGfIvWcaMY1q6n6MLsLOaXLoRuBLpDLvPbmyAhykUAyyNJJrI +ZIO1aqwTLDPxn9wsYTwaP3BVm60AUn/PBLn+NvqcwBauYv6WTEN+VRS+GrPSbcKvdmaVayqwlHeF +XgQPYh1jdfdr58tbmnDsPmcF8P4HCIDPKNsFxhQnL4Z98Cfe/+Z+M0jnCx5Y0ScrUw5XSmXX+6KA +YPxMvDVTAWqXcoKv8R1w6Jz1717CbMdHflqUhSZNO7rrTOiwCcJlwp2dCZtOtZcFrPUGoPc2BX70 +kLJrxLT5ZOrpGgrIDajtJ8nU57O5q4IikCc9Kuh8kO+8T/3iCiSn3mUkpF3qwHYw03dQ+A0Em5Q2 +AXPKBlim0zvc+gRGE1WKyURHuFE5Gi7oNOJ5y1lKCn+8pu8fA2dqWSslYpPZUxlmPCdiKYZNpGvu +/9ROutW04o5IWgAZCfEF2c6Rsffr6TlP9m8EQ5pV9T4FFL2/s1m02I4zhKOQUqqzApVg+QxMaPnu +1RcN+HFXtSXkKe5lXa/R7jwXC1pDxaWG6iSe4gUH3DRCEpHWOXSuTEGC2/KmSNGzm/MzqvOmwMVO +9fSddmPmAsYiS8GVP1BkLFTltvA8Kc9XAgMBAAGjQjBAMB0GA1UdDgQWBBRUYnBj8XWEQ1iO0RYg +scasGrz2iTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOC +AgEAKbqSSaet8PFww+SX8J+pJdVrnjT+5hpk9jprUrIQeBqfTNqK2uwcN1LgQkv7bHbKJAs5EhWd +nxEt/Hlk3ODg9d3gV8mlsnZwUKT+twpw1aA08XXXTUm6EdGz2OyC/+sOxL9kLX1jbhd47F18iMjr +jld22VkE+rxSH0Ws8HqA7Oxvdq6R2xCOBNyS36D25q5J08FsEhvMKar5CKXiNxTKsbhm7xqC5PD4 +8acWabfbqWE8n/Uxy+QARsIvdLGx14HuqCaVvIivTDUHKgLKeBRtRytAVunLKmChZwOgzoy8sHJn +xDHO2zTlJQNgJXtxmOTAGytfdELSS8VZCAeHvsXDf+eW2eHcKJfWjwXj9ZtOyh1QRwVTsMo554Wg +icEFOwE30z9J4nfrI8iIZjs9OXYhRvHsXyO466JmdXTBQPfYaJqT4i2pLr0cox7IdMakLXogqzu4 +sEb9b91fUlV1YvCXoHzXOP0l382gmxDPi7g4Xl7FtKYCNqEeXxzP4padKar9mK5S4fNBUvupLnKW +nyfjqnN9+BojZns7q2WwMgFLFT49ok8MKzWixtlnEjUwzXYuFrOZnk1PTi07NEPhmg4NpGaXutIc +SkwsKouLgU9xGqndXHt7CMUADTdA43x7VF8vhV929vensBxXVsFy6K2ir40zSbofitzmdHxghm+H +l3s= +-----END CERTIFICATE----- + +ISRG Root X2 +============ +-----BEGIN CERTIFICATE----- +MIICGzCCAaGgAwIBAgIQQdKd0XLq7qeAwSxs6S+HUjAKBggqhkjOPQQDAzBPMQswCQYDVQQGEwJV +UzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElT +UkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw00MDA5MTcxNjAwMDBaME8xCzAJBgNVBAYTAlVT +MSkwJwYDVQQKEyBJbnRlcm5ldCBTZWN1cml0eSBSZXNlYXJjaCBHcm91cDEVMBMGA1UEAxMMSVNS +RyBSb290IFgyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEzZvVn4CDCuwJSvMWSj5cz3es3mcFDR0H +ttwW+1qLFNvicWDEukWVEYmO6gbf9yoWHKS5xcUy4APgHoIYOIvXRdgKam7mAHf7AlF9ItgKbppb +d9/w+kHsOdx1ymgHDB/qo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV +HQ4EFgQUfEKWrt5LSDv6kviejM9ti6lyN5UwCgYIKoZIzj0EAwMDaAAwZQIwe3lORlCEwkSHRhtF +cP9Ymd70/aTSVaYgLXTWNLxBo1BfASdWtL4ndQavEi51mI38AjEAi/V3bNTIZargCyzuFJ0nN6T5 +U6VR5CmD1/iQMVtCnwr1/q4AaOeMSQ+2b1tbFfLn +-----END CERTIFICATE----- + +HiPKI Root CA - G1 +================== +-----BEGIN CERTIFICATE----- +MIIFajCCA1KgAwIBAgIQLd2szmKXlKFD6LDNdmpeYDANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQG +EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xGzAZBgNVBAMMEkhpUEtJ +IFJvb3QgQ0EgLSBHMTAeFw0xOTAyMjIwOTQ2MDRaFw0zNzEyMzExNTU5NTlaME8xCzAJBgNVBAYT +AlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEbMBkGA1UEAwwSSGlQS0kg +Um9vdCBDQSAtIEcxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9B5/UnMyDHPkvRN0 +o9QwqNCuS9i233VHZvR85zkEHmpwINJaR3JnVfSl6J3VHiGh8Ge6zCFovkRTv4354twvVcg3Px+k +wJyz5HdcoEb+d/oaoDjq7Zpy3iu9lFc6uux55199QmQ5eiY29yTw1S+6lZgRZq2XNdZ1AYDgr/SE +YYwNHl98h5ZeQa/rh+r4XfEuiAU+TCK72h8q3VJGZDnzQs7ZngyzsHeXZJzA9KMuH5UHsBffMNsA +GJZMoYFL3QRtU6M9/Aes1MU3guvklQgZKILSQjqj2FPseYlgSGDIcpJQ3AOPgz+yQlda22rpEZfd +hSi8MEyr48KxRURHH+CKFgeW0iEPU8DtqX7UTuybCeyvQqww1r/REEXgphaypcXTT3OUM3ECoWqj +1jOXTyFjHluP2cFeRXF3D4FdXyGarYPM+l7WjSNfGz1BryB1ZlpK9p/7qxj3ccC2HTHsOyDry+K4 +9a6SsvfhhEvyovKTmiKe0xRvNlS9H15ZFblzqMF8b3ti6RZsR1pl8w4Rm0bZ/W3c1pzAtH2lsN0/ +Vm+h+fbkEkj9Bn8SV7apI09bA8PgcSojt/ewsTu8mL3WmKgMa/aOEmem8rJY5AIJEzypuxC00jBF +8ez3ABHfZfjcK0NVvxaXxA/VLGGEqnKG/uY6fsI/fe78LxQ+5oXdUG+3Se0CAwEAAaNCMEAwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ncX+l6o/vY9cdVouslGDDjYr7AwDgYDVR0PAQH/BAQD +AgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBQUfB13HAE4/+qddRxosuej6ip0691x1TPOhwEmSKsxBHi +7zNKpiMdDg1H2DfHb680f0+BazVP6XKlMeJ45/dOlBhbQH3PayFUhuaVevvGyuqcSE5XCV0vrPSl +tJczWNWseanMX/mF+lLFjfiRFOs6DRfQUsJ748JzjkZ4Bjgs6FzaZsT0pPBWGTMpWmWSBUdGSquE +wx4noR8RkpkndZMPvDY7l1ePJlsMu5wP1G4wB9TcXzZoZjmDlicmisjEOf6aIW/Vcobpf2Lll07Q +JNBAsNB1CI69aO4I1258EHBGG3zgiLKecoaZAeO/n0kZtCW+VmWuF2PlHt/o/0elv+EmBYTksMCv +5wiZqAxeJoBF1PhoL5aPruJKHJwWDBNvOIf2u8g0X5IDUXlwpt/L9ZlNec1OvFefQ05rLisY+Gpz +jLrFNe85akEez3GoorKGB1s6yeHvP2UEgEcyRHCVTjFnanRbEEV16rCf0OY1/k6fi8wrkkVbbiVg +hUbN0aqwdmaTd5a+g744tiROJgvM7XpWGuDpWsZkrUx6AEhEL7lAuxM+vhV4nYWBSipX3tUZQ9rb +yltHhoMLP7YNdnhzeSJesYAfz77RP1YQmCuVh6EfnWQUYDksswBVLuT1sw5XxJFBAJw/6KXf6vb/ +yPCtbVKoF6ubYfwSUTXkJf2vqmqGOQ== +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R4 +=========================== +-----BEGIN CERTIFICATE----- +MIIB3DCCAYOgAwIBAgINAgPlfvU/k/2lCSGypjAKBggqhkjOPQQDAjBQMSQwIgYDVQQLExtHbG9i +YWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds +b2JhbFNpZ24wHhcNMTIxMTEzMDAwMDAwWhcNMzgwMTE5MDMxNDA3WjBQMSQwIgYDVQQLExtHbG9i +YWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds +b2JhbFNpZ24wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS4xnnTj2wlDp8uORkcA6SumuU5BwkW +ymOxuYb4ilfBV85C+nOh92VC/x7BALJucw7/xyHlGKSq2XE/qNS5zowdo0IwQDAOBgNVHQ8BAf8E +BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVLB7rUW44kB/+wpu+74zyTyjhNUwCgYI +KoZIzj0EAwIDRwAwRAIgIk90crlgr/HmnKAWBVBfw147bmF0774BxL4YSFlhgjICICadVGNA3jdg +UM/I2O2dgq43mLyjj0xMqTQrbO/7lZsm +-----END CERTIFICATE----- + +GTS Root R1 +=========== +-----BEGIN CERTIFICATE----- +MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0G +CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaM +f/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7raKb0 +xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnWr4+w +B7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqMLnXW +nOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk +9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zq +kUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92wO1A +K/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om3xPX +V2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNuJLDW +cfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T +AQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQAD +ggIBAJ+qQibbC5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe +QkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuyh6f88/qBVRRi +ClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM47HLwEXWdyzRSjeZ2axfG34ar +J45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8JZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYci +NuaCp+0KueIHoI17eko8cdLiA6EfMgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5me +LMFrUKTX5hgUvYU/Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJF +fbdT6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ0E6yove+ +7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm2tIMPNuzjsmhDYAPexZ3 +FL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bbbP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3 +gm3c +-----END CERTIFICATE----- + +GTS Root R2 +=========== +-----BEGIN CERTIFICATE----- +MIIFVzCCAz+gAwIBAgINAgPlrsWNBCUaqxElqjANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIiMA0G +CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTukk3Lv +CvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo7JUl +e3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWIm8Wb +a96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5GmdFrS ++LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbuak7M +kogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscszcTJG +r61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RWIr9q +S34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73VululycslaVNV +J1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy5okL +dWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEMBQAD +ggIBAB/Kzt3HvqGf2SdMC9wXmBFqiN495nFWcrKeGk6c1SuYJF2ba3uwM4IJvd8lRuqYnrYb/oM8 +0mJhwQTtzuDFycgTE1XnqGOtjHsB/ncw4c5omwX4Eu55MaBBRTUoCnGkJE+M3DyCB19m3H0Q/gxh +swWV7uGugQ+o+MePTagjAiZrHYNSVc61LwDKgEDg4XSsYPWHgJ2uNmSRXbBoGOqKYcl3qJfEycel +/FVL8/B/uWU9J2jQzGv6U53hkRrJXRqWbTKH7QMgyALOWr7Z6v2yTcQvG99fevX4i8buMTolUVVn +jWQye+mew4K6Ki3pHrTgSAai/GevHyICc/sgCq+dVEuhzf9gR7A/Xe8bVr2XIZYtCtFenTgCR2y5 +9PYjJbigapordwj6xLEokCZYCDzifqrXPW+6MYgKBesntaFJ7qBFVHvmJ2WZICGoo7z7GJa7Um8M +7YNRTOlZ4iBgxcJlkoKM8xAfDoqXvneCbT+PHV28SSe9zE8P4c52hgQjxcCMElv924SgJPFI/2R8 +0L5cFtHvma3AH/vLrrw4IgYmZNralw4/KBVEqE8AyvCazM90arQ+POuV7LXTWtiBmelDGDfrs7vR +WGJB82bSj6p4lVQgw1oudCvV0b4YacCs1aTPObpRhANl6WLAYv7YTVWW4tAR+kg0Eeye7QUd5MjW +HYbL +-----END CERTIFICATE----- + +GTS Root R3 +=========== +-----BEGIN CERTIFICATE----- +MIICCTCCAY6gAwIBAgINAgPluILrIPglJ209ZjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi +MCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMw +HhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ +R29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcqhkjO +PQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUURout +736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24CejQjBA +MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP0/Eq +Er24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEA9uEglRR7VKOQFhG/hMjqb2sXnh5GmCCbn9MN2azT +L818+FsuVbu/3ZL3pAzcMeGiAjEA/JdmZuVDFhOD3cffL74UOO0BzrEXGhF16b0DjyZ+hOXJYKaV +11RZt+cRLInUue4X +-----END CERTIFICATE----- + +GTS Root R4 +=========== +-----BEGIN CERTIFICATE----- +MIICCTCCAY6gAwIBAgINAgPlwGjvYxqccpBQUjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi +MCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQw +HhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ +R29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcqhkjO +PQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa6zzu +hXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqjQjBA +MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV2Py1 +PsVq8JQdjDAKBggqhkjOPQQDAwNpADBmAjEA6ED/g94D9J+uHXqnLrmvT/aDHQ4thQEd0dlq7A/C +r8deVl5c1RxYIigL9zC2L7F8AjEA8GE8p/SgguMh1YQdc4acLa/KNJvxn7kjNuK8YAOdgLOaVsjh +4rsUecrNIdSUtUlD +-----END CERTIFICATE----- diff --git a/thirdparty/doctest/doctest.h b/thirdparty/doctest/doctest.h index 42eb039979..d25f526827 100644 --- a/thirdparty/doctest/doctest.h +++ b/thirdparty/doctest/doctest.h @@ -11,7 +11,7 @@ // https://opensource.org/licenses/MIT // // The documentation can be found at the library's page: -// https://github.com/onqtam/doctest/blob/master/doc/markdown/readme.md +// https://github.com/doctest/doctest/blob/master/doc/markdown/readme.md // // ================================================================================================= // ================================================================================================= @@ -48,8 +48,16 @@ #define DOCTEST_VERSION_MAJOR 2 #define DOCTEST_VERSION_MINOR 4 -#define DOCTEST_VERSION_PATCH 6 -#define DOCTEST_VERSION_STR "2.4.6" +#define DOCTEST_VERSION_PATCH 8 + +// util we need here +#define DOCTEST_TOSTR_IMPL(x) #x +#define DOCTEST_TOSTR(x) DOCTEST_TOSTR_IMPL(x) + +#define DOCTEST_VERSION_STR \ + DOCTEST_TOSTR(DOCTEST_VERSION_MAJOR) "." \ + DOCTEST_TOSTR(DOCTEST_VERSION_MINOR) "." \ + DOCTEST_TOSTR(DOCTEST_VERSION_PATCH) #define DOCTEST_VERSION \ (DOCTEST_VERSION_MAJOR * 10000 + DOCTEST_VERSION_MINOR * 100 + DOCTEST_VERSION_PATCH) @@ -137,85 +145,93 @@ // == COMPILER WARNINGS ============================================================================ // ================================================================================================= +// both the header and the implementation suppress all of these, +// so it only makes sense to aggregrate them like so +#define DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH \ + DOCTEST_CLANG_SUPPRESS_WARNING_PUSH \ + DOCTEST_CLANG_SUPPRESS_WARNING("-Wunknown-pragmas") \ + DOCTEST_CLANG_SUPPRESS_WARNING("-Wweak-vtables") \ + DOCTEST_CLANG_SUPPRESS_WARNING("-Wpadded") \ + DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-prototypes") \ + DOCTEST_CLANG_SUPPRESS_WARNING("-Wunused-local-typedef") \ + DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat") \ + DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat-pedantic") \ + \ + DOCTEST_GCC_SUPPRESS_WARNING_PUSH \ + DOCTEST_GCC_SUPPRESS_WARNING("-Wunknown-pragmas") \ + DOCTEST_GCC_SUPPRESS_WARNING("-Wpragmas") \ + DOCTEST_GCC_SUPPRESS_WARNING("-Weffc++") \ + DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-overflow") \ + DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-aliasing") \ + DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-declarations") \ + DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-local-typedefs") \ + DOCTEST_GCC_SUPPRESS_WARNING("-Wuseless-cast") \ + DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept") \ + \ + DOCTEST_MSVC_SUPPRESS_WARNING_PUSH \ + /* these 4 also disabled globally via cmake: */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4514) /* unreferenced inline function has been removed */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4571) /* SEH related */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4710) /* function not inlined */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4711) /* function selected for inline expansion*/ \ + /* */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4616) /* invalid compiler warning */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4619) /* invalid compiler warning */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4996) /* The compiler encountered a deprecated declaration */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4706) /* assignment within conditional expression */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4512) /* 'class' : assignment operator could not be generated */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4127) /* conditional expression is constant */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4820) /* padding */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4625) /* copy constructor was implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4626) /* assignment operator was implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(5027) /* move assignment operator implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(5026) /* move constructor was implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4640) /* construction of local static object not thread-safe */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */ \ + /* static analysis */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(26439) /* Function may not throw. Declare it 'noexcept' */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(26495) /* Always initialize a member variable */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(26451) /* Arithmetic overflow ... */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(26444) /* Avoid unnamed objects with custom ctor and dtor... */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(26812) /* Prefer 'enum class' over 'enum' */ + +#define DOCTEST_SUPPRESS_COMMON_WARNINGS_POP \ + DOCTEST_CLANG_SUPPRESS_WARNING_POP \ + DOCTEST_GCC_SUPPRESS_WARNING_POP \ + DOCTEST_MSVC_SUPPRESS_WARNING_POP + +DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH + DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -DOCTEST_CLANG_SUPPRESS_WARNING("-Wunknown-pragmas") DOCTEST_CLANG_SUPPRESS_WARNING("-Wnon-virtual-dtor") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wweak-vtables") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wpadded") DOCTEST_CLANG_SUPPRESS_WARNING("-Wdeprecated") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-prototypes") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wunused-local-typedef") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat-pedantic") DOCTEST_GCC_SUPPRESS_WARNING_PUSH -DOCTEST_GCC_SUPPRESS_WARNING("-Wunknown-pragmas") -DOCTEST_GCC_SUPPRESS_WARNING("-Wpragmas") -DOCTEST_GCC_SUPPRESS_WARNING("-Weffc++") -DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-overflow") -DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-aliasing") DOCTEST_GCC_SUPPRESS_WARNING("-Wctor-dtor-privacy") -DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-declarations") DOCTEST_GCC_SUPPRESS_WARNING("-Wnon-virtual-dtor") -DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-local-typedefs") -DOCTEST_GCC_SUPPRESS_WARNING("-Wuseless-cast") -DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept") DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-promo") DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -DOCTEST_MSVC_SUPPRESS_WARNING(4616) // invalid compiler warning -DOCTEST_MSVC_SUPPRESS_WARNING(4619) // invalid compiler warning -DOCTEST_MSVC_SUPPRESS_WARNING(4996) // The compiler encountered a deprecated declaration -DOCTEST_MSVC_SUPPRESS_WARNING(4706) // assignment within conditional expression -DOCTEST_MSVC_SUPPRESS_WARNING(4512) // 'class' : assignment operator could not be generated -DOCTEST_MSVC_SUPPRESS_WARNING(4127) // conditional expression is constant -DOCTEST_MSVC_SUPPRESS_WARNING(4820) // padding -DOCTEST_MSVC_SUPPRESS_WARNING(4625) // copy constructor was implicitly defined as deleted -DOCTEST_MSVC_SUPPRESS_WARNING(4626) // assignment operator was implicitly defined as deleted -DOCTEST_MSVC_SUPPRESS_WARNING(5027) // move assignment operator was implicitly defined as deleted -DOCTEST_MSVC_SUPPRESS_WARNING(5026) // move constructor was implicitly defined as deleted DOCTEST_MSVC_SUPPRESS_WARNING(4623) // default constructor was implicitly defined as deleted -DOCTEST_MSVC_SUPPRESS_WARNING(4640) // construction of local static object is not thread-safe -// static analysis -DOCTEST_MSVC_SUPPRESS_WARNING(26439) // This kind of function may not throw. Declare it 'noexcept' -DOCTEST_MSVC_SUPPRESS_WARNING(26495) // Always initialize a member variable -DOCTEST_MSVC_SUPPRESS_WARNING(26451) // Arithmetic overflow ... -DOCTEST_MSVC_SUPPRESS_WARNING(26444) // Avoid unnamed objects with custom construction and dtr... -DOCTEST_MSVC_SUPPRESS_WARNING(26812) // Prefer 'enum class' over 'enum' - -// 4548 - expression before comma has no effect; expected expression with side - effect -// 4265 - class has virtual functions, but destructor is not virtual -// 4986 - exception specification does not match previous declaration -// 4350 - behavior change: 'member1' called instead of 'member2' -// 4668 - 'x' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' -// 4365 - conversion from 'int' to 'unsigned long', signed/unsigned mismatch -// 4774 - format string expected in argument 'x' is not a string literal -// 4820 - padding in structs - -// only 4 should be disabled globally: -// - 4514 # unreferenced inline function has been removed -// - 4571 # SEH related -// - 4710 # function not inlined -// - 4711 # function 'x' selected for automatic inline expansion #define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN \ DOCTEST_MSVC_SUPPRESS_WARNING_PUSH \ - DOCTEST_MSVC_SUPPRESS_WARNING(4548) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4265) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4986) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4350) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4668) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4365) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4774) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4820) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4625) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4626) \ - DOCTEST_MSVC_SUPPRESS_WARNING(5027) \ - DOCTEST_MSVC_SUPPRESS_WARNING(5026) \ - DOCTEST_MSVC_SUPPRESS_WARNING(4623) \ - DOCTEST_MSVC_SUPPRESS_WARNING(5039) \ - DOCTEST_MSVC_SUPPRESS_WARNING(5045) \ - DOCTEST_MSVC_SUPPRESS_WARNING(5105) + DOCTEST_MSVC_SUPPRESS_WARNING(4548) /* before comma no effect; expected side - effect */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4265) /* virtual functions, but destructor is not virtual */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4986) /* exception specification does not match previous */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4350) /* 'member1' called instead of 'member2' */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4668) /* not defined as a preprocessor macro */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4365) /* signed/unsigned mismatch */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4774) /* format string not a string literal */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4820) /* padding */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4625) /* copy constructor was implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4626) /* assignment operator was implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(5027) /* move assignment operator implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(5026) /* move constructor was implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(4623) /* default constructor was implicitly deleted */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(5039) /* pointer to pot. throwing function passed to extern C */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */ \ + DOCTEST_MSVC_SUPPRESS_WARNING(5105) /* macro producing 'defined' has undefined behavior */ #define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END DOCTEST_MSVC_SUPPRESS_WARNING_POP @@ -228,6 +244,7 @@ DOCTEST_MSVC_SUPPRESS_WARNING(26812) // Prefer 'enum class' over 'enum' // GCC C++11 feature support table: https://gcc.gnu.org/projects/cxx-status.html // MSVC version table: // https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering +// MSVC++ 14.3 (17) _MSC_VER == 1930 (Visual Studio 2022) // MSVC++ 14.2 (16) _MSC_VER == 1920 (Visual Studio 2019) // MSVC++ 14.1 (15) _MSC_VER == 1910 (Visual Studio 2017) // MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) @@ -237,6 +254,10 @@ DOCTEST_MSVC_SUPPRESS_WARNING(26812) // Prefer 'enum class' over 'enum' // MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008) // MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005) +// Universal Windows Platform support +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) +#define DOCTEST_CONFIG_NO_WINDOWS_SEH +#endif // WINAPI_FAMILY #if DOCTEST_MSVC && !defined(DOCTEST_CONFIG_WINDOWS_SEH) #define DOCTEST_CONFIG_WINDOWS_SEH #endif // MSVC @@ -312,13 +333,29 @@ DOCTEST_MSVC_SUPPRESS_WARNING(26812) // Prefer 'enum class' over 'enum' #endif #ifndef DOCTEST_NORETURN +#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) +#define DOCTEST_NORETURN +#else // DOCTEST_MSVC #define DOCTEST_NORETURN [[noreturn]] +#endif // DOCTEST_MSVC #endif // DOCTEST_NORETURN #ifndef DOCTEST_NOEXCEPT +#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) +#define DOCTEST_NOEXCEPT +#else // DOCTEST_MSVC #define DOCTEST_NOEXCEPT noexcept +#endif // DOCTEST_MSVC #endif // DOCTEST_NOEXCEPT +#ifndef DOCTEST_CONSTEXPR +#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) +#define DOCTEST_CONSTEXPR const +#else // DOCTEST_MSVC +#define DOCTEST_CONSTEXPR constexpr +#endif // DOCTEST_MSVC +#endif // DOCTEST_CONSTEXPR + // ================================================================================================= // == FEATURE DETECTION END ======================================================================== // ================================================================================================= @@ -332,8 +369,6 @@ DOCTEST_MSVC_SUPPRESS_WARNING(26812) // Prefer 'enum class' over 'enum' #define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __LINE__) #endif // __COUNTER__ -#define DOCTEST_TOSTR(x) #x - #ifndef DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE #define DOCTEST_REF_WRAP(x) x& #else // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE @@ -351,11 +386,14 @@ DOCTEST_MSVC_SUPPRESS_WARNING(26812) // Prefer 'enum class' over 'enum' #define DOCTEST_PLATFORM_LINUX #endif // DOCTEST_PLATFORM -#define DOCTEST_GLOBAL_NO_WARNINGS(var) \ +namespace doctest { namespace detail { + static DOCTEST_CONSTEXPR int consume(const int*, int) { return 0; } +}} + +#define DOCTEST_GLOBAL_NO_WARNINGS(var, ...) \ DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wglobal-constructors") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wunused-variable") \ - static const int var DOCTEST_UNUSED // NOLINT(fuchsia-statically-constructed-objects,cert-err58-cpp) -#define DOCTEST_GLOBAL_NO_WARNINGS_END() DOCTEST_CLANG_SUPPRESS_WARNING_POP + static const int var = doctest::detail::consume(&var, __VA_ARGS__); \ + DOCTEST_CLANG_SUPPRESS_WARNING_POP #ifndef DOCTEST_BREAK_INTO_DEBUGGER // should probably take a look at https://github.com/scottt/debugbreak @@ -390,32 +428,31 @@ DOCTEST_GCC_SUPPRESS_WARNING_POP #define DOCTEST_CONFIG_USE_STD_HEADERS #endif // DOCTEST_CONFIG_USE_IOSFWD +// for clang - always include ciso646 (which drags some std stuff) because +// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in +// which case we don't want to forward declare stuff from std - for reference: +// https://github.com/doctest/doctest/issues/126 +// https://github.com/doctest/doctest/issues/356 +#if DOCTEST_CLANG +#include <ciso646> +#ifdef _LIBCPP_VERSION +#define DOCTEST_CONFIG_USE_STD_HEADERS +#endif // _LIBCPP_VERSION +#endif // clang + #ifdef DOCTEST_CONFIG_USE_STD_HEADERS #ifndef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS #define DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS #endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#include <iosfwd> #include <cstddef> #include <ostream> +#include <istream> #else // DOCTEST_CONFIG_USE_STD_HEADERS -#if DOCTEST_CLANG -// to detect if libc++ is being used with clang (the _LIBCPP_VERSION identifier) -#include <ciso646> -#endif // clang - -#ifdef _LIBCPP_VERSION -#define DOCTEST_STD_NAMESPACE_BEGIN _LIBCPP_BEGIN_NAMESPACE_STD -#define DOCTEST_STD_NAMESPACE_END _LIBCPP_END_NAMESPACE_STD -#else // _LIBCPP_VERSION -#define DOCTEST_STD_NAMESPACE_BEGIN namespace std { -#define DOCTEST_STD_NAMESPACE_END } -#endif // _LIBCPP_VERSION - // Forward declaring 'X' in namespace std is not permitted by the C++ Standard. DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4643) -DOCTEST_STD_NAMESPACE_BEGIN // NOLINT (cert-dcl58-cpp) +namespace std { // NOLINT (cert-dcl58-cpp) typedef decltype(nullptr) nullptr_t; template <class charT> struct char_traits; @@ -424,17 +461,20 @@ struct char_traits<char>; template <class charT, class traits> class basic_ostream; typedef basic_ostream<char, char_traits<char>> ostream; +template <class charT, class traits> +class basic_istream; +typedef basic_istream<char, char_traits<char>> istream; template <class... Types> class tuple; #if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: https://github.com/onqtam/doctest/issues/183 -template <class _Ty> +// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183 +template <class Ty> class allocator; -template <class _Elem, class _Traits, class _Alloc> +template <class Elem, class Traits, class Alloc> class basic_string; using string = basic_string<char, char_traits<char>, allocator<char>>; #endif // VS 2019 -DOCTEST_STD_NAMESPACE_END +} // namespace std DOCTEST_MSVC_SUPPRESS_WARNING_POP @@ -486,6 +526,8 @@ class DOCTEST_INTERFACE String view data; }; + char* allocate(unsigned sz); + bool isOnStack() const { return (buf[last] & 128) == 0; } void setOnHeap(); void setLast(unsigned in = last); @@ -500,11 +542,12 @@ public: String(const char* in); String(const char* in, unsigned in_size); + String(std::istream& in, unsigned in_size); + String(const String& other); String& operator=(const String& other); String& operator+=(const String& other); - String operator+(const String& other) const; String(String&& other); String& operator=(String&& other); @@ -527,6 +570,8 @@ public: int compare(const String& other, bool no_case = false) const; }; +DOCTEST_INTERFACE String operator+(const String& lhs, const String& rhs); + DOCTEST_INTERFACE bool operator==(const String& lhs, const String& rhs); DOCTEST_INTERFACE bool operator!=(const String& lhs, const String& rhs); DOCTEST_INTERFACE bool operator<(const String& lhs, const String& rhs); @@ -723,9 +768,8 @@ namespace detail { struct ContextOptions //!OCLINT too many fields { - std::ostream* cout; // stdout stream - std::cout by default - std::ostream* cerr; // stderr stream - std::cerr by default - String binary_name; // the test binary name + std::ostream* cout = nullptr; // stdout stream + String binary_name; // the test binary name const detail::TestCase* currentTest = nullptr; @@ -744,9 +788,12 @@ struct ContextOptions //!OCLINT too many fields bool case_sensitive; // if filtering should be case sensitive bool exit; // if the program should be exited after the tests are ran/whatever bool duration; // print the time duration of each test case + bool minimal; // minimal console output (only test failures) + bool quiet; // no console output bool no_throw; // to skip exceptions-related assertion macros bool no_exitcode; // if the framework should return 0 as the exitcode bool no_run; // to not run the tests at all (can be done with an "*" exclude) + bool no_intro; // to not print the intro of the framework bool no_version; // to not print the version of the framework bool no_colors; // if output to the console should be colorized bool force_colors; // forces the use of colors even when a tty cannot be detected @@ -790,6 +837,9 @@ namespace detail { template<class T> struct is_lvalue_reference { const static bool value=false; }; template<class T> struct is_lvalue_reference<T&> { const static bool value=true; }; + template<class T> struct is_rvalue_reference { const static bool value=false; }; + template<class T> struct is_rvalue_reference<T&&> { const static bool value=true; }; + template <class T> inline T&& forward(typename remove_reference<T>::type& t) DOCTEST_NOEXCEPT { @@ -811,7 +861,7 @@ namespace detail { template<class T> struct underlying_type : public std::underlying_type<T> {}; #else // Use compiler intrinsics - template<class T> struct is_enum { constexpr static bool value = __is_enum(T); }; + template<class T> struct is_enum { DOCTEST_CONSTEXPR static bool value = __is_enum(T); }; template<class T> struct underlying_type { typedef __underlying_type(T) type; }; #endif // clang-format on @@ -828,22 +878,21 @@ namespace detail { template<class, class = void> struct check { - static constexpr bool value = false; + static DOCTEST_CONSTEXPR bool value = false; }; template<class T> struct check<T, decltype(os() << val<T>(), void())> { - static constexpr bool value = true; + static DOCTEST_CONSTEXPR bool value = true; }; } // namespace has_insertion_operator_impl template<class T> using has_insertion_operator = has_insertion_operator_impl::check<const T>; - DOCTEST_INTERFACE void my_memcpy(void* dest, const void* src, unsigned num); + DOCTEST_INTERFACE std::ostream* tlssPush(); + DOCTEST_INTERFACE String tlssPop(); - DOCTEST_INTERFACE std::ostream* getTlsOss(); // returns a thread-local ostringstream - DOCTEST_INTERFACE String getTlsOssResult(); template <bool C> struct StringMakerBase @@ -854,13 +903,61 @@ namespace detail { } }; + // Vector<int> and various type other than pointer or array. + template<typename T> + struct filldata + { + static void fill(std::ostream* stream, const T &in) { + *stream << in; + } + }; + + template<typename T,unsigned long N> + struct filldata<T[N]> + { + static void fill(std::ostream* stream, const T (&in)[N]) { + for (unsigned long i = 0; i < N; i++) { + *stream << in[i]; + } + } + }; + + // Specialized since we don't want the terminating null byte! + template<unsigned long N> + struct filldata<const char[N]> + { + static void fill(std::ostream* stream, const char(&in)[N]) { + *stream << in; + } + }; + + template<typename T> + void filloss(std::ostream* stream, const T& in) { + filldata<T>::fill(stream, in); + } + + template<typename T,unsigned long N> + void filloss(std::ostream* stream, const T (&in)[N]) { + // T[N], T(&)[N], T(&&)[N] have same behaviour. + // Hence remove reference. + filldata<typename remove_reference<decltype(in)>::type>::fill(stream, in); + } + template <> struct StringMakerBase<true> { template <typename T> static String convert(const DOCTEST_REF_WRAP(T) in) { - *getTlsOss() << in; - return getTlsOssResult(); + /* When parameter "in" is a null terminated const char* it works. + * When parameter "in" is a T arr[N] without '\0' we can fill the + * stringstream with N objects (T=char).If in is char pointer * + * without '\0' , it would cause segfault + * stepping over unaccessible memory. + */ + + std::ostream* stream = tlssPush(); + filloss(stream, in); + return tlssPop(); } }; @@ -936,7 +1033,7 @@ String toString(const DOCTEST_REF_WRAP(T) value) { } #if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: https://github.com/onqtam/doctest/issues/183 +// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183 DOCTEST_INTERFACE String toString(const std::string& in); #endif // VS 2019 @@ -1079,12 +1176,21 @@ DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-comparison") // If not it doesn't find the operator or if the operator at global scope is defined after // this template, the template won't be instantiated due to SFINAE. Once the template is not // instantiated it can look for global operator using normal conversions. -#define SFINAE_OP(ret,op) decltype(doctest::detail::declval<L>() op doctest::detail::declval<R>(),static_cast<ret>(0)) +#define SFINAE_OP(ret,op) decltype((void)(doctest::detail::declval<L>() op doctest::detail::declval<R>()),ret{}) #define DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(op, op_str, op_macro) \ template <typename R> \ - DOCTEST_NOINLINE SFINAE_OP(Result,op) operator op(R&& rhs) { \ - bool res = op_macro(doctest::detail::forward<L>(lhs), doctest::detail::forward<R>(rhs)); \ + DOCTEST_NOINLINE SFINAE_OP(Result,op) operator op(const R&& rhs) { \ + bool res = op_macro(doctest::detail::forward<const L>(lhs), doctest::detail::forward<const R>(rhs)); \ + if(m_at & assertType::is_false) \ + res = !res; \ + if(!res || doctest::getContextOptions()->success) \ + return Result(res, stringifyBinaryExpr(lhs, op_str, rhs)); \ + return Result(res); \ + } \ + template <typename R ,typename enable_if<!doctest::detail::is_rvalue_reference<R>::value, void >::type* = nullptr> \ + DOCTEST_NOINLINE SFINAE_OP(Result,op) operator op(const R& rhs) { \ + bool res = op_macro(doctest::detail::forward<const L>(lhs), rhs); \ if(m_at & assertType::is_false) \ res = !res; \ if(!res || doctest::getContextOptions()->success) \ @@ -1108,6 +1214,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-comparison") bool m_passed; String m_decomp; + Result() = default; Result(bool passed, const String& decomposition = String()); // forbidding some expressions based on this table: https://en.cppreference.com/w/cpp/language/operator_precedence @@ -1217,8 +1324,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-comparison") , m_at(at) {} DOCTEST_NOINLINE operator Result() { -// this is needed only foc MSVC 2015: -// https://ci.appveyor.com/project/onqtam/doctest/builds/38181202 +// this is needed only for MSVC 2015 DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4800) // 'int': forcing value to bool bool res = static_cast<bool>(lhs); DOCTEST_MSVC_SUPPRESS_WARNING_POP @@ -1230,9 +1336,8 @@ DOCTEST_MSVC_SUPPRESS_WARNING_POP return Result(res); } - /* This is required for user-defined conversions from Expression_lhs to L */ - //operator L() const { return lhs; } - operator L() const { return lhs; } + /* This is required for user-defined conversions from Expression_lhs to L */ + operator L() const { return lhs; } // clang-format off DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(==, " == ", DOCTEST_CMP_EQ) //!OCLINT bitwise operator in conditional @@ -1289,22 +1394,27 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP // https://github.com/catchorg/Catch2/issues/870 // https://github.com/catchorg/Catch2/issues/565 template <typename L> - Expression_lhs<L> operator<<(L &&operand) { - return Expression_lhs<L>(doctest::detail::forward<L>(operand), m_at); + Expression_lhs<const L> operator<<(const L &&operand) { + return Expression_lhs<const L>(doctest::detail::forward<const L>(operand), m_at); + } + + template <typename L,typename enable_if<!doctest::detail::is_rvalue_reference<L>::value,void >::type* = nullptr> + Expression_lhs<const L&> operator<<(const L &operand) { + return Expression_lhs<const L&>(operand, m_at); } }; struct DOCTEST_INTERFACE TestSuite { - const char* m_test_suite; - const char* m_description; - bool m_skip; - bool m_no_breaks; - bool m_no_output; - bool m_may_fail; - bool m_should_fail; - int m_expected_failures; - double m_timeout; + const char* m_test_suite = nullptr; + const char* m_description = nullptr; + bool m_skip = false; + bool m_no_breaks = false; + bool m_no_output = false; + bool m_may_fail = false; + bool m_should_fail = false; + int m_expected_failures = 0; + double m_timeout = 0; TestSuite& operator*(const char* in); @@ -1387,15 +1497,16 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP void setResult(const Result& res); template <int comparison, typename L, typename R> - DOCTEST_NOINLINE void binary_assert(const DOCTEST_REF_WRAP(L) lhs, + DOCTEST_NOINLINE bool binary_assert(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) { m_failed = !RelationalComparator<comparison, L, R>()(lhs, rhs); if(m_failed || getContextOptions()->success) m_decomp = stringifyBinaryExpr(lhs, ", ", rhs); + return !m_failed; } template <typename L> - DOCTEST_NOINLINE void unary_assert(const DOCTEST_REF_WRAP(L) val) { + DOCTEST_NOINLINE bool unary_assert(const DOCTEST_REF_WRAP(L) val) { m_failed = !val; if(m_at & assertType::is_false) //!OCLINT bitwise operator in conditional @@ -1403,6 +1514,8 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP if(m_failed || getContextOptions()->success) m_decomp = toString(val); + + return !m_failed; } void translateException(); @@ -1422,7 +1535,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP DOCTEST_INTERFACE void failed_out_of_a_testing_context(const AssertData& ad); - DOCTEST_INTERFACE void decomp_assert(assertType::Enum at, const char* file, int line, + DOCTEST_INTERFACE bool decomp_assert(assertType::Enum at, const char* file, int line, const char* expr, Result result); #define DOCTEST_ASSERT_OUT_OF_TESTS(decomp) \ @@ -1438,7 +1551,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP if(checkIfShouldThrow(at)) \ throwException(); \ } \ - return; \ + return !failed; \ } \ } while(false) @@ -1453,7 +1566,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP throwException() template <int comparison, typename L, typename R> - DOCTEST_NOINLINE void binary_assert(assertType::Enum at, const char* file, int line, + DOCTEST_NOINLINE bool binary_assert(assertType::Enum at, const char* file, int line, const char* expr, const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) { bool failed = !RelationalComparator<comparison, L, R>()(lhs, rhs); @@ -1464,10 +1577,11 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP // ################################################################################### DOCTEST_ASSERT_OUT_OF_TESTS(stringifyBinaryExpr(lhs, ", ", rhs)); DOCTEST_ASSERT_IN_TESTS(stringifyBinaryExpr(lhs, ", ", rhs)); + return !failed; } template <typename L> - DOCTEST_NOINLINE void unary_assert(assertType::Enum at, const char* file, int line, + DOCTEST_NOINLINE bool unary_assert(assertType::Enum at, const char* file, int line, const char* expr, const DOCTEST_REF_WRAP(L) val) { bool failed = !val; @@ -1480,6 +1594,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP // ################################################################################### DOCTEST_ASSERT_OUT_OF_TESTS(toString(val)); DOCTEST_ASSERT_IN_TESTS(toString(val)); + return !failed; } struct DOCTEST_INTERFACE IExceptionTranslator @@ -1573,8 +1688,10 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP class DOCTEST_INTERFACE ContextScopeBase : public IContextScope { protected: ContextScopeBase(); + ContextScopeBase(ContextScopeBase&& other); void destroy(); + bool need_to_destroy{true}; }; template <typename L> class ContextScope : public ContextScopeBase @@ -1584,16 +1701,21 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP public: explicit ContextScope(const L &lambda) : lambda_(lambda) {} - ContextScope(ContextScope &&other) : lambda_(other.lambda_) {} + ContextScope(ContextScope &&other) : ContextScopeBase(static_cast<ContextScopeBase&&>(other)), lambda_(other.lambda_) {} void stringify(std::ostream* s) const override { lambda_(s); } - ~ContextScope() override { destroy(); } + ~ContextScope() override { + if (need_to_destroy) { + destroy(); + } + } }; struct DOCTEST_INTERFACE MessageBuilder : public MessageData { std::ostream* m_stream; + bool logged = false; MessageBuilder(const char* file, int line, assertType::Enum severity); MessageBuilder() = delete; @@ -1692,6 +1814,7 @@ public: void addFilter(const char* filter, const char* value); void clearFilters(); + void setOption(const char* option, bool value); void setOption(const char* option, int value); void setOption(const char* option, const char* value); @@ -1701,6 +1824,8 @@ public: void setAssertHandler(detail::assert_handler ah); + void setCout(std::ostream* out); + int run(); }; @@ -1727,6 +1852,7 @@ struct DOCTEST_INTERFACE CurrentTestCaseStats int numAssertsFailedCurrentTest; double seconds; int failure_flags; // use TestCaseFailureReason::Enum + bool testCaseSuccess; }; struct DOCTEST_INTERFACE TestCaseException @@ -1824,10 +1950,11 @@ int registerReporter(const char* name, int priority, bool isReporter) { #if !defined(DOCTEST_CONFIG_DISABLE) // common code in asserts - for convenience -#define DOCTEST_ASSERT_LOG_AND_REACT(b) \ +#define DOCTEST_ASSERT_LOG_REACT_RETURN(b) \ if(b.log()) \ DOCTEST_BREAK_INTO_DEBUGGER(); \ - b.react() + b.react(); \ + return !b.m_failed #ifdef DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS #define DOCTEST_WRAP_IN_TRY(x) x; @@ -1835,7 +1962,7 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_WRAP_IN_TRY(x) \ try { \ x; \ - } catch(...) { _DOCTEST_RB.translateException(); } + } catch(...) { DOCTEST_RB.translateException(); } #endif // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS #ifdef DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS @@ -1849,13 +1976,12 @@ int registerReporter(const char* name, int priority, bool isReporter) { // registers the test by initializing a dummy var with a function #define DOCTEST_REGISTER_FUNCTION(global_prefix, f, decorators) \ - global_prefix DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_VAR_)) = \ + global_prefix DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), \ doctest::detail::regTest( \ doctest::detail::TestCase( \ f, __FILE__, __LINE__, \ doctest_detail_test_suite_ns::getCurrentTestSuite()) * \ - decorators); \ - DOCTEST_GLOBAL_NO_WARNINGS_END() + decorators)) #define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, decorators) \ namespace { \ @@ -1878,18 +2004,18 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(f, proxy, decorators) \ static doctest::detail::funcType proxy() { return f; } \ - DOCTEST_REGISTER_FUNCTION(inline const, proxy(), decorators) \ + DOCTEST_REGISTER_FUNCTION(inline, proxy(), decorators) \ static void f() // for registering tests #define DOCTEST_TEST_CASE(decorators) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), decorators) + DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), decorators) // for registering tests in classes - requires C++17 for inline variables! #if __cplusplus >= 201703L || (DOCTEST_MSVC >= DOCTEST_COMPILER(19, 12, 0) && _MSVC_LANG >= 201703L) #define DOCTEST_TEST_CASE_CLASS(decorators) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), \ - DOCTEST_ANONYMOUS(_DOCTEST_ANON_PROXY_), \ + DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), \ + DOCTEST_ANONYMOUS(DOCTEST_ANON_PROXY_), \ decorators) #else // DOCTEST_TEST_CASE_CLASS #define DOCTEST_TEST_CASE_CLASS(...) \ @@ -1898,8 +2024,8 @@ int registerReporter(const char* name, int priority, bool isReporter) { // for registering tests with a fixture #define DOCTEST_TEST_CASE_FIXTURE(c, decorators) \ - DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(_DOCTEST_ANON_CLASS_), c, \ - DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), decorators) + DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(DOCTEST_ANON_CLASS_), c, \ + DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), decorators) // for converting types to strings without the <typeinfo> header and demangling #define DOCTEST_TYPE_TO_STRING_IMPL(...) \ @@ -1912,7 +2038,7 @@ int registerReporter(const char* name, int priority, bool isReporter) { DOCTEST_TYPE_TO_STRING_IMPL(__VA_ARGS__) \ } \ } \ - typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) + static_assert(true, "") #define DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, iter, func) \ template <typename T> \ @@ -1943,20 +2069,20 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(dec, T, id) \ DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, DOCTEST_CAT(id, ITERATOR), \ - DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_)) + DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)) #define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, anon, ...) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_CAT(anon, DUMMY)) = \ - doctest::detail::instantiationHelper(DOCTEST_CAT(id, ITERATOR)<__VA_ARGS__>(__FILE__, __LINE__, 0));\ - DOCTEST_GLOBAL_NO_WARNINGS_END() + DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_CAT(anon, DUMMY), \ + doctest::detail::instantiationHelper( \ + DOCTEST_CAT(id, ITERATOR)<__VA_ARGS__>(__FILE__, __LINE__, 0))) #define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_), std::tuple<__VA_ARGS__>) \ - typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) + DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), std::tuple<__VA_ARGS__>) \ + static_assert(true, "") #define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_), __VA_ARGS__) \ - typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) + DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), __VA_ARGS__) \ + static_assert(true, "") #define DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, anon, ...) \ DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, DOCTEST_CAT(anon, ITERATOR), anon); \ @@ -1965,11 +2091,11 @@ int registerReporter(const char* name, int priority, bool isReporter) { static void anon() #define DOCTEST_TEST_CASE_TEMPLATE(dec, T, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_), __VA_ARGS__) + DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), __VA_ARGS__) // for subcases #define DOCTEST_SUBCASE(name) \ - if(const doctest::detail::Subcase & DOCTEST_ANONYMOUS(_DOCTEST_ANON_SUBCASE_) DOCTEST_UNUSED = \ + if(const doctest::detail::Subcase & DOCTEST_ANONYMOUS(DOCTEST_ANON_SUBCASE_) DOCTEST_UNUSED = \ doctest::detail::Subcase(name, __FILE__, __LINE__)) // for grouping tests in test suites by using code blocks @@ -1995,53 +2121,53 @@ int registerReporter(const char* name, int priority, bool isReporter) { namespace ns_name #define DOCTEST_TEST_SUITE(decorators) \ - DOCTEST_TEST_SUITE_IMPL(decorators, DOCTEST_ANONYMOUS(_DOCTEST_ANON_SUITE_)) + DOCTEST_TEST_SUITE_IMPL(decorators, DOCTEST_ANONYMOUS(DOCTEST_ANON_SUITE_)) // for starting a testsuite block #define DOCTEST_TEST_SUITE_BEGIN(decorators) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_VAR_)) = \ - doctest::detail::setTestSuite(doctest::detail::TestSuite() * decorators); \ - DOCTEST_GLOBAL_NO_WARNINGS_END() \ - typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) + DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), \ + doctest::detail::setTestSuite(doctest::detail::TestSuite() * decorators)) \ + static_assert(true, "") // for ending a testsuite block #define DOCTEST_TEST_SUITE_END \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_VAR_)) = \ - doctest::detail::setTestSuite(doctest::detail::TestSuite() * ""); \ - DOCTEST_GLOBAL_NO_WARNINGS_END() \ - typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) + DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), \ + doctest::detail::setTestSuite(doctest::detail::TestSuite() * "")) \ + typedef int DOCTEST_ANONYMOUS(DOCTEST_ANON_FOR_SEMICOLON_) // for registering exception translators #define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(translatorName, signature) \ inline doctest::String translatorName(signature); \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_TRANSLATOR_)) = \ - doctest::registerExceptionTranslator(translatorName); \ - DOCTEST_GLOBAL_NO_WARNINGS_END() \ + DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_), \ + doctest::registerExceptionTranslator(translatorName)) \ doctest::String translatorName(signature) #define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature) \ - DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(DOCTEST_ANONYMOUS(_DOCTEST_ANON_TRANSLATOR_), \ + DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_), \ signature) // for registering reporters #define DOCTEST_REGISTER_REPORTER(name, priority, reporter) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_REPORTER_)) = \ - doctest::registerReporter<reporter>(name, priority, true); \ - DOCTEST_GLOBAL_NO_WARNINGS_END() typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) + DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_REPORTER_), \ + doctest::registerReporter<reporter>(name, priority, true)) \ + static_assert(true, "") // for registering listeners #define DOCTEST_REGISTER_LISTENER(name, priority, reporter) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_REPORTER_)) = \ - doctest::registerReporter<reporter>(name, priority, false); \ - DOCTEST_GLOBAL_NO_WARNINGS_END() typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) + DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_REPORTER_), \ + doctest::registerReporter<reporter>(name, priority, false)) \ + static_assert(true, "") -// for logging +// clang-format off +// for logging - disabling formatting because it's important to have these on 2 separate lines - see PR #557 #define DOCTEST_INFO(...) \ - DOCTEST_INFO_IMPL(DOCTEST_ANONYMOUS(_DOCTEST_CAPTURE_), DOCTEST_ANONYMOUS(_DOCTEST_CAPTURE_), \ + DOCTEST_INFO_IMPL(DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_), \ + DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_OTHER_), \ __VA_ARGS__) +// clang-format on #define DOCTEST_INFO_IMPL(mb_name, s_name, ...) \ - auto DOCTEST_ANONYMOUS(_DOCTEST_CAPTURE_) = doctest::detail::MakeContextScope( \ + auto DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_) = doctest::detail::MakeContextScope( \ [&](std::ostream* s_name) { \ doctest::detail::MessageBuilder mb_name(__FILE__, __LINE__, doctest::assertType::is_warn); \ mb_name.m_stream = s_name; \ @@ -2051,16 +2177,18 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_CAPTURE(x) DOCTEST_INFO(#x " := ", x) #define DOCTEST_ADD_AT_IMPL(type, file, line, mb, ...) \ - do { \ + [&] { \ doctest::detail::MessageBuilder mb(file, line, doctest::assertType::type); \ mb * __VA_ARGS__; \ - DOCTEST_ASSERT_LOG_AND_REACT(mb); \ - } while(false) + if(mb.log()) \ + DOCTEST_BREAK_INTO_DEBUGGER(); \ + mb.react(); \ + }() // clang-format off -#define DOCTEST_ADD_MESSAGE_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_warn, file, line, DOCTEST_ANONYMOUS(_DOCTEST_MESSAGE_), __VA_ARGS__) -#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_check, file, line, DOCTEST_ANONYMOUS(_DOCTEST_MESSAGE_), __VA_ARGS__) -#define DOCTEST_ADD_FAIL_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_require, file, line, DOCTEST_ANONYMOUS(_DOCTEST_MESSAGE_), __VA_ARGS__) +#define DOCTEST_ADD_MESSAGE_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_warn, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) +#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_check, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) +#define DOCTEST_ADD_FAIL_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_require, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) // clang-format on #define DOCTEST_MESSAGE(...) DOCTEST_ADD_MESSAGE_AT(__FILE__, __LINE__, __VA_ARGS__) @@ -2073,18 +2201,18 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_ASSERT_IMPLEMENT_2(assert_type, ...) \ DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Woverloaded-shift-op-parentheses") \ - doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ + doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ __LINE__, #__VA_ARGS__); \ - DOCTEST_WRAP_IN_TRY(_DOCTEST_RB.setResult( \ + DOCTEST_WRAP_IN_TRY(DOCTEST_RB.setResult( \ doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type) \ << __VA_ARGS__)) \ - DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB) \ + DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB) \ DOCTEST_CLANG_SUPPRESS_WARNING_POP #define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...) \ - do { \ + [&] { \ DOCTEST_ASSERT_IMPLEMENT_2(assert_type, __VA_ARGS__); \ - } while(false) + }() #else // DOCTEST_CONFIG_SUPER_FAST_ASSERTS @@ -2108,51 +2236,55 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_REQUIRE_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE_FALSE, __VA_ARGS__) // clang-format off -#define DOCTEST_WARN_MESSAGE(cond, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN, cond); } while(false) -#define DOCTEST_CHECK_MESSAGE(cond, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK, cond); } while(false) -#define DOCTEST_REQUIRE_MESSAGE(cond, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE, cond); } while(false) -#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN_FALSE, cond); } while(false) -#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK_FALSE, cond); } while(false) -#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE_FALSE, cond); } while(false) +#define DOCTEST_WARN_MESSAGE(cond, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN, cond); }() +#define DOCTEST_CHECK_MESSAGE(cond, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK, cond); }() +#define DOCTEST_REQUIRE_MESSAGE(cond, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE, cond); }() +#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN_FALSE, cond); }() +#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK_FALSE, cond); }() +#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE_FALSE, cond); }() // clang-format on #define DOCTEST_ASSERT_THROWS_AS(expr, assert_type, message, ...) \ - do { \ + [&] { \ if(!doctest::getContextOptions()->no_throw) { \ - doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ + doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ __LINE__, #expr, #__VA_ARGS__, message); \ try { \ DOCTEST_CAST_TO_VOID(expr) \ } catch(const typename doctest::detail::remove_const< \ typename doctest::detail::remove_reference<__VA_ARGS__>::type>::type&) { \ - _DOCTEST_RB.translateException(); \ - _DOCTEST_RB.m_threw_as = true; \ - } catch(...) { _DOCTEST_RB.translateException(); } \ - DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB); \ + DOCTEST_RB.translateException(); \ + DOCTEST_RB.m_threw_as = true; \ + } catch(...) { DOCTEST_RB.translateException(); } \ + DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ + } else { \ + return false; \ } \ - } while(false) + }() #define DOCTEST_ASSERT_THROWS_WITH(expr, expr_str, assert_type, ...) \ - do { \ + [&] { \ if(!doctest::getContextOptions()->no_throw) { \ - doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ + doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ __LINE__, expr_str, "", __VA_ARGS__); \ try { \ DOCTEST_CAST_TO_VOID(expr) \ - } catch(...) { _DOCTEST_RB.translateException(); } \ - DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB); \ + } catch(...) { DOCTEST_RB.translateException(); } \ + DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ + } else { \ + return false; \ } \ - } while(false) + }() #define DOCTEST_ASSERT_NOTHROW(assert_type, ...) \ - do { \ - doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ + [&] { \ + doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ __LINE__, #__VA_ARGS__); \ try { \ DOCTEST_CAST_TO_VOID(__VA_ARGS__) \ - } catch(...) { _DOCTEST_RB.translateException(); } \ - DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB); \ - } while(false) + } catch(...) { DOCTEST_RB.translateException(); } \ + DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ + }() // clang-format off #define DOCTEST_WARN_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_WARN_THROWS, "") @@ -2175,42 +2307,42 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_CHECK_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_CHECK_NOTHROW, __VA_ARGS__) #define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_REQUIRE_NOTHROW, __VA_ARGS__) -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS(expr); } while(false) -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS(expr); } while(false) -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS(expr); } while(false) -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_AS(expr, ex); } while(false) -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_AS(expr, ex); } while(false) -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_AS(expr, ex); } while(false) -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH(expr, with); } while(false) -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH(expr, with); } while(false) -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH(expr, with); } while(false) -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex); } while(false) -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex); } while(false) -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex); } while(false) -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_NOTHROW(expr); } while(false) -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_NOTHROW(expr); } while(false) -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) do { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_NOTHROW(expr); } while(false) +#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS(expr); }() +#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS(expr); }() +#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS(expr); }() +#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_AS(expr, ex); }() +#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_AS(expr, ex); }() +#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_AS(expr, ex); }() +#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH(expr, with); }() +#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH(expr, with); }() +#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH(expr, with); }() +#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex); }() +#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex); }() +#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex); }() +#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_NOTHROW(expr); }() +#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_NOTHROW(expr); }() +#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) [&] {DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_NOTHROW(expr); }() // clang-format on #ifndef DOCTEST_CONFIG_SUPER_FAST_ASSERTS #define DOCTEST_BINARY_ASSERT(assert_type, comp, ...) \ - do { \ - doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ + [&] { \ + doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ __LINE__, #__VA_ARGS__); \ DOCTEST_WRAP_IN_TRY( \ - _DOCTEST_RB.binary_assert<doctest::detail::binaryAssertComparison::comp>( \ + DOCTEST_RB.binary_assert<doctest::detail::binaryAssertComparison::comp>( \ __VA_ARGS__)) \ - DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB); \ - } while(false) + DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ + }() #define DOCTEST_UNARY_ASSERT(assert_type, ...) \ - do { \ - doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ + [&] { \ + doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ __LINE__, #__VA_ARGS__); \ - DOCTEST_WRAP_IN_TRY(_DOCTEST_RB.unary_assert(__VA_ARGS__)) \ - DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB); \ - } while(false) + DOCTEST_WRAP_IN_TRY(DOCTEST_RB.unary_assert(__VA_ARGS__)) \ + DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ + }() #else // DOCTEST_CONFIG_SUPER_FAST_ASSERTS @@ -2286,37 +2418,37 @@ int registerReporter(const char* name, int priority, bool isReporter) { #ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS -#define DOCTEST_WARN_THROWS(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS(...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_AS(expr, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_AS(expr, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_WITH(expr, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_WITH(expr, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_NOTHROW(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_NOTHROW(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_NOTHROW(...) (static_cast<void>(0)) - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) (static_cast<void>(0)) +#define DOCTEST_WARN_THROWS(...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS(...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS(...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_AS(expr, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_AS(expr, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_WITH(expr, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_WITH(expr, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) ([] { return false; }) +#define DOCTEST_WARN_NOTHROW(...) ([] { return false; }) +#define DOCTEST_CHECK_NOTHROW(...) ([] { return false; }) +#define DOCTEST_REQUIRE_NOTHROW(...) ([] { return false; }) + +#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) ([] { return false; }) +#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) ([] { return false; }) #else // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS @@ -2358,35 +2490,32 @@ int registerReporter(const char* name, int priority, bool isReporter) { // for registering tests #define DOCTEST_TEST_CASE(name) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), name) + DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name) // for registering tests in classes #define DOCTEST_TEST_CASE_CLASS(name) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), name) + DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name) // for registering tests with a fixture #define DOCTEST_TEST_CASE_FIXTURE(x, name) \ - DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(_DOCTEST_ANON_CLASS_), x, \ - DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), name) + DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(DOCTEST_ANON_CLASS_), x, \ + DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name) // for converting types to strings without the <typeinfo> header and demangling -#define DOCTEST_TYPE_TO_STRING(...) typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) +#define DOCTEST_TYPE_TO_STRING(...) static_assert(true, "") #define DOCTEST_TYPE_TO_STRING_IMPL(...) // for typed tests #define DOCTEST_TEST_CASE_TEMPLATE(name, type, ...) \ template <typename type> \ - inline void DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_)() + inline void DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)() #define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(name, type, id) \ template <typename type> \ - inline void DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_)() + inline void DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)() -#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...) \ - typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) - -#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...) \ - typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) +#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...) static_assert(true, "") +#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...) static_assert(true, "") // for subcases #define DOCTEST_SUBCASE(name) @@ -2395,14 +2524,14 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_TEST_SUITE(name) namespace // for starting a testsuite block -#define DOCTEST_TEST_SUITE_BEGIN(name) typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) +#define DOCTEST_TEST_SUITE_BEGIN(name) static_assert(true, "") // for ending a testsuite block -#define DOCTEST_TEST_SUITE_END typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_) +#define DOCTEST_TEST_SUITE_END typedef int DOCTEST_ANONYMOUS(DOCTEST_ANON_FOR_SEMICOLON_) #define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature) \ template <typename DOCTEST_UNUSED_TEMPLATE_TYPE> \ - static inline doctest::String DOCTEST_ANONYMOUS(_DOCTEST_ANON_TRANSLATOR_)(signature) + static inline doctest::String DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_)(signature) #define DOCTEST_REGISTER_REPORTER(name, priority, reporter) #define DOCTEST_REGISTER_LISTENER(name, priority, reporter) @@ -2416,77 +2545,138 @@ int registerReporter(const char* name, int priority, bool isReporter) { #define DOCTEST_FAIL_CHECK(...) (static_cast<void>(0)) #define DOCTEST_FAIL(...) (static_cast<void>(0)) -#define DOCTEST_WARN(...) (static_cast<void>(0)) -#define DOCTEST_CHECK(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE(...) (static_cast<void>(0)) -#define DOCTEST_WARN_FALSE(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_FALSE(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_FALSE(...) (static_cast<void>(0)) - -#define DOCTEST_WARN_MESSAGE(cond, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_MESSAGE(cond, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_MESSAGE(cond, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) (static_cast<void>(0)) - -#define DOCTEST_WARN_THROWS(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS(...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_AS(expr, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_AS(expr, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_WITH(expr, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_WITH(expr, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_NOTHROW(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_NOTHROW(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_NOTHROW(...) (static_cast<void>(0)) - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) (static_cast<void>(0)) -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) (static_cast<void>(0)) - -#define DOCTEST_WARN_EQ(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_EQ(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_EQ(...) (static_cast<void>(0)) -#define DOCTEST_WARN_NE(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_NE(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_NE(...) (static_cast<void>(0)) -#define DOCTEST_WARN_GT(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_GT(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_GT(...) (static_cast<void>(0)) -#define DOCTEST_WARN_LT(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_LT(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_LT(...) (static_cast<void>(0)) -#define DOCTEST_WARN_GE(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_GE(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_GE(...) (static_cast<void>(0)) -#define DOCTEST_WARN_LE(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_LE(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_LE(...) (static_cast<void>(0)) - -#define DOCTEST_WARN_UNARY(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_UNARY(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_UNARY(...) (static_cast<void>(0)) -#define DOCTEST_WARN_UNARY_FALSE(...) (static_cast<void>(0)) -#define DOCTEST_CHECK_UNARY_FALSE(...) (static_cast<void>(0)) -#define DOCTEST_REQUIRE_UNARY_FALSE(...) (static_cast<void>(0)) +#ifdef DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED + +#define DOCTEST_WARN(...) [&] { return __VA_ARGS__; }() +#define DOCTEST_CHECK(...) [&] { return __VA_ARGS__; }() +#define DOCTEST_REQUIRE(...) [&] { return __VA_ARGS__; }() +#define DOCTEST_WARN_FALSE(...) [&] { return !(__VA_ARGS__); }() +#define DOCTEST_CHECK_FALSE(...) [&] { return !(__VA_ARGS__); }() +#define DOCTEST_REQUIRE_FALSE(...) [&] { return !(__VA_ARGS__); }() + +#define DOCTEST_WARN_MESSAGE(cond, ...) [&] { return cond; }() +#define DOCTEST_CHECK_MESSAGE(cond, ...) [&] { return cond; }() +#define DOCTEST_REQUIRE_MESSAGE(cond, ...) [&] { return cond; }() +#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() +#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() +#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() + +namespace doctest { +namespace detail { +#define DOCTEST_RELATIONAL_OP(name, op) \ + template <typename L, typename R> \ + bool name(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) { return lhs op rhs; } + + DOCTEST_RELATIONAL_OP(eq, ==) + DOCTEST_RELATIONAL_OP(ne, !=) + DOCTEST_RELATIONAL_OP(lt, <) + DOCTEST_RELATIONAL_OP(gt, >) + DOCTEST_RELATIONAL_OP(le, <=) + DOCTEST_RELATIONAL_OP(ge, >=) +} // namespace detail +} // namespace doctest + +#define DOCTEST_WARN_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }() +#define DOCTEST_CHECK_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }() +#define DOCTEST_REQUIRE_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }() +#define DOCTEST_WARN_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }() +#define DOCTEST_CHECK_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }() +#define DOCTEST_REQUIRE_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }() +#define DOCTEST_WARN_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }() +#define DOCTEST_CHECK_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }() +#define DOCTEST_REQUIRE_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }() +#define DOCTEST_WARN_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }() +#define DOCTEST_CHECK_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }() +#define DOCTEST_REQUIRE_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }() +#define DOCTEST_WARN_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }() +#define DOCTEST_CHECK_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }() +#define DOCTEST_REQUIRE_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }() +#define DOCTEST_WARN_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }() +#define DOCTEST_CHECK_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }() +#define DOCTEST_REQUIRE_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }() +#define DOCTEST_WARN_UNARY(...) [&] { return __VA_ARGS__; }() +#define DOCTEST_CHECK_UNARY(...) [&] { return __VA_ARGS__; }() +#define DOCTEST_REQUIRE_UNARY(...) [&] { return __VA_ARGS__; }() +#define DOCTEST_WARN_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() +#define DOCTEST_CHECK_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() +#define DOCTEST_REQUIRE_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() + +#else // DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED + +#define DOCTEST_WARN(...) ([] { return false; }) +#define DOCTEST_CHECK(...) ([] { return false; }) +#define DOCTEST_REQUIRE(...) ([] { return false; }) +#define DOCTEST_WARN_FALSE(...) ([] { return false; }) +#define DOCTEST_CHECK_FALSE(...) ([] { return false; }) +#define DOCTEST_REQUIRE_FALSE(...) ([] { return false; }) + +#define DOCTEST_WARN_MESSAGE(cond, ...) ([] { return false; }) +#define DOCTEST_CHECK_MESSAGE(cond, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_MESSAGE(cond, ...) ([] { return false; }) +#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) ([] { return false; }) +#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) ([] { return false; }) + +#define DOCTEST_WARN_EQ(...) ([] { return false; }) +#define DOCTEST_CHECK_EQ(...) ([] { return false; }) +#define DOCTEST_REQUIRE_EQ(...) ([] { return false; }) +#define DOCTEST_WARN_NE(...) ([] { return false; }) +#define DOCTEST_CHECK_NE(...) ([] { return false; }) +#define DOCTEST_REQUIRE_NE(...) ([] { return false; }) +#define DOCTEST_WARN_GT(...) ([] { return false; }) +#define DOCTEST_CHECK_GT(...) ([] { return false; }) +#define DOCTEST_REQUIRE_GT(...) ([] { return false; }) +#define DOCTEST_WARN_LT(...) ([] { return false; }) +#define DOCTEST_CHECK_LT(...) ([] { return false; }) +#define DOCTEST_REQUIRE_LT(...) ([] { return false; }) +#define DOCTEST_WARN_GE(...) ([] { return false; }) +#define DOCTEST_CHECK_GE(...) ([] { return false; }) +#define DOCTEST_REQUIRE_GE(...) ([] { return false; }) +#define DOCTEST_WARN_LE(...) ([] { return false; }) +#define DOCTEST_CHECK_LE(...) ([] { return false; }) +#define DOCTEST_REQUIRE_LE(...) ([] { return false; }) + +#define DOCTEST_WARN_UNARY(...) ([] { return false; }) +#define DOCTEST_CHECK_UNARY(...) ([] { return false; }) +#define DOCTEST_REQUIRE_UNARY(...) ([] { return false; }) +#define DOCTEST_WARN_UNARY_FALSE(...) ([] { return false; }) +#define DOCTEST_CHECK_UNARY_FALSE(...) ([] { return false; }) +#define DOCTEST_REQUIRE_UNARY_FALSE(...) ([] { return false; }) + +#endif // DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED + +// TODO: think about if these also need to work properly even when doctest is disabled +#define DOCTEST_WARN_THROWS(...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS(...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS(...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_AS(expr, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_AS(expr, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_WITH(expr, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_WITH(expr, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) ([] { return false; }) +#define DOCTEST_WARN_NOTHROW(...) ([] { return false; }) +#define DOCTEST_CHECK_NOTHROW(...) ([] { return false; }) +#define DOCTEST_REQUIRE_NOTHROW(...) ([] { return false; }) + +#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) ([] { return false; }) +#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) ([] { return false; }) +#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) ([] { return false; }) +#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) ([] { return false; }) +#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) ([] { return false; }) #endif // DOCTEST_CONFIG_DISABLE @@ -2706,6 +2896,8 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP DOCTEST_MSVC_SUPPRESS_WARNING_POP DOCTEST_GCC_SUPPRESS_WARNING_POP +DOCTEST_SUPPRESS_COMMON_WARNINGS_POP + #endif // DOCTEST_LIBRARY_INCLUDED #ifndef DOCTEST_SINGLE_HEADER @@ -2725,13 +2917,11 @@ DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-macros") DOCTEST_CLANG_SUPPRESS_WARNING_POP +DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH + DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -DOCTEST_CLANG_SUPPRESS_WARNING("-Wunknown-pragmas") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wpadded") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wweak-vtables") DOCTEST_CLANG_SUPPRESS_WARNING("-Wglobal-constructors") DOCTEST_CLANG_SUPPRESS_WARNING("-Wexit-time-destructors") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-prototypes") DOCTEST_CLANG_SUPPRESS_WARNING("-Wsign-conversion") DOCTEST_CLANG_SUPPRESS_WARNING("-Wshorten-64-to-32") DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-variable-declarations") @@ -2739,65 +2929,35 @@ DOCTEST_CLANG_SUPPRESS_WARNING("-Wswitch") DOCTEST_CLANG_SUPPRESS_WARNING("-Wswitch-enum") DOCTEST_CLANG_SUPPRESS_WARNING("-Wcovered-switch-default") DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-noreturn") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wunused-local-typedef") DOCTEST_CLANG_SUPPRESS_WARNING("-Wdisabled-macro-expansion") DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-braces") DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-field-initializers") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat-pedantic") DOCTEST_CLANG_SUPPRESS_WARNING("-Wunused-member-function") DOCTEST_CLANG_SUPPRESS_WARNING("-Wnonportable-system-include-path") DOCTEST_GCC_SUPPRESS_WARNING_PUSH -DOCTEST_GCC_SUPPRESS_WARNING("-Wunknown-pragmas") -DOCTEST_GCC_SUPPRESS_WARNING("-Wpragmas") DOCTEST_GCC_SUPPRESS_WARNING("-Wconversion") -DOCTEST_GCC_SUPPRESS_WARNING("-Weffc++") DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-conversion") -DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-overflow") -DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-aliasing") DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-field-initializers") DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-braces") -DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-declarations") DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch") DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch-enum") DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch-default") DOCTEST_GCC_SUPPRESS_WARNING("-Wunsafe-loop-optimizations") DOCTEST_GCC_SUPPRESS_WARNING("-Wold-style-cast") -DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-local-typedefs") -DOCTEST_GCC_SUPPRESS_WARNING("-Wuseless-cast") DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-function") DOCTEST_GCC_SUPPRESS_WARNING("-Wmultiple-inheritance") -DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept") DOCTEST_GCC_SUPPRESS_WARNING("-Wsuggest-attribute") DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -DOCTEST_MSVC_SUPPRESS_WARNING(4616) // invalid compiler warning -DOCTEST_MSVC_SUPPRESS_WARNING(4619) // invalid compiler warning -DOCTEST_MSVC_SUPPRESS_WARNING(4996) // The compiler encountered a deprecated declaration DOCTEST_MSVC_SUPPRESS_WARNING(4267) // 'var' : conversion from 'x' to 'y', possible loss of data -DOCTEST_MSVC_SUPPRESS_WARNING(4706) // assignment within conditional expression -DOCTEST_MSVC_SUPPRESS_WARNING(4512) // 'class' : assignment operator could not be generated -DOCTEST_MSVC_SUPPRESS_WARNING(4127) // conditional expression is constant DOCTEST_MSVC_SUPPRESS_WARNING(4530) // C++ exception handler used, but unwind semantics not enabled DOCTEST_MSVC_SUPPRESS_WARNING(4577) // 'noexcept' used with no exception handling mode specified DOCTEST_MSVC_SUPPRESS_WARNING(4774) // format string expected in argument is not a string literal DOCTEST_MSVC_SUPPRESS_WARNING(4365) // conversion from 'int' to 'unsigned', signed/unsigned mismatch -DOCTEST_MSVC_SUPPRESS_WARNING(4820) // padding in structs -DOCTEST_MSVC_SUPPRESS_WARNING(4640) // construction of local static object is not thread-safe DOCTEST_MSVC_SUPPRESS_WARNING(5039) // pointer to potentially throwing function passed to extern C -DOCTEST_MSVC_SUPPRESS_WARNING(5045) // Spectre mitigation stuff -DOCTEST_MSVC_SUPPRESS_WARNING(4626) // assignment operator was implicitly defined as deleted -DOCTEST_MSVC_SUPPRESS_WARNING(5027) // move assignment operator was implicitly defined as deleted -DOCTEST_MSVC_SUPPRESS_WARNING(5026) // move constructor was implicitly defined as deleted -DOCTEST_MSVC_SUPPRESS_WARNING(4625) // copy constructor was implicitly defined as deleted DOCTEST_MSVC_SUPPRESS_WARNING(4800) // forcing value to bool 'true' or 'false' (performance warning) -// static analysis -DOCTEST_MSVC_SUPPRESS_WARNING(26439) // This kind of function may not throw. Declare it 'noexcept' -DOCTEST_MSVC_SUPPRESS_WARNING(26495) // Always initialize a member variable -DOCTEST_MSVC_SUPPRESS_WARNING(26451) // Arithmetic overflow ... -DOCTEST_MSVC_SUPPRESS_WARNING(26444) // Avoid unnamed objects with custom construction and dtor... -DOCTEST_MSVC_SUPPRESS_WARNING(26812) // Prefer 'enum class' over 'enum' +DOCTEST_MSVC_SUPPRESS_WARNING(5245) // unreferenced function with internal linkage has been removed DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN @@ -2805,7 +2965,7 @@ DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN #include <ctime> #include <cmath> #include <climits> -// borland (Embarcadero) compiler requires math.h and not cmath - https://github.com/onqtam/doctest/pull/37 +// borland (Embarcadero) compiler requires math.h and not cmath - https://github.com/doctest/doctest/pull/37 #ifdef __BORLANDC__ #include <math.h> #endif // __BORLANDC__ @@ -2863,7 +3023,7 @@ DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN #endif // DOCTEST_PLATFORM_WINDOWS -// this is a fix for https://github.com/onqtam/doctest/issues/348 +// this is a fix for https://github.com/doctest/doctest/issues/348 // https://mail.gnome.org/archives/xml/2012-January/msg00000.html #if !defined(HAVE_UNISTD_H) && !defined(STDOUT_FILENO) #define STDOUT_FILENO fileno(stdout) @@ -2885,8 +3045,12 @@ DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END #endif #ifndef DOCTEST_THREAD_LOCAL +#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) +#define DOCTEST_THREAD_LOCAL +#else // DOCTEST_MSVC #define DOCTEST_THREAD_LOCAL thread_local -#endif +#endif // DOCTEST_MSVC +#endif // DOCTEST_THREAD_LOCAL #ifndef DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES #define DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES 32 @@ -2906,12 +3070,34 @@ DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END #define DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS #endif +#ifndef DOCTEST_CDECL +#define DOCTEST_CDECL __cdecl +#endif + namespace doctest { bool is_running_in_test = false; namespace { using namespace detail; + + template <typename Ex> + DOCTEST_NORETURN void throw_exception(Ex const& e) { +#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS + throw e; +#else // DOCTEST_CONFIG_NO_EXCEPTIONS + std::cerr << "doctest will terminate because it needed to throw an exception.\n" + << "The message was: " << e.what() << '\n'; + std::terminate(); +#endif // DOCTEST_CONFIG_NO_EXCEPTIONS + } + +#ifndef DOCTEST_INTERNAL_ERROR +#define DOCTEST_INTERNAL_ERROR(msg) \ + throw_exception(std::logic_error( \ + __FILE__ ":" DOCTEST_TOSTR(__LINE__) ": Internal doctest error: " msg)) +#endif // DOCTEST_INTERNAL_ERROR + // case insensitive strcmp int stricmp(const char* a, const char* b) { for(;; a++, b++) { @@ -2955,8 +3141,6 @@ namespace { } // namespace namespace detail { - void my_memcpy(void* dest, const void* src, unsigned num) { memcpy(dest, src, num); } - String rawMemoryToString(const void* object, unsigned size) { // Reverse order for little endian architectures int i = 0, end = static_cast<int>(size), inc = 1; @@ -2966,25 +3150,42 @@ namespace detail { } unsigned const char* bytes = static_cast<unsigned const char*>(object); - std::ostringstream oss; - oss << "0x" << std::setfill('0') << std::hex; + std::ostream* oss = tlssPush(); + *oss << "0x" << std::setfill('0') << std::hex; for(; i != end; i += inc) - oss << std::setw(2) << static_cast<unsigned>(bytes[i]); - return oss.str().c_str(); + *oss << std::setw(2) << static_cast<unsigned>(bytes[i]); + return tlssPop(); } - DOCTEST_THREAD_LOCAL std::ostringstream g_oss; // NOLINT(cert-err58-cpp) + DOCTEST_THREAD_LOCAL class + { + std::vector<std::streampos> stack; + std::stringstream ss; + + public: + std::ostream* push() { + stack.push_back(ss.tellp()); + return &ss; + } + + String pop() { + if (stack.empty()) + DOCTEST_INTERNAL_ERROR("TLSS was empty when trying to pop!"); - std::ostream* getTlsOss() { - g_oss.clear(); // there shouldn't be anything worth clearing in the flags - g_oss.str(""); // the slow way of resetting a string stream - //g_oss.seekp(0); // optimal reset - as seen here: https://stackoverflow.com/a/624291/3162383 - return &g_oss; + std::streampos pos = stack.back(); + stack.pop_back(); + unsigned sz = static_cast<unsigned>(ss.tellp() - pos); + ss.rdbuf()->pubseekpos(pos, std::ios::in | std::ios::out); + return String(ss, sz); + } + } g_oss; + + std::ostream* tlssPush() { + return g_oss.push(); } - String getTlsOssResult() { - //g_oss << std::ends; // needed - as shown here: https://stackoverflow.com/a/624291/3162383 - return g_oss.str().c_str(); + String tlssPop() { + return g_oss.pop(); } #ifndef DOCTEST_CONFIG_DISABLE @@ -2995,8 +3196,7 @@ namespace timer_large_integer #if defined(DOCTEST_PLATFORM_WINDOWS) typedef ULONGLONG type; #else // DOCTEST_PLATFORM_WINDOWS - using namespace std; - typedef uint64_t type; + typedef std::uint64_t type; #endif // DOCTEST_PLATFORM_WINDOWS } @@ -3088,7 +3288,7 @@ typedef timer_large_integer::type ticks_t; return result; } - T operator=(T desired) DOCTEST_NOEXCEPT { + T operator=(T desired) DOCTEST_NOEXCEPT { // lgtm [cpp/assignment-does-not-return-this] store(desired); return desired; } @@ -3103,7 +3303,7 @@ typedef timer_large_integer::type ticks_t; private: // Each thread has a different atomic that it operates on. If more than NumLanes threads - // use this, some will use the same atomic. So performance will degrate a bit, but still + // use this, some will use the same atomic. So performance will degrade a bit, but still // everything will work. // // The logic here is a bit tricky. The call should be as fast as possible, so that there @@ -3198,7 +3398,8 @@ typedef timer_large_integer::type ticks_t; (TestCaseFailureReason::FailedExactlyNumTimes & failure_flags); // if any subcase has failed - the whole test case has failed - if(failure_flags && !ok_to_fail) + testCaseSuccess = !(failure_flags && !ok_to_fail); + if(!testCaseSuccess) numTestCasesFailed++; } }; @@ -3213,19 +3414,29 @@ typedef timer_large_integer::type ticks_t; #endif // DOCTEST_CONFIG_DISABLE } // namespace detail +char* String::allocate(unsigned sz) { + if (sz <= last) { + buf[sz] = '\0'; + setLast(last - sz); + return buf; + } else { + setOnHeap(); + data.size = sz; + data.capacity = data.size + 1; + data.ptr = new char[data.capacity]; + data.ptr[sz] = '\0'; + return data.ptr; + } +} + void String::setOnHeap() { *reinterpret_cast<unsigned char*>(&buf[last]) = 128; } void String::setLast(unsigned in) { buf[last] = char(in); } void String::copy(const String& other) { - using namespace std; if(other.isOnStack()) { memcpy(buf, other.buf, len); } else { - setOnHeap(); - data.size = other.data.size; - data.capacity = data.size + 1; - data.ptr = new char[data.capacity]; - memcpy(data.ptr, other.data.ptr, data.size + 1); + memcpy(allocate(other.data.size), other.data.ptr, other.data.size); } } @@ -3244,19 +3455,11 @@ String::String(const char* in) : String(in, strlen(in)) {} String::String(const char* in, unsigned in_size) { - using namespace std; - if(in_size <= last) { - memcpy(buf, in, in_size); - buf[in_size] = '\0'; - setLast(last - in_size); - } else { - setOnHeap(); - data.size = in_size; - data.capacity = data.size + 1; - data.ptr = new char[data.capacity]; - memcpy(data.ptr, in, in_size); - data.ptr[in_size] = '\0'; - } + memcpy(allocate(in_size), in, in_size); +} + +String::String(std::istream& in, unsigned in_size) { + in.read(allocate(in_size), in_size); } String::String(const String& other) { copy(other); } @@ -3276,7 +3479,6 @@ String& String::operator+=(const String& other) { const unsigned my_old_size = size(); const unsigned other_size = other.size(); const unsigned total_size = my_old_size + other_size; - using namespace std; if(isOnStack()) { if(total_size < len) { // append to the current stack space @@ -3323,18 +3525,13 @@ String& String::operator+=(const String& other) { return *this; } -// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) -String String::operator+(const String& other) const { return String(*this) += other; } - String::String(String&& other) { - using namespace std; memcpy(buf, other.buf, len); other.buf[0] = '\0'; other.setLast(); } String& String::operator=(String&& other) { - using namespace std; if(this != &other) { if(!isOnStack()) delete[] data.ptr; @@ -3379,6 +3576,9 @@ int String::compare(const String& other, bool no_case) const { return compare(other.c_str(), no_case); } +// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) +String operator+(const String& lhs, const String& rhs) { return String(lhs) += rhs; } + // clang-format off bool operator==(const String& lhs, const String& rhs) { return lhs.compare(rhs) == 0; } bool operator!=(const String& lhs, const String& rhs) { return lhs.compare(rhs) != 0; } @@ -3537,7 +3737,7 @@ DOCTEST_TO_STRING_OVERLOAD(int long long unsigned, "%llu") String toString(std::nullptr_t) { return "NULL"; } #if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: https://github.com/onqtam/doctest/issues/183 +// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183 String toString(const std::string& in) { return in.c_str(); } #endif // VS 2019 @@ -3581,7 +3781,7 @@ bool operator>(const Approx& lhs, double rhs) { return lhs.m_value > rhs && lhs String toString(const Approx& in) { // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) - return String("Approx( ") + doctest::toString(in.m_value) + " )"; + return "Approx( " + doctest::toString(in.m_value) + " )"; } const ContextOptions* getContextOptions() { return DOCTEST_BRANCH_ON_DISABLED(nullptr, g_cs); } @@ -3594,11 +3794,13 @@ Context::~Context() = default; void Context::applyCommandLine(int, const char* const*) {} void Context::addFilter(const char*, const char*) {} void Context::clearFilters() {} +void Context::setOption(const char*, bool) {} void Context::setOption(const char*, int) {} void Context::setOption(const char*, const char*) {} bool Context::shouldExit() { return false; } void Context::setAsDefaultForAssertsOutOfTestCases() {} void Context::setAssertHandler(detail::assert_handler) {} +void Context::setCout(std::ostream* out) {} int Context::run() { return 0; } IReporter::~IReporter() = default; @@ -3769,8 +3971,8 @@ namespace detail { DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature); } - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") + DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 + DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") Subcase::~Subcase() { @@ -3797,8 +3999,8 @@ namespace detail { } } - DOCTEST_CLANG_SUPPRESS_WARNING_POP - DOCTEST_GCC_SUPPRESS_WARNING_POP + DOCTEST_CLANG_SUPPRESS_WARNING_POP + DOCTEST_GCC_SUPPRESS_WARNING_POP DOCTEST_MSVC_SUPPRESS_WARNING_POP Subcase::operator bool() const { return m_entered; } @@ -3812,15 +4014,6 @@ namespace detail { TestSuite& TestSuite::operator*(const char* in) { m_test_suite = in; - // clear state - m_description = nullptr; - m_skip = false; - m_no_breaks = false; - m_no_output = false; - m_may_fail = false; - m_should_fail = false; - m_expected_failures = 0; - m_timeout = 0; return *this; } @@ -3925,29 +4118,6 @@ namespace { return suiteOrderComparator(lhs, rhs); } -#ifdef DOCTEST_CONFIG_COLORS_WINDOWS - HANDLE g_stdoutHandle; - WORD g_origFgAttrs; - WORD g_origBgAttrs; - bool g_attrsInitted = false; - - int colors_init() { - if(!g_attrsInitted) { - g_stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE); - g_attrsInitted = true; - CONSOLE_SCREEN_BUFFER_INFO csbiInfo; - GetConsoleScreenBufferInfo(g_stdoutHandle, &csbiInfo); - g_origFgAttrs = csbiInfo.wAttributes & ~(BACKGROUND_GREEN | BACKGROUND_RED | - BACKGROUND_BLUE | BACKGROUND_INTENSITY); - g_origBgAttrs = csbiInfo.wAttributes & ~(FOREGROUND_GREEN | FOREGROUND_RED | - FOREGROUND_BLUE | FOREGROUND_INTENSITY); - } - return 0; - } - - int dumy_init_console_colors = colors_init(); -#endif // DOCTEST_CONFIG_COLORS_WINDOWS - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") void color_to_stream(std::ostream& s, Color::Enum code) { static_cast<void>(s); // for DOCTEST_CONFIG_COLORS_NONE or DOCTEST_CONFIG_COLORS_WINDOWS @@ -3981,10 +4151,26 @@ namespace { #ifdef DOCTEST_CONFIG_COLORS_WINDOWS if(g_no_colors || - (isatty(fileno(stdout)) == false && getContextOptions()->force_colors == false)) + (_isatty(_fileno(stdout)) == false && getContextOptions()->force_colors == false)) return; -#define DOCTEST_SET_ATTR(x) SetConsoleTextAttribute(g_stdoutHandle, x | g_origBgAttrs) + static struct ConsoleHelper { + HANDLE stdoutHandle; + WORD origFgAttrs; + WORD origBgAttrs; + + ConsoleHelper() { + stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE); + CONSOLE_SCREEN_BUFFER_INFO csbiInfo; + GetConsoleScreenBufferInfo(stdoutHandle, &csbiInfo); + origFgAttrs = csbiInfo.wAttributes & ~(BACKGROUND_GREEN | BACKGROUND_RED | + BACKGROUND_BLUE | BACKGROUND_INTENSITY); + origBgAttrs = csbiInfo.wAttributes & ~(FOREGROUND_GREEN | FOREGROUND_RED | + FOREGROUND_BLUE | FOREGROUND_INTENSITY); + } + } ch; + +#define DOCTEST_SET_ATTR(x) SetConsoleTextAttribute(ch.stdoutHandle, x | ch.origBgAttrs) // clang-format off switch (code) { @@ -4001,7 +4187,7 @@ namespace { case Color::BrightWhite: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break; case Color::None: case Color::Bright: // invalid - default: DOCTEST_SET_ATTR(g_origFgAttrs); + default: DOCTEST_SET_ATTR(ch.origFgAttrs); } // clang-format on #endif // DOCTEST_CONFIG_COLORS_WINDOWS @@ -4145,8 +4331,16 @@ namespace detail { g_infoContexts.push_back(this); } - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") + ContextScopeBase::ContextScopeBase(ContextScopeBase&& other) { + if (other.need_to_destroy) { + other.destroy(); + } + other.need_to_destroy = false; + g_infoContexts.push_back(this); + } + + DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 + DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") // destroy cannot be inlined into the destructor because that would mean calling stringify after @@ -4165,8 +4359,8 @@ namespace detail { g_infoContexts.pop_back(); } - DOCTEST_CLANG_SUPPRESS_WARNING_POP - DOCTEST_GCC_SUPPRESS_WARNING_POP + DOCTEST_CLANG_SUPPRESS_WARNING_POP + DOCTEST_GCC_SUPPRESS_WARNING_POP DOCTEST_MSVC_SUPPRESS_WARNING_POP } // namespace detail namespace { @@ -4313,7 +4507,7 @@ namespace { static unsigned int prev_abort_behavior; static int prev_report_mode; static _HFILE prev_report_file; - static void (*prev_sigabrt_handler)(int); + static void (DOCTEST_CDECL *prev_sigabrt_handler)(int); static std::terminate_handler original_terminate_handler; static bool isSet; static ULONG guaranteeSize; @@ -4325,7 +4519,7 @@ namespace { unsigned int FatalConditionHandler::prev_abort_behavior; int FatalConditionHandler::prev_report_mode; _HFILE FatalConditionHandler::prev_report_file; - void (*FatalConditionHandler::prev_sigabrt_handler)(int); + void (DOCTEST_CDECL *FatalConditionHandler::prev_sigabrt_handler)(int); std::terminate_handler FatalConditionHandler::original_terminate_handler; bool FatalConditionHandler::isSet = false; ULONG FatalConditionHandler::guaranteeSize = 0; @@ -4498,7 +4692,7 @@ namespace detail { } if(m_exception.size()) - m_exception = String("\"") + m_exception + "\""; + m_exception = "\"" + m_exception + "\""; if(is_running_in_test) { addAssert(m_at); @@ -4526,7 +4720,7 @@ namespace detail { std::abort(); } - void decomp_assert(assertType::Enum at, const char* file, int line, const char* expr, + bool decomp_assert(assertType::Enum at, const char* file, int line, const char* expr, Result result) { bool failed = !result.m_passed; @@ -4537,20 +4731,30 @@ namespace detail { DOCTEST_ASSERT_OUT_OF_TESTS(result.m_decomp); DOCTEST_ASSERT_IN_TESTS(result.m_decomp); // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) + return !failed; } MessageBuilder::MessageBuilder(const char* file, int line, assertType::Enum severity) { - m_stream = getTlsOss(); + m_stream = tlssPush(); m_file = file; m_line = line; m_severity = severity; } + MessageBuilder::~MessageBuilder() { + if (!logged) + tlssPop(); + } + IExceptionTranslator::IExceptionTranslator() = default; IExceptionTranslator::~IExceptionTranslator() = default; bool MessageBuilder::log() { - m_string = getTlsOssResult(); + if (!logged) { + m_string = tlssPop(); + logged = true; + } + DOCTEST_ITERATE_THROUGH_REPORTERS(log_message, *this); const bool isWarn = m_severity & assertType::is_warn; @@ -4569,29 +4773,10 @@ namespace detail { if(m_severity & assertType::is_require) //!OCLINT bitwise operator in conditional throwException(); } - - MessageBuilder::~MessageBuilder() = default; } // namespace detail namespace { using namespace detail; - template <typename Ex> - DOCTEST_NORETURN void throw_exception(Ex const& e) { -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - throw e; -#else // DOCTEST_CONFIG_NO_EXCEPTIONS - std::cerr << "doctest will terminate because it needed to throw an exception.\n" - << "The message was: " << e.what() << '\n'; - std::terminate(); -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - } - -#ifndef DOCTEST_INTERNAL_ERROR -#define DOCTEST_INTERNAL_ERROR(msg) \ - throw_exception(std::logic_error( \ - __FILE__ ":" DOCTEST_TOSTR(__LINE__) ": Internal doctest error: " msg)) -#endif // DOCTEST_INTERNAL_ERROR - // clang-format off // ================================================================================================= @@ -5054,7 +5239,8 @@ namespace { xml.scopedElement("TestCase").writeAttribute("name", in.data[i]->m_name) .writeAttribute("testsuite", in.data[i]->m_test_suite) .writeAttribute("filename", skipPathFromFilename(in.data[i]->m_file.c_str())) - .writeAttribute("line", line(in.data[i]->m_line)); + .writeAttribute("line", line(in.data[i]->m_line)) + .writeAttribute("skipped", in.data[i]->m_skip); } xml.scopedElement("OverallResultsTestCases") .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); @@ -5124,7 +5310,8 @@ namespace { xml.startElement("OverallResultsAsserts") .writeAttribute("successes", st.numAssertsCurrentTest - st.numAssertsFailedCurrentTest) - .writeAttribute("failures", st.numAssertsFailedCurrentTest); + .writeAttribute("failures", st.numAssertsFailedCurrentTest) + .writeAttribute("test_case_success", st.testCaseSuccess); if(opt.duration) xml.writeAttribute("duration", st.seconds); if(tc->m_expected_failures) @@ -5143,8 +5330,6 @@ namespace { } void subcase_start(const SubcaseSignature& in) override { - std::lock_guard<std::mutex> lock(mutex); - xml.startElement("SubCase") .writeAttribute("name", in.m_name) .writeAttribute("filename", skipPathFromFilename(in.m_file)) @@ -5440,7 +5625,6 @@ namespace { } void subcase_start(const SubcaseSignature& in) override { - std::lock_guard<std::mutex> lock(mutex); deepestSubcaseStackNames.push_back(in.m_name); } @@ -5606,9 +5790,11 @@ namespace { } void printIntro() { - printVersion(); - s << Color::Cyan << "[doctest] " << Color::None - << "run with \"--" DOCTEST_OPTIONS_PREFIX_DISPLAY "help\" for options\n"; + if(opt.no_intro == false) { + printVersion(); + s << Color::Cyan << "[doctest] " << Color::None + << "run with \"--" DOCTEST_OPTIONS_PREFIX_DISPLAY "help\" for options\n"; + } } void printHelp() { @@ -5693,12 +5879,18 @@ namespace { << Whitespace(sizePrefixDisplay*1) << "exits after the tests finish\n"; s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "d, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "duration=<bool> " << Whitespace(sizePrefixDisplay*1) << "prints the time duration of each test\n"; + s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "m, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "minimal=<bool> " + << Whitespace(sizePrefixDisplay*1) << "minimal console output (only failures)\n"; + s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "q, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "quiet=<bool> " + << Whitespace(sizePrefixDisplay*1) << "no console output\n"; s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nt, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-throw=<bool> " << Whitespace(sizePrefixDisplay*1) << "skips exceptions-related assert checks\n"; s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ne, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-exitcode=<bool> " << Whitespace(sizePrefixDisplay*1) << "returns (or exits) always with success\n"; s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nr, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-run=<bool> " << Whitespace(sizePrefixDisplay*1) << "skips all runtime doctest operations\n"; + s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ni, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-intro=<bool> " + << Whitespace(sizePrefixDisplay*1) << "omit the framework intro in the output\n"; s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nv, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-version=<bool> " << Whitespace(sizePrefixDisplay*1) << "omit the framework version in the output\n"; s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-colors=<bool> " @@ -5736,22 +5928,6 @@ namespace { printReporters(getReporters(), "reporters"); } - void list_query_results() { - separator_to_stream(); - if(opt.count || opt.list_test_cases) { - s << Color::Cyan << "[doctest] " << Color::None - << "unskipped test cases passing the current filters: " - << g_cs->numTestCasesPassingFilters << "\n"; - } else if(opt.list_test_suites) { - s << Color::Cyan << "[doctest] " << Color::None - << "unskipped test cases passing the current filters: " - << g_cs->numTestCasesPassingFilters << "\n"; - s << Color::Cyan << "[doctest] " << Color::None - << "test suites with unskipped test cases passing the current filters: " - << g_cs->numTestSuitesPassingFilters << "\n"; - } - } - // ========================================================================================= // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE // ========================================================================================= @@ -5797,9 +5973,15 @@ namespace { } } - void test_run_start() override { printIntro(); } + void test_run_start() override { + if(!opt.minimal) + printIntro(); + } void test_run_end(const TestRunStats& p) override { + if(opt.minimal && p.numTestCasesFailed == 0) + return; + separator_to_stream(); s << std::dec; @@ -5880,6 +6062,7 @@ namespace { } void test_case_exception(const TestCaseException& e) override { + std::lock_guard<std::mutex> lock(mutex); if(tc->m_no_output) return; @@ -5904,14 +6087,12 @@ namespace { } void subcase_start(const SubcaseSignature& subc) override { - std::lock_guard<std::mutex> lock(mutex); subcasesStack.push_back(subc); ++currentSubcaseLevel; hasLoggedCurrentTestStart = false; } void subcase_end() override { - std::lock_guard<std::mutex> lock(mutex); --currentSubcaseLevel; hasLoggedCurrentTestStart = false; } @@ -6047,18 +6228,42 @@ namespace { std::vector<String>& res) { String filtersString; if(parseOption(argc, argv, pattern, &filtersString)) { - // tokenize with "," as a separator - // cppcheck-suppress strtokCalled - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") - auto pch = std::strtok(filtersString.c_str(), ","); // modifies the string - while(pch != nullptr) { - if(strlen(pch)) - res.push_back(pch); - // uses the strtok() internal state to go to the next token - // cppcheck-suppress strtokCalled - pch = std::strtok(nullptr, ","); + // tokenize with "," as a separator, unless escaped with backslash + std::ostringstream s; + auto flush = [&s, &res]() { + auto string = s.str(); + if(string.size() > 0) { + res.push_back(string.c_str()); + } + s.str(""); + }; + + bool seenBackslash = false; + const char* current = filtersString.c_str(); + const char* end = current + strlen(current); + while(current != end) { + char character = *current++; + if(seenBackslash) { + seenBackslash = false; + if(character == ',') { + s.put(','); + continue; + } + s.put('\\'); + } + if(character == '\\') { + seenBackslash = true; + } else if(character == ',') { + flush(); + } else { + s.put(character); + } + } + + if(seenBackslash) { + s.put('\\'); } - DOCTEST_CLANG_SUPPRESS_WARNING_POP + flush(); return true; } return false; @@ -6191,9 +6396,12 @@ void Context::parseArgs(int argc, const char* const* argv, bool withDefaults) { DOCTEST_PARSE_AS_BOOL_OR_FLAG("case-sensitive", "cs", case_sensitive, false); DOCTEST_PARSE_AS_BOOL_OR_FLAG("exit", "e", exit, false); DOCTEST_PARSE_AS_BOOL_OR_FLAG("duration", "d", duration, false); + DOCTEST_PARSE_AS_BOOL_OR_FLAG("minimal", "m", minimal, false); + DOCTEST_PARSE_AS_BOOL_OR_FLAG("quiet", "q", quiet, false); DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-throw", "nt", no_throw, false); DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-exitcode", "ne", no_exitcode, false); DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-run", "nr", no_run, false); + DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-intro", "ni", no_intro, false); DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-version", "nv", no_version, false); DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-colors", "nc", no_colors, false); DOCTEST_PARSE_AS_BOOL_OR_FLAG("force-colors", "fc", force_colors, false); @@ -6257,7 +6465,12 @@ void Context::clearFilters() { curr.clear(); } -// allows the user to override procedurally the int/bool options from the command line +// allows the user to override procedurally the bool options from the command line +void Context::setOption(const char* option, bool value) { + setOption(option, value ? "true" : "false"); +} + +// allows the user to override procedurally the int options from the command line void Context::setOption(const char* option, int value) { setOption(option, toString(value).c_str()); // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) @@ -6277,6 +6490,31 @@ void Context::setAsDefaultForAssertsOutOfTestCases() { g_cs = p; } void Context::setAssertHandler(detail::assert_handler ah) { p->ah = ah; } +void Context::setCout(std::ostream* out) { p->cout = out; } + +static class DiscardOStream : public std::ostream +{ +private: + class : public std::streambuf + { + private: + // allowing some buffering decreases the amount of calls to overflow + char buf[1024]; + + protected: + std::streamsize xsputn(const char_type*, std::streamsize count) override { return count; } + + int_type overflow(int_type ch) override { + setp(std::begin(buf), std::end(buf)); + return traits_type::not_eof(ch); + } + } discardBuf; + +public: + DiscardOStream() + : std::ostream(&discardBuf) {} +} discardOut; + // the main function that does all the filtering and test running int Context::run() { using namespace detail; @@ -6290,15 +6528,18 @@ int Context::run() { g_no_colors = p->no_colors; p->resetRunData(); - // stdout by default - p->cout = &std::cout; - p->cerr = &std::cerr; - - // or to a file if specified std::fstream fstr; - if(p->out.size()) { - fstr.open(p->out.c_str(), std::fstream::out); - p->cout = &fstr; + if(p->cout == nullptr) { + if(p->quiet) { + p->cout = &discardOut; + } else if(p->out.size()) { + // to a file if specified + fstr.open(p->out.c_str(), std::fstream::out); + p->cout = &fstr; + } else { + // stdout by default + p->cout = &std::cout; + } } FatalConditionHandler::allocateAltStackMem(); @@ -6531,13 +6772,6 @@ DOCTEST_MSVC_SUPPRESS_WARNING_POP DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, qdata); } - // see these issues on the reasoning for this: - // - https://github.com/onqtam/doctest/issues/143#issuecomment-414418903 - // - https://github.com/onqtam/doctest/issues/126 - auto DOCTEST_FIX_FOR_MACOS_LIBCPP_IOSFWD_STRING_LINK_ERRORS = []() DOCTEST_NOINLINE - { std::cout << std::string(); }; - DOCTEST_FIX_FOR_MACOS_LIBCPP_IOSFWD_STRING_LINK_ERRORS(); - return cleanup_and_return(); } @@ -6576,5 +6810,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP DOCTEST_MSVC_SUPPRESS_WARNING_POP DOCTEST_GCC_SUPPRESS_WARNING_POP +DOCTEST_SUPPRESS_COMMON_WARNINGS_POP + #endif // DOCTEST_LIBRARY_IMPLEMENTATION #endif // DOCTEST_CONFIG_IMPLEMENT diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp index 93d3b3bbff..d2fcc4642e 100644 --- a/thirdparty/enet/godot.cpp +++ b/thirdparty/enet/godot.cpp @@ -259,7 +259,7 @@ public: class ENetDTLSServer : public ENetGodotSocket { Ref<DTLSServer> server; Ref<UDPServer> udp_server; - Map<String, Ref<PacketPeerDTLS>> peers; + HashMap<String, Ref<PacketPeerDTLS>> peers; int last_service = 0; IPAddress local_address; @@ -331,15 +331,16 @@ public: List<String> remove; Error err = ERR_BUSY; // TODO this needs to be fair! - for (Map<String, Ref<PacketPeerDTLS>>::Element *E = peers.front(); E; E = E->next()) { - Ref<PacketPeerDTLS> peer = E->get(); + + for (KeyValue<String, Ref<PacketPeerDTLS>> & E : peers) { + Ref<PacketPeerDTLS> peer = E.value; peer->poll(); if (peer->get_status() == PacketPeerDTLS::STATUS_HANDSHAKING) { continue; } else if (peer->get_status() != PacketPeerDTLS::STATUS_CONNECTED) { // Peer disconnected, removing it. - remove.push_back(E->key()); + remove.push_back(E.key); continue; } @@ -348,12 +349,12 @@ public: err = peer->get_packet(&buffer, r_read); if (err != OK || p_len < r_read) { // Something wrong with this peer, removing it. - remove.push_back(E->key()); + remove.push_back(E.key); err = FAILED; continue; } - Vector<String> s = E->key().rsplit(":", false, 1); + Vector<String> s = E.key.rsplit(":", false, 1); ERR_CONTINUE(s.size() != 2); // BUG! memcpy(p_buffer, buffer, r_read); @@ -376,8 +377,8 @@ public: } void close() { - for (Map<String, Ref<PacketPeerDTLS>>::Element *E = peers.front(); E; E = E->next()) { - E->get()->disconnect_from_peer(); + for (KeyValue<String, Ref<PacketPeerDTLS>> &E : peers) { + E.value->disconnect_from_peer(); } peers.clear(); udp_server->stop(); diff --git a/thirdparty/freetype/include/freetype/config/ftconfig.h b/thirdparty/freetype/include/freetype/config/ftconfig.h index 65effcbe63..c696e900a6 100644 --- a/thirdparty/freetype/include/freetype/config/ftconfig.h +++ b/thirdparty/freetype/include/freetype/config/ftconfig.h @@ -4,7 +4,7 @@ * * ANSI-specific configuration file (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/config/ftheader.h b/thirdparty/freetype/include/freetype/config/ftheader.h index e46d314e33..a8c6833df7 100644 --- a/thirdparty/freetype/include/freetype/config/ftheader.h +++ b/thirdparty/freetype/include/freetype/config/ftheader.h @@ -4,7 +4,7 @@ * * Build macros of the FreeType 2 library. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -777,6 +777,18 @@ #define FT_COLOR_H <freetype/ftcolor.h> + /************************************************************************** + * + * @macro: + * FT_OTSVG_H + * + * @description: + * A macro used in `#include` statements to name the file containing the + * FreeType~2 API which handles the OpenType 'SVG~' glyphs. + */ +#define FT_OTSVG_H <freetype/otsvg.h> + + /* */ /* These header files don't need to be included by the user. */ diff --git a/thirdparty/freetype/include/freetype/config/ftmodule.h b/thirdparty/freetype/include/freetype/config/ftmodule.h index d4ba3f784d..b315baba8a 100644 --- a/thirdparty/freetype/include/freetype/config/ftmodule.h +++ b/thirdparty/freetype/include/freetype/config/ftmodule.h @@ -28,5 +28,6 @@ FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class ) FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_svg_renderer_class ) /* EOF */ diff --git a/thirdparty/freetype/include/freetype/config/ftoption.h b/thirdparty/freetype/include/freetype/config/ftoption.h index 4227fd376e..c5bde243b1 100644 --- a/thirdparty/freetype/include/freetype/config/ftoption.h +++ b/thirdparty/freetype/include/freetype/config/ftoption.h @@ -4,7 +4,7 @@ * * User-selectable configuration macros (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -219,6 +219,10 @@ FT_BEGIN_HEADER * If you use a build system like cmake or the `configure` script, * options set by those programs have precedence, overwriting the value * here with the configured one. + * + * If you use the GNU make build system directly (that is, without the + * `configure` script) and you define this macro, you also have to pass + * `SYSTEM_ZLIB=yes` as an argument to make. */ /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ @@ -525,6 +529,20 @@ FT_BEGIN_HEADER /************************************************************************** * + * OpenType SVG Glyph Support + * + * Setting this macro enables support for OpenType SVG glyphs. By + * default, FreeType can only fetch SVG documents. However, it can also + * render them if external rendering hook functions are plugged in at + * runtime. + * + * More details on the hooks can be found in file `otsvg.h`. + */ +#define FT_CONFIG_OPTION_SVG + + + /************************************************************************** + * * Error Strings * * If this macro is set, `FT_Error_String` will return meaningful @@ -1002,8 +1020,8 @@ FT_BEGIN_HEADER #error "Invalid CFF darkening parameters!" #endif -FT_END_HEADER +FT_END_HEADER #endif /* FTOPTION_H_ */ diff --git a/thirdparty/freetype/include/freetype/config/ftstdlib.h b/thirdparty/freetype/include/freetype/config/ftstdlib.h index 6ee412a074..7958c2a5f7 100644 --- a/thirdparty/freetype/include/freetype/config/ftstdlib.h +++ b/thirdparty/freetype/include/freetype/config/ftstdlib.h @@ -5,7 +5,7 @@ * ANSI-specific library and header configuration file (specification * only). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/config/integer-types.h b/thirdparty/freetype/include/freetype/config/integer-types.h index 5ef09f1978..d9d2638d1e 100644 --- a/thirdparty/freetype/include/freetype/config/integer-types.h +++ b/thirdparty/freetype/include/freetype/config/integer-types.h @@ -4,7 +4,7 @@ * * FreeType integer types definitions. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -221,9 +221,10 @@ #define FT_INT64 __int64 #define FT_UINT64 unsigned __int64 -#elif defined( __WATCOMC__ ) /* Watcom C++ */ +#elif defined( __WATCOMC__ ) && __WATCOMC__ >= 1100 /* Watcom C++ */ - /* Watcom doesn't provide 64-bit data types */ +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ diff --git a/thirdparty/freetype/include/freetype/config/mac-support.h b/thirdparty/freetype/include/freetype/config/mac-support.h index ef58d8b3f0..e42c9fe410 100644 --- a/thirdparty/freetype/include/freetype/config/mac-support.h +++ b/thirdparty/freetype/include/freetype/config/mac-support.h @@ -4,7 +4,7 @@ * * Mac/OS X support configuration header. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/config/public-macros.h b/thirdparty/freetype/include/freetype/config/public-macros.h index 9fbb3274a0..0074134f1d 100644 --- a/thirdparty/freetype/include/freetype/config/public-macros.h +++ b/thirdparty/freetype/include/freetype/config/public-macros.h @@ -4,7 +4,7 @@ * * Define a set of compiler macros used in public FreeType headers. * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/freetype.h b/thirdparty/freetype/include/freetype/freetype.h index f6c66b94ae..aa1a4fe389 100644 --- a/thirdparty/freetype/include/freetype/freetype.h +++ b/thirdparty/freetype/include/freetype/freetype.h @@ -4,7 +4,7 @@ * * FreeType high-level API and common types (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -153,6 +153,9 @@ FT_BEGIN_HEADER * FT_FACE_FLAG_GLYPH_NAMES * FT_FACE_FLAG_EXTERNAL_STREAM * FT_FACE_FLAG_HINTER + * FT_FACE_FLAG_SVG + * FT_FACE_FLAG_SBIX + * FT_FACE_FLAG_SBIX_OVERLAY * * FT_HAS_HORIZONTAL * FT_HAS_VERTICAL @@ -161,6 +164,9 @@ FT_BEGIN_HEADER * FT_HAS_GLYPH_NAMES * FT_HAS_COLOR * FT_HAS_MULTIPLE_MASTERS + * FT_HAS_SVG + * FT_HAS_SBIX + * FT_HAS_SBIX_OVERLAY * * FT_IS_SFNT * FT_IS_SCALABLE @@ -225,6 +231,7 @@ FT_BEGIN_HEADER * FT_LOAD_NO_SCALE * FT_LOAD_NO_HINTING * FT_LOAD_NO_BITMAP + * FT_LOAD_SBITS_ONLY * FT_LOAD_NO_AUTOHINT * FT_LOAD_COLOR * @@ -522,13 +529,15 @@ FT_BEGIN_HEADER * size. * * @note: - * An @FT_Face has one _active_ @FT_Size object that is used by functions - * like @FT_Load_Glyph to determine the scaling transformation that in - * turn is used to load and hint glyphs and metrics. + * An @FT_Face has one _active_ `FT_Size` object that is used by + * functions like @FT_Load_Glyph to determine the scaling transformation + * that in turn is used to load and hint glyphs and metrics. * - * You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, @FT_Request_Size + * A newly created `FT_Size` object contains only meaningless zero values. + * You must use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, @FT_Request_Size * or even @FT_Select_Size to change the content (i.e., the scaling - * values) of the active @FT_Size. + * values) of the active `FT_Size`. Otherwise, the scaling and hinting + * will not be performed. * * You can use @FT_New_Size to create additional size objects for a given * @FT_Face, but they won't be used by other functions until you activate @@ -1228,6 +1237,19 @@ FT_BEGIN_HEADER * altered with @FT_Set_MM_Design_Coordinates, * @FT_Set_Var_Design_Coordinates, or @FT_Set_Var_Blend_Coordinates. * This flag is unset by a call to @FT_Set_Named_Instance. + * + * FT_FACE_FLAG_SVG :: + * [Since 2.12] The face has an 'SVG~' OpenType table. + * + * FT_FACE_FLAG_SBIX :: + * [Since 2.12] The face has an 'sbix' OpenType table *and* outlines. + * For such fonts, @FT_FACE_FLAG_SCALABLE is not set by default to + * retain backward compatibility. + * + * FT_FACE_FLAG_SBIX_OVERLAY :: + * [Since 2.12] The face has an 'sbix' OpenType table where outlines + * should be drawn on top of bitmap strikes. + * */ #define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) @@ -1245,6 +1267,9 @@ FT_BEGIN_HEADER #define FT_FACE_FLAG_TRICKY ( 1L << 13 ) #define FT_FACE_FLAG_COLOR ( 1L << 14 ) #define FT_FACE_FLAG_VARIATION ( 1L << 15 ) +#define FT_FACE_FLAG_SVG ( 1L << 16 ) +#define FT_FACE_FLAG_SBIX ( 1L << 17 ) +#define FT_FACE_FLAG_SBIX_OVERLAY ( 1L << 18 ) /************************************************************************** @@ -1487,6 +1512,124 @@ FT_BEGIN_HEADER /************************************************************************** * + * @macro: + * FT_HAS_SVG + * + * @description: + * A macro that returns true whenever a face object contains an 'SVG~' + * OpenType table. + * + * @since: + * 2.12 + */ +#define FT_HAS_SVG( face ) \ + ( !!( (face)->face_flags & FT_FACE_FLAG_SVG ) ) + + + /************************************************************************** + * + * @macro: + * FT_HAS_SBIX + * + * @description: + * A macro that returns true whenever a face object contains an 'sbix' + * OpenType table *and* outline glyphs. + * + * Currently, FreeType only supports bitmap glyphs in PNG format for this + * table (i.e., JPEG and TIFF formats are unsupported, as are + * Apple-specific formats not part of the OpenType specification). + * + * @note: + * For backward compatibility, a font with an 'sbix' table is treated as + * a bitmap-only face. Using @FT_Open_Face with + * @FT_PARAM_TAG_IGNORE_SBIX, an application can switch off 'sbix' + * handling so that the face is treated as an ordinary outline font with + * scalable outlines. + * + * Here is some pseudo code that roughly illustrates how to implement + * 'sbix' handling according to the OpenType specification. + * + * ``` + * if ( FT_HAS_SBIX( face ) ) + * { + * // open font as a scalable one without sbix handling + * FT_Face face2; + * FT_Parameter param = { FT_PARAM_TAG_IGNORE_SBIX, NULL }; + * FT_Open_Args args = { FT_OPEN_PARAMS | ..., + * ..., + * 1, ¶m }; + * + * + * FT_Open_Face( library, &args, 0, &face2 ); + * + * <sort `face->available_size` as necessary into + * `preferred_sizes`[*]> + * + * for ( i = 0; i < face->num_fixed_sizes; i++ ) + * { + * size = preferred_sizes[i].size; + * + * error = FT_Set_Pixel_Sizes( face, size, size ); + * <error handling omitted> + * + * // check whether we have a glyph in a bitmap strike + * error = FT_Load_Glyph( face, + * glyph_index, + * FT_LOAD_SBITS_ONLY | + * FT_LOAD_BITMAP_METRICS_ONLY ); + * if ( error == FT_Err_Invalid_Argument ) + * continue; + * else if ( error ) + * <other error handling omitted> + * else + * break; + * } + * + * if ( i != face->num_fixed_sizes ) + * <load embedded bitmap with `FT_Load_Glyph`, + * scale it, display it, etc.> + * + * if ( i == face->num_fixed_sizes || + * FT_HAS_SBIX_OVERLAY( face ) ) + * <use `face2` to load outline glyph with `FT_Load_Glyph`, + * scale it, display it on top of the bitmap, etc.> + * } + * ``` + * + * [*] Assuming a target value of 400dpi and available strike sizes 100, + * 200, 300, and 400dpi, a possible order might be [400, 200, 300, 100]: + * scaling 200dpi to 400dpi usually gives better results than scaling + * 300dpi to 400dpi; it is also much faster. However, scaling 100dpi to + * 400dpi can yield a too pixelated result, thus the preference might be + * 300dpi over 100dpi. + * + * @since: + * 2.12 + */ +#define FT_HAS_SBIX( face ) \ + ( !!( (face)->face_flags & FT_FACE_FLAG_SBIX ) ) + + + /************************************************************************** + * + * @macro: + * FT_HAS_SBIX_OVERLAY + * + * @description: + * A macro that returns true whenever a face object contains an 'sbix' + * OpenType table with bit~1 in its `flags` field set, instructing the + * application to overlay the bitmap strike with the corresponding + * outline glyph. See @FT_HAS_SBIX for pseudo code how to use it. + * + * @since: + * 2.12 + */ +#define FT_HAS_SBIX_OVERLAY( face ) \ + ( !!( (face)->face_flags & FT_FACE_FLAG_SBIX_OVERLAY ) ) + + + /************************************************************************** + * * @enum: * FT_STYLE_FLAG_XXX * @@ -2702,8 +2845,8 @@ FT_BEGIN_HEADER * 'https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'. * * Contrary to @FT_Set_Char_Size, this function doesn't have special code - * to normalize zero-valued widths, heights, or resolutions (which lead - * to errors in most cases). + * to normalize zero-valued widths, heights, or resolutions, which are + * treated as @FT_LOAD_NO_SCALE. * * Don't use this function if you are using the FreeType cache API. */ @@ -2819,7 +2962,7 @@ FT_BEGIN_HEADER * * load_flags :: * A flag indicating what to load for this glyph. The @FT_LOAD_XXX - * constants can be used to control the glyph loading process (e.g., + * flags can be used to control the glyph loading process (e.g., * whether the outline should be scaled, whether to load bitmaps or * not, whether to hint the outline, etc). * @@ -2827,8 +2970,10 @@ FT_BEGIN_HEADER * FreeType error code. 0~means success. * * @note: - * The loaded glyph may be transformed. See @FT_Set_Transform for the - * details. + * For proper scaling and hinting, the active @FT_Size object owned by + * the face has to be meaningfully initialized by calling + * @FT_Set_Char_Size before this function, for example. The loaded + * glyph may be transformed. See @FT_Set_Transform for the details. * * For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument` is returned * for invalid CID values (this is, for CID values that don't have a @@ -2918,6 +3063,8 @@ FT_BEGIN_HEADER * * FT_LOAD_NO_SCALE :: * Don't scale the loaded outline glyph but keep it in font units. + * This flag is also assumed if @FT_Size owned by the face was not + * properly initialized. * * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and * unsets @FT_LOAD_RENDER. @@ -2948,6 +3095,15 @@ FT_BEGIN_HEADER * * @FT_LOAD_NO_SCALE always sets this flag. * + * FT_LOAD_SBITS_ONLY :: + * [Since 2.12] This is the opposite of @FT_LOAD_NO_BITMAP, more or + * less: @FT_Load_Glyph returns `FT_Err_Invalid_Argument` if the face + * contains a bitmap strike for the given size (or the strike selected + * by @FT_Select_Size) but there is no glyph in the strike. + * + * Note that this load flag was part of FreeType since version 2.0.6 + * but previously tagged as internal. + * * FT_LOAD_VERTICAL_LAYOUT :: * Load the glyph for vertical text layout. In particular, the * `advance` value in the @FT_GlyphSlotRec structure is set to the @@ -3004,21 +3160,31 @@ FT_BEGIN_HEADER * Disable the auto-hinter. See also the note below. * * FT_LOAD_COLOR :: - * Load colored glyphs. There are slight differences depending on the - * font format. - * - * [Since 2.5] Load embedded color bitmap images. The resulting color - * bitmaps, if available, will have the @FT_PIXEL_MODE_BGRA format, - * with pre-multiplied color channels. If the flag is not set and - * color bitmaps are found, they are converted to 256-level gray - * bitmaps, using the @FT_PIXEL_MODE_GRAY format. - * - * [Since 2.10, experimental] If the glyph index contains an entry in + * Load colored glyphs. FreeType searches in the following order; + * there are slight differences depending on the font format. + * + * [Since 2.5] Load embedded color bitmap images (provided + * @FT_LOAD_NO_BITMAP is not set). The resulting color bitmaps, if + * available, have the @FT_PIXEL_MODE_BGRA format, with pre-multiplied + * color channels. If the flag is not set and color bitmaps are found, + * they are converted to 256-level gray bitmaps, using the + * @FT_PIXEL_MODE_GRAY format. + * + * [Since 2.12] If the glyph index maps to an entry in the face's + * 'SVG~' table, load the associated SVG document from this table and + * set the `format` field of @FT_GlyphSlotRec to @FT_GLYPH_FORMAT_SVG. + * Note that FreeType itself can't render SVG documents; however, the + * library provides hooks to seamlessly integrate an external renderer. + * See sections @ot_svg_driver and @svg_fonts for more. + * + * [Since 2.10, experimental] If the glyph index maps to an entry in * the face's 'COLR' table with a 'CPAL' palette table (as defined in * the OpenType specification), make @FT_Render_Glyph provide a default * blending of the color glyph layers associated with the glyph index, * using the same bitmap format as embedded color bitmap images. This - * is mainly for convenience; for full control of color layers use + * is mainly for convenience and works only for glyphs in 'COLR' v0 + * tables (or glyphs in 'COLR' v1 tables that exclusively use v0 + * features). For full control of color layers use * @FT_Get_Color_Glyph_Layer and FreeType's color functions like * @FT_Palette_Select instead of setting @FT_LOAD_COLOR for rendering * so that the client application can handle blending by itself. @@ -3069,19 +3235,20 @@ FT_BEGIN_HEADER * */ #define FT_LOAD_DEFAULT 0x0 -#define FT_LOAD_NO_SCALE ( 1L << 0 ) -#define FT_LOAD_NO_HINTING ( 1L << 1 ) -#define FT_LOAD_RENDER ( 1L << 2 ) -#define FT_LOAD_NO_BITMAP ( 1L << 3 ) -#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 ) -#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 ) -#define FT_LOAD_CROP_BITMAP ( 1L << 6 ) -#define FT_LOAD_PEDANTIC ( 1L << 7 ) -#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 ) +#define FT_LOAD_NO_SCALE ( 1L << 0 ) +#define FT_LOAD_NO_HINTING ( 1L << 1 ) +#define FT_LOAD_RENDER ( 1L << 2 ) +#define FT_LOAD_NO_BITMAP ( 1L << 3 ) +#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 ) +#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 ) +#define FT_LOAD_CROP_BITMAP ( 1L << 6 ) +#define FT_LOAD_PEDANTIC ( 1L << 7 ) +#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 ) #define FT_LOAD_NO_RECURSE ( 1L << 10 ) #define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 ) #define FT_LOAD_MONOCHROME ( 1L << 12 ) #define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) +#define FT_LOAD_SBITS_ONLY ( 1L << 14 ) #define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) /* Bits 16-19 are used by `FT_LOAD_TARGET_` */ #define FT_LOAD_COLOR ( 1L << 20 ) @@ -3091,8 +3258,8 @@ FT_BEGIN_HEADER /* */ /* used internally only by certain font drivers */ -#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) -#define FT_LOAD_SBITS_ONLY ( 1L << 14 ) +#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) +#define FT_LOAD_SVG_ONLY ( 1L << 23 ) /************************************************************************** @@ -3370,6 +3537,44 @@ FT_BEGIN_HEADER * } * * ``` + * + * FreeType has two rasterizers for generating SDF, namely: + * + * 1. `sdf` for generating SDF directly from glyph's outline, and + * + * 2. `bsdf` for generating SDF from rasterized bitmaps. + * + * Depending on the glyph type (i.e., outline or bitmap), one of the two + * rasterizers is chosen at runtime and used for generating SDFs. To + * force the use of `bsdf` you should render the glyph with any of the + * FreeType's other rendering modes (e.g., `FT_RENDER_MODE_NORMAL`) and + * then re-render with `FT_RENDER_MODE_SDF`. + * + * There are some issues with stability and possible failures of the SDF + * renderers (specifically `sdf`). + * + * 1. The `sdf` rasterizer is sensitive to really small features (e.g., + * sharp turns that are less than 1~pixel) and imperfections in the + * glyph's outline, causing artifacts in the final output. + * + * 2. The `sdf` rasterizer has limited support for handling intersecting + * contours and *cannot* handle self-intersecting contours whatsoever. + * Self-intersection happens when a single connected contour intersect + * itself at some point; having these in your font definitely pose a + * problem to the rasterizer and cause artifacts, too. + * + * 3. Generating SDF for really small glyphs may result in undesirable + * output; the pixel grid (which stores distance information) becomes + * too coarse. + * + * 4. Since the output buffer is normalized, precision at smaller spreads + * is greater than precision at larger spread values because the + * output range of [0..255] gets mapped to a smaller SDF range. A + * spread of~2 should be sufficient in most cases. + * + * Points (1) and (2) can be avoided by using the `bsdf` rasterizer, + * which is more stable than the `sdf` rasterizer in general. + * */ typedef enum FT_Render_Mode_ { @@ -3410,7 +3615,7 @@ FT_BEGIN_HEADER * @FT_Render_Mode for a list of possible values. * * If @FT_RENDER_MODE_NORMAL is used, a previous call of @FT_Load_Glyph - * with flag @FT_LOAD_COLOR makes FT_Render_Glyph provide a default + * with flag @FT_LOAD_COLOR makes `FT_Render_Glyph` provide a default * blending of colored glyph layers associated with the current glyph * slot (provided the font contains such layers) instead of rendering * the glyph slot's outline. This is an experimental feature; see @@ -3420,9 +3625,6 @@ FT_BEGIN_HEADER * FreeType error code. 0~means success. * * @note: - * To get meaningful results, font scaling values must be set with - * functions like @FT_Set_Char_Size before calling `FT_Render_Glyph`. - * * When FreeType outputs a bitmap of a glyph, it really outputs an alpha * coverage map. If a pixel is completely covered by a filled-in * outline, the bitmap contains 0xFF at that pixel, meaning that @@ -4739,7 +4941,7 @@ FT_BEGIN_HEADER * */ #define FREETYPE_MAJOR 2 -#define FREETYPE_MINOR 11 +#define FREETYPE_MINOR 12 #define FREETYPE_PATCH 1 diff --git a/thirdparty/freetype/include/freetype/ftadvanc.h b/thirdparty/freetype/include/freetype/ftadvanc.h index 3a13bd3de4..8ce4846668 100644 --- a/thirdparty/freetype/include/freetype/ftadvanc.h +++ b/thirdparty/freetype/include/freetype/ftadvanc.h @@ -4,7 +4,7 @@ * * Quick computation of advance widths (specification only). * - * Copyright (C) 2008-2021 by + * Copyright (C) 2008-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftbbox.h b/thirdparty/freetype/include/freetype/ftbbox.h index 713aedb15f..768478f399 100644 --- a/thirdparty/freetype/include/freetype/ftbbox.h +++ b/thirdparty/freetype/include/freetype/ftbbox.h @@ -4,7 +4,7 @@ * * FreeType exact bbox computation (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftbdf.h b/thirdparty/freetype/include/freetype/ftbdf.h index c428506405..04d6094f75 100644 --- a/thirdparty/freetype/include/freetype/ftbdf.h +++ b/thirdparty/freetype/include/freetype/ftbdf.h @@ -4,7 +4,7 @@ * * FreeType API for accessing BDF-specific strings (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftbitmap.h b/thirdparty/freetype/include/freetype/ftbitmap.h index 11c45b0ed2..c3462dadc5 100644 --- a/thirdparty/freetype/include/freetype/ftbitmap.h +++ b/thirdparty/freetype/include/freetype/ftbitmap.h @@ -4,7 +4,7 @@ * * FreeType utility functions for bitmaps (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftbzip2.h b/thirdparty/freetype/include/freetype/ftbzip2.h index afd2a82afb..c85305806f 100644 --- a/thirdparty/freetype/include/freetype/ftbzip2.h +++ b/thirdparty/freetype/include/freetype/ftbzip2.h @@ -4,7 +4,7 @@ * * Bzip2-compressed stream support. * - * Copyright (C) 2010-2021 by + * Copyright (C) 2010-2022 by * Joel Klinghed. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftcache.h b/thirdparty/freetype/include/freetype/ftcache.h index 70399a328a..ecbbd7b8fb 100644 --- a/thirdparty/freetype/include/freetype/ftcache.h +++ b/thirdparty/freetype/include/freetype/ftcache.h @@ -4,7 +4,7 @@ * * FreeType Cache subsystem (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftchapters.h b/thirdparty/freetype/include/freetype/ftchapters.h index 4f32cc88c8..6a9733ad7c 100644 --- a/thirdparty/freetype/include/freetype/ftchapters.h +++ b/thirdparty/freetype/include/freetype/ftchapters.h @@ -62,6 +62,7 @@ * cid_fonts * pfr_fonts * winfnt_fonts + * svg_fonts * font_formats * gasp_table * @@ -82,6 +83,7 @@ * t1_cid_driver * tt_driver * pcf_driver + * ot_svg_driver * properties * parameter_tags * lcd_rendering diff --git a/thirdparty/freetype/include/freetype/ftcid.h b/thirdparty/freetype/include/freetype/ftcid.h index 9a415bd98b..d80108387a 100644 --- a/thirdparty/freetype/include/freetype/ftcid.h +++ b/thirdparty/freetype/include/freetype/ftcid.h @@ -4,7 +4,7 @@ * * FreeType API for accessing CID font information (specification). * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * Dereg Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftcolor.h b/thirdparty/freetype/include/freetype/ftcolor.h index 08dbac0ccc..3edaee4ec1 100644 --- a/thirdparty/freetype/include/freetype/ftcolor.h +++ b/thirdparty/freetype/include/freetype/ftcolor.h @@ -4,7 +4,7 @@ * * FreeType's glyph color management (specification). * - * Copyright (C) 2018-2021 by + * Copyright (C) 2018-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -528,14 +528,14 @@ FT_BEGIN_HEADER * @fields: * num_color_stops :: * The number of color stops for the requested glyph index. Set by - * @FT_Get_Colorline_Stops. + * @FT_Get_Paint. * * current_color_stop :: * The current color stop. Set by @FT_Get_Colorline_Stops. * * p :: - * An opaque pointer into 'COLR' table data. The caller must set this - * to `NULL` before the first call of @FT_Get_Colorline_Stops. + * An opaque pointer into 'COLR' table data. Set by @FT_Get_Paint. + * Updated by @FT_Get_Colorline_Stops. * * @since: * 2.11 -- **currently experimental only!** There might be changes diff --git a/thirdparty/freetype/include/freetype/ftdriver.h b/thirdparty/freetype/include/freetype/ftdriver.h index 4936639056..0dc91e8b40 100644 --- a/thirdparty/freetype/include/freetype/ftdriver.h +++ b/thirdparty/freetype/include/freetype/ftdriver.h @@ -4,7 +4,7 @@ * * FreeType API for controlling driver modules (specification only). * - * Copyright (C) 2017-2021 by + * Copyright (C) 2017-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -212,16 +212,14 @@ FT_BEGIN_HEADER * @description: * While FreeType's TrueType driver doesn't expose API functions by * itself, it is possible to control its behaviour with @FT_Property_Set - * and @FT_Property_Get. The following lists the available properties - * together with the necessary macros and structures. - * - * The TrueType driver's module name is 'truetype'. + * and @FT_Property_Get. * - * A single property @interpreter-version is available, as documented in - * the @properties section. + * The TrueType driver's module name is 'truetype'; a single property + * @interpreter-version is available, as documented in the @properties + * section. * - * We start with a list of definitions, kindly provided by Greg - * Hitchcock. + * To help understand the differences between interpreter versions, we + * introduce a list of definitions, kindly provided by Greg Hitchcock. * * _Bi-Level Rendering_ * @@ -303,6 +301,31 @@ FT_BEGIN_HEADER /************************************************************************** * * @section: + * ot_svg_driver + * + * @title: + * The SVG driver + * + * @abstract: + * Controlling the external rendering of OT-SVG glyphs. + * + * @description: + * By default, FreeType can only load the 'SVG~' table of OpenType fonts + * if configuration macro `FT_CONFIG_OPTION_SVG` is defined. To make it + * render SVG glyphs, an external SVG rendering library is needed. All + * details on the interface between FreeType and the external library + * via function hooks can be found in section @svg_fonts. + * + * The OT-SVG driver's module name is 'ot-svg'; it supports a single + * property called @svg-hooks, documented below in the @properties + * section. + * + */ + + + /************************************************************************** + * + * @section: * properties * * @title: @@ -801,6 +824,40 @@ FT_BEGIN_HEADER /************************************************************************** * * @property: + * svg-hooks + * + * @description: + * Set up the interface between FreeType and an extern SVG rendering + * library like 'librsvg'. All details on the function hooks can be + * found in section @svg_fonts. + * + * @example: + * The following example code expects that the four hook functions + * `svg_*` are defined elsewhere. Error handling is omitted, too. + * + * ``` + * FT_Library library; + * SVG_RendererHooks hooks = { + * (SVG_Lib_Init_Func)svg_init, + * (SVG_Lib_Free_Func)svg_free, + * (SVG_Lib_Render_Func)svg_render, + * (SVG_Lib_Preset_Slot_Func)svg_preset_slot }; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "ot-svg", + * "svg-hooks", &hooks ); + * ``` + * + * @since: + * 2.12 + */ + + + /************************************************************************** + * + * @property: * glyph-to-script-map * * @description: diff --git a/thirdparty/freetype/include/freetype/fterrdef.h b/thirdparty/freetype/include/freetype/fterrdef.h index 6e9c4ccb97..a3acfce430 100644 --- a/thirdparty/freetype/include/freetype/fterrdef.h +++ b/thirdparty/freetype/include/freetype/fterrdef.h @@ -4,7 +4,7 @@ * * FreeType error codes (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -101,6 +101,8 @@ "too many hints" ) FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, "invalid pixel size" ) + FT_ERRORDEF_( Invalid_SVG_Document, 0x18, + "invalid SVG document" ) /* handle errors */ @@ -234,6 +236,8 @@ "found FDEF or IDEF opcode in glyf bytecode" ) FT_ERRORDEF_( Missing_Bitmap, 0x9D, "missing bitmap in strike" ) + FT_ERRORDEF_( Missing_SVG_Hooks, 0x9E, + "SVG hooks have not been set" ) /* CFF, CID, and Type 1 errors */ diff --git a/thirdparty/freetype/include/freetype/fterrors.h b/thirdparty/freetype/include/freetype/fterrors.h index 151941dde0..ff1b375d7d 100644 --- a/thirdparty/freetype/include/freetype/fterrors.h +++ b/thirdparty/freetype/include/freetype/fterrors.h @@ -4,7 +4,7 @@ * * FreeType error code handling (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftfntfmt.h b/thirdparty/freetype/include/freetype/ftfntfmt.h index 8e68a4a3ac..77d553578b 100644 --- a/thirdparty/freetype/include/freetype/ftfntfmt.h +++ b/thirdparty/freetype/include/freetype/ftfntfmt.h @@ -4,7 +4,7 @@ * * Support functions for font formats. * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftgasp.h b/thirdparty/freetype/include/freetype/ftgasp.h index 76c45eb3b1..d4ab9b32db 100644 --- a/thirdparty/freetype/include/freetype/ftgasp.h +++ b/thirdparty/freetype/include/freetype/ftgasp.h @@ -4,7 +4,7 @@ * * Access of TrueType's 'gasp' table (specification). * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftglyph.h b/thirdparty/freetype/include/freetype/ftglyph.h index 26b32ed6be..6b77bd3d2a 100644 --- a/thirdparty/freetype/include/freetype/ftglyph.h +++ b/thirdparty/freetype/include/freetype/ftglyph.h @@ -4,7 +4,7 @@ * * FreeType convenience functions to handle glyphs (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -126,7 +126,7 @@ FT_BEGIN_HEADER * * @description: * A handle to an object used to model a bitmap glyph image. This is a - * sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. + * 'sub-class' of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */ typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; @@ -142,7 +142,7 @@ FT_BEGIN_HEADER * * @fields: * root :: - * The root @FT_Glyph fields. + * The root fields of @FT_Glyph. * * left :: * The left-side bearing, i.e., the horizontal distance from the @@ -181,7 +181,7 @@ FT_BEGIN_HEADER * * @description: * A handle to an object used to model an outline glyph image. This is a - * sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. + * 'sub-class' of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */ typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; @@ -224,6 +224,92 @@ FT_BEGIN_HEADER /************************************************************************** * + * @type: + * FT_SvgGlyph + * + * @description: + * A handle to an object used to model an SVG glyph. This is a + * 'sub-class' of @FT_Glyph, and a pointer to @FT_SvgGlyphRec. + * + * @since: + * 2.12 + */ + typedef struct FT_SvgGlyphRec_* FT_SvgGlyph; + + + /************************************************************************** + * + * @struct: + * FT_SvgGlyphRec + * + * @description: + * A structure used for OT-SVG glyphs. This is a 'sub-class' of + * @FT_GlyphRec. + * + * @fields: + * root :: + * The root @FT_GlyphRec fields. + * + * svg_document :: + * A pointer to the SVG document. + * + * svg_document_length :: + * The length of `svg_document`. + * + * glyph_index :: + * The index of the glyph to be rendered. + * + * metrics :: + * A metrics object storing the size information. + * + * units_per_EM :: + * The size of the EM square. + * + * start_glyph_id :: + * The first glyph ID in the glyph range covered by this document. + * + * end_glyph_id :: + * The last glyph ID in the glyph range covered by this document. + * + * transform :: + * A 2x2 transformation matrix to apply to the glyph while rendering + * it. + * + * delta :: + * Translation to apply to the glyph while rendering. + * + * @note: + * The Glyph Management API requires @FT_Glyph or its 'sub-class' to have + * all the information needed to completely define the glyph's rendering. + * Outline-based glyphs can directly apply transformations to the outline + * but this is not possible for an SVG document that hasn't been parsed. + * Therefore, the transformation is stored along with the document. In + * the absence of a 'ViewBox' or 'Width'/'Height' attribute, the size of + * the ViewPort should be assumed to be 'units_per_EM'. + */ + typedef struct FT_SvgGlyphRec_ + { + FT_GlyphRec root; + + FT_Byte* svg_document; + FT_ULong svg_document_length; + + FT_UInt glyph_index; + + FT_Size_Metrics metrics; + FT_UShort units_per_EM; + + FT_UShort start_glyph_id; + FT_UShort end_glyph_id; + + FT_Matrix transform; + FT_Vector delta; + + } FT_SvgGlyphRec; + + + /************************************************************************** + * * @function: * FT_New_Glyph * @@ -498,9 +584,9 @@ FT_BEGIN_HEADER * The glyph image is translated with the `origin` vector before * rendering. * - * The first parameter is a pointer to an @FT_Glyph handle, that will be + * The first parameter is a pointer to an @FT_Glyph handle that will be * _replaced_ by this function (with newly allocated data). Typically, - * you would use (omitting error handling): + * you would do something like the following (omitting error handling). * * ``` * FT_Glyph glyph; @@ -517,7 +603,7 @@ FT_BEGIN_HEADER * if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) * { * error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, - * 0, 1 ); + * 0, 1 ); * if ( error ) // `glyph' unchanged * ... * } @@ -532,7 +618,7 @@ FT_BEGIN_HEADER * FT_Done_Glyph( glyph ); * ``` * - * Here is another example, again without error handling: + * Here is another example, again without error handling. * * ``` * FT_Glyph glyphs[MAX_GLYPHS] diff --git a/thirdparty/freetype/include/freetype/ftgxval.h b/thirdparty/freetype/include/freetype/ftgxval.h index 21bbbde2ae..2d3f382acf 100644 --- a/thirdparty/freetype/include/freetype/ftgxval.h +++ b/thirdparty/freetype/include/freetype/ftgxval.h @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * Masatake YAMATO, Redhat K.K, * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/include/freetype/ftgzip.h b/thirdparty/freetype/include/freetype/ftgzip.h index ba82baba64..0880290f9e 100644 --- a/thirdparty/freetype/include/freetype/ftgzip.h +++ b/thirdparty/freetype/include/freetype/ftgzip.h @@ -4,7 +4,7 @@ * * Gzip-compressed stream support. * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftimage.h b/thirdparty/freetype/include/freetype/ftimage.h index 88533b8409..7f2d721cdc 100644 --- a/thirdparty/freetype/include/freetype/ftimage.h +++ b/thirdparty/freetype/include/freetype/ftimage.h @@ -5,7 +5,7 @@ * FreeType glyph image formats and default raster interface * (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -401,11 +401,11 @@ FT_BEGIN_HEADER * information. * * FT_OUTLINE_OVERLAP :: - * This flag indicates that this outline contains overlapping contrours - * and the anti-aliased renderer should perform oversampling to - * mitigate possible artifacts. This flag should _not_ be set for - * well designed glyphs without overlaps because it quadruples the - * rendering time. + * [Since 2.10.3] This flag indicates that this outline contains + * overlapping contours and the anti-aliased renderer should perform + * oversampling to mitigate possible artifacts. This flag should _not_ + * be set for well designed glyphs without overlaps because it quadruples + * the rendering time. * * FT_OUTLINE_HIGH_PRECISION :: * This flag indicates that the scan-line converter should try to @@ -741,6 +741,10 @@ FT_BEGIN_HEADER * contours. Some Type~1 fonts, like those in the Hershey family, * contain glyphs in this format. These are described as @FT_Outline, * but FreeType isn't currently capable of rendering them correctly. + * + * FT_GLYPH_FORMAT_SVG :: + * [Since 2.12] The glyph is represented by an SVG document in the + * 'SVG~' table. */ typedef enum FT_Glyph_Format_ { @@ -749,7 +753,8 @@ FT_BEGIN_HEADER FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ), FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ), - FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' ) + FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' ), + FT_IMAGE_TAG( FT_GLYPH_FORMAT_SVG, 'S', 'V', 'G', ' ' ) } FT_Glyph_Format; diff --git a/thirdparty/freetype/include/freetype/ftincrem.h b/thirdparty/freetype/include/freetype/ftincrem.h index 229b947bd8..3b3d93c2d3 100644 --- a/thirdparty/freetype/include/freetype/ftincrem.h +++ b/thirdparty/freetype/include/freetype/ftincrem.h @@ -4,7 +4,7 @@ * * FreeType incremental loading (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftlcdfil.h b/thirdparty/freetype/include/freetype/ftlcdfil.h index 18e2544175..c767c6cb48 100644 --- a/thirdparty/freetype/include/freetype/ftlcdfil.h +++ b/thirdparty/freetype/include/freetype/ftlcdfil.h @@ -5,7 +5,7 @@ * FreeType API for color filtering of subpixel bitmap glyphs * (specification). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftlist.h b/thirdparty/freetype/include/freetype/ftlist.h index 55f015977a..4dca2bf163 100644 --- a/thirdparty/freetype/include/freetype/ftlist.h +++ b/thirdparty/freetype/include/freetype/ftlist.h @@ -4,7 +4,7 @@ * * Generic list support for FreeType (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftlogging.h b/thirdparty/freetype/include/freetype/ftlogging.h index a558b85faf..7213dc30a8 100644 --- a/thirdparty/freetype/include/freetype/ftlogging.h +++ b/thirdparty/freetype/include/freetype/ftlogging.h @@ -4,7 +4,7 @@ * * Additional debugging APIs. * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftlzw.h b/thirdparty/freetype/include/freetype/ftlzw.h index fce1c9c4bb..3d7cfd52f7 100644 --- a/thirdparty/freetype/include/freetype/ftlzw.h +++ b/thirdparty/freetype/include/freetype/ftlzw.h @@ -4,7 +4,7 @@ * * LZW-compressed stream support. * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftmac.h b/thirdparty/freetype/include/freetype/ftmac.h index 607af9b589..3dd61d0fe1 100644 --- a/thirdparty/freetype/include/freetype/ftmac.h +++ b/thirdparty/freetype/include/freetype/ftmac.h @@ -4,7 +4,7 @@ * * Additional Mac-specific API. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftmm.h b/thirdparty/freetype/include/freetype/ftmm.h index 32579e997f..c74ce618cb 100644 --- a/thirdparty/freetype/include/freetype/ftmm.h +++ b/thirdparty/freetype/include/freetype/ftmm.h @@ -4,7 +4,7 @@ * * FreeType Multiple Master font interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -47,6 +47,9 @@ FT_BEGIN_HEADER * MM fonts, others will work with all three types. They are similar * enough that a consistent interface makes sense. * + * For Adobe MM fonts, macro @FT_IS_SFNT returns false. For GX and + * OpenType variation fonts, it returns true. + * */ diff --git a/thirdparty/freetype/include/freetype/ftmodapi.h b/thirdparty/freetype/include/freetype/ftmodapi.h index b77d356de9..b78db724c7 100644 --- a/thirdparty/freetype/include/freetype/ftmodapi.h +++ b/thirdparty/freetype/include/freetype/ftmodapi.h @@ -4,7 +4,7 @@ * * FreeType modules public interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftmoderr.h b/thirdparty/freetype/include/freetype/ftmoderr.h index b417cd5ab7..88d2917771 100644 --- a/thirdparty/freetype/include/freetype/ftmoderr.h +++ b/thirdparty/freetype/include/freetype/ftmoderr.h @@ -4,7 +4,7 @@ * * FreeType module error offsets (specification). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftotval.h b/thirdparty/freetype/include/freetype/ftotval.h index 00f9727859..172fcf2402 100644 --- a/thirdparty/freetype/include/freetype/ftotval.h +++ b/thirdparty/freetype/include/freetype/ftotval.h @@ -4,7 +4,7 @@ * * FreeType API for validating OpenType tables (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftoutln.h b/thirdparty/freetype/include/freetype/ftoutln.h index 6bb5f809a9..46ebf9371b 100644 --- a/thirdparty/freetype/include/freetype/ftoutln.h +++ b/thirdparty/freetype/include/freetype/ftoutln.h @@ -5,7 +5,7 @@ * Support for the FT_Outline type used to store glyph shapes of * most scalable font formats (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -109,11 +109,13 @@ FT_BEGIN_HEADER * FreeType error code. 0~means success. * * @note: - * A contour that contains a single point only is represented by a 'move - * to' operation followed by 'line to' to the same point. In most cases, - * it is best to filter this out before using the outline for stroking - * purposes (otherwise it would result in a visible dot when round caps - * are used). + * Degenerate contours, segments, and Bezier arcs may be reported. In + * most cases, it is best to filter these out before using the outline + * for stroking or other path modification purposes (which may cause + * degenerate segments to become non-degenrate and visible, like when + * stroke caps are used or the path is otherwise outset). Some glyph + * outlines may contain deliberate degenerate single points for mark + * attachement. * * Similarly, the function returns success for an empty outline also * (doing nothing, this is, not calling any emitter); if necessary, you diff --git a/thirdparty/freetype/include/freetype/ftparams.h b/thirdparty/freetype/include/freetype/ftparams.h index 04a3f44126..72080f396a 100644 --- a/thirdparty/freetype/include/freetype/ftparams.h +++ b/thirdparty/freetype/include/freetype/ftparams.h @@ -4,7 +4,7 @@ * * FreeType API for possible FT_Parameter tags (specification only). * - * Copyright (C) 2017-2021 by + * Copyright (C) 2017-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -115,6 +115,21 @@ FT_BEGIN_HEADER /************************************************************************** * * @enum: + * FT_PARAM_TAG_IGNORE_SBIX + * + * @description: + * A tag for @FT_Parameter to make @FT_Open_Face ignore an 'sbix' table + * while loading a font. Use this if @FT_FACE_FLAG_SBIX is set and you + * want to access the outline glyphs in the font. + * + */ +#define FT_PARAM_TAG_IGNORE_SBIX \ + FT_MAKE_TAG( 'i', 's', 'b', 'x' ) + + + /************************************************************************** + * + * @enum: * FT_PARAM_TAG_LCD_FILTER_WEIGHTS * * @description: diff --git a/thirdparty/freetype/include/freetype/ftpfr.h b/thirdparty/freetype/include/freetype/ftpfr.h index fbdb14c202..428e327061 100644 --- a/thirdparty/freetype/include/freetype/ftpfr.h +++ b/thirdparty/freetype/include/freetype/ftpfr.h @@ -4,7 +4,7 @@ * * FreeType API for accessing PFR-specific data (specification only). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftrender.h b/thirdparty/freetype/include/freetype/ftrender.h index 48d489d496..0fab3f8c2a 100644 --- a/thirdparty/freetype/include/freetype/ftrender.h +++ b/thirdparty/freetype/include/freetype/ftrender.h @@ -4,7 +4,7 @@ * * FreeType renderer modules public interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftsizes.h b/thirdparty/freetype/include/freetype/ftsizes.h index 22366393b8..e30938d862 100644 --- a/thirdparty/freetype/include/freetype/ftsizes.h +++ b/thirdparty/freetype/include/freetype/ftsizes.h @@ -4,7 +4,7 @@ * * FreeType size objects management (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftsnames.h b/thirdparty/freetype/include/freetype/ftsnames.h index c7f6581cb3..384096a585 100644 --- a/thirdparty/freetype/include/freetype/ftsnames.h +++ b/thirdparty/freetype/include/freetype/ftsnames.h @@ -7,7 +7,7 @@ * * This is _not_ used to retrieve glyph names! * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftstroke.h b/thirdparty/freetype/include/freetype/ftstroke.h index 88b2a8a4ed..12c006d3fb 100644 --- a/thirdparty/freetype/include/freetype/ftstroke.h +++ b/thirdparty/freetype/include/freetype/ftstroke.h @@ -4,7 +4,7 @@ * * FreeType path stroker (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftsynth.h b/thirdparty/freetype/include/freetype/ftsynth.h index 861dcb5ac5..afc40b1d84 100644 --- a/thirdparty/freetype/include/freetype/ftsynth.h +++ b/thirdparty/freetype/include/freetype/ftsynth.h @@ -5,7 +5,7 @@ * FreeType synthesizing code for emboldening and slanting * (specification). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftsystem.h b/thirdparty/freetype/include/freetype/ftsystem.h index e5abb85a85..5f8aec7b7c 100644 --- a/thirdparty/freetype/include/freetype/ftsystem.h +++ b/thirdparty/freetype/include/freetype/ftsystem.h @@ -4,7 +4,7 @@ * * FreeType low-level system interface definition (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/fttrigon.h b/thirdparty/freetype/include/freetype/fttrigon.h index dbe7b0d388..4e8d871dec 100644 --- a/thirdparty/freetype/include/freetype/fttrigon.h +++ b/thirdparty/freetype/include/freetype/fttrigon.h @@ -4,7 +4,7 @@ * * FreeType trigonometric functions (specification). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/fttypes.h b/thirdparty/freetype/include/freetype/fttypes.h index 699bd003c0..29f32fbb26 100644 --- a/thirdparty/freetype/include/freetype/fttypes.h +++ b/thirdparty/freetype/include/freetype/fttypes.h @@ -4,7 +4,7 @@ * * FreeType simple types definitions (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftwinfnt.h b/thirdparty/freetype/include/freetype/ftwinfnt.h index f30f447d84..294f85ae0d 100644 --- a/thirdparty/freetype/include/freetype/ftwinfnt.h +++ b/thirdparty/freetype/include/freetype/ftwinfnt.h @@ -4,7 +4,7 @@ * * FreeType API for accessing Windows fnt-specific data. * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/autohint.h b/thirdparty/freetype/include/freetype/internal/autohint.h index 01585f5edf..aedf48984d 100644 --- a/thirdparty/freetype/include/freetype/internal/autohint.h +++ b/thirdparty/freetype/include/freetype/internal/autohint.h @@ -4,7 +4,7 @@ * * High-level 'autohint' module-specific interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/cffotypes.h b/thirdparty/freetype/include/freetype/internal/cffotypes.h index a91dd556ca..700f586c41 100644 --- a/thirdparty/freetype/include/freetype/internal/cffotypes.h +++ b/thirdparty/freetype/include/freetype/internal/cffotypes.h @@ -4,7 +4,7 @@ * * Basic OpenType/CFF object type definitions (specification). * - * Copyright (C) 2017-2021 by + * Copyright (C) 2017-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/cfftypes.h b/thirdparty/freetype/include/freetype/internal/cfftypes.h index 99e8d41368..23d26c1b34 100644 --- a/thirdparty/freetype/include/freetype/internal/cfftypes.h +++ b/thirdparty/freetype/include/freetype/internal/cfftypes.h @@ -5,7 +5,7 @@ * Basic OpenType/CFF type definitions and interface (specification * only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/compiler-macros.h b/thirdparty/freetype/include/freetype/internal/compiler-macros.h index d8b61b3dc9..66fa13c3c5 100644 --- a/thirdparty/freetype/include/freetype/internal/compiler-macros.h +++ b/thirdparty/freetype/include/freetype/internal/compiler-macros.h @@ -4,7 +4,7 @@ * * Compiler-specific macro definitions used internally by FreeType. * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -299,10 +299,12 @@ FT_BEGIN_HEADER #define FT_CALLBACK_DEF( x ) static x #endif -#if defined( __i386__ ) +#if defined( __GNUC__ ) && defined( __i386__ ) #define FT_COMPARE_DEF( x ) FT_CALLBACK_DEF( x ) __attribute__(( cdecl )) -#elif defined( _M_IX86 ) +#elif defined( _MSC_VER ) && defined( _M_IX86 ) #define FT_COMPARE_DEF( x ) FT_CALLBACK_DEF( x ) __cdecl +#elif defined( __WATCOMC__ ) && __WATCOMC__ >= 1240 +#define FT_COMPARE_DEF( x ) FT_CALLBACK_DEF( x ) __watcall #else #define FT_COMPARE_DEF( x ) FT_CALLBACK_DEF( x ) #endif diff --git a/thirdparty/freetype/include/freetype/internal/ftcalc.h b/thirdparty/freetype/include/freetype/internal/ftcalc.h index f88e055318..e6a87db94e 100644 --- a/thirdparty/freetype/include/freetype/internal/ftcalc.h +++ b/thirdparty/freetype/include/freetype/internal/ftcalc.h @@ -4,7 +4,7 @@ * * Arithmetic computations (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -408,6 +408,19 @@ FT_BEGIN_HEADER #endif +#elif defined( __WATCOMC__ ) && defined( __386__ ) + + extern __inline FT_Int32 + FT_MSB_i386( FT_UInt32 x ); + +#pragma aux FT_MSB_i386 = \ + "bsr eax, eax" \ + parm [eax] nomemory \ + value [eax] \ + modify exact [eax] nomemory; + +#define FT_MSB( x ) FT_MSB_i386( x ) + #elif defined( __DECC ) || defined( __DECCXX ) #include <builtins.h> diff --git a/thirdparty/freetype/include/freetype/internal/ftdebug.h b/thirdparty/freetype/include/freetype/internal/ftdebug.h index 5e8d9294a2..f05b1395cb 100644 --- a/thirdparty/freetype/include/freetype/internal/ftdebug.h +++ b/thirdparty/freetype/include/freetype/internal/ftdebug.h @@ -4,7 +4,7 @@ * * Debugging and logging component (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftdrv.h b/thirdparty/freetype/include/freetype/internal/ftdrv.h index 0db323d5ab..9459a9a190 100644 --- a/thirdparty/freetype/include/freetype/internal/ftdrv.h +++ b/thirdparty/freetype/include/freetype/internal/ftdrv.h @@ -4,7 +4,7 @@ * * FreeType internal font driver interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftgloadr.h b/thirdparty/freetype/include/freetype/internal/ftgloadr.h index fea931c3aa..f73b6631c8 100644 --- a/thirdparty/freetype/include/freetype/internal/ftgloadr.h +++ b/thirdparty/freetype/include/freetype/internal/ftgloadr.h @@ -4,7 +4,7 @@ * * The FreeType glyph loader (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftmemory.h b/thirdparty/freetype/include/freetype/internal/ftmemory.h index e20d949696..10d753aa5e 100644 --- a/thirdparty/freetype/include/freetype/internal/ftmemory.h +++ b/thirdparty/freetype/include/freetype/internal/ftmemory.h @@ -4,7 +4,7 @@ * * The FreeType memory management macros (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftobjs.h b/thirdparty/freetype/include/freetype/internal/ftobjs.h index e52a26aa06..1c779ceaeb 100644 --- a/thirdparty/freetype/include/freetype/internal/ftobjs.h +++ b/thirdparty/freetype/include/freetype/internal/ftobjs.h @@ -4,7 +4,7 @@ * * The FreeType private base classes (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -418,7 +418,8 @@ FT_BEGIN_HEADER * initializing the glyph slot. */ -#define FT_GLYPH_OWN_BITMAP 0x1U +#define FT_GLYPH_OWN_BITMAP 0x1U +#define FT_GLYPH_OWN_GZIP_SVG 0x2U typedef struct FT_Slot_InternalRec_ { diff --git a/thirdparty/freetype/include/freetype/internal/ftpsprop.h b/thirdparty/freetype/include/freetype/internal/ftpsprop.h index d94d0d7e4b..47373211cb 100644 --- a/thirdparty/freetype/include/freetype/internal/ftpsprop.h +++ b/thirdparty/freetype/include/freetype/internal/ftpsprop.h @@ -4,7 +4,7 @@ * * Get and set properties of PostScript drivers (specification). * - * Copyright (C) 2017-2021 by + * Copyright (C) 2017-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftrfork.h b/thirdparty/freetype/include/freetype/internal/ftrfork.h index 1c56d6ceb7..165e67f245 100644 --- a/thirdparty/freetype/include/freetype/internal/ftrfork.h +++ b/thirdparty/freetype/include/freetype/internal/ftrfork.h @@ -4,7 +4,7 @@ * * Embedded resource forks accessor (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * Masatake YAMATO and Redhat K.K. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftserv.h b/thirdparty/freetype/include/freetype/internal/ftserv.h index fa82c31fcd..78996d9c85 100644 --- a/thirdparty/freetype/include/freetype/internal/ftserv.h +++ b/thirdparty/freetype/include/freetype/internal/ftserv.h @@ -4,7 +4,7 @@ * * The FreeType services (specification only). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftstream.h b/thirdparty/freetype/include/freetype/internal/ftstream.h index 7f3af120c2..aa51fe5a87 100644 --- a/thirdparty/freetype/include/freetype/internal/ftstream.h +++ b/thirdparty/freetype/include/freetype/internal/ftstream.h @@ -4,7 +4,7 @@ * * Stream handling (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/fttrace.h b/thirdparty/freetype/include/freetype/internal/fttrace.h index 3307556bff..43c6a8713b 100644 --- a/thirdparty/freetype/include/freetype/internal/fttrace.h +++ b/thirdparty/freetype/include/freetype/internal/fttrace.h @@ -4,7 +4,7 @@ * * Tracing handling (specification only). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -49,6 +49,9 @@ FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */ FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */ FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */ + /* ot-svg module */ +FT_TRACE_DEF( otsvg ) /* OT-SVG renderer (ftsvg.c) */ + /* cache sub-system */ FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */ @@ -61,6 +64,7 @@ FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */ FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */ FT_TRACE_DEF( ttcolr ) /* glyph layer table (ttcolr.c) */ FT_TRACE_DEF( ttcpal ) /* color palette table (ttcpal.c) */ +FT_TRACE_DEF( ttsvg ) /* OpenType SVG table (ttsvg.c) */ FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */ FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */ FT_TRACE_DEF( ttmtx ) /* metrics-related tables (ttmtx.c) */ diff --git a/thirdparty/freetype/include/freetype/internal/ftvalid.h b/thirdparty/freetype/include/freetype/internal/ftvalid.h index 7bdfa62f32..171c2cb6f5 100644 --- a/thirdparty/freetype/include/freetype/internal/ftvalid.h +++ b/thirdparty/freetype/include/freetype/internal/ftvalid.h @@ -4,7 +4,7 @@ * * FreeType validation support (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/psaux.h b/thirdparty/freetype/include/freetype/internal/psaux.h index 6c6399aa16..48ec1df963 100644 --- a/thirdparty/freetype/include/freetype/internal/psaux.h +++ b/thirdparty/freetype/include/freetype/internal/psaux.h @@ -5,7 +5,7 @@ * Auxiliary functions and data structures related to PostScript fonts * (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/pshints.h b/thirdparty/freetype/include/freetype/internal/pshints.h index 9dbb0776b0..5de83e4565 100644 --- a/thirdparty/freetype/include/freetype/internal/pshints.h +++ b/thirdparty/freetype/include/freetype/internal/pshints.h @@ -6,7 +6,7 @@ * recorders (specification only). These are used to support native * T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers. * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svbdf.h b/thirdparty/freetype/include/freetype/internal/services/svbdf.h index 879aa61383..06e3b531c8 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svbdf.h +++ b/thirdparty/freetype/include/freetype/internal/services/svbdf.h @@ -4,7 +4,7 @@ * * The FreeType BDF services (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svcfftl.h b/thirdparty/freetype/include/freetype/internal/services/svcfftl.h index f6424e424d..1dea6bcda9 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svcfftl.h +++ b/thirdparty/freetype/include/freetype/internal/services/svcfftl.h @@ -4,7 +4,7 @@ * * The FreeType CFF tables loader service (specification). * - * Copyright (C) 2017-2021 by + * Copyright (C) 2017-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svcid.h b/thirdparty/freetype/include/freetype/internal/services/svcid.h index 7ef5afd0b7..acf9178d0a 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svcid.h +++ b/thirdparty/freetype/include/freetype/internal/services/svcid.h @@ -4,7 +4,7 @@ * * The FreeType CID font services (specification). * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * Derek Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h b/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h index cc87fc122d..a7280319c5 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h +++ b/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h @@ -4,7 +4,7 @@ * * The FreeType font format service (specification only). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svgldict.h b/thirdparty/freetype/include/freetype/internal/services/svgldict.h index 4256f14a04..489021d897 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svgldict.h +++ b/thirdparty/freetype/include/freetype/internal/services/svgldict.h @@ -4,7 +4,7 @@ * * The FreeType glyph dictionary services (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svgxval.h b/thirdparty/freetype/include/freetype/internal/services/svgxval.h index f36d55602a..59ae411b55 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svgxval.h +++ b/thirdparty/freetype/include/freetype/internal/services/svgxval.h @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/include/freetype/internal/services/svkern.h b/thirdparty/freetype/include/freetype/internal/services/svkern.h index 99dc2d97a3..c567acad46 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svkern.h +++ b/thirdparty/freetype/include/freetype/internal/services/svkern.h @@ -4,7 +4,7 @@ * * The FreeType Kerning service (specification). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svmetric.h b/thirdparty/freetype/include/freetype/internal/services/svmetric.h index b9c95a7c9c..7accdc46ff 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svmetric.h +++ b/thirdparty/freetype/include/freetype/internal/services/svmetric.h @@ -4,7 +4,7 @@ * * The FreeType services for metrics variations (specification). * - * Copyright (C) 2016-2021 by + * Copyright (C) 2016-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svmm.h b/thirdparty/freetype/include/freetype/internal/services/svmm.h index 8eac3a3fe3..c6394890ac 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svmm.h +++ b/thirdparty/freetype/include/freetype/internal/services/svmm.h @@ -4,7 +4,7 @@ * * The FreeType Multiple Masters and GX var services (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svotval.h b/thirdparty/freetype/include/freetype/internal/services/svotval.h index 7afb49e824..3c72d1f855 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svotval.h +++ b/thirdparty/freetype/include/freetype/internal/services/svotval.h @@ -4,7 +4,7 @@ * * The FreeType OpenType validation service (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svpfr.h b/thirdparty/freetype/include/freetype/internal/services/svpfr.h index 98442bf83d..bde0ed3545 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svpfr.h +++ b/thirdparty/freetype/include/freetype/internal/services/svpfr.h @@ -4,7 +4,7 @@ * * Internal PFR service functions (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svpostnm.h b/thirdparty/freetype/include/freetype/internal/services/svpostnm.h index 5a25c5a58a..05f6291e13 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svpostnm.h +++ b/thirdparty/freetype/include/freetype/internal/services/svpostnm.h @@ -4,7 +4,7 @@ * * The FreeType PostScript name services (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svprop.h b/thirdparty/freetype/include/freetype/internal/services/svprop.h index 9b71000c52..29c568640b 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svprop.h +++ b/thirdparty/freetype/include/freetype/internal/services/svprop.h @@ -4,7 +4,7 @@ * * The FreeType property service (specification). * - * Copyright (C) 2012-2021 by + * Copyright (C) 2012-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svpscmap.h b/thirdparty/freetype/include/freetype/internal/services/svpscmap.h index 346f5e2a7c..7d586587a5 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svpscmap.h +++ b/thirdparty/freetype/include/freetype/internal/services/svpscmap.h @@ -4,7 +4,7 @@ * * The FreeType PostScript charmap service (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h b/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h index 49aa4d565d..6e45f3272d 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h +++ b/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h @@ -4,7 +4,7 @@ * * The FreeType PostScript info service (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svsfnt.h b/thirdparty/freetype/include/freetype/internal/services/svsfnt.h index 4306cbc1b7..03938a562b 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svsfnt.h +++ b/thirdparty/freetype/include/freetype/internal/services/svsfnt.h @@ -4,7 +4,7 @@ * * The FreeType SFNT table loading service (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svttcmap.h b/thirdparty/freetype/include/freetype/internal/services/svttcmap.h index 775b6bcf20..a0b1bbd2f3 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svttcmap.h +++ b/thirdparty/freetype/include/freetype/internal/services/svttcmap.h @@ -4,7 +4,7 @@ * * The FreeType TrueType/sfnt cmap extra information service. * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * Masatake YAMATO, Redhat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/include/freetype/internal/services/svtteng.h b/thirdparty/freetype/include/freetype/internal/services/svtteng.h index 964934284d..f8396eb08c 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svtteng.h +++ b/thirdparty/freetype/include/freetype/internal/services/svtteng.h @@ -4,7 +4,7 @@ * * The FreeType TrueType engine query service (specification). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svttglyf.h b/thirdparty/freetype/include/freetype/internal/services/svttglyf.h index 4268467b75..982630c0aa 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svttglyf.h +++ b/thirdparty/freetype/include/freetype/internal/services/svttglyf.h @@ -4,7 +4,7 @@ * * The FreeType TrueType glyph service. * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h b/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h index aa70aa44db..950f4a8824 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h +++ b/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h @@ -4,7 +4,7 @@ * * The FreeType Windows FNT/FONT service (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/sfnt.h b/thirdparty/freetype/include/freetype/internal/sfnt.h index bf4c7e09fe..c67b47e860 100644 --- a/thirdparty/freetype/include/freetype/internal/sfnt.h +++ b/thirdparty/freetype/include/freetype/internal/sfnt.h @@ -4,7 +4,7 @@ * * High-level 'sfnt' driver interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -314,6 +314,33 @@ FT_BEGIN_HEADER /************************************************************************** * * @functype: + * TT_Load_Svg_Doc_Func + * + * @description: + * Scan the SVG document list to find the document containing the glyph + * that has the ID 'glyph*XXX*', where *XXX* is the value of + * `glyph_index` as a decimal integer. + * + * @inout: + * glyph :: + * The glyph slot from which pointers to the SVG document list is to be + * grabbed. The results are stored back in the slot. + * + * @input: + * glyph_index :: + * The index of the glyph that is to be looked up. + * + * @return: + * FreeType error code. 0 means success. + */ + typedef FT_Error + (*TT_Load_Svg_Doc_Func)( FT_GlyphSlot glyph, + FT_UInt glyph_index ); + + + /************************************************************************** + * + * @functype: * TT_Set_SBit_Strike_Func * * @description: @@ -946,6 +973,11 @@ FT_BEGIN_HEADER TT_Get_Name_Func get_name; TT_Get_Name_ID_Func get_name_id; + /* OpenType SVG Support */ + TT_Load_Table_Func load_svg; + TT_Free_Table_Func free_svg; + TT_Load_Svg_Doc_Func load_svg_doc; + } SFNT_Interface; @@ -997,7 +1029,10 @@ FT_BEGIN_HEADER colr_blend_, \ get_metrics_, \ get_name_, \ - get_name_id_ ) \ + get_name_id_, \ + load_svg_, \ + free_svg_, \ + load_svg_doc_ ) \ static const SFNT_Interface class_ = \ { \ goto_table_, \ @@ -1042,7 +1077,10 @@ FT_BEGIN_HEADER colr_blend_, \ get_metrics_, \ get_name_, \ - get_name_id_ \ + get_name_id_, \ + load_svg_, \ + free_svg_, \ + load_svg_doc_ \ }; diff --git a/thirdparty/freetype/include/freetype/internal/svginterface.h b/thirdparty/freetype/include/freetype/internal/svginterface.h new file mode 100644 index 0000000000..1b325e5e9d --- /dev/null +++ b/thirdparty/freetype/include/freetype/internal/svginterface.h @@ -0,0 +1,46 @@ +/**************************************************************************** + * + * svginterface.h + * + * Interface of ot-svg module (specification only). + * + * Copyright (C) 2022 by + * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + +#ifndef SVGINTERFACE_H_ +#define SVGINTERFACE_H_ + +#include <ft2build.h> +#include <freetype/otsvg.h> + + +FT_BEGIN_HEADER + + typedef FT_Error + (*Preset_Bitmap_Func)( FT_Module module, + FT_GlyphSlot slot, + FT_Bool cache ); + + typedef struct SVG_Interface_ + { + Preset_Bitmap_Func preset_slot; + + } SVG_Interface; + + typedef SVG_Interface* SVG_Service; + +FT_END_HEADER + +#endif /* SVGINTERFACE_H_ */ + + +/* END */ diff --git a/thirdparty/freetype/include/freetype/internal/t1types.h b/thirdparty/freetype/include/freetype/internal/t1types.h index 023c5d08a2..b6a3de14d0 100644 --- a/thirdparty/freetype/include/freetype/internal/t1types.h +++ b/thirdparty/freetype/include/freetype/internal/t1types.h @@ -5,7 +5,7 @@ * Basic Type1/Type2 type definitions and interface (specification * only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/tttypes.h b/thirdparty/freetype/include/freetype/internal/tttypes.h index 651131c8d3..df719387b5 100644 --- a/thirdparty/freetype/include/freetype/internal/tttypes.h +++ b/thirdparty/freetype/include/freetype/internal/tttypes.h @@ -5,7 +5,7 @@ * Basic SFNT/TrueType type definitions and interface (specification * only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1390,8 +1390,8 @@ FT_BEGIN_HEADER * hdmx_record_size :: * The size of a single hdmx record. * - * hdmx_record_sizes :: - * An array holding the ppem sizes available in the 'hdmx' table. + * hdmx_records :: + * A array of pointers to the 'hdmx' table records sorted by ppem. * * sbit_table :: * A pointer to the font's embedded bitmap location table. @@ -1605,7 +1605,7 @@ FT_BEGIN_HEADER FT_ULong hdmx_table_size; FT_UInt hdmx_record_count; FT_ULong hdmx_record_size; - FT_Byte* hdmx_record_sizes; + FT_Byte** hdmx_records; FT_Byte* sbit_table; FT_ULong sbit_table_size; @@ -1644,6 +1644,9 @@ FT_BEGIN_HEADER void* cpal; void* colr; + /* since 2.12 */ + void* svg; + } TT_FaceRec; @@ -1769,6 +1772,9 @@ FT_BEGIN_HEADER /* since version 2.6.2 */ FT_ListRec composites; + /* since version 2.11.2 */ + FT_Byte* widthp; + } TT_LoaderRec; diff --git a/thirdparty/freetype/include/freetype/internal/wofftypes.h b/thirdparty/freetype/include/freetype/internal/wofftypes.h index c460107c4d..94804fa72f 100644 --- a/thirdparty/freetype/include/freetype/internal/wofftypes.h +++ b/thirdparty/freetype/include/freetype/internal/wofftypes.h @@ -5,7 +5,7 @@ * Basic WOFF/WOFF2 type definitions and interface (specification * only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/otsvg.h b/thirdparty/freetype/include/freetype/otsvg.h new file mode 100644 index 0000000000..2caadfdeeb --- /dev/null +++ b/thirdparty/freetype/include/freetype/otsvg.h @@ -0,0 +1,336 @@ +/**************************************************************************** + * + * otsvg.h + * + * Interface for OT-SVG support related things (specification). + * + * Copyright (C) 2022 by + * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + +#ifndef OTSVG_H_ +#define OTSVG_H_ + +#include <freetype/freetype.h> + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * svg_fonts + * + * @title: + * OpenType SVG Fonts + * + * @abstract: + * OT-SVG API between FreeType and an external SVG rendering library. + * + * @description: + * This section describes the four hooks necessary to render SVG + * 'documents' that are contained in an OpenType font's 'SVG~' table. + * + * For more information on the implementation, see our standard hooks + * based on 'librsvg' in the [FreeType Demo + * Programs](https://gitlab.freedesktop.org/freetype/freetype-demos) + * repository. + * + */ + + + /************************************************************************** + * + * @functype: + * SVG_Lib_Init_Func + * + * @description: + * A callback that is called when the first OT-SVG glyph is rendered in + * the lifetime of an @FT_Library object. In a typical implementation, + * one would want to allocate a structure and point the `data_pointer` + * to it and perform any library initializations that might be needed. + * + * @inout: + * data_pointer :: + * The SVG rendering module stores a pointer variable that can be used + * by clients to store any data that needs to be shared across + * different hooks. `data_pointer` is essentially a pointer to that + * pointer such that it can be written to as well as read from. + * + * @return: + * FreeType error code. 0 means success. + * + * @since: + * 2.12 + */ + typedef FT_Error + (*SVG_Lib_Init_Func)( FT_Pointer *data_pointer ); + + + /************************************************************************** + * + * @functype: + * SVG_Lib_Free_Func + * + * @description: + * A callback that is called when the `ot-svg` module is being freed. + * It is only called if the init hook was called earlier. This means + * that neither the init nor the free hook is called if no OT-SVG glyph + * is rendered. + * + * In a typical implementation, one would want to free any state + * structure that was allocated in the init hook and perform any + * library-related closure that might be needed. + * + * @inout: + * data_pointer :: + * The SVG rendering module stores a pointer variable that can be used + * by clients to store any data that needs to be shared across + * different hooks. `data_pointer` is essentially a pointer to that + * pointer such that it can be written to as well as read from. + * + * @since: + * 2.12 + */ + typedef void + (*SVG_Lib_Free_Func)( FT_Pointer *data_pointer ); + + + /************************************************************************** + * + * @functype: + * SVG_Lib_Render_Func + * + * @description: + * A callback that is called to render an OT-SVG glyph. This callback + * hook is called right after the preset hook @SVG_Lib_Preset_Slot_Func + * has been called with `cache` set to `TRUE`. The data necessary to + * render is available through the handle @FT_SVG_Document, which is set + * in the `other` field of @FT_GlyphSlotRec. + * + * The render hook is expected to render the SVG glyph to the bitmap + * buffer that is allocated already at `slot->bitmap.buffer`. It also + * sets the `num_grays` value as well as `slot->format`. + * + * @input: + * slot :: + * The slot to render. + * + * @inout: + * data_pointer :: + * The SVG rendering module stores a pointer variable that can be used + * by clients to store any data that needs to be shared across + * different hooks. `data_pointer` is essentially a pointer to that + * pointer such that it can be written to as well as read from. + * + * @return: + * FreeType error code. 0 means success. + * + * @since: + * 2.12 + */ + typedef FT_Error + (*SVG_Lib_Render_Func)( FT_GlyphSlot slot, + FT_Pointer *data_pointer ); + + + /************************************************************************** + * + * @functype: + * SVG_Lib_Preset_Slot_Func + * + * @description: + * A callback that is called to preset the glyph slot. It is called from + * two places. + * + * 1. When `FT_Load_Glyph` needs to preset the glyph slot. + * + * 2. Right before the `svg` module calls the render callback hook. + * + * When it is the former, the argument `cache` is set to `FALSE`. When + * it is the latter, the argument `cache` is set to `TRUE`. This + * distinction has been made because many calculations that are necessary + * for presetting a glyph slot are the same needed later for the render + * callback hook. Thus, if `cache` is `TRUE`, the hook can _cache_ those + * calculations in a memory block referenced by the state pointer. + * + * This hook is expected to preset the slot by setting parameters such as + * `bitmap_left`, `bitmap_top`, `width`, `rows`, `pitch`, and + * `pixel_mode`. It is also expected to set all the metrics for the slot + * including the vertical advance if it is not already set. Typically, + * fonts have horizontal advances but not vertical ones. If those are + * available, they had already been set, otherwise they have to be + * estimated and set manually. The hook must take into account the + * transformations that have been set, and translate the transformation + * matrices into the SVG coordinate system, as the original matrix is + * intended for the TTF/CFF coordinate system. + * + * @input: + * slot :: + * The glyph slot that has the SVG document loaded. + * + * cache :: + * See description. + * + * @inout: + * data_pointer :: + * The SVG rendering module stores a pointer variable that can be used + * by clients to store any data that needs to be shared across + * different hooks. `data_pointer` is essentially a pointer to that + * pointer such that it can be written to as well as read from. + * + * @return: + * FreeType error code. 0 means success. + * + * @since: + * 2.12 + */ + typedef FT_Error + (*SVG_Lib_Preset_Slot_Func)( FT_GlyphSlot slot, + FT_Bool cache, + FT_Pointer *state ); + + + /************************************************************************** + * + * @struct: + * SVG_RendererHooks + * + * @description: + * A structure that stores the four hooks needed to render OT-SVG glyphs + * properly. The structure is publicly used to set the hooks via the + * @svg-hooks driver property. + * + * The behavior of each hook is described in its documentation. One + * thing to note is that the preset hook and the render hook often need + * to do the same operations; therefore, it's better to cache the + * intermediate data in a state structure to avoid calculating it twice. + * For example, in the preset hook one can draw the glyph on a recorder + * surface and later create a bitmap surface from it in the render hook. + * + * All four hooks must be non-NULL. + * + * @fields: + * init_svg :: + * The initialization hook. + * + * free_svg :: + * The cleanup hook. + * + * render_hook :: + * The render hook. + * + * preset_slot :: + * The preset hook. + * + * @since: + * 2.12 + */ + typedef struct SVG_RendererHooks_ + { + SVG_Lib_Init_Func init_svg; + SVG_Lib_Free_Func free_svg; + SVG_Lib_Render_Func render_svg; + + SVG_Lib_Preset_Slot_Func preset_slot; + + } SVG_RendererHooks; + + + /************************************************************************** + * + * @struct: + * FT_SVG_DocumentRec + * + * @description: + * A structure that models one SVG document. + * + * @fields: + * svg_document :: + * A pointer to the SVG document. + * + * svg_document_length :: + * The length of `svg_document`. + * + * metrics :: + * A metrics object storing the size information. + * + * units_per_EM :: + * The size of the EM square. + * + * start_glyph_id :: + * The first glyph ID in the glyph range covered by this document. + * + * end_glyph_id :: + * The last glyph ID in the glyph range covered by this document. + * + * transform :: + * A 2x2 transformation matrix to apply to the glyph while rendering + * it. + * + * delta :: + * The translation to apply to the glyph while rendering. + * + * @note: + * When an @FT_GlyphSlot object `slot` is passed down to a renderer, the + * renderer can only access the `metrics` and `units_per_EM` fields via + * `slot->face`. However, when @FT_Glyph_To_Bitmap sets up a dummy + * object, it has no way to set a `face` object. Thus, metrics + * information and `units_per_EM` (which is necessary for OT-SVG) has to + * be stored separately. + * + * @since: + * 2.12 + */ + typedef struct FT_SVG_DocumentRec_ + { + FT_Byte* svg_document; + FT_ULong svg_document_length; + + FT_Size_Metrics metrics; + FT_UShort units_per_EM; + + FT_UShort start_glyph_id; + FT_UShort end_glyph_id; + + FT_Matrix transform; + FT_Vector delta; + + } FT_SVG_DocumentRec; + + + /************************************************************************** + * + * @type: + * FT_SVG_Document + * + * @description: + * A handle to an @FT_SVG_DocumentRec object. + * + * @since: + * 2.12 + */ + typedef struct FT_SVG_DocumentRec_* FT_SVG_Document; + + +FT_END_HEADER + +#endif /* OTSVG_H_ */ + + +/* END */ diff --git a/thirdparty/freetype/include/freetype/t1tables.h b/thirdparty/freetype/include/freetype/t1tables.h index a5f6ae7210..4068b204a9 100644 --- a/thirdparty/freetype/include/freetype/t1tables.h +++ b/thirdparty/freetype/include/freetype/t1tables.h @@ -5,7 +5,7 @@ * Basic Type 1/Type 2 tables definitions and interface (specification * only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -453,22 +453,22 @@ FT_BEGIN_HEADER /************************************************************************** * * @function: - * FT_Has_PS_Glyph_Names + * FT_Has_PS_Glyph_Names * * @description: - * Return true if a given face provides reliable PostScript glyph names. - * This is similar to using the @FT_HAS_GLYPH_NAMES macro, except that - * certain fonts (mostly TrueType) contain incorrect glyph name tables. + * Return true if a given face provides reliable PostScript glyph names. + * This is similar to using the @FT_HAS_GLYPH_NAMES macro, except that + * certain fonts (mostly TrueType) contain incorrect glyph name tables. * - * When this function returns true, the caller is sure that the glyph - * names returned by @FT_Get_Glyph_Name are reliable. + * When this function returns true, the caller is sure that the glyph + * names returned by @FT_Get_Glyph_Name are reliable. * * @input: - * face :: - * face handle + * face :: + * face handle * * @return: - * Boolean. True if glyph names are reliable. + * Boolean. True if glyph names are reliable. * */ FT_EXPORT( FT_Int ) @@ -478,30 +478,40 @@ FT_BEGIN_HEADER /************************************************************************** * * @function: - * FT_Get_PS_Font_Info + * FT_Get_PS_Font_Info * * @description: - * Retrieve the @PS_FontInfoRec structure corresponding to a given - * PostScript font. + * Retrieve the @PS_FontInfoRec structure corresponding to a given + * PostScript font. * * @input: - * face :: - * PostScript face handle. + * face :: + * PostScript face handle. * * @output: - * afont_info :: - * Output font info structure pointer. + * afont_info :: + * A pointer to a @PS_FontInfoRec object. * * @return: - * FreeType error code. 0~means success. + * FreeType error code. 0~means success. * * @note: - * String pointers within the @PS_FontInfoRec structure are owned by the - * face and don't need to be freed by the caller. Missing entries in - * the font's FontInfo dictionary are represented by `NULL` pointers. + * String pointers within the @PS_FontInfoRec structure are owned by the + * face and don't need to be freed by the caller. Missing entries in the + * font's FontInfo dictionary are represented by `NULL` pointers. + * + * The following font formats support this feature: 'Type~1', 'Type~42', + * 'CFF', 'CID~Type~1'. For other font formats this function returns the + * `FT_Err_Invalid_Argument` error code. * - * If the font's format is not PostScript-based, this function will - * return the `FT_Err_Invalid_Argument` error code. + * @example: + * ``` + * PS_FontInfoRec font_info; + * + * + * error = FT_Get_PS_Font_Info( face, &font_info ); + * ... + * ``` * */ FT_EXPORT( FT_Error ) @@ -512,29 +522,39 @@ FT_BEGIN_HEADER /************************************************************************** * * @function: - * FT_Get_PS_Font_Private + * FT_Get_PS_Font_Private * * @description: - * Retrieve the @PS_PrivateRec structure corresponding to a given - * PostScript font. + * Retrieve the @PS_PrivateRec structure corresponding to a given + * PostScript font. * * @input: - * face :: - * PostScript face handle. + * face :: + * PostScript face handle. * * @output: - * afont_private :: - * Output private dictionary structure pointer. + * afont_private :: + * A pointer to a @PS_PrivateRec object. * * @return: - * FreeType error code. 0~means success. + * FreeType error code. 0~means success. * * @note: - * The string pointers within the @PS_PrivateRec structure are owned by - * the face and don't need to be freed by the caller. + * The string pointers within the @PS_PrivateRec structure are owned by + * the face and don't need to be freed by the caller. * - * If the font's format is not PostScript-based, this function returns - * the `FT_Err_Invalid_Argument` error code. + * Only the 'Type~1' font format supports this feature. For other font + * formats this function returns the `FT_Err_Invalid_Argument` error + * code. + * + * @example: + * ``` + * PS_PrivateRec font_private; + * + * + * error = FT_Get_PS_Font_Private( face, &font_private ); + * ... + * ``` * */ FT_EXPORT( FT_Error ) @@ -693,67 +713,67 @@ FT_BEGIN_HEADER /************************************************************************** * * @function: - * FT_Get_PS_Font_Value + * FT_Get_PS_Font_Value * * @description: - * Retrieve the value for the supplied key from a PostScript font. + * Retrieve the value for the supplied key from a PostScript font. * * @input: - * face :: - * PostScript face handle. + * face :: + * PostScript face handle. * - * key :: - * An enumeration value representing the dictionary key to retrieve. + * key :: + * An enumeration value representing the dictionary key to retrieve. * - * idx :: - * For array values, this specifies the index to be returned. + * idx :: + * For array values, this specifies the index to be returned. * - * value :: - * A pointer to memory into which to write the value. + * value :: + * A pointer to memory into which to write the value. * - * valen_len :: - * The size, in bytes, of the memory supplied for the value. + * valen_len :: + * The size, in bytes, of the memory supplied for the value. * * @output: - * value :: - * The value matching the above key, if it exists. + * value :: + * The value matching the above key, if it exists. * * @return: - * The amount of memory (in bytes) required to hold the requested value - * (if it exists, -1 otherwise). + * The amount of memory (in bytes) required to hold the requested value + * (if it exists, -1 otherwise). * * @note: - * The values returned are not pointers into the internal structures of - * the face, but are 'fresh' copies, so that the memory containing them - * belongs to the calling application. This also enforces the - * 'read-only' nature of these values, i.e., this function cannot be - * used to manipulate the face. + * The values returned are not pointers into the internal structures of + * the face, but are 'fresh' copies, so that the memory containing them + * belongs to the calling application. This also enforces the + * 'read-only' nature of these values, i.e., this function cannot be + * used to manipulate the face. * - * `value` is a void pointer because the values returned can be of - * various types. + * `value` is a void pointer because the values returned can be of + * various types. * - * If either `value` is `NULL` or `value_len` is too small, just the - * required memory size for the requested entry is returned. + * If either `value` is `NULL` or `value_len` is too small, just the + * required memory size for the requested entry is returned. * - * The `idx` parameter is used, not only to retrieve elements of, for - * example, the FontMatrix or FontBBox, but also to retrieve name keys - * from the CharStrings dictionary, and the charstrings themselves. It - * is ignored for atomic values. + * The `idx` parameter is used, not only to retrieve elements of, for + * example, the FontMatrix or FontBBox, but also to retrieve name keys + * from the CharStrings dictionary, and the charstrings themselves. It + * is ignored for atomic values. * - * `PS_DICT_BLUE_SCALE` returns a value that is scaled up by 1000. To - * get the value as in the font stream, you need to divide by 65536000.0 - * (to remove the FT_Fixed scale, and the x1000 scale). + * `PS_DICT_BLUE_SCALE` returns a value that is scaled up by 1000. To + * get the value as in the font stream, you need to divide by 65536000.0 + * (to remove the FT_Fixed scale, and the x1000 scale). * - * IMPORTANT: Only key/value pairs read by the FreeType interpreter can - * be retrieved. So, for example, PostScript procedures such as NP, ND, - * and RD are not available. Arbitrary keys are, obviously, not be - * available either. + * IMPORTANT: Only key/value pairs read by the FreeType interpreter can + * be retrieved. So, for example, PostScript procedures such as NP, ND, + * and RD are not available. Arbitrary keys are, obviously, not be + * available either. * - * If the font's format is not PostScript-based, this function returns - * the `FT_Err_Invalid_Argument` error code. + * If the font's format is not PostScript-based, this function returns + * the `FT_Err_Invalid_Argument` error code. * * @since: - * 2.4.8 + * 2.4.8 * */ FT_EXPORT( FT_Long ) diff --git a/thirdparty/freetype/include/freetype/ttnameid.h b/thirdparty/freetype/include/freetype/ttnameid.h index a09950f542..37b505a05b 100644 --- a/thirdparty/freetype/include/freetype/ttnameid.h +++ b/thirdparty/freetype/include/freetype/ttnameid.h @@ -4,7 +4,7 @@ * * TrueType name ID definitions (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/tttables.h b/thirdparty/freetype/include/freetype/tttables.h index c33d99059d..21664df7b3 100644 --- a/thirdparty/freetype/include/freetype/tttables.h +++ b/thirdparty/freetype/include/freetype/tttables.h @@ -5,7 +5,7 @@ * Basic SFNT/TrueType tables definitions and interface * (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/tttags.h b/thirdparty/freetype/include/freetype/tttags.h index 47ccc6ddf4..8b807641b8 100644 --- a/thirdparty/freetype/include/freetype/tttags.h +++ b/thirdparty/freetype/include/freetype/tttags.h @@ -4,7 +4,7 @@ * * Tags for TrueType and OpenType tables (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -95,6 +95,7 @@ FT_BEGIN_HEADER #define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' ) #define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) #define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) +#define TTAG_SVG FT_MAKE_TAG( 'S', 'V', 'G', ' ' ) #define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) #define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) #define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) diff --git a/thirdparty/freetype/include/ft2build.h b/thirdparty/freetype/include/ft2build.h index 62686b1b20..2543ac435a 100644 --- a/thirdparty/freetype/include/ft2build.h +++ b/thirdparty/freetype/include/ft2build.h @@ -4,7 +4,7 @@ * * FreeType 2 build and setup macros. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afblue.c b/thirdparty/freetype/src/autofit/afblue.c index c9e8045c18..b986eb4a13 100644 --- a/thirdparty/freetype/src/autofit/afblue.c +++ b/thirdparty/freetype/src/autofit/afblue.c @@ -7,7 +7,7 @@ * * Auto-fitter data for blue strings (body). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afblue.cin b/thirdparty/freetype/src/autofit/afblue.cin index 071e80b031..f7e27ad8e5 100644 --- a/thirdparty/freetype/src/autofit/afblue.cin +++ b/thirdparty/freetype/src/autofit/afblue.cin @@ -4,7 +4,7 @@ * * Auto-fitter data for blue strings (body). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afblue.dat b/thirdparty/freetype/src/autofit/afblue.dat deleted file mode 100644 index 1aa9b26de9..0000000000 --- a/thirdparty/freetype/src/autofit/afblue.dat +++ /dev/null @@ -1,1121 +0,0 @@ -// afblue.dat -// -// Auto-fitter data for blue strings. -// -// Copyright (C) 2013-2021 by -// David Turner, Robert Wilhelm, and Werner Lemberg. -// -// This file is part of the FreeType project, and may only be used, -// modified, and distributed under the terms of the FreeType project -// license, LICENSE.TXT. By continuing to use, modify, or distribute -// this file you indicate that you have read the license and -// understand and accept it fully. - - -// This file contains data specific to blue zones. It gets processed by -// a script to simulate `jagged arrays', with enumeration values holding -// offsets into the arrays. -// -// The format of the file is rather simple: A section starts with three -// labels separated by whitespace and followed by a colon (everything in a -// single line); the first label gives the name of the enumeration template, -// the second the name of the array template, and the third the name of the -// `maximum' template. The script then fills the corresponding templates -// (indicated by `@' characters around the name). -// -// A section contains one or more data records. Each data record consists -// of two or more lines. The first line holds the enumeration name, and the -// remaining lines the corresponding array data. -// -// There are two possible representations for array data. -// -// - A string of characters or character clusters (for example, representing -// Aksharas, Devanagari syllables) in UTF-8 encoding enclosed in double -// quotes, using C syntax, where the elements are separated by spaces. -// There can be only one string per line, thus the starting and ending -// double quote must be the first and last character in the line, -// respectively, ignoring whitespace before and after the string. If -// there are multiple strings (in multiple lines), they are concatenated -// to a single string. In the output, a string gets represented as a -// series of singles bytes, followed by a zero byte. The enumeration -// values simply hold byte offsets to the start of the corresponding -// strings. -// -// For strings, the `maximum' template holds the maximum number of -// non-space characters in all strings. -// -// - Data blocks enclosed in balanced braces, which get copied verbatim and -// which can span multiple lines. The opening brace of a block must be -// the first character of a line (ignoring whitespace), and the closing -// brace the last (ignoring whitespace also). The script appends a comma -// character after each block and counts the number of blocks to set the -// enumeration values. -// -// For data blocks, the `maximum' template holds the maximum number of -// array elements. -// -// A section can contain either strings only or data blocks only. -// -// A comment line starts with `//'; it gets removed. A preprocessor -// directive line (using the standard syntax of `cpp') starts with `#' and -// gets copied verbatim to both the enumeration and the array. Whitespace -// outside of a string is insignificant. -// -// Preprocessor directives are ignored while the script computes maximum -// values; this essentially means that the maximum values can easily be too -// large. Given that the purpose of those values is to create local -// fixed-size arrays at compile time for further processing of the blue zone -// data, this isn't a problem. Note the final zero byte of a string is not -// counted. Note also that the count holds the number of UTF-8 encoded -// characters, not bytes. - - -// The blue zone string data, to be used in the blue stringsets below. - -AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: - - AF_BLUE_STRING_ADLAM_CAPITAL_TOP - "𞤌 𞤅 𞤈 𞤠𞤔 𞤚" - AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM - "𞤂 𞤖" - AF_BLUE_STRING_ADLAM_SMALL_TOP - "𞤬 𞤮 𞤻 𞤼 𞤾" - AF_BLUE_STRING_ADLAM_SMALL_BOTTOM - "𞤤 𞤨 𞤩 𞤠𞤴 𞤸 𞤺 𞥀" - - AF_BLUE_STRING_ARABIC_TOP - "ا Ø¥ Ù„ Ùƒ Ø· ظ" - AF_BLUE_STRING_ARABIC_BOTTOM - "ت Ø« Ø· ظ Ùƒ" - // We don't necessarily have access to medial forms via Unicode in case - // Arabic presentational forms are missing. The only character that is - // guaranteed to have the same vertical position with joining (this is, - // non-isolated) forms is U+0640, ARABIC TATWEEL, which must join both - // round and flat curves. - AF_BLUE_STRING_ARABIC_JOIN - "Ù€" - - AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP - "Ô± Õ„ Õ’ Õ Ô² Ô³ Ô´ Õ•" - AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM - "Õ’ Õˆ Ô´ Õƒ Õ‡ Õ Õ Õ•" - AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER - "Õ¥ Õ§ Õ« Õ´ Õ¾ Ö† Õ³" - AF_BLUE_STRING_ARMENIAN_SMALL_TOP - "Õ¡ Õµ Ö‚ Õ½ Õ£ Õ· Ö€ Ö…" - AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM - "Õ° Õ¸ Õ³ Õ¡ Õ¥ Õ® Õ½ Ö…" - AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER - "Õ¢ Õ¨ Õ« Õ¬ Õ² Õº Öƒ Ö" - - AF_BLUE_STRING_AVESTAN_TOP - "𬀠ð¬ ð¬ ð¬›" - AF_BLUE_STRING_AVESTAN_BOTTOM - "𬀠ð¬" - - AF_BLUE_STRING_BAMUM_TOP - "êš§ ꚨ ê›› ꛉ ê› ê›ˆ ꛫ ꛯ" - AF_BLUE_STRING_BAMUM_BOTTOM - "êš êš³ êš¶ ꛬ ꚢ êš½ ꛯ ꛲" - - AF_BLUE_STRING_BENGALI_BASE - "অ ড ত ন ব ঠল ক" - AF_BLUE_STRING_BENGALI_TOP - "ই ট ঠি à§€ ৈ à§—" - AF_BLUE_STRING_BENGALI_HEAD - "ও ঠড ত ন ব ল ক" - - AF_BLUE_STRING_BUHID_TOP - "á áˆ" - AF_BLUE_STRING_BUHID_LARGE - "á… áŠ áŽ" - AF_BLUE_STRING_BUHID_SMALL - "ႠრበáŒ" - AF_BLUE_STRING_BUHID_BOTTOM - "ဠრᆠበዠá á‘" - - AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP - "á—œ á–´ á á’£ á‘« ᑎ ᔑ á—°" - AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM - "á—¶ á–µ á’§ რᑌ ᒠᔑ á—¢" - AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP - "á““ á“• á“€ á“‚ á“„ á•„ ᕆ ᘣ" - AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM - "ᕃ á“‚ á“€ á•‚ á“— ᓚ ᕆ ᘣ" - AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP - "᪠ᙆ ᣘ ᢠᒾ ᣗ ᔆ" - AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM - "ᙆ á—® á’» ហᔆ á’¡ á’¢ á“‘" - - AF_BLUE_STRING_CARIAN_TOP - "ðŠ§ ðŠ« ðŠ¬ ðŠ ðŠ± ðŠº ðŠ¼ ðŠ¿" - AF_BLUE_STRING_CARIAN_BOTTOM - "ðŠ£ ðŠ§ ðŠ· ð‹€ ðŠ« ðŠ¸ ð‹‰" - - AF_BLUE_STRING_CHAKMA_TOP - "𑄃 ð‘„… 𑄉 ð‘„™ ð‘„—" - AF_BLUE_STRING_CHAKMA_BOTTOM - "ð‘„… ð‘„› ð‘„ ð‘„— ð‘„“" - AF_BLUE_STRING_CHAKMA_DESCENDER - "𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢" - - AF_BLUE_STRING_CHEROKEE_CAPITAL - "ᆠᎻ Ꭼ რᎤ ᣠᎦ á•" - AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER - "ê®’ ꮤ ê®¶ ê´ ê¾ ê®— ê® ê®¿" - AF_BLUE_STRING_CHEROKEE_SMALL - "ê®– ê¼ ê®“ ê® ê®³ ê¶ ê®¥ ê®»" - AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER - "á¸ ê® ê¹ ê»" - - AF_BLUE_STRING_COPTIC_CAPITAL_TOP - "Ⲍ Ⲏ ⲠⳞ Ⲟ ⲠⲤ Ⳋ" - AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM - "ⳠⳘ Ⳟ Ⲏ Ⲟ ⲠⳜ â²°" - AF_BLUE_STRING_COPTIC_SMALL_TOP - "ⲠⲠⲡ ⳟ ⲟ ⲑ â²¥ ⳋ" - AF_BLUE_STRING_COPTIC_SMALL_BOTTOM - "ⳑ â³™ ⳟ Ⲡⲟ ⲑ â³ â³’" - - AF_BLUE_STRING_CYPRIOT_TOP - "ð ð ™ ð ³ ð ± ð … ð “ ð £ ð ¦" - AF_BLUE_STRING_CYPRIOT_BOTTOM - "ð ƒ ð Š ð › ð £ ð ³ ð µ ð " - AF_BLUE_STRING_CYPRIOT_SMALL - "ð ˆ ð ð –" - - AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP - "Б Ð’ Е П З О С Ð" - AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM - "Б Ð’ Е Ш З О С Ð" - AF_BLUE_STRING_CYRILLIC_SMALL - "Ñ… п н ш е з о Ñ" - AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER - "Ñ€ у Ñ„" - - AF_BLUE_STRING_DESERET_CAPITAL_TOP - "ð‚ ð„ ð‹ ð— ð‘" - AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM - "ð€ ð‚ ð„ ð— ð›" - AF_BLUE_STRING_DESERET_SMALL_TOP - "ðª ð¬ ð³ ð¿ ð¹" - AF_BLUE_STRING_DESERET_SMALL_BOTTOM - "ð¨ ðª ð¬ ð¿ ð‘ƒ" - - AF_BLUE_STRING_DEVANAGARI_BASE - "क न म उ छ ट ठड" - AF_BLUE_STRING_DEVANAGARI_TOP - "ई ठओ औ ि ी ो ौ" - // note that some fonts have extreme variation in the height of the - // round head elements; for this reason we also define the `base' - // blue zone, which must be always present - AF_BLUE_STRING_DEVANAGARI_HEAD - "क म अ आ थ ध ठश" - AF_BLUE_STRING_DEVANAGARI_BOTTOM - "ॠृ" - - AF_BLUE_STRING_ETHIOPIC_TOP - "ሀ ሃ ዘ á ማ በዋ á‹" - AF_BLUE_STRING_ETHIOPIC_BOTTOM - "ለ ሠበዘ ሀ ሪ ዠጨ" - - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP - "გ დ ე ვ თ ი რღ" - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM - "რზ მ ს შ ძ ხ პ" - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER - "ს ხ ქ ზ მ შ ჩ წ" - AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER - "ე ვ ჟ ტ უ ფ ქ ყ" - - AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP - "Ⴑ á‚§ Ⴙ Ⴜ Ⴄ á‚¥ Ⴓ Ⴚ" - AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM - "Ⴄ á‚¥ á‚§ Ⴈ Ⴆ Ⴑ Ⴊ á‚«" - - AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP - "â´ â´— â´‚ â´„ â´… â´‡ â´” â´–" - AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM - "â´ˆ â´Œ â´– â´Ž â´ƒ â´† â´‹ â´¢" - AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER - "â´ â´‘ â´“ â´• â´™ â´› â´¡ â´£" - AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER - "â´„ â´… â´” â´• â´ â´‚ â´˜ â´" - - AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP - "Ნ Ჟ á²³ Ჸ á²’ á²” á² á²´" - AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM - "Ი á²² ᲠᲩ á²› Შ Ჯ á²½" - - AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP - "â°… â°” â°ª â°„ â°‚ â°Š â°« â°‹" - AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM - "â°… â°„ â°‚ â°ª â°ž â°¡ â°Š â°”" - AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP - "â°µ ⱄ ⱚ â°´ â°² â°º â±› â°»" - AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM - "â°µ â°´ â°² ⱚ ⱎ ⱑ â°º ⱄ" - - AF_BLUE_STRING_GOTHIC_TOP - "ðŒ² ðŒ¶ ð€ ð„ ðŒ´ ðƒ ðˆ ðŒ¾" - AF_BLUE_STRING_GOTHIC_BOTTOM - "ðŒ¶ ðŒ´ ðƒ ðˆ" - - AF_BLUE_STRING_GREEK_CAPITAL_TOP - "Γ Î’ Ε Ζ Θ Ο Ω" - AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM - "Î’ Δ Ζ Ξ Θ Ο" - AF_BLUE_STRING_GREEK_SMALL_BETA_TOP - "β θ δ ζ λ ξ" - AF_BLUE_STRING_GREEK_SMALL - "α ε ι ο Ï€ σ Ï„ ω" - AF_BLUE_STRING_GREEK_SMALL_DESCENDER - "β γ η μ Ï Ï† χ ψ" - - AF_BLUE_STRING_GUJARATI_TOP - "ત ન ઋ ઌ છ ટ ર ૦" - AF_BLUE_STRING_GUJARATI_BOTTOM - "ખ ગ ઘ ઞ ઇ ઈ ઠજ" - AF_BLUE_STRING_GUJARATI_ASCENDER - "ઈ ઊ િ à«€ લી શà«àªšàª¿ જિ સી" - AF_BLUE_STRING_GUJARATI_DESCENDER - "ૠૃ à«„ ખૠછૃ છૄ" - AF_BLUE_STRING_GUJARATI_DIGIT_TOP - "૦ à«§ ૨ à«© à«" - - AF_BLUE_STRING_GURMUKHI_BASE - "ਕ ਗ ਙ ਚ ਜ ਤ ਧ ਸ" - AF_BLUE_STRING_GURMUKHI_HEAD - "ਕ ਗ ਙ ਚ ਜ ਤ ਧ ਸ" - AF_BLUE_STRING_GURMUKHI_TOP - "ਇ ਈ ਉ ਠਓ ੳ ਿ à©€" - AF_BLUE_STRING_GURMUKHI_BOTTOM - "ਅ ਠਓ ਗ ਜ ਠਰ ਸ" - AF_BLUE_STRING_GURMUKHI_DIGIT_TOP - "੦ à©§ ੨ à©© à©" - - AF_BLUE_STRING_HEBREW_TOP - "ב ד ×” ×— ך ×› × ×¡" - AF_BLUE_STRING_HEBREW_BOTTOM - "ב ט ×› × ×¡ צ" - AF_BLUE_STRING_HEBREW_DESCENDER - "×§ ך ן ×£ ×¥" - - AF_BLUE_STRING_KANNADA_TOP - "ಇ ಊ ಠಣ ಸಾ ನಾ ದಾ ರಾ" - AF_BLUE_STRING_KANNADA_BOTTOM - "ಅ ಉ ಎ ಲ ೦ ೨ ೬ à³" - - AF_BLUE_STRING_KAYAH_LI_TOP - "꤅ ê¤ ê¤ ê¤‹ ꤀ ê¤" - AF_BLUE_STRING_KAYAH_LI_BOTTOM - "꤈ ꤘ ꤀ ê¤ ê¤¢" - AF_BLUE_STRING_KAYAH_LI_ASCENDER - "ꤖ ꤡ" - AF_BLUE_STRING_KAYAH_LI_DESCENDER - "ꤑ ꤜ ꤞ" - AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER - "ꤑ꤬ ê¤œê¤ ê¤”ê¤¬" - - AF_BLUE_STRING_KHMER_TOP - "áž áž‘ áž“ áž§ áž© áž¶" - AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP - "ក្ក ក្ហក្គ ក្áž" - AF_BLUE_STRING_KHMER_BOTTOM - "ហឃ áž… áž‹ áž” ម áž™ áž²" - AF_BLUE_STRING_KHMER_DESCENDER - "ážáŸ’ážš រៀ ឲ្យ អឿ" - AF_BLUE_STRING_KHMER_LARGE_DESCENDER - "ន្ážáŸ’រៃ ង្ážáŸ’áž™ ក្បៀ ច្រៀ ន្ážáž¿ ល្បឿ" - - AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP - "á§ á§¡" - AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM - "á§¶ á§¹" - - AF_BLUE_STRING_LAO_TOP - "າ ດ ຠມ ລ ວ ຣ ງ" - AF_BLUE_STRING_LAO_BOTTOM - "າ ຠບ ຠຣ ຮ ວ ຢ" - AF_BLUE_STRING_LAO_ASCENDER - "ປ ຢ ຟ àº" - AF_BLUE_STRING_LAO_LARGE_ASCENDER - "ໂ ໄ ໃ" - AF_BLUE_STRING_LAO_DESCENDER - "ງ ຊ ຖ ຽ ໆ ຯ" - - AF_BLUE_STRING_LATIN_CAPITAL_TOP - "T H E Z O C Q S" - AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM - "H E Z L O C U S" - AF_BLUE_STRING_LATIN_SMALL_F_TOP - "f i j k d b h" - AF_BLUE_STRING_LATIN_SMALL_TOP - "u v x z o e s c" - AF_BLUE_STRING_LATIN_SMALL_BOTTOM - "n r x z o e s c" - AF_BLUE_STRING_LATIN_SMALL_DESCENDER - "p q g j y" - - // we assume that both the subscript and superscript ranges - // don't contain oldstyle digits (actually, most fonts probably - // have digits only in those ranges) - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP - "â‚€ ₃ â‚… ₇ ₈" - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM - "â‚€ â‚ â‚‚ ₃ ₈" - AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP - "áµ¢ â±¼ â‚• â‚– â‚—" - AF_BLUE_STRING_LATIN_SUBS_SMALL - "â‚ â‚‘ â‚’ â‚“ â‚™ â‚› áµ¥ ᵤ áµ£" - AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER - "ᵦ áµ§ ᵨ ᵩ ₚ" - - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP - "Ⱐ³ âµ â· áµ€ á´´ á´± á´¼" - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM - "Ⱐ¹ ² ³ á´± á´¸ á´¼ áµ" - AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP - "ᵇ ᵈ ᵠʰ ʲ á¶ â±" - AF_BLUE_STRING_LATIN_SUPS_SMALL - "ᵉ áµ’ ʳ Ë¢ Ë£ á¶œ á¶»" - AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER - "áµ– ʸ áµ" - - AF_BLUE_STRING_LISU_TOP - "ê“¡ ê“§ ꓱ ê“¶ ê“© ꓚ ꓵ ꓳ" - AF_BLUE_STRING_LISU_BOTTOM - "ê“• ꓜ ꓞ ê“¡ ê“› ê“¢ ꓳ ê“´" - - AF_BLUE_STRING_MALAYALAM_TOP - "à´’ à´Ÿ à´ à´± à´š à´ª à´šàµà´š à´ªàµà´ª" - AF_BLUE_STRING_MALAYALAM_BOTTOM - "à´Ÿ à´ à´§ à´¶ à´˜ à´š à´¥ à´²" - - AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_TOP - "ð–¹€ 𖹠𖹂 𖹃 𖹠𖹚 𖹟" - AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_BOTTOM - "ð–¹€ 𖹠𖹂 𖹃 𖹠𖹚 ð–¹’ 𖹓" - AF_BLUE_STRING_MEDEFAIDRIN_SMALL_F_TOP - "𖹤 𖹬 ð–¹§ ð–¹´ ð–¹¶ ð–¹¾" - AF_BLUE_STRING_MEDEFAIDRIN_SMALL_TOP - "𖹠𖹡 ð–¹¢ ð–¹¹ ð–¹³ ð–¹®" - AF_BLUE_STRING_MEDEFAIDRIN_SMALL_BOTTOM - "𖹠𖹡 ð–¹¢ ð–¹³ ð–¹ ð–¹½" - AF_BLUE_STRING_MEDEFAIDRIN_SMALL_DESCENDER - "ð–¹¥ 𖹨 𖹩" - AF_BLUE_STRING_MEDEFAIDRIN_DIGIT_TOP - "𖺀 ð–º… 𖺈 𖺄 ð–º" - - AF_BLUE_STRING_MONGOLIAN_TOP_BASE - "á ³ á ´ á ¶ á ½ á¡‚ ᡊ â€á¡¡â€ â€á¡³â€" - AF_BLUE_STRING_MONGOLIAN_BOTTOM_BASE - "ᡃ" - - AF_BLUE_STRING_MYANMAR_TOP - "ဠဂ င ဒ ဠᥠአá‹" - AF_BLUE_STRING_MYANMAR_BOTTOM - "င ဎ ဒ ပ ဗ ဠአá‹" - AF_BLUE_STRING_MYANMAR_ASCENDER - "ဩ ြ á á ᆠါ á€" - AF_BLUE_STRING_MYANMAR_DESCENDER - "ဉ ည ဥ ဩ ဨ á‚ á… á‰" - - AF_BLUE_STRING_NKO_TOP - "ß ß‰ ß’ ߟ ß– ßœ ß ß¥" - AF_BLUE_STRING_NKO_BOTTOM - "߀ ߘ ß¡ ß ß¥" - AF_BLUE_STRING_NKO_SMALL_TOP - "ß ß› ß‹" - AF_BLUE_STRING_NKO_SMALL_BOTTOM - "ߎ ß ß› ß‹" - - AF_BLUE_STRING_OL_CHIKI - "á±› ᱜ ᱠᱡ á±¢ á±¥" - - AF_BLUE_STRING_OLD_TURKIC_TOP - "ð°— ð°˜ ð°§" - AF_BLUE_STRING_OLD_TURKIC_BOTTOM - "ð°‰ ð°— ð°¦ ð°§" - - AF_BLUE_STRING_OSAGE_CAPITAL_TOP - "ð’¾ ð“ ð“’ ð““ ð’» ð“‚ ð’µ ð“†" - AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM - "ð’° ð“ 𓂠𒿠𓎠ð’¹" - AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER - "ð’¼ ð’½ ð’¾" - AF_BLUE_STRING_OSAGE_SMALL_TOP - "𓵠𓶠𓺠𓻠ð“ 𓣠𓪠ð“®" - AF_BLUE_STRING_OSAGE_SMALL_BOTTOM - "𓘠𓚠𓣠𓵠𓡠𓧠𓪠ð“¶" - AF_BLUE_STRING_OSAGE_SMALL_ASCENDER - "𓤠𓦠𓸠𓹠ð“›" - AF_BLUE_STRING_OSAGE_SMALL_DESCENDER - "𓤠𓥠ð“¦" - - AF_BLUE_STRING_OSMANYA_TOP - "ð’† ð’‰ ð’ ð’’ ð’˜ ð’› ð’ ð’£" - AF_BLUE_STRING_OSMANYA_BOTTOM - "ð’€ ð’‚ ð’† ð’ˆ ð’Š ð’’ ð’ ð’©" - - AF_BLUE_STRING_ROHINGYA_TOP - "ð´ƒ ð´€ ð´† ð´– ð´•" - AF_BLUE_STRING_ROHINGYA_BOTTOM - "ð´” ð´– ð´• ð´‘ ð´" - AF_BLUE_STRING_ROHINGYA_JOIN - "Ù€" - - AF_BLUE_STRING_SAURASHTRA_TOP - "ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ê¢ ê¢›" - AF_BLUE_STRING_SAURASHTRA_BOTTOM - "ꢂ ꢨ ꢺ ꢤ ꢎ" - - AF_BLUE_STRING_SHAVIAN_TOP - "ð‘• ð‘™" - AF_BLUE_STRING_SHAVIAN_BOTTOM - "𑔠𑖠𑗠𑹠ð‘»" - AF_BLUE_STRING_SHAVIAN_DESCENDER - "𑟠ð‘£" - AF_BLUE_STRING_SHAVIAN_SMALL_TOP - "𑱠𑲠𑳠𑴠𑸠𑺠ð‘¼" - AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM - "ð‘´ ð‘» ð‘¹" - - AF_BLUE_STRING_SINHALA_TOP - "ඉ à¶š à¶ à¶³ à¶´ ය à¶½ à·†" - AF_BLUE_STRING_SINHALA_BOTTOM - "à¶‘ à¶” à¶ à¶¢ à¶§ à¶® à¶° à¶»" - AF_BLUE_STRING_SINHALA_DESCENDER - "ද à¶³ à¶‹ à¶½ à¶à·– à¶à·” à¶¶à·” දු" - - AF_BLUE_STRING_SUNDANESE_TOP - "ᮋ ᮞ á®® ᮽ á®° ᮈ" - AF_BLUE_STRING_SUNDANESE_BOTTOM - "ᮄ á®” ᮕ á®— á®° ᮆ ᮈ ᮉ" - AF_BLUE_STRING_SUNDANESE_DESCENDER - "ᮼ ᳄" - - AF_BLUE_STRING_TAI_VIET_TOP - "ꪆ ꪔ ꪒ ꪖ ꪫ" - AF_BLUE_STRING_TAI_VIET_BOTTOM - "ꪉ ꪫ ꪮ" - - AF_BLUE_STRING_TAMIL_TOP - "உ à®’ ஓ à®± ஈ க à®™ ச" - AF_BLUE_STRING_TAMIL_BOTTOM - "க ச ல à®¶ உ à®™ ட ப" - - AF_BLUE_STRING_TELUGU_TOP - "à°‡ à°Œ à°™ à°ž à°£ à°± ౯" - AF_BLUE_STRING_TELUGU_BOTTOM - "à°… à°• à°š à°° à°½ ౨ ౬" - - AF_BLUE_STRING_THAI_TOP - "บ เ ๠ภภา" - AF_BLUE_STRING_THAI_BOTTOM - "บ ป ษ ฯ ภย ฮ" - AF_BLUE_STRING_THAI_ASCENDER - "ป ภฟ" - AF_BLUE_STRING_THAI_LARGE_ASCENDER - "โ ใ ไ" - AF_BLUE_STRING_THAI_DESCENDER - "ฎ ภฤ ฦ" - AF_BLUE_STRING_THAI_LARGE_DESCENDER - "ภà¸" - AF_BLUE_STRING_THAI_DIGIT_TOP - "๠๑ ๓" - - AF_BLUE_STRING_TIFINAGH - "âµ” âµ™ âµ› ⵞ â´µ â´¼ â´¹ ⵎ" - - AF_BLUE_STRING_VAI_TOP - "ê— ê˜– ꘙ ꘜ ê–œ ê– ê”… ê•¢" - AF_BLUE_STRING_VAI_BOTTOM - "ê— ê˜– ꘙ ê—ž ê”… ê•¢ ê–œ ꔆ" - - -#ifdef AF_CONFIG_OPTION_CJK - - AF_BLUE_STRING_CJK_TOP - "ä»– 们 ä½ ä¾† 們 到 å’Œ 地" - " 对 å° å°± å¸ æˆ‘ æ—¶ 時 會" - " æ¥ ç‚º 能 舰 說 说 è¿™ 這" - " 齊 |" - " 军 åŒ å·² æ„¿ æ—¢ 星 是 景" - " æ°‘ ç…§ 现 ç¾ ç† ç”¨ ç½® è¦" - " è» é‚£ é… é‡Œ é–‹ é›· 露 é¢" - " 顾" - AF_BLUE_STRING_CJK_BOTTOM - "个 为 人 ä»– 以 们 ä½ ä¾†" - " 個 們 到 å’Œ 大 对 å° å°±" - " 我 æ—¶ 時 有 æ¥ ç‚º è¦ èªª" - " 说 |" - " 主 些 å› å®ƒ 想 æ„ ç† ç”Ÿ" - " ç•¶ 看 ç€ ç½® 者 自 è‘— 裡" - " 过 还 è¿› 進 éŽ é“ é‚„ 里" - " é¢" - -#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - - AF_BLUE_STRING_CJK_LEFT - " 些 们 ä½ ä¾† 們 到 å’Œ 地" - " 她 å°† å°‡ å°± å¹´ å¾— 情 最" - " æ · 樣 ç† èƒ½ 說 说 è¿™ 這" - " 通 |" - " å³ å— å§ å¬ å‘¢ å“ å“ å—Ž" - " 师 師 æ”¶ æ– æ–· 明 眼 é–“" - " é—´ é™… 陈 é™ é™¤ 陳 éš éš›" - " 隨" - AF_BLUE_STRING_CJK_RIGHT - "事 å‰ å¸ å°† å°‡ 情 想 或" - " 政 æ–¯ æ–° æ · 樣 æ°‘ æ²’ 没" - " ç„¶ 特 现 ç¾ çƒ ç¬¬ ç¶“ è°" - " èµ· |" - " 例 別 别 制 动 å‹• å— å—Ž" - " 增 指 明 æœ æœŸ æž„ 物 ç¡®" - " ç§ èª¿ è°ƒ è²» è´¹ é‚£ 都 é–“" - " é—´" - -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ - -#endif /* AF_CONFIG_OPTION_CJK */ - - -// The blue zone stringsets, as used in the script styles, cf. `afstyles.h'. -// -// The AF_BLUE_PROPERTY_XXX flags are defined in `afblue.h'; here some -// explanations. -// -// A blue zone in general is defined by a reference and an overshoot line. -// During the hinting process, all coordinate values between those two lines -// are set equal to the reference value, provided that the blue zone is not -// wider than 0.75 pixels (otherwise the blue zone gets ignored). All -// entries must have `AF_BLUE_STRING_MAX' as the final line. -// -// During the glyph analysis, edges are sorted from bottom to top, and then -// sequentially checked, edge by edge, against the blue zones in the order -// given below. -// -// -// latin auto-hinter -// ----------------- -// -// Characters in a blue string are automatically classified as having a flat -// (reference) or a round (overshoot) extremum. The blue zone is then set -// up by the mean values of all flat extrema and all round extrema, -// respectively. Only horizontal blue zones (i.e., adjusting vertical -// coordinate values) are supported. -// -// Some scripts like Khmer need character composition to get all necessary -// blue zones, since Unicode only provides an abstract data model that -// doesn't represent all possible glyph shapes. For such character -// clusters, the HarfBuzz library is used to convert them into the -// corresponding glyphs. The largest glyph element (where `largest' can be -// either `largest ascender' or `largest descender') then defines the -// corresponding flat or round extremum. -// -// For the latin auto-hinter, the overshoot should be larger than the -// reference for top zones, and vice versa for bottom zones. -// -// LATIN_TOP -// Take the maximum flat and round coordinate values of the blue string -// characters for computing the blue zone's reference and overshoot -// values. -// -// If not set, take the minimum values. -// -// Mutually exclusive with `LATIN_SUB_TOP'. -// -// LATIN_SUB_TOP -// For all glyphs of a character cluster, compute the maximum flat -// and round coordinate values of each component, then take the -// smallest of the maximum values. The idea is to get the top of -// subscript glyphs, as used in Khmer, for example. Note that -// this mechanism doesn't work for ordinary ligatures. -// -// This flags indicates a secondary blue zone: It gets removed if -// there is a non-LATIN_SUB_TOP blue zone at the same coordinate -// value (after scaling). -// -// Mutually exclusive with `LATIN_TOP'. -// -// LATIN_NEUTRAL -// Ignore round extrema and define the blue zone with flat values only. -// Both top and bottom of contours can match. This is useful for -// scripts like Devanagari where vowel signs attach to the base -// character and are implemented as components of composite glyphs. -// -// If not set, both round and flat extrema are taken into account. -// Additionally, only the top or the bottom of a contour can match, -// depending on the LATIN_TOP flag. -// -// Neutral blue zones should always follow non-neutral blue zones. -// -// LATIN_X_HEIGHT -// Scale all glyphs vertically from the corresponding script to make the -// reference line of this blue zone align on the grid. The scaling -// takes place before all other blue zones get aligned to the grid. -// Only one blue character string of a script style can have this flag. -// -// LATIN_LONG -// Apply an additional constraint for blue zone values: Don't -// necessarily use the extremum as-is but a segment of the topmost (or -// bottommost) contour that is longer than a heuristic threshold, and -// which is not too far away vertically from the real extremum. This -// ensures that small bumps in the outline are ignored (for example, the -// `vertical serifs' found in many Hebrew glyph designs). -// -// The segment must be at least EM/25 font units long, and the distance -// to the extremum must be smaller than EM/4. -// -// -// cjk auto-hinter -// --------------- -// -// Characters in a blue string are *not* automatically classified. Instead, -// first come the characters used for the overshoot value, then the -// character `|', then the characters used for the reference value -// (everything separated by space characters). The blue zone is then set up -// by the mean values of all reference values and all overshoot values, -// respectively. Both horizontal and vertical blue zones (i.e., adjusting -// vertical and horizontal coordinate values, respectively) are supported. -// -// For the cjk auto-hinter, the overshoot should be smaller than the -// reference for top zones, and vice versa for bottom zones. -// -// CJK_TOP -// Take the maximum flat and round coordinate values of the blue string -// characters. If not set, take the minimum values. -// -// CJK_RIGHT -// A synonym for CJK_TOP. If CJK_HORIZ is set, this flag indicates the -// right blue zone, taking horizontal maximum values. -// -// CJK_HORIZ -// Define a blue zone for horizontal hinting (i.e., vertical blue -// zones). If not set, this is a blue zone for vertical hinting. - - -AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: - - AF_BLUE_STRINGSET_ADLM - { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ARAB - { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ARABIC_BOTTOM, 0 } - { AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ARMN - { AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ARMENIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_AVST - { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_AVESTAN_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_BAMU - { AF_BLUE_STRING_BAMUM_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BAMUM_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_BENG - { AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BENGALI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_BENGALI_BASE, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_BUHD - { AF_BLUE_STRING_BUHID_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BUHID_LARGE, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_BUHID_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_BUHID_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CAKM - { AF_BLUE_STRING_CHAKMA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CHAKMA_BOTTOM, 0 } - { AF_BLUE_STRING_CHAKMA_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CANS - { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CARI - { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CARIAN_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CHER - { AF_BLUE_STRING_CHEROKEE_CAPITAL, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CHEROKEE_CAPITAL, 0 } - { AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CHEROKEE_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_CHEROKEE_SMALL, 0 } - { AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_COPT - { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CPRT - { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0 } - { AF_BLUE_STRING_CYPRIOT_SMALL, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CYPRIOT_SMALL, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_CYRL - { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_CYRILLIC_SMALL, 0 } - { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_DEVA - { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_DEVANAGARI_BASE, 0 } - { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_DSRT - { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ETHI - { AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GEOR - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM, 0 } - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0 } - { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GEOK - { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM, 0 } - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM, 0 } - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GLAG - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GOTH - { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GOTHIC_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GREK - { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GREEK_SMALL, 0 } - { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GUJR - { AF_BLUE_STRING_GUJARATI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GUJARATI_BOTTOM, 0 } - { AF_BLUE_STRING_GUJARATI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GUJARATI_DESCENDER, 0 } - { AF_BLUE_STRING_GUJARATI_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GURU - { AF_BLUE_STRING_GURMUKHI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GURMUKHI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GURMUKHI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_NEUTRAL | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GURMUKHI_BOTTOM, 0 } - { AF_BLUE_STRING_GURMUKHI_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_HEBR - { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_LONG } - { AF_BLUE_STRING_HEBREW_BOTTOM, 0 } - { AF_BLUE_STRING_HEBREW_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_KNDA - { AF_BLUE_STRING_KANNADA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_KANNADA_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_KALI - { AF_BLUE_STRING_KAYAH_LI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_KAYAH_LI_BOTTOM, 0 } - { AF_BLUE_STRING_KAYAH_LI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_KAYAH_LI_DESCENDER, 0 } - { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_KHMR - { AF_BLUE_STRING_KHMER_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP, AF_BLUE_PROPERTY_LATIN_SUB_TOP } - { AF_BLUE_STRING_KHMER_BOTTOM, 0 } - { AF_BLUE_STRING_KHMER_DESCENDER, 0 } - { AF_BLUE_STRING_KHMER_LARGE_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_KHMS - { AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LAO - { AF_BLUE_STRING_LAO_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LAO_BOTTOM, 0 } - { AF_BLUE_STRING_LAO_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LAO_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LAO_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LATN - { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LATB - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUBS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 } - { AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LATP - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUPS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 } - { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_LISU - { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LISU_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_MLYM - { AF_BLUE_STRING_MALAYALAM_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MALAYALAM_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_MEDF - { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MEDEFAIDRIN_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_MONG - { AF_BLUE_STRING_MONGOLIAN_TOP_BASE, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MONGOLIAN_BOTTOM_BASE, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_MYMR - { AF_BLUE_STRING_MYANMAR_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_MYANMAR_BOTTOM, 0 } - { AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MYANMAR_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_NKOO - { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_NKO_BOTTOM, 0 } - { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_NONE - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_OLCK - { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OL_CHIKI, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ORKH - { AF_BLUE_STRING_OLD_TURKIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_OSGE - { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 } - { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_OSMA - { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OSMANYA_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_ROHG - { AF_BLUE_STRING_ROHINGYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ROHINGYA_BOTTOM, 0 } - { AF_BLUE_STRING_ROHINGYA_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_SAUR - { AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_SHAW - { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 } - { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 } - { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_SINH - { AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SINHALA_BOTTOM, 0 } - { AF_BLUE_STRING_SINHALA_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_SUND - { AF_BLUE_STRING_SUNDANESE_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SUNDANESE_BOTTOM, 0 } - { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_TAML - { AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_TAMIL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_TAVT - { AF_BLUE_STRING_TAI_VIET_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_TELU - { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_TELUGU_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_THAI - { AF_BLUE_STRING_THAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_THAI_BOTTOM, 0 } - { AF_BLUE_STRING_THAI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_THAI_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_THAI_DESCENDER, 0 } - { AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0 } - { AF_BLUE_STRING_THAI_DIGIT_TOP, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_TFNG - { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_TIFINAGH, 0 } - { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_VAII - { AF_BLUE_STRING_VAI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_VAI_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } - -#ifdef AF_CONFIG_OPTION_CJK - - AF_BLUE_STRINGSET_HANI - { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP } - { AF_BLUE_STRING_CJK_BOTTOM, 0 } -#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ } - { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | - AF_BLUE_PROPERTY_CJK_RIGHT } -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ - { AF_BLUE_STRING_MAX, 0 } - -#endif /* AF_CONFIG_OPTION_CJK */ - - -// END diff --git a/thirdparty/freetype/src/autofit/afblue.h b/thirdparty/freetype/src/autofit/afblue.h index 311c9e3afd..0e56abb94d 100644 --- a/thirdparty/freetype/src/autofit/afblue.h +++ b/thirdparty/freetype/src/autofit/afblue.h @@ -7,7 +7,7 @@ * * Auto-fitter data for blue strings (specification). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afblue.hin b/thirdparty/freetype/src/autofit/afblue.hin index 5186914937..f9fd5aa3b4 100644 --- a/thirdparty/freetype/src/autofit/afblue.hin +++ b/thirdparty/freetype/src/autofit/afblue.hin @@ -4,7 +4,7 @@ * * Auto-fitter data for blue strings (specification). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afcjk.c b/thirdparty/freetype/src/autofit/afcjk.c index 7e46b6b1ef..1853a17f5c 100644 --- a/thirdparty/freetype/src/autofit/afcjk.c +++ b/thirdparty/freetype/src/autofit/afcjk.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for CJK writing system (body). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -843,7 +843,7 @@ { AF_AxisHints axis = &hints->axis[dim]; AF_Segment segments = axis->segments; - AF_Segment segment_limit = segments + axis->num_segments; + AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments ); AF_Direction major_dir = axis->major_dir; AF_Segment seg1, seg2; FT_Pos len_threshold; @@ -1005,7 +1005,7 @@ AF_CJKAxis laxis = &((AF_CJKMetrics)hints->metrics)->axis[dim]; AF_Segment segments = axis->segments; - AF_Segment segment_limit = segments + axis->num_segments; + AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments ); AF_Segment seg; FT_Fixed scale; @@ -1153,7 +1153,7 @@ */ { AF_Edge edges = axis->edges; - AF_Edge edge_limit = edges + axis->num_edges; + AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); AF_Edge edge; @@ -1291,7 +1291,7 @@ { AF_AxisHints axis = &hints->axis[dim]; AF_Edge edge = axis->edges; - AF_Edge edge_limit = edge + axis->num_edges; + AF_Edge edge_limit = FT_OFFSET( edge, axis->num_edges ); AF_CJKAxis cjk = &metrics->axis[dim]; FT_Fixed scale = cjk->scale; FT_Pos best_dist0; /* initial threshold */ @@ -1798,7 +1798,7 @@ { AF_AxisHints axis = &hints->axis[dim]; AF_Edge edges = axis->edges; - AF_Edge edge_limit = edges + axis->num_edges; + AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); FT_PtrDist n_edges; AF_Edge edge; AF_Edge anchor = NULL; @@ -2177,7 +2177,7 @@ { AF_AxisHints axis = & hints->axis[dim]; AF_Edge edges = axis->edges; - AF_Edge edge_limit = edges + axis->num_edges; + AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); AF_Edge edge; FT_Bool snapping; diff --git a/thirdparty/freetype/src/autofit/afcjk.h b/thirdparty/freetype/src/autofit/afcjk.h index 58aa298dad..bf948bcec0 100644 --- a/thirdparty/freetype/src/autofit/afcjk.h +++ b/thirdparty/freetype/src/autofit/afcjk.h @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for CJK writing system (specification). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afcover.h b/thirdparty/freetype/src/autofit/afcover.h index c7ae1e9a8a..be71fe39de 100644 --- a/thirdparty/freetype/src/autofit/afcover.h +++ b/thirdparty/freetype/src/autofit/afcover.h @@ -4,7 +4,7 @@ * * Auto-fitter coverages (specification only). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afdummy.c b/thirdparty/freetype/src/autofit/afdummy.c index a36b56f784..5fdbfcfd42 100644 --- a/thirdparty/freetype/src/autofit/afdummy.c +++ b/thirdparty/freetype/src/autofit/afdummy.c @@ -5,7 +5,7 @@ * Auto-fitter dummy routines to be used if no hinting should be * performed (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afdummy.h b/thirdparty/freetype/src/autofit/afdummy.h index b58849fe50..4dddbd5215 100644 --- a/thirdparty/freetype/src/autofit/afdummy.h +++ b/thirdparty/freetype/src/autofit/afdummy.h @@ -5,7 +5,7 @@ * Auto-fitter dummy routines to be used if no hinting should be * performed (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/aferrors.h b/thirdparty/freetype/src/autofit/aferrors.h index 09bed66395..d31b1a9c88 100644 --- a/thirdparty/freetype/src/autofit/aferrors.h +++ b/thirdparty/freetype/src/autofit/aferrors.h @@ -4,7 +4,7 @@ * * Autofitter error codes (specification only). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afglobal.c b/thirdparty/freetype/src/autofit/afglobal.c index b805b3b0e5..87a3fbfb0f 100644 --- a/thirdparty/freetype/src/autofit/afglobal.c +++ b/thirdparty/freetype/src/autofit/afglobal.c @@ -4,7 +4,7 @@ * * Auto-fitter routines to compute global hinting values (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -337,11 +337,13 @@ /* we allocate an AF_FaceGlobals structure together */ /* with the glyph_styles array */ - if ( FT_ALLOC( globals, - sizeof ( *globals ) + - (FT_ULong)face->num_glyphs * sizeof ( FT_UShort ) ) ) + if ( FT_QALLOC( globals, + sizeof ( *globals ) + + (FT_ULong)face->num_glyphs * sizeof ( FT_UShort ) ) ) goto Exit; + FT_ZERO( &globals->metrics ); + globals->face = face; globals->glyph_count = face->num_glyphs; /* right after the globals structure come the glyph styles */ diff --git a/thirdparty/freetype/src/autofit/afglobal.h b/thirdparty/freetype/src/autofit/afglobal.h index cd97e716c4..f7ebf8d57a 100644 --- a/thirdparty/freetype/src/autofit/afglobal.h +++ b/thirdparty/freetype/src/autofit/afglobal.h @@ -5,7 +5,7 @@ * Auto-fitter routines to compute global hinting values * (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afhints.c b/thirdparty/freetype/src/autofit/afhints.c index 5506afda22..ae7d10528d 100644 --- a/thirdparty/freetype/src/autofit/afhints.c +++ b/thirdparty/freetype/src/autofit/afhints.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1316,7 +1316,7 @@ { AF_AxisHints axis = & hints->axis[dim]; AF_Segment segments = axis->segments; - AF_Segment segment_limit = segments + axis->num_segments; + AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments ); AF_Segment seg; @@ -1393,7 +1393,7 @@ AF_Point point_limit = points + hints->num_points; AF_AxisHints axis = &hints->axis[dim]; AF_Edge edges = axis->edges; - AF_Edge edge_limit = edges + axis->num_edges; + AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); FT_UInt touch_flag; diff --git a/thirdparty/freetype/src/autofit/afhints.h b/thirdparty/freetype/src/autofit/afhints.h index 38d2847d71..96001cd80d 100644 --- a/thirdparty/freetype/src/autofit/afhints.h +++ b/thirdparty/freetype/src/autofit/afhints.h @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afindic.c b/thirdparty/freetype/src/autofit/afindic.c index 064c300ed7..5bf0b5f945 100644 --- a/thirdparty/freetype/src/autofit/afindic.c +++ b/thirdparty/freetype/src/autofit/afindic.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for Indic writing system (body). * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afindic.h b/thirdparty/freetype/src/autofit/afindic.h index 3e46724112..59ae11a677 100644 --- a/thirdparty/freetype/src/autofit/afindic.h +++ b/thirdparty/freetype/src/autofit/afindic.h @@ -5,7 +5,7 @@ * Auto-fitter hinting routines for Indic writing system * (specification). * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/aflatin.c b/thirdparty/freetype/src/autofit/aflatin.c index 5e81d771a4..bed0ccee08 100644 --- a/thirdparty/freetype/src/autofit/aflatin.c +++ b/thirdparty/freetype/src/autofit/aflatin.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for latin writing system (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -200,7 +200,7 @@ (AF_Dimension)dim ); seg = axhints->segments; - limit = seg + axhints->num_segments; + limit = FT_OFFSET( seg, axhints->num_segments ); for ( ; seg < limit; seg++ ) { @@ -1989,7 +1989,7 @@ { AF_AxisHints axis = &hints->axis[dim]; AF_Segment segments = axis->segments; - AF_Segment segment_limit = segments + axis->num_segments; + AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments ); FT_Pos len_threshold, len_score, dist_score, max_width; AF_Segment seg1, seg2; @@ -2134,7 +2134,7 @@ FT_Bool top_to_bottom_hinting = 0; AF_Segment segments = axis->segments; - AF_Segment segment_limit = segments + axis->num_segments; + AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments ); AF_Segment seg; #if 0 @@ -2500,7 +2500,7 @@ { AF_AxisHints axis = &hints->axis[AF_DIMENSION_VERT]; AF_Edge edge = axis->edges; - AF_Edge edge_limit = edge + axis->num_edges; + AF_Edge edge_limit = FT_OFFSET( edge, axis->num_edges ); AF_LatinAxis latin = &metrics->axis[AF_DIMENSION_VERT]; FT_Fixed scale = latin->scale; @@ -2993,7 +2993,7 @@ { AF_AxisHints axis = &hints->axis[dim]; AF_Edge edges = axis->edges; - AF_Edge edge_limit = edges + axis->num_edges; + AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); FT_PtrDist n_edges; AF_Edge edge; AF_Edge anchor = NULL; diff --git a/thirdparty/freetype/src/autofit/aflatin.h b/thirdparty/freetype/src/autofit/aflatin.h index d6b919ef84..facc663450 100644 --- a/thirdparty/freetype/src/autofit/aflatin.h +++ b/thirdparty/freetype/src/autofit/aflatin.h @@ -5,7 +5,7 @@ * Auto-fitter hinting routines for latin writing system * (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afloader.c b/thirdparty/freetype/src/autofit/afloader.c index a06d49ad7e..e55183a509 100644 --- a/thirdparty/freetype/src/autofit/afloader.c +++ b/thirdparty/freetype/src/autofit/afloader.c @@ -4,7 +4,7 @@ * * Auto-fitter glyph loading routines (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afloader.h b/thirdparty/freetype/src/autofit/afloader.h index b4936a8722..b345e46395 100644 --- a/thirdparty/freetype/src/autofit/afloader.h +++ b/thirdparty/freetype/src/autofit/afloader.h @@ -4,7 +4,7 @@ * * Auto-fitter glyph loading routines (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afmodule.c b/thirdparty/freetype/src/autofit/afmodule.c index 76f9b3733b..1b14ae682e 100644 --- a/thirdparty/freetype/src/autofit/afmodule.c +++ b/thirdparty/freetype/src/autofit/afmodule.c @@ -4,7 +4,7 @@ * * Auto-fitter module implementation (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afmodule.h b/thirdparty/freetype/src/autofit/afmodule.h index c5bd468201..1d1bfaf544 100644 --- a/thirdparty/freetype/src/autofit/afmodule.h +++ b/thirdparty/freetype/src/autofit/afmodule.h @@ -4,7 +4,7 @@ * * Auto-fitter module implementation (specification). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afranges.c b/thirdparty/freetype/src/autofit/afranges.c index e06f182dd0..2de1991a57 100644 --- a/thirdparty/freetype/src/autofit/afranges.c +++ b/thirdparty/freetype/src/autofit/afranges.c @@ -4,7 +4,7 @@ * * Auto-fitter Unicode script ranges (body). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afranges.h b/thirdparty/freetype/src/autofit/afranges.h index 841d630aab..acd01faf68 100644 --- a/thirdparty/freetype/src/autofit/afranges.h +++ b/thirdparty/freetype/src/autofit/afranges.h @@ -4,7 +4,7 @@ * * Auto-fitter Unicode script ranges (specification). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afscript.h b/thirdparty/freetype/src/autofit/afscript.h index af78d573e1..172b598069 100644 --- a/thirdparty/freetype/src/autofit/afscript.h +++ b/thirdparty/freetype/src/autofit/afscript.h @@ -4,7 +4,7 @@ * * Auto-fitter scripts (specification only). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afshaper.c b/thirdparty/freetype/src/autofit/afshaper.c index 5d078937e1..298480d864 100644 --- a/thirdparty/freetype/src/autofit/afshaper.c +++ b/thirdparty/freetype/src/autofit/afshaper.c @@ -4,7 +4,7 @@ * * HarfBuzz interface for accessing OpenType features (body). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afshaper.h b/thirdparty/freetype/src/autofit/afshaper.h index cf3f81342f..558f03bdef 100644 --- a/thirdparty/freetype/src/autofit/afshaper.h +++ b/thirdparty/freetype/src/autofit/afshaper.h @@ -4,7 +4,7 @@ * * HarfBuzz interface for accessing OpenType features (specification). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afstyles.h b/thirdparty/freetype/src/autofit/afstyles.h index 64c808c581..9080b9fb65 100644 --- a/thirdparty/freetype/src/autofit/afstyles.h +++ b/thirdparty/freetype/src/autofit/afstyles.h @@ -4,7 +4,7 @@ * * Auto-fitter styles (specification only). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/aftypes.h b/thirdparty/freetype/src/autofit/aftypes.h index 1d792b9476..754aad7ba4 100644 --- a/thirdparty/freetype/src/autofit/aftypes.h +++ b/thirdparty/freetype/src/autofit/aftypes.h @@ -4,7 +4,7 @@ * * Auto-fitter types (specification only). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afws-decl.h b/thirdparty/freetype/src/autofit/afws-decl.h index c10dd57e7b..c93845ef95 100644 --- a/thirdparty/freetype/src/autofit/afws-decl.h +++ b/thirdparty/freetype/src/autofit/afws-decl.h @@ -4,7 +4,7 @@ * * Auto-fitter writing system declarations (specification only). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afws-iter.h b/thirdparty/freetype/src/autofit/afws-iter.h index 55714203e3..9cda3509bc 100644 --- a/thirdparty/freetype/src/autofit/afws-iter.h +++ b/thirdparty/freetype/src/autofit/afws-iter.h @@ -4,7 +4,7 @@ * * Auto-fitter writing systems iterator (specification only). * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/autofit.c b/thirdparty/freetype/src/autofit/autofit.c index 7e692b4de9..3d78a9b335 100644 --- a/thirdparty/freetype/src/autofit/autofit.c +++ b/thirdparty/freetype/src/autofit/autofit.c @@ -4,7 +4,7 @@ * * Auto-fitter module (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftadvanc.c b/thirdparty/freetype/src/base/ftadvanc.c index f20b9928aa..fc6b428817 100644 --- a/thirdparty/freetype/src/base/ftadvanc.c +++ b/thirdparty/freetype/src/base/ftadvanc.c @@ -4,7 +4,7 @@ * * Quick computation of advance widths (body). * - * Copyright (C) 2008-2021 by + * Copyright (C) 2008-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftbase.c b/thirdparty/freetype/src/base/ftbase.c index 7366bc46db..cd1056890f 100644 --- a/thirdparty/freetype/src/base/ftbase.c +++ b/thirdparty/freetype/src/base/ftbase.c @@ -4,7 +4,7 @@ * * Single object library component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftbase.h b/thirdparty/freetype/src/base/ftbase.h index 963ff93d68..f873566f22 100644 --- a/thirdparty/freetype/src/base/ftbase.h +++ b/thirdparty/freetype/src/base/ftbase.h @@ -4,7 +4,7 @@ * * Private functions used in the `base' module (specification). * - * Copyright (C) 2008-2021 by + * Copyright (C) 2008-2022 by * David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. * * This file is part of the FreeType project, and may only be used, @@ -28,6 +28,7 @@ FT_BEGIN_HEADER FT_DECLARE_GLYPH( ft_bitmap_glyph_class ) FT_DECLARE_GLYPH( ft_outline_glyph_class ) + FT_DECLARE_GLYPH( ft_svg_glyph_class ) #ifdef FT_CONFIG_OPTION_MAC_FONTS diff --git a/thirdparty/freetype/src/base/ftbbox.c b/thirdparty/freetype/src/base/ftbbox.c index 4db29cbf83..30aedf780c 100644 --- a/thirdparty/freetype/src/base/ftbbox.c +++ b/thirdparty/freetype/src/base/ftbbox.c @@ -4,7 +4,7 @@ * * FreeType bbox computation (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/thirdparty/freetype/src/base/ftbdf.c b/thirdparty/freetype/src/base/ftbdf.c index f93ca8eb75..4f22113d7e 100644 --- a/thirdparty/freetype/src/base/ftbdf.c +++ b/thirdparty/freetype/src/base/ftbdf.c @@ -4,7 +4,7 @@ * * FreeType API for accessing BDF-specific strings (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftbitmap.c b/thirdparty/freetype/src/base/ftbitmap.c index 2146d3e364..7825895ad6 100644 --- a/thirdparty/freetype/src/base/ftbitmap.c +++ b/thirdparty/freetype/src/base/ftbitmap.c @@ -4,7 +4,7 @@ * * FreeType utility functions for bitmaps (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -480,7 +480,7 @@ * A gamma of 2.2 is fair to assume. And then, we need to * undo the premultiplication too. * - * https://accessibility.kde.org/hsl-adjusted.php + * http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html#SideNotes * * We do the computation with integers only, applying a gamma of 2.0. * We guarantee 32-bit arithmetic to avoid overflow but the resulting @@ -488,9 +488,9 @@ * */ - l = ( 4732UL /* 0.0722 * 65536 */ * bgra[0] * bgra[0] + - 46871UL /* 0.7152 * 65536 */ * bgra[1] * bgra[1] + - 13933UL /* 0.2126 * 65536 */ * bgra[2] * bgra[2] ) >> 16; + l = ( 4731UL /* 0.072186 * 65536 */ * bgra[0] * bgra[0] + + 46868UL /* 0.715158 * 65536 */ * bgra[1] * bgra[1] + + 13937UL /* 0.212656 * 65536 */ * bgra[2] * bgra[2] ) >> 16; /* * Final transparency can be determined as follows. diff --git a/thirdparty/freetype/src/base/ftcalc.c b/thirdparty/freetype/src/base/ftcalc.c index 9df8e4010d..6c1e7fbd45 100644 --- a/thirdparty/freetype/src/base/ftcalc.c +++ b/thirdparty/freetype/src/base/ftcalc.c @@ -4,7 +4,7 @@ * * Arithmetic computations (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftcid.c b/thirdparty/freetype/src/base/ftcid.c index 216ee2b3e4..b882ca3de0 100644 --- a/thirdparty/freetype/src/base/ftcid.c +++ b/thirdparty/freetype/src/base/ftcid.c @@ -4,7 +4,7 @@ * * FreeType API for accessing CID font information. * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * Derek Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftcolor.c b/thirdparty/freetype/src/base/ftcolor.c index 3ef3256b20..0edf379b43 100644 --- a/thirdparty/freetype/src/base/ftcolor.c +++ b/thirdparty/freetype/src/base/ftcolor.c @@ -4,7 +4,7 @@ * * FreeType's glyph color management (body). * - * Copyright (C) 2018-2021 by + * Copyright (C) 2018-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftdbgmem.c b/thirdparty/freetype/src/base/ftdbgmem.c index 4f5c1e7697..1df83c404d 100644 --- a/thirdparty/freetype/src/base/ftdbgmem.c +++ b/thirdparty/freetype/src/base/ftdbgmem.c @@ -4,7 +4,7 @@ * * Memory debugger (body). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftdebug.c b/thirdparty/freetype/src/base/ftdebug.c index 3485791306..648fff44ed 100644 --- a/thirdparty/freetype/src/base/ftdebug.c +++ b/thirdparty/freetype/src/base/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/fterrors.c b/thirdparty/freetype/src/base/fterrors.c index 14649268f8..5846fefc91 100644 --- a/thirdparty/freetype/src/base/fterrors.c +++ b/thirdparty/freetype/src/base/fterrors.c @@ -4,7 +4,7 @@ * * FreeType API for error code handling. * - * Copyright (C) 2018-2021 by + * Copyright (C) 2018-2022 by * Armin Hasitzka, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftfntfmt.c b/thirdparty/freetype/src/base/ftfntfmt.c index 4e1b830190..e69c1e0684 100644 --- a/thirdparty/freetype/src/base/ftfntfmt.c +++ b/thirdparty/freetype/src/base/ftfntfmt.c @@ -4,7 +4,7 @@ * * FreeType utility file for font formats (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftfstype.c b/thirdparty/freetype/src/base/ftfstype.c index 57e904d6f4..009d58c57d 100644 --- a/thirdparty/freetype/src/base/ftfstype.c +++ b/thirdparty/freetype/src/base/ftfstype.c @@ -4,7 +4,7 @@ * * FreeType utility file to access FSType data (body). * - * Copyright (C) 2008-2021 by + * Copyright (C) 2008-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftgasp.c b/thirdparty/freetype/src/base/ftgasp.c index b744f0a465..7567e3077a 100644 --- a/thirdparty/freetype/src/base/ftgasp.c +++ b/thirdparty/freetype/src/base/ftgasp.c @@ -4,7 +4,7 @@ * * Access of TrueType's `gasp' table (body). * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftgloadr.c b/thirdparty/freetype/src/base/ftgloadr.c index 83ce0660ae..f05abdee81 100644 --- a/thirdparty/freetype/src/base/ftgloadr.c +++ b/thirdparty/freetype/src/base/ftgloadr.c @@ -4,7 +4,7 @@ * * The FreeType glyph loader (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftglyph.c b/thirdparty/freetype/src/base/ftglyph.c index e2c6f73f80..571dca1a96 100644 --- a/thirdparty/freetype/src/base/ftglyph.c +++ b/thirdparty/freetype/src/base/ftglyph.c @@ -4,7 +4,7 @@ * * FreeType convenience functions to handle glyphs (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -34,6 +34,7 @@ #include <freetype/ftoutln.h> #include <freetype/ftbitmap.h> #include <freetype/internal/ftobjs.h> +#include <freetype/otsvg.h> #include "ftbase.h" @@ -277,6 +278,240 @@ ) +#ifdef FT_CONFIG_OPTION_SVG + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** FT_SvgGlyph support ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + FT_CALLBACK_DEF( FT_Error ) + ft_svg_glyph_init( FT_Glyph svg_glyph, + FT_GlyphSlot slot ) + { + FT_ULong doc_length; + FT_SVG_Document document; + FT_SvgGlyph glyph = (FT_SvgGlyph)svg_glyph; + + FT_Error error = FT_Err_Ok; + FT_Memory memory = FT_GLYPH( glyph )->library->memory; + + + if ( slot->format != FT_GLYPH_FORMAT_SVG ) + { + error = FT_THROW( Invalid_Glyph_Format ); + goto Exit; + } + + if ( slot->other == NULL ) + { + error = FT_THROW( Invalid_Slot_Handle ); + goto Exit; + } + + document = (FT_SVG_Document)slot->other; + + if ( document->svg_document_length == 0 ) + { + error = FT_THROW( Invalid_Slot_Handle ); + goto Exit; + } + + /* allocate a new document */ + doc_length = document->svg_document_length; + if ( FT_QALLOC( glyph->svg_document, doc_length ) ) + goto Exit; + glyph->svg_document_length = doc_length; + + glyph->glyph_index = slot->glyph_index; + + glyph->metrics = document->metrics; + glyph->units_per_EM = document->units_per_EM; + + glyph->start_glyph_id = document->start_glyph_id; + glyph->end_glyph_id = document->end_glyph_id; + + glyph->transform = document->transform; + glyph->delta = document->delta; + + /* copy the document into glyph */ + FT_MEM_COPY( glyph->svg_document, document->svg_document, doc_length ); + + Exit: + return error; + } + + + FT_CALLBACK_DEF( void ) + ft_svg_glyph_done( FT_Glyph svg_glyph ) + { + FT_SvgGlyph glyph = (FT_SvgGlyph)svg_glyph; + FT_Memory memory = svg_glyph->library->memory; + + + /* just free the memory */ + FT_FREE( glyph->svg_document ); + } + + + FT_CALLBACK_DEF( FT_Error ) + ft_svg_glyph_copy( FT_Glyph svg_source, + FT_Glyph svg_target ) + { + FT_SvgGlyph source = (FT_SvgGlyph)svg_source; + FT_SvgGlyph target = (FT_SvgGlyph)svg_target; + + FT_Error error = FT_Err_Ok; + FT_Memory memory = FT_GLYPH( source )->library->memory; + + + if ( svg_source->format != FT_GLYPH_FORMAT_SVG ) + { + error = FT_THROW( Invalid_Glyph_Format ); + goto Exit; + } + + if ( source->svg_document_length == 0 ) + { + error = FT_THROW( Invalid_Slot_Handle ); + goto Exit; + } + + target->glyph_index = source->glyph_index; + + target->svg_document_length = source->svg_document_length; + + target->metrics = source->metrics; + target->units_per_EM = source->units_per_EM; + + target->start_glyph_id = source->start_glyph_id; + target->end_glyph_id = source->end_glyph_id; + + target->transform = source->transform; + target->delta = source->delta; + + /* allocate space for the SVG document */ + if ( FT_QALLOC( target->svg_document, target->svg_document_length ) ) + goto Exit; + + /* copy the document */ + FT_MEM_COPY( target->svg_document, + source->svg_document, + target->svg_document_length ); + + Exit: + return error; + } + + + FT_CALLBACK_DEF( void ) + ft_svg_glyph_transform( FT_Glyph svg_glyph, + const FT_Matrix* _matrix, + const FT_Vector* _delta ) + { + FT_SvgGlyph glyph = (FT_SvgGlyph)svg_glyph; + FT_Matrix* matrix = (FT_Matrix*)_matrix; + FT_Vector* delta = (FT_Vector*)_delta; + + FT_Matrix tmp_matrix; + FT_Vector tmp_delta; + + FT_Matrix a, b; + FT_Pos x, y; + + + if ( !matrix ) + { + tmp_matrix.xx = 0x10000; + tmp_matrix.xy = 0; + tmp_matrix.yx = 0; + tmp_matrix.yy = 0x10000; + + matrix = &tmp_matrix; + } + + if ( !delta ) + { + tmp_delta.x = 0; + tmp_delta.y = 0; + + delta = &tmp_delta; + } + + a = glyph->transform; + b = *matrix; + FT_Matrix_Multiply( &b, &a ); + + x = ADD_LONG( ADD_LONG( FT_MulFix( matrix->xx, glyph->delta.x ), + FT_MulFix( matrix->xy, glyph->delta.y ) ), + delta->x ); + y = ADD_LONG( ADD_LONG( FT_MulFix( matrix->yx, glyph->delta.x ), + FT_MulFix( matrix->yy, glyph->delta.y ) ), + delta->y ); + + glyph->delta.x = x; + glyph->delta.y = y; + + glyph->transform = a; + } + + + FT_CALLBACK_DEF( FT_Error ) + ft_svg_glyph_prepare( FT_Glyph svg_glyph, + FT_GlyphSlot slot ) + { + FT_SvgGlyph glyph = (FT_SvgGlyph)svg_glyph; + + FT_Error error = FT_Err_Ok; + FT_Memory memory = svg_glyph->library->memory; + + FT_SVG_Document document = NULL; + + + if ( FT_NEW( document ) ) + return error; + + document->svg_document = glyph->svg_document; + document->svg_document_length = glyph->svg_document_length; + + document->metrics = glyph->metrics; + document->units_per_EM = glyph->units_per_EM; + + document->start_glyph_id = glyph->start_glyph_id; + document->end_glyph_id = glyph->end_glyph_id; + + document->transform = glyph->transform; + document->delta = glyph->delta; + + slot->format = FT_GLYPH_FORMAT_SVG; + slot->glyph_index = glyph->glyph_index; + slot->other = document; + + return error; + } + + + FT_DEFINE_GLYPH( + ft_svg_glyph_class, + + sizeof ( FT_SvgGlyphRec ), + FT_GLYPH_FORMAT_SVG, + + ft_svg_glyph_init, /* FT_Glyph_InitFunc glyph_init */ + ft_svg_glyph_done, /* FT_Glyph_DoneFunc glyph_done */ + ft_svg_glyph_copy, /* FT_Glyph_CopyFunc glyph_copy */ + ft_svg_glyph_transform, /* FT_Glyph_TransformFunc glyph_transform */ + NULL, /* FT_Glyph_GetBBoxFunc glyph_bbox */ + ft_svg_glyph_prepare /* FT_Glyph_PrepareFunc glyph_prepare */ + ) + +#endif /* FT_CONFIG_OPTION_SVG */ + + /*************************************************************************/ /*************************************************************************/ /**** ****/ @@ -377,6 +612,12 @@ else if ( format == FT_GLYPH_FORMAT_OUTLINE ) clazz = &ft_outline_glyph_class; +#ifdef FT_CONFIG_OPTION_SVG + /* if it is an SVG glyph */ + else if ( format == FT_GLYPH_FORMAT_SVG ) + clazz = &ft_svg_glyph_class; +#endif + else { /* try to find a renderer that supports the glyph image format */ @@ -595,6 +836,16 @@ if ( !error ) error = FT_Render_Glyph_Internal( glyph->library, &dummy, render_mode ); +#ifdef FT_CONFIG_OPTION_SVG + if ( clazz == &ft_svg_glyph_class ) + { + FT_Memory memory = library->memory; + + + FT_FREE( dummy.other ); + } +#endif + #if 1 if ( !destroy && origin ) { diff --git a/thirdparty/freetype/src/base/ftgxval.c b/thirdparty/freetype/src/base/ftgxval.c index e9567f77f3..5598a11c6d 100644 --- a/thirdparty/freetype/src/base/ftgxval.c +++ b/thirdparty/freetype/src/base/ftgxval.c @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * Masatake YAMATO, Redhat K.K, * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/base/fthash.c b/thirdparty/freetype/src/base/fthash.c index 449b03a5c1..313bbbb4b2 100644 --- a/thirdparty/freetype/src/base/fthash.c +++ b/thirdparty/freetype/src/base/fthash.c @@ -243,7 +243,7 @@ nn = *bp; if ( !nn ) { - if ( FT_NEW( nn ) ) + if ( FT_QNEW( nn ) ) goto Exit; *bp = nn; diff --git a/thirdparty/freetype/src/base/ftinit.c b/thirdparty/freetype/src/base/ftinit.c index a2d2b933c0..0f29a6017e 100644 --- a/thirdparty/freetype/src/base/ftinit.c +++ b/thirdparty/freetype/src/base/ftinit.c @@ -4,7 +4,7 @@ * * FreeType initialization layer (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftlcdfil.c b/thirdparty/freetype/src/base/ftlcdfil.c index 488b913e63..e72f6d668d 100644 --- a/thirdparty/freetype/src/base/ftlcdfil.c +++ b/thirdparty/freetype/src/base/ftlcdfil.c @@ -4,7 +4,7 @@ * * FreeType API for color filtering of subpixel bitmap glyphs (body). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftmac.c b/thirdparty/freetype/src/base/ftmac.c index 36a860979e..21f1894ad3 100644 --- a/thirdparty/freetype/src/base/ftmac.c +++ b/thirdparty/freetype/src/base/ftmac.c @@ -8,7 +8,7 @@ * This file is for Mac OS X only; see builds/mac/ftoldmac.c for * classic platforms built by MPW. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -105,7 +105,7 @@ /* Don't want warnings about our own use of deprecated functions. */ #define FT_DEPRECATED_ATTRIBUTE -#include FT_MAC_H +#include <freetype/ftmac.h> #ifndef kATSOptionFlagsUnRestrictedScope /* since Mac OS X 10.1 */ #define kATSOptionFlagsUnRestrictedScope kATSOptionFlagsDefault @@ -314,7 +314,7 @@ NULL, NULL, NULL ) ) return ( OSType ) 0; - return ((FInfo *)(info.finderInfo))->fdType; + return ( (FInfo *)( info.finderInfo ) )->fdType; } @@ -462,7 +462,7 @@ if ( ps_name_len != 0 ) { - ft_memcpy(ps_name, names[0] + 1, ps_name_len); + ft_memcpy( ps_name, names[0] + 1, ps_name_len ); ps_name[ps_name_len] = 0; } if ( style->indexes[face_index] > 1 && diff --git a/thirdparty/freetype/src/base/ftmm.c b/thirdparty/freetype/src/base/ftmm.c index fc5d4ecc8d..dbbd87c9b9 100644 --- a/thirdparty/freetype/src/base/ftmm.c +++ b/thirdparty/freetype/src/base/ftmm.c @@ -4,7 +4,7 @@ * * Multiple Master font support (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftobjs.c b/thirdparty/freetype/src/base/ftobjs.c index 883f1a8970..eeda69c3ed 100644 --- a/thirdparty/freetype/src/base/ftobjs.c +++ b/thirdparty/freetype/src/base/ftobjs.c @@ -4,7 +4,7 @@ * * The FreeType private base classes (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -19,6 +19,7 @@ #include <freetype/ftlist.h> #include <freetype/ftoutln.h> #include <freetype/ftfntfmt.h> +#include <freetype/otsvg.h> #include <freetype/internal/ftvalid.h> #include <freetype/internal/ftobjs.h> @@ -27,6 +28,7 @@ #include <freetype/internal/ftstream.h> #include <freetype/internal/sfnt.h> /* for SFNT_Load_Table_Func */ #include <freetype/internal/psaux.h> /* for PS_Driver */ +#include <freetype/internal/svginterface.h> #include <freetype/tttables.h> #include <freetype/tttags.h> @@ -328,6 +330,19 @@ if ( !error && clazz->init_slot ) error = clazz->init_slot( slot ); +#ifdef FT_CONFIG_OPTION_SVG + /* if SVG table exists, allocate the space in `slot->other` */ + if ( slot->face->face_flags & FT_FACE_FLAG_SVG ) + { + FT_SVG_Document document = NULL; + + + if ( FT_NEW( document ) ) + goto Exit; + slot->other = document; + } +#endif + Exit: return error; } @@ -372,7 +387,18 @@ FT_Pos width, height, pitch; - if ( slot->format != FT_GLYPH_FORMAT_OUTLINE ) + if ( slot->format == FT_GLYPH_FORMAT_SVG ) + { + FT_Module module; + SVG_Service svg_service; + + + module = FT_Get_Module( slot->library, "ot-svg" ); + svg_service = (SVG_Service)module->clazz->module_interface; + + return (FT_Bool)svg_service->preset_slot( module, slot, FALSE ); + } + else if ( slot->format != FT_GLYPH_FORMAT_OUTLINE ) return 1; if ( origin ) @@ -564,8 +590,27 @@ slot->subglyphs = NULL; slot->control_data = NULL; slot->control_len = 0; - slot->other = NULL; - slot->format = FT_GLYPH_FORMAT_NONE; + +#ifndef FT_CONFIG_OPTION_SVG + slot->other = NULL; +#else + if ( !( slot->face->face_flags & FT_FACE_FLAG_SVG ) ) + slot->other = NULL; + else + { + if ( slot->internal->flags & FT_GLYPH_OWN_GZIP_SVG ) + { + FT_Memory memory = slot->face->memory; + FT_SVG_Document doc = (FT_SVG_Document)slot->other; + + + FT_FREE( doc->svg_document ); + slot->internal->load_flags &= ~FT_GLYPH_OWN_GZIP_SVG; + } + } +#endif + + slot->format = FT_GLYPH_FORMAT_NONE; slot->linearHoriAdvance = 0; slot->linearVertAdvance = 0; @@ -583,6 +628,23 @@ FT_Driver_Class clazz = driver->clazz; FT_Memory memory = driver->root.memory; +#ifdef FT_CONFIG_OPTION_SVG + if ( slot->face->face_flags & FT_FACE_FLAG_SVG ) + { + /* free memory in case SVG was there */ + if ( slot->internal->flags & FT_GLYPH_OWN_GZIP_SVG ) + { + FT_SVG_Document doc = (FT_SVG_Document)slot->other; + + + FT_FREE( doc->svg_document ); + + slot->internal->flags &= ~FT_GLYPH_OWN_GZIP_SVG; + } + + FT_FREE( slot->other ); + } +#endif if ( clazz->done_slot ) clazz->done_slot( slot ); @@ -858,6 +920,11 @@ library = driver->root.library; hinter = library->auto_hinter; + /* undefined scale means no scale */ + if ( face->size->metrics.x_ppem == 0 || + face->size->metrics.y_ppem == 0 ) + load_flags |= FT_LOAD_NO_SCALE; + /* resolve load flags dependencies */ if ( load_flags & FT_LOAD_NO_RECURSE ) @@ -947,11 +1014,21 @@ FT_AutoHinter_Interface hinting; - /* try to load embedded bitmaps first if available */ - /* */ - /* XXX: This is really a temporary hack that should disappear */ - /* promptly with FreeType 2.1! */ - /* */ + /* XXX: The use of the `FT_LOAD_XXX_ONLY` flags is not very */ + /* elegant. */ + + /* try to load SVG documents if available */ + if ( FT_HAS_SVG( face ) ) + { + error = driver->clazz->load_glyph( slot, face->size, + glyph_index, + load_flags | FT_LOAD_SVG_ONLY ); + + if ( !error && slot->format == FT_GLYPH_FORMAT_SVG ) + goto Load_Ok; + } + + /* try to load embedded bitmaps if available */ if ( FT_HAS_FIXED_SIZES( face ) && ( load_flags & FT_LOAD_NO_BITMAP ) == 0 ) { @@ -1597,7 +1674,6 @@ FT_FREE( stream->base ); stream->size = 0; - stream->base = NULL; stream->close = NULL; } @@ -2451,6 +2527,16 @@ #endif + /* only use lower 31 bits together with sign bit */ + if ( face_index > 0 ) + face_index &= 0x7FFFFFFFL; + else + { + face_index = -face_index; + face_index &= 0x7FFFFFFFL; + face_index = -face_index; + } + #ifdef FT_DEBUG_LEVEL_TRACE FT_TRACE3(( "FT_Open_Face: " )); if ( face_index < 0 ) @@ -3323,6 +3409,9 @@ if ( !face ) return FT_THROW( Invalid_Face_Handle ); + if ( !face->size ) + return FT_THROW( Invalid_Size_Handle ); + if ( !req || req->width < 0 || req->height < 0 || req->type >= FT_SIZE_REQUEST_TYPE_MAX ) return FT_THROW( Invalid_Argument ); @@ -4474,7 +4563,7 @@ render->glyph_format = clazz->glyph_format; /* allocate raster object if needed */ - if ( clazz->raster_class->raster_new ) + if ( clazz->raster_class && clazz->raster_class->raster_new ) { error = clazz->raster_class->raster_new( memory, &render->raster ); if ( error ) @@ -4484,6 +4573,11 @@ render->render = clazz->render_glyph; } +#ifdef FT_CONFIG_OPTION_SVG + if ( clazz->glyph_format == FT_GLYPH_FORMAT_SVG ) + render->render = clazz->render_glyph; +#endif + /* add to list */ node->data = module; FT_List_Add( &library->renderers, node ); @@ -5729,7 +5823,7 @@ SFNT_Service sfnt; - if ( !face || !paint || !paint ) + if ( !face || !paint ) return 0; if ( !FT_IS_SFNT( face ) ) diff --git a/thirdparty/freetype/src/base/ftotval.c b/thirdparty/freetype/src/base/ftotval.c index 0f748d006c..f336e96227 100644 --- a/thirdparty/freetype/src/base/ftotval.c +++ b/thirdparty/freetype/src/base/ftotval.c @@ -4,7 +4,7 @@ * * FreeType API for validating OpenType tables (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftoutln.c b/thirdparty/freetype/src/base/ftoutln.c index 98c6ca16e6..624df03ad8 100644 --- a/thirdparty/freetype/src/base/ftoutln.c +++ b/thirdparty/freetype/src/base/ftoutln.c @@ -4,7 +4,7 @@ * * FreeType outline management (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftpatent.c b/thirdparty/freetype/src/base/ftpatent.c index cd192d33bd..353ed2b531 100644 --- a/thirdparty/freetype/src/base/ftpatent.c +++ b/thirdparty/freetype/src/base/ftpatent.c @@ -5,7 +5,7 @@ * FreeType API for checking patented TrueType bytecode instructions * (body). Obsolete, retained for backward compatibility. * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftpfr.c b/thirdparty/freetype/src/base/ftpfr.c index 5afd5a183f..9e748f06e6 100644 --- a/thirdparty/freetype/src/base/ftpfr.c +++ b/thirdparty/freetype/src/base/ftpfr.c @@ -4,7 +4,7 @@ * * FreeType API for accessing PFR-specific data (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftpsprop.c b/thirdparty/freetype/src/base/ftpsprop.c index 3655ae97ec..81fcee08f6 100644 --- a/thirdparty/freetype/src/base/ftpsprop.c +++ b/thirdparty/freetype/src/base/ftpsprop.c @@ -5,7 +5,7 @@ * Get and set properties of PostScript drivers (body). * See `ftdriver.h' for available properties. * - * Copyright (C) 2017-2021 by + * Copyright (C) 2017-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftrfork.c b/thirdparty/freetype/src/base/ftrfork.c index cb7e94ddb0..356998d3fa 100644 --- a/thirdparty/freetype/src/base/ftrfork.c +++ b/thirdparty/freetype/src/base/ftrfork.c @@ -4,7 +4,7 @@ * * Embedded resource forks accessor (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * Masatake YAMATO and Redhat K.K. * * FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are @@ -402,17 +402,17 @@ FT_Long *result_offset ); - CONST_FT_RFORK_RULE_ARRAY_BEGIN(ft_raccess_guess_table, - ft_raccess_guess_rec) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_double, apple_double) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(apple_single, apple_single) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_ufs_export, darwin_ufs_export) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_newvfs, darwin_newvfs) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(darwin_hfsplus, darwin_hfsplus) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(vfat, vfat) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_cap, linux_cap) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_double, linux_double) - CONST_FT_RFORK_RULE_ARRAY_ENTRY(linux_netatalk, linux_netatalk) + CONST_FT_RFORK_RULE_ARRAY_BEGIN( ft_raccess_guess_table, + ft_raccess_guess_rec ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( apple_double, apple_double ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( apple_single, apple_single ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_ufs_export, darwin_ufs_export ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_newvfs, darwin_newvfs ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( darwin_hfsplus, darwin_hfsplus ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( vfat, vfat ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_cap, linux_cap ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_double, linux_double ) + CONST_FT_RFORK_RULE_ARRAY_ENTRY( linux_netatalk, linux_netatalk ) CONST_FT_RFORK_RULE_ARRAY_END @@ -868,9 +868,7 @@ const char* tmp; const char* slash; size_t new_length; - FT_Error error = FT_Err_Ok; - - FT_UNUSED( error ); + FT_Error error; new_length = ft_strlen( original_name ) + ft_strlen( insertion ); diff --git a/thirdparty/freetype/src/base/ftsnames.c b/thirdparty/freetype/src/base/ftsnames.c index 44dba66638..3bf20c389b 100644 --- a/thirdparty/freetype/src/base/ftsnames.c +++ b/thirdparty/freetype/src/base/ftsnames.c @@ -7,7 +7,7 @@ * * This is _not_ used to retrieve glyph names! * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftstream.c b/thirdparty/freetype/src/base/ftstream.c index 5992998ba3..cc926565c3 100644 --- a/thirdparty/freetype/src/base/ftstream.c +++ b/thirdparty/freetype/src/base/ftstream.c @@ -4,7 +4,7 @@ * * I/O stream support (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftstroke.c b/thirdparty/freetype/src/base/ftstroke.c index 37e9649411..aa983f940f 100644 --- a/thirdparty/freetype/src/base/ftstroke.c +++ b/thirdparty/freetype/src/base/ftstroke.c @@ -4,7 +4,7 @@ * * FreeType path stroker (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftsynth.c b/thirdparty/freetype/src/base/ftsynth.c index 73565b1307..10bbe0dfda 100644 --- a/thirdparty/freetype/src/base/ftsynth.c +++ b/thirdparty/freetype/src/base/ftsynth.c @@ -4,7 +4,7 @@ * * FreeType synthesizing code for emboldening and slanting (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftsystem.c b/thirdparty/freetype/src/base/ftsystem.c index 9beb7e245d..d8826b2367 100644 --- a/thirdparty/freetype/src/base/ftsystem.c +++ b/thirdparty/freetype/src/base/ftsystem.c @@ -4,7 +4,7 @@ * * ANSI-specific FreeType low-level system interface (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/fttrigon.c b/thirdparty/freetype/src/base/fttrigon.c index 0ca6d7810a..6964edb0f5 100644 --- a/thirdparty/freetype/src/base/fttrigon.c +++ b/thirdparty/freetype/src/base/fttrigon.c @@ -4,7 +4,7 @@ * * FreeType trigonometric functions (body). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/fttype1.c b/thirdparty/freetype/src/base/fttype1.c index 0d0afbcef0..de3d5a48bd 100644 --- a/thirdparty/freetype/src/base/fttype1.c +++ b/thirdparty/freetype/src/base/fttype1.c @@ -4,7 +4,7 @@ * * FreeType utility file for PS names support (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftutil.c b/thirdparty/freetype/src/base/ftutil.c index 3142faee98..5a91382580 100644 --- a/thirdparty/freetype/src/base/ftutil.c +++ b/thirdparty/freetype/src/base/ftutil.c @@ -4,7 +4,7 @@ * * FreeType utility file for memory and list management (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftver.rc b/thirdparty/freetype/src/base/ftver.rc deleted file mode 100644 index a3d05b3780..0000000000 --- a/thirdparty/freetype/src/base/ftver.rc +++ /dev/null @@ -1,61 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftver.rc */ -/* */ -/* FreeType VERSIONINFO resource for Windows DLLs. */ -/* */ -/* Copyright (C) 2018-2021 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#include<windows.h> - -#define FT_VERSION 2,11,1,0 -#define FT_VERSION_STR "2.11.1" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION FT_VERSION -PRODUCTVERSION FT_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#endif -#ifdef DLL_EXPORT -FILETYPE VFT_DLL -#define FT_FILENAME "freetype.dll" -#else -FILETYPE VFT_STATIC_LIB -#define FT_FILENAME "freetype.lib" -#endif -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "CompanyName", "The FreeType Project" - VALUE "FileDescription", "Font Rendering Library" - VALUE "FileVersion", FT_VERSION_STR - VALUE "ProductName", "FreeType" - VALUE "ProductVersion", FT_VERSION_STR - VALUE "LegalCopyright", "\251 2000-2021 The FreeType Project www.freetype.org. All rights reserved." - VALUE "InternalName", "freetype" - VALUE "OriginalFilename", FT_FILENAME - END - END - - BLOCK "VarFileInfo" - BEGIN - /* The following line should only be modified for localized versions. */ - /* It consists of any number of WORD,WORD pairs, with each pair */ - /* describing a "language,codepage" combination supported by the file. */ - VALUE "Translation", 0x409, 1252 - END -END diff --git a/thirdparty/freetype/src/base/ftwinfnt.c b/thirdparty/freetype/src/base/ftwinfnt.c index 98f197afdc..193f7fa048 100644 --- a/thirdparty/freetype/src/base/ftwinfnt.c +++ b/thirdparty/freetype/src/base/ftwinfnt.c @@ -4,7 +4,7 @@ * * FreeType API for accessing Windows FNT specific info (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/bdf/README b/thirdparty/freetype/src/bdf/README deleted file mode 100644 index 996ac2d2aa..0000000000 --- a/thirdparty/freetype/src/bdf/README +++ /dev/null @@ -1,148 +0,0 @@ - FreeType font driver for BDF fonts - - Francesco Zappa Nardelli - <francesco.zappa.nardelli@ens.fr> - - -Introduction -************ - -BDF (Bitmap Distribution Format) is a bitmap font format defined by Adobe, -which is intended to be easily understood by both humans and computers. -This code implements a BDF driver for the FreeType library, following the -Adobe Specification V 2.2. The specification of the BDF font format is -available from Adobe's web site: - - https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5005.BDF_Spec.pdf - -Many good bitmap fonts in bdf format come with XFree86 (www.XFree86.org). -They do not define vertical metrics, because the X Consortium BDF -specification has removed them. - - -Encodings -********* - -The variety of encodings that accompanies bdf fonts appears to encompass the -small set defined in freetype.h. On the other hand, two properties that -specify encoding and registry are usually defined in bdf fonts. - -I decided to make these two properties directly accessible, leaving to the -client application the work of interpreting them. For instance: - - - #include FT_INTERNAL_BDF_TYPES_H - - FT_Face face; - BDF_Public_Face bdfface; - - - FT_New_Face( library, ..., &face ); - - bdfface = (BDF_Public_Face)face; - - if ( ( bdfface->charset_registry == "ISO10646" ) && - ( bdfface->charset_encoding == "1" ) ) - [..] - - -Thus the driver always exports `ft_encoding_none' as face->charmap.encoding. -FT_Get_Char_Index's behavior is unmodified, that is, it converts the ULong -value given as argument into the corresponding glyph number. - -If the two properties are not available, Adobe Standard Encoding should be -assumed. - - -Anti-Aliased Bitmaps -******************** - -The driver supports an extension to the BDF format as used in Mark Leisher's -xmbdfed bitmap font editor. Microsoft's SBIT tool expects bitmap fonts in -that format for adding anti-aliased them to TrueType fonts. It introduces a -fourth field to the `SIZE' keyword which gives the bpp value (bits per -pixel) of the glyph data in the font. Possible values are 1 (the default), -2 (four gray levels), 4 (16 gray levels), and 8 (256 gray levels). The -driver returns either a bitmap with 1 bit per pixel or a pixmap with 8bits -per pixel (using 4, 16, and 256 gray levels, respectively). - - -Known problems -************** - -- A font is entirely loaded into memory. Obviously, this is not the Right - Thing(TM). If you have big fonts I suggest you convert them into PCF - format (using the bdftopcf utility): the PCF font drive of FreeType can - perform incremental glyph loading. - -When I have some time, I will implement on-demand glyph parsing. - -- Except for encodings properties, client applications have no visibility of - the PCF_Face object. This means that applications cannot directly access - font tables and must trust FreeType. - -- Currently, glyph names are ignored. - - I plan to give full visibility of the BDF_Face object in an upcoming - revision of the driver, thus implementing also glyph names. - -- As I have never seen a BDF font that defines vertical metrics, vertical - metrics are (parsed and) discarded. If you own a BDF font that defines - vertical metrics, please let me know (I will implement them in 5-10 - minutes). - - -License -******* - -Copyright (C) 2001-2002 by Francesco Zappa Nardelli - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*** Portions of the driver (that is, bdflib.c and bdf.h): - -Copyright 2000 Computing Research Labs, New Mexico State University -Copyright 2001-2002, 2011 Francesco Zappa Nardelli - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -Credits -******* - -This driver is based on excellent Mark Leisher's bdf library. If you -find something good in this driver you should probably thank him, not -me. diff --git a/thirdparty/freetype/src/bdf/bdflib.c b/thirdparty/freetype/src/bdf/bdflib.c index b65c8a2f3e..6603148a02 100644 --- a/thirdparty/freetype/src/bdf/bdflib.c +++ b/thirdparty/freetype/src/bdf/bdflib.c @@ -613,7 +613,7 @@ if ( FT_QREALLOC( buf, buf_size, new_size ) ) goto Exit; - cursor = (ptrdiff_t)buf_size; + cursor = avail; buf_size = new_size; } else @@ -623,7 +623,6 @@ FT_MEM_MOVE( buf, buf + start, bytes ); cursor = bytes; - avail -= bytes; start = 0; } refill = 1; @@ -1175,7 +1174,6 @@ font->props_size + 1 ) ) goto Exit; - fp = font->props + font->props_size; font->props_size++; } @@ -1537,8 +1535,6 @@ /* kept. */ FT_FREE( p->glyph_name ); } - - p->glyph_name = NULL; } /* Clear the flags that might be added when width and height are */ @@ -1953,7 +1949,7 @@ } } - if ( FT_ALLOC( p->font->internal, sizeof ( FT_HashRec ) ) ) + if ( FT_QALLOC( p->font->internal, sizeof ( FT_HashRec ) ) ) goto Exit; error = ft_hash_str_init( (FT_Hash)p->font->internal, memory ); if ( error ) diff --git a/thirdparty/freetype/src/bzip2/ftbzip2.c b/thirdparty/freetype/src/bzip2/ftbzip2.c index 296cea088b..ab2da7e62b 100644 --- a/thirdparty/freetype/src/bzip2/ftbzip2.c +++ b/thirdparty/freetype/src/bzip2/ftbzip2.c @@ -8,7 +8,7 @@ * parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2010-2021 by + * Copyright (C) 2010-2022 by * Joel Klinghed. * * based on `src/gzip/ftgzip.c' @@ -57,8 +57,9 @@ /* it is better to use FreeType memory routines instead of raw 'malloc/free' */ - typedef void *(* alloc_func)(void*, int, int); - typedef void (* free_func)(void*, void*); + typedef void* (*alloc_func)( void*, int, int ); + typedef void (*free_func) ( void*, void* ); + static void* ft_bzip2_alloc( FT_Memory memory, @@ -102,10 +103,11 @@ FT_Byte input[FT_BZIP2_BUFFER_SIZE]; /* input read buffer */ - FT_Byte buffer[FT_BZIP2_BUFFER_SIZE]; /* output buffer */ - FT_ULong pos; /* position in output */ + FT_Byte buffer[FT_BZIP2_BUFFER_SIZE]; /* output buffer */ + FT_ULong pos; /* position in output */ FT_Byte* cursor; FT_Byte* limit; + FT_Bool reset; /* reset before next read */ } FT_BZip2FileRec, *FT_BZip2File; @@ -153,6 +155,7 @@ zip->limit = zip->buffer + FT_BZIP2_BUFFER_SIZE; zip->cursor = zip->limit; zip->pos = 0; + zip->reset = 0; /* check .bz2 header */ { @@ -228,6 +231,7 @@ zip->limit = zip->buffer + FT_BZIP2_BUFFER_SIZE; zip->cursor = zip->limit; zip->pos = 0; + zip->reset = 0; BZ2_bzDecompressInit( bzstream, 0, 0 ); } @@ -302,18 +306,23 @@ err = BZ2_bzDecompress( bzstream ); - if ( err == BZ_STREAM_END ) + if ( err != BZ_OK ) { - zip->limit = (FT_Byte*)bzstream->next_out; - if ( zip->limit == zip->cursor ) - error = FT_THROW( Invalid_Stream_Operation ); - break; - } - else if ( err != BZ_OK ) - { - zip->limit = zip->cursor; - error = FT_THROW( Invalid_Stream_Operation ); - break; + zip->reset = 1; + + if ( err == BZ_STREAM_END ) + { + zip->limit = (FT_Byte*)bzstream->next_out; + if ( zip->limit == zip->cursor ) + error = FT_THROW( Invalid_Stream_Operation ); + break; + } + else + { + zip->limit = zip->cursor; + error = FT_THROW( Invalid_Stream_Operation ); + break; + } } } @@ -363,9 +372,9 @@ FT_Error error; - /* Reset inflate stream if we're seeking backwards. */ - /* Yes, that is not too efficient, but it saves memory :-) */ - if ( pos < zip->pos ) + /* Reset inflate stream if seeking backwards or bzip reported an error. */ + /* Yes, that is not too efficient, but it saves memory :-) */ + if ( pos < zip->pos || zip->reset ) { error = ft_bzip2_file_reset( zip ); if ( error ) diff --git a/thirdparty/freetype/src/cache/ftcache.c b/thirdparty/freetype/src/cache/ftcache.c index ddd3e43c02..e26b44a700 100644 --- a/thirdparty/freetype/src/cache/ftcache.c +++ b/thirdparty/freetype/src/cache/ftcache.c @@ -4,7 +4,7 @@ * * The FreeType Caching sub-system (body only). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcbasic.c b/thirdparty/freetype/src/cache/ftcbasic.c index 1760c5fbd4..635b17d074 100644 --- a/thirdparty/freetype/src/cache/ftcbasic.c +++ b/thirdparty/freetype/src/cache/ftcbasic.c @@ -4,7 +4,7 @@ * * The FreeType basic cache interface (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -26,6 +26,7 @@ #include "ftccback.h" #include "ftcerror.h" +#undef FT_COMPONENT #define FT_COMPONENT cache @@ -182,7 +183,8 @@ if ( !error ) { if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP || - face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) + face->glyph->format == FT_GLYPH_FORMAT_OUTLINE || + face->glyph->format == FT_GLYPH_FORMAT_SVG ) { /* ok, copy it */ FT_Glyph glyph; diff --git a/thirdparty/freetype/src/cache/ftccache.c b/thirdparty/freetype/src/cache/ftccache.c index 5bbf329298..ab4ad2faa2 100644 --- a/thirdparty/freetype/src/cache/ftccache.c +++ b/thirdparty/freetype/src/cache/ftccache.c @@ -4,7 +4,7 @@ * * The FreeType internal cache interface (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftccache.h b/thirdparty/freetype/src/cache/ftccache.h index 4849b92352..ae0ae8b172 100644 --- a/thirdparty/freetype/src/cache/ftccache.h +++ b/thirdparty/freetype/src/cache/ftccache.h @@ -4,7 +4,7 @@ * * FreeType internal cache interface (specification). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -210,7 +210,7 @@ FT_BEGIN_HEADER #define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \ FT_BEGIN_STMNT \ FTC_Node *_bucket, *_pnode, _node; \ - FTC_Cache _cache = FTC_CACHE(cache); \ + FTC_Cache _cache = FTC_CACHE( cache ); \ FT_Offset _hash = (FT_Offset)(hash); \ FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \ FT_Bool _list_changed = FALSE; \ diff --git a/thirdparty/freetype/src/cache/ftccback.h b/thirdparty/freetype/src/cache/ftccback.h index 8185fe3738..ba01af2e78 100644 --- a/thirdparty/freetype/src/cache/ftccback.h +++ b/thirdparty/freetype/src/cache/ftccback.h @@ -4,7 +4,7 @@ * * Callback functions of the caching sub-system (specification only). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftccmap.c b/thirdparty/freetype/src/cache/ftccmap.c index 40b449b9cc..0ee1834e27 100644 --- a/thirdparty/freetype/src/cache/ftccmap.c +++ b/thirdparty/freetype/src/cache/ftccmap.c @@ -4,7 +4,7 @@ * * FreeType CharMap cache (body) * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -116,7 +116,7 @@ FT_UInt nn; - if ( !FT_NEW( node ) ) + if ( !FT_QNEW( node ) ) { node->face_id = query->face_id; node->cmap_index = query->cmap_index; diff --git a/thirdparty/freetype/src/cache/ftcerror.h b/thirdparty/freetype/src/cache/ftcerror.h index 2c6faf65e2..44e74d36b4 100644 --- a/thirdparty/freetype/src/cache/ftcerror.h +++ b/thirdparty/freetype/src/cache/ftcerror.h @@ -4,7 +4,7 @@ * * Caching sub-system error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcglyph.c b/thirdparty/freetype/src/cache/ftcglyph.c index 52771c7a8a..f826c8dd8e 100644 --- a/thirdparty/freetype/src/cache/ftcglyph.c +++ b/thirdparty/freetype/src/cache/ftcglyph.c @@ -4,7 +4,7 @@ * * FreeType Glyph Image (FT_Glyph) cache (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcglyph.h b/thirdparty/freetype/src/cache/ftcglyph.h index cf00cdc7b8..cbb8077739 100644 --- a/thirdparty/freetype/src/cache/ftcglyph.h +++ b/thirdparty/freetype/src/cache/ftcglyph.h @@ -4,7 +4,7 @@ * * FreeType abstract glyph cache (specification). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -140,8 +140,8 @@ FT_BEGIN_HEADER } FTC_FamilyRec, *FTC_Family; -#define FTC_FAMILY(x) ( (FTC_Family)(x) ) -#define FTC_FAMILY_P(x) ( (FTC_Family*)(x) ) +#define FTC_FAMILY( x ) ( (FTC_Family)(x) ) +#define FTC_FAMILY_P( x ) ( (FTC_Family*)(x) ) typedef struct FTC_GNodeRec_ @@ -245,7 +245,7 @@ FT_BEGIN_HEADER #define FTC_GCACHE_CLASS( x ) ((FTC_GCacheClass)(x)) #define FTC_CACHE_GCACHE_CLASS( x ) \ - FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class ) + FTC_GCACHE_CLASS( FTC_CACHE( x )->org_class ) #define FTC_CACHE_FAMILY_CLASS( x ) \ ( (FTC_MruListClass)FTC_CACHE_GCACHE_CLASS( x )->family_class ) diff --git a/thirdparty/freetype/src/cache/ftcimage.c b/thirdparty/freetype/src/cache/ftcimage.c index 3f12a654b2..39ce61a511 100644 --- a/thirdparty/freetype/src/cache/ftcimage.c +++ b/thirdparty/freetype/src/cache/ftcimage.c @@ -4,7 +4,7 @@ * * FreeType Image cache (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -64,7 +64,7 @@ FTC_INode inode = NULL; - if ( !FT_NEW( inode ) ) + if ( !FT_QNEW( inode ) ) { FTC_GNode gnode = FTC_GNODE( inode ); FTC_Family family = gquery->family; @@ -74,6 +74,7 @@ /* initialize its inner fields */ FTC_GNode_Init( gnode, gindex, family ); + inode->glyph = NULL; /* we will now load the glyph image */ error = clazz->family_load_glyph( family, gindex, cache, diff --git a/thirdparty/freetype/src/cache/ftcimage.h b/thirdparty/freetype/src/cache/ftcimage.h index 8b28d6f00b..55270a436c 100644 --- a/thirdparty/freetype/src/cache/ftcimage.h +++ b/thirdparty/freetype/src/cache/ftcimage.h @@ -4,7 +4,7 @@ * * FreeType Generic Image cache (specification) * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -51,8 +51,8 @@ FT_BEGIN_HEADER } FTC_INodeRec, *FTC_INode; #define FTC_INODE( x ) ( (FTC_INode)( x ) ) -#define FTC_INODE_GINDEX( x ) FTC_GNODE(x)->gindex -#define FTC_INODE_FAMILY( x ) FTC_GNODE(x)->family +#define FTC_INODE_GINDEX( x ) FTC_GNODE( x )->gindex +#define FTC_INODE_FAMILY( x ) FTC_GNODE( x )->family typedef FT_Error (*FTC_IFamily_LoadGlyphFunc)( FTC_Family family, @@ -72,7 +72,7 @@ FT_BEGIN_HEADER #define FTC_IFAMILY_CLASS( x ) ((FTC_IFamilyClass)(x)) #define FTC_CACHE_IFAMILY_CLASS( x ) \ - FTC_IFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS(x)->family_class ) + FTC_IFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class ) /* can be used as a @FTC_Node_FreeFunc */ diff --git a/thirdparty/freetype/src/cache/ftcmanag.c b/thirdparty/freetype/src/cache/ftcmanag.c index 512de8a3fc..49f037aa73 100644 --- a/thirdparty/freetype/src/cache/ftcmanag.c +++ b/thirdparty/freetype/src/cache/ftcmanag.c @@ -4,7 +4,7 @@ * * FreeType Cache Manager (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcmanag.h b/thirdparty/freetype/src/cache/ftcmanag.h index 99aa926369..5c67af30bc 100644 --- a/thirdparty/freetype/src/cache/ftcmanag.h +++ b/thirdparty/freetype/src/cache/ftcmanag.h @@ -4,7 +4,7 @@ * * FreeType Cache Manager (specification). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcmru.c b/thirdparty/freetype/src/cache/ftcmru.c index 2cac6f9d3a..6a14ae36e9 100644 --- a/thirdparty/freetype/src/cache/ftcmru.c +++ b/thirdparty/freetype/src/cache/ftcmru.c @@ -4,7 +4,7 @@ * * FreeType MRU support (body). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -262,7 +262,9 @@ if ( list->clazz.node_done ) list->clazz.node_done( node, list->data ); } - else if ( FT_QALLOC( node, list->clazz.node_size ) ) + + /* zero new node in case of node_init failure */ + else if ( FT_ALLOC( node, list->clazz.node_size ) ) goto Exit; error = list->clazz.node_init( node, key, list->data ); diff --git a/thirdparty/freetype/src/cache/ftcmru.h b/thirdparty/freetype/src/cache/ftcmru.h index 6befde307f..4fcadef477 100644 --- a/thirdparty/freetype/src/cache/ftcmru.h +++ b/thirdparty/freetype/src/cache/ftcmru.h @@ -4,7 +4,7 @@ * * Simple MRU list-cache (specification). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcsbits.c b/thirdparty/freetype/src/cache/ftcsbits.c index 362999fce0..4a8b1963eb 100644 --- a/thirdparty/freetype/src/cache/ftcsbits.c +++ b/thirdparty/freetype/src/cache/ftcsbits.c @@ -4,7 +4,7 @@ * * FreeType sbits manager (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -171,7 +171,7 @@ sbit->xadvance = (FT_Char)xadvance; sbit->yadvance = (FT_Char)yadvance; sbit->format = (FT_Byte)bitmap->pixel_mode; - sbit->max_grays = (FT_Byte)(bitmap->num_grays - 1); + sbit->max_grays = (FT_Byte)( bitmap->num_grays - 1 ); if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) { @@ -233,7 +233,7 @@ goto Exit; } - if ( !FT_NEW( snode ) ) + if ( !FT_QNEW( snode ) ) { FT_UInt count, start; @@ -248,7 +248,9 @@ snode->count = count; for ( node_count = 0; node_count < count; node_count++ ) { - snode->sbits[node_count].width = 255; + snode->sbits[node_count].width = 255; + snode->sbits[node_count].height = 0; + snode->sbits[node_count].buffer = NULL; } error = ftc_snode_load( snode, diff --git a/thirdparty/freetype/src/cache/ftcsbits.h b/thirdparty/freetype/src/cache/ftcsbits.h index 9f2d5fb33c..8f10070457 100644 --- a/thirdparty/freetype/src/cache/ftcsbits.h +++ b/thirdparty/freetype/src/cache/ftcsbits.h @@ -4,7 +4,7 @@ * * A small-bitmap cache (specification). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -61,7 +61,7 @@ FT_BEGIN_HEADER typedef const FTC_SFamilyClassRec* FTC_SFamilyClass; -#define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x)) +#define FTC_SFAMILY_CLASS( x ) ( (FTC_SFamilyClass)(x) ) #define FTC_CACHE_SFAMILY_CLASS( x ) \ FTC_SFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class ) diff --git a/thirdparty/freetype/src/cff/cff.c b/thirdparty/freetype/src/cff/cff.c index c2ffea3d0d..1ac0beb06a 100644 --- a/thirdparty/freetype/src/cff/cff.c +++ b/thirdparty/freetype/src/cff/cff.c @@ -4,7 +4,7 @@ * * FreeType OpenType driver component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffcmap.c b/thirdparty/freetype/src/cff/cffcmap.c index ff1aae69ef..2d667a7248 100644 --- a/thirdparty/freetype/src/cff/cffcmap.c +++ b/thirdparty/freetype/src/cff/cffcmap.c @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -81,7 +81,7 @@ if ( char_code < 255 ) { - FT_UInt code = (FT_UInt)(char_code + 1); + FT_UInt code = (FT_UInt)( char_code + 1 ); for (;;) diff --git a/thirdparty/freetype/src/cff/cffcmap.h b/thirdparty/freetype/src/cff/cffcmap.h index 221e255afb..2818d3c6fe 100644 --- a/thirdparty/freetype/src/cff/cffcmap.h +++ b/thirdparty/freetype/src/cff/cffcmap.h @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffdrivr.c b/thirdparty/freetype/src/cff/cffdrivr.c index 59210f37c5..d945afdfe8 100644 --- a/thirdparty/freetype/src/cff/cffdrivr.c +++ b/thirdparty/freetype/src/cff/cffdrivr.c @@ -4,7 +4,7 @@ * * OpenType font driver implementation (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffdrivr.h b/thirdparty/freetype/src/cff/cffdrivr.h index fce92bbb00..a312003be7 100644 --- a/thirdparty/freetype/src/cff/cffdrivr.h +++ b/thirdparty/freetype/src/cff/cffdrivr.h @@ -4,7 +4,7 @@ * * High-level OpenType driver interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cfferrs.h b/thirdparty/freetype/src/cff/cfferrs.h index b507ec8bb7..90d32897c7 100644 --- a/thirdparty/freetype/src/cff/cfferrs.h +++ b/thirdparty/freetype/src/cff/cfferrs.h @@ -4,7 +4,7 @@ * * CFF error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffgload.c b/thirdparty/freetype/src/cff/cffgload.c index 97e8f9c1c6..7586b886f1 100644 --- a/thirdparty/freetype/src/cff/cffgload.c +++ b/thirdparty/freetype/src/cff/cffgload.c @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -29,6 +29,14 @@ #include "cfferrs.h" +#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT +#define IS_DEFAULT_INSTANCE( _face ) \ + ( !( FT_IS_NAMED_INSTANCE( _face ) || \ + FT_IS_VARIATION( _face ) ) ) +#else +#define IS_DEFAULT_INSTANCE( _face ) 1 +#endif + /************************************************************************** * @@ -67,7 +75,7 @@ #endif /* FT_CONFIG_OPTION_INCREMENTAL */ { - CFF_Font cff = (CFF_Font)(face->extra.data); + CFF_Font cff = (CFF_Font)( face->extra.data ); return cff_index_access_element( &cff->charstrings_index, glyph_index, @@ -103,7 +111,7 @@ #endif /* FT_CONFIG_OPTION_INCREMENTAL */ { - CFF_Font cff = (CFF_Font)(face->extra.data); + CFF_Font cff = (CFF_Font)( face->extra.data ); cff_index_forget_element( &cff->charstrings_index, pointer ); @@ -255,8 +263,8 @@ if ( size->strike_index != 0xFFFFFFFFUL && - sfnt->load_eblc && - ( load_flags & FT_LOAD_NO_BITMAP ) == 0 ) + ( load_flags & FT_LOAD_NO_BITMAP ) == 0 && + IS_DEFAULT_INSTANCE( size->root.face ) ) { TT_SBit_MetricsRec metrics; @@ -346,6 +354,76 @@ if ( load_flags & FT_LOAD_SBITS_ONLY ) return FT_THROW( Invalid_Argument ); +#ifdef FT_CONFIG_OPTION_SVG + /* check for OT-SVG */ + if ( ( load_flags & FT_LOAD_COLOR ) && + ( (TT_Face)glyph->root.face )->svg ) + { + /* + * We load the SVG document and try to grab the advances from the + * table. For the bearings we rely on the presetting hook to do that. + */ + + FT_Short dummy; + FT_UShort advanceX; + FT_UShort advanceY; + SFNT_Service sfnt; + + + if ( size && (size->root.metrics.x_ppem < 1 || + size->root.metrics.y_ppem < 1 ) ) + { + error = FT_THROW( Invalid_Size_Handle ); + return error; + } + + FT_TRACE3(( "Trying to load SVG glyph\n" )); + + sfnt = (SFNT_Service)((TT_Face)glyph->root.face)->sfnt; + error = sfnt->load_svg_doc( (FT_GlyphSlot)glyph, glyph_index ); + if ( !error ) + { + FT_TRACE3(( "Successfully loaded SVG glyph\n" )); + + glyph->root.format = FT_GLYPH_FORMAT_SVG; + + /* + * If horizontal or vertical advances are not present in the table, + * this is a problem with the font since the standard requires them. + * However, we are graceful and calculate the values by ourselves + * for the vertical case. + */ + sfnt->get_metrics( face, + FALSE, + glyph_index, + &dummy, + &advanceX ); + sfnt->get_metrics( face, + TRUE, + glyph_index, + &dummy, + &advanceY ); + + advanceX = + (FT_UShort)FT_MulDiv( advanceX, + glyph->root.face->size->metrics.x_ppem, + glyph->root.face->units_per_EM ); + advanceY = + (FT_UShort)FT_MulDiv( advanceY, + glyph->root.face->size->metrics.y_ppem, + glyph->root.face->units_per_EM ); + + glyph->root.metrics.horiAdvance = advanceX << 6; + glyph->root.metrics.vertAdvance = advanceY << 6; + + return error; + } + + FT_TRACE3(( "Failed to load SVG glyph\n" )); + } + +#endif /* FT_CONFIG_OPTION_SVG */ + /* if we have a CID subfont, use its matrix (which has already */ /* been multiplied with the root matrix) */ diff --git a/thirdparty/freetype/src/cff/cffgload.h b/thirdparty/freetype/src/cff/cffgload.h index d0d6a6fa08..33616b9684 100644 --- a/thirdparty/freetype/src/cff/cffgload.h +++ b/thirdparty/freetype/src/cff/cffgload.h @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffload.c b/thirdparty/freetype/src/cff/cffload.c index 3c3f6fe502..d6f8a1013d 100644 --- a/thirdparty/freetype/src/cff/cffload.c +++ b/thirdparty/freetype/src/cff/cffload.c @@ -4,7 +4,7 @@ * * OpenType and CFF data/program tables loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffload.h b/thirdparty/freetype/src/cff/cffload.h index 20f9296c4f..a3cc642b77 100644 --- a/thirdparty/freetype/src/cff/cffload.h +++ b/thirdparty/freetype/src/cff/cffload.h @@ -4,7 +4,7 @@ * * OpenType & CFF data/program tables loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffobjs.c b/thirdparty/freetype/src/cff/cffobjs.c index 3a4d47dbdd..fa42accb65 100644 --- a/thirdparty/freetype/src/cff/cffobjs.c +++ b/thirdparty/freetype/src/cff/cffobjs.c @@ -4,7 +4,7 @@ * * OpenType objects manager (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -411,9 +411,7 @@ FT_String* result; - (void)FT_STRDUP( result, source ); - - FT_UNUSED( error ); + FT_MEM_STRDUP( result, source ); return result; } diff --git a/thirdparty/freetype/src/cff/cffobjs.h b/thirdparty/freetype/src/cff/cffobjs.h index 149a8a2f0a..d48c1cded9 100644 --- a/thirdparty/freetype/src/cff/cffobjs.h +++ b/thirdparty/freetype/src/cff/cffobjs.h @@ -4,7 +4,7 @@ * * OpenType objects manager (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffparse.c b/thirdparty/freetype/src/cff/cffparse.c index dde55e95c2..2536a21866 100644 --- a/thirdparty/freetype/src/cff/cffparse.c +++ b/thirdparty/freetype/src/cff/cffparse.c @@ -4,7 +4,7 @@ * * CFF token stream parser (body) * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffparse.h b/thirdparty/freetype/src/cff/cffparse.h index a28ab52200..55b6fe6e7c 100644 --- a/thirdparty/freetype/src/cff/cffparse.h +++ b/thirdparty/freetype/src/cff/cffparse.h @@ -4,7 +4,7 @@ * * CFF token stream parser (specification) * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cfftoken.h b/thirdparty/freetype/src/cff/cfftoken.h index eef30690c4..15237de9e5 100644 --- a/thirdparty/freetype/src/cff/cfftoken.h +++ b/thirdparty/freetype/src/cff/cfftoken.h @@ -4,7 +4,7 @@ * * CFF token definitions (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/ciderrs.h b/thirdparty/freetype/src/cid/ciderrs.h index 2d762d9e1d..d07da5a01d 100644 --- a/thirdparty/freetype/src/cid/ciderrs.h +++ b/thirdparty/freetype/src/cid/ciderrs.h @@ -4,7 +4,7 @@ * * CID error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidgload.c b/thirdparty/freetype/src/cid/cidgload.c index a46d063dfe..24d37d3295 100644 --- a/thirdparty/freetype/src/cid/cidgload.c +++ b/thirdparty/freetype/src/cid/cidgload.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 Glyph Loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidgload.h b/thirdparty/freetype/src/cid/cidgload.h index 8b515efa01..c06bb29d3d 100644 --- a/thirdparty/freetype/src/cid/cidgload.h +++ b/thirdparty/freetype/src/cid/cidgload.h @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidload.c b/thirdparty/freetype/src/cid/cidload.c index 496219de80..fe8fa1abff 100644 --- a/thirdparty/freetype/src/cid/cidload.c +++ b/thirdparty/freetype/src/cid/cidload.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidload.h b/thirdparty/freetype/src/cid/cidload.h index ee1d486505..90ced9280b 100644 --- a/thirdparty/freetype/src/cid/cidload.h +++ b/thirdparty/freetype/src/cid/cidload.h @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidobjs.c b/thirdparty/freetype/src/cid/cidobjs.c index e3c29c22f6..c39de6369c 100644 --- a/thirdparty/freetype/src/cid/cidobjs.c +++ b/thirdparty/freetype/src/cid/cidobjs.c @@ -4,7 +4,7 @@ * * CID objects manager (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidobjs.h b/thirdparty/freetype/src/cid/cidobjs.h index 32f59cbcce..fd76a1cba5 100644 --- a/thirdparty/freetype/src/cid/cidobjs.h +++ b/thirdparty/freetype/src/cid/cidobjs.h @@ -4,7 +4,7 @@ * * CID objects manager (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidparse.c b/thirdparty/freetype/src/cid/cidparse.c index 852c9b6b96..cfc820561f 100644 --- a/thirdparty/freetype/src/cid/cidparse.c +++ b/thirdparty/freetype/src/cid/cidparse.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidparse.h b/thirdparty/freetype/src/cid/cidparse.h index fbc437bc38..ba363f7803 100644 --- a/thirdparty/freetype/src/cid/cidparse.h +++ b/thirdparty/freetype/src/cid/cidparse.h @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidriver.c b/thirdparty/freetype/src/cid/cidriver.c index a0898dfa2f..a63c01064a 100644 --- a/thirdparty/freetype/src/cid/cidriver.c +++ b/thirdparty/freetype/src/cid/cidriver.c @@ -4,7 +4,7 @@ * * CID driver interface (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidriver.h b/thirdparty/freetype/src/cid/cidriver.h index 3ff5f78e11..5073b7a8eb 100644 --- a/thirdparty/freetype/src/cid/cidriver.h +++ b/thirdparty/freetype/src/cid/cidriver.h @@ -4,7 +4,7 @@ * * High-level CID driver interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidtoken.h b/thirdparty/freetype/src/cid/cidtoken.h index 84c8258014..7640137eac 100644 --- a/thirdparty/freetype/src/cid/cidtoken.h +++ b/thirdparty/freetype/src/cid/cidtoken.h @@ -4,7 +4,7 @@ * * CID token definitions (specification only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/type1cid.c b/thirdparty/freetype/src/cid/type1cid.c index 5405ecffc8..b32c261376 100644 --- a/thirdparty/freetype/src/cid/type1cid.c +++ b/thirdparty/freetype/src/cid/type1cid.c @@ -4,7 +4,7 @@ * * FreeType OpenType driver component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/gxvalid/README b/thirdparty/freetype/src/gxvalid/README deleted file mode 100644 index 7fb0296282..0000000000 --- a/thirdparty/freetype/src/gxvalid/README +++ /dev/null @@ -1,532 +0,0 @@ -gxvalid: TrueType GX validator -============================== - - -1. What is this ---------------- - - `gxvalid' is a module to validate TrueType GX tables: a collection of - additional tables in TrueType font which are used by `QuickDraw GX - Text', Apple Advanced Typography (AAT). In addition, gxvalid can - validates `kern' tables which have been extended for AAT. Like the - otvalid module, gxvalid uses FreeType 2's validator framework - (ftvalid). - - You can link gxvalid with your program; before running your own layout - engine, gxvalid validates a font file. As the result, you can remove - error-checking code from the layout engine. It is also possible to - use gxvalid as a stand-alone font validator; the `ftvalid' test - program included in the ft2demo bundle calls gxvalid internally. - A stand-alone font validator may be useful for font developers. - - This documents documents the following issues. - - - supported TrueType GX tables - - fundamental validation limitations - - permissive error handling of broken GX tables - - `kern' table issue. - - -2. Supported tables -------------------- - - The following GX tables are currently supported. - - bsln - feat - just - kern(*) - lcar - mort - morx - opbd - prop - trak - - The following GX tables are currently unsupported. - - cvar - fdsc - fmtx - fvar - gvar - Zapf - - The following GX tables won't be supported. - - acnt(**) - hsty(***) - - The following undocumented tables in TrueType fonts designed for Apple - platform aren't handled either. - - addg - CVTM - TPNM - umif - - - *) The `kern' validator handles both the classic and the new kern - formats; the former is supported on both Microsoft and Apple - platforms, while the latter is supported on Apple platforms. - - **) `acnt' tables are not supported by currently available Apple font - tools. - - ***) There is one more Apple extension, `hsty', but it is for - Newton-OS, not GX (Newton-OS is a platform by Apple, but it can - use sfnt- housed bitmap fonts only). Therefore, it should be - excluded from `Apple platform' in the context of TrueType. - gxvalid ignores it as Apple font tools do so. - - - We have checked 183 fonts bundled with MacOS 9.1, MacOS 9.2, MacOS - 10.0, MacOS X 10.1, MSIE for MacOS, and AppleWorks 6.0. In addition, - we have checked 67 Dynalab fonts (designed for MacOS) and 189 Ricoh - fonts (designed for Windows and MacOS dual platforms). The number of - fonts including TrueType GX tables are as follows. - - bsln: 76 - feat: 191 - just: 84 - kern: 59 - lcar: 4 - mort: 326 - morx: 19 - opbd: 4 - prop: 114 - trak: 16 - - Dynalab and Ricoh fonts don't have GX tables except of `feat' and - `mort'. - - -3. Fundamental validation limitations -------------------------------------- - - TrueType GX provides layout information to libraries for font - rasterizers and text layout. gxvalid can check whether the layout - data in a font is conformant to the TrueType GX format specified by - Apple. But gxvalid cannot check a how QuickDraw GX/AAT renderer uses - the stored information. - - 3-1. Validation of State Machine activity - ----------------------------------------- - - QuickDraw GX/AAT uses a `State Machine' to provide `stateful' layout - features, and TrueType GX stores the state transition diagram of - this `State Machine' in a `StateTable' data structure. While the - State Machine receives a series of glyph IDs, the State Machine - starts with `start of text' state, walks around various states and - generates various layout information to the renderer, and finally - reaches the `end of text' state. - - gxvalid can check essential errors like: - - - possibility of state transitions to undefined states - - existence of glyph IDs that the State Machine doesn't know how - to handle - - the State Machine cannot compute the layout information from - given diagram - - These errors can be checked within finite steps, and without the - State Machine itself, because these are `expression' errors of state - transition diagram. - - There is no limitation about how long the State Machine walks - around, so validation of the algorithm in the state transition - diagram requires infinite steps, even if we had a State Machine in - gxvalid. Therefore, the following errors and problems cannot be - checked. - - - existence of states which the State Machine never transits to - - the possibility that the State Machine never reaches `end of - text' - - the possibility of stack underflow/overflow in the State Machine - (in ligature and contextual glyph substitutions, the State - Machine can store 16 glyphs onto its stack) - - In addition, gxvalid doesn't check `temporary glyph IDs' used in the - chained State Machines (in `mort' and `morx' tables). If a layout - feature is implemented by a single State Machine, a glyph ID - converted by the State Machine is passed to the glyph renderer, thus - it should not point to an undefined glyph ID. But if a layout - feature is implemented by chained State Machines, a component State - Machine (if it is not the final one) is permitted to generate - undefined glyph IDs for temporary use, because it is handled by next - component State Machine and not by the glyph renderer. To validate - such temporary glyph IDs, gxvalid must stack all undefined glyph IDs - which can occur in the output of the previous State Machine and - search them in the `ClassTable' structure of the current State - Machine. It is too complex to list all possible glyph IDs from the - StateTable, especially from a ligature substitution table. - - 3-2. Validation of relationship between multiple layout features - ---------------------------------------------------------------- - - gxvalid does not validate the relationship between multiple layout - features at all. - - If multiple layout features are defined in TrueType GX tables, - possible interactions, overrides, and conflicts between layout - features are implicitly given in the font too. For example, there - are several predefined spacing control features: - - - Text Spacing (Proportional/Monospace/Half-width/Normal) - - Number Spacing (Monospaced-numbers/Proportional-numbers) - - Kana Spacing (Full-width/Proportional) - - Ideographic Spacing (Full-width/Proportional) - - CJK Roman Spacing (Half-width/Proportional/Default-roman - /Full-width-roman/Proportional) - - If all layout features are independently managed, we can activate - inconsistent typographic rules like `Text Spacing=Monospace' and - `Ideographic Spacing=Proportional' at the same time. - - The combinations of layout features is managed by a 32bit integer - (one bit each for selector setting), so we can define relationships - between up to 32 features, theoretically. But if one feature - setting affects another feature setting, we need typographic - priority rules to validate the relationship. Unfortunately, the - TrueType GX format specification does not give such information even - for predefined features. - - -4. Permissive error handling of broken GX tables ------------------------------------------------- - - When Apple's font rendering system finds an inconsistency, like a - specification violation or an unspecified value in a TrueType GX - table, it does not always return error. In most cases, the rendering - engine silently ignores such wrong values or even whole tables. In - fact, MacOS is shipped with fonts including broken GX/AAT tables, but - no harmful effects due to `officially broken' fonts are observed by - end-users. - - gxvalid is designed to continue the validation process as long as - possible. When gxvalid find wrong values, gxvalid warns it at least, - and takes a fallback procedure if possible. The fallback procedure - depends on the debug level. - - We used the following three tools to investigate Apple's error handling. - - - FontValidator (for MacOS 8.5 - 9.2) resource fork font - - ftxvalidator (for MacOS X 10.1 -) dfont or naked-sfnt - - ftxdumperfuser (for MacOS X 10.1 -) dfont or naked-sfnt - - However, all tests were done on a PowerPC based Macintosh; at present, - we have not checked those tools on a m68k-based Macintosh. - - In total, we checked 183 fonts bundled to MacOS 9.1, MacOS 9.2, MacOS - 10.0, MacOS X 10.1, MSIE for MacOS, and AppleWorks 6.0. These fonts - are distributed officially, but many broken GX/AAT tables were found - by Apple's font tools. In the following, we list typical violation of - the GX specification, in fonts officially distributed with those Apple - systems. - - 4-1. broken BinSrchHeader (19/183) - ---------------------------------- - - `BinSrchHeader' is a header of a data array for m68k platforms to - access memory efficiently. Although there are only two independent - parameters for real (`unitSize' and `nUnits'), BinSrchHeader has - three additional parameters which can be calculated from `unitSize' - and `nUnits', for fast setup. Apple font tools ignore them - silently, so gxvalid warns if it finds and inconsistency, and always - continues validation. The additional parameters are ignored - regardless of the consistency. - - 19 fonts include such inconsistencies; all breaks are in the - BinSrchHeader structure of the `kern' table. - - 4-2. too-short LookupTable (5/183) - ---------------------------------- - - LookupTable format 0 is a simple array to get a value from a given - GID (glyph ID); the index of this array is a GID too. Therefore, - the length of the array is expected to be same as the maximum GID - value defined in the `maxp' table, but there are some fonts whose - LookupTable format 0 is too short to cover all GIDs. FontValidator - ignores this error silently, ftxvalidator and ftxdumperfuser both - warn and continue. Similar problems are found in format 3 subtables - of `kern'. gxvalid warns always and abort if the validation level - is set to FT_VALIDATE_PARANOID. - - 5 fonts include too-short kern format 0 subtables. - 1 font includes too-short kern format 3 subtable. - - 4-3. broken LookupTable format 2 (1/183) - ---------------------------------------- - - LookupTable format 2, subformat 4 covers the GID space by a - collection of segments which are specified by `firstGlyph' and - `lastGlyph'. Some fonts store `firstGlyph' and `lastGlyph' in - reverse order, so the segment specification is broken. Apple font - tools ignore this error silently; a broken segment is ignored as if - it did not exist. gxvalid warns and normalize the segment at - FT_VALIDATE_DEFAULT, or ignore the segment at FT_VALIDATE_TIGHT, or - abort at FT_VALIDATE_PARANOID. - - 1 font includes broken LookupTable format 2, in the `just' table. - - *) It seems that all fonts manufactured by ITC for AppleWorks have - this error. - - 4-4. bad bracketing in glyph property (14/183) - ---------------------------------------------- - - GX/AAT defines a `bracketing' property of the glyphs in the `prop' - table, to control layout features of strings enclosed inside and - outside of brackets. Some fonts give inappropriate bracket - properties to glyphs. Apple font tools warn about this error; - gxvalid warns too and aborts at FT_VALIDATE_PARANOID. - - 14 fonts include wrong bracket properties. - - - 4-5. invalid feature number (117/183) - ------------------------------------- - - The GX/AAT extension can include 255 different layout features, - but popular layout features are predefined (see - https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html). - Some fonts include feature numbers which are incompatible with the - predefined feature registry. - - In our survey, there are 140 fonts including `feat' table. - - a) 67 fonts use a feature number which should not be used. - b) 117 fonts set the wrong feature range (nSetting). This is mostly - found in the `mort' and `morx' tables. - - Apple font tools give no warning, although they cannot recognize - what the feature is. At FT_VALIDATE_DEFAULT, gxvalid warns but - continues in both cases (a, b). At FT_VALIDATE_TIGHT, gxvalid warns - and aborts for (a), but continues for (b). At FT_VALIDATE_PARANOID, - gxvalid warns and aborts in both cases (a, b). - - 4-6. invalid prop version (10/183) - ---------------------------------- - - As most TrueType GX tables, the `prop' table must start with a 32bit - version identifier: 0x00010000, 0x00020000 or 0x00030000. But some - fonts store nonsense binary data instead. When Apple font tools - find them, they abort the processing immediately, and the data which - follows is unhandled. gxvalid does the same. - - 10 fonts include broken `prop' version. - - All of these fonts are classic TrueType fonts for the Japanese - script, manufactured by Apple. - - 4-7. unknown resource name (2/183) - ------------------------------------ - - NOTE: THIS IS NOT A TRUETYPE GX ERROR. - - If a TrueType font is stored in the resource fork or in dfont - format, the data must be tagged as `sfnt' in the resource fork index - to invoke TrueType font handler for the data. But the TrueType font - data in `Keyboard.dfont' is tagged as `kbd', and that in - `LastResort.dfont' is tagged as `lst'. Apple font tools can detect - that the data is in TrueType format and successfully validate them. - Maybe this is possible because they are known to be dfont. The - current implementation of the resource fork driver of FreeType - cannot do that, thus gxvalid cannot validate them. - - 2 fonts use an unknown tag for the TrueType font resource. - -5. `kern' table issues ----------------------- - - In common terminology of TrueType, `kern' is classified as a basic and - platform-independent table. But there are Apple extensions of `kern', - and there is an extension which requires a GX state machine for - contextual kerning. Therefore, gxvalid includes a special validator - for `kern' tables. Unfortunately, there is no exact algorithm to - check Apple's extension, so gxvalid includes a heuristic algorithm to - find the proper validation routines for all possible data formats, - including the data format for Microsoft. By calling - classic_kern_validate() instead of gxv_validate(), you can specify the - `kern' format explicitly. However, current FreeType2 uses Microsoft - `kern' format only, others are ignored (and should be handled in a - library one level higher than FreeType). - - 5-1. History - ------------ - - The original 16bit version of `kern' was designed by Apple in the - pre-GX era, and it was also approved by Microsoft. Afterwards, - Apple designed a new 32bit version of the `kern' table. According - to the documentation, the difference between the 16bit and 32bit - version is only the size of variables in the `kern' header. In the - following, we call the original 16bit version as `classic', and - 32bit version as `new'. - - 5-2. Versions and dialects which should be differentiated - --------------------------------------------------------- - - The `kern' table consists of a table header and several subtables. - The version number which identifies a `classic' or a `new' version - is explicitly written in the table header, but there are - undocumented differences between Microsoft's and Apple's formats. - It is called a `dialect' in the following. There are three cases - which should be handled: the new Apple-dialect, the classic - Apple-dialect, and the classic Microsoft-dialect. An analysis of - the formats and the auto detection algorithm of gxvalid is described - in the following. - - 5-2-1. Version detection: classic and new kern - ---------------------------------------------- - - According to Apple TrueType specification, there are only two - differences between the classic and the new: - - - The `kern' table header starts with the version number. - The classic version starts with 0x0000 (16bit), - the new version starts with 0x00010000 (32bit). - - - In the `kern' table header, the number of subtables follows - the version number. - In the classic version, it is stored as a 16bit value. - In the new version, it is stored as a 32bit value. - - From Apple font tool's output (DumpKERN is also tested in addition - to the three Apple font tools in above), there is another - undocumented difference. In the new version, the subtable header - includes a 16bit variable named `tupleIndex' which does not exist - in the classic version. - - The new version can store all subtable formats (0, 1, 2, and 3), - but the Apple TrueType specification does not mention the subtable - formats available in the classic version. - - 5-2-2. Available subtable formats in classic version - ---------------------------------------------------- - - Although the Apple TrueType specification recommends to use the - classic version in the case if the font is designed for both the - Apple and Microsoft platforms, it does not document the available - subtable formats in the classic version. - - According to the Microsoft TrueType specification, the subtable - format assured for Windows and OS/2 support is only subtable - format 0. The Microsoft TrueType specification also describes - subtable format 2, but does not mention which platforms support - it. Subtable formats 1, 3, and higher are documented as reserved - for future use. Therefore, the classic version can store subtable - formats 0 and 2, at least. `ttfdump.exe', a font tool provided by - Microsoft, ignores the subtable format written in the subtable - header, and parses the table as if all subtables are in format 0. - - `kern' subtable format 1 uses a StateTable, so it cannot be - utilized without a GX State Machine. Therefore, it is reasonable - to assume that format 1 (and 3) were introduced after Apple had - introduced GX and moved to the new 32bit version. - - 5-2-3. Apple and Microsoft dialects - ----------------------------------- - - The `kern' subtable has a 16bit `coverage' field to describe - kerning attributes, but bit interpretations by Apple and Microsoft - are different: For example, Apple uses bits 0-7 to identify the - subtable, while Microsoft uses bits 8-15. - - In addition, due to the output of DumpKERN and FontValidator, - Apple's bit interpretations of coverage in classic and new version - are incompatible also. In summary, there are three dialects: - classic Apple dialect, classic Microsoft dialect, and new Apple - dialect. The classic Microsoft dialect and the new Apple dialect - are documented by each vendors' TrueType font specification, but - the documentation for classic Apple dialect is not available. - - For example, in the new Apple dialect, bit 15 is documented as - `set to 1 if the kerning is vertical'. On the other hand, in - classic Microsoft dialect, bit 1 is documented as `set to 1 if the - kerning is horizontal'. From the outputs of DumpKERN and - FontValidator, classic Apple dialect recognizes 15 as `set to 1 - when the kerning is horizontal'. From the results of similar - experiments, classic Apple dialect seems to be the Endian reverse - of the classic Microsoft dialect. - - As a conclusion it must be noted that no font tool can identify - classic Apple dialect or classic Microsoft dialect automatically. - - 5-2-4. gxvalid auto dialect detection algorithm - ----------------------------------------------- - - The first 16 bits of the `kern' table are enough to identify the - version: - - - if the first 16 bits are 0x0000, the `kern' table is in - classic Apple dialect or classic Microsoft dialect - - if the first 16 bits are 0x0001, and next 16 bits are 0x0000, - the kern table is in new Apple dialect. - - If the `kern' table is a classic one, the 16bit `coverage' field - is checked next. Firstly, the coverage bits are decoded for the - classic Apple dialect using the following bit masks (this is based - on DumpKERN output): - - 0x8000: 1=horizontal, 0=vertical - 0x4000: not used - 0x2000: 1=cross-stream, 0=normal - 0x1FF0: reserved - 0x000F: subtable format - - If any of reserved bits are set or the subtable bits is - interpreted as format 1 or 3, we take it as `impossible in classic - Apple dialect' and retry, using the classic Microsoft dialect. - - The most popular coverage in new Apple-dialect: 0x8000, - The most popular coverage in classic Apple-dialect: 0x0000, - The most popular coverage in classic Microsoft dialect: 0x0001. - - 5-3. Tested fonts - ----------------- - - We checked 59 fonts bundled with MacOS and 38 fonts bundled with - Windows, where all font include a `kern' table. - - - fonts bundled with MacOS - * new Apple dialect - format 0: 18 - format 2: 1 - format 3: 1 - * classic Apple dialect - format 0: 14 - * classic Microsoft dialect - format 0: 15 - - - fonts bundled with Windows - * classic Microsoft dialect - format 0: 38 - - It looks strange that classic Microsoft-dialect fonts are bundled to - MacOS: they come from MSIE for MacOS, except of MarkerFelt.dfont. - - - ACKNOWLEDGEMENT - --------------- - - Some parts of gxvalid are derived from both the `gxlayout' module and - the `otvalid' module. Development of gxlayout was supported by the - Information-technology Promotion Agency(IPA), Japan. - - The detailed analysis of undefined glyph ID utilization in `mort' and - `morx' tables is provided by George Williams. - ------------------------------------------------------------------------- - -Copyright (C) 2004-2021 by -suzuki toshiya, Masatake YAMATO, Red hat K.K., -David Turner, Robert Wilhelm, and Werner Lemberg. - -This file is part of the FreeType project, and may only be used, -modified, and distributed under the terms of the FreeType project -license, LICENSE.TXT. By continuing to use, modify, or distribute this -file you indicate that you have read the license and understand and -accept it fully. - - ---- end of README --- diff --git a/thirdparty/freetype/src/gxvalid/gxvalid.c b/thirdparty/freetype/src/gxvalid/gxvalid.c index 309d517443..9f380337c9 100644 --- a/thirdparty/freetype/src/gxvalid/gxvalid.c +++ b/thirdparty/freetype/src/gxvalid/gxvalid.c @@ -4,7 +4,7 @@ * * FreeType validator for TrueTypeGX/AAT tables (body only). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvalid.h b/thirdparty/freetype/src/gxvalid/gxvalid.h index 2c41c28668..170fde3406 100644 --- a/thirdparty/freetype/src/gxvalid/gxvalid.h +++ b/thirdparty/freetype/src/gxvalid/gxvalid.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT table validation (specification only). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvbsln.c b/thirdparty/freetype/src/gxvalid/gxvbsln.c index af69cb51df..9784d18c5d 100644 --- a/thirdparty/freetype/src/gxvalid/gxvbsln.c +++ b/thirdparty/freetype/src/gxvalid/gxvbsln.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT bsln table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvcommn.c b/thirdparty/freetype/src/gxvalid/gxvcommn.c index 18e42b0cd8..999cba4e4c 100644 --- a/thirdparty/freetype/src/gxvalid/gxvcommn.c +++ b/thirdparty/freetype/src/gxvalid/gxvcommn.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common tables validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * @@ -1033,7 +1033,7 @@ GXV_NAME_ENTER( "StateArray" ); GXV_TRACE(( "parse %d bytes by stateSize=%d maxClassID=%d\n", - (int)(*length_p), stateSize, (int)(maxClassID) )); + (int)( *length_p ), stateSize, (int)maxClassID )); /* * 2 states are predefined and must be described in StateArray: @@ -1418,7 +1418,7 @@ GXV_NAME_ENTER( "XStateArray" ); GXV_TRACE(( "parse % 3d bytes by stateSize=% 3d maxClassID=% 3d\n", - (int)(*length_p), (int)stateSize, (int)(maxClassID) )); + (int)( *length_p ), (int)stateSize, (int)maxClassID )); /* * 2 states are predefined and must be described: diff --git a/thirdparty/freetype/src/gxvalid/gxvcommn.h b/thirdparty/freetype/src/gxvalid/gxvcommn.h index b79b641142..794cf0a447 100644 --- a/thirdparty/freetype/src/gxvalid/gxvcommn.h +++ b/thirdparty/freetype/src/gxvalid/gxvcommn.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common tables validation (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxverror.h b/thirdparty/freetype/src/gxvalid/gxverror.h index d20d395680..8d2faac808 100644 --- a/thirdparty/freetype/src/gxvalid/gxverror.h +++ b/thirdparty/freetype/src/gxvalid/gxverror.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT validation module error codes (specification only). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvfeat.c b/thirdparty/freetype/src/gxvalid/gxvfeat.c index 0a8e2f201a..77200564ee 100644 --- a/thirdparty/freetype/src/gxvalid/gxvfeat.c +++ b/thirdparty/freetype/src/gxvalid/gxvfeat.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT feat table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvfeat.h b/thirdparty/freetype/src/gxvalid/gxvfeat.h index f6d28fa71c..3deeb521dd 100644 --- a/thirdparty/freetype/src/gxvalid/gxvfeat.h +++ b/thirdparty/freetype/src/gxvalid/gxvfeat.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT feat table validation (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvfgen.c b/thirdparty/freetype/src/gxvalid/gxvfgen.c index b47cd0f7ba..57f11a8412 100644 --- a/thirdparty/freetype/src/gxvalid/gxvfgen.c +++ b/thirdparty/freetype/src/gxvalid/gxvfgen.c @@ -5,7 +5,7 @@ * Generate feature registry data for gxv `feat' validator. * This program is derived from gxfeatreg.c in gxlayout. * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * Masatake YAMATO and Redhat K.K. * * This file may only be used, diff --git a/thirdparty/freetype/src/gxvalid/gxvjust.c b/thirdparty/freetype/src/gxvalid/gxvjust.c index ec289b8ebf..6af2c79c84 100644 --- a/thirdparty/freetype/src/gxvalid/gxvjust.c +++ b/thirdparty/freetype/src/gxvalid/gxvjust.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT just table validation (body). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvkern.c b/thirdparty/freetype/src/gxvalid/gxvkern.c index 542e8bc095..f0804e37b9 100644 --- a/thirdparty/freetype/src/gxvalid/gxvkern.c +++ b/thirdparty/freetype/src/gxvalid/gxvkern.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT kern table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvlcar.c b/thirdparty/freetype/src/gxvalid/gxvlcar.c index 9db839ba8a..be6e491f9f 100644 --- a/thirdparty/freetype/src/gxvalid/gxvlcar.c +++ b/thirdparty/freetype/src/gxvalid/gxvlcar.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT lcar table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmod.c b/thirdparty/freetype/src/gxvalid/gxvmod.c index 1a11426ccb..8c505dd23f 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmod.c +++ b/thirdparty/freetype/src/gxvalid/gxvmod.c @@ -4,7 +4,7 @@ * * FreeType's TrueTypeGX/AAT validation module implementation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmod.h b/thirdparty/freetype/src/gxvalid/gxvmod.h index 90e0c10a28..1758d4c86e 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmod.h +++ b/thirdparty/freetype/src/gxvalid/gxvmod.h @@ -5,7 +5,7 @@ * FreeType's TrueTypeGX/AAT validation module implementation * (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort.c b/thirdparty/freetype/src/gxvalid/gxvmort.c index d0db7f4d2d..01a77d6a5d 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT mort table validation (body). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort.h b/thirdparty/freetype/src/gxvalid/gxvmort.h index de5ab4ef02..1a1d8961b5 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort.h +++ b/thirdparty/freetype/src/gxvalid/gxvmort.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common definition for mort table (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort0.c b/thirdparty/freetype/src/gxvalid/gxvmort0.c index 0c695aa4c7..fa6c7368f7 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort0.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort0.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type0 (Indic Script Rearrangement) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort1.c b/thirdparty/freetype/src/gxvalid/gxvmort1.c index 0af22362f1..170acee2c7 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort1.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort1.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type1 (Contextual Substitution) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort2.c b/thirdparty/freetype/src/gxvalid/gxvmort2.c index 73f418ea1e..faf446741b 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort2.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort2.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type2 (Ligature Substitution) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort4.c b/thirdparty/freetype/src/gxvalid/gxvmort4.c index 1b0dd3edab..12555da82a 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort4.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort4.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type4 (Non-Contextual Glyph Substitution) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort5.c b/thirdparty/freetype/src/gxvalid/gxvmort5.c index cfbf31208c..48caac4347 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort5.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort5.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type5 (Contextual Glyph Insertion) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx.c b/thirdparty/freetype/src/gxvalid/gxvmorx.c index babff51866..4b848b1e10 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT morx table validation (body). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx.h b/thirdparty/freetype/src/gxvalid/gxvmorx.h index f155f18460..a849d573b3 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx.h +++ b/thirdparty/freetype/src/gxvalid/gxvmorx.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common definition for morx table (specification). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx0.c b/thirdparty/freetype/src/gxvalid/gxvmorx0.c index e93cea9cca..7eb27d143e 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx0.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx0.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type0 (Indic Script Rearrangement) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx1.c b/thirdparty/freetype/src/gxvalid/gxvmorx1.c index d380f8d1ad..6ffbf151bb 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx1.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx1.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type1 (Contextual Substitution) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx2.c b/thirdparty/freetype/src/gxvalid/gxvmorx2.c index e7e008f069..eb79e9b408 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx2.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx2.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type2 (Ligature Substitution) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx4.c b/thirdparty/freetype/src/gxvalid/gxvmorx4.c index e632e8d42a..30c602cb8a 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx4.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx4.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for "morx" type4 (Non-Contextual Glyph Substitution) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx5.c b/thirdparty/freetype/src/gxvalid/gxvmorx5.c index 5ad33976d7..afdef05a89 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx5.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx5.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type5 (Contextual Glyph Insertion) subtable. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvopbd.c b/thirdparty/freetype/src/gxvalid/gxvopbd.c index 7a2feab468..a6b04a4b17 100644 --- a/thirdparty/freetype/src/gxvalid/gxvopbd.c +++ b/thirdparty/freetype/src/gxvalid/gxvopbd.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT opbd table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvprop.c b/thirdparty/freetype/src/gxvalid/gxvprop.c index 98cd368845..bf1ed112fd 100644 --- a/thirdparty/freetype/src/gxvalid/gxvprop.c +++ b/thirdparty/freetype/src/gxvalid/gxvprop.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT prop table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvtrak.c b/thirdparty/freetype/src/gxvalid/gxvtrak.c index c1ed92872d..93ac3e76a9 100644 --- a/thirdparty/freetype/src/gxvalid/gxvtrak.c +++ b/thirdparty/freetype/src/gxvalid/gxvtrak.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT trak table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gzip/adler32.c b/thirdparty/freetype/src/gzip/adler32.c index c53f9dd125..aa032e1ddf 100644 --- a/thirdparty/freetype/src/gzip/adler32.c +++ b/thirdparty/freetype/src/gzip/adler32.c @@ -1,48 +1,192 @@ /* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2002 Mark Adler + * Copyright (C) 1995-2011, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ -#include "zlib.h" +#include "zutil.h" -#define BASE 65521L /* largest prime smaller than 65536 */ +#ifndef Z_FREETYPE +local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); +#endif + +#define BASE 65521U /* largest prime smaller than 65536 */ #define NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ -#define DO1(buf,i) {s1 += buf[i]; s2 += s1;} +#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); #define DO16(buf) DO8(buf,0); DO8(buf,8); +/* use NO_DIVIDE if your processor does not do division in hardware -- + try it both ways to see which is faster */ +#ifdef NO_DIVIDE +/* note that this assumes BASE is 65521, where 65536 % 65521 == 15 + (thank you to John Reiser for pointing this out) */ +# define CHOP(a) \ + do { \ + unsigned long tmp = a >> 16; \ + a &= 0xffffUL; \ + a += (tmp << 4) - tmp; \ + } while (0) +# define MOD28(a) \ + do { \ + CHOP(a); \ + if (a >= BASE) a -= BASE; \ + } while (0) +# define MOD(a) \ + do { \ + CHOP(a); \ + MOD28(a); \ + } while (0) +# define MOD63(a) \ + do { /* this assumes a is not negative */ \ + z_off64_t tmp = a >> 32; \ + a &= 0xffffffffL; \ + a += (tmp << 8) - (tmp << 5) + tmp; \ + tmp = a >> 16; \ + a &= 0xffffL; \ + a += (tmp << 4) - tmp; \ + tmp = a >> 16; \ + a &= 0xffffL; \ + a += (tmp << 4) - tmp; \ + if (a >= BASE) a -= BASE; \ + } while (0) +#else +# define MOD(a) a %= BASE +# define MOD28(a) a %= BASE +# define MOD63(a) a %= BASE +#endif + /* ========================================================================= */ -ZEXPORT(uLong) adler32( /* adler, buf, len) */ +uLong ZEXPORT adler32_z( uLong adler, const Bytef *buf, - uInt len ) + z_size_t len) { - unsigned long s1 = adler & 0xffff; - unsigned long s2 = (adler >> 16) & 0xffff; - int k; + unsigned long sum2; + unsigned n; + + /* split Adler-32 into component sums */ + sum2 = (adler >> 16) & 0xffff; + adler &= 0xffff; + + /* in case user likes doing a byte at a time, keep it fast */ + if (len == 1) { + adler += buf[0]; + if (adler >= BASE) + adler -= BASE; + sum2 += adler; + if (sum2 >= BASE) + sum2 -= BASE; + return adler | (sum2 << 16); + } - if (buf == Z_NULL) return 1L; + /* initial Adler-32 value (deferred check for len == 1 speed) */ + if (buf == Z_NULL) + return 1L; - while (len > 0) { - k = len < NMAX ? len : NMAX; - len -= k; - while (k >= 16) { + /* in case short lengths are provided, keep it somewhat fast */ + if (len < 16) { + while (len--) { + adler += *buf++; + sum2 += adler; + } + if (adler >= BASE) + adler -= BASE; + MOD28(sum2); /* only added so many BASE's */ + return adler | (sum2 << 16); + } + + /* do length NMAX blocks -- requires just one modulo operation */ + while (len >= NMAX) { + len -= NMAX; + n = NMAX / 16; /* NMAX is divisible by 16 */ + do { + DO16(buf); /* 16 sums unrolled */ + buf += 16; + } while (--n); + MOD(adler); + MOD(sum2); + } + + /* do remaining bytes (less than NMAX, still just one modulo) */ + if (len) { /* avoid modulos if none remaining */ + while (len >= 16) { + len -= 16; DO16(buf); buf += 16; - k -= 16; } - if (k != 0) do { - s1 += *buf++; - s2 += s1; - } while (--k); - s1 %= BASE; - s2 %= BASE; + while (len--) { + adler += *buf++; + sum2 += adler; + } + MOD(adler); + MOD(sum2); } - return (s2 << 16) | s1; + + /* return recombined sums */ + return adler | (sum2 << 16); +} + +/* ========================================================================= */ +uLong ZEXPORT adler32( + uLong adler, + const Bytef *buf, + uInt len) +{ + return adler32_z(adler, buf, len); +} + +#ifndef Z_FREETYPE + +/* ========================================================================= */ +local uLong adler32_combine_( + uLong adler1, + uLong adler2, + z_off64_t len2) +{ + unsigned long sum1; + unsigned long sum2; + unsigned rem; + + /* for negative len, return invalid adler32 as a clue for debugging */ + if (len2 < 0) + return 0xffffffffUL; + + /* the derivation of this formula is left as an exercise for the reader */ + MOD63(len2); /* assumes len2 >= 0 */ + rem = (unsigned)len2; + sum1 = adler1 & 0xffff; + sum2 = rem * sum1; + MOD(sum2); + sum1 += (adler2 & 0xffff) + BASE - 1; + sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; + if (sum1 >= BASE) sum1 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1); + if (sum2 >= BASE) sum2 -= BASE; + return sum1 | (sum2 << 16); } + +/* ========================================================================= */ +uLong ZEXPORT adler32_combine( + uLong adler1, + uLong adler2, + z_off_t len2) +{ + return adler32_combine_(adler1, adler2, len2); +} + +uLong ZEXPORT adler32_combine64( + uLong adler1, + uLong adler2, + z_off64_t len2) +{ + return adler32_combine_(adler1, adler2, len2); +} + +#endif /* !Z_FREETYPE */ diff --git a/thirdparty/freetype/src/gzip/crc32.c b/thirdparty/freetype/src/gzip/crc32.c new file mode 100644 index 0000000000..2ddc32d1fb --- /dev/null +++ b/thirdparty/freetype/src/gzip/crc32.c @@ -0,0 +1,1116 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-2022 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * This interleaved implementation of a CRC makes use of pipelined multiple + * arithmetic-logic units, commonly found in modern CPU cores. It is due to + * Kadatch and Jenkins (2010). See doc/crc-doc.1.0.pdf in this distribution. + */ + +/* @(#) $Id$ */ + +/* + Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore + protection on the static variables used to control the first-use generation + of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should + first call get_crc_table() to initialize the tables before allowing more than + one thread to use crc32(). + + MAKECRCH can be #defined to write out crc32.h. A main() routine is also + produced, so that this one source file can be compiled to an executable. + */ + +#ifdef MAKECRCH +# include <stdio.h> +# ifndef DYNAMIC_CRC_TABLE +# define DYNAMIC_CRC_TABLE +# endif /* !DYNAMIC_CRC_TABLE */ +#endif /* MAKECRCH */ + +#include "zutil.h" /* for Z_U4, Z_U8, z_crc_t, and FAR definitions */ + + /* + A CRC of a message is computed on N braids of words in the message, where + each word consists of W bytes (4 or 8). If N is 3, for example, then three + running sparse CRCs are calculated respectively on each braid, at these + indices in the array of words: 0, 3, 6, ..., 1, 4, 7, ..., and 2, 5, 8, ... + This is done starting at a word boundary, and continues until as many blocks + of N * W bytes as are available have been processed. The results are combined + into a single CRC at the end. For this code, N must be in the range 1..6 and + W must be 4 or 8. The upper limit on N can be increased if desired by adding + more #if blocks, extending the patterns apparent in the code. In addition, + crc32.h would need to be regenerated, if the maximum N value is increased. + + N and W are chosen empirically by benchmarking the execution time on a given + processor. The choices for N and W below were based on testing on Intel Kaby + Lake i7, AMD Ryzen 7, ARM Cortex-A57, Sparc64-VII, PowerPC POWER9, and MIPS64 + Octeon II processors. The Intel, AMD, and ARM processors were all fastest + with N=5, W=8. The Sparc, PowerPC, and MIPS64 were all fastest at N=5, W=4. + They were all tested with either gcc or clang, all using the -O3 optimization + level. Your mileage may vary. + */ + +/* Define N */ +#ifdef Z_TESTN +# define N Z_TESTN +#else +# define N 5 +#endif +#if N < 1 || N > 6 +# error N must be in 1..6 +#endif + +/* + z_crc_t must be at least 32 bits. z_word_t must be at least as long as + z_crc_t. It is assumed here that z_word_t is either 32 bits or 64 bits, and + that bytes are eight bits. + */ + +/* + Define W and the associated z_word_t type. If W is not defined, then a + braided calculation is not used, and the associated tables and code are not + compiled. + */ +#ifdef Z_TESTW +# if Z_TESTW-1 != -1 +# define W Z_TESTW +# endif +#else +# ifdef MAKECRCH +# define W 8 /* required for MAKECRCH */ +# else +# if defined(__x86_64__) || defined(__aarch64__) +# define W 8 +# else +# define W 4 +# endif +# endif +#endif +#ifdef W +# if W == 8 && defined(Z_U8) + typedef Z_U8 z_word_t; +# elif defined(Z_U4) +# undef W +# define W 4 + typedef Z_U4 z_word_t; +# else +# undef W +# endif +#endif + +/* Local functions. */ +local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); +local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); + +/* If available, use the ARM processor CRC32 instruction. */ +#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 +# define ARMCRC32 +#endif + +#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) +/* + Swap the bytes in a z_word_t to convert between little and big endian. Any + self-respecting compiler will optimize this to a single machine byte-swap + instruction, if one is available. This assumes that word_t is either 32 bits + or 64 bits. + */ +local z_word_t byte_swap( + z_word_t word) +{ +# if W == 8 + return + (word & 0xff00000000000000) >> 56 | + (word & 0xff000000000000) >> 40 | + (word & 0xff0000000000) >> 24 | + (word & 0xff00000000) >> 8 | + (word & 0xff000000) << 8 | + (word & 0xff0000) << 24 | + (word & 0xff00) << 40 | + (word & 0xff) << 56; +# else /* W == 4 */ + return + (word & 0xff000000) >> 24 | + (word & 0xff0000) >> 8 | + (word & 0xff00) << 8 | + (word & 0xff) << 24; +# endif +} +#endif + +/* CRC polynomial. */ +#define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ + +#ifdef DYNAMIC_CRC_TABLE + +local z_crc_t FAR crc_table[256]; +local z_crc_t FAR x2n_table[32]; +local void make_crc_table OF((void)); +#ifdef W + local z_word_t FAR crc_big_table[256]; + local z_crc_t FAR crc_braid_table[W][256]; + local z_word_t FAR crc_braid_big_table[W][256]; + local void braid OF((z_crc_t [][256], z_word_t [][256], int, int)); +#endif +#ifdef MAKECRCH + local void write_table OF((FILE *, const z_crc_t FAR *, int)); + local void write_table32hi OF((FILE *, const z_word_t FAR *, int)); + local void write_table64 OF((FILE *, const z_word_t FAR *, int)); +#endif /* MAKECRCH */ + +/* + Define a once() function depending on the availability of atomics. If this is + compiled with DYNAMIC_CRC_TABLE defined, and if CRCs will be computed in + multiple threads, and if atomics are not available, then get_crc_table() must + be called to initialize the tables and must return before any threads are + allowed to compute or combine CRCs. + */ + +/* Definition of once functionality. */ +typedef struct once_s once_t; +local void once OF((once_t *, void (*)(void))); + +/* Check for the availability of atomics. */ +#if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \ + !defined(__STDC_NO_ATOMICS__) + +#include <stdatomic.h> + +/* Structure for once(), which must be initialized with ONCE_INIT. */ +struct once_s { + atomic_flag begun; + atomic_int done; +}; +#define ONCE_INIT {ATOMIC_FLAG_INIT, 0} + +/* + Run the provided init() function exactly once, even if multiple threads + invoke once() at the same time. The state must be a once_t initialized with + ONCE_INIT. + */ +local void once(state, init) + once_t *state; + void (*init)(void); +{ + if (!atomic_load(&state->done)) { + if (atomic_flag_test_and_set(&state->begun)) + while (!atomic_load(&state->done)) + ; + else { + init(); + atomic_store(&state->done, 1); + } + } +} + +#else /* no atomics */ + +/* Structure for once(), which must be initialized with ONCE_INIT. */ +struct once_s { + volatile int begun; + volatile int done; +}; +#define ONCE_INIT {0, 0} + +/* Test and set. Alas, not atomic, but tries to minimize the period of + vulnerability. */ +local int test_and_set OF((int volatile *)); +local int test_and_set( + int volatile *flag) +{ + int was; + + was = *flag; + *flag = 1; + return was; +} + +/* Run the provided init() function once. This is not thread-safe. */ +local void once(state, init) + once_t *state; + void (*init)(void); +{ + if (!state->done) { + if (test_and_set(&state->begun)) + while (!state->done) + ; + else { + init(); + state->done = 1; + } + } +} + +#endif + +/* State for once(). */ +local once_t made = ONCE_INIT; + +/* + Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x^2+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x + (which is shifting right by one and adding x^32 mod p if the bit shifted out + is a one). We start with the highest power (least significant bit) of q and + repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all the + information needed to generate CRCs on data a byte at a time for all + combinations of CRC register values and incoming bytes. + */ + +local void make_crc_table() +{ + unsigned i, j, n; + z_crc_t p; + + /* initialize the CRC of bytes tables */ + for (i = 0; i < 256; i++) { + p = i; + for (j = 0; j < 8; j++) + p = p & 1 ? (p >> 1) ^ POLY : p >> 1; + crc_table[i] = p; +#ifdef W + crc_big_table[i] = byte_swap(p); +#endif + } + + /* initialize the x^2^n mod p(x) table */ + p = (z_crc_t)1 << 30; /* x^1 */ + x2n_table[0] = p; + for (n = 1; n < 32; n++) + x2n_table[n] = p = multmodp(p, p); + +#ifdef W + /* initialize the braiding tables -- needs x2n_table[] */ + braid(crc_braid_table, crc_braid_big_table, N, W); +#endif + +#ifdef MAKECRCH + { + /* + The crc32.h header file contains tables for both 32-bit and 64-bit + z_word_t's, and so requires a 64-bit type be available. In that case, + z_word_t must be defined to be 64-bits. This code then also generates + and writes out the tables for the case that z_word_t is 32 bits. + */ +#if !defined(W) || W != 8 +# error Need a 64-bit integer type in order to generate crc32.h. +#endif + FILE *out; + int k, n; + z_crc_t ltl[8][256]; + z_word_t big[8][256]; + + out = fopen("crc32.h", "w"); + if (out == NULL) return; + + /* write out little-endian CRC table to crc32.h */ + fprintf(out, + "/* crc32.h -- tables for rapid CRC calculation\n" + " * Generated automatically by crc32.c\n */\n" + "\n" + "local const z_crc_t FAR crc_table[] = {\n" + " "); + write_table(out, crc_table, 256); + fprintf(out, + "};\n"); + + /* write out big-endian CRC table for 64-bit z_word_t to crc32.h */ + fprintf(out, + "\n" + "#ifdef W\n" + "\n" + "#if W == 8\n" + "\n" + "local const z_word_t FAR crc_big_table[] = {\n" + " "); + write_table64(out, crc_big_table, 256); + fprintf(out, + "};\n"); + + /* write out big-endian CRC table for 32-bit z_word_t to crc32.h */ + fprintf(out, + "\n" + "#else /* W == 4 */\n" + "\n" + "local const z_word_t FAR crc_big_table[] = {\n" + " "); + write_table32hi(out, crc_big_table, 256); + fprintf(out, + "};\n" + "\n" + "#endif\n"); + + /* write out braid tables for each value of N */ + for (n = 1; n <= 6; n++) { + fprintf(out, + "\n" + "#if N == %d\n", n); + + /* compute braid tables for this N and 64-bit word_t */ + braid(ltl, big, n, 8); + + /* write out braid tables for 64-bit z_word_t to crc32.h */ + fprintf(out, + "\n" + "#if W == 8\n" + "\n" + "local const z_crc_t FAR crc_braid_table[][256] = {\n"); + for (k = 0; k < 8; k++) { + fprintf(out, " {"); + write_table(out, ltl[k], 256); + fprintf(out, "}%s", k < 7 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "local const z_word_t FAR crc_braid_big_table[][256] = {\n"); + for (k = 0; k < 8; k++) { + fprintf(out, " {"); + write_table64(out, big[k], 256); + fprintf(out, "}%s", k < 7 ? ",\n" : ""); + } + fprintf(out, + "};\n"); + + /* compute braid tables for this N and 32-bit word_t */ + braid(ltl, big, n, 4); + + /* write out braid tables for 32-bit z_word_t to crc32.h */ + fprintf(out, + "\n" + "#else /* W == 4 */\n" + "\n" + "local const z_crc_t FAR crc_braid_table[][256] = {\n"); + for (k = 0; k < 4; k++) { + fprintf(out, " {"); + write_table(out, ltl[k], 256); + fprintf(out, "}%s", k < 3 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "local const z_word_t FAR crc_braid_big_table[][256] = {\n"); + for (k = 0; k < 4; k++) { + fprintf(out, " {"); + write_table32hi(out, big[k], 256); + fprintf(out, "}%s", k < 3 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "#endif\n" + "\n" + "#endif\n"); + } + fprintf(out, + "\n" + "#endif\n"); + + /* write out zeros operator table to crc32.h */ + fprintf(out, + "\n" + "local const z_crc_t FAR x2n_table[] = {\n" + " "); + write_table(out, x2n_table, 32); + fprintf(out, + "};\n"); + fclose(out); + } +#endif /* MAKECRCH */ +} + +#ifdef MAKECRCH + +/* + Write the 32-bit values in table[0..k-1] to out, five per line in + hexadecimal separated by commas. + */ +local void write_table( + FILE *out, + const z_crc_t FAR *table, + int k) +{ + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", + (unsigned long)(table[n]), + n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); +} + +/* + Write the high 32-bits of each value in table[0..k-1] to out, five per line + in hexadecimal separated by commas. + */ +local void write_table32hi( + FILE *out, + const z_word_t FAR *table, + int k) +{ + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", + (unsigned long)(table[n] >> 32), + n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); +} + +/* + Write the 64-bit values in table[0..k-1] to out, three per line in + hexadecimal separated by commas. This assumes that if there is a 64-bit + type, then there is also a long long integer type, and it is at least 64 + bits. If not, then the type cast and format string can be adjusted + accordingly. + */ +local void write_table64( + FILE *out, + const z_word_t FAR *table, + int k) +{ + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%016llx%s", n == 0 || n % 3 ? "" : " ", + (unsigned long long)(table[n]), + n == k - 1 ? "" : (n % 3 == 2 ? ",\n" : ", ")); +} + +/* Actually do the deed. */ +int main() +{ + make_crc_table(); + return 0; +} + +#endif /* MAKECRCH */ + +#ifdef W +/* + Generate the little and big-endian braid tables for the given n and z_word_t + size w. Each array must have room for w blocks of 256 elements. + */ +local void braid(ltl, big, n, w) + z_crc_t ltl[][256]; + z_word_t big[][256]; + int n; + int w; +{ + int k; + z_crc_t i, p, q; + for (k = 0; k < w; k++) { + p = x2nmodp((n * w + 3 - k) << 3, 0); + ltl[k][0] = 0; + big[w - 1 - k][0] = 0; + for (i = 1; i < 256; i++) { + ltl[k][i] = q = multmodp(i << 24, p); + big[w - 1 - k][i] = byte_swap(q); + } + } +} +#endif + +#else /* !DYNAMIC_CRC_TABLE */ +/* ======================================================================== + * Tables for byte-wise and braided CRC-32 calculations, and a table of powers + * of x for combining CRC-32s, all made by make_crc_table(). + */ +#include "crc32.h" +#endif /* DYNAMIC_CRC_TABLE */ + +/* ======================================================================== + * Routines used for CRC calculation. Some are also required for the table + * generation above. + */ + +/* + Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, + reflected. For speed, this requires that a not be zero. + */ +local z_crc_t multmodp( + z_crc_t a, + z_crc_t b) +{ + z_crc_t m, p; + + m = (z_crc_t)1 << 31; + p = 0; + for (;;) { + if (a & m) { + p ^= b; + if ((a & (m - 1)) == 0) + break; + } + m >>= 1; + b = b & 1 ? (b >> 1) ^ POLY : b >> 1; + } + return p; +} + +/* + Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been + initialized. + */ +local z_crc_t x2nmodp( + z_off64_t n, + unsigned k) +{ + z_crc_t p; + + p = (z_crc_t)1 << 31; /* x^0 == 1 */ + while (n) { + if (n & 1) + p = multmodp(x2n_table[k & 31], p); + n >>= 1; + k++; + } + return p; +} + +/* ========================================================================= + * This function can be used by asm versions of crc32(), and to force the + * generation of the CRC tables in a threaded application. + */ +const z_crc_t FAR * ZEXPORT get_crc_table() +{ +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + return (const z_crc_t FAR *)crc_table; +} + +/* ========================================================================= + * Use ARM machine instructions if available. This will compute the CRC about + * ten times faster than the braided calculation. This code does not check for + * the presence of the CRC instruction at run time. __ARM_FEATURE_CRC32 will + * only be defined if the compilation specifies an ARM processor architecture + * that has the instructions. For example, compiling with -march=armv8.1-a or + * -march=armv8-a+crc, or -march=native if the compile machine has the crc32 + * instructions. + */ +#ifdef ARMCRC32 + +/* + Constants empirically determined to maximize speed. These values are from + measurements on a Cortex-A57. Your mileage may vary. + */ +#define Z_BATCH 3990 /* number of words in a batch */ +#define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */ +#define Z_BATCH_MIN 800 /* fewest words in a final batch */ + +unsigned long ZEXPORT crc32_z( + unsigned long crc, + const unsigned char FAR *buf, + z_size_t len) +{ + z_crc_t val; + z_word_t crc1, crc2; + const z_word_t *word; + z_word_t val0, val1, val2; + z_size_t last, last2, i; + z_size_t num; + + /* Return initial CRC, if requested. */ + if (buf == Z_NULL) return 0; + +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + + /* Pre-condition the CRC */ + crc ^= 0xffffffff; + + /* Compute the CRC up to a word boundary. */ + while (len && ((z_size_t)buf & 7) != 0) { + len--; + val = *buf++; + __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); + } + + /* Prepare to compute the CRC on full 64-bit words word[0..num-1]. */ + word = (z_word_t const *)buf; + num = len >> 3; + len &= 7; + + /* Do three interleaved CRCs to realize the throughput of one crc32x + instruction per cycle. Each CRC is calcuated on Z_BATCH words. The three + CRCs are combined into a single CRC after each set of batches. */ + while (num >= 3 * Z_BATCH) { + crc1 = 0; + crc2 = 0; + for (i = 0; i < Z_BATCH; i++) { + val0 = word[i]; + val1 = word[i + Z_BATCH]; + val2 = word[i + 2 * Z_BATCH]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); + } + word += 3 * Z_BATCH; + num -= 3 * Z_BATCH; + crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc1; + crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc2; + } + + /* Do one last smaller batch with the remaining words, if there are enough + to pay for the combination of CRCs. */ + last = num / 3; + if (last >= Z_BATCH_MIN) { + last2 = last << 1; + crc1 = 0; + crc2 = 0; + for (i = 0; i < last; i++) { + val0 = word[i]; + val1 = word[i + last]; + val2 = word[i + last2]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); + } + word += 3 * last; + num -= 3 * last; + val = x2nmodp(last, 6); + crc = multmodp(val, crc) ^ crc1; + crc = multmodp(val, crc) ^ crc2; + } + + /* Compute the CRC on any remaining words. */ + for (i = 0; i < num; i++) { + val0 = word[i]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + } + word += num; + + /* Complete the CRC on any remaining bytes. */ + buf = (const unsigned char FAR *)word; + while (len) { + len--; + val = *buf++; + __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); + } + + /* Return the CRC, post-conditioned. */ + return crc ^ 0xffffffff; +} + +#else + +#ifdef W + +/* + Return the CRC of the W bytes in the word_t data, taking the + least-significant byte of the word as the first byte of data, without any pre + or post conditioning. This is used to combine the CRCs of each braid. + */ +local z_crc_t crc_word( + z_word_t data) +{ + int k; + for (k = 0; k < W; k++) + data = (data >> 8) ^ crc_table[data & 0xff]; + return (z_crc_t)data; +} + +local z_word_t crc_word_big( + z_word_t data) +{ + int k; + for (k = 0; k < W; k++) + data = (data << 8) ^ + crc_big_table[(data >> ((W - 1) << 3)) & 0xff]; + return data; +} + +#endif + +/* ========================================================================= */ +unsigned long ZEXPORT crc32_z( + unsigned long crc, + const unsigned char FAR *buf, + z_size_t len) +{ + /* Return initial CRC, if requested. */ + if (buf == Z_NULL) return 0; + +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + + /* Pre-condition the CRC */ + crc ^= 0xffffffff; + +#ifdef W + + /* If provided enough bytes, do a braided CRC calculation. */ + if (len >= N * W + W - 1) { + z_size_t blks; + z_word_t const *words; + unsigned endian; + int k; + + /* Compute the CRC up to a z_word_t boundary. */ + while (len && ((z_size_t)buf & (W - 1)) != 0) { + len--; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + + /* Compute the CRC on as many N z_word_t blocks as are available. */ + blks = len / (N * W); + len -= blks * N * W; + words = (z_word_t const *)buf; + + /* Do endian check at execution time instead of compile time, since ARM + processors can change the endianess at execution time. If the + compiler knows what the endianess will be, it can optimize out the + check and the unused branch. */ + endian = 1; + if (*(unsigned char *)&endian) { + /* Little endian. */ + + z_crc_t crc0; + z_word_t word0; +#if N > 1 + z_crc_t crc1; + z_word_t word1; +#if N > 2 + z_crc_t crc2; + z_word_t word2; +#if N > 3 + z_crc_t crc3; + z_word_t word3; +#if N > 4 + z_crc_t crc4; + z_word_t word4; +#if N > 5 + z_crc_t crc5; + z_word_t word5; +#endif +#endif +#endif +#endif +#endif + + /* Initialize the CRC for each braid. */ + crc0 = crc; +#if N > 1 + crc1 = 0; +#if N > 2 + crc2 = 0; +#if N > 3 + crc3 = 0; +#if N > 4 + crc4 = 0; +#if N > 5 + crc5 = 0; +#endif +#endif +#endif +#endif +#endif + + /* + Process the first blks-1 blocks, computing the CRCs on each braid + independently. + */ + while (--blks) { + /* Load the word for each braid into registers. */ + word0 = crc0 ^ words[0]; +#if N > 1 + word1 = crc1 ^ words[1]; +#if N > 2 + word2 = crc2 ^ words[2]; +#if N > 3 + word3 = crc3 ^ words[3]; +#if N > 4 + word4 = crc4 ^ words[4]; +#if N > 5 + word5 = crc5 ^ words[5]; +#endif +#endif +#endif +#endif +#endif + words += N; + + /* Compute and update the CRC for each word. The loop should + get unrolled. */ + crc0 = crc_braid_table[0][word0 & 0xff]; +#if N > 1 + crc1 = crc_braid_table[0][word1 & 0xff]; +#if N > 2 + crc2 = crc_braid_table[0][word2 & 0xff]; +#if N > 3 + crc3 = crc_braid_table[0][word3 & 0xff]; +#if N > 4 + crc4 = crc_braid_table[0][word4 & 0xff]; +#if N > 5 + crc5 = crc_braid_table[0][word5 & 0xff]; +#endif +#endif +#endif +#endif +#endif + for (k = 1; k < W; k++) { + crc0 ^= crc_braid_table[k][(word0 >> (k << 3)) & 0xff]; +#if N > 1 + crc1 ^= crc_braid_table[k][(word1 >> (k << 3)) & 0xff]; +#if N > 2 + crc2 ^= crc_braid_table[k][(word2 >> (k << 3)) & 0xff]; +#if N > 3 + crc3 ^= crc_braid_table[k][(word3 >> (k << 3)) & 0xff]; +#if N > 4 + crc4 ^= crc_braid_table[k][(word4 >> (k << 3)) & 0xff]; +#if N > 5 + crc5 ^= crc_braid_table[k][(word5 >> (k << 3)) & 0xff]; +#endif +#endif +#endif +#endif +#endif + } + } + + /* + Process the last block, combining the CRCs of the N braids at the + same time. + */ + crc = crc_word(crc0 ^ words[0]); +#if N > 1 + crc = crc_word(crc1 ^ words[1] ^ crc); +#if N > 2 + crc = crc_word(crc2 ^ words[2] ^ crc); +#if N > 3 + crc = crc_word(crc3 ^ words[3] ^ crc); +#if N > 4 + crc = crc_word(crc4 ^ words[4] ^ crc); +#if N > 5 + crc = crc_word(crc5 ^ words[5] ^ crc); +#endif +#endif +#endif +#endif +#endif + words += N; + } + else { + /* Big endian. */ + + z_word_t crc0, word0, comb; +#if N > 1 + z_word_t crc1, word1; +#if N > 2 + z_word_t crc2, word2; +#if N > 3 + z_word_t crc3, word3; +#if N > 4 + z_word_t crc4, word4; +#if N > 5 + z_word_t crc5, word5; +#endif +#endif +#endif +#endif +#endif + + /* Initialize the CRC for each braid. */ + crc0 = byte_swap(crc); +#if N > 1 + crc1 = 0; +#if N > 2 + crc2 = 0; +#if N > 3 + crc3 = 0; +#if N > 4 + crc4 = 0; +#if N > 5 + crc5 = 0; +#endif +#endif +#endif +#endif +#endif + + /* + Process the first blks-1 blocks, computing the CRCs on each braid + independently. + */ + while (--blks) { + /* Load the word for each braid into registers. */ + word0 = crc0 ^ words[0]; +#if N > 1 + word1 = crc1 ^ words[1]; +#if N > 2 + word2 = crc2 ^ words[2]; +#if N > 3 + word3 = crc3 ^ words[3]; +#if N > 4 + word4 = crc4 ^ words[4]; +#if N > 5 + word5 = crc5 ^ words[5]; +#endif +#endif +#endif +#endif +#endif + words += N; + + /* Compute and update the CRC for each word. The loop should + get unrolled. */ + crc0 = crc_braid_big_table[0][word0 & 0xff]; +#if N > 1 + crc1 = crc_braid_big_table[0][word1 & 0xff]; +#if N > 2 + crc2 = crc_braid_big_table[0][word2 & 0xff]; +#if N > 3 + crc3 = crc_braid_big_table[0][word3 & 0xff]; +#if N > 4 + crc4 = crc_braid_big_table[0][word4 & 0xff]; +#if N > 5 + crc5 = crc_braid_big_table[0][word5 & 0xff]; +#endif +#endif +#endif +#endif +#endif + for (k = 1; k < W; k++) { + crc0 ^= crc_braid_big_table[k][(word0 >> (k << 3)) & 0xff]; +#if N > 1 + crc1 ^= crc_braid_big_table[k][(word1 >> (k << 3)) & 0xff]; +#if N > 2 + crc2 ^= crc_braid_big_table[k][(word2 >> (k << 3)) & 0xff]; +#if N > 3 + crc3 ^= crc_braid_big_table[k][(word3 >> (k << 3)) & 0xff]; +#if N > 4 + crc4 ^= crc_braid_big_table[k][(word4 >> (k << 3)) & 0xff]; +#if N > 5 + crc5 ^= crc_braid_big_table[k][(word5 >> (k << 3)) & 0xff]; +#endif +#endif +#endif +#endif +#endif + } + } + + /* + Process the last block, combining the CRCs of the N braids at the + same time. + */ + comb = crc_word_big(crc0 ^ words[0]); +#if N > 1 + comb = crc_word_big(crc1 ^ words[1] ^ comb); +#if N > 2 + comb = crc_word_big(crc2 ^ words[2] ^ comb); +#if N > 3 + comb = crc_word_big(crc3 ^ words[3] ^ comb); +#if N > 4 + comb = crc_word_big(crc4 ^ words[4] ^ comb); +#if N > 5 + comb = crc_word_big(crc5 ^ words[5] ^ comb); +#endif +#endif +#endif +#endif +#endif + words += N; + crc = byte_swap(comb); + } + + /* + Update the pointer to the remaining bytes to process. + */ + buf = (unsigned char const *)words; + } + +#endif /* W */ + + /* Complete the computation of the CRC on any remaining bytes. */ + while (len >= 8) { + len -= 8; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + while (len) { + len--; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + + /* Return the CRC, post-conditioned. */ + return crc ^ 0xffffffff; +} + +#endif + +/* ========================================================================= */ +unsigned long ZEXPORT crc32( + unsigned long crc, + const unsigned char FAR *buf, + uInt len) +{ + return crc32_z(crc, buf, len); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine64( + uLong crc1, + uLong crc2, + z_off64_t len2) +{ +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + return multmodp(x2nmodp(len2, 3), crc1) ^ crc2; +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine( + uLong crc1, + uLong crc2, + z_off_t len2) +{ + return crc32_combine64(crc1, crc2, len2); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine_gen64( + z_off64_t len2) +{ +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + return x2nmodp(len2, 3); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine_gen( + z_off_t len2) +{ + return crc32_combine_gen64(len2); +} + +/* ========================================================================= */ +uLong crc32_combine_op( + uLong crc1, + uLong crc2, + uLong op) +{ + return multmodp(op, crc1) ^ crc2; +} diff --git a/thirdparty/freetype/src/gzip/crc32.h b/thirdparty/freetype/src/gzip/crc32.h new file mode 100644 index 0000000000..137df68d61 --- /dev/null +++ b/thirdparty/freetype/src/gzip/crc32.h @@ -0,0 +1,9446 @@ +/* crc32.h -- tables for rapid CRC calculation + * Generated automatically by crc32.c + */ + +local const z_crc_t FAR crc_table[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d}; + +#ifdef W + +#if W == 8 + +local const z_word_t FAR crc_big_table[] = { + 0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000, + 0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000, + 0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000, + 0xa4b8dc7900000000, 0x1ee9d5e000000000, 0x88d9d29700000000, + 0x2b4cb60900000000, 0xbd7cb17e00000000, 0x072db8e700000000, + 0x911dbf9000000000, 0x6410b71d00000000, 0xf220b06a00000000, + 0x4871b9f300000000, 0xde41be8400000000, 0x7dd4da1a00000000, + 0xebe4dd6d00000000, 0x51b5d4f400000000, 0xc785d38300000000, + 0x56986c1300000000, 0xc0a86b6400000000, 0x7af962fd00000000, + 0xecc9658a00000000, 0x4f5c011400000000, 0xd96c066300000000, + 0x633d0ffa00000000, 0xf50d088d00000000, 0xc8206e3b00000000, + 0x5e10694c00000000, 0xe44160d500000000, 0x727167a200000000, + 0xd1e4033c00000000, 0x47d4044b00000000, 0xfd850dd200000000, + 0x6bb50aa500000000, 0xfaa8b53500000000, 0x6c98b24200000000, + 0xd6c9bbdb00000000, 0x40f9bcac00000000, 0xe36cd83200000000, + 0x755cdf4500000000, 0xcf0dd6dc00000000, 0x593dd1ab00000000, + 0xac30d92600000000, 0x3a00de5100000000, 0x8051d7c800000000, + 0x1661d0bf00000000, 0xb5f4b42100000000, 0x23c4b35600000000, + 0x9995bacf00000000, 0x0fa5bdb800000000, 0x9eb8022800000000, + 0x0888055f00000000, 0xb2d90cc600000000, 0x24e90bb100000000, + 0x877c6f2f00000000, 0x114c685800000000, 0xab1d61c100000000, + 0x3d2d66b600000000, 0x9041dc7600000000, 0x0671db0100000000, + 0xbc20d29800000000, 0x2a10d5ef00000000, 0x8985b17100000000, + 0x1fb5b60600000000, 0xa5e4bf9f00000000, 0x33d4b8e800000000, + 0xa2c9077800000000, 0x34f9000f00000000, 0x8ea8099600000000, + 0x18980ee100000000, 0xbb0d6a7f00000000, 0x2d3d6d0800000000, + 0x976c649100000000, 0x015c63e600000000, 0xf4516b6b00000000, + 0x62616c1c00000000, 0xd830658500000000, 0x4e0062f200000000, + 0xed95066c00000000, 0x7ba5011b00000000, 0xc1f4088200000000, + 0x57c40ff500000000, 0xc6d9b06500000000, 0x50e9b71200000000, + 0xeab8be8b00000000, 0x7c88b9fc00000000, 0xdf1ddd6200000000, + 0x492dda1500000000, 0xf37cd38c00000000, 0x654cd4fb00000000, + 0x5861b24d00000000, 0xce51b53a00000000, 0x7400bca300000000, + 0xe230bbd400000000, 0x41a5df4a00000000, 0xd795d83d00000000, + 0x6dc4d1a400000000, 0xfbf4d6d300000000, 0x6ae9694300000000, + 0xfcd96e3400000000, 0x468867ad00000000, 0xd0b860da00000000, + 0x732d044400000000, 0xe51d033300000000, 0x5f4c0aaa00000000, + 0xc97c0ddd00000000, 0x3c71055000000000, 0xaa41022700000000, + 0x10100bbe00000000, 0x86200cc900000000, 0x25b5685700000000, + 0xb3856f2000000000, 0x09d466b900000000, 0x9fe461ce00000000, + 0x0ef9de5e00000000, 0x98c9d92900000000, 0x2298d0b000000000, + 0xb4a8d7c700000000, 0x173db35900000000, 0x810db42e00000000, + 0x3b5cbdb700000000, 0xad6cbac000000000, 0x2083b8ed00000000, + 0xb6b3bf9a00000000, 0x0ce2b60300000000, 0x9ad2b17400000000, + 0x3947d5ea00000000, 0xaf77d29d00000000, 0x1526db0400000000, + 0x8316dc7300000000, 0x120b63e300000000, 0x843b649400000000, + 0x3e6a6d0d00000000, 0xa85a6a7a00000000, 0x0bcf0ee400000000, + 0x9dff099300000000, 0x27ae000a00000000, 0xb19e077d00000000, + 0x44930ff000000000, 0xd2a3088700000000, 0x68f2011e00000000, + 0xfec2066900000000, 0x5d5762f700000000, 0xcb67658000000000, + 0x71366c1900000000, 0xe7066b6e00000000, 0x761bd4fe00000000, + 0xe02bd38900000000, 0x5a7ada1000000000, 0xcc4add6700000000, + 0x6fdfb9f900000000, 0xf9efbe8e00000000, 0x43beb71700000000, + 0xd58eb06000000000, 0xe8a3d6d600000000, 0x7e93d1a100000000, + 0xc4c2d83800000000, 0x52f2df4f00000000, 0xf167bbd100000000, + 0x6757bca600000000, 0xdd06b53f00000000, 0x4b36b24800000000, + 0xda2b0dd800000000, 0x4c1b0aaf00000000, 0xf64a033600000000, + 0x607a044100000000, 0xc3ef60df00000000, 0x55df67a800000000, + 0xef8e6e3100000000, 0x79be694600000000, 0x8cb361cb00000000, + 0x1a8366bc00000000, 0xa0d26f2500000000, 0x36e2685200000000, + 0x95770ccc00000000, 0x03470bbb00000000, 0xb916022200000000, + 0x2f26055500000000, 0xbe3bbac500000000, 0x280bbdb200000000, + 0x925ab42b00000000, 0x046ab35c00000000, 0xa7ffd7c200000000, + 0x31cfd0b500000000, 0x8b9ed92c00000000, 0x1daede5b00000000, + 0xb0c2649b00000000, 0x26f263ec00000000, 0x9ca36a7500000000, + 0x0a936d0200000000, 0xa906099c00000000, 0x3f360eeb00000000, + 0x8567077200000000, 0x1357000500000000, 0x824abf9500000000, + 0x147ab8e200000000, 0xae2bb17b00000000, 0x381bb60c00000000, + 0x9b8ed29200000000, 0x0dbed5e500000000, 0xb7efdc7c00000000, + 0x21dfdb0b00000000, 0xd4d2d38600000000, 0x42e2d4f100000000, + 0xf8b3dd6800000000, 0x6e83da1f00000000, 0xcd16be8100000000, + 0x5b26b9f600000000, 0xe177b06f00000000, 0x7747b71800000000, + 0xe65a088800000000, 0x706a0fff00000000, 0xca3b066600000000, + 0x5c0b011100000000, 0xff9e658f00000000, 0x69ae62f800000000, + 0xd3ff6b6100000000, 0x45cf6c1600000000, 0x78e20aa000000000, + 0xeed20dd700000000, 0x5483044e00000000, 0xc2b3033900000000, + 0x612667a700000000, 0xf71660d000000000, 0x4d47694900000000, + 0xdb776e3e00000000, 0x4a6ad1ae00000000, 0xdc5ad6d900000000, + 0x660bdf4000000000, 0xf03bd83700000000, 0x53aebca900000000, + 0xc59ebbde00000000, 0x7fcfb24700000000, 0xe9ffb53000000000, + 0x1cf2bdbd00000000, 0x8ac2baca00000000, 0x3093b35300000000, + 0xa6a3b42400000000, 0x0536d0ba00000000, 0x9306d7cd00000000, + 0x2957de5400000000, 0xbf67d92300000000, 0x2e7a66b300000000, + 0xb84a61c400000000, 0x021b685d00000000, 0x942b6f2a00000000, + 0x37be0bb400000000, 0xa18e0cc300000000, 0x1bdf055a00000000, + 0x8def022d00000000}; + +#else /* W == 4 */ + +local const z_word_t FAR crc_big_table[] = { + 0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, + 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, + 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, + 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, + 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, + 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, + 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, + 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, + 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, + 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, + 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, + 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, + 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, + 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, + 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, + 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, + 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, + 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, + 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, + 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, + 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, + 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, + 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, + 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, + 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, + 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, + 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, + 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, + 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, + 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, + 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, + 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, + 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, + 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, + 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, + 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, + 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, + 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, + 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, + 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, + 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, + 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, + 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, + 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, + 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, + 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, + 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, + 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, + 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, + 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, + 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, + 0x8def022d}; + +#endif + +#if N == 1 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa, + 0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b, + 0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232, + 0xd92012ac, 0x7cbb312b, 0xb01131b5, 0x3e9e3656, 0xf23436c8, + 0xf8f13fd1, 0x345b3f4f, 0xbad438ac, 0x767e3832, 0xaf5e2a9e, + 0x63f42a00, 0xed7b2de3, 0x21d12d7d, 0x2b142464, 0xe7be24fa, + 0x69312319, 0xa59b2387, 0xf9766256, 0x35dc62c8, 0xbb53652b, + 0x77f965b5, 0x7d3c6cac, 0xb1966c32, 0x3f196bd1, 0xf3b36b4f, + 0x2a9379e3, 0xe639797d, 0x68b67e9e, 0xa41c7e00, 0xaed97719, + 0x62737787, 0xecfc7064, 0x205670fa, 0x85cd537d, 0x496753e3, + 0xc7e85400, 0x0b42549e, 0x01875d87, 0xcd2d5d19, 0x43a25afa, + 0x8f085a64, 0x562848c8, 0x9a824856, 0x140d4fb5, 0xd8a74f2b, + 0xd2624632, 0x1ec846ac, 0x9047414f, 0x5ced41d1, 0x299dc2ed, + 0xe537c273, 0x6bb8c590, 0xa712c50e, 0xadd7cc17, 0x617dcc89, + 0xeff2cb6a, 0x2358cbf4, 0xfa78d958, 0x36d2d9c6, 0xb85dde25, + 0x74f7debb, 0x7e32d7a2, 0xb298d73c, 0x3c17d0df, 0xf0bdd041, + 0x5526f3c6, 0x998cf358, 0x1703f4bb, 0xdba9f425, 0xd16cfd3c, + 0x1dc6fda2, 0x9349fa41, 0x5fe3fadf, 0x86c3e873, 0x4a69e8ed, + 0xc4e6ef0e, 0x084cef90, 0x0289e689, 0xce23e617, 0x40ace1f4, + 0x8c06e16a, 0xd0eba0bb, 0x1c41a025, 0x92cea7c6, 0x5e64a758, + 0x54a1ae41, 0x980baedf, 0x1684a93c, 0xda2ea9a2, 0x030ebb0e, + 0xcfa4bb90, 0x412bbc73, 0x8d81bced, 0x8744b5f4, 0x4beeb56a, + 0xc561b289, 0x09cbb217, 0xac509190, 0x60fa910e, 0xee7596ed, + 0x22df9673, 0x281a9f6a, 0xe4b09ff4, 0x6a3f9817, 0xa6959889, + 0x7fb58a25, 0xb31f8abb, 0x3d908d58, 0xf13a8dc6, 0xfbff84df, + 0x37558441, 0xb9da83a2, 0x7570833c, 0x533b85da, 0x9f918544, + 0x111e82a7, 0xddb48239, 0xd7718b20, 0x1bdb8bbe, 0x95548c5d, + 0x59fe8cc3, 0x80de9e6f, 0x4c749ef1, 0xc2fb9912, 0x0e51998c, + 0x04949095, 0xc83e900b, 0x46b197e8, 0x8a1b9776, 0x2f80b4f1, + 0xe32ab46f, 0x6da5b38c, 0xa10fb312, 0xabcaba0b, 0x6760ba95, + 0xe9efbd76, 0x2545bde8, 0xfc65af44, 0x30cfafda, 0xbe40a839, + 0x72eaa8a7, 0x782fa1be, 0xb485a120, 0x3a0aa6c3, 0xf6a0a65d, + 0xaa4de78c, 0x66e7e712, 0xe868e0f1, 0x24c2e06f, 0x2e07e976, + 0xe2ade9e8, 0x6c22ee0b, 0xa088ee95, 0x79a8fc39, 0xb502fca7, + 0x3b8dfb44, 0xf727fbda, 0xfde2f2c3, 0x3148f25d, 0xbfc7f5be, + 0x736df520, 0xd6f6d6a7, 0x1a5cd639, 0x94d3d1da, 0x5879d144, + 0x52bcd85d, 0x9e16d8c3, 0x1099df20, 0xdc33dfbe, 0x0513cd12, + 0xc9b9cd8c, 0x4736ca6f, 0x8b9ccaf1, 0x8159c3e8, 0x4df3c376, + 0xc37cc495, 0x0fd6c40b, 0x7aa64737, 0xb60c47a9, 0x3883404a, + 0xf42940d4, 0xfeec49cd, 0x32464953, 0xbcc94eb0, 0x70634e2e, + 0xa9435c82, 0x65e95c1c, 0xeb665bff, 0x27cc5b61, 0x2d095278, + 0xe1a352e6, 0x6f2c5505, 0xa386559b, 0x061d761c, 0xcab77682, + 0x44387161, 0x889271ff, 0x825778e6, 0x4efd7878, 0xc0727f9b, + 0x0cd87f05, 0xd5f86da9, 0x19526d37, 0x97dd6ad4, 0x5b776a4a, + 0x51b26353, 0x9d1863cd, 0x1397642e, 0xdf3d64b0, 0x83d02561, + 0x4f7a25ff, 0xc1f5221c, 0x0d5f2282, 0x079a2b9b, 0xcb302b05, + 0x45bf2ce6, 0x89152c78, 0x50353ed4, 0x9c9f3e4a, 0x121039a9, + 0xdeba3937, 0xd47f302e, 0x18d530b0, 0x965a3753, 0x5af037cd, + 0xff6b144a, 0x33c114d4, 0xbd4e1337, 0x71e413a9, 0x7b211ab0, + 0xb78b1a2e, 0x39041dcd, 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, + 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, + 0x264b06e6}, + {0x00000000, 0xa6770bb4, 0x979f1129, 0x31e81a9d, 0xf44f2413, + 0x52382fa7, 0x63d0353a, 0xc5a73e8e, 0x33ef4e67, 0x959845d3, + 0xa4705f4e, 0x020754fa, 0xc7a06a74, 0x61d761c0, 0x503f7b5d, + 0xf64870e9, 0x67de9cce, 0xc1a9977a, 0xf0418de7, 0x56368653, + 0x9391b8dd, 0x35e6b369, 0x040ea9f4, 0xa279a240, 0x5431d2a9, + 0xf246d91d, 0xc3aec380, 0x65d9c834, 0xa07ef6ba, 0x0609fd0e, + 0x37e1e793, 0x9196ec27, 0xcfbd399c, 0x69ca3228, 0x582228b5, + 0xfe552301, 0x3bf21d8f, 0x9d85163b, 0xac6d0ca6, 0x0a1a0712, + 0xfc5277fb, 0x5a257c4f, 0x6bcd66d2, 0xcdba6d66, 0x081d53e8, + 0xae6a585c, 0x9f8242c1, 0x39f54975, 0xa863a552, 0x0e14aee6, + 0x3ffcb47b, 0x998bbfcf, 0x5c2c8141, 0xfa5b8af5, 0xcbb39068, + 0x6dc49bdc, 0x9b8ceb35, 0x3dfbe081, 0x0c13fa1c, 0xaa64f1a8, + 0x6fc3cf26, 0xc9b4c492, 0xf85cde0f, 0x5e2bd5bb, 0x440b7579, + 0xe27c7ecd, 0xd3946450, 0x75e36fe4, 0xb044516a, 0x16335ade, + 0x27db4043, 0x81ac4bf7, 0x77e43b1e, 0xd19330aa, 0xe07b2a37, + 0x460c2183, 0x83ab1f0d, 0x25dc14b9, 0x14340e24, 0xb2430590, + 0x23d5e9b7, 0x85a2e203, 0xb44af89e, 0x123df32a, 0xd79acda4, + 0x71edc610, 0x4005dc8d, 0xe672d739, 0x103aa7d0, 0xb64dac64, + 0x87a5b6f9, 0x21d2bd4d, 0xe47583c3, 0x42028877, 0x73ea92ea, + 0xd59d995e, 0x8bb64ce5, 0x2dc14751, 0x1c295dcc, 0xba5e5678, + 0x7ff968f6, 0xd98e6342, 0xe86679df, 0x4e11726b, 0xb8590282, + 0x1e2e0936, 0x2fc613ab, 0x89b1181f, 0x4c162691, 0xea612d25, + 0xdb8937b8, 0x7dfe3c0c, 0xec68d02b, 0x4a1fdb9f, 0x7bf7c102, + 0xdd80cab6, 0x1827f438, 0xbe50ff8c, 0x8fb8e511, 0x29cfeea5, + 0xdf879e4c, 0x79f095f8, 0x48188f65, 0xee6f84d1, 0x2bc8ba5f, + 0x8dbfb1eb, 0xbc57ab76, 0x1a20a0c2, 0x8816eaf2, 0x2e61e146, + 0x1f89fbdb, 0xb9fef06f, 0x7c59cee1, 0xda2ec555, 0xebc6dfc8, + 0x4db1d47c, 0xbbf9a495, 0x1d8eaf21, 0x2c66b5bc, 0x8a11be08, + 0x4fb68086, 0xe9c18b32, 0xd82991af, 0x7e5e9a1b, 0xefc8763c, + 0x49bf7d88, 0x78576715, 0xde206ca1, 0x1b87522f, 0xbdf0599b, + 0x8c184306, 0x2a6f48b2, 0xdc27385b, 0x7a5033ef, 0x4bb82972, + 0xedcf22c6, 0x28681c48, 0x8e1f17fc, 0xbff70d61, 0x198006d5, + 0x47abd36e, 0xe1dcd8da, 0xd034c247, 0x7643c9f3, 0xb3e4f77d, + 0x1593fcc9, 0x247be654, 0x820cede0, 0x74449d09, 0xd23396bd, + 0xe3db8c20, 0x45ac8794, 0x800bb91a, 0x267cb2ae, 0x1794a833, + 0xb1e3a387, 0x20754fa0, 0x86024414, 0xb7ea5e89, 0x119d553d, + 0xd43a6bb3, 0x724d6007, 0x43a57a9a, 0xe5d2712e, 0x139a01c7, + 0xb5ed0a73, 0x840510ee, 0x22721b5a, 0xe7d525d4, 0x41a22e60, + 0x704a34fd, 0xd63d3f49, 0xcc1d9f8b, 0x6a6a943f, 0x5b828ea2, + 0xfdf58516, 0x3852bb98, 0x9e25b02c, 0xafcdaab1, 0x09baa105, + 0xfff2d1ec, 0x5985da58, 0x686dc0c5, 0xce1acb71, 0x0bbdf5ff, + 0xadcafe4b, 0x9c22e4d6, 0x3a55ef62, 0xabc30345, 0x0db408f1, + 0x3c5c126c, 0x9a2b19d8, 0x5f8c2756, 0xf9fb2ce2, 0xc813367f, + 0x6e643dcb, 0x982c4d22, 0x3e5b4696, 0x0fb35c0b, 0xa9c457bf, + 0x6c636931, 0xca146285, 0xfbfc7818, 0x5d8b73ac, 0x03a0a617, + 0xa5d7ada3, 0x943fb73e, 0x3248bc8a, 0xf7ef8204, 0x519889b0, + 0x6070932d, 0xc6079899, 0x304fe870, 0x9638e3c4, 0xa7d0f959, + 0x01a7f2ed, 0xc400cc63, 0x6277c7d7, 0x539fdd4a, 0xf5e8d6fe, + 0x647e3ad9, 0xc209316d, 0xf3e12bf0, 0x55962044, 0x90311eca, + 0x3646157e, 0x07ae0fe3, 0xa1d90457, 0x579174be, 0xf1e67f0a, + 0xc00e6597, 0x66796e23, 0xa3de50ad, 0x05a95b19, 0x34414184, + 0x92364a30}, + {0x00000000, 0xcb5cd3a5, 0x4dc8a10b, 0x869472ae, 0x9b914216, + 0x50cd91b3, 0xd659e31d, 0x1d0530b8, 0xec53826d, 0x270f51c8, + 0xa19b2366, 0x6ac7f0c3, 0x77c2c07b, 0xbc9e13de, 0x3a0a6170, + 0xf156b2d5, 0x03d6029b, 0xc88ad13e, 0x4e1ea390, 0x85427035, + 0x9847408d, 0x531b9328, 0xd58fe186, 0x1ed33223, 0xef8580f6, + 0x24d95353, 0xa24d21fd, 0x6911f258, 0x7414c2e0, 0xbf481145, + 0x39dc63eb, 0xf280b04e, 0x07ac0536, 0xccf0d693, 0x4a64a43d, + 0x81387798, 0x9c3d4720, 0x57619485, 0xd1f5e62b, 0x1aa9358e, + 0xebff875b, 0x20a354fe, 0xa6372650, 0x6d6bf5f5, 0x706ec54d, + 0xbb3216e8, 0x3da66446, 0xf6fab7e3, 0x047a07ad, 0xcf26d408, + 0x49b2a6a6, 0x82ee7503, 0x9feb45bb, 0x54b7961e, 0xd223e4b0, + 0x197f3715, 0xe82985c0, 0x23755665, 0xa5e124cb, 0x6ebdf76e, + 0x73b8c7d6, 0xb8e41473, 0x3e7066dd, 0xf52cb578, 0x0f580a6c, + 0xc404d9c9, 0x4290ab67, 0x89cc78c2, 0x94c9487a, 0x5f959bdf, + 0xd901e971, 0x125d3ad4, 0xe30b8801, 0x28575ba4, 0xaec3290a, + 0x659ffaaf, 0x789aca17, 0xb3c619b2, 0x35526b1c, 0xfe0eb8b9, + 0x0c8e08f7, 0xc7d2db52, 0x4146a9fc, 0x8a1a7a59, 0x971f4ae1, + 0x5c439944, 0xdad7ebea, 0x118b384f, 0xe0dd8a9a, 0x2b81593f, + 0xad152b91, 0x6649f834, 0x7b4cc88c, 0xb0101b29, 0x36846987, + 0xfdd8ba22, 0x08f40f5a, 0xc3a8dcff, 0x453cae51, 0x8e607df4, + 0x93654d4c, 0x58399ee9, 0xdeadec47, 0x15f13fe2, 0xe4a78d37, + 0x2ffb5e92, 0xa96f2c3c, 0x6233ff99, 0x7f36cf21, 0xb46a1c84, + 0x32fe6e2a, 0xf9a2bd8f, 0x0b220dc1, 0xc07ede64, 0x46eaacca, + 0x8db67f6f, 0x90b34fd7, 0x5bef9c72, 0xdd7beedc, 0x16273d79, + 0xe7718fac, 0x2c2d5c09, 0xaab92ea7, 0x61e5fd02, 0x7ce0cdba, + 0xb7bc1e1f, 0x31286cb1, 0xfa74bf14, 0x1eb014d8, 0xd5ecc77d, + 0x5378b5d3, 0x98246676, 0x852156ce, 0x4e7d856b, 0xc8e9f7c5, + 0x03b52460, 0xf2e396b5, 0x39bf4510, 0xbf2b37be, 0x7477e41b, + 0x6972d4a3, 0xa22e0706, 0x24ba75a8, 0xefe6a60d, 0x1d661643, + 0xd63ac5e6, 0x50aeb748, 0x9bf264ed, 0x86f75455, 0x4dab87f0, + 0xcb3ff55e, 0x006326fb, 0xf135942e, 0x3a69478b, 0xbcfd3525, + 0x77a1e680, 0x6aa4d638, 0xa1f8059d, 0x276c7733, 0xec30a496, + 0x191c11ee, 0xd240c24b, 0x54d4b0e5, 0x9f886340, 0x828d53f8, + 0x49d1805d, 0xcf45f2f3, 0x04192156, 0xf54f9383, 0x3e134026, + 0xb8873288, 0x73dbe12d, 0x6eded195, 0xa5820230, 0x2316709e, + 0xe84aa33b, 0x1aca1375, 0xd196c0d0, 0x5702b27e, 0x9c5e61db, + 0x815b5163, 0x4a0782c6, 0xcc93f068, 0x07cf23cd, 0xf6999118, + 0x3dc542bd, 0xbb513013, 0x700de3b6, 0x6d08d30e, 0xa65400ab, + 0x20c07205, 0xeb9ca1a0, 0x11e81eb4, 0xdab4cd11, 0x5c20bfbf, + 0x977c6c1a, 0x8a795ca2, 0x41258f07, 0xc7b1fda9, 0x0ced2e0c, + 0xfdbb9cd9, 0x36e74f7c, 0xb0733dd2, 0x7b2fee77, 0x662adecf, + 0xad760d6a, 0x2be27fc4, 0xe0beac61, 0x123e1c2f, 0xd962cf8a, + 0x5ff6bd24, 0x94aa6e81, 0x89af5e39, 0x42f38d9c, 0xc467ff32, + 0x0f3b2c97, 0xfe6d9e42, 0x35314de7, 0xb3a53f49, 0x78f9ecec, + 0x65fcdc54, 0xaea00ff1, 0x28347d5f, 0xe368aefa, 0x16441b82, + 0xdd18c827, 0x5b8cba89, 0x90d0692c, 0x8dd55994, 0x46898a31, + 0xc01df89f, 0x0b412b3a, 0xfa1799ef, 0x314b4a4a, 0xb7df38e4, + 0x7c83eb41, 0x6186dbf9, 0xaada085c, 0x2c4e7af2, 0xe712a957, + 0x15921919, 0xdececabc, 0x585ab812, 0x93066bb7, 0x8e035b0f, + 0x455f88aa, 0xc3cbfa04, 0x089729a1, 0xf9c19b74, 0x329d48d1, + 0xb4093a7f, 0x7f55e9da, 0x6250d962, 0xa90c0ac7, 0x2f987869, + 0xe4c4abcc}, + {0x00000000, 0x3d6029b0, 0x7ac05360, 0x47a07ad0, 0xf580a6c0, + 0xc8e08f70, 0x8f40f5a0, 0xb220dc10, 0x30704bc1, 0x0d106271, + 0x4ab018a1, 0x77d03111, 0xc5f0ed01, 0xf890c4b1, 0xbf30be61, + 0x825097d1, 0x60e09782, 0x5d80be32, 0x1a20c4e2, 0x2740ed52, + 0x95603142, 0xa80018f2, 0xefa06222, 0xd2c04b92, 0x5090dc43, + 0x6df0f5f3, 0x2a508f23, 0x1730a693, 0xa5107a83, 0x98705333, + 0xdfd029e3, 0xe2b00053, 0xc1c12f04, 0xfca106b4, 0xbb017c64, + 0x866155d4, 0x344189c4, 0x0921a074, 0x4e81daa4, 0x73e1f314, + 0xf1b164c5, 0xccd14d75, 0x8b7137a5, 0xb6111e15, 0x0431c205, + 0x3951ebb5, 0x7ef19165, 0x4391b8d5, 0xa121b886, 0x9c419136, + 0xdbe1ebe6, 0xe681c256, 0x54a11e46, 0x69c137f6, 0x2e614d26, + 0x13016496, 0x9151f347, 0xac31daf7, 0xeb91a027, 0xd6f18997, + 0x64d15587, 0x59b17c37, 0x1e1106e7, 0x23712f57, 0x58f35849, + 0x659371f9, 0x22330b29, 0x1f532299, 0xad73fe89, 0x9013d739, + 0xd7b3ade9, 0xead38459, 0x68831388, 0x55e33a38, 0x124340e8, + 0x2f236958, 0x9d03b548, 0xa0639cf8, 0xe7c3e628, 0xdaa3cf98, + 0x3813cfcb, 0x0573e67b, 0x42d39cab, 0x7fb3b51b, 0xcd93690b, + 0xf0f340bb, 0xb7533a6b, 0x8a3313db, 0x0863840a, 0x3503adba, + 0x72a3d76a, 0x4fc3feda, 0xfde322ca, 0xc0830b7a, 0x872371aa, + 0xba43581a, 0x9932774d, 0xa4525efd, 0xe3f2242d, 0xde920d9d, + 0x6cb2d18d, 0x51d2f83d, 0x167282ed, 0x2b12ab5d, 0xa9423c8c, + 0x9422153c, 0xd3826fec, 0xeee2465c, 0x5cc29a4c, 0x61a2b3fc, + 0x2602c92c, 0x1b62e09c, 0xf9d2e0cf, 0xc4b2c97f, 0x8312b3af, + 0xbe729a1f, 0x0c52460f, 0x31326fbf, 0x7692156f, 0x4bf23cdf, + 0xc9a2ab0e, 0xf4c282be, 0xb362f86e, 0x8e02d1de, 0x3c220dce, + 0x0142247e, 0x46e25eae, 0x7b82771e, 0xb1e6b092, 0x8c869922, + 0xcb26e3f2, 0xf646ca42, 0x44661652, 0x79063fe2, 0x3ea64532, + 0x03c66c82, 0x8196fb53, 0xbcf6d2e3, 0xfb56a833, 0xc6368183, + 0x74165d93, 0x49767423, 0x0ed60ef3, 0x33b62743, 0xd1062710, + 0xec660ea0, 0xabc67470, 0x96a65dc0, 0x248681d0, 0x19e6a860, + 0x5e46d2b0, 0x6326fb00, 0xe1766cd1, 0xdc164561, 0x9bb63fb1, + 0xa6d61601, 0x14f6ca11, 0x2996e3a1, 0x6e369971, 0x5356b0c1, + 0x70279f96, 0x4d47b626, 0x0ae7ccf6, 0x3787e546, 0x85a73956, + 0xb8c710e6, 0xff676a36, 0xc2074386, 0x4057d457, 0x7d37fde7, + 0x3a978737, 0x07f7ae87, 0xb5d77297, 0x88b75b27, 0xcf1721f7, + 0xf2770847, 0x10c70814, 0x2da721a4, 0x6a075b74, 0x576772c4, + 0xe547aed4, 0xd8278764, 0x9f87fdb4, 0xa2e7d404, 0x20b743d5, + 0x1dd76a65, 0x5a7710b5, 0x67173905, 0xd537e515, 0xe857cca5, + 0xaff7b675, 0x92979fc5, 0xe915e8db, 0xd475c16b, 0x93d5bbbb, + 0xaeb5920b, 0x1c954e1b, 0x21f567ab, 0x66551d7b, 0x5b3534cb, + 0xd965a31a, 0xe4058aaa, 0xa3a5f07a, 0x9ec5d9ca, 0x2ce505da, + 0x11852c6a, 0x562556ba, 0x6b457f0a, 0x89f57f59, 0xb49556e9, + 0xf3352c39, 0xce550589, 0x7c75d999, 0x4115f029, 0x06b58af9, + 0x3bd5a349, 0xb9853498, 0x84e51d28, 0xc34567f8, 0xfe254e48, + 0x4c059258, 0x7165bbe8, 0x36c5c138, 0x0ba5e888, 0x28d4c7df, + 0x15b4ee6f, 0x521494bf, 0x6f74bd0f, 0xdd54611f, 0xe03448af, + 0xa794327f, 0x9af41bcf, 0x18a48c1e, 0x25c4a5ae, 0x6264df7e, + 0x5f04f6ce, 0xed242ade, 0xd044036e, 0x97e479be, 0xaa84500e, + 0x4834505d, 0x755479ed, 0x32f4033d, 0x0f942a8d, 0xbdb4f69d, + 0x80d4df2d, 0xc774a5fd, 0xfa148c4d, 0x78441b9c, 0x4524322c, + 0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c, + 0xca64c78c}, + {0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, + 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, + 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, + 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, + 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, + 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, + 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, + 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, + 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, + 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, + 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, + 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, + 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, + 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, + 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, + 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, + 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, + 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, + 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, + 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, + 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, + 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, + 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, + 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, + 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, + 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, + 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, + 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, + 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, + 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, + 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, + 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, + 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, + 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, + 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, + 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, + 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, + 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, + 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, + 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, + 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, + 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, + 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, + 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, + 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, + 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, + 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, + 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, + 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, + 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, + 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, + 0xde0506f1}, + {0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, + 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, + 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, + 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, + 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, + 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, + 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, + 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, + 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, + 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, + 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, + 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, + 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, + 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, + 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, + 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, + 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, + 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, + 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, + 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, + 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, + 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, + 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, + 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, + 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, + 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, + 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, + 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, + 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, + 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, + 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, + 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, + 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, + 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, + 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, + 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, + 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, + 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, + 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, + 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, + 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, + 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, + 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, + 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, + 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, + 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, + 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, + 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, + 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, + 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, + 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, + 0xbe9834ed}, + {0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, + 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, + 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, + 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, + 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, + 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, + 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, + 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, + 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, + 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, + 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, + 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, + 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, + 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, + 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, + 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, + 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, + 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, + 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, + 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, + 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, + 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, + 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, + 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, + 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, + 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, + 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, + 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, + 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, + 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, + 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, + 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, + 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, + 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, + 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, + 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, + 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, + 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, + 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, + 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, + 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, + 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, + 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, + 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, + 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, + 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, + 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, + 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, + 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, + 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, + 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, + 0x9324fd72}, + {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000, + 0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000, + 0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000, + 0xa4b8dc7900000000, 0x1ee9d5e000000000, 0x88d9d29700000000, + 0x2b4cb60900000000, 0xbd7cb17e00000000, 0x072db8e700000000, + 0x911dbf9000000000, 0x6410b71d00000000, 0xf220b06a00000000, + 0x4871b9f300000000, 0xde41be8400000000, 0x7dd4da1a00000000, + 0xebe4dd6d00000000, 0x51b5d4f400000000, 0xc785d38300000000, + 0x56986c1300000000, 0xc0a86b6400000000, 0x7af962fd00000000, + 0xecc9658a00000000, 0x4f5c011400000000, 0xd96c066300000000, + 0x633d0ffa00000000, 0xf50d088d00000000, 0xc8206e3b00000000, + 0x5e10694c00000000, 0xe44160d500000000, 0x727167a200000000, + 0xd1e4033c00000000, 0x47d4044b00000000, 0xfd850dd200000000, + 0x6bb50aa500000000, 0xfaa8b53500000000, 0x6c98b24200000000, + 0xd6c9bbdb00000000, 0x40f9bcac00000000, 0xe36cd83200000000, + 0x755cdf4500000000, 0xcf0dd6dc00000000, 0x593dd1ab00000000, + 0xac30d92600000000, 0x3a00de5100000000, 0x8051d7c800000000, + 0x1661d0bf00000000, 0xb5f4b42100000000, 0x23c4b35600000000, + 0x9995bacf00000000, 0x0fa5bdb800000000, 0x9eb8022800000000, + 0x0888055f00000000, 0xb2d90cc600000000, 0x24e90bb100000000, + 0x877c6f2f00000000, 0x114c685800000000, 0xab1d61c100000000, + 0x3d2d66b600000000, 0x9041dc7600000000, 0x0671db0100000000, + 0xbc20d29800000000, 0x2a10d5ef00000000, 0x8985b17100000000, + 0x1fb5b60600000000, 0xa5e4bf9f00000000, 0x33d4b8e800000000, + 0xa2c9077800000000, 0x34f9000f00000000, 0x8ea8099600000000, + 0x18980ee100000000, 0xbb0d6a7f00000000, 0x2d3d6d0800000000, + 0x976c649100000000, 0x015c63e600000000, 0xf4516b6b00000000, + 0x62616c1c00000000, 0xd830658500000000, 0x4e0062f200000000, + 0xed95066c00000000, 0x7ba5011b00000000, 0xc1f4088200000000, + 0x57c40ff500000000, 0xc6d9b06500000000, 0x50e9b71200000000, + 0xeab8be8b00000000, 0x7c88b9fc00000000, 0xdf1ddd6200000000, + 0x492dda1500000000, 0xf37cd38c00000000, 0x654cd4fb00000000, + 0x5861b24d00000000, 0xce51b53a00000000, 0x7400bca300000000, + 0xe230bbd400000000, 0x41a5df4a00000000, 0xd795d83d00000000, + 0x6dc4d1a400000000, 0xfbf4d6d300000000, 0x6ae9694300000000, + 0xfcd96e3400000000, 0x468867ad00000000, 0xd0b860da00000000, + 0x732d044400000000, 0xe51d033300000000, 0x5f4c0aaa00000000, + 0xc97c0ddd00000000, 0x3c71055000000000, 0xaa41022700000000, + 0x10100bbe00000000, 0x86200cc900000000, 0x25b5685700000000, + 0xb3856f2000000000, 0x09d466b900000000, 0x9fe461ce00000000, + 0x0ef9de5e00000000, 0x98c9d92900000000, 0x2298d0b000000000, + 0xb4a8d7c700000000, 0x173db35900000000, 0x810db42e00000000, + 0x3b5cbdb700000000, 0xad6cbac000000000, 0x2083b8ed00000000, + 0xb6b3bf9a00000000, 0x0ce2b60300000000, 0x9ad2b17400000000, + 0x3947d5ea00000000, 0xaf77d29d00000000, 0x1526db0400000000, + 0x8316dc7300000000, 0x120b63e300000000, 0x843b649400000000, + 0x3e6a6d0d00000000, 0xa85a6a7a00000000, 0x0bcf0ee400000000, + 0x9dff099300000000, 0x27ae000a00000000, 0xb19e077d00000000, + 0x44930ff000000000, 0xd2a3088700000000, 0x68f2011e00000000, + 0xfec2066900000000, 0x5d5762f700000000, 0xcb67658000000000, + 0x71366c1900000000, 0xe7066b6e00000000, 0x761bd4fe00000000, + 0xe02bd38900000000, 0x5a7ada1000000000, 0xcc4add6700000000, + 0x6fdfb9f900000000, 0xf9efbe8e00000000, 0x43beb71700000000, + 0xd58eb06000000000, 0xe8a3d6d600000000, 0x7e93d1a100000000, + 0xc4c2d83800000000, 0x52f2df4f00000000, 0xf167bbd100000000, + 0x6757bca600000000, 0xdd06b53f00000000, 0x4b36b24800000000, + 0xda2b0dd800000000, 0x4c1b0aaf00000000, 0xf64a033600000000, + 0x607a044100000000, 0xc3ef60df00000000, 0x55df67a800000000, + 0xef8e6e3100000000, 0x79be694600000000, 0x8cb361cb00000000, + 0x1a8366bc00000000, 0xa0d26f2500000000, 0x36e2685200000000, + 0x95770ccc00000000, 0x03470bbb00000000, 0xb916022200000000, + 0x2f26055500000000, 0xbe3bbac500000000, 0x280bbdb200000000, + 0x925ab42b00000000, 0x046ab35c00000000, 0xa7ffd7c200000000, + 0x31cfd0b500000000, 0x8b9ed92c00000000, 0x1daede5b00000000, + 0xb0c2649b00000000, 0x26f263ec00000000, 0x9ca36a7500000000, + 0x0a936d0200000000, 0xa906099c00000000, 0x3f360eeb00000000, + 0x8567077200000000, 0x1357000500000000, 0x824abf9500000000, + 0x147ab8e200000000, 0xae2bb17b00000000, 0x381bb60c00000000, + 0x9b8ed29200000000, 0x0dbed5e500000000, 0xb7efdc7c00000000, + 0x21dfdb0b00000000, 0xd4d2d38600000000, 0x42e2d4f100000000, + 0xf8b3dd6800000000, 0x6e83da1f00000000, 0xcd16be8100000000, + 0x5b26b9f600000000, 0xe177b06f00000000, 0x7747b71800000000, + 0xe65a088800000000, 0x706a0fff00000000, 0xca3b066600000000, + 0x5c0b011100000000, 0xff9e658f00000000, 0x69ae62f800000000, + 0xd3ff6b6100000000, 0x45cf6c1600000000, 0x78e20aa000000000, + 0xeed20dd700000000, 0x5483044e00000000, 0xc2b3033900000000, + 0x612667a700000000, 0xf71660d000000000, 0x4d47694900000000, + 0xdb776e3e00000000, 0x4a6ad1ae00000000, 0xdc5ad6d900000000, + 0x660bdf4000000000, 0xf03bd83700000000, 0x53aebca900000000, + 0xc59ebbde00000000, 0x7fcfb24700000000, 0xe9ffb53000000000, + 0x1cf2bdbd00000000, 0x8ac2baca00000000, 0x3093b35300000000, + 0xa6a3b42400000000, 0x0536d0ba00000000, 0x9306d7cd00000000, + 0x2957de5400000000, 0xbf67d92300000000, 0x2e7a66b300000000, + 0xb84a61c400000000, 0x021b685d00000000, 0x942b6f2a00000000, + 0x37be0bb400000000, 0xa18e0cc300000000, 0x1bdf055a00000000, + 0x8def022d00000000}, + {0x0000000000000000, 0x41311b1900000000, 0x8262363200000000, + 0xc3532d2b00000000, 0x04c56c6400000000, 0x45f4777d00000000, + 0x86a75a5600000000, 0xc796414f00000000, 0x088ad9c800000000, + 0x49bbc2d100000000, 0x8ae8effa00000000, 0xcbd9f4e300000000, + 0x0c4fb5ac00000000, 0x4d7eaeb500000000, 0x8e2d839e00000000, + 0xcf1c988700000000, 0x5112c24a00000000, 0x1023d95300000000, + 0xd370f47800000000, 0x9241ef6100000000, 0x55d7ae2e00000000, + 0x14e6b53700000000, 0xd7b5981c00000000, 0x9684830500000000, + 0x59981b8200000000, 0x18a9009b00000000, 0xdbfa2db000000000, + 0x9acb36a900000000, 0x5d5d77e600000000, 0x1c6c6cff00000000, + 0xdf3f41d400000000, 0x9e0e5acd00000000, 0xa224849500000000, + 0xe3159f8c00000000, 0x2046b2a700000000, 0x6177a9be00000000, + 0xa6e1e8f100000000, 0xe7d0f3e800000000, 0x2483dec300000000, + 0x65b2c5da00000000, 0xaaae5d5d00000000, 0xeb9f464400000000, + 0x28cc6b6f00000000, 0x69fd707600000000, 0xae6b313900000000, + 0xef5a2a2000000000, 0x2c09070b00000000, 0x6d381c1200000000, + 0xf33646df00000000, 0xb2075dc600000000, 0x715470ed00000000, + 0x30656bf400000000, 0xf7f32abb00000000, 0xb6c231a200000000, + 0x75911c8900000000, 0x34a0079000000000, 0xfbbc9f1700000000, + 0xba8d840e00000000, 0x79dea92500000000, 0x38efb23c00000000, + 0xff79f37300000000, 0xbe48e86a00000000, 0x7d1bc54100000000, + 0x3c2ade5800000000, 0x054f79f000000000, 0x447e62e900000000, + 0x872d4fc200000000, 0xc61c54db00000000, 0x018a159400000000, + 0x40bb0e8d00000000, 0x83e823a600000000, 0xc2d938bf00000000, + 0x0dc5a03800000000, 0x4cf4bb2100000000, 0x8fa7960a00000000, + 0xce968d1300000000, 0x0900cc5c00000000, 0x4831d74500000000, + 0x8b62fa6e00000000, 0xca53e17700000000, 0x545dbbba00000000, + 0x156ca0a300000000, 0xd63f8d8800000000, 0x970e969100000000, + 0x5098d7de00000000, 0x11a9ccc700000000, 0xd2fae1ec00000000, + 0x93cbfaf500000000, 0x5cd7627200000000, 0x1de6796b00000000, + 0xdeb5544000000000, 0x9f844f5900000000, 0x58120e1600000000, + 0x1923150f00000000, 0xda70382400000000, 0x9b41233d00000000, + 0xa76bfd6500000000, 0xe65ae67c00000000, 0x2509cb5700000000, + 0x6438d04e00000000, 0xa3ae910100000000, 0xe29f8a1800000000, + 0x21cca73300000000, 0x60fdbc2a00000000, 0xafe124ad00000000, + 0xeed03fb400000000, 0x2d83129f00000000, 0x6cb2098600000000, + 0xab2448c900000000, 0xea1553d000000000, 0x29467efb00000000, + 0x687765e200000000, 0xf6793f2f00000000, 0xb748243600000000, + 0x741b091d00000000, 0x352a120400000000, 0xf2bc534b00000000, + 0xb38d485200000000, 0x70de657900000000, 0x31ef7e6000000000, + 0xfef3e6e700000000, 0xbfc2fdfe00000000, 0x7c91d0d500000000, + 0x3da0cbcc00000000, 0xfa368a8300000000, 0xbb07919a00000000, + 0x7854bcb100000000, 0x3965a7a800000000, 0x4b98833b00000000, + 0x0aa9982200000000, 0xc9fab50900000000, 0x88cbae1000000000, + 0x4f5def5f00000000, 0x0e6cf44600000000, 0xcd3fd96d00000000, + 0x8c0ec27400000000, 0x43125af300000000, 0x022341ea00000000, + 0xc1706cc100000000, 0x804177d800000000, 0x47d7369700000000, + 0x06e62d8e00000000, 0xc5b500a500000000, 0x84841bbc00000000, + 0x1a8a417100000000, 0x5bbb5a6800000000, 0x98e8774300000000, + 0xd9d96c5a00000000, 0x1e4f2d1500000000, 0x5f7e360c00000000, + 0x9c2d1b2700000000, 0xdd1c003e00000000, 0x120098b900000000, + 0x533183a000000000, 0x9062ae8b00000000, 0xd153b59200000000, + 0x16c5f4dd00000000, 0x57f4efc400000000, 0x94a7c2ef00000000, + 0xd596d9f600000000, 0xe9bc07ae00000000, 0xa88d1cb700000000, + 0x6bde319c00000000, 0x2aef2a8500000000, 0xed796bca00000000, + 0xac4870d300000000, 0x6f1b5df800000000, 0x2e2a46e100000000, + 0xe136de6600000000, 0xa007c57f00000000, 0x6354e85400000000, + 0x2265f34d00000000, 0xe5f3b20200000000, 0xa4c2a91b00000000, + 0x6791843000000000, 0x26a09f2900000000, 0xb8aec5e400000000, + 0xf99fdefd00000000, 0x3accf3d600000000, 0x7bfde8cf00000000, + 0xbc6ba98000000000, 0xfd5ab29900000000, 0x3e099fb200000000, + 0x7f3884ab00000000, 0xb0241c2c00000000, 0xf115073500000000, + 0x32462a1e00000000, 0x7377310700000000, 0xb4e1704800000000, + 0xf5d06b5100000000, 0x3683467a00000000, 0x77b25d6300000000, + 0x4ed7facb00000000, 0x0fe6e1d200000000, 0xccb5ccf900000000, + 0x8d84d7e000000000, 0x4a1296af00000000, 0x0b238db600000000, + 0xc870a09d00000000, 0x8941bb8400000000, 0x465d230300000000, + 0x076c381a00000000, 0xc43f153100000000, 0x850e0e2800000000, + 0x42984f6700000000, 0x03a9547e00000000, 0xc0fa795500000000, + 0x81cb624c00000000, 0x1fc5388100000000, 0x5ef4239800000000, + 0x9da70eb300000000, 0xdc9615aa00000000, 0x1b0054e500000000, + 0x5a314ffc00000000, 0x996262d700000000, 0xd85379ce00000000, + 0x174fe14900000000, 0x567efa5000000000, 0x952dd77b00000000, + 0xd41ccc6200000000, 0x138a8d2d00000000, 0x52bb963400000000, + 0x91e8bb1f00000000, 0xd0d9a00600000000, 0xecf37e5e00000000, + 0xadc2654700000000, 0x6e91486c00000000, 0x2fa0537500000000, + 0xe836123a00000000, 0xa907092300000000, 0x6a54240800000000, + 0x2b653f1100000000, 0xe479a79600000000, 0xa548bc8f00000000, + 0x661b91a400000000, 0x272a8abd00000000, 0xe0bccbf200000000, + 0xa18dd0eb00000000, 0x62defdc000000000, 0x23efe6d900000000, + 0xbde1bc1400000000, 0xfcd0a70d00000000, 0x3f838a2600000000, + 0x7eb2913f00000000, 0xb924d07000000000, 0xf815cb6900000000, + 0x3b46e64200000000, 0x7a77fd5b00000000, 0xb56b65dc00000000, + 0xf45a7ec500000000, 0x370953ee00000000, 0x763848f700000000, + 0xb1ae09b800000000, 0xf09f12a100000000, 0x33cc3f8a00000000, + 0x72fd249300000000}, + {0x0000000000000000, 0x376ac20100000000, 0x6ed4840300000000, + 0x59be460200000000, 0xdca8090700000000, 0xebc2cb0600000000, + 0xb27c8d0400000000, 0x85164f0500000000, 0xb851130e00000000, + 0x8f3bd10f00000000, 0xd685970d00000000, 0xe1ef550c00000000, + 0x64f91a0900000000, 0x5393d80800000000, 0x0a2d9e0a00000000, + 0x3d475c0b00000000, 0x70a3261c00000000, 0x47c9e41d00000000, + 0x1e77a21f00000000, 0x291d601e00000000, 0xac0b2f1b00000000, + 0x9b61ed1a00000000, 0xc2dfab1800000000, 0xf5b5691900000000, + 0xc8f2351200000000, 0xff98f71300000000, 0xa626b11100000000, + 0x914c731000000000, 0x145a3c1500000000, 0x2330fe1400000000, + 0x7a8eb81600000000, 0x4de47a1700000000, 0xe0464d3800000000, + 0xd72c8f3900000000, 0x8e92c93b00000000, 0xb9f80b3a00000000, + 0x3cee443f00000000, 0x0b84863e00000000, 0x523ac03c00000000, + 0x6550023d00000000, 0x58175e3600000000, 0x6f7d9c3700000000, + 0x36c3da3500000000, 0x01a9183400000000, 0x84bf573100000000, + 0xb3d5953000000000, 0xea6bd33200000000, 0xdd01113300000000, + 0x90e56b2400000000, 0xa78fa92500000000, 0xfe31ef2700000000, + 0xc95b2d2600000000, 0x4c4d622300000000, 0x7b27a02200000000, + 0x2299e62000000000, 0x15f3242100000000, 0x28b4782a00000000, + 0x1fdeba2b00000000, 0x4660fc2900000000, 0x710a3e2800000000, + 0xf41c712d00000000, 0xc376b32c00000000, 0x9ac8f52e00000000, + 0xada2372f00000000, 0xc08d9a7000000000, 0xf7e7587100000000, + 0xae591e7300000000, 0x9933dc7200000000, 0x1c25937700000000, + 0x2b4f517600000000, 0x72f1177400000000, 0x459bd57500000000, + 0x78dc897e00000000, 0x4fb64b7f00000000, 0x16080d7d00000000, + 0x2162cf7c00000000, 0xa474807900000000, 0x931e427800000000, + 0xcaa0047a00000000, 0xfdcac67b00000000, 0xb02ebc6c00000000, + 0x87447e6d00000000, 0xdefa386f00000000, 0xe990fa6e00000000, + 0x6c86b56b00000000, 0x5bec776a00000000, 0x0252316800000000, + 0x3538f36900000000, 0x087faf6200000000, 0x3f156d6300000000, + 0x66ab2b6100000000, 0x51c1e96000000000, 0xd4d7a66500000000, + 0xe3bd646400000000, 0xba03226600000000, 0x8d69e06700000000, + 0x20cbd74800000000, 0x17a1154900000000, 0x4e1f534b00000000, + 0x7975914a00000000, 0xfc63de4f00000000, 0xcb091c4e00000000, + 0x92b75a4c00000000, 0xa5dd984d00000000, 0x989ac44600000000, + 0xaff0064700000000, 0xf64e404500000000, 0xc124824400000000, + 0x4432cd4100000000, 0x73580f4000000000, 0x2ae6494200000000, + 0x1d8c8b4300000000, 0x5068f15400000000, 0x6702335500000000, + 0x3ebc755700000000, 0x09d6b75600000000, 0x8cc0f85300000000, + 0xbbaa3a5200000000, 0xe2147c5000000000, 0xd57ebe5100000000, + 0xe839e25a00000000, 0xdf53205b00000000, 0x86ed665900000000, + 0xb187a45800000000, 0x3491eb5d00000000, 0x03fb295c00000000, + 0x5a456f5e00000000, 0x6d2fad5f00000000, 0x801b35e100000000, + 0xb771f7e000000000, 0xeecfb1e200000000, 0xd9a573e300000000, + 0x5cb33ce600000000, 0x6bd9fee700000000, 0x3267b8e500000000, + 0x050d7ae400000000, 0x384a26ef00000000, 0x0f20e4ee00000000, + 0x569ea2ec00000000, 0x61f460ed00000000, 0xe4e22fe800000000, + 0xd388ede900000000, 0x8a36abeb00000000, 0xbd5c69ea00000000, + 0xf0b813fd00000000, 0xc7d2d1fc00000000, 0x9e6c97fe00000000, + 0xa90655ff00000000, 0x2c101afa00000000, 0x1b7ad8fb00000000, + 0x42c49ef900000000, 0x75ae5cf800000000, 0x48e900f300000000, + 0x7f83c2f200000000, 0x263d84f000000000, 0x115746f100000000, + 0x944109f400000000, 0xa32bcbf500000000, 0xfa958df700000000, + 0xcdff4ff600000000, 0x605d78d900000000, 0x5737bad800000000, + 0x0e89fcda00000000, 0x39e33edb00000000, 0xbcf571de00000000, + 0x8b9fb3df00000000, 0xd221f5dd00000000, 0xe54b37dc00000000, + 0xd80c6bd700000000, 0xef66a9d600000000, 0xb6d8efd400000000, + 0x81b22dd500000000, 0x04a462d000000000, 0x33cea0d100000000, + 0x6a70e6d300000000, 0x5d1a24d200000000, 0x10fe5ec500000000, + 0x27949cc400000000, 0x7e2adac600000000, 0x494018c700000000, + 0xcc5657c200000000, 0xfb3c95c300000000, 0xa282d3c100000000, + 0x95e811c000000000, 0xa8af4dcb00000000, 0x9fc58fca00000000, + 0xc67bc9c800000000, 0xf1110bc900000000, 0x740744cc00000000, + 0x436d86cd00000000, 0x1ad3c0cf00000000, 0x2db902ce00000000, + 0x4096af9100000000, 0x77fc6d9000000000, 0x2e422b9200000000, + 0x1928e99300000000, 0x9c3ea69600000000, 0xab54649700000000, + 0xf2ea229500000000, 0xc580e09400000000, 0xf8c7bc9f00000000, + 0xcfad7e9e00000000, 0x9613389c00000000, 0xa179fa9d00000000, + 0x246fb59800000000, 0x1305779900000000, 0x4abb319b00000000, + 0x7dd1f39a00000000, 0x3035898d00000000, 0x075f4b8c00000000, + 0x5ee10d8e00000000, 0x698bcf8f00000000, 0xec9d808a00000000, + 0xdbf7428b00000000, 0x8249048900000000, 0xb523c68800000000, + 0x88649a8300000000, 0xbf0e588200000000, 0xe6b01e8000000000, + 0xd1dadc8100000000, 0x54cc938400000000, 0x63a6518500000000, + 0x3a18178700000000, 0x0d72d58600000000, 0xa0d0e2a900000000, + 0x97ba20a800000000, 0xce0466aa00000000, 0xf96ea4ab00000000, + 0x7c78ebae00000000, 0x4b1229af00000000, 0x12ac6fad00000000, + 0x25c6adac00000000, 0x1881f1a700000000, 0x2feb33a600000000, + 0x765575a400000000, 0x413fb7a500000000, 0xc429f8a000000000, + 0xf3433aa100000000, 0xaafd7ca300000000, 0x9d97bea200000000, + 0xd073c4b500000000, 0xe71906b400000000, 0xbea740b600000000, + 0x89cd82b700000000, 0x0cdbcdb200000000, 0x3bb10fb300000000, + 0x620f49b100000000, 0x55658bb000000000, 0x6822d7bb00000000, + 0x5f4815ba00000000, 0x06f653b800000000, 0x319c91b900000000, + 0xb48adebc00000000, 0x83e01cbd00000000, 0xda5e5abf00000000, + 0xed3498be00000000}, + {0x0000000000000000, 0x6567bcb800000000, 0x8bc809aa00000000, + 0xeeafb51200000000, 0x5797628f00000000, 0x32f0de3700000000, + 0xdc5f6b2500000000, 0xb938d79d00000000, 0xef28b4c500000000, + 0x8a4f087d00000000, 0x64e0bd6f00000000, 0x018701d700000000, + 0xb8bfd64a00000000, 0xddd86af200000000, 0x3377dfe000000000, + 0x5610635800000000, 0x9f57195000000000, 0xfa30a5e800000000, + 0x149f10fa00000000, 0x71f8ac4200000000, 0xc8c07bdf00000000, + 0xada7c76700000000, 0x4308727500000000, 0x266fcecd00000000, + 0x707fad9500000000, 0x1518112d00000000, 0xfbb7a43f00000000, + 0x9ed0188700000000, 0x27e8cf1a00000000, 0x428f73a200000000, + 0xac20c6b000000000, 0xc9477a0800000000, 0x3eaf32a000000000, + 0x5bc88e1800000000, 0xb5673b0a00000000, 0xd00087b200000000, + 0x6938502f00000000, 0x0c5fec9700000000, 0xe2f0598500000000, + 0x8797e53d00000000, 0xd187866500000000, 0xb4e03add00000000, + 0x5a4f8fcf00000000, 0x3f28337700000000, 0x8610e4ea00000000, + 0xe377585200000000, 0x0dd8ed4000000000, 0x68bf51f800000000, + 0xa1f82bf000000000, 0xc49f974800000000, 0x2a30225a00000000, + 0x4f579ee200000000, 0xf66f497f00000000, 0x9308f5c700000000, + 0x7da740d500000000, 0x18c0fc6d00000000, 0x4ed09f3500000000, + 0x2bb7238d00000000, 0xc518969f00000000, 0xa07f2a2700000000, + 0x1947fdba00000000, 0x7c20410200000000, 0x928ff41000000000, + 0xf7e848a800000000, 0x3d58149b00000000, 0x583fa82300000000, + 0xb6901d3100000000, 0xd3f7a18900000000, 0x6acf761400000000, + 0x0fa8caac00000000, 0xe1077fbe00000000, 0x8460c30600000000, + 0xd270a05e00000000, 0xb7171ce600000000, 0x59b8a9f400000000, + 0x3cdf154c00000000, 0x85e7c2d100000000, 0xe0807e6900000000, + 0x0e2fcb7b00000000, 0x6b4877c300000000, 0xa20f0dcb00000000, + 0xc768b17300000000, 0x29c7046100000000, 0x4ca0b8d900000000, + 0xf5986f4400000000, 0x90ffd3fc00000000, 0x7e5066ee00000000, + 0x1b37da5600000000, 0x4d27b90e00000000, 0x284005b600000000, + 0xc6efb0a400000000, 0xa3880c1c00000000, 0x1ab0db8100000000, + 0x7fd7673900000000, 0x9178d22b00000000, 0xf41f6e9300000000, + 0x03f7263b00000000, 0x66909a8300000000, 0x883f2f9100000000, + 0xed58932900000000, 0x546044b400000000, 0x3107f80c00000000, + 0xdfa84d1e00000000, 0xbacff1a600000000, 0xecdf92fe00000000, + 0x89b82e4600000000, 0x67179b5400000000, 0x027027ec00000000, + 0xbb48f07100000000, 0xde2f4cc900000000, 0x3080f9db00000000, + 0x55e7456300000000, 0x9ca03f6b00000000, 0xf9c783d300000000, + 0x176836c100000000, 0x720f8a7900000000, 0xcb375de400000000, + 0xae50e15c00000000, 0x40ff544e00000000, 0x2598e8f600000000, + 0x73888bae00000000, 0x16ef371600000000, 0xf840820400000000, + 0x9d273ebc00000000, 0x241fe92100000000, 0x4178559900000000, + 0xafd7e08b00000000, 0xcab05c3300000000, 0x3bb659ed00000000, + 0x5ed1e55500000000, 0xb07e504700000000, 0xd519ecff00000000, + 0x6c213b6200000000, 0x094687da00000000, 0xe7e932c800000000, + 0x828e8e7000000000, 0xd49eed2800000000, 0xb1f9519000000000, + 0x5f56e48200000000, 0x3a31583a00000000, 0x83098fa700000000, + 0xe66e331f00000000, 0x08c1860d00000000, 0x6da63ab500000000, + 0xa4e140bd00000000, 0xc186fc0500000000, 0x2f29491700000000, + 0x4a4ef5af00000000, 0xf376223200000000, 0x96119e8a00000000, + 0x78be2b9800000000, 0x1dd9972000000000, 0x4bc9f47800000000, + 0x2eae48c000000000, 0xc001fdd200000000, 0xa566416a00000000, + 0x1c5e96f700000000, 0x79392a4f00000000, 0x97969f5d00000000, + 0xf2f123e500000000, 0x05196b4d00000000, 0x607ed7f500000000, + 0x8ed162e700000000, 0xebb6de5f00000000, 0x528e09c200000000, + 0x37e9b57a00000000, 0xd946006800000000, 0xbc21bcd000000000, + 0xea31df8800000000, 0x8f56633000000000, 0x61f9d62200000000, + 0x049e6a9a00000000, 0xbda6bd0700000000, 0xd8c101bf00000000, + 0x366eb4ad00000000, 0x5309081500000000, 0x9a4e721d00000000, + 0xff29cea500000000, 0x11867bb700000000, 0x74e1c70f00000000, + 0xcdd9109200000000, 0xa8beac2a00000000, 0x4611193800000000, + 0x2376a58000000000, 0x7566c6d800000000, 0x10017a6000000000, + 0xfeaecf7200000000, 0x9bc973ca00000000, 0x22f1a45700000000, + 0x479618ef00000000, 0xa939adfd00000000, 0xcc5e114500000000, + 0x06ee4d7600000000, 0x6389f1ce00000000, 0x8d2644dc00000000, + 0xe841f86400000000, 0x51792ff900000000, 0x341e934100000000, + 0xdab1265300000000, 0xbfd69aeb00000000, 0xe9c6f9b300000000, + 0x8ca1450b00000000, 0x620ef01900000000, 0x07694ca100000000, + 0xbe519b3c00000000, 0xdb36278400000000, 0x3599929600000000, + 0x50fe2e2e00000000, 0x99b9542600000000, 0xfcdee89e00000000, + 0x12715d8c00000000, 0x7716e13400000000, 0xce2e36a900000000, + 0xab498a1100000000, 0x45e63f0300000000, 0x208183bb00000000, + 0x7691e0e300000000, 0x13f65c5b00000000, 0xfd59e94900000000, + 0x983e55f100000000, 0x2106826c00000000, 0x44613ed400000000, + 0xaace8bc600000000, 0xcfa9377e00000000, 0x38417fd600000000, + 0x5d26c36e00000000, 0xb389767c00000000, 0xd6eecac400000000, + 0x6fd61d5900000000, 0x0ab1a1e100000000, 0xe41e14f300000000, + 0x8179a84b00000000, 0xd769cb1300000000, 0xb20e77ab00000000, + 0x5ca1c2b900000000, 0x39c67e0100000000, 0x80fea99c00000000, + 0xe599152400000000, 0x0b36a03600000000, 0x6e511c8e00000000, + 0xa716668600000000, 0xc271da3e00000000, 0x2cde6f2c00000000, + 0x49b9d39400000000, 0xf081040900000000, 0x95e6b8b100000000, + 0x7b490da300000000, 0x1e2eb11b00000000, 0x483ed24300000000, + 0x2d596efb00000000, 0xc3f6dbe900000000, 0xa691675100000000, + 0x1fa9b0cc00000000, 0x7ace0c7400000000, 0x9461b96600000000, + 0xf10605de00000000}, + {0x0000000000000000, 0xb029603d00000000, 0x6053c07a00000000, + 0xd07aa04700000000, 0xc0a680f500000000, 0x708fe0c800000000, + 0xa0f5408f00000000, 0x10dc20b200000000, 0xc14b703000000000, + 0x7162100d00000000, 0xa118b04a00000000, 0x1131d07700000000, + 0x01edf0c500000000, 0xb1c490f800000000, 0x61be30bf00000000, + 0xd197508200000000, 0x8297e06000000000, 0x32be805d00000000, + 0xe2c4201a00000000, 0x52ed402700000000, 0x4231609500000000, + 0xf21800a800000000, 0x2262a0ef00000000, 0x924bc0d200000000, + 0x43dc905000000000, 0xf3f5f06d00000000, 0x238f502a00000000, + 0x93a6301700000000, 0x837a10a500000000, 0x3353709800000000, + 0xe329d0df00000000, 0x5300b0e200000000, 0x042fc1c100000000, + 0xb406a1fc00000000, 0x647c01bb00000000, 0xd455618600000000, + 0xc489413400000000, 0x74a0210900000000, 0xa4da814e00000000, + 0x14f3e17300000000, 0xc564b1f100000000, 0x754dd1cc00000000, + 0xa537718b00000000, 0x151e11b600000000, 0x05c2310400000000, + 0xb5eb513900000000, 0x6591f17e00000000, 0xd5b8914300000000, + 0x86b821a100000000, 0x3691419c00000000, 0xe6ebe1db00000000, + 0x56c281e600000000, 0x461ea15400000000, 0xf637c16900000000, + 0x264d612e00000000, 0x9664011300000000, 0x47f3519100000000, + 0xf7da31ac00000000, 0x27a091eb00000000, 0x9789f1d600000000, + 0x8755d16400000000, 0x377cb15900000000, 0xe706111e00000000, + 0x572f712300000000, 0x4958f35800000000, 0xf971936500000000, + 0x290b332200000000, 0x9922531f00000000, 0x89fe73ad00000000, + 0x39d7139000000000, 0xe9adb3d700000000, 0x5984d3ea00000000, + 0x8813836800000000, 0x383ae35500000000, 0xe840431200000000, + 0x5869232f00000000, 0x48b5039d00000000, 0xf89c63a000000000, + 0x28e6c3e700000000, 0x98cfa3da00000000, 0xcbcf133800000000, + 0x7be6730500000000, 0xab9cd34200000000, 0x1bb5b37f00000000, + 0x0b6993cd00000000, 0xbb40f3f000000000, 0x6b3a53b700000000, + 0xdb13338a00000000, 0x0a84630800000000, 0xbaad033500000000, + 0x6ad7a37200000000, 0xdafec34f00000000, 0xca22e3fd00000000, + 0x7a0b83c000000000, 0xaa71238700000000, 0x1a5843ba00000000, + 0x4d77329900000000, 0xfd5e52a400000000, 0x2d24f2e300000000, + 0x9d0d92de00000000, 0x8dd1b26c00000000, 0x3df8d25100000000, + 0xed82721600000000, 0x5dab122b00000000, 0x8c3c42a900000000, + 0x3c15229400000000, 0xec6f82d300000000, 0x5c46e2ee00000000, + 0x4c9ac25c00000000, 0xfcb3a26100000000, 0x2cc9022600000000, + 0x9ce0621b00000000, 0xcfe0d2f900000000, 0x7fc9b2c400000000, + 0xafb3128300000000, 0x1f9a72be00000000, 0x0f46520c00000000, + 0xbf6f323100000000, 0x6f15927600000000, 0xdf3cf24b00000000, + 0x0eaba2c900000000, 0xbe82c2f400000000, 0x6ef862b300000000, + 0xded1028e00000000, 0xce0d223c00000000, 0x7e24420100000000, + 0xae5ee24600000000, 0x1e77827b00000000, 0x92b0e6b100000000, + 0x2299868c00000000, 0xf2e326cb00000000, 0x42ca46f600000000, + 0x5216664400000000, 0xe23f067900000000, 0x3245a63e00000000, + 0x826cc60300000000, 0x53fb968100000000, 0xe3d2f6bc00000000, + 0x33a856fb00000000, 0x838136c600000000, 0x935d167400000000, + 0x2374764900000000, 0xf30ed60e00000000, 0x4327b63300000000, + 0x102706d100000000, 0xa00e66ec00000000, 0x7074c6ab00000000, + 0xc05da69600000000, 0xd081862400000000, 0x60a8e61900000000, + 0xb0d2465e00000000, 0x00fb266300000000, 0xd16c76e100000000, + 0x614516dc00000000, 0xb13fb69b00000000, 0x0116d6a600000000, + 0x11caf61400000000, 0xa1e3962900000000, 0x7199366e00000000, + 0xc1b0565300000000, 0x969f277000000000, 0x26b6474d00000000, + 0xf6cce70a00000000, 0x46e5873700000000, 0x5639a78500000000, + 0xe610c7b800000000, 0x366a67ff00000000, 0x864307c200000000, + 0x57d4574000000000, 0xe7fd377d00000000, 0x3787973a00000000, + 0x87aef70700000000, 0x9772d7b500000000, 0x275bb78800000000, + 0xf72117cf00000000, 0x470877f200000000, 0x1408c71000000000, + 0xa421a72d00000000, 0x745b076a00000000, 0xc472675700000000, + 0xd4ae47e500000000, 0x648727d800000000, 0xb4fd879f00000000, + 0x04d4e7a200000000, 0xd543b72000000000, 0x656ad71d00000000, + 0xb510775a00000000, 0x0539176700000000, 0x15e537d500000000, + 0xa5cc57e800000000, 0x75b6f7af00000000, 0xc59f979200000000, + 0xdbe815e900000000, 0x6bc175d400000000, 0xbbbbd59300000000, + 0x0b92b5ae00000000, 0x1b4e951c00000000, 0xab67f52100000000, + 0x7b1d556600000000, 0xcb34355b00000000, 0x1aa365d900000000, + 0xaa8a05e400000000, 0x7af0a5a300000000, 0xcad9c59e00000000, + 0xda05e52c00000000, 0x6a2c851100000000, 0xba56255600000000, + 0x0a7f456b00000000, 0x597ff58900000000, 0xe95695b400000000, + 0x392c35f300000000, 0x890555ce00000000, 0x99d9757c00000000, + 0x29f0154100000000, 0xf98ab50600000000, 0x49a3d53b00000000, + 0x983485b900000000, 0x281de58400000000, 0xf86745c300000000, + 0x484e25fe00000000, 0x5892054c00000000, 0xe8bb657100000000, + 0x38c1c53600000000, 0x88e8a50b00000000, 0xdfc7d42800000000, + 0x6feeb41500000000, 0xbf94145200000000, 0x0fbd746f00000000, + 0x1f6154dd00000000, 0xaf4834e000000000, 0x7f3294a700000000, + 0xcf1bf49a00000000, 0x1e8ca41800000000, 0xaea5c42500000000, + 0x7edf646200000000, 0xcef6045f00000000, 0xde2a24ed00000000, + 0x6e0344d000000000, 0xbe79e49700000000, 0x0e5084aa00000000, + 0x5d50344800000000, 0xed79547500000000, 0x3d03f43200000000, + 0x8d2a940f00000000, 0x9df6b4bd00000000, 0x2ddfd48000000000, + 0xfda574c700000000, 0x4d8c14fa00000000, 0x9c1b447800000000, + 0x2c32244500000000, 0xfc48840200000000, 0x4c61e43f00000000, + 0x5cbdc48d00000000, 0xec94a4b000000000, 0x3cee04f700000000, + 0x8cc764ca00000000}, + {0x0000000000000000, 0xa5d35ccb00000000, 0x0ba1c84d00000000, + 0xae72948600000000, 0x1642919b00000000, 0xb391cd5000000000, + 0x1de359d600000000, 0xb830051d00000000, 0x6d8253ec00000000, + 0xc8510f2700000000, 0x66239ba100000000, 0xc3f0c76a00000000, + 0x7bc0c27700000000, 0xde139ebc00000000, 0x70610a3a00000000, + 0xd5b256f100000000, 0x9b02d60300000000, 0x3ed18ac800000000, + 0x90a31e4e00000000, 0x3570428500000000, 0x8d40479800000000, + 0x28931b5300000000, 0x86e18fd500000000, 0x2332d31e00000000, + 0xf68085ef00000000, 0x5353d92400000000, 0xfd214da200000000, + 0x58f2116900000000, 0xe0c2147400000000, 0x451148bf00000000, + 0xeb63dc3900000000, 0x4eb080f200000000, 0x3605ac0700000000, + 0x93d6f0cc00000000, 0x3da4644a00000000, 0x9877388100000000, + 0x20473d9c00000000, 0x8594615700000000, 0x2be6f5d100000000, + 0x8e35a91a00000000, 0x5b87ffeb00000000, 0xfe54a32000000000, + 0x502637a600000000, 0xf5f56b6d00000000, 0x4dc56e7000000000, + 0xe81632bb00000000, 0x4664a63d00000000, 0xe3b7faf600000000, + 0xad077a0400000000, 0x08d426cf00000000, 0xa6a6b24900000000, + 0x0375ee8200000000, 0xbb45eb9f00000000, 0x1e96b75400000000, + 0xb0e423d200000000, 0x15377f1900000000, 0xc08529e800000000, + 0x6556752300000000, 0xcb24e1a500000000, 0x6ef7bd6e00000000, + 0xd6c7b87300000000, 0x7314e4b800000000, 0xdd66703e00000000, + 0x78b52cf500000000, 0x6c0a580f00000000, 0xc9d904c400000000, + 0x67ab904200000000, 0xc278cc8900000000, 0x7a48c99400000000, + 0xdf9b955f00000000, 0x71e901d900000000, 0xd43a5d1200000000, + 0x01880be300000000, 0xa45b572800000000, 0x0a29c3ae00000000, + 0xaffa9f6500000000, 0x17ca9a7800000000, 0xb219c6b300000000, + 0x1c6b523500000000, 0xb9b80efe00000000, 0xf7088e0c00000000, + 0x52dbd2c700000000, 0xfca9464100000000, 0x597a1a8a00000000, + 0xe14a1f9700000000, 0x4499435c00000000, 0xeaebd7da00000000, + 0x4f388b1100000000, 0x9a8adde000000000, 0x3f59812b00000000, + 0x912b15ad00000000, 0x34f8496600000000, 0x8cc84c7b00000000, + 0x291b10b000000000, 0x8769843600000000, 0x22bad8fd00000000, + 0x5a0ff40800000000, 0xffdca8c300000000, 0x51ae3c4500000000, + 0xf47d608e00000000, 0x4c4d659300000000, 0xe99e395800000000, + 0x47ecadde00000000, 0xe23ff11500000000, 0x378da7e400000000, + 0x925efb2f00000000, 0x3c2c6fa900000000, 0x99ff336200000000, + 0x21cf367f00000000, 0x841c6ab400000000, 0x2a6efe3200000000, + 0x8fbda2f900000000, 0xc10d220b00000000, 0x64de7ec000000000, + 0xcaacea4600000000, 0x6f7fb68d00000000, 0xd74fb39000000000, + 0x729cef5b00000000, 0xdcee7bdd00000000, 0x793d271600000000, + 0xac8f71e700000000, 0x095c2d2c00000000, 0xa72eb9aa00000000, + 0x02fde56100000000, 0xbacde07c00000000, 0x1f1ebcb700000000, + 0xb16c283100000000, 0x14bf74fa00000000, 0xd814b01e00000000, + 0x7dc7ecd500000000, 0xd3b5785300000000, 0x7666249800000000, + 0xce56218500000000, 0x6b857d4e00000000, 0xc5f7e9c800000000, + 0x6024b50300000000, 0xb596e3f200000000, 0x1045bf3900000000, + 0xbe372bbf00000000, 0x1be4777400000000, 0xa3d4726900000000, + 0x06072ea200000000, 0xa875ba2400000000, 0x0da6e6ef00000000, + 0x4316661d00000000, 0xe6c53ad600000000, 0x48b7ae5000000000, + 0xed64f29b00000000, 0x5554f78600000000, 0xf087ab4d00000000, + 0x5ef53fcb00000000, 0xfb26630000000000, 0x2e9435f100000000, + 0x8b47693a00000000, 0x2535fdbc00000000, 0x80e6a17700000000, + 0x38d6a46a00000000, 0x9d05f8a100000000, 0x33776c2700000000, + 0x96a430ec00000000, 0xee111c1900000000, 0x4bc240d200000000, + 0xe5b0d45400000000, 0x4063889f00000000, 0xf8538d8200000000, + 0x5d80d14900000000, 0xf3f245cf00000000, 0x5621190400000000, + 0x83934ff500000000, 0x2640133e00000000, 0x883287b800000000, + 0x2de1db7300000000, 0x95d1de6e00000000, 0x300282a500000000, + 0x9e70162300000000, 0x3ba34ae800000000, 0x7513ca1a00000000, + 0xd0c096d100000000, 0x7eb2025700000000, 0xdb615e9c00000000, + 0x63515b8100000000, 0xc682074a00000000, 0x68f093cc00000000, + 0xcd23cf0700000000, 0x189199f600000000, 0xbd42c53d00000000, + 0x133051bb00000000, 0xb6e30d7000000000, 0x0ed3086d00000000, + 0xab0054a600000000, 0x0572c02000000000, 0xa0a19ceb00000000, + 0xb41ee81100000000, 0x11cdb4da00000000, 0xbfbf205c00000000, + 0x1a6c7c9700000000, 0xa25c798a00000000, 0x078f254100000000, + 0xa9fdb1c700000000, 0x0c2eed0c00000000, 0xd99cbbfd00000000, + 0x7c4fe73600000000, 0xd23d73b000000000, 0x77ee2f7b00000000, + 0xcfde2a6600000000, 0x6a0d76ad00000000, 0xc47fe22b00000000, + 0x61acbee000000000, 0x2f1c3e1200000000, 0x8acf62d900000000, + 0x24bdf65f00000000, 0x816eaa9400000000, 0x395eaf8900000000, + 0x9c8df34200000000, 0x32ff67c400000000, 0x972c3b0f00000000, + 0x429e6dfe00000000, 0xe74d313500000000, 0x493fa5b300000000, + 0xececf97800000000, 0x54dcfc6500000000, 0xf10fa0ae00000000, + 0x5f7d342800000000, 0xfaae68e300000000, 0x821b441600000000, + 0x27c818dd00000000, 0x89ba8c5b00000000, 0x2c69d09000000000, + 0x9459d58d00000000, 0x318a894600000000, 0x9ff81dc000000000, + 0x3a2b410b00000000, 0xef9917fa00000000, 0x4a4a4b3100000000, + 0xe438dfb700000000, 0x41eb837c00000000, 0xf9db866100000000, + 0x5c08daaa00000000, 0xf27a4e2c00000000, 0x57a912e700000000, + 0x1919921500000000, 0xbccacede00000000, 0x12b85a5800000000, + 0xb76b069300000000, 0x0f5b038e00000000, 0xaa885f4500000000, + 0x04facbc300000000, 0xa129970800000000, 0x749bc1f900000000, + 0xd1489d3200000000, 0x7f3a09b400000000, 0xdae9557f00000000, + 0x62d9506200000000, 0xc70a0ca900000000, 0x6978982f00000000, + 0xccabc4e400000000}, + {0x0000000000000000, 0xb40b77a600000000, 0x29119f9700000000, + 0x9d1ae83100000000, 0x13244ff400000000, 0xa72f385200000000, + 0x3a35d06300000000, 0x8e3ea7c500000000, 0x674eef3300000000, + 0xd345989500000000, 0x4e5f70a400000000, 0xfa54070200000000, + 0x746aa0c700000000, 0xc061d76100000000, 0x5d7b3f5000000000, + 0xe97048f600000000, 0xce9cde6700000000, 0x7a97a9c100000000, + 0xe78d41f000000000, 0x5386365600000000, 0xddb8919300000000, + 0x69b3e63500000000, 0xf4a90e0400000000, 0x40a279a200000000, + 0xa9d2315400000000, 0x1dd946f200000000, 0x80c3aec300000000, + 0x34c8d96500000000, 0xbaf67ea000000000, 0x0efd090600000000, + 0x93e7e13700000000, 0x27ec969100000000, 0x9c39bdcf00000000, + 0x2832ca6900000000, 0xb528225800000000, 0x012355fe00000000, + 0x8f1df23b00000000, 0x3b16859d00000000, 0xa60c6dac00000000, + 0x12071a0a00000000, 0xfb7752fc00000000, 0x4f7c255a00000000, + 0xd266cd6b00000000, 0x666dbacd00000000, 0xe8531d0800000000, + 0x5c586aae00000000, 0xc142829f00000000, 0x7549f53900000000, + 0x52a563a800000000, 0xe6ae140e00000000, 0x7bb4fc3f00000000, + 0xcfbf8b9900000000, 0x41812c5c00000000, 0xf58a5bfa00000000, + 0x6890b3cb00000000, 0xdc9bc46d00000000, 0x35eb8c9b00000000, + 0x81e0fb3d00000000, 0x1cfa130c00000000, 0xa8f164aa00000000, + 0x26cfc36f00000000, 0x92c4b4c900000000, 0x0fde5cf800000000, + 0xbbd52b5e00000000, 0x79750b4400000000, 0xcd7e7ce200000000, + 0x506494d300000000, 0xe46fe37500000000, 0x6a5144b000000000, + 0xde5a331600000000, 0x4340db2700000000, 0xf74bac8100000000, + 0x1e3be47700000000, 0xaa3093d100000000, 0x372a7be000000000, + 0x83210c4600000000, 0x0d1fab8300000000, 0xb914dc2500000000, + 0x240e341400000000, 0x900543b200000000, 0xb7e9d52300000000, + 0x03e2a28500000000, 0x9ef84ab400000000, 0x2af33d1200000000, + 0xa4cd9ad700000000, 0x10c6ed7100000000, 0x8ddc054000000000, + 0x39d772e600000000, 0xd0a73a1000000000, 0x64ac4db600000000, + 0xf9b6a58700000000, 0x4dbdd22100000000, 0xc38375e400000000, + 0x7788024200000000, 0xea92ea7300000000, 0x5e999dd500000000, + 0xe54cb68b00000000, 0x5147c12d00000000, 0xcc5d291c00000000, + 0x78565eba00000000, 0xf668f97f00000000, 0x42638ed900000000, + 0xdf7966e800000000, 0x6b72114e00000000, 0x820259b800000000, + 0x36092e1e00000000, 0xab13c62f00000000, 0x1f18b18900000000, + 0x9126164c00000000, 0x252d61ea00000000, 0xb83789db00000000, + 0x0c3cfe7d00000000, 0x2bd068ec00000000, 0x9fdb1f4a00000000, + 0x02c1f77b00000000, 0xb6ca80dd00000000, 0x38f4271800000000, + 0x8cff50be00000000, 0x11e5b88f00000000, 0xa5eecf2900000000, + 0x4c9e87df00000000, 0xf895f07900000000, 0x658f184800000000, + 0xd1846fee00000000, 0x5fbac82b00000000, 0xebb1bf8d00000000, + 0x76ab57bc00000000, 0xc2a0201a00000000, 0xf2ea168800000000, + 0x46e1612e00000000, 0xdbfb891f00000000, 0x6ff0feb900000000, + 0xe1ce597c00000000, 0x55c52eda00000000, 0xc8dfc6eb00000000, + 0x7cd4b14d00000000, 0x95a4f9bb00000000, 0x21af8e1d00000000, + 0xbcb5662c00000000, 0x08be118a00000000, 0x8680b64f00000000, + 0x328bc1e900000000, 0xaf9129d800000000, 0x1b9a5e7e00000000, + 0x3c76c8ef00000000, 0x887dbf4900000000, 0x1567577800000000, + 0xa16c20de00000000, 0x2f52871b00000000, 0x9b59f0bd00000000, + 0x0643188c00000000, 0xb2486f2a00000000, 0x5b3827dc00000000, + 0xef33507a00000000, 0x7229b84b00000000, 0xc622cfed00000000, + 0x481c682800000000, 0xfc171f8e00000000, 0x610df7bf00000000, + 0xd506801900000000, 0x6ed3ab4700000000, 0xdad8dce100000000, + 0x47c234d000000000, 0xf3c9437600000000, 0x7df7e4b300000000, + 0xc9fc931500000000, 0x54e67b2400000000, 0xe0ed0c8200000000, + 0x099d447400000000, 0xbd9633d200000000, 0x208cdbe300000000, + 0x9487ac4500000000, 0x1ab90b8000000000, 0xaeb27c2600000000, + 0x33a8941700000000, 0x87a3e3b100000000, 0xa04f752000000000, + 0x1444028600000000, 0x895eeab700000000, 0x3d559d1100000000, + 0xb36b3ad400000000, 0x07604d7200000000, 0x9a7aa54300000000, + 0x2e71d2e500000000, 0xc7019a1300000000, 0x730aedb500000000, + 0xee10058400000000, 0x5a1b722200000000, 0xd425d5e700000000, + 0x602ea24100000000, 0xfd344a7000000000, 0x493f3dd600000000, + 0x8b9f1dcc00000000, 0x3f946a6a00000000, 0xa28e825b00000000, + 0x1685f5fd00000000, 0x98bb523800000000, 0x2cb0259e00000000, + 0xb1aacdaf00000000, 0x05a1ba0900000000, 0xecd1f2ff00000000, + 0x58da855900000000, 0xc5c06d6800000000, 0x71cb1ace00000000, + 0xfff5bd0b00000000, 0x4bfecaad00000000, 0xd6e4229c00000000, + 0x62ef553a00000000, 0x4503c3ab00000000, 0xf108b40d00000000, + 0x6c125c3c00000000, 0xd8192b9a00000000, 0x56278c5f00000000, + 0xe22cfbf900000000, 0x7f3613c800000000, 0xcb3d646e00000000, + 0x224d2c9800000000, 0x96465b3e00000000, 0x0b5cb30f00000000, + 0xbf57c4a900000000, 0x3169636c00000000, 0x856214ca00000000, + 0x1878fcfb00000000, 0xac738b5d00000000, 0x17a6a00300000000, + 0xa3add7a500000000, 0x3eb73f9400000000, 0x8abc483200000000, + 0x0482eff700000000, 0xb089985100000000, 0x2d93706000000000, + 0x999807c600000000, 0x70e84f3000000000, 0xc4e3389600000000, + 0x59f9d0a700000000, 0xedf2a70100000000, 0x63cc00c400000000, + 0xd7c7776200000000, 0x4add9f5300000000, 0xfed6e8f500000000, + 0xd93a7e6400000000, 0x6d3109c200000000, 0xf02be1f300000000, + 0x4420965500000000, 0xca1e319000000000, 0x7e15463600000000, + 0xe30fae0700000000, 0x5704d9a100000000, 0xbe74915700000000, + 0x0a7fe6f100000000, 0x97650ec000000000, 0x236e796600000000, + 0xad50dea300000000, 0x195ba90500000000, 0x8441413400000000, + 0x304a369200000000}, + {0x0000000000000000, 0x9e00aacc00000000, 0x7d07254200000000, + 0xe3078f8e00000000, 0xfa0e4a8400000000, 0x640ee04800000000, + 0x87096fc600000000, 0x1909c50a00000000, 0xb51be5d300000000, + 0x2b1b4f1f00000000, 0xc81cc09100000000, 0x561c6a5d00000000, + 0x4f15af5700000000, 0xd115059b00000000, 0x32128a1500000000, + 0xac1220d900000000, 0x2b31bb7c00000000, 0xb53111b000000000, + 0x56369e3e00000000, 0xc83634f200000000, 0xd13ff1f800000000, + 0x4f3f5b3400000000, 0xac38d4ba00000000, 0x32387e7600000000, + 0x9e2a5eaf00000000, 0x002af46300000000, 0xe32d7bed00000000, + 0x7d2dd12100000000, 0x6424142b00000000, 0xfa24bee700000000, + 0x1923316900000000, 0x87239ba500000000, 0x566276f900000000, + 0xc862dc3500000000, 0x2b6553bb00000000, 0xb565f97700000000, + 0xac6c3c7d00000000, 0x326c96b100000000, 0xd16b193f00000000, + 0x4f6bb3f300000000, 0xe379932a00000000, 0x7d7939e600000000, + 0x9e7eb66800000000, 0x007e1ca400000000, 0x1977d9ae00000000, + 0x8777736200000000, 0x6470fcec00000000, 0xfa70562000000000, + 0x7d53cd8500000000, 0xe353674900000000, 0x0054e8c700000000, + 0x9e54420b00000000, 0x875d870100000000, 0x195d2dcd00000000, + 0xfa5aa24300000000, 0x645a088f00000000, 0xc848285600000000, + 0x5648829a00000000, 0xb54f0d1400000000, 0x2b4fa7d800000000, + 0x324662d200000000, 0xac46c81e00000000, 0x4f41479000000000, + 0xd141ed5c00000000, 0xedc29d2900000000, 0x73c237e500000000, + 0x90c5b86b00000000, 0x0ec512a700000000, 0x17ccd7ad00000000, + 0x89cc7d6100000000, 0x6acbf2ef00000000, 0xf4cb582300000000, + 0x58d978fa00000000, 0xc6d9d23600000000, 0x25de5db800000000, + 0xbbdef77400000000, 0xa2d7327e00000000, 0x3cd798b200000000, + 0xdfd0173c00000000, 0x41d0bdf000000000, 0xc6f3265500000000, + 0x58f38c9900000000, 0xbbf4031700000000, 0x25f4a9db00000000, + 0x3cfd6cd100000000, 0xa2fdc61d00000000, 0x41fa499300000000, + 0xdffae35f00000000, 0x73e8c38600000000, 0xede8694a00000000, + 0x0eefe6c400000000, 0x90ef4c0800000000, 0x89e6890200000000, + 0x17e623ce00000000, 0xf4e1ac4000000000, 0x6ae1068c00000000, + 0xbba0ebd000000000, 0x25a0411c00000000, 0xc6a7ce9200000000, + 0x58a7645e00000000, 0x41aea15400000000, 0xdfae0b9800000000, + 0x3ca9841600000000, 0xa2a92eda00000000, 0x0ebb0e0300000000, + 0x90bba4cf00000000, 0x73bc2b4100000000, 0xedbc818d00000000, + 0xf4b5448700000000, 0x6ab5ee4b00000000, 0x89b261c500000000, + 0x17b2cb0900000000, 0x909150ac00000000, 0x0e91fa6000000000, + 0xed9675ee00000000, 0x7396df2200000000, 0x6a9f1a2800000000, + 0xf49fb0e400000000, 0x17983f6a00000000, 0x899895a600000000, + 0x258ab57f00000000, 0xbb8a1fb300000000, 0x588d903d00000000, + 0xc68d3af100000000, 0xdf84fffb00000000, 0x4184553700000000, + 0xa283dab900000000, 0x3c83707500000000, 0xda853b5300000000, + 0x4485919f00000000, 0xa7821e1100000000, 0x3982b4dd00000000, + 0x208b71d700000000, 0xbe8bdb1b00000000, 0x5d8c549500000000, + 0xc38cfe5900000000, 0x6f9ede8000000000, 0xf19e744c00000000, + 0x1299fbc200000000, 0x8c99510e00000000, 0x9590940400000000, + 0x0b903ec800000000, 0xe897b14600000000, 0x76971b8a00000000, + 0xf1b4802f00000000, 0x6fb42ae300000000, 0x8cb3a56d00000000, + 0x12b30fa100000000, 0x0bbacaab00000000, 0x95ba606700000000, + 0x76bdefe900000000, 0xe8bd452500000000, 0x44af65fc00000000, + 0xdaafcf3000000000, 0x39a840be00000000, 0xa7a8ea7200000000, + 0xbea12f7800000000, 0x20a185b400000000, 0xc3a60a3a00000000, + 0x5da6a0f600000000, 0x8ce74daa00000000, 0x12e7e76600000000, + 0xf1e068e800000000, 0x6fe0c22400000000, 0x76e9072e00000000, + 0xe8e9ade200000000, 0x0bee226c00000000, 0x95ee88a000000000, + 0x39fca87900000000, 0xa7fc02b500000000, 0x44fb8d3b00000000, + 0xdafb27f700000000, 0xc3f2e2fd00000000, 0x5df2483100000000, + 0xbef5c7bf00000000, 0x20f56d7300000000, 0xa7d6f6d600000000, + 0x39d65c1a00000000, 0xdad1d39400000000, 0x44d1795800000000, + 0x5dd8bc5200000000, 0xc3d8169e00000000, 0x20df991000000000, + 0xbedf33dc00000000, 0x12cd130500000000, 0x8ccdb9c900000000, + 0x6fca364700000000, 0xf1ca9c8b00000000, 0xe8c3598100000000, + 0x76c3f34d00000000, 0x95c47cc300000000, 0x0bc4d60f00000000, + 0x3747a67a00000000, 0xa9470cb600000000, 0x4a40833800000000, + 0xd44029f400000000, 0xcd49ecfe00000000, 0x5349463200000000, + 0xb04ec9bc00000000, 0x2e4e637000000000, 0x825c43a900000000, + 0x1c5ce96500000000, 0xff5b66eb00000000, 0x615bcc2700000000, + 0x7852092d00000000, 0xe652a3e100000000, 0x05552c6f00000000, + 0x9b5586a300000000, 0x1c761d0600000000, 0x8276b7ca00000000, + 0x6171384400000000, 0xff71928800000000, 0xe678578200000000, + 0x7878fd4e00000000, 0x9b7f72c000000000, 0x057fd80c00000000, + 0xa96df8d500000000, 0x376d521900000000, 0xd46add9700000000, + 0x4a6a775b00000000, 0x5363b25100000000, 0xcd63189d00000000, + 0x2e64971300000000, 0xb0643ddf00000000, 0x6125d08300000000, + 0xff257a4f00000000, 0x1c22f5c100000000, 0x82225f0d00000000, + 0x9b2b9a0700000000, 0x052b30cb00000000, 0xe62cbf4500000000, + 0x782c158900000000, 0xd43e355000000000, 0x4a3e9f9c00000000, + 0xa939101200000000, 0x3739bade00000000, 0x2e307fd400000000, + 0xb030d51800000000, 0x53375a9600000000, 0xcd37f05a00000000, + 0x4a146bff00000000, 0xd414c13300000000, 0x37134ebd00000000, + 0xa913e47100000000, 0xb01a217b00000000, 0x2e1a8bb700000000, + 0xcd1d043900000000, 0x531daef500000000, 0xff0f8e2c00000000, + 0x610f24e000000000, 0x8208ab6e00000000, 0x1c0801a200000000, + 0x0501c4a800000000, 0x9b016e6400000000, 0x7806e1ea00000000, + 0xe6064b2600000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, + 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, + 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, + 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, + 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, + 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, + 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, + 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, + 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, + 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, + 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, + 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, + 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, + 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, + 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, + 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, + 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, + 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, + 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, + 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, + 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, + 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, + 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, + 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, + 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, + 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, + 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, + 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, + 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, + 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, + 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, + 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, + 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, + 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, + 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, + 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, + 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, + 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, + 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, + 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, + 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, + 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, + 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, + 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, + 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, + 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, + 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, + 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, + 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, + 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, + 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, + 0xde0506f1}, + {0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, + 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, + 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, + 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, + 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, + 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, + 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, + 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, + 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, + 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, + 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, + 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, + 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, + 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, + 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, + 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, + 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, + 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, + 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, + 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, + 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, + 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, + 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, + 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, + 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, + 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, + 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, + 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, + 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, + 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, + 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, + 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, + 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, + 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, + 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, + 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, + 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, + 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, + 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, + 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, + 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, + 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, + 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, + 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, + 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, + 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, + 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, + 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, + 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, + 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, + 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, + 0xbe9834ed}, + {0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, + 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, + 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, + 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, + 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, + 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, + 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, + 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, + 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, + 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, + 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, + 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, + 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, + 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, + 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, + 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, + 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, + 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, + 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, + 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, + 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, + 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, + 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, + 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, + 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, + 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, + 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, + 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, + 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, + 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, + 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, + 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, + 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, + 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, + 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, + 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, + 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, + 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, + 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, + 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, + 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, + 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, + 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, + 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, + 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, + 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, + 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, + 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, + 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, + 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, + 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, + 0x9324fd72}, + {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, + 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, + 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, + 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, + 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, + 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, + 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, + 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, + 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, + 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, + 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, + 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, + 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, + 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, + 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, + 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, + 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, + 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, + 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, + 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, + 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, + 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, + 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, + 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, + 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, + 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, + 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, + 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, + 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, + 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, + 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, + 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, + 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, + 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, + 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, + 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, + 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, + 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, + 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, + 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, + 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, + 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, + 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, + 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, + 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, + 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, + 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, + 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, + 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, + 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, + 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, + 0x8def022d}, + {0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64, + 0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1, + 0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e, + 0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61, + 0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82, + 0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff, + 0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7, + 0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da, + 0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139, + 0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6, + 0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89, + 0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c, + 0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0, + 0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d, + 0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a, + 0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177, + 0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de, + 0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b, + 0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824, + 0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e, + 0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad, + 0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0, + 0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d, + 0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60, + 0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83, + 0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822, + 0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d, + 0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8, + 0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171, + 0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c, + 0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b, + 0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6, + 0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca, + 0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f, + 0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430, + 0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf, + 0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c, + 0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51, + 0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9, + 0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84, + 0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67, + 0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398, + 0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7, + 0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62, + 0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e, + 0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923, + 0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4, + 0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9, + 0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070, + 0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5, + 0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a, + 0x72fd2493}, + {0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907, + 0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f, + 0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a, + 0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e, + 0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512, + 0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14, + 0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b, + 0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d, + 0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731, + 0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925, + 0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620, + 0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28, + 0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70, + 0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176, + 0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d, + 0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b, + 0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b, + 0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63, + 0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266, + 0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a, + 0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446, + 0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40, + 0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557, + 0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51, + 0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d, + 0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0, + 0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5, + 0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed, + 0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd, + 0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb, + 0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0, + 0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6, + 0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de, + 0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6, + 0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3, + 0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7, + 0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb, + 0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd, + 0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92, + 0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094, + 0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598, + 0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c, + 0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489, + 0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81, + 0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9, + 0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af, + 0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4, + 0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2, + 0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2, + 0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba, + 0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf, + 0xed3498be}, + {0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f, + 0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d, + 0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0, + 0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42, + 0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95, + 0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2, + 0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a, + 0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d, + 0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea, + 0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748, + 0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5, + 0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27, + 0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b, + 0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac, + 0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4, + 0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3, + 0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44, + 0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6, + 0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b, + 0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329, + 0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe, + 0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9, + 0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1, + 0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6, + 0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921, + 0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555, + 0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8, + 0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a, + 0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd, + 0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a, + 0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2, + 0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5, + 0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2, + 0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330, + 0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad, + 0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f, + 0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8, + 0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef, + 0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc, + 0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb, + 0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c, + 0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e, + 0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03, + 0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1, + 0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6, + 0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1, + 0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9, + 0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e, + 0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409, + 0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb, + 0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966, + 0xf10605de}}; + +#endif + +#endif + +#if N == 2 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87, + 0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede, + 0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab, + 0x8eea673a, 0xe6273e9e, 0x484faf0f, 0x61871bfd, 0xcfef8a6c, + 0x32167219, 0x9c7ee388, 0xb5b6577a, 0x1bdec6eb, 0x9534a1d1, + 0x3b5c3040, 0x129484b2, 0xbcfc1523, 0x4105ed56, 0xef6d7cc7, + 0xc6a5c835, 0x68cd59a4, 0x173f7b7d, 0xb957eaec, 0x909f5e1e, + 0x3ef7cf8f, 0xc30e37fa, 0x6d66a66b, 0x44ae1299, 0xeac68308, + 0x642ce432, 0xca4475a3, 0xe38cc151, 0x4de450c0, 0xb01da8b5, + 0x1e753924, 0x37bd8dd6, 0x99d51c47, 0xf11845e3, 0x5f70d472, + 0x76b86080, 0xd8d0f111, 0x25290964, 0x8b4198f5, 0xa2892c07, + 0x0ce1bd96, 0x820bdaac, 0x2c634b3d, 0x05abffcf, 0xabc36e5e, + 0x563a962b, 0xf85207ba, 0xd19ab348, 0x7ff222d9, 0x2e7ef6fa, + 0x8016676b, 0xa9ded399, 0x07b64208, 0xfa4fba7d, 0x54272bec, + 0x7def9f1e, 0xd3870e8f, 0x5d6d69b5, 0xf305f824, 0xdacd4cd6, + 0x74a5dd47, 0x895c2532, 0x2734b4a3, 0x0efc0051, 0xa09491c0, + 0xc859c864, 0x663159f5, 0x4ff9ed07, 0xe1917c96, 0x1c6884e3, + 0xb2001572, 0x9bc8a180, 0x35a03011, 0xbb4a572b, 0x1522c6ba, + 0x3cea7248, 0x9282e3d9, 0x6f7b1bac, 0xc1138a3d, 0xe8db3ecf, + 0x46b3af5e, 0x39418d87, 0x97291c16, 0xbee1a8e4, 0x10893975, + 0xed70c100, 0x43185091, 0x6ad0e463, 0xc4b875f2, 0x4a5212c8, + 0xe43a8359, 0xcdf237ab, 0x639aa63a, 0x9e635e4f, 0x300bcfde, + 0x19c37b2c, 0xb7abeabd, 0xdf66b319, 0x710e2288, 0x58c6967a, + 0xf6ae07eb, 0x0b57ff9e, 0xa53f6e0f, 0x8cf7dafd, 0x229f4b6c, + 0xac752c56, 0x021dbdc7, 0x2bd50935, 0x85bd98a4, 0x784460d1, + 0xd62cf140, 0xffe445b2, 0x518cd423, 0x5cfdedf4, 0xf2957c65, + 0xdb5dc897, 0x75355906, 0x88cca173, 0x26a430e2, 0x0f6c8410, + 0xa1041581, 0x2fee72bb, 0x8186e32a, 0xa84e57d8, 0x0626c649, + 0xfbdf3e3c, 0x55b7afad, 0x7c7f1b5f, 0xd2178ace, 0xbadad36a, + 0x14b242fb, 0x3d7af609, 0x93126798, 0x6eeb9fed, 0xc0830e7c, + 0xe94bba8e, 0x47232b1f, 0xc9c94c25, 0x67a1ddb4, 0x4e696946, + 0xe001f8d7, 0x1df800a2, 0xb3909133, 0x9a5825c1, 0x3430b450, + 0x4bc29689, 0xe5aa0718, 0xcc62b3ea, 0x620a227b, 0x9ff3da0e, + 0x319b4b9f, 0x1853ff6d, 0xb63b6efc, 0x38d109c6, 0x96b99857, + 0xbf712ca5, 0x1119bd34, 0xece04541, 0x4288d4d0, 0x6b406022, + 0xc528f1b3, 0xade5a817, 0x038d3986, 0x2a458d74, 0x842d1ce5, + 0x79d4e490, 0xd7bc7501, 0xfe74c1f3, 0x501c5062, 0xdef63758, + 0x709ea6c9, 0x5956123b, 0xf73e83aa, 0x0ac77bdf, 0xa4afea4e, + 0x8d675ebc, 0x230fcf2d, 0x72831b0e, 0xdceb8a9f, 0xf5233e6d, + 0x5b4baffc, 0xa6b25789, 0x08dac618, 0x211272ea, 0x8f7ae37b, + 0x01908441, 0xaff815d0, 0x8630a122, 0x285830b3, 0xd5a1c8c6, + 0x7bc95957, 0x5201eda5, 0xfc697c34, 0x94a42590, 0x3accb401, + 0x130400f3, 0xbd6c9162, 0x40956917, 0xeefdf886, 0xc7354c74, + 0x695ddde5, 0xe7b7badf, 0x49df2b4e, 0x60179fbc, 0xce7f0e2d, + 0x3386f658, 0x9dee67c9, 0xb426d33b, 0x1a4e42aa, 0x65bc6073, + 0xcbd4f1e2, 0xe21c4510, 0x4c74d481, 0xb18d2cf4, 0x1fe5bd65, + 0x362d0997, 0x98459806, 0x16afff3c, 0xb8c76ead, 0x910fda5f, + 0x3f674bce, 0xc29eb3bb, 0x6cf6222a, 0x453e96d8, 0xeb560749, + 0x839b5eed, 0x2df3cf7c, 0x043b7b8e, 0xaa53ea1f, 0x57aa126a, + 0xf9c283fb, 0xd00a3709, 0x7e62a698, 0xf088c1a2, 0x5ee05033, + 0x7728e4c1, 0xd9407550, 0x24b98d25, 0x8ad11cb4, 0xa319a846, + 0x0d7139d7}, + {0x00000000, 0xb9fbdbe8, 0xa886b191, 0x117d6a79, 0x8a7c6563, + 0x3387be8b, 0x22fad4f2, 0x9b010f1a, 0xcf89cc87, 0x7672176f, + 0x670f7d16, 0xdef4a6fe, 0x45f5a9e4, 0xfc0e720c, 0xed731875, + 0x5488c39d, 0x44629f4f, 0xfd9944a7, 0xece42ede, 0x551ff536, + 0xce1efa2c, 0x77e521c4, 0x66984bbd, 0xdf639055, 0x8beb53c8, + 0x32108820, 0x236de259, 0x9a9639b1, 0x019736ab, 0xb86ced43, + 0xa911873a, 0x10ea5cd2, 0x88c53e9e, 0x313ee576, 0x20438f0f, + 0x99b854e7, 0x02b95bfd, 0xbb428015, 0xaa3fea6c, 0x13c43184, + 0x474cf219, 0xfeb729f1, 0xefca4388, 0x56319860, 0xcd30977a, + 0x74cb4c92, 0x65b626eb, 0xdc4dfd03, 0xcca7a1d1, 0x755c7a39, + 0x64211040, 0xdddacba8, 0x46dbc4b2, 0xff201f5a, 0xee5d7523, + 0x57a6aecb, 0x032e6d56, 0xbad5b6be, 0xaba8dcc7, 0x1253072f, + 0x89520835, 0x30a9d3dd, 0x21d4b9a4, 0x982f624c, 0xcafb7b7d, + 0x7300a095, 0x627dcaec, 0xdb861104, 0x40871e1e, 0xf97cc5f6, + 0xe801af8f, 0x51fa7467, 0x0572b7fa, 0xbc896c12, 0xadf4066b, + 0x140fdd83, 0x8f0ed299, 0x36f50971, 0x27886308, 0x9e73b8e0, + 0x8e99e432, 0x37623fda, 0x261f55a3, 0x9fe48e4b, 0x04e58151, + 0xbd1e5ab9, 0xac6330c0, 0x1598eb28, 0x411028b5, 0xf8ebf35d, + 0xe9969924, 0x506d42cc, 0xcb6c4dd6, 0x7297963e, 0x63eafc47, + 0xda1127af, 0x423e45e3, 0xfbc59e0b, 0xeab8f472, 0x53432f9a, + 0xc8422080, 0x71b9fb68, 0x60c49111, 0xd93f4af9, 0x8db78964, + 0x344c528c, 0x253138f5, 0x9ccae31d, 0x07cbec07, 0xbe3037ef, + 0xaf4d5d96, 0x16b6867e, 0x065cdaac, 0xbfa70144, 0xaeda6b3d, + 0x1721b0d5, 0x8c20bfcf, 0x35db6427, 0x24a60e5e, 0x9d5dd5b6, + 0xc9d5162b, 0x702ecdc3, 0x6153a7ba, 0xd8a87c52, 0x43a97348, + 0xfa52a8a0, 0xeb2fc2d9, 0x52d41931, 0x4e87f0bb, 0xf77c2b53, + 0xe601412a, 0x5ffa9ac2, 0xc4fb95d8, 0x7d004e30, 0x6c7d2449, + 0xd586ffa1, 0x810e3c3c, 0x38f5e7d4, 0x29888dad, 0x90735645, + 0x0b72595f, 0xb28982b7, 0xa3f4e8ce, 0x1a0f3326, 0x0ae56ff4, + 0xb31eb41c, 0xa263de65, 0x1b98058d, 0x80990a97, 0x3962d17f, + 0x281fbb06, 0x91e460ee, 0xc56ca373, 0x7c97789b, 0x6dea12e2, + 0xd411c90a, 0x4f10c610, 0xf6eb1df8, 0xe7967781, 0x5e6dac69, + 0xc642ce25, 0x7fb915cd, 0x6ec47fb4, 0xd73fa45c, 0x4c3eab46, + 0xf5c570ae, 0xe4b81ad7, 0x5d43c13f, 0x09cb02a2, 0xb030d94a, + 0xa14db333, 0x18b668db, 0x83b767c1, 0x3a4cbc29, 0x2b31d650, + 0x92ca0db8, 0x8220516a, 0x3bdb8a82, 0x2aa6e0fb, 0x935d3b13, + 0x085c3409, 0xb1a7efe1, 0xa0da8598, 0x19215e70, 0x4da99ded, + 0xf4524605, 0xe52f2c7c, 0x5cd4f794, 0xc7d5f88e, 0x7e2e2366, + 0x6f53491f, 0xd6a892f7, 0x847c8bc6, 0x3d87502e, 0x2cfa3a57, + 0x9501e1bf, 0x0e00eea5, 0xb7fb354d, 0xa6865f34, 0x1f7d84dc, + 0x4bf54741, 0xf20e9ca9, 0xe373f6d0, 0x5a882d38, 0xc1892222, + 0x7872f9ca, 0x690f93b3, 0xd0f4485b, 0xc01e1489, 0x79e5cf61, + 0x6898a518, 0xd1637ef0, 0x4a6271ea, 0xf399aa02, 0xe2e4c07b, + 0x5b1f1b93, 0x0f97d80e, 0xb66c03e6, 0xa711699f, 0x1eeab277, + 0x85ebbd6d, 0x3c106685, 0x2d6d0cfc, 0x9496d714, 0x0cb9b558, + 0xb5426eb0, 0xa43f04c9, 0x1dc4df21, 0x86c5d03b, 0x3f3e0bd3, + 0x2e4361aa, 0x97b8ba42, 0xc33079df, 0x7acba237, 0x6bb6c84e, + 0xd24d13a6, 0x494c1cbc, 0xf0b7c754, 0xe1caad2d, 0x583176c5, + 0x48db2a17, 0xf120f1ff, 0xe05d9b86, 0x59a6406e, 0xc2a74f74, + 0x7b5c949c, 0x6a21fee5, 0xd3da250d, 0x8752e690, 0x3ea93d78, + 0x2fd45701, 0x962f8ce9, 0x0d2e83f3, 0xb4d5581b, 0xa5a83262, + 0x1c53e98a}, + {0x00000000, 0x9d0fe176, 0xe16ec4ad, 0x7c6125db, 0x19ac8f1b, + 0x84a36e6d, 0xf8c24bb6, 0x65cdaac0, 0x33591e36, 0xae56ff40, + 0xd237da9b, 0x4f383bed, 0x2af5912d, 0xb7fa705b, 0xcb9b5580, + 0x5694b4f6, 0x66b23c6c, 0xfbbddd1a, 0x87dcf8c1, 0x1ad319b7, + 0x7f1eb377, 0xe2115201, 0x9e7077da, 0x037f96ac, 0x55eb225a, + 0xc8e4c32c, 0xb485e6f7, 0x298a0781, 0x4c47ad41, 0xd1484c37, + 0xad2969ec, 0x3026889a, 0xcd6478d8, 0x506b99ae, 0x2c0abc75, + 0xb1055d03, 0xd4c8f7c3, 0x49c716b5, 0x35a6336e, 0xa8a9d218, + 0xfe3d66ee, 0x63328798, 0x1f53a243, 0x825c4335, 0xe791e9f5, + 0x7a9e0883, 0x06ff2d58, 0x9bf0cc2e, 0xabd644b4, 0x36d9a5c2, + 0x4ab88019, 0xd7b7616f, 0xb27acbaf, 0x2f752ad9, 0x53140f02, + 0xce1bee74, 0x988f5a82, 0x0580bbf4, 0x79e19e2f, 0xe4ee7f59, + 0x8123d599, 0x1c2c34ef, 0x604d1134, 0xfd42f042, 0x41b9f7f1, + 0xdcb61687, 0xa0d7335c, 0x3dd8d22a, 0x581578ea, 0xc51a999c, + 0xb97bbc47, 0x24745d31, 0x72e0e9c7, 0xefef08b1, 0x938e2d6a, + 0x0e81cc1c, 0x6b4c66dc, 0xf64387aa, 0x8a22a271, 0x172d4307, + 0x270bcb9d, 0xba042aeb, 0xc6650f30, 0x5b6aee46, 0x3ea74486, + 0xa3a8a5f0, 0xdfc9802b, 0x42c6615d, 0x1452d5ab, 0x895d34dd, + 0xf53c1106, 0x6833f070, 0x0dfe5ab0, 0x90f1bbc6, 0xec909e1d, + 0x719f7f6b, 0x8cdd8f29, 0x11d26e5f, 0x6db34b84, 0xf0bcaaf2, + 0x95710032, 0x087ee144, 0x741fc49f, 0xe91025e9, 0xbf84911f, + 0x228b7069, 0x5eea55b2, 0xc3e5b4c4, 0xa6281e04, 0x3b27ff72, + 0x4746daa9, 0xda493bdf, 0xea6fb345, 0x77605233, 0x0b0177e8, + 0x960e969e, 0xf3c33c5e, 0x6eccdd28, 0x12adf8f3, 0x8fa21985, + 0xd936ad73, 0x44394c05, 0x385869de, 0xa55788a8, 0xc09a2268, + 0x5d95c31e, 0x21f4e6c5, 0xbcfb07b3, 0x8373efe2, 0x1e7c0e94, + 0x621d2b4f, 0xff12ca39, 0x9adf60f9, 0x07d0818f, 0x7bb1a454, + 0xe6be4522, 0xb02af1d4, 0x2d2510a2, 0x51443579, 0xcc4bd40f, + 0xa9867ecf, 0x34899fb9, 0x48e8ba62, 0xd5e75b14, 0xe5c1d38e, + 0x78ce32f8, 0x04af1723, 0x99a0f655, 0xfc6d5c95, 0x6162bde3, + 0x1d039838, 0x800c794e, 0xd698cdb8, 0x4b972cce, 0x37f60915, + 0xaaf9e863, 0xcf3442a3, 0x523ba3d5, 0x2e5a860e, 0xb3556778, + 0x4e17973a, 0xd318764c, 0xaf795397, 0x3276b2e1, 0x57bb1821, + 0xcab4f957, 0xb6d5dc8c, 0x2bda3dfa, 0x7d4e890c, 0xe041687a, + 0x9c204da1, 0x012facd7, 0x64e20617, 0xf9ede761, 0x858cc2ba, + 0x188323cc, 0x28a5ab56, 0xb5aa4a20, 0xc9cb6ffb, 0x54c48e8d, + 0x3109244d, 0xac06c53b, 0xd067e0e0, 0x4d680196, 0x1bfcb560, + 0x86f35416, 0xfa9271cd, 0x679d90bb, 0x02503a7b, 0x9f5fdb0d, + 0xe33efed6, 0x7e311fa0, 0xc2ca1813, 0x5fc5f965, 0x23a4dcbe, + 0xbeab3dc8, 0xdb669708, 0x4669767e, 0x3a0853a5, 0xa707b2d3, + 0xf1930625, 0x6c9ce753, 0x10fdc288, 0x8df223fe, 0xe83f893e, + 0x75306848, 0x09514d93, 0x945eace5, 0xa478247f, 0x3977c509, + 0x4516e0d2, 0xd81901a4, 0xbdd4ab64, 0x20db4a12, 0x5cba6fc9, + 0xc1b58ebf, 0x97213a49, 0x0a2edb3f, 0x764ffee4, 0xeb401f92, + 0x8e8db552, 0x13825424, 0x6fe371ff, 0xf2ec9089, 0x0fae60cb, + 0x92a181bd, 0xeec0a466, 0x73cf4510, 0x1602efd0, 0x8b0d0ea6, + 0xf76c2b7d, 0x6a63ca0b, 0x3cf77efd, 0xa1f89f8b, 0xdd99ba50, + 0x40965b26, 0x255bf1e6, 0xb8541090, 0xc435354b, 0x593ad43d, + 0x691c5ca7, 0xf413bdd1, 0x8872980a, 0x157d797c, 0x70b0d3bc, + 0xedbf32ca, 0x91de1711, 0x0cd1f667, 0x5a454291, 0xc74aa3e7, + 0xbb2b863c, 0x2624674a, 0x43e9cd8a, 0xdee62cfc, 0xa2870927, + 0x3f88e851}, + {0x00000000, 0xdd96d985, 0x605cb54b, 0xbdca6cce, 0xc0b96a96, + 0x1d2fb313, 0xa0e5dfdd, 0x7d730658, 0x5a03d36d, 0x87950ae8, + 0x3a5f6626, 0xe7c9bfa3, 0x9abab9fb, 0x472c607e, 0xfae60cb0, + 0x2770d535, 0xb407a6da, 0x69917f5f, 0xd45b1391, 0x09cdca14, + 0x74becc4c, 0xa92815c9, 0x14e27907, 0xc974a082, 0xee0475b7, + 0x3392ac32, 0x8e58c0fc, 0x53ce1979, 0x2ebd1f21, 0xf32bc6a4, + 0x4ee1aa6a, 0x937773ef, 0xb37e4bf5, 0x6ee89270, 0xd322febe, + 0x0eb4273b, 0x73c72163, 0xae51f8e6, 0x139b9428, 0xce0d4dad, + 0xe97d9898, 0x34eb411d, 0x89212dd3, 0x54b7f456, 0x29c4f20e, + 0xf4522b8b, 0x49984745, 0x940e9ec0, 0x0779ed2f, 0xdaef34aa, + 0x67255864, 0xbab381e1, 0xc7c087b9, 0x1a565e3c, 0xa79c32f2, + 0x7a0aeb77, 0x5d7a3e42, 0x80ece7c7, 0x3d268b09, 0xe0b0528c, + 0x9dc354d4, 0x40558d51, 0xfd9fe19f, 0x2009381a, 0xbd8d91ab, + 0x601b482e, 0xddd124e0, 0x0047fd65, 0x7d34fb3d, 0xa0a222b8, + 0x1d684e76, 0xc0fe97f3, 0xe78e42c6, 0x3a189b43, 0x87d2f78d, + 0x5a442e08, 0x27372850, 0xfaa1f1d5, 0x476b9d1b, 0x9afd449e, + 0x098a3771, 0xd41ceef4, 0x69d6823a, 0xb4405bbf, 0xc9335de7, + 0x14a58462, 0xa96fe8ac, 0x74f93129, 0x5389e41c, 0x8e1f3d99, + 0x33d55157, 0xee4388d2, 0x93308e8a, 0x4ea6570f, 0xf36c3bc1, + 0x2efae244, 0x0ef3da5e, 0xd36503db, 0x6eaf6f15, 0xb339b690, + 0xce4ab0c8, 0x13dc694d, 0xae160583, 0x7380dc06, 0x54f00933, + 0x8966d0b6, 0x34acbc78, 0xe93a65fd, 0x944963a5, 0x49dfba20, + 0xf415d6ee, 0x29830f6b, 0xbaf47c84, 0x6762a501, 0xdaa8c9cf, + 0x073e104a, 0x7a4d1612, 0xa7dbcf97, 0x1a11a359, 0xc7877adc, + 0xe0f7afe9, 0x3d61766c, 0x80ab1aa2, 0x5d3dc327, 0x204ec57f, + 0xfdd81cfa, 0x40127034, 0x9d84a9b1, 0xa06a2517, 0x7dfcfc92, + 0xc036905c, 0x1da049d9, 0x60d34f81, 0xbd459604, 0x008ffaca, + 0xdd19234f, 0xfa69f67a, 0x27ff2fff, 0x9a354331, 0x47a39ab4, + 0x3ad09cec, 0xe7464569, 0x5a8c29a7, 0x871af022, 0x146d83cd, + 0xc9fb5a48, 0x74313686, 0xa9a7ef03, 0xd4d4e95b, 0x094230de, + 0xb4885c10, 0x691e8595, 0x4e6e50a0, 0x93f88925, 0x2e32e5eb, + 0xf3a43c6e, 0x8ed73a36, 0x5341e3b3, 0xee8b8f7d, 0x331d56f8, + 0x13146ee2, 0xce82b767, 0x7348dba9, 0xaede022c, 0xd3ad0474, + 0x0e3bddf1, 0xb3f1b13f, 0x6e6768ba, 0x4917bd8f, 0x9481640a, + 0x294b08c4, 0xf4ddd141, 0x89aed719, 0x54380e9c, 0xe9f26252, + 0x3464bbd7, 0xa713c838, 0x7a8511bd, 0xc74f7d73, 0x1ad9a4f6, + 0x67aaa2ae, 0xba3c7b2b, 0x07f617e5, 0xda60ce60, 0xfd101b55, + 0x2086c2d0, 0x9d4cae1e, 0x40da779b, 0x3da971c3, 0xe03fa846, + 0x5df5c488, 0x80631d0d, 0x1de7b4bc, 0xc0716d39, 0x7dbb01f7, + 0xa02dd872, 0xdd5ede2a, 0x00c807af, 0xbd026b61, 0x6094b2e4, + 0x47e467d1, 0x9a72be54, 0x27b8d29a, 0xfa2e0b1f, 0x875d0d47, + 0x5acbd4c2, 0xe701b80c, 0x3a976189, 0xa9e01266, 0x7476cbe3, + 0xc9bca72d, 0x142a7ea8, 0x695978f0, 0xb4cfa175, 0x0905cdbb, + 0xd493143e, 0xf3e3c10b, 0x2e75188e, 0x93bf7440, 0x4e29adc5, + 0x335aab9d, 0xeecc7218, 0x53061ed6, 0x8e90c753, 0xae99ff49, + 0x730f26cc, 0xcec54a02, 0x13539387, 0x6e2095df, 0xb3b64c5a, + 0x0e7c2094, 0xd3eaf911, 0xf49a2c24, 0x290cf5a1, 0x94c6996f, + 0x495040ea, 0x342346b2, 0xe9b59f37, 0x547ff3f9, 0x89e92a7c, + 0x1a9e5993, 0xc7088016, 0x7ac2ecd8, 0xa754355d, 0xda273305, + 0x07b1ea80, 0xba7b864e, 0x67ed5fcb, 0x409d8afe, 0x9d0b537b, + 0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523, + 0x3dee8ca6}, + {0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f, + 0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91, + 0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e, + 0x72949f71, 0x0c18edfc, 0x97bda193, 0xe0237363, 0x7b863f0c, + 0x0f1ed683, 0x94bb9aec, 0xe325481c, 0x78800473, 0x0a149b02, + 0x91b1d76d, 0xe62f059d, 0x7d8a49f2, 0x0912a07d, 0x92b7ec12, + 0xe5293ee2, 0x7e8c728d, 0x1831dbf8, 0x83949797, 0xf40a4567, + 0x6faf0908, 0x1b37e087, 0x8092ace8, 0xf70c7e18, 0x6ca93277, + 0x1e3dad06, 0x8598e169, 0xf2063399, 0x69a37ff6, 0x1d3b9679, + 0x869eda16, 0xf10008e6, 0x6aa54489, 0x14293604, 0x8f8c7a6b, + 0xf812a89b, 0x63b7e4f4, 0x172f0d7b, 0x8c8a4114, 0xfb1493e4, + 0x60b1df8b, 0x122540fa, 0x89800c95, 0xfe1ede65, 0x65bb920a, + 0x11237b85, 0x8a8637ea, 0xfd18e51a, 0x66bda975, 0x3063b7f0, + 0xabc6fb9f, 0xdc58296f, 0x47fd6500, 0x33658c8f, 0xa8c0c0e0, + 0xdf5e1210, 0x44fb5e7f, 0x366fc10e, 0xadca8d61, 0xda545f91, + 0x41f113fe, 0x3569fa71, 0xaeccb61e, 0xd95264ee, 0x42f72881, + 0x3c7b5a0c, 0xa7de1663, 0xd040c493, 0x4be588fc, 0x3f7d6173, + 0xa4d82d1c, 0xd346ffec, 0x48e3b383, 0x3a772cf2, 0xa1d2609d, + 0xd64cb26d, 0x4de9fe02, 0x3971178d, 0xa2d45be2, 0xd54a8912, + 0x4eefc57d, 0x28526c08, 0xb3f72067, 0xc469f297, 0x5fccbef8, + 0x2b545777, 0xb0f11b18, 0xc76fc9e8, 0x5cca8587, 0x2e5e1af6, + 0xb5fb5699, 0xc2658469, 0x59c0c806, 0x2d582189, 0xb6fd6de6, + 0xc163bf16, 0x5ac6f379, 0x244a81f4, 0xbfefcd9b, 0xc8711f6b, + 0x53d45304, 0x274cba8b, 0xbce9f6e4, 0xcb772414, 0x50d2687b, + 0x2246f70a, 0xb9e3bb65, 0xce7d6995, 0x55d825fa, 0x2140cc75, + 0xbae5801a, 0xcd7b52ea, 0x56de1e85, 0x60c76fe0, 0xfb62238f, + 0x8cfcf17f, 0x1759bd10, 0x63c1549f, 0xf86418f0, 0x8ffaca00, + 0x145f866f, 0x66cb191e, 0xfd6e5571, 0x8af08781, 0x1155cbee, + 0x65cd2261, 0xfe686e0e, 0x89f6bcfe, 0x1253f091, 0x6cdf821c, + 0xf77ace73, 0x80e41c83, 0x1b4150ec, 0x6fd9b963, 0xf47cf50c, + 0x83e227fc, 0x18476b93, 0x6ad3f4e2, 0xf176b88d, 0x86e86a7d, + 0x1d4d2612, 0x69d5cf9d, 0xf27083f2, 0x85ee5102, 0x1e4b1d6d, + 0x78f6b418, 0xe353f877, 0x94cd2a87, 0x0f6866e8, 0x7bf08f67, + 0xe055c308, 0x97cb11f8, 0x0c6e5d97, 0x7efac2e6, 0xe55f8e89, + 0x92c15c79, 0x09641016, 0x7dfcf999, 0xe659b5f6, 0x91c76706, + 0x0a622b69, 0x74ee59e4, 0xef4b158b, 0x98d5c77b, 0x03708b14, + 0x77e8629b, 0xec4d2ef4, 0x9bd3fc04, 0x0076b06b, 0x72e22f1a, + 0xe9476375, 0x9ed9b185, 0x057cfdea, 0x71e41465, 0xea41580a, + 0x9ddf8afa, 0x067ac695, 0x50a4d810, 0xcb01947f, 0xbc9f468f, + 0x273a0ae0, 0x53a2e36f, 0xc807af00, 0xbf997df0, 0x243c319f, + 0x56a8aeee, 0xcd0de281, 0xba933071, 0x21367c1e, 0x55ae9591, + 0xce0bd9fe, 0xb9950b0e, 0x22304761, 0x5cbc35ec, 0xc7197983, + 0xb087ab73, 0x2b22e71c, 0x5fba0e93, 0xc41f42fc, 0xb381900c, + 0x2824dc63, 0x5ab04312, 0xc1150f7d, 0xb68bdd8d, 0x2d2e91e2, + 0x59b6786d, 0xc2133402, 0xb58de6f2, 0x2e28aa9d, 0x489503e8, + 0xd3304f87, 0xa4ae9d77, 0x3f0bd118, 0x4b933897, 0xd03674f8, + 0xa7a8a608, 0x3c0dea67, 0x4e997516, 0xd53c3979, 0xa2a2eb89, + 0x3907a7e6, 0x4d9f4e69, 0xd63a0206, 0xa1a4d0f6, 0x3a019c99, + 0x448dee14, 0xdf28a27b, 0xa8b6708b, 0x33133ce4, 0x478bd56b, + 0xdc2e9904, 0xabb04bf4, 0x3015079b, 0x428198ea, 0xd924d485, + 0xaeba0675, 0x351f4a1a, 0x4187a395, 0xda22effa, 0xadbc3d0a, + 0x36197165}, + {0x00000000, 0xc18edfc0, 0x586cb9c1, 0x99e26601, 0xb0d97382, + 0x7157ac42, 0xe8b5ca43, 0x293b1583, 0xbac3e145, 0x7b4d3e85, + 0xe2af5884, 0x23218744, 0x0a1a92c7, 0xcb944d07, 0x52762b06, + 0x93f8f4c6, 0xaef6c4cb, 0x6f781b0b, 0xf69a7d0a, 0x3714a2ca, + 0x1e2fb749, 0xdfa16889, 0x46430e88, 0x87cdd148, 0x1435258e, + 0xd5bbfa4e, 0x4c599c4f, 0x8dd7438f, 0xa4ec560c, 0x656289cc, + 0xfc80efcd, 0x3d0e300d, 0x869c8fd7, 0x47125017, 0xdef03616, + 0x1f7ee9d6, 0x3645fc55, 0xf7cb2395, 0x6e294594, 0xafa79a54, + 0x3c5f6e92, 0xfdd1b152, 0x6433d753, 0xa5bd0893, 0x8c861d10, + 0x4d08c2d0, 0xd4eaa4d1, 0x15647b11, 0x286a4b1c, 0xe9e494dc, + 0x7006f2dd, 0xb1882d1d, 0x98b3389e, 0x593de75e, 0xc0df815f, + 0x01515e9f, 0x92a9aa59, 0x53277599, 0xcac51398, 0x0b4bcc58, + 0x2270d9db, 0xe3fe061b, 0x7a1c601a, 0xbb92bfda, 0xd64819ef, + 0x17c6c62f, 0x8e24a02e, 0x4faa7fee, 0x66916a6d, 0xa71fb5ad, + 0x3efdd3ac, 0xff730c6c, 0x6c8bf8aa, 0xad05276a, 0x34e7416b, + 0xf5699eab, 0xdc528b28, 0x1ddc54e8, 0x843e32e9, 0x45b0ed29, + 0x78bedd24, 0xb93002e4, 0x20d264e5, 0xe15cbb25, 0xc867aea6, + 0x09e97166, 0x900b1767, 0x5185c8a7, 0xc27d3c61, 0x03f3e3a1, + 0x9a1185a0, 0x5b9f5a60, 0x72a44fe3, 0xb32a9023, 0x2ac8f622, + 0xeb4629e2, 0x50d49638, 0x915a49f8, 0x08b82ff9, 0xc936f039, + 0xe00de5ba, 0x21833a7a, 0xb8615c7b, 0x79ef83bb, 0xea17777d, + 0x2b99a8bd, 0xb27bcebc, 0x73f5117c, 0x5ace04ff, 0x9b40db3f, + 0x02a2bd3e, 0xc32c62fe, 0xfe2252f3, 0x3fac8d33, 0xa64eeb32, + 0x67c034f2, 0x4efb2171, 0x8f75feb1, 0x169798b0, 0xd7194770, + 0x44e1b3b6, 0x856f6c76, 0x1c8d0a77, 0xdd03d5b7, 0xf438c034, + 0x35b61ff4, 0xac5479f5, 0x6ddaa635, 0x77e1359f, 0xb66fea5f, + 0x2f8d8c5e, 0xee03539e, 0xc738461d, 0x06b699dd, 0x9f54ffdc, + 0x5eda201c, 0xcd22d4da, 0x0cac0b1a, 0x954e6d1b, 0x54c0b2db, + 0x7dfba758, 0xbc757898, 0x25971e99, 0xe419c159, 0xd917f154, + 0x18992e94, 0x817b4895, 0x40f59755, 0x69ce82d6, 0xa8405d16, + 0x31a23b17, 0xf02ce4d7, 0x63d41011, 0xa25acfd1, 0x3bb8a9d0, + 0xfa367610, 0xd30d6393, 0x1283bc53, 0x8b61da52, 0x4aef0592, + 0xf17dba48, 0x30f36588, 0xa9110389, 0x689fdc49, 0x41a4c9ca, + 0x802a160a, 0x19c8700b, 0xd846afcb, 0x4bbe5b0d, 0x8a3084cd, + 0x13d2e2cc, 0xd25c3d0c, 0xfb67288f, 0x3ae9f74f, 0xa30b914e, + 0x62854e8e, 0x5f8b7e83, 0x9e05a143, 0x07e7c742, 0xc6691882, + 0xef520d01, 0x2edcd2c1, 0xb73eb4c0, 0x76b06b00, 0xe5489fc6, + 0x24c64006, 0xbd242607, 0x7caaf9c7, 0x5591ec44, 0x941f3384, + 0x0dfd5585, 0xcc738a45, 0xa1a92c70, 0x6027f3b0, 0xf9c595b1, + 0x384b4a71, 0x11705ff2, 0xd0fe8032, 0x491ce633, 0x889239f3, + 0x1b6acd35, 0xdae412f5, 0x430674f4, 0x8288ab34, 0xabb3beb7, + 0x6a3d6177, 0xf3df0776, 0x3251d8b6, 0x0f5fe8bb, 0xced1377b, + 0x5733517a, 0x96bd8eba, 0xbf869b39, 0x7e0844f9, 0xe7ea22f8, + 0x2664fd38, 0xb59c09fe, 0x7412d63e, 0xedf0b03f, 0x2c7e6fff, + 0x05457a7c, 0xc4cba5bc, 0x5d29c3bd, 0x9ca71c7d, 0x2735a3a7, + 0xe6bb7c67, 0x7f591a66, 0xbed7c5a6, 0x97ecd025, 0x56620fe5, + 0xcf8069e4, 0x0e0eb624, 0x9df642e2, 0x5c789d22, 0xc59afb23, + 0x041424e3, 0x2d2f3160, 0xeca1eea0, 0x754388a1, 0xb4cd5761, + 0x89c3676c, 0x484db8ac, 0xd1afdead, 0x1021016d, 0x391a14ee, + 0xf894cb2e, 0x6176ad2f, 0xa0f872ef, 0x33008629, 0xf28e59e9, + 0x6b6c3fe8, 0xaae2e028, 0x83d9f5ab, 0x42572a6b, 0xdbb54c6a, + 0x1a3b93aa}, + {0x00000000, 0xefc26b3e, 0x04f5d03d, 0xeb37bb03, 0x09eba07a, + 0xe629cb44, 0x0d1e7047, 0xe2dc1b79, 0x13d740f4, 0xfc152bca, + 0x172290c9, 0xf8e0fbf7, 0x1a3ce08e, 0xf5fe8bb0, 0x1ec930b3, + 0xf10b5b8d, 0x27ae81e8, 0xc86cead6, 0x235b51d5, 0xcc993aeb, + 0x2e452192, 0xc1874aac, 0x2ab0f1af, 0xc5729a91, 0x3479c11c, + 0xdbbbaa22, 0x308c1121, 0xdf4e7a1f, 0x3d926166, 0xd2500a58, + 0x3967b15b, 0xd6a5da65, 0x4f5d03d0, 0xa09f68ee, 0x4ba8d3ed, + 0xa46ab8d3, 0x46b6a3aa, 0xa974c894, 0x42437397, 0xad8118a9, + 0x5c8a4324, 0xb348281a, 0x587f9319, 0xb7bdf827, 0x5561e35e, + 0xbaa38860, 0x51943363, 0xbe56585d, 0x68f38238, 0x8731e906, + 0x6c065205, 0x83c4393b, 0x61182242, 0x8eda497c, 0x65edf27f, + 0x8a2f9941, 0x7b24c2cc, 0x94e6a9f2, 0x7fd112f1, 0x901379cf, + 0x72cf62b6, 0x9d0d0988, 0x763ab28b, 0x99f8d9b5, 0x9eba07a0, + 0x71786c9e, 0x9a4fd79d, 0x758dbca3, 0x9751a7da, 0x7893cce4, + 0x93a477e7, 0x7c661cd9, 0x8d6d4754, 0x62af2c6a, 0x89989769, + 0x665afc57, 0x8486e72e, 0x6b448c10, 0x80733713, 0x6fb15c2d, + 0xb9148648, 0x56d6ed76, 0xbde15675, 0x52233d4b, 0xb0ff2632, + 0x5f3d4d0c, 0xb40af60f, 0x5bc89d31, 0xaac3c6bc, 0x4501ad82, + 0xae361681, 0x41f47dbf, 0xa32866c6, 0x4cea0df8, 0xa7ddb6fb, + 0x481fddc5, 0xd1e70470, 0x3e256f4e, 0xd512d44d, 0x3ad0bf73, + 0xd80ca40a, 0x37cecf34, 0xdcf97437, 0x333b1f09, 0xc2304484, + 0x2df22fba, 0xc6c594b9, 0x2907ff87, 0xcbdbe4fe, 0x24198fc0, + 0xcf2e34c3, 0x20ec5ffd, 0xf6498598, 0x198beea6, 0xf2bc55a5, + 0x1d7e3e9b, 0xffa225e2, 0x10604edc, 0xfb57f5df, 0x14959ee1, + 0xe59ec56c, 0x0a5cae52, 0xe16b1551, 0x0ea97e6f, 0xec756516, + 0x03b70e28, 0xe880b52b, 0x0742de15, 0xe6050901, 0x09c7623f, + 0xe2f0d93c, 0x0d32b202, 0xefeea97b, 0x002cc245, 0xeb1b7946, + 0x04d91278, 0xf5d249f5, 0x1a1022cb, 0xf12799c8, 0x1ee5f2f6, + 0xfc39e98f, 0x13fb82b1, 0xf8cc39b2, 0x170e528c, 0xc1ab88e9, + 0x2e69e3d7, 0xc55e58d4, 0x2a9c33ea, 0xc8402893, 0x278243ad, + 0xccb5f8ae, 0x23779390, 0xd27cc81d, 0x3dbea323, 0xd6891820, + 0x394b731e, 0xdb976867, 0x34550359, 0xdf62b85a, 0x30a0d364, + 0xa9580ad1, 0x469a61ef, 0xadaddaec, 0x426fb1d2, 0xa0b3aaab, + 0x4f71c195, 0xa4467a96, 0x4b8411a8, 0xba8f4a25, 0x554d211b, + 0xbe7a9a18, 0x51b8f126, 0xb364ea5f, 0x5ca68161, 0xb7913a62, + 0x5853515c, 0x8ef68b39, 0x6134e007, 0x8a035b04, 0x65c1303a, + 0x871d2b43, 0x68df407d, 0x83e8fb7e, 0x6c2a9040, 0x9d21cbcd, + 0x72e3a0f3, 0x99d41bf0, 0x761670ce, 0x94ca6bb7, 0x7b080089, + 0x903fbb8a, 0x7ffdd0b4, 0x78bf0ea1, 0x977d659f, 0x7c4ade9c, + 0x9388b5a2, 0x7154aedb, 0x9e96c5e5, 0x75a17ee6, 0x9a6315d8, + 0x6b684e55, 0x84aa256b, 0x6f9d9e68, 0x805ff556, 0x6283ee2f, + 0x8d418511, 0x66763e12, 0x89b4552c, 0x5f118f49, 0xb0d3e477, + 0x5be45f74, 0xb426344a, 0x56fa2f33, 0xb938440d, 0x520fff0e, + 0xbdcd9430, 0x4cc6cfbd, 0xa304a483, 0x48331f80, 0xa7f174be, + 0x452d6fc7, 0xaaef04f9, 0x41d8bffa, 0xae1ad4c4, 0x37e20d71, + 0xd820664f, 0x3317dd4c, 0xdcd5b672, 0x3e09ad0b, 0xd1cbc635, + 0x3afc7d36, 0xd53e1608, 0x24354d85, 0xcbf726bb, 0x20c09db8, + 0xcf02f686, 0x2ddeedff, 0xc21c86c1, 0x292b3dc2, 0xc6e956fc, + 0x104c8c99, 0xff8ee7a7, 0x14b95ca4, 0xfb7b379a, 0x19a72ce3, + 0xf66547dd, 0x1d52fcde, 0xf29097e0, 0x039bcc6d, 0xec59a753, + 0x076e1c50, 0xe8ac776e, 0x0a706c17, 0xe5b20729, 0x0e85bc2a, + 0xe147d714}, + {0x00000000, 0x177b1443, 0x2ef62886, 0x398d3cc5, 0x5dec510c, + 0x4a97454f, 0x731a798a, 0x64616dc9, 0xbbd8a218, 0xaca3b65b, + 0x952e8a9e, 0x82559edd, 0xe634f314, 0xf14fe757, 0xc8c2db92, + 0xdfb9cfd1, 0xacc04271, 0xbbbb5632, 0x82366af7, 0x954d7eb4, + 0xf12c137d, 0xe657073e, 0xdfda3bfb, 0xc8a12fb8, 0x1718e069, + 0x0063f42a, 0x39eec8ef, 0x2e95dcac, 0x4af4b165, 0x5d8fa526, + 0x640299e3, 0x73798da0, 0x82f182a3, 0x958a96e0, 0xac07aa25, + 0xbb7cbe66, 0xdf1dd3af, 0xc866c7ec, 0xf1ebfb29, 0xe690ef6a, + 0x392920bb, 0x2e5234f8, 0x17df083d, 0x00a41c7e, 0x64c571b7, + 0x73be65f4, 0x4a335931, 0x5d484d72, 0x2e31c0d2, 0x394ad491, + 0x00c7e854, 0x17bcfc17, 0x73dd91de, 0x64a6859d, 0x5d2bb958, + 0x4a50ad1b, 0x95e962ca, 0x82927689, 0xbb1f4a4c, 0xac645e0f, + 0xc80533c6, 0xdf7e2785, 0xe6f31b40, 0xf1880f03, 0xde920307, + 0xc9e91744, 0xf0642b81, 0xe71f3fc2, 0x837e520b, 0x94054648, + 0xad887a8d, 0xbaf36ece, 0x654aa11f, 0x7231b55c, 0x4bbc8999, + 0x5cc79dda, 0x38a6f013, 0x2fdde450, 0x1650d895, 0x012bccd6, + 0x72524176, 0x65295535, 0x5ca469f0, 0x4bdf7db3, 0x2fbe107a, + 0x38c50439, 0x014838fc, 0x16332cbf, 0xc98ae36e, 0xdef1f72d, + 0xe77ccbe8, 0xf007dfab, 0x9466b262, 0x831da621, 0xba909ae4, + 0xadeb8ea7, 0x5c6381a4, 0x4b1895e7, 0x7295a922, 0x65eebd61, + 0x018fd0a8, 0x16f4c4eb, 0x2f79f82e, 0x3802ec6d, 0xe7bb23bc, + 0xf0c037ff, 0xc94d0b3a, 0xde361f79, 0xba5772b0, 0xad2c66f3, + 0x94a15a36, 0x83da4e75, 0xf0a3c3d5, 0xe7d8d796, 0xde55eb53, + 0xc92eff10, 0xad4f92d9, 0xba34869a, 0x83b9ba5f, 0x94c2ae1c, + 0x4b7b61cd, 0x5c00758e, 0x658d494b, 0x72f65d08, 0x169730c1, + 0x01ec2482, 0x38611847, 0x2f1a0c04, 0x6655004f, 0x712e140c, + 0x48a328c9, 0x5fd83c8a, 0x3bb95143, 0x2cc24500, 0x154f79c5, + 0x02346d86, 0xdd8da257, 0xcaf6b614, 0xf37b8ad1, 0xe4009e92, + 0x8061f35b, 0x971ae718, 0xae97dbdd, 0xb9eccf9e, 0xca95423e, + 0xddee567d, 0xe4636ab8, 0xf3187efb, 0x97791332, 0x80020771, + 0xb98f3bb4, 0xaef42ff7, 0x714de026, 0x6636f465, 0x5fbbc8a0, + 0x48c0dce3, 0x2ca1b12a, 0x3bdaa569, 0x025799ac, 0x152c8def, + 0xe4a482ec, 0xf3df96af, 0xca52aa6a, 0xdd29be29, 0xb948d3e0, + 0xae33c7a3, 0x97befb66, 0x80c5ef25, 0x5f7c20f4, 0x480734b7, + 0x718a0872, 0x66f11c31, 0x029071f8, 0x15eb65bb, 0x2c66597e, + 0x3b1d4d3d, 0x4864c09d, 0x5f1fd4de, 0x6692e81b, 0x71e9fc58, + 0x15889191, 0x02f385d2, 0x3b7eb917, 0x2c05ad54, 0xf3bc6285, + 0xe4c776c6, 0xdd4a4a03, 0xca315e40, 0xae503389, 0xb92b27ca, + 0x80a61b0f, 0x97dd0f4c, 0xb8c70348, 0xafbc170b, 0x96312bce, + 0x814a3f8d, 0xe52b5244, 0xf2504607, 0xcbdd7ac2, 0xdca66e81, + 0x031fa150, 0x1464b513, 0x2de989d6, 0x3a929d95, 0x5ef3f05c, + 0x4988e41f, 0x7005d8da, 0x677ecc99, 0x14074139, 0x037c557a, + 0x3af169bf, 0x2d8a7dfc, 0x49eb1035, 0x5e900476, 0x671d38b3, + 0x70662cf0, 0xafdfe321, 0xb8a4f762, 0x8129cba7, 0x9652dfe4, + 0xf233b22d, 0xe548a66e, 0xdcc59aab, 0xcbbe8ee8, 0x3a3681eb, + 0x2d4d95a8, 0x14c0a96d, 0x03bbbd2e, 0x67dad0e7, 0x70a1c4a4, + 0x492cf861, 0x5e57ec22, 0x81ee23f3, 0x969537b0, 0xaf180b75, + 0xb8631f36, 0xdc0272ff, 0xcb7966bc, 0xf2f45a79, 0xe58f4e3a, + 0x96f6c39a, 0x818dd7d9, 0xb800eb1c, 0xaf7bff5f, 0xcb1a9296, + 0xdc6186d5, 0xe5ecba10, 0xf297ae53, 0x2d2e6182, 0x3a5575c1, + 0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808, + 0x494f0c4b}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0x43147b1700000000, 0x8628f62e00000000, + 0xc53c8d3900000000, 0x0c51ec5d00000000, 0x4f45974a00000000, + 0x8a791a7300000000, 0xc96d616400000000, 0x18a2d8bb00000000, + 0x5bb6a3ac00000000, 0x9e8a2e9500000000, 0xdd9e558200000000, + 0x14f334e600000000, 0x57e74ff100000000, 0x92dbc2c800000000, + 0xd1cfb9df00000000, 0x7142c0ac00000000, 0x3256bbbb00000000, + 0xf76a368200000000, 0xb47e4d9500000000, 0x7d132cf100000000, + 0x3e0757e600000000, 0xfb3bdadf00000000, 0xb82fa1c800000000, + 0x69e0181700000000, 0x2af4630000000000, 0xefc8ee3900000000, + 0xacdc952e00000000, 0x65b1f44a00000000, 0x26a58f5d00000000, + 0xe399026400000000, 0xa08d797300000000, 0xa382f18200000000, + 0xe0968a9500000000, 0x25aa07ac00000000, 0x66be7cbb00000000, + 0xafd31ddf00000000, 0xecc766c800000000, 0x29fbebf100000000, + 0x6aef90e600000000, 0xbb20293900000000, 0xf834522e00000000, + 0x3d08df1700000000, 0x7e1ca40000000000, 0xb771c56400000000, + 0xf465be7300000000, 0x3159334a00000000, 0x724d485d00000000, + 0xd2c0312e00000000, 0x91d44a3900000000, 0x54e8c70000000000, + 0x17fcbc1700000000, 0xde91dd7300000000, 0x9d85a66400000000, + 0x58b92b5d00000000, 0x1bad504a00000000, 0xca62e99500000000, + 0x8976928200000000, 0x4c4a1fbb00000000, 0x0f5e64ac00000000, + 0xc63305c800000000, 0x85277edf00000000, 0x401bf3e600000000, + 0x030f88f100000000, 0x070392de00000000, 0x4417e9c900000000, + 0x812b64f000000000, 0xc23f1fe700000000, 0x0b527e8300000000, + 0x4846059400000000, 0x8d7a88ad00000000, 0xce6ef3ba00000000, + 0x1fa14a6500000000, 0x5cb5317200000000, 0x9989bc4b00000000, + 0xda9dc75c00000000, 0x13f0a63800000000, 0x50e4dd2f00000000, + 0x95d8501600000000, 0xd6cc2b0100000000, 0x7641527200000000, + 0x3555296500000000, 0xf069a45c00000000, 0xb37ddf4b00000000, + 0x7a10be2f00000000, 0x3904c53800000000, 0xfc38480100000000, + 0xbf2c331600000000, 0x6ee38ac900000000, 0x2df7f1de00000000, + 0xe8cb7ce700000000, 0xabdf07f000000000, 0x62b2669400000000, + 0x21a61d8300000000, 0xe49a90ba00000000, 0xa78eebad00000000, + 0xa481635c00000000, 0xe795184b00000000, 0x22a9957200000000, + 0x61bdee6500000000, 0xa8d08f0100000000, 0xebc4f41600000000, + 0x2ef8792f00000000, 0x6dec023800000000, 0xbc23bbe700000000, + 0xff37c0f000000000, 0x3a0b4dc900000000, 0x791f36de00000000, + 0xb07257ba00000000, 0xf3662cad00000000, 0x365aa19400000000, + 0x754eda8300000000, 0xd5c3a3f000000000, 0x96d7d8e700000000, + 0x53eb55de00000000, 0x10ff2ec900000000, 0xd9924fad00000000, + 0x9a8634ba00000000, 0x5fbab98300000000, 0x1caec29400000000, + 0xcd617b4b00000000, 0x8e75005c00000000, 0x4b498d6500000000, + 0x085df67200000000, 0xc130971600000000, 0x8224ec0100000000, + 0x4718613800000000, 0x040c1a2f00000000, 0x4f00556600000000, + 0x0c142e7100000000, 0xc928a34800000000, 0x8a3cd85f00000000, + 0x4351b93b00000000, 0x0045c22c00000000, 0xc5794f1500000000, + 0x866d340200000000, 0x57a28ddd00000000, 0x14b6f6ca00000000, + 0xd18a7bf300000000, 0x929e00e400000000, 0x5bf3618000000000, + 0x18e71a9700000000, 0xdddb97ae00000000, 0x9ecfecb900000000, + 0x3e4295ca00000000, 0x7d56eedd00000000, 0xb86a63e400000000, + 0xfb7e18f300000000, 0x3213799700000000, 0x7107028000000000, + 0xb43b8fb900000000, 0xf72ff4ae00000000, 0x26e04d7100000000, + 0x65f4366600000000, 0xa0c8bb5f00000000, 0xe3dcc04800000000, + 0x2ab1a12c00000000, 0x69a5da3b00000000, 0xac99570200000000, + 0xef8d2c1500000000, 0xec82a4e400000000, 0xaf96dff300000000, + 0x6aaa52ca00000000, 0x29be29dd00000000, 0xe0d348b900000000, + 0xa3c733ae00000000, 0x66fbbe9700000000, 0x25efc58000000000, + 0xf4207c5f00000000, 0xb734074800000000, 0x72088a7100000000, + 0x311cf16600000000, 0xf871900200000000, 0xbb65eb1500000000, + 0x7e59662c00000000, 0x3d4d1d3b00000000, 0x9dc0644800000000, + 0xded41f5f00000000, 0x1be8926600000000, 0x58fce97100000000, + 0x9191881500000000, 0xd285f30200000000, 0x17b97e3b00000000, + 0x54ad052c00000000, 0x8562bcf300000000, 0xc676c7e400000000, + 0x034a4add00000000, 0x405e31ca00000000, 0x893350ae00000000, + 0xca272bb900000000, 0x0f1ba68000000000, 0x4c0fdd9700000000, + 0x4803c7b800000000, 0x0b17bcaf00000000, 0xce2b319600000000, + 0x8d3f4a8100000000, 0x44522be500000000, 0x074650f200000000, + 0xc27addcb00000000, 0x816ea6dc00000000, 0x50a11f0300000000, + 0x13b5641400000000, 0xd689e92d00000000, 0x959d923a00000000, + 0x5cf0f35e00000000, 0x1fe4884900000000, 0xdad8057000000000, + 0x99cc7e6700000000, 0x3941071400000000, 0x7a557c0300000000, + 0xbf69f13a00000000, 0xfc7d8a2d00000000, 0x3510eb4900000000, + 0x7604905e00000000, 0xb3381d6700000000, 0xf02c667000000000, + 0x21e3dfaf00000000, 0x62f7a4b800000000, 0xa7cb298100000000, + 0xe4df529600000000, 0x2db233f200000000, 0x6ea648e500000000, + 0xab9ac5dc00000000, 0xe88ebecb00000000, 0xeb81363a00000000, + 0xa8954d2d00000000, 0x6da9c01400000000, 0x2ebdbb0300000000, + 0xe7d0da6700000000, 0xa4c4a17000000000, 0x61f82c4900000000, + 0x22ec575e00000000, 0xf323ee8100000000, 0xb037959600000000, + 0x750b18af00000000, 0x361f63b800000000, 0xff7202dc00000000, + 0xbc6679cb00000000, 0x795af4f200000000, 0x3a4e8fe500000000, + 0x9ac3f69600000000, 0xd9d78d8100000000, 0x1ceb00b800000000, + 0x5fff7baf00000000, 0x96921acb00000000, 0xd58661dc00000000, + 0x10baece500000000, 0x53ae97f200000000, 0x82612e2d00000000, + 0xc175553a00000000, 0x0449d80300000000, 0x475da31400000000, + 0x8e30c27000000000, 0xcd24b96700000000, 0x0818345e00000000, + 0x4b0c4f4900000000}, + {0x0000000000000000, 0x3e6bc2ef00000000, 0x3dd0f50400000000, + 0x03bb37eb00000000, 0x7aa0eb0900000000, 0x44cb29e600000000, + 0x47701e0d00000000, 0x791bdce200000000, 0xf440d71300000000, + 0xca2b15fc00000000, 0xc990221700000000, 0xf7fbe0f800000000, + 0x8ee03c1a00000000, 0xb08bfef500000000, 0xb330c91e00000000, + 0x8d5b0bf100000000, 0xe881ae2700000000, 0xd6ea6cc800000000, + 0xd5515b2300000000, 0xeb3a99cc00000000, 0x9221452e00000000, + 0xac4a87c100000000, 0xaff1b02a00000000, 0x919a72c500000000, + 0x1cc1793400000000, 0x22aabbdb00000000, 0x21118c3000000000, + 0x1f7a4edf00000000, 0x6661923d00000000, 0x580a50d200000000, + 0x5bb1673900000000, 0x65daa5d600000000, 0xd0035d4f00000000, + 0xee689fa000000000, 0xedd3a84b00000000, 0xd3b86aa400000000, + 0xaaa3b64600000000, 0x94c874a900000000, 0x9773434200000000, + 0xa91881ad00000000, 0x24438a5c00000000, 0x1a2848b300000000, + 0x19937f5800000000, 0x27f8bdb700000000, 0x5ee3615500000000, + 0x6088a3ba00000000, 0x6333945100000000, 0x5d5856be00000000, + 0x3882f36800000000, 0x06e9318700000000, 0x0552066c00000000, + 0x3b39c48300000000, 0x4222186100000000, 0x7c49da8e00000000, + 0x7ff2ed6500000000, 0x41992f8a00000000, 0xccc2247b00000000, + 0xf2a9e69400000000, 0xf112d17f00000000, 0xcf79139000000000, + 0xb662cf7200000000, 0x88090d9d00000000, 0x8bb23a7600000000, + 0xb5d9f89900000000, 0xa007ba9e00000000, 0x9e6c787100000000, + 0x9dd74f9a00000000, 0xa3bc8d7500000000, 0xdaa7519700000000, + 0xe4cc937800000000, 0xe777a49300000000, 0xd91c667c00000000, + 0x54476d8d00000000, 0x6a2caf6200000000, 0x6997988900000000, + 0x57fc5a6600000000, 0x2ee7868400000000, 0x108c446b00000000, + 0x1337738000000000, 0x2d5cb16f00000000, 0x488614b900000000, + 0x76edd65600000000, 0x7556e1bd00000000, 0x4b3d235200000000, + 0x3226ffb000000000, 0x0c4d3d5f00000000, 0x0ff60ab400000000, + 0x319dc85b00000000, 0xbcc6c3aa00000000, 0x82ad014500000000, + 0x811636ae00000000, 0xbf7df44100000000, 0xc66628a300000000, + 0xf80dea4c00000000, 0xfbb6dda700000000, 0xc5dd1f4800000000, + 0x7004e7d100000000, 0x4e6f253e00000000, 0x4dd412d500000000, + 0x73bfd03a00000000, 0x0aa40cd800000000, 0x34cfce3700000000, + 0x3774f9dc00000000, 0x091f3b3300000000, 0x844430c200000000, + 0xba2ff22d00000000, 0xb994c5c600000000, 0x87ff072900000000, + 0xfee4dbcb00000000, 0xc08f192400000000, 0xc3342ecf00000000, + 0xfd5fec2000000000, 0x988549f600000000, 0xa6ee8b1900000000, + 0xa555bcf200000000, 0x9b3e7e1d00000000, 0xe225a2ff00000000, + 0xdc4e601000000000, 0xdff557fb00000000, 0xe19e951400000000, + 0x6cc59ee500000000, 0x52ae5c0a00000000, 0x51156be100000000, + 0x6f7ea90e00000000, 0x166575ec00000000, 0x280eb70300000000, + 0x2bb580e800000000, 0x15de420700000000, 0x010905e600000000, + 0x3f62c70900000000, 0x3cd9f0e200000000, 0x02b2320d00000000, + 0x7ba9eeef00000000, 0x45c22c0000000000, 0x46791beb00000000, + 0x7812d90400000000, 0xf549d2f500000000, 0xcb22101a00000000, + 0xc89927f100000000, 0xf6f2e51e00000000, 0x8fe939fc00000000, + 0xb182fb1300000000, 0xb239ccf800000000, 0x8c520e1700000000, + 0xe988abc100000000, 0xd7e3692e00000000, 0xd4585ec500000000, + 0xea339c2a00000000, 0x932840c800000000, 0xad43822700000000, + 0xaef8b5cc00000000, 0x9093772300000000, 0x1dc87cd200000000, + 0x23a3be3d00000000, 0x201889d600000000, 0x1e734b3900000000, + 0x676897db00000000, 0x5903553400000000, 0x5ab862df00000000, + 0x64d3a03000000000, 0xd10a58a900000000, 0xef619a4600000000, + 0xecdaadad00000000, 0xd2b16f4200000000, 0xabaab3a000000000, + 0x95c1714f00000000, 0x967a46a400000000, 0xa811844b00000000, + 0x254a8fba00000000, 0x1b214d5500000000, 0x189a7abe00000000, + 0x26f1b85100000000, 0x5fea64b300000000, 0x6181a65c00000000, + 0x623a91b700000000, 0x5c51535800000000, 0x398bf68e00000000, + 0x07e0346100000000, 0x045b038a00000000, 0x3a30c16500000000, + 0x432b1d8700000000, 0x7d40df6800000000, 0x7efbe88300000000, + 0x40902a6c00000000, 0xcdcb219d00000000, 0xf3a0e37200000000, + 0xf01bd49900000000, 0xce70167600000000, 0xb76bca9400000000, + 0x8900087b00000000, 0x8abb3f9000000000, 0xb4d0fd7f00000000, + 0xa10ebf7800000000, 0x9f657d9700000000, 0x9cde4a7c00000000, + 0xa2b5889300000000, 0xdbae547100000000, 0xe5c5969e00000000, + 0xe67ea17500000000, 0xd815639a00000000, 0x554e686b00000000, + 0x6b25aa8400000000, 0x689e9d6f00000000, 0x56f55f8000000000, + 0x2fee836200000000, 0x1185418d00000000, 0x123e766600000000, + 0x2c55b48900000000, 0x498f115f00000000, 0x77e4d3b000000000, + 0x745fe45b00000000, 0x4a3426b400000000, 0x332ffa5600000000, + 0x0d4438b900000000, 0x0eff0f5200000000, 0x3094cdbd00000000, + 0xbdcfc64c00000000, 0x83a404a300000000, 0x801f334800000000, + 0xbe74f1a700000000, 0xc76f2d4500000000, 0xf904efaa00000000, + 0xfabfd84100000000, 0xc4d41aae00000000, 0x710de23700000000, + 0x4f6620d800000000, 0x4cdd173300000000, 0x72b6d5dc00000000, + 0x0bad093e00000000, 0x35c6cbd100000000, 0x367dfc3a00000000, + 0x08163ed500000000, 0x854d352400000000, 0xbb26f7cb00000000, + 0xb89dc02000000000, 0x86f602cf00000000, 0xffedde2d00000000, + 0xc1861cc200000000, 0xc23d2b2900000000, 0xfc56e9c600000000, + 0x998c4c1000000000, 0xa7e78eff00000000, 0xa45cb91400000000, + 0x9a377bfb00000000, 0xe32ca71900000000, 0xdd4765f600000000, + 0xdefc521d00000000, 0xe09790f200000000, 0x6dcc9b0300000000, + 0x53a759ec00000000, 0x501c6e0700000000, 0x6e77ace800000000, + 0x176c700a00000000, 0x2907b2e500000000, 0x2abc850e00000000, + 0x14d747e100000000}, + {0x0000000000000000, 0xc0df8ec100000000, 0xc1b96c5800000000, + 0x0166e29900000000, 0x8273d9b000000000, 0x42ac577100000000, + 0x43cab5e800000000, 0x83153b2900000000, 0x45e1c3ba00000000, + 0x853e4d7b00000000, 0x8458afe200000000, 0x4487212300000000, + 0xc7921a0a00000000, 0x074d94cb00000000, 0x062b765200000000, + 0xc6f4f89300000000, 0xcbc4f6ae00000000, 0x0b1b786f00000000, + 0x0a7d9af600000000, 0xcaa2143700000000, 0x49b72f1e00000000, + 0x8968a1df00000000, 0x880e434600000000, 0x48d1cd8700000000, + 0x8e25351400000000, 0x4efabbd500000000, 0x4f9c594c00000000, + 0x8f43d78d00000000, 0x0c56eca400000000, 0xcc89626500000000, + 0xcdef80fc00000000, 0x0d300e3d00000000, 0xd78f9c8600000000, + 0x1750124700000000, 0x1636f0de00000000, 0xd6e97e1f00000000, + 0x55fc453600000000, 0x9523cbf700000000, 0x9445296e00000000, + 0x549aa7af00000000, 0x926e5f3c00000000, 0x52b1d1fd00000000, + 0x53d7336400000000, 0x9308bda500000000, 0x101d868c00000000, + 0xd0c2084d00000000, 0xd1a4ead400000000, 0x117b641500000000, + 0x1c4b6a2800000000, 0xdc94e4e900000000, 0xddf2067000000000, + 0x1d2d88b100000000, 0x9e38b39800000000, 0x5ee73d5900000000, + 0x5f81dfc000000000, 0x9f5e510100000000, 0x59aaa99200000000, + 0x9975275300000000, 0x9813c5ca00000000, 0x58cc4b0b00000000, + 0xdbd9702200000000, 0x1b06fee300000000, 0x1a601c7a00000000, + 0xdabf92bb00000000, 0xef1948d600000000, 0x2fc6c61700000000, + 0x2ea0248e00000000, 0xee7faa4f00000000, 0x6d6a916600000000, + 0xadb51fa700000000, 0xacd3fd3e00000000, 0x6c0c73ff00000000, + 0xaaf88b6c00000000, 0x6a2705ad00000000, 0x6b41e73400000000, + 0xab9e69f500000000, 0x288b52dc00000000, 0xe854dc1d00000000, + 0xe9323e8400000000, 0x29edb04500000000, 0x24ddbe7800000000, + 0xe40230b900000000, 0xe564d22000000000, 0x25bb5ce100000000, + 0xa6ae67c800000000, 0x6671e90900000000, 0x67170b9000000000, + 0xa7c8855100000000, 0x613c7dc200000000, 0xa1e3f30300000000, + 0xa085119a00000000, 0x605a9f5b00000000, 0xe34fa47200000000, + 0x23902ab300000000, 0x22f6c82a00000000, 0xe22946eb00000000, + 0x3896d45000000000, 0xf8495a9100000000, 0xf92fb80800000000, + 0x39f036c900000000, 0xbae50de000000000, 0x7a3a832100000000, + 0x7b5c61b800000000, 0xbb83ef7900000000, 0x7d7717ea00000000, + 0xbda8992b00000000, 0xbcce7bb200000000, 0x7c11f57300000000, + 0xff04ce5a00000000, 0x3fdb409b00000000, 0x3ebda20200000000, + 0xfe622cc300000000, 0xf35222fe00000000, 0x338dac3f00000000, + 0x32eb4ea600000000, 0xf234c06700000000, 0x7121fb4e00000000, + 0xb1fe758f00000000, 0xb098971600000000, 0x704719d700000000, + 0xb6b3e14400000000, 0x766c6f8500000000, 0x770a8d1c00000000, + 0xb7d503dd00000000, 0x34c038f400000000, 0xf41fb63500000000, + 0xf57954ac00000000, 0x35a6da6d00000000, 0x9f35e17700000000, + 0x5fea6fb600000000, 0x5e8c8d2f00000000, 0x9e5303ee00000000, + 0x1d4638c700000000, 0xdd99b60600000000, 0xdcff549f00000000, + 0x1c20da5e00000000, 0xdad422cd00000000, 0x1a0bac0c00000000, + 0x1b6d4e9500000000, 0xdbb2c05400000000, 0x58a7fb7d00000000, + 0x987875bc00000000, 0x991e972500000000, 0x59c119e400000000, + 0x54f117d900000000, 0x942e991800000000, 0x95487b8100000000, + 0x5597f54000000000, 0xd682ce6900000000, 0x165d40a800000000, + 0x173ba23100000000, 0xd7e42cf000000000, 0x1110d46300000000, + 0xd1cf5aa200000000, 0xd0a9b83b00000000, 0x107636fa00000000, + 0x93630dd300000000, 0x53bc831200000000, 0x52da618b00000000, + 0x9205ef4a00000000, 0x48ba7df100000000, 0x8865f33000000000, + 0x890311a900000000, 0x49dc9f6800000000, 0xcac9a44100000000, + 0x0a162a8000000000, 0x0b70c81900000000, 0xcbaf46d800000000, + 0x0d5bbe4b00000000, 0xcd84308a00000000, 0xcce2d21300000000, + 0x0c3d5cd200000000, 0x8f2867fb00000000, 0x4ff7e93a00000000, + 0x4e910ba300000000, 0x8e4e856200000000, 0x837e8b5f00000000, + 0x43a1059e00000000, 0x42c7e70700000000, 0x821869c600000000, + 0x010d52ef00000000, 0xc1d2dc2e00000000, 0xc0b43eb700000000, + 0x006bb07600000000, 0xc69f48e500000000, 0x0640c62400000000, + 0x072624bd00000000, 0xc7f9aa7c00000000, 0x44ec915500000000, + 0x84331f9400000000, 0x8555fd0d00000000, 0x458a73cc00000000, + 0x702ca9a100000000, 0xb0f3276000000000, 0xb195c5f900000000, + 0x714a4b3800000000, 0xf25f701100000000, 0x3280fed000000000, + 0x33e61c4900000000, 0xf339928800000000, 0x35cd6a1b00000000, + 0xf512e4da00000000, 0xf474064300000000, 0x34ab888200000000, + 0xb7beb3ab00000000, 0x77613d6a00000000, 0x7607dff300000000, + 0xb6d8513200000000, 0xbbe85f0f00000000, 0x7b37d1ce00000000, + 0x7a51335700000000, 0xba8ebd9600000000, 0x399b86bf00000000, + 0xf944087e00000000, 0xf822eae700000000, 0x38fd642600000000, + 0xfe099cb500000000, 0x3ed6127400000000, 0x3fb0f0ed00000000, + 0xff6f7e2c00000000, 0x7c7a450500000000, 0xbca5cbc400000000, + 0xbdc3295d00000000, 0x7d1ca79c00000000, 0xa7a3352700000000, + 0x677cbbe600000000, 0x661a597f00000000, 0xa6c5d7be00000000, + 0x25d0ec9700000000, 0xe50f625600000000, 0xe46980cf00000000, + 0x24b60e0e00000000, 0xe242f69d00000000, 0x229d785c00000000, + 0x23fb9ac500000000, 0xe324140400000000, 0x60312f2d00000000, + 0xa0eea1ec00000000, 0xa188437500000000, 0x6157cdb400000000, + 0x6c67c38900000000, 0xacb84d4800000000, 0xaddeafd100000000, + 0x6d01211000000000, 0xee141a3900000000, 0x2ecb94f800000000, + 0x2fad766100000000, 0xef72f8a000000000, 0x2986003300000000, + 0xe9598ef200000000, 0xe83f6c6b00000000, 0x28e0e2aa00000000, + 0xabf5d98300000000, 0x6b2a574200000000, 0x6a4cb5db00000000, + 0xaa933b1a00000000}, + {0x0000000000000000, 0x6f4ca59b00000000, 0x9f9e3bec00000000, + 0xf0d29e7700000000, 0x7f3b060300000000, 0x1077a39800000000, + 0xe0a53def00000000, 0x8fe9987400000000, 0xfe760c0600000000, + 0x913aa99d00000000, 0x61e837ea00000000, 0x0ea4927100000000, + 0x814d0a0500000000, 0xee01af9e00000000, 0x1ed331e900000000, + 0x719f947200000000, 0xfced180c00000000, 0x93a1bd9700000000, + 0x637323e000000000, 0x0c3f867b00000000, 0x83d61e0f00000000, + 0xec9abb9400000000, 0x1c4825e300000000, 0x7304807800000000, + 0x029b140a00000000, 0x6dd7b19100000000, 0x9d052fe600000000, + 0xf2498a7d00000000, 0x7da0120900000000, 0x12ecb79200000000, + 0xe23e29e500000000, 0x8d728c7e00000000, 0xf8db311800000000, + 0x9797948300000000, 0x67450af400000000, 0x0809af6f00000000, + 0x87e0371b00000000, 0xe8ac928000000000, 0x187e0cf700000000, + 0x7732a96c00000000, 0x06ad3d1e00000000, 0x69e1988500000000, + 0x993306f200000000, 0xf67fa36900000000, 0x79963b1d00000000, + 0x16da9e8600000000, 0xe60800f100000000, 0x8944a56a00000000, + 0x0436291400000000, 0x6b7a8c8f00000000, 0x9ba812f800000000, + 0xf4e4b76300000000, 0x7b0d2f1700000000, 0x14418a8c00000000, + 0xe49314fb00000000, 0x8bdfb16000000000, 0xfa40251200000000, + 0x950c808900000000, 0x65de1efe00000000, 0x0a92bb6500000000, + 0x857b231100000000, 0xea37868a00000000, 0x1ae518fd00000000, + 0x75a9bd6600000000, 0xf0b7633000000000, 0x9ffbc6ab00000000, + 0x6f2958dc00000000, 0x0065fd4700000000, 0x8f8c653300000000, + 0xe0c0c0a800000000, 0x10125edf00000000, 0x7f5efb4400000000, + 0x0ec16f3600000000, 0x618dcaad00000000, 0x915f54da00000000, + 0xfe13f14100000000, 0x71fa693500000000, 0x1eb6ccae00000000, + 0xee6452d900000000, 0x8128f74200000000, 0x0c5a7b3c00000000, + 0x6316dea700000000, 0x93c440d000000000, 0xfc88e54b00000000, + 0x73617d3f00000000, 0x1c2dd8a400000000, 0xecff46d300000000, + 0x83b3e34800000000, 0xf22c773a00000000, 0x9d60d2a100000000, + 0x6db24cd600000000, 0x02fee94d00000000, 0x8d17713900000000, + 0xe25bd4a200000000, 0x12894ad500000000, 0x7dc5ef4e00000000, + 0x086c522800000000, 0x6720f7b300000000, 0x97f269c400000000, + 0xf8becc5f00000000, 0x7757542b00000000, 0x181bf1b000000000, + 0xe8c96fc700000000, 0x8785ca5c00000000, 0xf61a5e2e00000000, + 0x9956fbb500000000, 0x698465c200000000, 0x06c8c05900000000, + 0x8921582d00000000, 0xe66dfdb600000000, 0x16bf63c100000000, + 0x79f3c65a00000000, 0xf4814a2400000000, 0x9bcdefbf00000000, + 0x6b1f71c800000000, 0x0453d45300000000, 0x8bba4c2700000000, + 0xe4f6e9bc00000000, 0x142477cb00000000, 0x7b68d25000000000, + 0x0af7462200000000, 0x65bbe3b900000000, 0x95697dce00000000, + 0xfa25d85500000000, 0x75cc402100000000, 0x1a80e5ba00000000, + 0xea527bcd00000000, 0x851ede5600000000, 0xe06fc76000000000, + 0x8f2362fb00000000, 0x7ff1fc8c00000000, 0x10bd591700000000, + 0x9f54c16300000000, 0xf01864f800000000, 0x00cafa8f00000000, + 0x6f865f1400000000, 0x1e19cb6600000000, 0x71556efd00000000, + 0x8187f08a00000000, 0xeecb551100000000, 0x6122cd6500000000, + 0x0e6e68fe00000000, 0xfebcf68900000000, 0x91f0531200000000, + 0x1c82df6c00000000, 0x73ce7af700000000, 0x831ce48000000000, + 0xec50411b00000000, 0x63b9d96f00000000, 0x0cf57cf400000000, + 0xfc27e28300000000, 0x936b471800000000, 0xe2f4d36a00000000, + 0x8db876f100000000, 0x7d6ae88600000000, 0x12264d1d00000000, + 0x9dcfd56900000000, 0xf28370f200000000, 0x0251ee8500000000, + 0x6d1d4b1e00000000, 0x18b4f67800000000, 0x77f853e300000000, + 0x872acd9400000000, 0xe866680f00000000, 0x678ff07b00000000, + 0x08c355e000000000, 0xf811cb9700000000, 0x975d6e0c00000000, + 0xe6c2fa7e00000000, 0x898e5fe500000000, 0x795cc19200000000, + 0x1610640900000000, 0x99f9fc7d00000000, 0xf6b559e600000000, + 0x0667c79100000000, 0x692b620a00000000, 0xe459ee7400000000, + 0x8b154bef00000000, 0x7bc7d59800000000, 0x148b700300000000, + 0x9b62e87700000000, 0xf42e4dec00000000, 0x04fcd39b00000000, + 0x6bb0760000000000, 0x1a2fe27200000000, 0x756347e900000000, + 0x85b1d99e00000000, 0xeafd7c0500000000, 0x6514e47100000000, + 0x0a5841ea00000000, 0xfa8adf9d00000000, 0x95c67a0600000000, + 0x10d8a45000000000, 0x7f9401cb00000000, 0x8f469fbc00000000, + 0xe00a3a2700000000, 0x6fe3a25300000000, 0x00af07c800000000, + 0xf07d99bf00000000, 0x9f313c2400000000, 0xeeaea85600000000, + 0x81e20dcd00000000, 0x713093ba00000000, 0x1e7c362100000000, + 0x9195ae5500000000, 0xfed90bce00000000, 0x0e0b95b900000000, + 0x6147302200000000, 0xec35bc5c00000000, 0x837919c700000000, + 0x73ab87b000000000, 0x1ce7222b00000000, 0x930eba5f00000000, + 0xfc421fc400000000, 0x0c9081b300000000, 0x63dc242800000000, + 0x1243b05a00000000, 0x7d0f15c100000000, 0x8ddd8bb600000000, + 0xe2912e2d00000000, 0x6d78b65900000000, 0x023413c200000000, + 0xf2e68db500000000, 0x9daa282e00000000, 0xe803954800000000, + 0x874f30d300000000, 0x779daea400000000, 0x18d10b3f00000000, + 0x9738934b00000000, 0xf87436d000000000, 0x08a6a8a700000000, + 0x67ea0d3c00000000, 0x1675994e00000000, 0x79393cd500000000, + 0x89eba2a200000000, 0xe6a7073900000000, 0x694e9f4d00000000, + 0x06023ad600000000, 0xf6d0a4a100000000, 0x999c013a00000000, + 0x14ee8d4400000000, 0x7ba228df00000000, 0x8b70b6a800000000, + 0xe43c133300000000, 0x6bd58b4700000000, 0x04992edc00000000, + 0xf44bb0ab00000000, 0x9b07153000000000, 0xea98814200000000, + 0x85d424d900000000, 0x7506baae00000000, 0x1a4a1f3500000000, + 0x95a3874100000000, 0xfaef22da00000000, 0x0a3dbcad00000000, + 0x6571193600000000}, + {0x0000000000000000, 0x85d996dd00000000, 0x4bb55c6000000000, + 0xce6ccabd00000000, 0x966ab9c000000000, 0x13b32f1d00000000, + 0xdddfe5a000000000, 0x5806737d00000000, 0x6dd3035a00000000, + 0xe80a958700000000, 0x26665f3a00000000, 0xa3bfc9e700000000, + 0xfbb9ba9a00000000, 0x7e602c4700000000, 0xb00ce6fa00000000, + 0x35d5702700000000, 0xdaa607b400000000, 0x5f7f916900000000, + 0x91135bd400000000, 0x14cacd0900000000, 0x4cccbe7400000000, + 0xc91528a900000000, 0x0779e21400000000, 0x82a074c900000000, + 0xb77504ee00000000, 0x32ac923300000000, 0xfcc0588e00000000, + 0x7919ce5300000000, 0x211fbd2e00000000, 0xa4c62bf300000000, + 0x6aaae14e00000000, 0xef73779300000000, 0xf54b7eb300000000, + 0x7092e86e00000000, 0xbefe22d300000000, 0x3b27b40e00000000, + 0x6321c77300000000, 0xe6f851ae00000000, 0x28949b1300000000, + 0xad4d0dce00000000, 0x98987de900000000, 0x1d41eb3400000000, + 0xd32d218900000000, 0x56f4b75400000000, 0x0ef2c42900000000, + 0x8b2b52f400000000, 0x4547984900000000, 0xc09e0e9400000000, + 0x2fed790700000000, 0xaa34efda00000000, 0x6458256700000000, + 0xe181b3ba00000000, 0xb987c0c700000000, 0x3c5e561a00000000, + 0xf2329ca700000000, 0x77eb0a7a00000000, 0x423e7a5d00000000, + 0xc7e7ec8000000000, 0x098b263d00000000, 0x8c52b0e000000000, + 0xd454c39d00000000, 0x518d554000000000, 0x9fe19ffd00000000, + 0x1a38092000000000, 0xab918dbd00000000, 0x2e481b6000000000, + 0xe024d1dd00000000, 0x65fd470000000000, 0x3dfb347d00000000, + 0xb822a2a000000000, 0x764e681d00000000, 0xf397fec000000000, + 0xc6428ee700000000, 0x439b183a00000000, 0x8df7d28700000000, + 0x082e445a00000000, 0x5028372700000000, 0xd5f1a1fa00000000, + 0x1b9d6b4700000000, 0x9e44fd9a00000000, 0x71378a0900000000, + 0xf4ee1cd400000000, 0x3a82d66900000000, 0xbf5b40b400000000, + 0xe75d33c900000000, 0x6284a51400000000, 0xace86fa900000000, + 0x2931f97400000000, 0x1ce4895300000000, 0x993d1f8e00000000, + 0x5751d53300000000, 0xd28843ee00000000, 0x8a8e309300000000, + 0x0f57a64e00000000, 0xc13b6cf300000000, 0x44e2fa2e00000000, + 0x5edaf30e00000000, 0xdb0365d300000000, 0x156faf6e00000000, + 0x90b639b300000000, 0xc8b04ace00000000, 0x4d69dc1300000000, + 0x830516ae00000000, 0x06dc807300000000, 0x3309f05400000000, + 0xb6d0668900000000, 0x78bcac3400000000, 0xfd653ae900000000, + 0xa563499400000000, 0x20badf4900000000, 0xeed615f400000000, + 0x6b0f832900000000, 0x847cf4ba00000000, 0x01a5626700000000, + 0xcfc9a8da00000000, 0x4a103e0700000000, 0x12164d7a00000000, + 0x97cfdba700000000, 0x59a3111a00000000, 0xdc7a87c700000000, + 0xe9aff7e000000000, 0x6c76613d00000000, 0xa21aab8000000000, + 0x27c33d5d00000000, 0x7fc54e2000000000, 0xfa1cd8fd00000000, + 0x3470124000000000, 0xb1a9849d00000000, 0x17256aa000000000, + 0x92fcfc7d00000000, 0x5c9036c000000000, 0xd949a01d00000000, + 0x814fd36000000000, 0x049645bd00000000, 0xcafa8f0000000000, + 0x4f2319dd00000000, 0x7af669fa00000000, 0xff2fff2700000000, + 0x3143359a00000000, 0xb49aa34700000000, 0xec9cd03a00000000, + 0x694546e700000000, 0xa7298c5a00000000, 0x22f01a8700000000, + 0xcd836d1400000000, 0x485afbc900000000, 0x8636317400000000, + 0x03efa7a900000000, 0x5be9d4d400000000, 0xde30420900000000, + 0x105c88b400000000, 0x95851e6900000000, 0xa0506e4e00000000, + 0x2589f89300000000, 0xebe5322e00000000, 0x6e3ca4f300000000, + 0x363ad78e00000000, 0xb3e3415300000000, 0x7d8f8bee00000000, + 0xf8561d3300000000, 0xe26e141300000000, 0x67b782ce00000000, + 0xa9db487300000000, 0x2c02deae00000000, 0x7404add300000000, + 0xf1dd3b0e00000000, 0x3fb1f1b300000000, 0xba68676e00000000, + 0x8fbd174900000000, 0x0a64819400000000, 0xc4084b2900000000, + 0x41d1ddf400000000, 0x19d7ae8900000000, 0x9c0e385400000000, + 0x5262f2e900000000, 0xd7bb643400000000, 0x38c813a700000000, + 0xbd11857a00000000, 0x737d4fc700000000, 0xf6a4d91a00000000, + 0xaea2aa6700000000, 0x2b7b3cba00000000, 0xe517f60700000000, + 0x60ce60da00000000, 0x551b10fd00000000, 0xd0c2862000000000, + 0x1eae4c9d00000000, 0x9b77da4000000000, 0xc371a93d00000000, + 0x46a83fe000000000, 0x88c4f55d00000000, 0x0d1d638000000000, + 0xbcb4e71d00000000, 0x396d71c000000000, 0xf701bb7d00000000, + 0x72d82da000000000, 0x2ade5edd00000000, 0xaf07c80000000000, + 0x616b02bd00000000, 0xe4b2946000000000, 0xd167e44700000000, + 0x54be729a00000000, 0x9ad2b82700000000, 0x1f0b2efa00000000, + 0x470d5d8700000000, 0xc2d4cb5a00000000, 0x0cb801e700000000, + 0x8961973a00000000, 0x6612e0a900000000, 0xe3cb767400000000, + 0x2da7bcc900000000, 0xa87e2a1400000000, 0xf078596900000000, + 0x75a1cfb400000000, 0xbbcd050900000000, 0x3e1493d400000000, + 0x0bc1e3f300000000, 0x8e18752e00000000, 0x4074bf9300000000, + 0xc5ad294e00000000, 0x9dab5a3300000000, 0x1872ccee00000000, + 0xd61e065300000000, 0x53c7908e00000000, 0x49ff99ae00000000, + 0xcc260f7300000000, 0x024ac5ce00000000, 0x8793531300000000, + 0xdf95206e00000000, 0x5a4cb6b300000000, 0x94207c0e00000000, + 0x11f9ead300000000, 0x242c9af400000000, 0xa1f50c2900000000, + 0x6f99c69400000000, 0xea40504900000000, 0xb246233400000000, + 0x379fb5e900000000, 0xf9f37f5400000000, 0x7c2ae98900000000, + 0x93599e1a00000000, 0x168008c700000000, 0xd8ecc27a00000000, + 0x5d3554a700000000, 0x053327da00000000, 0x80eab10700000000, + 0x4e867bba00000000, 0xcb5fed6700000000, 0xfe8a9d4000000000, + 0x7b530b9d00000000, 0xb53fc12000000000, 0x30e657fd00000000, + 0x68e0248000000000, 0xed39b25d00000000, 0x235578e000000000, + 0xa68cee3d00000000}, + {0x0000000000000000, 0x76e10f9d00000000, 0xadc46ee100000000, + 0xdb25617c00000000, 0x1b8fac1900000000, 0x6d6ea38400000000, + 0xb64bc2f800000000, 0xc0aacd6500000000, 0x361e593300000000, + 0x40ff56ae00000000, 0x9bda37d200000000, 0xed3b384f00000000, + 0x2d91f52a00000000, 0x5b70fab700000000, 0x80559bcb00000000, + 0xf6b4945600000000, 0x6c3cb26600000000, 0x1addbdfb00000000, + 0xc1f8dc8700000000, 0xb719d31a00000000, 0x77b31e7f00000000, + 0x015211e200000000, 0xda77709e00000000, 0xac967f0300000000, + 0x5a22eb5500000000, 0x2cc3e4c800000000, 0xf7e685b400000000, + 0x81078a2900000000, 0x41ad474c00000000, 0x374c48d100000000, + 0xec6929ad00000000, 0x9a88263000000000, 0xd87864cd00000000, + 0xae996b5000000000, 0x75bc0a2c00000000, 0x035d05b100000000, + 0xc3f7c8d400000000, 0xb516c74900000000, 0x6e33a63500000000, + 0x18d2a9a800000000, 0xee663dfe00000000, 0x9887326300000000, + 0x43a2531f00000000, 0x35435c8200000000, 0xf5e991e700000000, + 0x83089e7a00000000, 0x582dff0600000000, 0x2eccf09b00000000, + 0xb444d6ab00000000, 0xc2a5d93600000000, 0x1980b84a00000000, + 0x6f61b7d700000000, 0xafcb7ab200000000, 0xd92a752f00000000, + 0x020f145300000000, 0x74ee1bce00000000, 0x825a8f9800000000, + 0xf4bb800500000000, 0x2f9ee17900000000, 0x597feee400000000, + 0x99d5238100000000, 0xef342c1c00000000, 0x34114d6000000000, + 0x42f042fd00000000, 0xf1f7b94100000000, 0x8716b6dc00000000, + 0x5c33d7a000000000, 0x2ad2d83d00000000, 0xea78155800000000, + 0x9c991ac500000000, 0x47bc7bb900000000, 0x315d742400000000, + 0xc7e9e07200000000, 0xb108efef00000000, 0x6a2d8e9300000000, + 0x1ccc810e00000000, 0xdc664c6b00000000, 0xaa8743f600000000, + 0x71a2228a00000000, 0x07432d1700000000, 0x9dcb0b2700000000, + 0xeb2a04ba00000000, 0x300f65c600000000, 0x46ee6a5b00000000, + 0x8644a73e00000000, 0xf0a5a8a300000000, 0x2b80c9df00000000, + 0x5d61c64200000000, 0xabd5521400000000, 0xdd345d8900000000, + 0x06113cf500000000, 0x70f0336800000000, 0xb05afe0d00000000, + 0xc6bbf19000000000, 0x1d9e90ec00000000, 0x6b7f9f7100000000, + 0x298fdd8c00000000, 0x5f6ed21100000000, 0x844bb36d00000000, + 0xf2aabcf000000000, 0x3200719500000000, 0x44e17e0800000000, + 0x9fc41f7400000000, 0xe92510e900000000, 0x1f9184bf00000000, + 0x69708b2200000000, 0xb255ea5e00000000, 0xc4b4e5c300000000, + 0x041e28a600000000, 0x72ff273b00000000, 0xa9da464700000000, + 0xdf3b49da00000000, 0x45b36fea00000000, 0x3352607700000000, + 0xe877010b00000000, 0x9e960e9600000000, 0x5e3cc3f300000000, + 0x28ddcc6e00000000, 0xf3f8ad1200000000, 0x8519a28f00000000, + 0x73ad36d900000000, 0x054c394400000000, 0xde69583800000000, + 0xa88857a500000000, 0x68229ac000000000, 0x1ec3955d00000000, + 0xc5e6f42100000000, 0xb307fbbc00000000, 0xe2ef738300000000, + 0x940e7c1e00000000, 0x4f2b1d6200000000, 0x39ca12ff00000000, + 0xf960df9a00000000, 0x8f81d00700000000, 0x54a4b17b00000000, + 0x2245bee600000000, 0xd4f12ab000000000, 0xa210252d00000000, + 0x7935445100000000, 0x0fd44bcc00000000, 0xcf7e86a900000000, + 0xb99f893400000000, 0x62bae84800000000, 0x145be7d500000000, + 0x8ed3c1e500000000, 0xf832ce7800000000, 0x2317af0400000000, + 0x55f6a09900000000, 0x955c6dfc00000000, 0xe3bd626100000000, + 0x3898031d00000000, 0x4e790c8000000000, 0xb8cd98d600000000, + 0xce2c974b00000000, 0x1509f63700000000, 0x63e8f9aa00000000, + 0xa34234cf00000000, 0xd5a33b5200000000, 0x0e865a2e00000000, + 0x786755b300000000, 0x3a97174e00000000, 0x4c7618d300000000, + 0x975379af00000000, 0xe1b2763200000000, 0x2118bb5700000000, + 0x57f9b4ca00000000, 0x8cdcd5b600000000, 0xfa3dda2b00000000, + 0x0c894e7d00000000, 0x7a6841e000000000, 0xa14d209c00000000, + 0xd7ac2f0100000000, 0x1706e26400000000, 0x61e7edf900000000, + 0xbac28c8500000000, 0xcc23831800000000, 0x56aba52800000000, + 0x204aaab500000000, 0xfb6fcbc900000000, 0x8d8ec45400000000, + 0x4d24093100000000, 0x3bc506ac00000000, 0xe0e067d000000000, + 0x9601684d00000000, 0x60b5fc1b00000000, 0x1654f38600000000, + 0xcd7192fa00000000, 0xbb909d6700000000, 0x7b3a500200000000, + 0x0ddb5f9f00000000, 0xd6fe3ee300000000, 0xa01f317e00000000, + 0x1318cac200000000, 0x65f9c55f00000000, 0xbedca42300000000, + 0xc83dabbe00000000, 0x089766db00000000, 0x7e76694600000000, + 0xa553083a00000000, 0xd3b207a700000000, 0x250693f100000000, + 0x53e79c6c00000000, 0x88c2fd1000000000, 0xfe23f28d00000000, + 0x3e893fe800000000, 0x4868307500000000, 0x934d510900000000, + 0xe5ac5e9400000000, 0x7f2478a400000000, 0x09c5773900000000, + 0xd2e0164500000000, 0xa40119d800000000, 0x64abd4bd00000000, + 0x124adb2000000000, 0xc96fba5c00000000, 0xbf8eb5c100000000, + 0x493a219700000000, 0x3fdb2e0a00000000, 0xe4fe4f7600000000, + 0x921f40eb00000000, 0x52b58d8e00000000, 0x2454821300000000, + 0xff71e36f00000000, 0x8990ecf200000000, 0xcb60ae0f00000000, + 0xbd81a19200000000, 0x66a4c0ee00000000, 0x1045cf7300000000, + 0xd0ef021600000000, 0xa60e0d8b00000000, 0x7d2b6cf700000000, + 0x0bca636a00000000, 0xfd7ef73c00000000, 0x8b9ff8a100000000, + 0x50ba99dd00000000, 0x265b964000000000, 0xe6f15b2500000000, + 0x901054b800000000, 0x4b3535c400000000, 0x3dd43a5900000000, + 0xa75c1c6900000000, 0xd1bd13f400000000, 0x0a98728800000000, + 0x7c797d1500000000, 0xbcd3b07000000000, 0xca32bfed00000000, + 0x1117de9100000000, 0x67f6d10c00000000, 0x9142455a00000000, + 0xe7a34ac700000000, 0x3c862bbb00000000, 0x4a67242600000000, + 0x8acde94300000000, 0xfc2ce6de00000000, 0x270987a200000000, + 0x51e8883f00000000}, + {0x0000000000000000, 0xe8dbfbb900000000, 0x91b186a800000000, + 0x796a7d1100000000, 0x63657c8a00000000, 0x8bbe873300000000, + 0xf2d4fa2200000000, 0x1a0f019b00000000, 0x87cc89cf00000000, + 0x6f17727600000000, 0x167d0f6700000000, 0xfea6f4de00000000, + 0xe4a9f54500000000, 0x0c720efc00000000, 0x751873ed00000000, + 0x9dc3885400000000, 0x4f9f624400000000, 0xa74499fd00000000, + 0xde2ee4ec00000000, 0x36f51f5500000000, 0x2cfa1ece00000000, + 0xc421e57700000000, 0xbd4b986600000000, 0x559063df00000000, + 0xc853eb8b00000000, 0x2088103200000000, 0x59e26d2300000000, + 0xb139969a00000000, 0xab36970100000000, 0x43ed6cb800000000, + 0x3a8711a900000000, 0xd25cea1000000000, 0x9e3ec58800000000, + 0x76e53e3100000000, 0x0f8f432000000000, 0xe754b89900000000, + 0xfd5bb90200000000, 0x158042bb00000000, 0x6cea3faa00000000, + 0x8431c41300000000, 0x19f24c4700000000, 0xf129b7fe00000000, + 0x8843caef00000000, 0x6098315600000000, 0x7a9730cd00000000, + 0x924ccb7400000000, 0xeb26b66500000000, 0x03fd4ddc00000000, + 0xd1a1a7cc00000000, 0x397a5c7500000000, 0x4010216400000000, + 0xa8cbdadd00000000, 0xb2c4db4600000000, 0x5a1f20ff00000000, + 0x23755dee00000000, 0xcbaea65700000000, 0x566d2e0300000000, + 0xbeb6d5ba00000000, 0xc7dca8ab00000000, 0x2f07531200000000, + 0x3508528900000000, 0xddd3a93000000000, 0xa4b9d42100000000, + 0x4c622f9800000000, 0x7d7bfbca00000000, 0x95a0007300000000, + 0xecca7d6200000000, 0x041186db00000000, 0x1e1e874000000000, + 0xf6c57cf900000000, 0x8faf01e800000000, 0x6774fa5100000000, + 0xfab7720500000000, 0x126c89bc00000000, 0x6b06f4ad00000000, + 0x83dd0f1400000000, 0x99d20e8f00000000, 0x7109f53600000000, + 0x0863882700000000, 0xe0b8739e00000000, 0x32e4998e00000000, + 0xda3f623700000000, 0xa3551f2600000000, 0x4b8ee49f00000000, + 0x5181e50400000000, 0xb95a1ebd00000000, 0xc03063ac00000000, + 0x28eb981500000000, 0xb528104100000000, 0x5df3ebf800000000, + 0x249996e900000000, 0xcc426d5000000000, 0xd64d6ccb00000000, + 0x3e96977200000000, 0x47fcea6300000000, 0xaf2711da00000000, + 0xe3453e4200000000, 0x0b9ec5fb00000000, 0x72f4b8ea00000000, + 0x9a2f435300000000, 0x802042c800000000, 0x68fbb97100000000, + 0x1191c46000000000, 0xf94a3fd900000000, 0x6489b78d00000000, + 0x8c524c3400000000, 0xf538312500000000, 0x1de3ca9c00000000, + 0x07eccb0700000000, 0xef3730be00000000, 0x965d4daf00000000, + 0x7e86b61600000000, 0xacda5c0600000000, 0x4401a7bf00000000, + 0x3d6bdaae00000000, 0xd5b0211700000000, 0xcfbf208c00000000, + 0x2764db3500000000, 0x5e0ea62400000000, 0xb6d55d9d00000000, + 0x2b16d5c900000000, 0xc3cd2e7000000000, 0xbaa7536100000000, + 0x527ca8d800000000, 0x4873a94300000000, 0xa0a852fa00000000, + 0xd9c22feb00000000, 0x3119d45200000000, 0xbbf0874e00000000, + 0x532b7cf700000000, 0x2a4101e600000000, 0xc29afa5f00000000, + 0xd895fbc400000000, 0x304e007d00000000, 0x49247d6c00000000, + 0xa1ff86d500000000, 0x3c3c0e8100000000, 0xd4e7f53800000000, + 0xad8d882900000000, 0x4556739000000000, 0x5f59720b00000000, + 0xb78289b200000000, 0xcee8f4a300000000, 0x26330f1a00000000, + 0xf46fe50a00000000, 0x1cb41eb300000000, 0x65de63a200000000, + 0x8d05981b00000000, 0x970a998000000000, 0x7fd1623900000000, + 0x06bb1f2800000000, 0xee60e49100000000, 0x73a36cc500000000, + 0x9b78977c00000000, 0xe212ea6d00000000, 0x0ac911d400000000, + 0x10c6104f00000000, 0xf81debf600000000, 0x817796e700000000, + 0x69ac6d5e00000000, 0x25ce42c600000000, 0xcd15b97f00000000, + 0xb47fc46e00000000, 0x5ca43fd700000000, 0x46ab3e4c00000000, + 0xae70c5f500000000, 0xd71ab8e400000000, 0x3fc1435d00000000, + 0xa202cb0900000000, 0x4ad930b000000000, 0x33b34da100000000, + 0xdb68b61800000000, 0xc167b78300000000, 0x29bc4c3a00000000, + 0x50d6312b00000000, 0xb80dca9200000000, 0x6a51208200000000, + 0x828adb3b00000000, 0xfbe0a62a00000000, 0x133b5d9300000000, + 0x09345c0800000000, 0xe1efa7b100000000, 0x9885daa000000000, + 0x705e211900000000, 0xed9da94d00000000, 0x054652f400000000, + 0x7c2c2fe500000000, 0x94f7d45c00000000, 0x8ef8d5c700000000, + 0x66232e7e00000000, 0x1f49536f00000000, 0xf792a8d600000000, + 0xc68b7c8400000000, 0x2e50873d00000000, 0x573afa2c00000000, + 0xbfe1019500000000, 0xa5ee000e00000000, 0x4d35fbb700000000, + 0x345f86a600000000, 0xdc847d1f00000000, 0x4147f54b00000000, + 0xa99c0ef200000000, 0xd0f673e300000000, 0x382d885a00000000, + 0x222289c100000000, 0xcaf9727800000000, 0xb3930f6900000000, + 0x5b48f4d000000000, 0x89141ec000000000, 0x61cfe57900000000, + 0x18a5986800000000, 0xf07e63d100000000, 0xea71624a00000000, + 0x02aa99f300000000, 0x7bc0e4e200000000, 0x931b1f5b00000000, + 0x0ed8970f00000000, 0xe6036cb600000000, 0x9f6911a700000000, + 0x77b2ea1e00000000, 0x6dbdeb8500000000, 0x8566103c00000000, + 0xfc0c6d2d00000000, 0x14d7969400000000, 0x58b5b90c00000000, + 0xb06e42b500000000, 0xc9043fa400000000, 0x21dfc41d00000000, + 0x3bd0c58600000000, 0xd30b3e3f00000000, 0xaa61432e00000000, + 0x42bab89700000000, 0xdf7930c300000000, 0x37a2cb7a00000000, + 0x4ec8b66b00000000, 0xa6134dd200000000, 0xbc1c4c4900000000, + 0x54c7b7f000000000, 0x2dadcae100000000, 0xc576315800000000, + 0x172adb4800000000, 0xfff120f100000000, 0x869b5de000000000, + 0x6e40a65900000000, 0x744fa7c200000000, 0x9c945c7b00000000, + 0xe5fe216a00000000, 0x0d25dad300000000, 0x90e6528700000000, + 0x783da93e00000000, 0x0157d42f00000000, 0xe98c2f9600000000, + 0xf3832e0d00000000, 0x1b58d5b400000000, 0x6232a8a500000000, + 0x8ae9531c00000000}, + {0x0000000000000000, 0x919168ae00000000, 0x6325a08700000000, + 0xf2b4c82900000000, 0x874c31d400000000, 0x16dd597a00000000, + 0xe469915300000000, 0x75f8f9fd00000000, 0x4f9f137300000000, + 0xde0e7bdd00000000, 0x2cbab3f400000000, 0xbd2bdb5a00000000, + 0xc8d322a700000000, 0x59424a0900000000, 0xabf6822000000000, + 0x3a67ea8e00000000, 0x9e3e27e600000000, 0x0faf4f4800000000, + 0xfd1b876100000000, 0x6c8aefcf00000000, 0x1972163200000000, + 0x88e37e9c00000000, 0x7a57b6b500000000, 0xebc6de1b00000000, + 0xd1a1349500000000, 0x40305c3b00000000, 0xb284941200000000, + 0x2315fcbc00000000, 0x56ed054100000000, 0xc77c6def00000000, + 0x35c8a5c600000000, 0xa459cd6800000000, 0x7d7b3f1700000000, + 0xecea57b900000000, 0x1e5e9f9000000000, 0x8fcff73e00000000, + 0xfa370ec300000000, 0x6ba6666d00000000, 0x9912ae4400000000, + 0x0883c6ea00000000, 0x32e42c6400000000, 0xa37544ca00000000, + 0x51c18ce300000000, 0xc050e44d00000000, 0xb5a81db000000000, + 0x2439751e00000000, 0xd68dbd3700000000, 0x471cd59900000000, + 0xe34518f100000000, 0x72d4705f00000000, 0x8060b87600000000, + 0x11f1d0d800000000, 0x6409292500000000, 0xf598418b00000000, + 0x072c89a200000000, 0x96bde10c00000000, 0xacda0b8200000000, + 0x3d4b632c00000000, 0xcfffab0500000000, 0x5e6ec3ab00000000, + 0x2b963a5600000000, 0xba0752f800000000, 0x48b39ad100000000, + 0xd922f27f00000000, 0xfaf67e2e00000000, 0x6b67168000000000, + 0x99d3dea900000000, 0x0842b60700000000, 0x7dba4ffa00000000, + 0xec2b275400000000, 0x1e9fef7d00000000, 0x8f0e87d300000000, + 0xb5696d5d00000000, 0x24f805f300000000, 0xd64ccdda00000000, + 0x47dda57400000000, 0x32255c8900000000, 0xa3b4342700000000, + 0x5100fc0e00000000, 0xc09194a000000000, 0x64c859c800000000, + 0xf559316600000000, 0x07edf94f00000000, 0x967c91e100000000, + 0xe384681c00000000, 0x721500b200000000, 0x80a1c89b00000000, + 0x1130a03500000000, 0x2b574abb00000000, 0xbac6221500000000, + 0x4872ea3c00000000, 0xd9e3829200000000, 0xac1b7b6f00000000, + 0x3d8a13c100000000, 0xcf3edbe800000000, 0x5eafb34600000000, + 0x878d413900000000, 0x161c299700000000, 0xe4a8e1be00000000, + 0x7539891000000000, 0x00c170ed00000000, 0x9150184300000000, + 0x63e4d06a00000000, 0xf275b8c400000000, 0xc812524a00000000, + 0x59833ae400000000, 0xab37f2cd00000000, 0x3aa69a6300000000, + 0x4f5e639e00000000, 0xdecf0b3000000000, 0x2c7bc31900000000, + 0xbdeaabb700000000, 0x19b366df00000000, 0x88220e7100000000, + 0x7a96c65800000000, 0xeb07aef600000000, 0x9eff570b00000000, + 0x0f6e3fa500000000, 0xfddaf78c00000000, 0x6c4b9f2200000000, + 0x562c75ac00000000, 0xc7bd1d0200000000, 0x3509d52b00000000, + 0xa498bd8500000000, 0xd160447800000000, 0x40f12cd600000000, + 0xb245e4ff00000000, 0x23d48c5100000000, 0xf4edfd5c00000000, + 0x657c95f200000000, 0x97c85ddb00000000, 0x0659357500000000, + 0x73a1cc8800000000, 0xe230a42600000000, 0x10846c0f00000000, + 0x811504a100000000, 0xbb72ee2f00000000, 0x2ae3868100000000, + 0xd8574ea800000000, 0x49c6260600000000, 0x3c3edffb00000000, + 0xadafb75500000000, 0x5f1b7f7c00000000, 0xce8a17d200000000, + 0x6ad3daba00000000, 0xfb42b21400000000, 0x09f67a3d00000000, + 0x9867129300000000, 0xed9feb6e00000000, 0x7c0e83c000000000, + 0x8eba4be900000000, 0x1f2b234700000000, 0x254cc9c900000000, + 0xb4dda16700000000, 0x4669694e00000000, 0xd7f801e000000000, + 0xa200f81d00000000, 0x339190b300000000, 0xc125589a00000000, + 0x50b4303400000000, 0x8996c24b00000000, 0x1807aae500000000, + 0xeab362cc00000000, 0x7b220a6200000000, 0x0edaf39f00000000, + 0x9f4b9b3100000000, 0x6dff531800000000, 0xfc6e3bb600000000, + 0xc609d13800000000, 0x5798b99600000000, 0xa52c71bf00000000, + 0x34bd191100000000, 0x4145e0ec00000000, 0xd0d4884200000000, + 0x2260406b00000000, 0xb3f128c500000000, 0x17a8e5ad00000000, + 0x86398d0300000000, 0x748d452a00000000, 0xe51c2d8400000000, + 0x90e4d47900000000, 0x0175bcd700000000, 0xf3c174fe00000000, + 0x62501c5000000000, 0x5837f6de00000000, 0xc9a69e7000000000, + 0x3b12565900000000, 0xaa833ef700000000, 0xdf7bc70a00000000, + 0x4eeaafa400000000, 0xbc5e678d00000000, 0x2dcf0f2300000000, + 0x0e1b837200000000, 0x9f8aebdc00000000, 0x6d3e23f500000000, + 0xfcaf4b5b00000000, 0x8957b2a600000000, 0x18c6da0800000000, + 0xea72122100000000, 0x7be37a8f00000000, 0x4184900100000000, + 0xd015f8af00000000, 0x22a1308600000000, 0xb330582800000000, + 0xc6c8a1d500000000, 0x5759c97b00000000, 0xa5ed015200000000, + 0x347c69fc00000000, 0x9025a49400000000, 0x01b4cc3a00000000, + 0xf300041300000000, 0x62916cbd00000000, 0x1769954000000000, + 0x86f8fdee00000000, 0x744c35c700000000, 0xe5dd5d6900000000, + 0xdfbab7e700000000, 0x4e2bdf4900000000, 0xbc9f176000000000, + 0x2d0e7fce00000000, 0x58f6863300000000, 0xc967ee9d00000000, + 0x3bd326b400000000, 0xaa424e1a00000000, 0x7360bc6500000000, + 0xe2f1d4cb00000000, 0x10451ce200000000, 0x81d4744c00000000, + 0xf42c8db100000000, 0x65bde51f00000000, 0x97092d3600000000, + 0x0698459800000000, 0x3cffaf1600000000, 0xad6ec7b800000000, + 0x5fda0f9100000000, 0xce4b673f00000000, 0xbbb39ec200000000, + 0x2a22f66c00000000, 0xd8963e4500000000, 0x490756eb00000000, + 0xed5e9b8300000000, 0x7ccff32d00000000, 0x8e7b3b0400000000, + 0x1fea53aa00000000, 0x6a12aa5700000000, 0xfb83c2f900000000, + 0x09370ad000000000, 0x98a6627e00000000, 0xa2c188f000000000, + 0x3350e05e00000000, 0xc1e4287700000000, 0x507540d900000000, + 0x258db92400000000, 0xb41cd18a00000000, 0x46a819a300000000, + 0xd739710d00000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa, + 0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b, + 0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232, + 0xd92012ac, 0x7cbb312b, 0xb01131b5, 0x3e9e3656, 0xf23436c8, + 0xf8f13fd1, 0x345b3f4f, 0xbad438ac, 0x767e3832, 0xaf5e2a9e, + 0x63f42a00, 0xed7b2de3, 0x21d12d7d, 0x2b142464, 0xe7be24fa, + 0x69312319, 0xa59b2387, 0xf9766256, 0x35dc62c8, 0xbb53652b, + 0x77f965b5, 0x7d3c6cac, 0xb1966c32, 0x3f196bd1, 0xf3b36b4f, + 0x2a9379e3, 0xe639797d, 0x68b67e9e, 0xa41c7e00, 0xaed97719, + 0x62737787, 0xecfc7064, 0x205670fa, 0x85cd537d, 0x496753e3, + 0xc7e85400, 0x0b42549e, 0x01875d87, 0xcd2d5d19, 0x43a25afa, + 0x8f085a64, 0x562848c8, 0x9a824856, 0x140d4fb5, 0xd8a74f2b, + 0xd2624632, 0x1ec846ac, 0x9047414f, 0x5ced41d1, 0x299dc2ed, + 0xe537c273, 0x6bb8c590, 0xa712c50e, 0xadd7cc17, 0x617dcc89, + 0xeff2cb6a, 0x2358cbf4, 0xfa78d958, 0x36d2d9c6, 0xb85dde25, + 0x74f7debb, 0x7e32d7a2, 0xb298d73c, 0x3c17d0df, 0xf0bdd041, + 0x5526f3c6, 0x998cf358, 0x1703f4bb, 0xdba9f425, 0xd16cfd3c, + 0x1dc6fda2, 0x9349fa41, 0x5fe3fadf, 0x86c3e873, 0x4a69e8ed, + 0xc4e6ef0e, 0x084cef90, 0x0289e689, 0xce23e617, 0x40ace1f4, + 0x8c06e16a, 0xd0eba0bb, 0x1c41a025, 0x92cea7c6, 0x5e64a758, + 0x54a1ae41, 0x980baedf, 0x1684a93c, 0xda2ea9a2, 0x030ebb0e, + 0xcfa4bb90, 0x412bbc73, 0x8d81bced, 0x8744b5f4, 0x4beeb56a, + 0xc561b289, 0x09cbb217, 0xac509190, 0x60fa910e, 0xee7596ed, + 0x22df9673, 0x281a9f6a, 0xe4b09ff4, 0x6a3f9817, 0xa6959889, + 0x7fb58a25, 0xb31f8abb, 0x3d908d58, 0xf13a8dc6, 0xfbff84df, + 0x37558441, 0xb9da83a2, 0x7570833c, 0x533b85da, 0x9f918544, + 0x111e82a7, 0xddb48239, 0xd7718b20, 0x1bdb8bbe, 0x95548c5d, + 0x59fe8cc3, 0x80de9e6f, 0x4c749ef1, 0xc2fb9912, 0x0e51998c, + 0x04949095, 0xc83e900b, 0x46b197e8, 0x8a1b9776, 0x2f80b4f1, + 0xe32ab46f, 0x6da5b38c, 0xa10fb312, 0xabcaba0b, 0x6760ba95, + 0xe9efbd76, 0x2545bde8, 0xfc65af44, 0x30cfafda, 0xbe40a839, + 0x72eaa8a7, 0x782fa1be, 0xb485a120, 0x3a0aa6c3, 0xf6a0a65d, + 0xaa4de78c, 0x66e7e712, 0xe868e0f1, 0x24c2e06f, 0x2e07e976, + 0xe2ade9e8, 0x6c22ee0b, 0xa088ee95, 0x79a8fc39, 0xb502fca7, + 0x3b8dfb44, 0xf727fbda, 0xfde2f2c3, 0x3148f25d, 0xbfc7f5be, + 0x736df520, 0xd6f6d6a7, 0x1a5cd639, 0x94d3d1da, 0x5879d144, + 0x52bcd85d, 0x9e16d8c3, 0x1099df20, 0xdc33dfbe, 0x0513cd12, + 0xc9b9cd8c, 0x4736ca6f, 0x8b9ccaf1, 0x8159c3e8, 0x4df3c376, + 0xc37cc495, 0x0fd6c40b, 0x7aa64737, 0xb60c47a9, 0x3883404a, + 0xf42940d4, 0xfeec49cd, 0x32464953, 0xbcc94eb0, 0x70634e2e, + 0xa9435c82, 0x65e95c1c, 0xeb665bff, 0x27cc5b61, 0x2d095278, + 0xe1a352e6, 0x6f2c5505, 0xa386559b, 0x061d761c, 0xcab77682, + 0x44387161, 0x889271ff, 0x825778e6, 0x4efd7878, 0xc0727f9b, + 0x0cd87f05, 0xd5f86da9, 0x19526d37, 0x97dd6ad4, 0x5b776a4a, + 0x51b26353, 0x9d1863cd, 0x1397642e, 0xdf3d64b0, 0x83d02561, + 0x4f7a25ff, 0xc1f5221c, 0x0d5f2282, 0x079a2b9b, 0xcb302b05, + 0x45bf2ce6, 0x89152c78, 0x50353ed4, 0x9c9f3e4a, 0x121039a9, + 0xdeba3937, 0xd47f302e, 0x18d530b0, 0x965a3753, 0x5af037cd, + 0xff6b144a, 0x33c114d4, 0xbd4e1337, 0x71e413a9, 0x7b211ab0, + 0xb78b1a2e, 0x39041dcd, 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, + 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, + 0x264b06e6}, + {0x00000000, 0xa6770bb4, 0x979f1129, 0x31e81a9d, 0xf44f2413, + 0x52382fa7, 0x63d0353a, 0xc5a73e8e, 0x33ef4e67, 0x959845d3, + 0xa4705f4e, 0x020754fa, 0xc7a06a74, 0x61d761c0, 0x503f7b5d, + 0xf64870e9, 0x67de9cce, 0xc1a9977a, 0xf0418de7, 0x56368653, + 0x9391b8dd, 0x35e6b369, 0x040ea9f4, 0xa279a240, 0x5431d2a9, + 0xf246d91d, 0xc3aec380, 0x65d9c834, 0xa07ef6ba, 0x0609fd0e, + 0x37e1e793, 0x9196ec27, 0xcfbd399c, 0x69ca3228, 0x582228b5, + 0xfe552301, 0x3bf21d8f, 0x9d85163b, 0xac6d0ca6, 0x0a1a0712, + 0xfc5277fb, 0x5a257c4f, 0x6bcd66d2, 0xcdba6d66, 0x081d53e8, + 0xae6a585c, 0x9f8242c1, 0x39f54975, 0xa863a552, 0x0e14aee6, + 0x3ffcb47b, 0x998bbfcf, 0x5c2c8141, 0xfa5b8af5, 0xcbb39068, + 0x6dc49bdc, 0x9b8ceb35, 0x3dfbe081, 0x0c13fa1c, 0xaa64f1a8, + 0x6fc3cf26, 0xc9b4c492, 0xf85cde0f, 0x5e2bd5bb, 0x440b7579, + 0xe27c7ecd, 0xd3946450, 0x75e36fe4, 0xb044516a, 0x16335ade, + 0x27db4043, 0x81ac4bf7, 0x77e43b1e, 0xd19330aa, 0xe07b2a37, + 0x460c2183, 0x83ab1f0d, 0x25dc14b9, 0x14340e24, 0xb2430590, + 0x23d5e9b7, 0x85a2e203, 0xb44af89e, 0x123df32a, 0xd79acda4, + 0x71edc610, 0x4005dc8d, 0xe672d739, 0x103aa7d0, 0xb64dac64, + 0x87a5b6f9, 0x21d2bd4d, 0xe47583c3, 0x42028877, 0x73ea92ea, + 0xd59d995e, 0x8bb64ce5, 0x2dc14751, 0x1c295dcc, 0xba5e5678, + 0x7ff968f6, 0xd98e6342, 0xe86679df, 0x4e11726b, 0xb8590282, + 0x1e2e0936, 0x2fc613ab, 0x89b1181f, 0x4c162691, 0xea612d25, + 0xdb8937b8, 0x7dfe3c0c, 0xec68d02b, 0x4a1fdb9f, 0x7bf7c102, + 0xdd80cab6, 0x1827f438, 0xbe50ff8c, 0x8fb8e511, 0x29cfeea5, + 0xdf879e4c, 0x79f095f8, 0x48188f65, 0xee6f84d1, 0x2bc8ba5f, + 0x8dbfb1eb, 0xbc57ab76, 0x1a20a0c2, 0x8816eaf2, 0x2e61e146, + 0x1f89fbdb, 0xb9fef06f, 0x7c59cee1, 0xda2ec555, 0xebc6dfc8, + 0x4db1d47c, 0xbbf9a495, 0x1d8eaf21, 0x2c66b5bc, 0x8a11be08, + 0x4fb68086, 0xe9c18b32, 0xd82991af, 0x7e5e9a1b, 0xefc8763c, + 0x49bf7d88, 0x78576715, 0xde206ca1, 0x1b87522f, 0xbdf0599b, + 0x8c184306, 0x2a6f48b2, 0xdc27385b, 0x7a5033ef, 0x4bb82972, + 0xedcf22c6, 0x28681c48, 0x8e1f17fc, 0xbff70d61, 0x198006d5, + 0x47abd36e, 0xe1dcd8da, 0xd034c247, 0x7643c9f3, 0xb3e4f77d, + 0x1593fcc9, 0x247be654, 0x820cede0, 0x74449d09, 0xd23396bd, + 0xe3db8c20, 0x45ac8794, 0x800bb91a, 0x267cb2ae, 0x1794a833, + 0xb1e3a387, 0x20754fa0, 0x86024414, 0xb7ea5e89, 0x119d553d, + 0xd43a6bb3, 0x724d6007, 0x43a57a9a, 0xe5d2712e, 0x139a01c7, + 0xb5ed0a73, 0x840510ee, 0x22721b5a, 0xe7d525d4, 0x41a22e60, + 0x704a34fd, 0xd63d3f49, 0xcc1d9f8b, 0x6a6a943f, 0x5b828ea2, + 0xfdf58516, 0x3852bb98, 0x9e25b02c, 0xafcdaab1, 0x09baa105, + 0xfff2d1ec, 0x5985da58, 0x686dc0c5, 0xce1acb71, 0x0bbdf5ff, + 0xadcafe4b, 0x9c22e4d6, 0x3a55ef62, 0xabc30345, 0x0db408f1, + 0x3c5c126c, 0x9a2b19d8, 0x5f8c2756, 0xf9fb2ce2, 0xc813367f, + 0x6e643dcb, 0x982c4d22, 0x3e5b4696, 0x0fb35c0b, 0xa9c457bf, + 0x6c636931, 0xca146285, 0xfbfc7818, 0x5d8b73ac, 0x03a0a617, + 0xa5d7ada3, 0x943fb73e, 0x3248bc8a, 0xf7ef8204, 0x519889b0, + 0x6070932d, 0xc6079899, 0x304fe870, 0x9638e3c4, 0xa7d0f959, + 0x01a7f2ed, 0xc400cc63, 0x6277c7d7, 0x539fdd4a, 0xf5e8d6fe, + 0x647e3ad9, 0xc209316d, 0xf3e12bf0, 0x55962044, 0x90311eca, + 0x3646157e, 0x07ae0fe3, 0xa1d90457, 0x579174be, 0xf1e67f0a, + 0xc00e6597, 0x66796e23, 0xa3de50ad, 0x05a95b19, 0x34414184, + 0x92364a30}, + {0x00000000, 0xcb5cd3a5, 0x4dc8a10b, 0x869472ae, 0x9b914216, + 0x50cd91b3, 0xd659e31d, 0x1d0530b8, 0xec53826d, 0x270f51c8, + 0xa19b2366, 0x6ac7f0c3, 0x77c2c07b, 0xbc9e13de, 0x3a0a6170, + 0xf156b2d5, 0x03d6029b, 0xc88ad13e, 0x4e1ea390, 0x85427035, + 0x9847408d, 0x531b9328, 0xd58fe186, 0x1ed33223, 0xef8580f6, + 0x24d95353, 0xa24d21fd, 0x6911f258, 0x7414c2e0, 0xbf481145, + 0x39dc63eb, 0xf280b04e, 0x07ac0536, 0xccf0d693, 0x4a64a43d, + 0x81387798, 0x9c3d4720, 0x57619485, 0xd1f5e62b, 0x1aa9358e, + 0xebff875b, 0x20a354fe, 0xa6372650, 0x6d6bf5f5, 0x706ec54d, + 0xbb3216e8, 0x3da66446, 0xf6fab7e3, 0x047a07ad, 0xcf26d408, + 0x49b2a6a6, 0x82ee7503, 0x9feb45bb, 0x54b7961e, 0xd223e4b0, + 0x197f3715, 0xe82985c0, 0x23755665, 0xa5e124cb, 0x6ebdf76e, + 0x73b8c7d6, 0xb8e41473, 0x3e7066dd, 0xf52cb578, 0x0f580a6c, + 0xc404d9c9, 0x4290ab67, 0x89cc78c2, 0x94c9487a, 0x5f959bdf, + 0xd901e971, 0x125d3ad4, 0xe30b8801, 0x28575ba4, 0xaec3290a, + 0x659ffaaf, 0x789aca17, 0xb3c619b2, 0x35526b1c, 0xfe0eb8b9, + 0x0c8e08f7, 0xc7d2db52, 0x4146a9fc, 0x8a1a7a59, 0x971f4ae1, + 0x5c439944, 0xdad7ebea, 0x118b384f, 0xe0dd8a9a, 0x2b81593f, + 0xad152b91, 0x6649f834, 0x7b4cc88c, 0xb0101b29, 0x36846987, + 0xfdd8ba22, 0x08f40f5a, 0xc3a8dcff, 0x453cae51, 0x8e607df4, + 0x93654d4c, 0x58399ee9, 0xdeadec47, 0x15f13fe2, 0xe4a78d37, + 0x2ffb5e92, 0xa96f2c3c, 0x6233ff99, 0x7f36cf21, 0xb46a1c84, + 0x32fe6e2a, 0xf9a2bd8f, 0x0b220dc1, 0xc07ede64, 0x46eaacca, + 0x8db67f6f, 0x90b34fd7, 0x5bef9c72, 0xdd7beedc, 0x16273d79, + 0xe7718fac, 0x2c2d5c09, 0xaab92ea7, 0x61e5fd02, 0x7ce0cdba, + 0xb7bc1e1f, 0x31286cb1, 0xfa74bf14, 0x1eb014d8, 0xd5ecc77d, + 0x5378b5d3, 0x98246676, 0x852156ce, 0x4e7d856b, 0xc8e9f7c5, + 0x03b52460, 0xf2e396b5, 0x39bf4510, 0xbf2b37be, 0x7477e41b, + 0x6972d4a3, 0xa22e0706, 0x24ba75a8, 0xefe6a60d, 0x1d661643, + 0xd63ac5e6, 0x50aeb748, 0x9bf264ed, 0x86f75455, 0x4dab87f0, + 0xcb3ff55e, 0x006326fb, 0xf135942e, 0x3a69478b, 0xbcfd3525, + 0x77a1e680, 0x6aa4d638, 0xa1f8059d, 0x276c7733, 0xec30a496, + 0x191c11ee, 0xd240c24b, 0x54d4b0e5, 0x9f886340, 0x828d53f8, + 0x49d1805d, 0xcf45f2f3, 0x04192156, 0xf54f9383, 0x3e134026, + 0xb8873288, 0x73dbe12d, 0x6eded195, 0xa5820230, 0x2316709e, + 0xe84aa33b, 0x1aca1375, 0xd196c0d0, 0x5702b27e, 0x9c5e61db, + 0x815b5163, 0x4a0782c6, 0xcc93f068, 0x07cf23cd, 0xf6999118, + 0x3dc542bd, 0xbb513013, 0x700de3b6, 0x6d08d30e, 0xa65400ab, + 0x20c07205, 0xeb9ca1a0, 0x11e81eb4, 0xdab4cd11, 0x5c20bfbf, + 0x977c6c1a, 0x8a795ca2, 0x41258f07, 0xc7b1fda9, 0x0ced2e0c, + 0xfdbb9cd9, 0x36e74f7c, 0xb0733dd2, 0x7b2fee77, 0x662adecf, + 0xad760d6a, 0x2be27fc4, 0xe0beac61, 0x123e1c2f, 0xd962cf8a, + 0x5ff6bd24, 0x94aa6e81, 0x89af5e39, 0x42f38d9c, 0xc467ff32, + 0x0f3b2c97, 0xfe6d9e42, 0x35314de7, 0xb3a53f49, 0x78f9ecec, + 0x65fcdc54, 0xaea00ff1, 0x28347d5f, 0xe368aefa, 0x16441b82, + 0xdd18c827, 0x5b8cba89, 0x90d0692c, 0x8dd55994, 0x46898a31, + 0xc01df89f, 0x0b412b3a, 0xfa1799ef, 0x314b4a4a, 0xb7df38e4, + 0x7c83eb41, 0x6186dbf9, 0xaada085c, 0x2c4e7af2, 0xe712a957, + 0x15921919, 0xdececabc, 0x585ab812, 0x93066bb7, 0x8e035b0f, + 0x455f88aa, 0xc3cbfa04, 0x089729a1, 0xf9c19b74, 0x329d48d1, + 0xb4093a7f, 0x7f55e9da, 0x6250d962, 0xa90c0ac7, 0x2f987869, + 0xe4c4abcc}, + {0x00000000, 0x3d6029b0, 0x7ac05360, 0x47a07ad0, 0xf580a6c0, + 0xc8e08f70, 0x8f40f5a0, 0xb220dc10, 0x30704bc1, 0x0d106271, + 0x4ab018a1, 0x77d03111, 0xc5f0ed01, 0xf890c4b1, 0xbf30be61, + 0x825097d1, 0x60e09782, 0x5d80be32, 0x1a20c4e2, 0x2740ed52, + 0x95603142, 0xa80018f2, 0xefa06222, 0xd2c04b92, 0x5090dc43, + 0x6df0f5f3, 0x2a508f23, 0x1730a693, 0xa5107a83, 0x98705333, + 0xdfd029e3, 0xe2b00053, 0xc1c12f04, 0xfca106b4, 0xbb017c64, + 0x866155d4, 0x344189c4, 0x0921a074, 0x4e81daa4, 0x73e1f314, + 0xf1b164c5, 0xccd14d75, 0x8b7137a5, 0xb6111e15, 0x0431c205, + 0x3951ebb5, 0x7ef19165, 0x4391b8d5, 0xa121b886, 0x9c419136, + 0xdbe1ebe6, 0xe681c256, 0x54a11e46, 0x69c137f6, 0x2e614d26, + 0x13016496, 0x9151f347, 0xac31daf7, 0xeb91a027, 0xd6f18997, + 0x64d15587, 0x59b17c37, 0x1e1106e7, 0x23712f57, 0x58f35849, + 0x659371f9, 0x22330b29, 0x1f532299, 0xad73fe89, 0x9013d739, + 0xd7b3ade9, 0xead38459, 0x68831388, 0x55e33a38, 0x124340e8, + 0x2f236958, 0x9d03b548, 0xa0639cf8, 0xe7c3e628, 0xdaa3cf98, + 0x3813cfcb, 0x0573e67b, 0x42d39cab, 0x7fb3b51b, 0xcd93690b, + 0xf0f340bb, 0xb7533a6b, 0x8a3313db, 0x0863840a, 0x3503adba, + 0x72a3d76a, 0x4fc3feda, 0xfde322ca, 0xc0830b7a, 0x872371aa, + 0xba43581a, 0x9932774d, 0xa4525efd, 0xe3f2242d, 0xde920d9d, + 0x6cb2d18d, 0x51d2f83d, 0x167282ed, 0x2b12ab5d, 0xa9423c8c, + 0x9422153c, 0xd3826fec, 0xeee2465c, 0x5cc29a4c, 0x61a2b3fc, + 0x2602c92c, 0x1b62e09c, 0xf9d2e0cf, 0xc4b2c97f, 0x8312b3af, + 0xbe729a1f, 0x0c52460f, 0x31326fbf, 0x7692156f, 0x4bf23cdf, + 0xc9a2ab0e, 0xf4c282be, 0xb362f86e, 0x8e02d1de, 0x3c220dce, + 0x0142247e, 0x46e25eae, 0x7b82771e, 0xb1e6b092, 0x8c869922, + 0xcb26e3f2, 0xf646ca42, 0x44661652, 0x79063fe2, 0x3ea64532, + 0x03c66c82, 0x8196fb53, 0xbcf6d2e3, 0xfb56a833, 0xc6368183, + 0x74165d93, 0x49767423, 0x0ed60ef3, 0x33b62743, 0xd1062710, + 0xec660ea0, 0xabc67470, 0x96a65dc0, 0x248681d0, 0x19e6a860, + 0x5e46d2b0, 0x6326fb00, 0xe1766cd1, 0xdc164561, 0x9bb63fb1, + 0xa6d61601, 0x14f6ca11, 0x2996e3a1, 0x6e369971, 0x5356b0c1, + 0x70279f96, 0x4d47b626, 0x0ae7ccf6, 0x3787e546, 0x85a73956, + 0xb8c710e6, 0xff676a36, 0xc2074386, 0x4057d457, 0x7d37fde7, + 0x3a978737, 0x07f7ae87, 0xb5d77297, 0x88b75b27, 0xcf1721f7, + 0xf2770847, 0x10c70814, 0x2da721a4, 0x6a075b74, 0x576772c4, + 0xe547aed4, 0xd8278764, 0x9f87fdb4, 0xa2e7d404, 0x20b743d5, + 0x1dd76a65, 0x5a7710b5, 0x67173905, 0xd537e515, 0xe857cca5, + 0xaff7b675, 0x92979fc5, 0xe915e8db, 0xd475c16b, 0x93d5bbbb, + 0xaeb5920b, 0x1c954e1b, 0x21f567ab, 0x66551d7b, 0x5b3534cb, + 0xd965a31a, 0xe4058aaa, 0xa3a5f07a, 0x9ec5d9ca, 0x2ce505da, + 0x11852c6a, 0x562556ba, 0x6b457f0a, 0x89f57f59, 0xb49556e9, + 0xf3352c39, 0xce550589, 0x7c75d999, 0x4115f029, 0x06b58af9, + 0x3bd5a349, 0xb9853498, 0x84e51d28, 0xc34567f8, 0xfe254e48, + 0x4c059258, 0x7165bbe8, 0x36c5c138, 0x0ba5e888, 0x28d4c7df, + 0x15b4ee6f, 0x521494bf, 0x6f74bd0f, 0xdd54611f, 0xe03448af, + 0xa794327f, 0x9af41bcf, 0x18a48c1e, 0x25c4a5ae, 0x6264df7e, + 0x5f04f6ce, 0xed242ade, 0xd044036e, 0x97e479be, 0xaa84500e, + 0x4834505d, 0x755479ed, 0x32f4033d, 0x0f942a8d, 0xbdb4f69d, + 0x80d4df2d, 0xc774a5fd, 0xfa148c4d, 0x78441b9c, 0x4524322c, + 0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c, + 0xca64c78c}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0xb029603d, 0x6053c07a, 0xd07aa047, 0xc0a680f5, + 0x708fe0c8, 0xa0f5408f, 0x10dc20b2, 0xc14b7030, 0x7162100d, + 0xa118b04a, 0x1131d077, 0x01edf0c5, 0xb1c490f8, 0x61be30bf, + 0xd1975082, 0x8297e060, 0x32be805d, 0xe2c4201a, 0x52ed4027, + 0x42316095, 0xf21800a8, 0x2262a0ef, 0x924bc0d2, 0x43dc9050, + 0xf3f5f06d, 0x238f502a, 0x93a63017, 0x837a10a5, 0x33537098, + 0xe329d0df, 0x5300b0e2, 0x042fc1c1, 0xb406a1fc, 0x647c01bb, + 0xd4556186, 0xc4894134, 0x74a02109, 0xa4da814e, 0x14f3e173, + 0xc564b1f1, 0x754dd1cc, 0xa537718b, 0x151e11b6, 0x05c23104, + 0xb5eb5139, 0x6591f17e, 0xd5b89143, 0x86b821a1, 0x3691419c, + 0xe6ebe1db, 0x56c281e6, 0x461ea154, 0xf637c169, 0x264d612e, + 0x96640113, 0x47f35191, 0xf7da31ac, 0x27a091eb, 0x9789f1d6, + 0x8755d164, 0x377cb159, 0xe706111e, 0x572f7123, 0x4958f358, + 0xf9719365, 0x290b3322, 0x9922531f, 0x89fe73ad, 0x39d71390, + 0xe9adb3d7, 0x5984d3ea, 0x88138368, 0x383ae355, 0xe8404312, + 0x5869232f, 0x48b5039d, 0xf89c63a0, 0x28e6c3e7, 0x98cfa3da, + 0xcbcf1338, 0x7be67305, 0xab9cd342, 0x1bb5b37f, 0x0b6993cd, + 0xbb40f3f0, 0x6b3a53b7, 0xdb13338a, 0x0a846308, 0xbaad0335, + 0x6ad7a372, 0xdafec34f, 0xca22e3fd, 0x7a0b83c0, 0xaa712387, + 0x1a5843ba, 0x4d773299, 0xfd5e52a4, 0x2d24f2e3, 0x9d0d92de, + 0x8dd1b26c, 0x3df8d251, 0xed827216, 0x5dab122b, 0x8c3c42a9, + 0x3c152294, 0xec6f82d3, 0x5c46e2ee, 0x4c9ac25c, 0xfcb3a261, + 0x2cc90226, 0x9ce0621b, 0xcfe0d2f9, 0x7fc9b2c4, 0xafb31283, + 0x1f9a72be, 0x0f46520c, 0xbf6f3231, 0x6f159276, 0xdf3cf24b, + 0x0eaba2c9, 0xbe82c2f4, 0x6ef862b3, 0xded1028e, 0xce0d223c, + 0x7e244201, 0xae5ee246, 0x1e77827b, 0x92b0e6b1, 0x2299868c, + 0xf2e326cb, 0x42ca46f6, 0x52166644, 0xe23f0679, 0x3245a63e, + 0x826cc603, 0x53fb9681, 0xe3d2f6bc, 0x33a856fb, 0x838136c6, + 0x935d1674, 0x23747649, 0xf30ed60e, 0x4327b633, 0x102706d1, + 0xa00e66ec, 0x7074c6ab, 0xc05da696, 0xd0818624, 0x60a8e619, + 0xb0d2465e, 0x00fb2663, 0xd16c76e1, 0x614516dc, 0xb13fb69b, + 0x0116d6a6, 0x11caf614, 0xa1e39629, 0x7199366e, 0xc1b05653, + 0x969f2770, 0x26b6474d, 0xf6cce70a, 0x46e58737, 0x5639a785, + 0xe610c7b8, 0x366a67ff, 0x864307c2, 0x57d45740, 0xe7fd377d, + 0x3787973a, 0x87aef707, 0x9772d7b5, 0x275bb788, 0xf72117cf, + 0x470877f2, 0x1408c710, 0xa421a72d, 0x745b076a, 0xc4726757, + 0xd4ae47e5, 0x648727d8, 0xb4fd879f, 0x04d4e7a2, 0xd543b720, + 0x656ad71d, 0xb510775a, 0x05391767, 0x15e537d5, 0xa5cc57e8, + 0x75b6f7af, 0xc59f9792, 0xdbe815e9, 0x6bc175d4, 0xbbbbd593, + 0x0b92b5ae, 0x1b4e951c, 0xab67f521, 0x7b1d5566, 0xcb34355b, + 0x1aa365d9, 0xaa8a05e4, 0x7af0a5a3, 0xcad9c59e, 0xda05e52c, + 0x6a2c8511, 0xba562556, 0x0a7f456b, 0x597ff589, 0xe95695b4, + 0x392c35f3, 0x890555ce, 0x99d9757c, 0x29f01541, 0xf98ab506, + 0x49a3d53b, 0x983485b9, 0x281de584, 0xf86745c3, 0x484e25fe, + 0x5892054c, 0xe8bb6571, 0x38c1c536, 0x88e8a50b, 0xdfc7d428, + 0x6feeb415, 0xbf941452, 0x0fbd746f, 0x1f6154dd, 0xaf4834e0, + 0x7f3294a7, 0xcf1bf49a, 0x1e8ca418, 0xaea5c425, 0x7edf6462, + 0xcef6045f, 0xde2a24ed, 0x6e0344d0, 0xbe79e497, 0x0e5084aa, + 0x5d503448, 0xed795475, 0x3d03f432, 0x8d2a940f, 0x9df6b4bd, + 0x2ddfd480, 0xfda574c7, 0x4d8c14fa, 0x9c1b4478, 0x2c322445, + 0xfc488402, 0x4c61e43f, 0x5cbdc48d, 0xec94a4b0, 0x3cee04f7, + 0x8cc764ca}, + {0x00000000, 0xa5d35ccb, 0x0ba1c84d, 0xae729486, 0x1642919b, + 0xb391cd50, 0x1de359d6, 0xb830051d, 0x6d8253ec, 0xc8510f27, + 0x66239ba1, 0xc3f0c76a, 0x7bc0c277, 0xde139ebc, 0x70610a3a, + 0xd5b256f1, 0x9b02d603, 0x3ed18ac8, 0x90a31e4e, 0x35704285, + 0x8d404798, 0x28931b53, 0x86e18fd5, 0x2332d31e, 0xf68085ef, + 0x5353d924, 0xfd214da2, 0x58f21169, 0xe0c21474, 0x451148bf, + 0xeb63dc39, 0x4eb080f2, 0x3605ac07, 0x93d6f0cc, 0x3da4644a, + 0x98773881, 0x20473d9c, 0x85946157, 0x2be6f5d1, 0x8e35a91a, + 0x5b87ffeb, 0xfe54a320, 0x502637a6, 0xf5f56b6d, 0x4dc56e70, + 0xe81632bb, 0x4664a63d, 0xe3b7faf6, 0xad077a04, 0x08d426cf, + 0xa6a6b249, 0x0375ee82, 0xbb45eb9f, 0x1e96b754, 0xb0e423d2, + 0x15377f19, 0xc08529e8, 0x65567523, 0xcb24e1a5, 0x6ef7bd6e, + 0xd6c7b873, 0x7314e4b8, 0xdd66703e, 0x78b52cf5, 0x6c0a580f, + 0xc9d904c4, 0x67ab9042, 0xc278cc89, 0x7a48c994, 0xdf9b955f, + 0x71e901d9, 0xd43a5d12, 0x01880be3, 0xa45b5728, 0x0a29c3ae, + 0xaffa9f65, 0x17ca9a78, 0xb219c6b3, 0x1c6b5235, 0xb9b80efe, + 0xf7088e0c, 0x52dbd2c7, 0xfca94641, 0x597a1a8a, 0xe14a1f97, + 0x4499435c, 0xeaebd7da, 0x4f388b11, 0x9a8adde0, 0x3f59812b, + 0x912b15ad, 0x34f84966, 0x8cc84c7b, 0x291b10b0, 0x87698436, + 0x22bad8fd, 0x5a0ff408, 0xffdca8c3, 0x51ae3c45, 0xf47d608e, + 0x4c4d6593, 0xe99e3958, 0x47ecadde, 0xe23ff115, 0x378da7e4, + 0x925efb2f, 0x3c2c6fa9, 0x99ff3362, 0x21cf367f, 0x841c6ab4, + 0x2a6efe32, 0x8fbda2f9, 0xc10d220b, 0x64de7ec0, 0xcaacea46, + 0x6f7fb68d, 0xd74fb390, 0x729cef5b, 0xdcee7bdd, 0x793d2716, + 0xac8f71e7, 0x095c2d2c, 0xa72eb9aa, 0x02fde561, 0xbacde07c, + 0x1f1ebcb7, 0xb16c2831, 0x14bf74fa, 0xd814b01e, 0x7dc7ecd5, + 0xd3b57853, 0x76662498, 0xce562185, 0x6b857d4e, 0xc5f7e9c8, + 0x6024b503, 0xb596e3f2, 0x1045bf39, 0xbe372bbf, 0x1be47774, + 0xa3d47269, 0x06072ea2, 0xa875ba24, 0x0da6e6ef, 0x4316661d, + 0xe6c53ad6, 0x48b7ae50, 0xed64f29b, 0x5554f786, 0xf087ab4d, + 0x5ef53fcb, 0xfb266300, 0x2e9435f1, 0x8b47693a, 0x2535fdbc, + 0x80e6a177, 0x38d6a46a, 0x9d05f8a1, 0x33776c27, 0x96a430ec, + 0xee111c19, 0x4bc240d2, 0xe5b0d454, 0x4063889f, 0xf8538d82, + 0x5d80d149, 0xf3f245cf, 0x56211904, 0x83934ff5, 0x2640133e, + 0x883287b8, 0x2de1db73, 0x95d1de6e, 0x300282a5, 0x9e701623, + 0x3ba34ae8, 0x7513ca1a, 0xd0c096d1, 0x7eb20257, 0xdb615e9c, + 0x63515b81, 0xc682074a, 0x68f093cc, 0xcd23cf07, 0x189199f6, + 0xbd42c53d, 0x133051bb, 0xb6e30d70, 0x0ed3086d, 0xab0054a6, + 0x0572c020, 0xa0a19ceb, 0xb41ee811, 0x11cdb4da, 0xbfbf205c, + 0x1a6c7c97, 0xa25c798a, 0x078f2541, 0xa9fdb1c7, 0x0c2eed0c, + 0xd99cbbfd, 0x7c4fe736, 0xd23d73b0, 0x77ee2f7b, 0xcfde2a66, + 0x6a0d76ad, 0xc47fe22b, 0x61acbee0, 0x2f1c3e12, 0x8acf62d9, + 0x24bdf65f, 0x816eaa94, 0x395eaf89, 0x9c8df342, 0x32ff67c4, + 0x972c3b0f, 0x429e6dfe, 0xe74d3135, 0x493fa5b3, 0xececf978, + 0x54dcfc65, 0xf10fa0ae, 0x5f7d3428, 0xfaae68e3, 0x821b4416, + 0x27c818dd, 0x89ba8c5b, 0x2c69d090, 0x9459d58d, 0x318a8946, + 0x9ff81dc0, 0x3a2b410b, 0xef9917fa, 0x4a4a4b31, 0xe438dfb7, + 0x41eb837c, 0xf9db8661, 0x5c08daaa, 0xf27a4e2c, 0x57a912e7, + 0x19199215, 0xbccacede, 0x12b85a58, 0xb76b0693, 0x0f5b038e, + 0xaa885f45, 0x04facbc3, 0xa1299708, 0x749bc1f9, 0xd1489d32, + 0x7f3a09b4, 0xdae9557f, 0x62d95062, 0xc70a0ca9, 0x6978982f, + 0xccabc4e4}, + {0x00000000, 0xb40b77a6, 0x29119f97, 0x9d1ae831, 0x13244ff4, + 0xa72f3852, 0x3a35d063, 0x8e3ea7c5, 0x674eef33, 0xd3459895, + 0x4e5f70a4, 0xfa540702, 0x746aa0c7, 0xc061d761, 0x5d7b3f50, + 0xe97048f6, 0xce9cde67, 0x7a97a9c1, 0xe78d41f0, 0x53863656, + 0xddb89193, 0x69b3e635, 0xf4a90e04, 0x40a279a2, 0xa9d23154, + 0x1dd946f2, 0x80c3aec3, 0x34c8d965, 0xbaf67ea0, 0x0efd0906, + 0x93e7e137, 0x27ec9691, 0x9c39bdcf, 0x2832ca69, 0xb5282258, + 0x012355fe, 0x8f1df23b, 0x3b16859d, 0xa60c6dac, 0x12071a0a, + 0xfb7752fc, 0x4f7c255a, 0xd266cd6b, 0x666dbacd, 0xe8531d08, + 0x5c586aae, 0xc142829f, 0x7549f539, 0x52a563a8, 0xe6ae140e, + 0x7bb4fc3f, 0xcfbf8b99, 0x41812c5c, 0xf58a5bfa, 0x6890b3cb, + 0xdc9bc46d, 0x35eb8c9b, 0x81e0fb3d, 0x1cfa130c, 0xa8f164aa, + 0x26cfc36f, 0x92c4b4c9, 0x0fde5cf8, 0xbbd52b5e, 0x79750b44, + 0xcd7e7ce2, 0x506494d3, 0xe46fe375, 0x6a5144b0, 0xde5a3316, + 0x4340db27, 0xf74bac81, 0x1e3be477, 0xaa3093d1, 0x372a7be0, + 0x83210c46, 0x0d1fab83, 0xb914dc25, 0x240e3414, 0x900543b2, + 0xb7e9d523, 0x03e2a285, 0x9ef84ab4, 0x2af33d12, 0xa4cd9ad7, + 0x10c6ed71, 0x8ddc0540, 0x39d772e6, 0xd0a73a10, 0x64ac4db6, + 0xf9b6a587, 0x4dbdd221, 0xc38375e4, 0x77880242, 0xea92ea73, + 0x5e999dd5, 0xe54cb68b, 0x5147c12d, 0xcc5d291c, 0x78565eba, + 0xf668f97f, 0x42638ed9, 0xdf7966e8, 0x6b72114e, 0x820259b8, + 0x36092e1e, 0xab13c62f, 0x1f18b189, 0x9126164c, 0x252d61ea, + 0xb83789db, 0x0c3cfe7d, 0x2bd068ec, 0x9fdb1f4a, 0x02c1f77b, + 0xb6ca80dd, 0x38f42718, 0x8cff50be, 0x11e5b88f, 0xa5eecf29, + 0x4c9e87df, 0xf895f079, 0x658f1848, 0xd1846fee, 0x5fbac82b, + 0xebb1bf8d, 0x76ab57bc, 0xc2a0201a, 0xf2ea1688, 0x46e1612e, + 0xdbfb891f, 0x6ff0feb9, 0xe1ce597c, 0x55c52eda, 0xc8dfc6eb, + 0x7cd4b14d, 0x95a4f9bb, 0x21af8e1d, 0xbcb5662c, 0x08be118a, + 0x8680b64f, 0x328bc1e9, 0xaf9129d8, 0x1b9a5e7e, 0x3c76c8ef, + 0x887dbf49, 0x15675778, 0xa16c20de, 0x2f52871b, 0x9b59f0bd, + 0x0643188c, 0xb2486f2a, 0x5b3827dc, 0xef33507a, 0x7229b84b, + 0xc622cfed, 0x481c6828, 0xfc171f8e, 0x610df7bf, 0xd5068019, + 0x6ed3ab47, 0xdad8dce1, 0x47c234d0, 0xf3c94376, 0x7df7e4b3, + 0xc9fc9315, 0x54e67b24, 0xe0ed0c82, 0x099d4474, 0xbd9633d2, + 0x208cdbe3, 0x9487ac45, 0x1ab90b80, 0xaeb27c26, 0x33a89417, + 0x87a3e3b1, 0xa04f7520, 0x14440286, 0x895eeab7, 0x3d559d11, + 0xb36b3ad4, 0x07604d72, 0x9a7aa543, 0x2e71d2e5, 0xc7019a13, + 0x730aedb5, 0xee100584, 0x5a1b7222, 0xd425d5e7, 0x602ea241, + 0xfd344a70, 0x493f3dd6, 0x8b9f1dcc, 0x3f946a6a, 0xa28e825b, + 0x1685f5fd, 0x98bb5238, 0x2cb0259e, 0xb1aacdaf, 0x05a1ba09, + 0xecd1f2ff, 0x58da8559, 0xc5c06d68, 0x71cb1ace, 0xfff5bd0b, + 0x4bfecaad, 0xd6e4229c, 0x62ef553a, 0x4503c3ab, 0xf108b40d, + 0x6c125c3c, 0xd8192b9a, 0x56278c5f, 0xe22cfbf9, 0x7f3613c8, + 0xcb3d646e, 0x224d2c98, 0x96465b3e, 0x0b5cb30f, 0xbf57c4a9, + 0x3169636c, 0x856214ca, 0x1878fcfb, 0xac738b5d, 0x17a6a003, + 0xa3add7a5, 0x3eb73f94, 0x8abc4832, 0x0482eff7, 0xb0899851, + 0x2d937060, 0x999807c6, 0x70e84f30, 0xc4e33896, 0x59f9d0a7, + 0xedf2a701, 0x63cc00c4, 0xd7c77762, 0x4add9f53, 0xfed6e8f5, + 0xd93a7e64, 0x6d3109c2, 0xf02be1f3, 0x44209655, 0xca1e3190, + 0x7e154636, 0xe30fae07, 0x5704d9a1, 0xbe749157, 0x0a7fe6f1, + 0x97650ec0, 0x236e7966, 0xad50dea3, 0x195ba905, 0x84414134, + 0x304a3692}, + {0x00000000, 0x9e00aacc, 0x7d072542, 0xe3078f8e, 0xfa0e4a84, + 0x640ee048, 0x87096fc6, 0x1909c50a, 0xb51be5d3, 0x2b1b4f1f, + 0xc81cc091, 0x561c6a5d, 0x4f15af57, 0xd115059b, 0x32128a15, + 0xac1220d9, 0x2b31bb7c, 0xb53111b0, 0x56369e3e, 0xc83634f2, + 0xd13ff1f8, 0x4f3f5b34, 0xac38d4ba, 0x32387e76, 0x9e2a5eaf, + 0x002af463, 0xe32d7bed, 0x7d2dd121, 0x6424142b, 0xfa24bee7, + 0x19233169, 0x87239ba5, 0x566276f9, 0xc862dc35, 0x2b6553bb, + 0xb565f977, 0xac6c3c7d, 0x326c96b1, 0xd16b193f, 0x4f6bb3f3, + 0xe379932a, 0x7d7939e6, 0x9e7eb668, 0x007e1ca4, 0x1977d9ae, + 0x87777362, 0x6470fcec, 0xfa705620, 0x7d53cd85, 0xe3536749, + 0x0054e8c7, 0x9e54420b, 0x875d8701, 0x195d2dcd, 0xfa5aa243, + 0x645a088f, 0xc8482856, 0x5648829a, 0xb54f0d14, 0x2b4fa7d8, + 0x324662d2, 0xac46c81e, 0x4f414790, 0xd141ed5c, 0xedc29d29, + 0x73c237e5, 0x90c5b86b, 0x0ec512a7, 0x17ccd7ad, 0x89cc7d61, + 0x6acbf2ef, 0xf4cb5823, 0x58d978fa, 0xc6d9d236, 0x25de5db8, + 0xbbdef774, 0xa2d7327e, 0x3cd798b2, 0xdfd0173c, 0x41d0bdf0, + 0xc6f32655, 0x58f38c99, 0xbbf40317, 0x25f4a9db, 0x3cfd6cd1, + 0xa2fdc61d, 0x41fa4993, 0xdffae35f, 0x73e8c386, 0xede8694a, + 0x0eefe6c4, 0x90ef4c08, 0x89e68902, 0x17e623ce, 0xf4e1ac40, + 0x6ae1068c, 0xbba0ebd0, 0x25a0411c, 0xc6a7ce92, 0x58a7645e, + 0x41aea154, 0xdfae0b98, 0x3ca98416, 0xa2a92eda, 0x0ebb0e03, + 0x90bba4cf, 0x73bc2b41, 0xedbc818d, 0xf4b54487, 0x6ab5ee4b, + 0x89b261c5, 0x17b2cb09, 0x909150ac, 0x0e91fa60, 0xed9675ee, + 0x7396df22, 0x6a9f1a28, 0xf49fb0e4, 0x17983f6a, 0x899895a6, + 0x258ab57f, 0xbb8a1fb3, 0x588d903d, 0xc68d3af1, 0xdf84fffb, + 0x41845537, 0xa283dab9, 0x3c837075, 0xda853b53, 0x4485919f, + 0xa7821e11, 0x3982b4dd, 0x208b71d7, 0xbe8bdb1b, 0x5d8c5495, + 0xc38cfe59, 0x6f9ede80, 0xf19e744c, 0x1299fbc2, 0x8c99510e, + 0x95909404, 0x0b903ec8, 0xe897b146, 0x76971b8a, 0xf1b4802f, + 0x6fb42ae3, 0x8cb3a56d, 0x12b30fa1, 0x0bbacaab, 0x95ba6067, + 0x76bdefe9, 0xe8bd4525, 0x44af65fc, 0xdaafcf30, 0x39a840be, + 0xa7a8ea72, 0xbea12f78, 0x20a185b4, 0xc3a60a3a, 0x5da6a0f6, + 0x8ce74daa, 0x12e7e766, 0xf1e068e8, 0x6fe0c224, 0x76e9072e, + 0xe8e9ade2, 0x0bee226c, 0x95ee88a0, 0x39fca879, 0xa7fc02b5, + 0x44fb8d3b, 0xdafb27f7, 0xc3f2e2fd, 0x5df24831, 0xbef5c7bf, + 0x20f56d73, 0xa7d6f6d6, 0x39d65c1a, 0xdad1d394, 0x44d17958, + 0x5dd8bc52, 0xc3d8169e, 0x20df9910, 0xbedf33dc, 0x12cd1305, + 0x8ccdb9c9, 0x6fca3647, 0xf1ca9c8b, 0xe8c35981, 0x76c3f34d, + 0x95c47cc3, 0x0bc4d60f, 0x3747a67a, 0xa9470cb6, 0x4a408338, + 0xd44029f4, 0xcd49ecfe, 0x53494632, 0xb04ec9bc, 0x2e4e6370, + 0x825c43a9, 0x1c5ce965, 0xff5b66eb, 0x615bcc27, 0x7852092d, + 0xe652a3e1, 0x05552c6f, 0x9b5586a3, 0x1c761d06, 0x8276b7ca, + 0x61713844, 0xff719288, 0xe6785782, 0x7878fd4e, 0x9b7f72c0, + 0x057fd80c, 0xa96df8d5, 0x376d5219, 0xd46add97, 0x4a6a775b, + 0x5363b251, 0xcd63189d, 0x2e649713, 0xb0643ddf, 0x6125d083, + 0xff257a4f, 0x1c22f5c1, 0x82225f0d, 0x9b2b9a07, 0x052b30cb, + 0xe62cbf45, 0x782c1589, 0xd43e3550, 0x4a3e9f9c, 0xa9391012, + 0x3739bade, 0x2e307fd4, 0xb030d518, 0x53375a96, 0xcd37f05a, + 0x4a146bff, 0xd414c133, 0x37134ebd, 0xa913e471, 0xb01a217b, + 0x2e1a8bb7, 0xcd1d0439, 0x531daef5, 0xff0f8e2c, 0x610f24e0, + 0x8208ab6e, 0x1c0801a2, 0x0501c4a8, 0x9b016e64, 0x7806e1ea, + 0xe6064b26}}; + +#endif + +#endif + +#if N == 3 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f, + 0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999, + 0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee, + 0xe3150bc9, 0x7f6b7f3d, 0xfe4e1a1a, 0xa650b332, 0x2775d615, + 0x166de162, 0x97488445, 0xcf562d6d, 0x4e73484a, 0xad664383, + 0x2c4326a4, 0x745d8f8c, 0xf578eaab, 0xc460dddc, 0x4545b8fb, + 0x1d5b11d3, 0x9c7e74f4, 0xfed6fe7a, 0x7ff39b5d, 0x27ed3275, + 0xa6c85752, 0x97d06025, 0x16f50502, 0x4eebac2a, 0xcfcec90d, + 0x2cdbc2c4, 0xadfea7e3, 0xf5e00ecb, 0x74c56bec, 0x45dd5c9b, + 0xc4f839bc, 0x9ce69094, 0x1dc3f5b3, 0x81bd8147, 0x0098e460, + 0x58864d48, 0xd9a3286f, 0xe8bb1f18, 0x699e7a3f, 0x3180d317, + 0xb0a5b630, 0x53b0bdf9, 0xd295d8de, 0x8a8b71f6, 0x0bae14d1, + 0x3ab623a6, 0xbb934681, 0xe38defa9, 0x62a88a8e, 0x26dcfab5, + 0xa7f99f92, 0xffe736ba, 0x7ec2539d, 0x4fda64ea, 0xceff01cd, + 0x96e1a8e5, 0x17c4cdc2, 0xf4d1c60b, 0x75f4a32c, 0x2dea0a04, + 0xaccf6f23, 0x9dd75854, 0x1cf23d73, 0x44ec945b, 0xc5c9f17c, + 0x59b78588, 0xd892e0af, 0x808c4987, 0x01a92ca0, 0x30b11bd7, + 0xb1947ef0, 0xe98ad7d8, 0x68afb2ff, 0x8bbab936, 0x0a9fdc11, + 0x52817539, 0xd3a4101e, 0xe2bc2769, 0x6399424e, 0x3b87eb66, + 0xbaa28e41, 0xd80a04cf, 0x592f61e8, 0x0131c8c0, 0x8014ade7, + 0xb10c9a90, 0x3029ffb7, 0x6837569f, 0xe91233b8, 0x0a073871, + 0x8b225d56, 0xd33cf47e, 0x52199159, 0x6301a62e, 0xe224c309, + 0xba3a6a21, 0x3b1f0f06, 0xa7617bf2, 0x26441ed5, 0x7e5ab7fd, + 0xff7fd2da, 0xce67e5ad, 0x4f42808a, 0x175c29a2, 0x96794c85, + 0x756c474c, 0xf449226b, 0xac578b43, 0x2d72ee64, 0x1c6ad913, + 0x9d4fbc34, 0xc551151c, 0x4474703b, 0x4db9f56a, 0xcc9c904d, + 0x94823965, 0x15a75c42, 0x24bf6b35, 0xa59a0e12, 0xfd84a73a, + 0x7ca1c21d, 0x9fb4c9d4, 0x1e91acf3, 0x468f05db, 0xc7aa60fc, + 0xf6b2578b, 0x779732ac, 0x2f899b84, 0xaeacfea3, 0x32d28a57, + 0xb3f7ef70, 0xebe94658, 0x6acc237f, 0x5bd41408, 0xdaf1712f, + 0x82efd807, 0x03cabd20, 0xe0dfb6e9, 0x61fad3ce, 0x39e47ae6, + 0xb8c11fc1, 0x89d928b6, 0x08fc4d91, 0x50e2e4b9, 0xd1c7819e, + 0xb36f0b10, 0x324a6e37, 0x6a54c71f, 0xeb71a238, 0xda69954f, + 0x5b4cf068, 0x03525940, 0x82773c67, 0x616237ae, 0xe0475289, + 0xb859fba1, 0x397c9e86, 0x0864a9f1, 0x8941ccd6, 0xd15f65fe, + 0x507a00d9, 0xcc04742d, 0x4d21110a, 0x153fb822, 0x941add05, + 0xa502ea72, 0x24278f55, 0x7c39267d, 0xfd1c435a, 0x1e094893, + 0x9f2c2db4, 0xc732849c, 0x4617e1bb, 0x770fd6cc, 0xf62ab3eb, + 0xae341ac3, 0x2f117fe4, 0x6b650fdf, 0xea406af8, 0xb25ec3d0, + 0x337ba6f7, 0x02639180, 0x8346f4a7, 0xdb585d8f, 0x5a7d38a8, + 0xb9683361, 0x384d5646, 0x6053ff6e, 0xe1769a49, 0xd06ead3e, + 0x514bc819, 0x09556131, 0x88700416, 0x140e70e2, 0x952b15c5, + 0xcd35bced, 0x4c10d9ca, 0x7d08eebd, 0xfc2d8b9a, 0xa43322b2, + 0x25164795, 0xc6034c5c, 0x4726297b, 0x1f388053, 0x9e1de574, + 0xaf05d203, 0x2e20b724, 0x763e1e0c, 0xf71b7b2b, 0x95b3f1a5, + 0x14969482, 0x4c883daa, 0xcdad588d, 0xfcb56ffa, 0x7d900add, + 0x258ea3f5, 0xa4abc6d2, 0x47becd1b, 0xc69ba83c, 0x9e850114, + 0x1fa06433, 0x2eb85344, 0xaf9d3663, 0xf7839f4b, 0x76a6fa6c, + 0xead88e98, 0x6bfdebbf, 0x33e34297, 0xb2c627b0, 0x83de10c7, + 0x02fb75e0, 0x5ae5dcc8, 0xdbc0b9ef, 0x38d5b226, 0xb9f0d701, + 0xe1ee7e29, 0x60cb1b0e, 0x51d32c79, 0xd0f6495e, 0x88e8e076, + 0x09cd8551}, + {0x00000000, 0x9b73ead4, 0xed96d3e9, 0x76e5393d, 0x005ca193, + 0x9b2f4b47, 0xedca727a, 0x76b998ae, 0x00b94326, 0x9bcaa9f2, + 0xed2f90cf, 0x765c7a1b, 0x00e5e2b5, 0x9b960861, 0xed73315c, + 0x7600db88, 0x0172864c, 0x9a016c98, 0xece455a5, 0x7797bf71, + 0x012e27df, 0x9a5dcd0b, 0xecb8f436, 0x77cb1ee2, 0x01cbc56a, + 0x9ab82fbe, 0xec5d1683, 0x772efc57, 0x019764f9, 0x9ae48e2d, + 0xec01b710, 0x77725dc4, 0x02e50c98, 0x9996e64c, 0xef73df71, + 0x740035a5, 0x02b9ad0b, 0x99ca47df, 0xef2f7ee2, 0x745c9436, + 0x025c4fbe, 0x992fa56a, 0xefca9c57, 0x74b97683, 0x0200ee2d, + 0x997304f9, 0xef963dc4, 0x74e5d710, 0x03978ad4, 0x98e46000, + 0xee01593d, 0x7572b3e9, 0x03cb2b47, 0x98b8c193, 0xee5df8ae, + 0x752e127a, 0x032ec9f2, 0x985d2326, 0xeeb81a1b, 0x75cbf0cf, + 0x03726861, 0x980182b5, 0xeee4bb88, 0x7597515c, 0x05ca1930, + 0x9eb9f3e4, 0xe85ccad9, 0x732f200d, 0x0596b8a3, 0x9ee55277, + 0xe8006b4a, 0x7373819e, 0x05735a16, 0x9e00b0c2, 0xe8e589ff, + 0x7396632b, 0x052ffb85, 0x9e5c1151, 0xe8b9286c, 0x73cac2b8, + 0x04b89f7c, 0x9fcb75a8, 0xe92e4c95, 0x725da641, 0x04e43eef, + 0x9f97d43b, 0xe972ed06, 0x720107d2, 0x0401dc5a, 0x9f72368e, + 0xe9970fb3, 0x72e4e567, 0x045d7dc9, 0x9f2e971d, 0xe9cbae20, + 0x72b844f4, 0x072f15a8, 0x9c5cff7c, 0xeab9c641, 0x71ca2c95, + 0x0773b43b, 0x9c005eef, 0xeae567d2, 0x71968d06, 0x0796568e, + 0x9ce5bc5a, 0xea008567, 0x71736fb3, 0x07caf71d, 0x9cb91dc9, + 0xea5c24f4, 0x712fce20, 0x065d93e4, 0x9d2e7930, 0xebcb400d, + 0x70b8aad9, 0x06013277, 0x9d72d8a3, 0xeb97e19e, 0x70e40b4a, + 0x06e4d0c2, 0x9d973a16, 0xeb72032b, 0x7001e9ff, 0x06b87151, + 0x9dcb9b85, 0xeb2ea2b8, 0x705d486c, 0x0b943260, 0x90e7d8b4, + 0xe602e189, 0x7d710b5d, 0x0bc893f3, 0x90bb7927, 0xe65e401a, + 0x7d2daace, 0x0b2d7146, 0x905e9b92, 0xe6bba2af, 0x7dc8487b, + 0x0b71d0d5, 0x90023a01, 0xe6e7033c, 0x7d94e9e8, 0x0ae6b42c, + 0x91955ef8, 0xe77067c5, 0x7c038d11, 0x0aba15bf, 0x91c9ff6b, + 0xe72cc656, 0x7c5f2c82, 0x0a5ff70a, 0x912c1dde, 0xe7c924e3, + 0x7cbace37, 0x0a035699, 0x9170bc4d, 0xe7958570, 0x7ce66fa4, + 0x09713ef8, 0x9202d42c, 0xe4e7ed11, 0x7f9407c5, 0x092d9f6b, + 0x925e75bf, 0xe4bb4c82, 0x7fc8a656, 0x09c87dde, 0x92bb970a, + 0xe45eae37, 0x7f2d44e3, 0x0994dc4d, 0x92e73699, 0xe4020fa4, + 0x7f71e570, 0x0803b8b4, 0x93705260, 0xe5956b5d, 0x7ee68189, + 0x085f1927, 0x932cf3f3, 0xe5c9cace, 0x7eba201a, 0x08bafb92, + 0x93c91146, 0xe52c287b, 0x7e5fc2af, 0x08e65a01, 0x9395b0d5, + 0xe57089e8, 0x7e03633c, 0x0e5e2b50, 0x952dc184, 0xe3c8f8b9, + 0x78bb126d, 0x0e028ac3, 0x95716017, 0xe394592a, 0x78e7b3fe, + 0x0ee76876, 0x959482a2, 0xe371bb9f, 0x7802514b, 0x0ebbc9e5, + 0x95c82331, 0xe32d1a0c, 0x785ef0d8, 0x0f2cad1c, 0x945f47c8, + 0xe2ba7ef5, 0x79c99421, 0x0f700c8f, 0x9403e65b, 0xe2e6df66, + 0x799535b2, 0x0f95ee3a, 0x94e604ee, 0xe2033dd3, 0x7970d707, + 0x0fc94fa9, 0x94baa57d, 0xe25f9c40, 0x792c7694, 0x0cbb27c8, + 0x97c8cd1c, 0xe12df421, 0x7a5e1ef5, 0x0ce7865b, 0x97946c8f, + 0xe17155b2, 0x7a02bf66, 0x0c0264ee, 0x97718e3a, 0xe194b707, + 0x7ae75dd3, 0x0c5ec57d, 0x972d2fa9, 0xe1c81694, 0x7abbfc40, + 0x0dc9a184, 0x96ba4b50, 0xe05f726d, 0x7b2c98b9, 0x0d950017, + 0x96e6eac3, 0xe003d3fe, 0x7b70392a, 0x0d70e2a2, 0x96030876, + 0xe0e6314b, 0x7b95db9f, 0x0d2c4331, 0x965fa9e5, 0xe0ba90d8, + 0x7bc97a0c}, + {0x00000000, 0x172864c0, 0x2e50c980, 0x3978ad40, 0x5ca19300, + 0x4b89f7c0, 0x72f15a80, 0x65d93e40, 0xb9432600, 0xae6b42c0, + 0x9713ef80, 0x803b8b40, 0xe5e2b500, 0xf2cad1c0, 0xcbb27c80, + 0xdc9a1840, 0xa9f74a41, 0xbedf2e81, 0x87a783c1, 0x908fe701, + 0xf556d941, 0xe27ebd81, 0xdb0610c1, 0xcc2e7401, 0x10b46c41, + 0x079c0881, 0x3ee4a5c1, 0x29ccc101, 0x4c15ff41, 0x5b3d9b81, + 0x624536c1, 0x756d5201, 0x889f92c3, 0x9fb7f603, 0xa6cf5b43, + 0xb1e73f83, 0xd43e01c3, 0xc3166503, 0xfa6ec843, 0xed46ac83, + 0x31dcb4c3, 0x26f4d003, 0x1f8c7d43, 0x08a41983, 0x6d7d27c3, + 0x7a554303, 0x432dee43, 0x54058a83, 0x2168d882, 0x3640bc42, + 0x0f381102, 0x181075c2, 0x7dc94b82, 0x6ae12f42, 0x53998202, + 0x44b1e6c2, 0x982bfe82, 0x8f039a42, 0xb67b3702, 0xa15353c2, + 0xc48a6d82, 0xd3a20942, 0xeadaa402, 0xfdf2c0c2, 0xca4e23c7, + 0xdd664707, 0xe41eea47, 0xf3368e87, 0x96efb0c7, 0x81c7d407, + 0xb8bf7947, 0xaf971d87, 0x730d05c7, 0x64256107, 0x5d5dcc47, + 0x4a75a887, 0x2fac96c7, 0x3884f207, 0x01fc5f47, 0x16d43b87, + 0x63b96986, 0x74910d46, 0x4de9a006, 0x5ac1c4c6, 0x3f18fa86, + 0x28309e46, 0x11483306, 0x066057c6, 0xdafa4f86, 0xcdd22b46, + 0xf4aa8606, 0xe382e2c6, 0x865bdc86, 0x9173b846, 0xa80b1506, + 0xbf2371c6, 0x42d1b104, 0x55f9d5c4, 0x6c817884, 0x7ba91c44, + 0x1e702204, 0x095846c4, 0x3020eb84, 0x27088f44, 0xfb929704, + 0xecbaf3c4, 0xd5c25e84, 0xc2ea3a44, 0xa7330404, 0xb01b60c4, + 0x8963cd84, 0x9e4ba944, 0xeb26fb45, 0xfc0e9f85, 0xc57632c5, + 0xd25e5605, 0xb7876845, 0xa0af0c85, 0x99d7a1c5, 0x8effc505, + 0x5265dd45, 0x454db985, 0x7c3514c5, 0x6b1d7005, 0x0ec44e45, + 0x19ec2a85, 0x209487c5, 0x37bce305, 0x4fed41cf, 0x58c5250f, + 0x61bd884f, 0x7695ec8f, 0x134cd2cf, 0x0464b60f, 0x3d1c1b4f, + 0x2a347f8f, 0xf6ae67cf, 0xe186030f, 0xd8feae4f, 0xcfd6ca8f, + 0xaa0ff4cf, 0xbd27900f, 0x845f3d4f, 0x9377598f, 0xe61a0b8e, + 0xf1326f4e, 0xc84ac20e, 0xdf62a6ce, 0xbabb988e, 0xad93fc4e, + 0x94eb510e, 0x83c335ce, 0x5f592d8e, 0x4871494e, 0x7109e40e, + 0x662180ce, 0x03f8be8e, 0x14d0da4e, 0x2da8770e, 0x3a8013ce, + 0xc772d30c, 0xd05ab7cc, 0xe9221a8c, 0xfe0a7e4c, 0x9bd3400c, + 0x8cfb24cc, 0xb583898c, 0xa2abed4c, 0x7e31f50c, 0x691991cc, + 0x50613c8c, 0x4749584c, 0x2290660c, 0x35b802cc, 0x0cc0af8c, + 0x1be8cb4c, 0x6e85994d, 0x79adfd8d, 0x40d550cd, 0x57fd340d, + 0x32240a4d, 0x250c6e8d, 0x1c74c3cd, 0x0b5ca70d, 0xd7c6bf4d, + 0xc0eedb8d, 0xf99676cd, 0xeebe120d, 0x8b672c4d, 0x9c4f488d, + 0xa537e5cd, 0xb21f810d, 0x85a36208, 0x928b06c8, 0xabf3ab88, + 0xbcdbcf48, 0xd902f108, 0xce2a95c8, 0xf7523888, 0xe07a5c48, + 0x3ce04408, 0x2bc820c8, 0x12b08d88, 0x0598e948, 0x6041d708, + 0x7769b3c8, 0x4e111e88, 0x59397a48, 0x2c542849, 0x3b7c4c89, + 0x0204e1c9, 0x152c8509, 0x70f5bb49, 0x67dddf89, 0x5ea572c9, + 0x498d1609, 0x95170e49, 0x823f6a89, 0xbb47c7c9, 0xac6fa309, + 0xc9b69d49, 0xde9ef989, 0xe7e654c9, 0xf0ce3009, 0x0d3cf0cb, + 0x1a14940b, 0x236c394b, 0x34445d8b, 0x519d63cb, 0x46b5070b, + 0x7fcdaa4b, 0x68e5ce8b, 0xb47fd6cb, 0xa357b20b, 0x9a2f1f4b, + 0x8d077b8b, 0xe8de45cb, 0xfff6210b, 0xc68e8c4b, 0xd1a6e88b, + 0xa4cbba8a, 0xb3e3de4a, 0x8a9b730a, 0x9db317ca, 0xf86a298a, + 0xef424d4a, 0xd63ae00a, 0xc11284ca, 0x1d889c8a, 0x0aa0f84a, + 0x33d8550a, 0x24f031ca, 0x41290f8a, 0x56016b4a, 0x6f79c60a, + 0x7851a2ca}, + {0x00000000, 0x9fda839e, 0xe4c4017d, 0x7b1e82e3, 0x12f904bb, + 0x8d238725, 0xf63d05c6, 0x69e78658, 0x25f20976, 0xba288ae8, + 0xc136080b, 0x5eec8b95, 0x370b0dcd, 0xa8d18e53, 0xd3cf0cb0, + 0x4c158f2e, 0x4be412ec, 0xd43e9172, 0xaf201391, 0x30fa900f, + 0x591d1657, 0xc6c795c9, 0xbdd9172a, 0x220394b4, 0x6e161b9a, + 0xf1cc9804, 0x8ad21ae7, 0x15089979, 0x7cef1f21, 0xe3359cbf, + 0x982b1e5c, 0x07f19dc2, 0x97c825d8, 0x0812a646, 0x730c24a5, + 0xecd6a73b, 0x85312163, 0x1aeba2fd, 0x61f5201e, 0xfe2fa380, + 0xb23a2cae, 0x2de0af30, 0x56fe2dd3, 0xc924ae4d, 0xa0c32815, + 0x3f19ab8b, 0x44072968, 0xdbddaaf6, 0xdc2c3734, 0x43f6b4aa, + 0x38e83649, 0xa732b5d7, 0xced5338f, 0x510fb011, 0x2a1132f2, + 0xb5cbb16c, 0xf9de3e42, 0x6604bddc, 0x1d1a3f3f, 0x82c0bca1, + 0xeb273af9, 0x74fdb967, 0x0fe33b84, 0x9039b81a, 0xf4e14df1, + 0x6b3bce6f, 0x10254c8c, 0x8fffcf12, 0xe618494a, 0x79c2cad4, + 0x02dc4837, 0x9d06cba9, 0xd1134487, 0x4ec9c719, 0x35d745fa, + 0xaa0dc664, 0xc3ea403c, 0x5c30c3a2, 0x272e4141, 0xb8f4c2df, + 0xbf055f1d, 0x20dfdc83, 0x5bc15e60, 0xc41bddfe, 0xadfc5ba6, + 0x3226d838, 0x49385adb, 0xd6e2d945, 0x9af7566b, 0x052dd5f5, + 0x7e335716, 0xe1e9d488, 0x880e52d0, 0x17d4d14e, 0x6cca53ad, + 0xf310d033, 0x63296829, 0xfcf3ebb7, 0x87ed6954, 0x1837eaca, + 0x71d06c92, 0xee0aef0c, 0x95146def, 0x0aceee71, 0x46db615f, + 0xd901e2c1, 0xa21f6022, 0x3dc5e3bc, 0x542265e4, 0xcbf8e67a, + 0xb0e66499, 0x2f3ce707, 0x28cd7ac5, 0xb717f95b, 0xcc097bb8, + 0x53d3f826, 0x3a347e7e, 0xa5eefde0, 0xdef07f03, 0x412afc9d, + 0x0d3f73b3, 0x92e5f02d, 0xe9fb72ce, 0x7621f150, 0x1fc67708, + 0x801cf496, 0xfb027675, 0x64d8f5eb, 0x32b39da3, 0xad691e3d, + 0xd6779cde, 0x49ad1f40, 0x204a9918, 0xbf901a86, 0xc48e9865, + 0x5b541bfb, 0x174194d5, 0x889b174b, 0xf38595a8, 0x6c5f1636, + 0x05b8906e, 0x9a6213f0, 0xe17c9113, 0x7ea6128d, 0x79578f4f, + 0xe68d0cd1, 0x9d938e32, 0x02490dac, 0x6bae8bf4, 0xf474086a, + 0x8f6a8a89, 0x10b00917, 0x5ca58639, 0xc37f05a7, 0xb8618744, + 0x27bb04da, 0x4e5c8282, 0xd186011c, 0xaa9883ff, 0x35420061, + 0xa57bb87b, 0x3aa13be5, 0x41bfb906, 0xde653a98, 0xb782bcc0, + 0x28583f5e, 0x5346bdbd, 0xcc9c3e23, 0x8089b10d, 0x1f533293, + 0x644db070, 0xfb9733ee, 0x9270b5b6, 0x0daa3628, 0x76b4b4cb, + 0xe96e3755, 0xee9faa97, 0x71452909, 0x0a5babea, 0x95812874, + 0xfc66ae2c, 0x63bc2db2, 0x18a2af51, 0x87782ccf, 0xcb6da3e1, + 0x54b7207f, 0x2fa9a29c, 0xb0732102, 0xd994a75a, 0x464e24c4, + 0x3d50a627, 0xa28a25b9, 0xc652d052, 0x598853cc, 0x2296d12f, + 0xbd4c52b1, 0xd4abd4e9, 0x4b715777, 0x306fd594, 0xafb5560a, + 0xe3a0d924, 0x7c7a5aba, 0x0764d859, 0x98be5bc7, 0xf159dd9f, + 0x6e835e01, 0x159ddce2, 0x8a475f7c, 0x8db6c2be, 0x126c4120, + 0x6972c3c3, 0xf6a8405d, 0x9f4fc605, 0x0095459b, 0x7b8bc778, + 0xe45144e6, 0xa844cbc8, 0x379e4856, 0x4c80cab5, 0xd35a492b, + 0xbabdcf73, 0x25674ced, 0x5e79ce0e, 0xc1a34d90, 0x519af58a, + 0xce407614, 0xb55ef4f7, 0x2a847769, 0x4363f131, 0xdcb972af, + 0xa7a7f04c, 0x387d73d2, 0x7468fcfc, 0xebb27f62, 0x90acfd81, + 0x0f767e1f, 0x6691f847, 0xf94b7bd9, 0x8255f93a, 0x1d8f7aa4, + 0x1a7ee766, 0x85a464f8, 0xfebae61b, 0x61606585, 0x0887e3dd, + 0x975d6043, 0xec43e2a0, 0x7399613e, 0x3f8cee10, 0xa0566d8e, + 0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6, + 0x566b6848}, + {0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59, + 0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4, + 0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67, + 0x7c9f7021, 0xe0c6ab25, 0x85a19063, 0x2a08dda9, 0x4f6fe6ef, + 0xae2b407c, 0xcb4c7b3a, 0x64e536f0, 0x01820db6, 0x7d1d7d97, + 0x187a46d1, 0xb7d30b1b, 0xd2b4305d, 0x33f096ce, 0x5697ad88, + 0xf93ee042, 0x9c59db04, 0x1afc500b, 0x7f9b6b4d, 0xd0322687, + 0xb5551dc1, 0x5411bb52, 0x31768014, 0x9edfcdde, 0xfbb8f698, + 0x872786b9, 0xe240bdff, 0x4de9f035, 0x288ecb73, 0xc9ca6de0, + 0xacad56a6, 0x03041b6c, 0x6663202a, 0xfa3afb2e, 0x9f5dc068, + 0x30f48da2, 0x5593b6e4, 0xb4d71077, 0xd1b02b31, 0x7e1966fb, + 0x1b7e5dbd, 0x67e12d9c, 0x028616da, 0xad2f5b10, 0xc8486056, + 0x290cc6c5, 0x4c6bfd83, 0xe3c2b049, 0x86a58b0f, 0x35f8a016, + 0x509f9b50, 0xff36d69a, 0x9a51eddc, 0x7b154b4f, 0x1e727009, + 0xb1db3dc3, 0xd4bc0685, 0xa82376a4, 0xcd444de2, 0x62ed0028, + 0x078a3b6e, 0xe6ce9dfd, 0x83a9a6bb, 0x2c00eb71, 0x4967d037, + 0xd53e0b33, 0xb0593075, 0x1ff07dbf, 0x7a9746f9, 0x9bd3e06a, + 0xfeb4db2c, 0x511d96e6, 0x347aada0, 0x48e5dd81, 0x2d82e6c7, + 0x822bab0d, 0xe74c904b, 0x060836d8, 0x636f0d9e, 0xccc64054, + 0xa9a17b12, 0x2f04f01d, 0x4a63cb5b, 0xe5ca8691, 0x80adbdd7, + 0x61e91b44, 0x048e2002, 0xab276dc8, 0xce40568e, 0xb2df26af, + 0xd7b81de9, 0x78115023, 0x1d766b65, 0xfc32cdf6, 0x9955f6b0, + 0x36fcbb7a, 0x539b803c, 0xcfc25b38, 0xaaa5607e, 0x050c2db4, + 0x606b16f2, 0x812fb061, 0xe4488b27, 0x4be1c6ed, 0x2e86fdab, + 0x52198d8a, 0x377eb6cc, 0x98d7fb06, 0xfdb0c040, 0x1cf466d3, + 0x79935d95, 0xd63a105f, 0xb35d2b19, 0x6bf1402c, 0x0e967b6a, + 0xa13f36a0, 0xc4580de6, 0x251cab75, 0x407b9033, 0xefd2ddf9, + 0x8ab5e6bf, 0xf62a969e, 0x934dadd8, 0x3ce4e012, 0x5983db54, + 0xb8c77dc7, 0xdda04681, 0x72090b4b, 0x176e300d, 0x8b37eb09, + 0xee50d04f, 0x41f99d85, 0x249ea6c3, 0xc5da0050, 0xa0bd3b16, + 0x0f1476dc, 0x6a734d9a, 0x16ec3dbb, 0x738b06fd, 0xdc224b37, + 0xb9457071, 0x5801d6e2, 0x3d66eda4, 0x92cfa06e, 0xf7a89b28, + 0x710d1027, 0x146a2b61, 0xbbc366ab, 0xdea45ded, 0x3fe0fb7e, + 0x5a87c038, 0xf52e8df2, 0x9049b6b4, 0xecd6c695, 0x89b1fdd3, + 0x2618b019, 0x437f8b5f, 0xa23b2dcc, 0xc75c168a, 0x68f55b40, + 0x0d926006, 0x91cbbb02, 0xf4ac8044, 0x5b05cd8e, 0x3e62f6c8, + 0xdf26505b, 0xba416b1d, 0x15e826d7, 0x708f1d91, 0x0c106db0, + 0x697756f6, 0xc6de1b3c, 0xa3b9207a, 0x42fd86e9, 0x279abdaf, + 0x8833f065, 0xed54cb23, 0x5e09e03a, 0x3b6edb7c, 0x94c796b6, + 0xf1a0adf0, 0x10e40b63, 0x75833025, 0xda2a7def, 0xbf4d46a9, + 0xc3d23688, 0xa6b50dce, 0x091c4004, 0x6c7b7b42, 0x8d3fddd1, + 0xe858e697, 0x47f1ab5d, 0x2296901b, 0xbecf4b1f, 0xdba87059, + 0x74013d93, 0x116606d5, 0xf022a046, 0x95459b00, 0x3aecd6ca, + 0x5f8bed8c, 0x23149dad, 0x4673a6eb, 0xe9daeb21, 0x8cbdd067, + 0x6df976f4, 0x089e4db2, 0xa7370078, 0xc2503b3e, 0x44f5b031, + 0x21928b77, 0x8e3bc6bd, 0xeb5cfdfb, 0x0a185b68, 0x6f7f602e, + 0xc0d62de4, 0xa5b116a2, 0xd92e6683, 0xbc495dc5, 0x13e0100f, + 0x76872b49, 0x97c38dda, 0xf2a4b69c, 0x5d0dfb56, 0x386ac010, + 0xa4331b14, 0xc1542052, 0x6efd6d98, 0x0b9a56de, 0xeadef04d, + 0x8fb9cb0b, 0x201086c1, 0x4577bd87, 0x39e8cda6, 0x5c8ff6e0, + 0xf326bb2a, 0x9641806c, 0x770526ff, 0x12621db9, 0xbdcb5073, + 0xd8ac6b35}, + {0x00000000, 0xd7e28058, 0x74b406f1, 0xa35686a9, 0xe9680de2, + 0x3e8a8dba, 0x9ddc0b13, 0x4a3e8b4b, 0x09a11d85, 0xde439ddd, + 0x7d151b74, 0xaaf79b2c, 0xe0c91067, 0x372b903f, 0x947d1696, + 0x439f96ce, 0x13423b0a, 0xc4a0bb52, 0x67f63dfb, 0xb014bda3, + 0xfa2a36e8, 0x2dc8b6b0, 0x8e9e3019, 0x597cb041, 0x1ae3268f, + 0xcd01a6d7, 0x6e57207e, 0xb9b5a026, 0xf38b2b6d, 0x2469ab35, + 0x873f2d9c, 0x50ddadc4, 0x26847614, 0xf166f64c, 0x523070e5, + 0x85d2f0bd, 0xcfec7bf6, 0x180efbae, 0xbb587d07, 0x6cbafd5f, + 0x2f256b91, 0xf8c7ebc9, 0x5b916d60, 0x8c73ed38, 0xc64d6673, + 0x11afe62b, 0xb2f96082, 0x651be0da, 0x35c64d1e, 0xe224cd46, + 0x41724bef, 0x9690cbb7, 0xdcae40fc, 0x0b4cc0a4, 0xa81a460d, + 0x7ff8c655, 0x3c67509b, 0xeb85d0c3, 0x48d3566a, 0x9f31d632, + 0xd50f5d79, 0x02eddd21, 0xa1bb5b88, 0x7659dbd0, 0x4d08ec28, + 0x9aea6c70, 0x39bcead9, 0xee5e6a81, 0xa460e1ca, 0x73826192, + 0xd0d4e73b, 0x07366763, 0x44a9f1ad, 0x934b71f5, 0x301df75c, + 0xe7ff7704, 0xadc1fc4f, 0x7a237c17, 0xd975fabe, 0x0e977ae6, + 0x5e4ad722, 0x89a8577a, 0x2afed1d3, 0xfd1c518b, 0xb722dac0, + 0x60c05a98, 0xc396dc31, 0x14745c69, 0x57ebcaa7, 0x80094aff, + 0x235fcc56, 0xf4bd4c0e, 0xbe83c745, 0x6961471d, 0xca37c1b4, + 0x1dd541ec, 0x6b8c9a3c, 0xbc6e1a64, 0x1f389ccd, 0xc8da1c95, + 0x82e497de, 0x55061786, 0xf650912f, 0x21b21177, 0x622d87b9, + 0xb5cf07e1, 0x16998148, 0xc17b0110, 0x8b458a5b, 0x5ca70a03, + 0xfff18caa, 0x28130cf2, 0x78cea136, 0xaf2c216e, 0x0c7aa7c7, + 0xdb98279f, 0x91a6acd4, 0x46442c8c, 0xe512aa25, 0x32f02a7d, + 0x716fbcb3, 0xa68d3ceb, 0x05dbba42, 0xd2393a1a, 0x9807b151, + 0x4fe53109, 0xecb3b7a0, 0x3b5137f8, 0x9a11d850, 0x4df35808, + 0xeea5dea1, 0x39475ef9, 0x7379d5b2, 0xa49b55ea, 0x07cdd343, + 0xd02f531b, 0x93b0c5d5, 0x4452458d, 0xe704c324, 0x30e6437c, + 0x7ad8c837, 0xad3a486f, 0x0e6ccec6, 0xd98e4e9e, 0x8953e35a, + 0x5eb16302, 0xfde7e5ab, 0x2a0565f3, 0x603beeb8, 0xb7d96ee0, + 0x148fe849, 0xc36d6811, 0x80f2fedf, 0x57107e87, 0xf446f82e, + 0x23a47876, 0x699af33d, 0xbe787365, 0x1d2ef5cc, 0xcacc7594, + 0xbc95ae44, 0x6b772e1c, 0xc821a8b5, 0x1fc328ed, 0x55fda3a6, + 0x821f23fe, 0x2149a557, 0xf6ab250f, 0xb534b3c1, 0x62d63399, + 0xc180b530, 0x16623568, 0x5c5cbe23, 0x8bbe3e7b, 0x28e8b8d2, + 0xff0a388a, 0xafd7954e, 0x78351516, 0xdb6393bf, 0x0c8113e7, + 0x46bf98ac, 0x915d18f4, 0x320b9e5d, 0xe5e91e05, 0xa67688cb, + 0x71940893, 0xd2c28e3a, 0x05200e62, 0x4f1e8529, 0x98fc0571, + 0x3baa83d8, 0xec480380, 0xd7193478, 0x00fbb420, 0xa3ad3289, + 0x744fb2d1, 0x3e71399a, 0xe993b9c2, 0x4ac53f6b, 0x9d27bf33, + 0xdeb829fd, 0x095aa9a5, 0xaa0c2f0c, 0x7deeaf54, 0x37d0241f, + 0xe032a447, 0x436422ee, 0x9486a2b6, 0xc45b0f72, 0x13b98f2a, + 0xb0ef0983, 0x670d89db, 0x2d330290, 0xfad182c8, 0x59870461, + 0x8e658439, 0xcdfa12f7, 0x1a1892af, 0xb94e1406, 0x6eac945e, + 0x24921f15, 0xf3709f4d, 0x502619e4, 0x87c499bc, 0xf19d426c, + 0x267fc234, 0x8529449d, 0x52cbc4c5, 0x18f54f8e, 0xcf17cfd6, + 0x6c41497f, 0xbba3c927, 0xf83c5fe9, 0x2fdedfb1, 0x8c885918, + 0x5b6ad940, 0x1154520b, 0xc6b6d253, 0x65e054fa, 0xb202d4a2, + 0xe2df7966, 0x353df93e, 0x966b7f97, 0x4189ffcf, 0x0bb77484, + 0xdc55f4dc, 0x7f037275, 0xa8e1f22d, 0xeb7e64e3, 0x3c9ce4bb, + 0x9fca6212, 0x4828e24a, 0x02166901, 0xd5f4e959, 0x76a26ff0, + 0xa140efa8}, + {0x00000000, 0xef52b6e1, 0x05d46b83, 0xea86dd62, 0x0ba8d706, + 0xe4fa61e7, 0x0e7cbc85, 0xe12e0a64, 0x1751ae0c, 0xf80318ed, + 0x1285c58f, 0xfdd7736e, 0x1cf9790a, 0xf3abcfeb, 0x192d1289, + 0xf67fa468, 0x2ea35c18, 0xc1f1eaf9, 0x2b77379b, 0xc425817a, + 0x250b8b1e, 0xca593dff, 0x20dfe09d, 0xcf8d567c, 0x39f2f214, + 0xd6a044f5, 0x3c269997, 0xd3742f76, 0x325a2512, 0xdd0893f3, + 0x378e4e91, 0xd8dcf870, 0x5d46b830, 0xb2140ed1, 0x5892d3b3, + 0xb7c06552, 0x56ee6f36, 0xb9bcd9d7, 0x533a04b5, 0xbc68b254, + 0x4a17163c, 0xa545a0dd, 0x4fc37dbf, 0xa091cb5e, 0x41bfc13a, + 0xaeed77db, 0x446baab9, 0xab391c58, 0x73e5e428, 0x9cb752c9, + 0x76318fab, 0x9963394a, 0x784d332e, 0x971f85cf, 0x7d9958ad, + 0x92cbee4c, 0x64b44a24, 0x8be6fcc5, 0x616021a7, 0x8e329746, + 0x6f1c9d22, 0x804e2bc3, 0x6ac8f6a1, 0x859a4040, 0xba8d7060, + 0x55dfc681, 0xbf591be3, 0x500bad02, 0xb125a766, 0x5e771187, + 0xb4f1cce5, 0x5ba37a04, 0xaddcde6c, 0x428e688d, 0xa808b5ef, + 0x475a030e, 0xa674096a, 0x4926bf8b, 0xa3a062e9, 0x4cf2d408, + 0x942e2c78, 0x7b7c9a99, 0x91fa47fb, 0x7ea8f11a, 0x9f86fb7e, + 0x70d44d9f, 0x9a5290fd, 0x7500261c, 0x837f8274, 0x6c2d3495, + 0x86abe9f7, 0x69f95f16, 0x88d75572, 0x6785e393, 0x8d033ef1, + 0x62518810, 0xe7cbc850, 0x08997eb1, 0xe21fa3d3, 0x0d4d1532, + 0xec631f56, 0x0331a9b7, 0xe9b774d5, 0x06e5c234, 0xf09a665c, + 0x1fc8d0bd, 0xf54e0ddf, 0x1a1cbb3e, 0xfb32b15a, 0x146007bb, + 0xfee6dad9, 0x11b46c38, 0xc9689448, 0x263a22a9, 0xccbcffcb, + 0x23ee492a, 0xc2c0434e, 0x2d92f5af, 0xc71428cd, 0x28469e2c, + 0xde393a44, 0x316b8ca5, 0xdbed51c7, 0x34bfe726, 0xd591ed42, + 0x3ac35ba3, 0xd04586c1, 0x3f173020, 0xae6be681, 0x41395060, + 0xabbf8d02, 0x44ed3be3, 0xa5c33187, 0x4a918766, 0xa0175a04, + 0x4f45ece5, 0xb93a488d, 0x5668fe6c, 0xbcee230e, 0x53bc95ef, + 0xb2929f8b, 0x5dc0296a, 0xb746f408, 0x581442e9, 0x80c8ba99, + 0x6f9a0c78, 0x851cd11a, 0x6a4e67fb, 0x8b606d9f, 0x6432db7e, + 0x8eb4061c, 0x61e6b0fd, 0x97991495, 0x78cba274, 0x924d7f16, + 0x7d1fc9f7, 0x9c31c393, 0x73637572, 0x99e5a810, 0x76b71ef1, + 0xf32d5eb1, 0x1c7fe850, 0xf6f93532, 0x19ab83d3, 0xf88589b7, + 0x17d73f56, 0xfd51e234, 0x120354d5, 0xe47cf0bd, 0x0b2e465c, + 0xe1a89b3e, 0x0efa2ddf, 0xefd427bb, 0x0086915a, 0xea004c38, + 0x0552fad9, 0xdd8e02a9, 0x32dcb448, 0xd85a692a, 0x3708dfcb, + 0xd626d5af, 0x3974634e, 0xd3f2be2c, 0x3ca008cd, 0xcadfaca5, + 0x258d1a44, 0xcf0bc726, 0x205971c7, 0xc1777ba3, 0x2e25cd42, + 0xc4a31020, 0x2bf1a6c1, 0x14e696e1, 0xfbb42000, 0x1132fd62, + 0xfe604b83, 0x1f4e41e7, 0xf01cf706, 0x1a9a2a64, 0xf5c89c85, + 0x03b738ed, 0xece58e0c, 0x0663536e, 0xe931e58f, 0x081fefeb, + 0xe74d590a, 0x0dcb8468, 0xe2993289, 0x3a45caf9, 0xd5177c18, + 0x3f91a17a, 0xd0c3179b, 0x31ed1dff, 0xdebfab1e, 0x3439767c, + 0xdb6bc09d, 0x2d1464f5, 0xc246d214, 0x28c00f76, 0xc792b997, + 0x26bcb3f3, 0xc9ee0512, 0x2368d870, 0xcc3a6e91, 0x49a02ed1, + 0xa6f29830, 0x4c744552, 0xa326f3b3, 0x4208f9d7, 0xad5a4f36, + 0x47dc9254, 0xa88e24b5, 0x5ef180dd, 0xb1a3363c, 0x5b25eb5e, + 0xb4775dbf, 0x555957db, 0xba0be13a, 0x508d3c58, 0xbfdf8ab9, + 0x670372c9, 0x8851c428, 0x62d7194a, 0x8d85afab, 0x6caba5cf, + 0x83f9132e, 0x697fce4c, 0x862d78ad, 0x7052dcc5, 0x9f006a24, + 0x7586b746, 0x9ad401a7, 0x7bfa0bc3, 0x94a8bd22, 0x7e2e6040, + 0x917cd6a1}, + {0x00000000, 0x87a6cb43, 0xd43c90c7, 0x539a5b84, 0x730827cf, + 0xf4aeec8c, 0xa734b708, 0x20927c4b, 0xe6104f9e, 0x61b684dd, + 0x322cdf59, 0xb58a141a, 0x95186851, 0x12bea312, 0x4124f896, + 0xc68233d5, 0x1751997d, 0x90f7523e, 0xc36d09ba, 0x44cbc2f9, + 0x6459beb2, 0xe3ff75f1, 0xb0652e75, 0x37c3e536, 0xf141d6e3, + 0x76e71da0, 0x257d4624, 0xa2db8d67, 0x8249f12c, 0x05ef3a6f, + 0x567561eb, 0xd1d3aaa8, 0x2ea332fa, 0xa905f9b9, 0xfa9fa23d, + 0x7d39697e, 0x5dab1535, 0xda0dde76, 0x899785f2, 0x0e314eb1, + 0xc8b37d64, 0x4f15b627, 0x1c8feda3, 0x9b2926e0, 0xbbbb5aab, + 0x3c1d91e8, 0x6f87ca6c, 0xe821012f, 0x39f2ab87, 0xbe5460c4, + 0xedce3b40, 0x6a68f003, 0x4afa8c48, 0xcd5c470b, 0x9ec61c8f, + 0x1960d7cc, 0xdfe2e419, 0x58442f5a, 0x0bde74de, 0x8c78bf9d, + 0xaceac3d6, 0x2b4c0895, 0x78d65311, 0xff709852, 0x5d4665f4, + 0xdae0aeb7, 0x897af533, 0x0edc3e70, 0x2e4e423b, 0xa9e88978, + 0xfa72d2fc, 0x7dd419bf, 0xbb562a6a, 0x3cf0e129, 0x6f6abaad, + 0xe8cc71ee, 0xc85e0da5, 0x4ff8c6e6, 0x1c629d62, 0x9bc45621, + 0x4a17fc89, 0xcdb137ca, 0x9e2b6c4e, 0x198da70d, 0x391fdb46, + 0xbeb91005, 0xed234b81, 0x6a8580c2, 0xac07b317, 0x2ba17854, + 0x783b23d0, 0xff9de893, 0xdf0f94d8, 0x58a95f9b, 0x0b33041f, + 0x8c95cf5c, 0x73e5570e, 0xf4439c4d, 0xa7d9c7c9, 0x207f0c8a, + 0x00ed70c1, 0x874bbb82, 0xd4d1e006, 0x53772b45, 0x95f51890, + 0x1253d3d3, 0x41c98857, 0xc66f4314, 0xe6fd3f5f, 0x615bf41c, + 0x32c1af98, 0xb56764db, 0x64b4ce73, 0xe3120530, 0xb0885eb4, + 0x372e95f7, 0x17bce9bc, 0x901a22ff, 0xc380797b, 0x4426b238, + 0x82a481ed, 0x05024aae, 0x5698112a, 0xd13eda69, 0xf1aca622, + 0x760a6d61, 0x259036e5, 0xa236fda6, 0xba8ccbe8, 0x3d2a00ab, + 0x6eb05b2f, 0xe916906c, 0xc984ec27, 0x4e222764, 0x1db87ce0, + 0x9a1eb7a3, 0x5c9c8476, 0xdb3a4f35, 0x88a014b1, 0x0f06dff2, + 0x2f94a3b9, 0xa83268fa, 0xfba8337e, 0x7c0ef83d, 0xaddd5295, + 0x2a7b99d6, 0x79e1c252, 0xfe470911, 0xded5755a, 0x5973be19, + 0x0ae9e59d, 0x8d4f2ede, 0x4bcd1d0b, 0xcc6bd648, 0x9ff18dcc, + 0x1857468f, 0x38c53ac4, 0xbf63f187, 0xecf9aa03, 0x6b5f6140, + 0x942ff912, 0x13893251, 0x401369d5, 0xc7b5a296, 0xe727dedd, + 0x6081159e, 0x331b4e1a, 0xb4bd8559, 0x723fb68c, 0xf5997dcf, + 0xa603264b, 0x21a5ed08, 0x01379143, 0x86915a00, 0xd50b0184, + 0x52adcac7, 0x837e606f, 0x04d8ab2c, 0x5742f0a8, 0xd0e43beb, + 0xf07647a0, 0x77d08ce3, 0x244ad767, 0xa3ec1c24, 0x656e2ff1, + 0xe2c8e4b2, 0xb152bf36, 0x36f47475, 0x1666083e, 0x91c0c37d, + 0xc25a98f9, 0x45fc53ba, 0xe7caae1c, 0x606c655f, 0x33f63edb, + 0xb450f598, 0x94c289d3, 0x13644290, 0x40fe1914, 0xc758d257, + 0x01dae182, 0x867c2ac1, 0xd5e67145, 0x5240ba06, 0x72d2c64d, + 0xf5740d0e, 0xa6ee568a, 0x21489dc9, 0xf09b3761, 0x773dfc22, + 0x24a7a7a6, 0xa3016ce5, 0x839310ae, 0x0435dbed, 0x57af8069, + 0xd0094b2a, 0x168b78ff, 0x912db3bc, 0xc2b7e838, 0x4511237b, + 0x65835f30, 0xe2259473, 0xb1bfcff7, 0x361904b4, 0xc9699ce6, + 0x4ecf57a5, 0x1d550c21, 0x9af3c762, 0xba61bb29, 0x3dc7706a, + 0x6e5d2bee, 0xe9fbe0ad, 0x2f79d378, 0xa8df183b, 0xfb4543bf, + 0x7ce388fc, 0x5c71f4b7, 0xdbd73ff4, 0x884d6470, 0x0febaf33, + 0xde38059b, 0x599eced8, 0x0a04955c, 0x8da25e1f, 0xad302254, + 0x2a96e917, 0x790cb293, 0xfeaa79d0, 0x38284a05, 0xbf8e8146, + 0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d, + 0x18ba364e}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0x43cba68700000000, 0xc7903cd400000000, + 0x845b9a5300000000, 0xcf27087300000000, 0x8cecaef400000000, + 0x08b734a700000000, 0x4b7c922000000000, 0x9e4f10e600000000, + 0xdd84b66100000000, 0x59df2c3200000000, 0x1a148ab500000000, + 0x5168189500000000, 0x12a3be1200000000, 0x96f8244100000000, + 0xd53382c600000000, 0x7d99511700000000, 0x3e52f79000000000, + 0xba096dc300000000, 0xf9c2cb4400000000, 0xb2be596400000000, + 0xf175ffe300000000, 0x752e65b000000000, 0x36e5c33700000000, + 0xe3d641f100000000, 0xa01de77600000000, 0x24467d2500000000, + 0x678ddba200000000, 0x2cf1498200000000, 0x6f3aef0500000000, + 0xeb61755600000000, 0xa8aad3d100000000, 0xfa32a32e00000000, + 0xb9f905a900000000, 0x3da29ffa00000000, 0x7e69397d00000000, + 0x3515ab5d00000000, 0x76de0dda00000000, 0xf285978900000000, + 0xb14e310e00000000, 0x647db3c800000000, 0x27b6154f00000000, + 0xa3ed8f1c00000000, 0xe026299b00000000, 0xab5abbbb00000000, + 0xe8911d3c00000000, 0x6cca876f00000000, 0x2f0121e800000000, + 0x87abf23900000000, 0xc46054be00000000, 0x403bceed00000000, + 0x03f0686a00000000, 0x488cfa4a00000000, 0x0b475ccd00000000, + 0x8f1cc69e00000000, 0xccd7601900000000, 0x19e4e2df00000000, + 0x5a2f445800000000, 0xde74de0b00000000, 0x9dbf788c00000000, + 0xd6c3eaac00000000, 0x95084c2b00000000, 0x1153d67800000000, + 0x529870ff00000000, 0xf465465d00000000, 0xb7aee0da00000000, + 0x33f57a8900000000, 0x703edc0e00000000, 0x3b424e2e00000000, + 0x7889e8a900000000, 0xfcd272fa00000000, 0xbf19d47d00000000, + 0x6a2a56bb00000000, 0x29e1f03c00000000, 0xadba6a6f00000000, + 0xee71cce800000000, 0xa50d5ec800000000, 0xe6c6f84f00000000, + 0x629d621c00000000, 0x2156c49b00000000, 0x89fc174a00000000, + 0xca37b1cd00000000, 0x4e6c2b9e00000000, 0x0da78d1900000000, + 0x46db1f3900000000, 0x0510b9be00000000, 0x814b23ed00000000, + 0xc280856a00000000, 0x17b307ac00000000, 0x5478a12b00000000, + 0xd0233b7800000000, 0x93e89dff00000000, 0xd8940fdf00000000, + 0x9b5fa95800000000, 0x1f04330b00000000, 0x5ccf958c00000000, + 0x0e57e57300000000, 0x4d9c43f400000000, 0xc9c7d9a700000000, + 0x8a0c7f2000000000, 0xc170ed0000000000, 0x82bb4b8700000000, + 0x06e0d1d400000000, 0x452b775300000000, 0x9018f59500000000, + 0xd3d3531200000000, 0x5788c94100000000, 0x14436fc600000000, + 0x5f3ffde600000000, 0x1cf45b6100000000, 0x98afc13200000000, + 0xdb6467b500000000, 0x73ceb46400000000, 0x300512e300000000, + 0xb45e88b000000000, 0xf7952e3700000000, 0xbce9bc1700000000, + 0xff221a9000000000, 0x7b7980c300000000, 0x38b2264400000000, + 0xed81a48200000000, 0xae4a020500000000, 0x2a11985600000000, + 0x69da3ed100000000, 0x22a6acf100000000, 0x616d0a7600000000, + 0xe536902500000000, 0xa6fd36a200000000, 0xe8cb8cba00000000, + 0xab002a3d00000000, 0x2f5bb06e00000000, 0x6c9016e900000000, + 0x27ec84c900000000, 0x6427224e00000000, 0xe07cb81d00000000, + 0xa3b71e9a00000000, 0x76849c5c00000000, 0x354f3adb00000000, + 0xb114a08800000000, 0xf2df060f00000000, 0xb9a3942f00000000, + 0xfa6832a800000000, 0x7e33a8fb00000000, 0x3df80e7c00000000, + 0x9552ddad00000000, 0xd6997b2a00000000, 0x52c2e17900000000, + 0x110947fe00000000, 0x5a75d5de00000000, 0x19be735900000000, + 0x9de5e90a00000000, 0xde2e4f8d00000000, 0x0b1dcd4b00000000, + 0x48d66bcc00000000, 0xcc8df19f00000000, 0x8f46571800000000, + 0xc43ac53800000000, 0x87f163bf00000000, 0x03aaf9ec00000000, + 0x40615f6b00000000, 0x12f92f9400000000, 0x5132891300000000, + 0xd569134000000000, 0x96a2b5c700000000, 0xddde27e700000000, + 0x9e15816000000000, 0x1a4e1b3300000000, 0x5985bdb400000000, + 0x8cb63f7200000000, 0xcf7d99f500000000, 0x4b2603a600000000, + 0x08eda52100000000, 0x4391370100000000, 0x005a918600000000, + 0x84010bd500000000, 0xc7caad5200000000, 0x6f607e8300000000, + 0x2cabd80400000000, 0xa8f0425700000000, 0xeb3be4d000000000, + 0xa04776f000000000, 0xe38cd07700000000, 0x67d74a2400000000, + 0x241ceca300000000, 0xf12f6e6500000000, 0xb2e4c8e200000000, + 0x36bf52b100000000, 0x7574f43600000000, 0x3e08661600000000, + 0x7dc3c09100000000, 0xf9985ac200000000, 0xba53fc4500000000, + 0x1caecae700000000, 0x5f656c6000000000, 0xdb3ef63300000000, + 0x98f550b400000000, 0xd389c29400000000, 0x9042641300000000, + 0x1419fe4000000000, 0x57d258c700000000, 0x82e1da0100000000, + 0xc12a7c8600000000, 0x4571e6d500000000, 0x06ba405200000000, + 0x4dc6d27200000000, 0x0e0d74f500000000, 0x8a56eea600000000, + 0xc99d482100000000, 0x61379bf000000000, 0x22fc3d7700000000, + 0xa6a7a72400000000, 0xe56c01a300000000, 0xae10938300000000, + 0xeddb350400000000, 0x6980af5700000000, 0x2a4b09d000000000, + 0xff788b1600000000, 0xbcb32d9100000000, 0x38e8b7c200000000, + 0x7b23114500000000, 0x305f836500000000, 0x739425e200000000, + 0xf7cfbfb100000000, 0xb404193600000000, 0xe69c69c900000000, + 0xa557cf4e00000000, 0x210c551d00000000, 0x62c7f39a00000000, + 0x29bb61ba00000000, 0x6a70c73d00000000, 0xee2b5d6e00000000, + 0xade0fbe900000000, 0x78d3792f00000000, 0x3b18dfa800000000, + 0xbf4345fb00000000, 0xfc88e37c00000000, 0xb7f4715c00000000, + 0xf43fd7db00000000, 0x70644d8800000000, 0x33afeb0f00000000, + 0x9b0538de00000000, 0xd8ce9e5900000000, 0x5c95040a00000000, + 0x1f5ea28d00000000, 0x542230ad00000000, 0x17e9962a00000000, + 0x93b20c7900000000, 0xd079aafe00000000, 0x054a283800000000, + 0x46818ebf00000000, 0xc2da14ec00000000, 0x8111b26b00000000, + 0xca6d204b00000000, 0x89a686cc00000000, 0x0dfd1c9f00000000, + 0x4e36ba1800000000}, + {0x0000000000000000, 0xe1b652ef00000000, 0x836bd40500000000, + 0x62dd86ea00000000, 0x06d7a80b00000000, 0xe761fae400000000, + 0x85bc7c0e00000000, 0x640a2ee100000000, 0x0cae511700000000, + 0xed1803f800000000, 0x8fc5851200000000, 0x6e73d7fd00000000, + 0x0a79f91c00000000, 0xebcfabf300000000, 0x89122d1900000000, + 0x68a47ff600000000, 0x185ca32e00000000, 0xf9eaf1c100000000, + 0x9b37772b00000000, 0x7a8125c400000000, 0x1e8b0b2500000000, + 0xff3d59ca00000000, 0x9de0df2000000000, 0x7c568dcf00000000, + 0x14f2f23900000000, 0xf544a0d600000000, 0x9799263c00000000, + 0x762f74d300000000, 0x12255a3200000000, 0xf39308dd00000000, + 0x914e8e3700000000, 0x70f8dcd800000000, 0x30b8465d00000000, + 0xd10e14b200000000, 0xb3d3925800000000, 0x5265c0b700000000, + 0x366fee5600000000, 0xd7d9bcb900000000, 0xb5043a5300000000, + 0x54b268bc00000000, 0x3c16174a00000000, 0xdda045a500000000, + 0xbf7dc34f00000000, 0x5ecb91a000000000, 0x3ac1bf4100000000, + 0xdb77edae00000000, 0xb9aa6b4400000000, 0x581c39ab00000000, + 0x28e4e57300000000, 0xc952b79c00000000, 0xab8f317600000000, + 0x4a39639900000000, 0x2e334d7800000000, 0xcf851f9700000000, + 0xad58997d00000000, 0x4ceecb9200000000, 0x244ab46400000000, + 0xc5fce68b00000000, 0xa721606100000000, 0x4697328e00000000, + 0x229d1c6f00000000, 0xc32b4e8000000000, 0xa1f6c86a00000000, + 0x40409a8500000000, 0x60708dba00000000, 0x81c6df5500000000, + 0xe31b59bf00000000, 0x02ad0b5000000000, 0x66a725b100000000, + 0x8711775e00000000, 0xe5ccf1b400000000, 0x047aa35b00000000, + 0x6cdedcad00000000, 0x8d688e4200000000, 0xefb508a800000000, + 0x0e035a4700000000, 0x6a0974a600000000, 0x8bbf264900000000, + 0xe962a0a300000000, 0x08d4f24c00000000, 0x782c2e9400000000, + 0x999a7c7b00000000, 0xfb47fa9100000000, 0x1af1a87e00000000, + 0x7efb869f00000000, 0x9f4dd47000000000, 0xfd90529a00000000, + 0x1c26007500000000, 0x74827f8300000000, 0x95342d6c00000000, + 0xf7e9ab8600000000, 0x165ff96900000000, 0x7255d78800000000, + 0x93e3856700000000, 0xf13e038d00000000, 0x1088516200000000, + 0x50c8cbe700000000, 0xb17e990800000000, 0xd3a31fe200000000, + 0x32154d0d00000000, 0x561f63ec00000000, 0xb7a9310300000000, + 0xd574b7e900000000, 0x34c2e50600000000, 0x5c669af000000000, + 0xbdd0c81f00000000, 0xdf0d4ef500000000, 0x3ebb1c1a00000000, + 0x5ab132fb00000000, 0xbb07601400000000, 0xd9dae6fe00000000, + 0x386cb41100000000, 0x489468c900000000, 0xa9223a2600000000, + 0xcbffbccc00000000, 0x2a49ee2300000000, 0x4e43c0c200000000, + 0xaff5922d00000000, 0xcd2814c700000000, 0x2c9e462800000000, + 0x443a39de00000000, 0xa58c6b3100000000, 0xc751eddb00000000, + 0x26e7bf3400000000, 0x42ed91d500000000, 0xa35bc33a00000000, + 0xc18645d000000000, 0x2030173f00000000, 0x81e66bae00000000, + 0x6050394100000000, 0x028dbfab00000000, 0xe33bed4400000000, + 0x8731c3a500000000, 0x6687914a00000000, 0x045a17a000000000, + 0xe5ec454f00000000, 0x8d483ab900000000, 0x6cfe685600000000, + 0x0e23eebc00000000, 0xef95bc5300000000, 0x8b9f92b200000000, + 0x6a29c05d00000000, 0x08f446b700000000, 0xe942145800000000, + 0x99bac88000000000, 0x780c9a6f00000000, 0x1ad11c8500000000, + 0xfb674e6a00000000, 0x9f6d608b00000000, 0x7edb326400000000, + 0x1c06b48e00000000, 0xfdb0e66100000000, 0x9514999700000000, + 0x74a2cb7800000000, 0x167f4d9200000000, 0xf7c91f7d00000000, + 0x93c3319c00000000, 0x7275637300000000, 0x10a8e59900000000, + 0xf11eb77600000000, 0xb15e2df300000000, 0x50e87f1c00000000, + 0x3235f9f600000000, 0xd383ab1900000000, 0xb78985f800000000, + 0x563fd71700000000, 0x34e251fd00000000, 0xd554031200000000, + 0xbdf07ce400000000, 0x5c462e0b00000000, 0x3e9ba8e100000000, + 0xdf2dfa0e00000000, 0xbb27d4ef00000000, 0x5a91860000000000, + 0x384c00ea00000000, 0xd9fa520500000000, 0xa9028edd00000000, + 0x48b4dc3200000000, 0x2a695ad800000000, 0xcbdf083700000000, + 0xafd526d600000000, 0x4e63743900000000, 0x2cbef2d300000000, + 0xcd08a03c00000000, 0xa5acdfca00000000, 0x441a8d2500000000, + 0x26c70bcf00000000, 0xc771592000000000, 0xa37b77c100000000, + 0x42cd252e00000000, 0x2010a3c400000000, 0xc1a6f12b00000000, + 0xe196e61400000000, 0x0020b4fb00000000, 0x62fd321100000000, + 0x834b60fe00000000, 0xe7414e1f00000000, 0x06f71cf000000000, + 0x642a9a1a00000000, 0x859cc8f500000000, 0xed38b70300000000, + 0x0c8ee5ec00000000, 0x6e53630600000000, 0x8fe531e900000000, + 0xebef1f0800000000, 0x0a594de700000000, 0x6884cb0d00000000, + 0x893299e200000000, 0xf9ca453a00000000, 0x187c17d500000000, + 0x7aa1913f00000000, 0x9b17c3d000000000, 0xff1ded3100000000, + 0x1eabbfde00000000, 0x7c76393400000000, 0x9dc06bdb00000000, + 0xf564142d00000000, 0x14d246c200000000, 0x760fc02800000000, + 0x97b992c700000000, 0xf3b3bc2600000000, 0x1205eec900000000, + 0x70d8682300000000, 0x916e3acc00000000, 0xd12ea04900000000, + 0x3098f2a600000000, 0x5245744c00000000, 0xb3f326a300000000, + 0xd7f9084200000000, 0x364f5aad00000000, 0x5492dc4700000000, + 0xb5248ea800000000, 0xdd80f15e00000000, 0x3c36a3b100000000, + 0x5eeb255b00000000, 0xbf5d77b400000000, 0xdb57595500000000, + 0x3ae10bba00000000, 0x583c8d5000000000, 0xb98adfbf00000000, + 0xc972036700000000, 0x28c4518800000000, 0x4a19d76200000000, + 0xabaf858d00000000, 0xcfa5ab6c00000000, 0x2e13f98300000000, + 0x4cce7f6900000000, 0xad782d8600000000, 0xc5dc527000000000, + 0x246a009f00000000, 0x46b7867500000000, 0xa701d49a00000000, + 0xc30bfa7b00000000, 0x22bda89400000000, 0x40602e7e00000000, + 0xa1d67c9100000000}, + {0x0000000000000000, 0x5880e2d700000000, 0xf106b47400000000, + 0xa98656a300000000, 0xe20d68e900000000, 0xba8d8a3e00000000, + 0x130bdc9d00000000, 0x4b8b3e4a00000000, 0x851da10900000000, + 0xdd9d43de00000000, 0x741b157d00000000, 0x2c9bf7aa00000000, + 0x6710c9e000000000, 0x3f902b3700000000, 0x96167d9400000000, + 0xce969f4300000000, 0x0a3b421300000000, 0x52bba0c400000000, + 0xfb3df66700000000, 0xa3bd14b000000000, 0xe8362afa00000000, + 0xb0b6c82d00000000, 0x19309e8e00000000, 0x41b07c5900000000, + 0x8f26e31a00000000, 0xd7a601cd00000000, 0x7e20576e00000000, + 0x26a0b5b900000000, 0x6d2b8bf300000000, 0x35ab692400000000, + 0x9c2d3f8700000000, 0xc4addd5000000000, 0x1476842600000000, + 0x4cf666f100000000, 0xe570305200000000, 0xbdf0d28500000000, + 0xf67beccf00000000, 0xaefb0e1800000000, 0x077d58bb00000000, + 0x5ffdba6c00000000, 0x916b252f00000000, 0xc9ebc7f800000000, + 0x606d915b00000000, 0x38ed738c00000000, 0x73664dc600000000, + 0x2be6af1100000000, 0x8260f9b200000000, 0xdae01b6500000000, + 0x1e4dc63500000000, 0x46cd24e200000000, 0xef4b724100000000, + 0xb7cb909600000000, 0xfc40aedc00000000, 0xa4c04c0b00000000, + 0x0d461aa800000000, 0x55c6f87f00000000, 0x9b50673c00000000, + 0xc3d085eb00000000, 0x6a56d34800000000, 0x32d6319f00000000, + 0x795d0fd500000000, 0x21dded0200000000, 0x885bbba100000000, + 0xd0db597600000000, 0x28ec084d00000000, 0x706cea9a00000000, + 0xd9eabc3900000000, 0x816a5eee00000000, 0xcae160a400000000, + 0x9261827300000000, 0x3be7d4d000000000, 0x6367360700000000, + 0xadf1a94400000000, 0xf5714b9300000000, 0x5cf71d3000000000, + 0x0477ffe700000000, 0x4ffcc1ad00000000, 0x177c237a00000000, + 0xbefa75d900000000, 0xe67a970e00000000, 0x22d74a5e00000000, + 0x7a57a88900000000, 0xd3d1fe2a00000000, 0x8b511cfd00000000, + 0xc0da22b700000000, 0x985ac06000000000, 0x31dc96c300000000, + 0x695c741400000000, 0xa7caeb5700000000, 0xff4a098000000000, + 0x56cc5f2300000000, 0x0e4cbdf400000000, 0x45c783be00000000, + 0x1d47616900000000, 0xb4c137ca00000000, 0xec41d51d00000000, + 0x3c9a8c6b00000000, 0x641a6ebc00000000, 0xcd9c381f00000000, + 0x951cdac800000000, 0xde97e48200000000, 0x8617065500000000, + 0x2f9150f600000000, 0x7711b22100000000, 0xb9872d6200000000, + 0xe107cfb500000000, 0x4881991600000000, 0x10017bc100000000, + 0x5b8a458b00000000, 0x030aa75c00000000, 0xaa8cf1ff00000000, + 0xf20c132800000000, 0x36a1ce7800000000, 0x6e212caf00000000, + 0xc7a77a0c00000000, 0x9f2798db00000000, 0xd4aca69100000000, + 0x8c2c444600000000, 0x25aa12e500000000, 0x7d2af03200000000, + 0xb3bc6f7100000000, 0xeb3c8da600000000, 0x42badb0500000000, + 0x1a3a39d200000000, 0x51b1079800000000, 0x0931e54f00000000, + 0xa0b7b3ec00000000, 0xf837513b00000000, 0x50d8119a00000000, + 0x0858f34d00000000, 0xa1dea5ee00000000, 0xf95e473900000000, + 0xb2d5797300000000, 0xea559ba400000000, 0x43d3cd0700000000, + 0x1b532fd000000000, 0xd5c5b09300000000, 0x8d45524400000000, + 0x24c304e700000000, 0x7c43e63000000000, 0x37c8d87a00000000, + 0x6f483aad00000000, 0xc6ce6c0e00000000, 0x9e4e8ed900000000, + 0x5ae3538900000000, 0x0263b15e00000000, 0xabe5e7fd00000000, + 0xf365052a00000000, 0xb8ee3b6000000000, 0xe06ed9b700000000, + 0x49e88f1400000000, 0x11686dc300000000, 0xdffef28000000000, + 0x877e105700000000, 0x2ef846f400000000, 0x7678a42300000000, + 0x3df39a6900000000, 0x657378be00000000, 0xccf52e1d00000000, + 0x9475ccca00000000, 0x44ae95bc00000000, 0x1c2e776b00000000, + 0xb5a821c800000000, 0xed28c31f00000000, 0xa6a3fd5500000000, + 0xfe231f8200000000, 0x57a5492100000000, 0x0f25abf600000000, + 0xc1b334b500000000, 0x9933d66200000000, 0x30b580c100000000, + 0x6835621600000000, 0x23be5c5c00000000, 0x7b3ebe8b00000000, + 0xd2b8e82800000000, 0x8a380aff00000000, 0x4e95d7af00000000, + 0x1615357800000000, 0xbf9363db00000000, 0xe713810c00000000, + 0xac98bf4600000000, 0xf4185d9100000000, 0x5d9e0b3200000000, + 0x051ee9e500000000, 0xcb8876a600000000, 0x9308947100000000, + 0x3a8ec2d200000000, 0x620e200500000000, 0x29851e4f00000000, + 0x7105fc9800000000, 0xd883aa3b00000000, 0x800348ec00000000, + 0x783419d700000000, 0x20b4fb0000000000, 0x8932ada300000000, + 0xd1b24f7400000000, 0x9a39713e00000000, 0xc2b993e900000000, + 0x6b3fc54a00000000, 0x33bf279d00000000, 0xfd29b8de00000000, + 0xa5a95a0900000000, 0x0c2f0caa00000000, 0x54afee7d00000000, + 0x1f24d03700000000, 0x47a432e000000000, 0xee22644300000000, + 0xb6a2869400000000, 0x720f5bc400000000, 0x2a8fb91300000000, + 0x8309efb000000000, 0xdb890d6700000000, 0x9002332d00000000, + 0xc882d1fa00000000, 0x6104875900000000, 0x3984658e00000000, + 0xf712facd00000000, 0xaf92181a00000000, 0x06144eb900000000, + 0x5e94ac6e00000000, 0x151f922400000000, 0x4d9f70f300000000, + 0xe419265000000000, 0xbc99c48700000000, 0x6c429df100000000, + 0x34c27f2600000000, 0x9d44298500000000, 0xc5c4cb5200000000, + 0x8e4ff51800000000, 0xd6cf17cf00000000, 0x7f49416c00000000, + 0x27c9a3bb00000000, 0xe95f3cf800000000, 0xb1dfde2f00000000, + 0x1859888c00000000, 0x40d96a5b00000000, 0x0b52541100000000, + 0x53d2b6c600000000, 0xfa54e06500000000, 0xa2d402b200000000, + 0x6679dfe200000000, 0x3ef93d3500000000, 0x977f6b9600000000, + 0xcfff894100000000, 0x8474b70b00000000, 0xdcf455dc00000000, + 0x7572037f00000000, 0x2df2e1a800000000, 0xe3647eeb00000000, + 0xbbe49c3c00000000, 0x1262ca9f00000000, 0x4ae2284800000000, + 0x0169160200000000, 0x59e9f4d500000000, 0xf06fa27600000000, + 0xa8ef40a100000000}, + {0x0000000000000000, 0x463b676500000000, 0x8c76ceca00000000, + 0xca4da9af00000000, 0x59ebed4e00000000, 0x1fd08a2b00000000, + 0xd59d238400000000, 0x93a644e100000000, 0xb2d6db9d00000000, + 0xf4edbcf800000000, 0x3ea0155700000000, 0x789b723200000000, + 0xeb3d36d300000000, 0xad0651b600000000, 0x674bf81900000000, + 0x21709f7c00000000, 0x25abc6e000000000, 0x6390a18500000000, + 0xa9dd082a00000000, 0xefe66f4f00000000, 0x7c402bae00000000, + 0x3a7b4ccb00000000, 0xf036e56400000000, 0xb60d820100000000, + 0x977d1d7d00000000, 0xd1467a1800000000, 0x1b0bd3b700000000, + 0x5d30b4d200000000, 0xce96f03300000000, 0x88ad975600000000, + 0x42e03ef900000000, 0x04db599c00000000, 0x0b50fc1a00000000, + 0x4d6b9b7f00000000, 0x872632d000000000, 0xc11d55b500000000, + 0x52bb115400000000, 0x1480763100000000, 0xdecddf9e00000000, + 0x98f6b8fb00000000, 0xb986278700000000, 0xffbd40e200000000, + 0x35f0e94d00000000, 0x73cb8e2800000000, 0xe06dcac900000000, + 0xa656adac00000000, 0x6c1b040300000000, 0x2a20636600000000, + 0x2efb3afa00000000, 0x68c05d9f00000000, 0xa28df43000000000, + 0xe4b6935500000000, 0x7710d7b400000000, 0x312bb0d100000000, + 0xfb66197e00000000, 0xbd5d7e1b00000000, 0x9c2de16700000000, + 0xda16860200000000, 0x105b2fad00000000, 0x566048c800000000, + 0xc5c60c2900000000, 0x83fd6b4c00000000, 0x49b0c2e300000000, + 0x0f8ba58600000000, 0x16a0f83500000000, 0x509b9f5000000000, + 0x9ad636ff00000000, 0xdced519a00000000, 0x4f4b157b00000000, + 0x0970721e00000000, 0xc33ddbb100000000, 0x8506bcd400000000, + 0xa47623a800000000, 0xe24d44cd00000000, 0x2800ed6200000000, + 0x6e3b8a0700000000, 0xfd9dcee600000000, 0xbba6a98300000000, + 0x71eb002c00000000, 0x37d0674900000000, 0x330b3ed500000000, + 0x753059b000000000, 0xbf7df01f00000000, 0xf946977a00000000, + 0x6ae0d39b00000000, 0x2cdbb4fe00000000, 0xe6961d5100000000, + 0xa0ad7a3400000000, 0x81dde54800000000, 0xc7e6822d00000000, + 0x0dab2b8200000000, 0x4b904ce700000000, 0xd836080600000000, + 0x9e0d6f6300000000, 0x5440c6cc00000000, 0x127ba1a900000000, + 0x1df0042f00000000, 0x5bcb634a00000000, 0x9186cae500000000, + 0xd7bdad8000000000, 0x441be96100000000, 0x02208e0400000000, + 0xc86d27ab00000000, 0x8e5640ce00000000, 0xaf26dfb200000000, + 0xe91db8d700000000, 0x2350117800000000, 0x656b761d00000000, + 0xf6cd32fc00000000, 0xb0f6559900000000, 0x7abbfc3600000000, + 0x3c809b5300000000, 0x385bc2cf00000000, 0x7e60a5aa00000000, + 0xb42d0c0500000000, 0xf2166b6000000000, 0x61b02f8100000000, + 0x278b48e400000000, 0xedc6e14b00000000, 0xabfd862e00000000, + 0x8a8d195200000000, 0xccb67e3700000000, 0x06fbd79800000000, + 0x40c0b0fd00000000, 0xd366f41c00000000, 0x955d937900000000, + 0x5f103ad600000000, 0x192b5db300000000, 0x2c40f16b00000000, + 0x6a7b960e00000000, 0xa0363fa100000000, 0xe60d58c400000000, + 0x75ab1c2500000000, 0x33907b4000000000, 0xf9ddd2ef00000000, + 0xbfe6b58a00000000, 0x9e962af600000000, 0xd8ad4d9300000000, + 0x12e0e43c00000000, 0x54db835900000000, 0xc77dc7b800000000, + 0x8146a0dd00000000, 0x4b0b097200000000, 0x0d306e1700000000, + 0x09eb378b00000000, 0x4fd050ee00000000, 0x859df94100000000, + 0xc3a69e2400000000, 0x5000dac500000000, 0x163bbda000000000, + 0xdc76140f00000000, 0x9a4d736a00000000, 0xbb3dec1600000000, + 0xfd068b7300000000, 0x374b22dc00000000, 0x717045b900000000, + 0xe2d6015800000000, 0xa4ed663d00000000, 0x6ea0cf9200000000, + 0x289ba8f700000000, 0x27100d7100000000, 0x612b6a1400000000, + 0xab66c3bb00000000, 0xed5da4de00000000, 0x7efbe03f00000000, + 0x38c0875a00000000, 0xf28d2ef500000000, 0xb4b6499000000000, + 0x95c6d6ec00000000, 0xd3fdb18900000000, 0x19b0182600000000, + 0x5f8b7f4300000000, 0xcc2d3ba200000000, 0x8a165cc700000000, + 0x405bf56800000000, 0x0660920d00000000, 0x02bbcb9100000000, + 0x4480acf400000000, 0x8ecd055b00000000, 0xc8f6623e00000000, + 0x5b5026df00000000, 0x1d6b41ba00000000, 0xd726e81500000000, + 0x911d8f7000000000, 0xb06d100c00000000, 0xf656776900000000, + 0x3c1bdec600000000, 0x7a20b9a300000000, 0xe986fd4200000000, + 0xafbd9a2700000000, 0x65f0338800000000, 0x23cb54ed00000000, + 0x3ae0095e00000000, 0x7cdb6e3b00000000, 0xb696c79400000000, + 0xf0ada0f100000000, 0x630be41000000000, 0x2530837500000000, + 0xef7d2ada00000000, 0xa9464dbf00000000, 0x8836d2c300000000, + 0xce0db5a600000000, 0x04401c0900000000, 0x427b7b6c00000000, + 0xd1dd3f8d00000000, 0x97e658e800000000, 0x5dabf14700000000, + 0x1b90962200000000, 0x1f4bcfbe00000000, 0x5970a8db00000000, + 0x933d017400000000, 0xd506661100000000, 0x46a022f000000000, + 0x009b459500000000, 0xcad6ec3a00000000, 0x8ced8b5f00000000, + 0xad9d142300000000, 0xeba6734600000000, 0x21ebdae900000000, + 0x67d0bd8c00000000, 0xf476f96d00000000, 0xb24d9e0800000000, + 0x780037a700000000, 0x3e3b50c200000000, 0x31b0f54400000000, + 0x778b922100000000, 0xbdc63b8e00000000, 0xfbfd5ceb00000000, + 0x685b180a00000000, 0x2e607f6f00000000, 0xe42dd6c000000000, + 0xa216b1a500000000, 0x83662ed900000000, 0xc55d49bc00000000, + 0x0f10e01300000000, 0x492b877600000000, 0xda8dc39700000000, + 0x9cb6a4f200000000, 0x56fb0d5d00000000, 0x10c06a3800000000, + 0x141b33a400000000, 0x522054c100000000, 0x986dfd6e00000000, + 0xde569a0b00000000, 0x4df0deea00000000, 0x0bcbb98f00000000, + 0xc186102000000000, 0x87bd774500000000, 0xa6cde83900000000, + 0xe0f68f5c00000000, 0x2abb26f300000000, 0x6c80419600000000, + 0xff26057700000000, 0xb91d621200000000, 0x7350cbbd00000000, + 0x356bacd800000000}, + {0x0000000000000000, 0x9e83da9f00000000, 0x7d01c4e400000000, + 0xe3821e7b00000000, 0xbb04f91200000000, 0x2587238d00000000, + 0xc6053df600000000, 0x5886e76900000000, 0x7609f22500000000, + 0xe88a28ba00000000, 0x0b0836c100000000, 0x958bec5e00000000, + 0xcd0d0b3700000000, 0x538ed1a800000000, 0xb00ccfd300000000, + 0x2e8f154c00000000, 0xec12e44b00000000, 0x72913ed400000000, + 0x911320af00000000, 0x0f90fa3000000000, 0x57161d5900000000, + 0xc995c7c600000000, 0x2a17d9bd00000000, 0xb494032200000000, + 0x9a1b166e00000000, 0x0498ccf100000000, 0xe71ad28a00000000, + 0x7999081500000000, 0x211fef7c00000000, 0xbf9c35e300000000, + 0x5c1e2b9800000000, 0xc29df10700000000, 0xd825c89700000000, + 0x46a6120800000000, 0xa5240c7300000000, 0x3ba7d6ec00000000, + 0x6321318500000000, 0xfda2eb1a00000000, 0x1e20f56100000000, + 0x80a32ffe00000000, 0xae2c3ab200000000, 0x30afe02d00000000, + 0xd32dfe5600000000, 0x4dae24c900000000, 0x1528c3a000000000, + 0x8bab193f00000000, 0x6829074400000000, 0xf6aadddb00000000, + 0x34372cdc00000000, 0xaab4f64300000000, 0x4936e83800000000, + 0xd7b532a700000000, 0x8f33d5ce00000000, 0x11b00f5100000000, + 0xf232112a00000000, 0x6cb1cbb500000000, 0x423edef900000000, + 0xdcbd046600000000, 0x3f3f1a1d00000000, 0xa1bcc08200000000, + 0xf93a27eb00000000, 0x67b9fd7400000000, 0x843be30f00000000, + 0x1ab8399000000000, 0xf14de1f400000000, 0x6fce3b6b00000000, + 0x8c4c251000000000, 0x12cfff8f00000000, 0x4a4918e600000000, + 0xd4cac27900000000, 0x3748dc0200000000, 0xa9cb069d00000000, + 0x874413d100000000, 0x19c7c94e00000000, 0xfa45d73500000000, + 0x64c60daa00000000, 0x3c40eac300000000, 0xa2c3305c00000000, + 0x41412e2700000000, 0xdfc2f4b800000000, 0x1d5f05bf00000000, + 0x83dcdf2000000000, 0x605ec15b00000000, 0xfedd1bc400000000, + 0xa65bfcad00000000, 0x38d8263200000000, 0xdb5a384900000000, + 0x45d9e2d600000000, 0x6b56f79a00000000, 0xf5d52d0500000000, + 0x1657337e00000000, 0x88d4e9e100000000, 0xd0520e8800000000, + 0x4ed1d41700000000, 0xad53ca6c00000000, 0x33d010f300000000, + 0x2968296300000000, 0xb7ebf3fc00000000, 0x5469ed8700000000, + 0xcaea371800000000, 0x926cd07100000000, 0x0cef0aee00000000, + 0xef6d149500000000, 0x71eece0a00000000, 0x5f61db4600000000, + 0xc1e201d900000000, 0x22601fa200000000, 0xbce3c53d00000000, + 0xe465225400000000, 0x7ae6f8cb00000000, 0x9964e6b000000000, + 0x07e73c2f00000000, 0xc57acd2800000000, 0x5bf917b700000000, + 0xb87b09cc00000000, 0x26f8d35300000000, 0x7e7e343a00000000, + 0xe0fdeea500000000, 0x037ff0de00000000, 0x9dfc2a4100000000, + 0xb3733f0d00000000, 0x2df0e59200000000, 0xce72fbe900000000, + 0x50f1217600000000, 0x0877c61f00000000, 0x96f41c8000000000, + 0x757602fb00000000, 0xebf5d86400000000, 0xa39db33200000000, + 0x3d1e69ad00000000, 0xde9c77d600000000, 0x401fad4900000000, + 0x18994a2000000000, 0x861a90bf00000000, 0x65988ec400000000, + 0xfb1b545b00000000, 0xd594411700000000, 0x4b179b8800000000, + 0xa89585f300000000, 0x36165f6c00000000, 0x6e90b80500000000, + 0xf013629a00000000, 0x13917ce100000000, 0x8d12a67e00000000, + 0x4f8f577900000000, 0xd10c8de600000000, 0x328e939d00000000, + 0xac0d490200000000, 0xf48bae6b00000000, 0x6a0874f400000000, + 0x898a6a8f00000000, 0x1709b01000000000, 0x3986a55c00000000, + 0xa7057fc300000000, 0x448761b800000000, 0xda04bb2700000000, + 0x82825c4e00000000, 0x1c0186d100000000, 0xff8398aa00000000, + 0x6100423500000000, 0x7bb87ba500000000, 0xe53ba13a00000000, + 0x06b9bf4100000000, 0x983a65de00000000, 0xc0bc82b700000000, + 0x5e3f582800000000, 0xbdbd465300000000, 0x233e9ccc00000000, + 0x0db1898000000000, 0x9332531f00000000, 0x70b04d6400000000, + 0xee3397fb00000000, 0xb6b5709200000000, 0x2836aa0d00000000, + 0xcbb4b47600000000, 0x55376ee900000000, 0x97aa9fee00000000, + 0x0929457100000000, 0xeaab5b0a00000000, 0x7428819500000000, + 0x2cae66fc00000000, 0xb22dbc6300000000, 0x51afa21800000000, + 0xcf2c788700000000, 0xe1a36dcb00000000, 0x7f20b75400000000, + 0x9ca2a92f00000000, 0x022173b000000000, 0x5aa794d900000000, + 0xc4244e4600000000, 0x27a6503d00000000, 0xb9258aa200000000, + 0x52d052c600000000, 0xcc53885900000000, 0x2fd1962200000000, + 0xb1524cbd00000000, 0xe9d4abd400000000, 0x7757714b00000000, + 0x94d56f3000000000, 0x0a56b5af00000000, 0x24d9a0e300000000, + 0xba5a7a7c00000000, 0x59d8640700000000, 0xc75bbe9800000000, + 0x9fdd59f100000000, 0x015e836e00000000, 0xe2dc9d1500000000, + 0x7c5f478a00000000, 0xbec2b68d00000000, 0x20416c1200000000, + 0xc3c3726900000000, 0x5d40a8f600000000, 0x05c64f9f00000000, + 0x9b45950000000000, 0x78c78b7b00000000, 0xe64451e400000000, + 0xc8cb44a800000000, 0x56489e3700000000, 0xb5ca804c00000000, + 0x2b495ad300000000, 0x73cfbdba00000000, 0xed4c672500000000, + 0x0ece795e00000000, 0x904da3c100000000, 0x8af59a5100000000, + 0x147640ce00000000, 0xf7f45eb500000000, 0x6977842a00000000, + 0x31f1634300000000, 0xaf72b9dc00000000, 0x4cf0a7a700000000, + 0xd2737d3800000000, 0xfcfc687400000000, 0x627fb2eb00000000, + 0x81fdac9000000000, 0x1f7e760f00000000, 0x47f8916600000000, + 0xd97b4bf900000000, 0x3af9558200000000, 0xa47a8f1d00000000, + 0x66e77e1a00000000, 0xf864a48500000000, 0x1be6bafe00000000, + 0x8565606100000000, 0xdde3870800000000, 0x43605d9700000000, + 0xa0e243ec00000000, 0x3e61997300000000, 0x10ee8c3f00000000, + 0x8e6d56a000000000, 0x6def48db00000000, 0xf36c924400000000, + 0xabea752d00000000, 0x3569afb200000000, 0xd6ebb1c900000000, + 0x48686b5600000000}, + {0x0000000000000000, 0xc064281700000000, 0x80c9502e00000000, + 0x40ad783900000000, 0x0093a15c00000000, 0xc0f7894b00000000, + 0x805af17200000000, 0x403ed96500000000, 0x002643b900000000, + 0xc0426bae00000000, 0x80ef139700000000, 0x408b3b8000000000, + 0x00b5e2e500000000, 0xc0d1caf200000000, 0x807cb2cb00000000, + 0x40189adc00000000, 0x414af7a900000000, 0x812edfbe00000000, + 0xc183a78700000000, 0x01e78f9000000000, 0x41d956f500000000, + 0x81bd7ee200000000, 0xc11006db00000000, 0x01742ecc00000000, + 0x416cb41000000000, 0x81089c0700000000, 0xc1a5e43e00000000, + 0x01c1cc2900000000, 0x41ff154c00000000, 0x819b3d5b00000000, + 0xc136456200000000, 0x01526d7500000000, 0xc3929f8800000000, + 0x03f6b79f00000000, 0x435bcfa600000000, 0x833fe7b100000000, + 0xc3013ed400000000, 0x036516c300000000, 0x43c86efa00000000, + 0x83ac46ed00000000, 0xc3b4dc3100000000, 0x03d0f42600000000, + 0x437d8c1f00000000, 0x8319a40800000000, 0xc3277d6d00000000, + 0x0343557a00000000, 0x43ee2d4300000000, 0x838a055400000000, + 0x82d8682100000000, 0x42bc403600000000, 0x0211380f00000000, + 0xc275101800000000, 0x824bc97d00000000, 0x422fe16a00000000, + 0x0282995300000000, 0xc2e6b14400000000, 0x82fe2b9800000000, + 0x429a038f00000000, 0x02377bb600000000, 0xc25353a100000000, + 0x826d8ac400000000, 0x4209a2d300000000, 0x02a4daea00000000, + 0xc2c0f2fd00000000, 0xc7234eca00000000, 0x074766dd00000000, + 0x47ea1ee400000000, 0x878e36f300000000, 0xc7b0ef9600000000, + 0x07d4c78100000000, 0x4779bfb800000000, 0x871d97af00000000, + 0xc7050d7300000000, 0x0761256400000000, 0x47cc5d5d00000000, + 0x87a8754a00000000, 0xc796ac2f00000000, 0x07f2843800000000, + 0x475ffc0100000000, 0x873bd41600000000, 0x8669b96300000000, + 0x460d917400000000, 0x06a0e94d00000000, 0xc6c4c15a00000000, + 0x86fa183f00000000, 0x469e302800000000, 0x0633481100000000, + 0xc657600600000000, 0x864ffada00000000, 0x462bd2cd00000000, + 0x0686aaf400000000, 0xc6e282e300000000, 0x86dc5b8600000000, + 0x46b8739100000000, 0x06150ba800000000, 0xc67123bf00000000, + 0x04b1d14200000000, 0xc4d5f95500000000, 0x8478816c00000000, + 0x441ca97b00000000, 0x0422701e00000000, 0xc446580900000000, + 0x84eb203000000000, 0x448f082700000000, 0x049792fb00000000, + 0xc4f3baec00000000, 0x845ec2d500000000, 0x443aeac200000000, + 0x040433a700000000, 0xc4601bb000000000, 0x84cd638900000000, + 0x44a94b9e00000000, 0x45fb26eb00000000, 0x859f0efc00000000, + 0xc53276c500000000, 0x05565ed200000000, 0x456887b700000000, + 0x850cafa000000000, 0xc5a1d79900000000, 0x05c5ff8e00000000, + 0x45dd655200000000, 0x85b94d4500000000, 0xc514357c00000000, + 0x05701d6b00000000, 0x454ec40e00000000, 0x852aec1900000000, + 0xc587942000000000, 0x05e3bc3700000000, 0xcf41ed4f00000000, + 0x0f25c55800000000, 0x4f88bd6100000000, 0x8fec957600000000, + 0xcfd24c1300000000, 0x0fb6640400000000, 0x4f1b1c3d00000000, + 0x8f7f342a00000000, 0xcf67aef600000000, 0x0f0386e100000000, + 0x4faefed800000000, 0x8fcad6cf00000000, 0xcff40faa00000000, + 0x0f9027bd00000000, 0x4f3d5f8400000000, 0x8f59779300000000, + 0x8e0b1ae600000000, 0x4e6f32f100000000, 0x0ec24ac800000000, + 0xcea662df00000000, 0x8e98bbba00000000, 0x4efc93ad00000000, + 0x0e51eb9400000000, 0xce35c38300000000, 0x8e2d595f00000000, + 0x4e49714800000000, 0x0ee4097100000000, 0xce80216600000000, + 0x8ebef80300000000, 0x4edad01400000000, 0x0e77a82d00000000, + 0xce13803a00000000, 0x0cd372c700000000, 0xccb75ad000000000, + 0x8c1a22e900000000, 0x4c7e0afe00000000, 0x0c40d39b00000000, + 0xcc24fb8c00000000, 0x8c8983b500000000, 0x4cedaba200000000, + 0x0cf5317e00000000, 0xcc91196900000000, 0x8c3c615000000000, + 0x4c58494700000000, 0x0c66902200000000, 0xcc02b83500000000, + 0x8cafc00c00000000, 0x4ccbe81b00000000, 0x4d99856e00000000, + 0x8dfdad7900000000, 0xcd50d54000000000, 0x0d34fd5700000000, + 0x4d0a243200000000, 0x8d6e0c2500000000, 0xcdc3741c00000000, + 0x0da75c0b00000000, 0x4dbfc6d700000000, 0x8ddbeec000000000, + 0xcd7696f900000000, 0x0d12beee00000000, 0x4d2c678b00000000, + 0x8d484f9c00000000, 0xcde537a500000000, 0x0d811fb200000000, + 0x0862a38500000000, 0xc8068b9200000000, 0x88abf3ab00000000, + 0x48cfdbbc00000000, 0x08f102d900000000, 0xc8952ace00000000, + 0x883852f700000000, 0x485c7ae000000000, 0x0844e03c00000000, + 0xc820c82b00000000, 0x888db01200000000, 0x48e9980500000000, + 0x08d7416000000000, 0xc8b3697700000000, 0x881e114e00000000, + 0x487a395900000000, 0x4928542c00000000, 0x894c7c3b00000000, + 0xc9e1040200000000, 0x09852c1500000000, 0x49bbf57000000000, + 0x89dfdd6700000000, 0xc972a55e00000000, 0x09168d4900000000, + 0x490e179500000000, 0x896a3f8200000000, 0xc9c747bb00000000, + 0x09a36fac00000000, 0x499db6c900000000, 0x89f99ede00000000, + 0xc954e6e700000000, 0x0930cef000000000, 0xcbf03c0d00000000, + 0x0b94141a00000000, 0x4b396c2300000000, 0x8b5d443400000000, + 0xcb639d5100000000, 0x0b07b54600000000, 0x4baacd7f00000000, + 0x8bcee56800000000, 0xcbd67fb400000000, 0x0bb257a300000000, + 0x4b1f2f9a00000000, 0x8b7b078d00000000, 0xcb45dee800000000, + 0x0b21f6ff00000000, 0x4b8c8ec600000000, 0x8be8a6d100000000, + 0x8abacba400000000, 0x4adee3b300000000, 0x0a739b8a00000000, + 0xca17b39d00000000, 0x8a296af800000000, 0x4a4d42ef00000000, + 0x0ae03ad600000000, 0xca8412c100000000, 0x8a9c881d00000000, + 0x4af8a00a00000000, 0x0a55d83300000000, 0xca31f02400000000, + 0x8a0f294100000000, 0x4a6b015600000000, 0x0ac6796f00000000, + 0xcaa2517800000000}, + {0x0000000000000000, 0xd4ea739b00000000, 0xe9d396ed00000000, + 0x3d39e57600000000, 0x93a15c0000000000, 0x474b2f9b00000000, + 0x7a72caed00000000, 0xae98b97600000000, 0x2643b90000000000, + 0xf2a9ca9b00000000, 0xcf902fed00000000, 0x1b7a5c7600000000, + 0xb5e2e50000000000, 0x6108969b00000000, 0x5c3173ed00000000, + 0x88db007600000000, 0x4c86720100000000, 0x986c019a00000000, + 0xa555e4ec00000000, 0x71bf977700000000, 0xdf272e0100000000, + 0x0bcd5d9a00000000, 0x36f4b8ec00000000, 0xe21ecb7700000000, + 0x6ac5cb0100000000, 0xbe2fb89a00000000, 0x83165dec00000000, + 0x57fc2e7700000000, 0xf964970100000000, 0x2d8ee49a00000000, + 0x10b701ec00000000, 0xc45d727700000000, 0x980ce50200000000, + 0x4ce6969900000000, 0x71df73ef00000000, 0xa535007400000000, + 0x0badb90200000000, 0xdf47ca9900000000, 0xe27e2fef00000000, + 0x36945c7400000000, 0xbe4f5c0200000000, 0x6aa52f9900000000, + 0x579ccaef00000000, 0x8376b97400000000, 0x2dee000200000000, + 0xf904739900000000, 0xc43d96ef00000000, 0x10d7e57400000000, + 0xd48a970300000000, 0x0060e49800000000, 0x3d5901ee00000000, + 0xe9b3727500000000, 0x472bcb0300000000, 0x93c1b89800000000, + 0xaef85dee00000000, 0x7a122e7500000000, 0xf2c92e0300000000, + 0x26235d9800000000, 0x1b1ab8ee00000000, 0xcff0cb7500000000, + 0x6168720300000000, 0xb582019800000000, 0x88bbe4ee00000000, + 0x5c51977500000000, 0x3019ca0500000000, 0xe4f3b99e00000000, + 0xd9ca5ce800000000, 0x0d202f7300000000, 0xa3b8960500000000, + 0x7752e59e00000000, 0x4a6b00e800000000, 0x9e81737300000000, + 0x165a730500000000, 0xc2b0009e00000000, 0xff89e5e800000000, + 0x2b63967300000000, 0x85fb2f0500000000, 0x51115c9e00000000, + 0x6c28b9e800000000, 0xb8c2ca7300000000, 0x7c9fb80400000000, + 0xa875cb9f00000000, 0x954c2ee900000000, 0x41a65d7200000000, + 0xef3ee40400000000, 0x3bd4979f00000000, 0x06ed72e900000000, + 0xd207017200000000, 0x5adc010400000000, 0x8e36729f00000000, + 0xb30f97e900000000, 0x67e5e47200000000, 0xc97d5d0400000000, + 0x1d972e9f00000000, 0x20aecbe900000000, 0xf444b87200000000, + 0xa8152f0700000000, 0x7cff5c9c00000000, 0x41c6b9ea00000000, + 0x952cca7100000000, 0x3bb4730700000000, 0xef5e009c00000000, + 0xd267e5ea00000000, 0x068d967100000000, 0x8e56960700000000, + 0x5abce59c00000000, 0x678500ea00000000, 0xb36f737100000000, + 0x1df7ca0700000000, 0xc91db99c00000000, 0xf4245cea00000000, + 0x20ce2f7100000000, 0xe4935d0600000000, 0x30792e9d00000000, + 0x0d40cbeb00000000, 0xd9aab87000000000, 0x7732010600000000, + 0xa3d8729d00000000, 0x9ee197eb00000000, 0x4a0be47000000000, + 0xc2d0e40600000000, 0x163a979d00000000, 0x2b0372eb00000000, + 0xffe9017000000000, 0x5171b80600000000, 0x859bcb9d00000000, + 0xb8a22eeb00000000, 0x6c485d7000000000, 0x6032940b00000000, + 0xb4d8e79000000000, 0x89e102e600000000, 0x5d0b717d00000000, + 0xf393c80b00000000, 0x2779bb9000000000, 0x1a405ee600000000, + 0xceaa2d7d00000000, 0x46712d0b00000000, 0x929b5e9000000000, + 0xafa2bbe600000000, 0x7b48c87d00000000, 0xd5d0710b00000000, + 0x013a029000000000, 0x3c03e7e600000000, 0xe8e9947d00000000, + 0x2cb4e60a00000000, 0xf85e959100000000, 0xc56770e700000000, + 0x118d037c00000000, 0xbf15ba0a00000000, 0x6bffc99100000000, + 0x56c62ce700000000, 0x822c5f7c00000000, 0x0af75f0a00000000, + 0xde1d2c9100000000, 0xe324c9e700000000, 0x37ceba7c00000000, + 0x9956030a00000000, 0x4dbc709100000000, 0x708595e700000000, + 0xa46fe67c00000000, 0xf83e710900000000, 0x2cd4029200000000, + 0x11ede7e400000000, 0xc507947f00000000, 0x6b9f2d0900000000, + 0xbf755e9200000000, 0x824cbbe400000000, 0x56a6c87f00000000, + 0xde7dc80900000000, 0x0a97bb9200000000, 0x37ae5ee400000000, + 0xe3442d7f00000000, 0x4ddc940900000000, 0x9936e79200000000, + 0xa40f02e400000000, 0x70e5717f00000000, 0xb4b8030800000000, + 0x6052709300000000, 0x5d6b95e500000000, 0x8981e67e00000000, + 0x27195f0800000000, 0xf3f32c9300000000, 0xcecac9e500000000, + 0x1a20ba7e00000000, 0x92fbba0800000000, 0x4611c99300000000, + 0x7b282ce500000000, 0xafc25f7e00000000, 0x015ae60800000000, + 0xd5b0959300000000, 0xe88970e500000000, 0x3c63037e00000000, + 0x502b5e0e00000000, 0x84c12d9500000000, 0xb9f8c8e300000000, + 0x6d12bb7800000000, 0xc38a020e00000000, 0x1760719500000000, + 0x2a5994e300000000, 0xfeb3e77800000000, 0x7668e70e00000000, + 0xa282949500000000, 0x9fbb71e300000000, 0x4b51027800000000, + 0xe5c9bb0e00000000, 0x3123c89500000000, 0x0c1a2de300000000, + 0xd8f05e7800000000, 0x1cad2c0f00000000, 0xc8475f9400000000, + 0xf57ebae200000000, 0x2194c97900000000, 0x8f0c700f00000000, + 0x5be6039400000000, 0x66dfe6e200000000, 0xb235957900000000, + 0x3aee950f00000000, 0xee04e69400000000, 0xd33d03e200000000, + 0x07d7707900000000, 0xa94fc90f00000000, 0x7da5ba9400000000, + 0x409c5fe200000000, 0x94762c7900000000, 0xc827bb0c00000000, + 0x1ccdc89700000000, 0x21f42de100000000, 0xf51e5e7a00000000, + 0x5b86e70c00000000, 0x8f6c949700000000, 0xb25571e100000000, + 0x66bf027a00000000, 0xee64020c00000000, 0x3a8e719700000000, + 0x07b794e100000000, 0xd35de77a00000000, 0x7dc55e0c00000000, + 0xa92f2d9700000000, 0x9416c8e100000000, 0x40fcbb7a00000000, + 0x84a1c90d00000000, 0x504bba9600000000, 0x6d725fe000000000, + 0xb9982c7b00000000, 0x1700950d00000000, 0xc3eae69600000000, + 0xfed303e000000000, 0x2a39707b00000000, 0xa2e2700d00000000, + 0x7608039600000000, 0x4b31e6e000000000, 0x9fdb957b00000000, + 0x31432c0d00000000, 0xe5a95f9600000000, 0xd890bae000000000, + 0x0c7ac97b00000000}, + {0x0000000000000000, 0x2765258100000000, 0x0fcc3bd900000000, + 0x28a91e5800000000, 0x5f9e066900000000, 0x78fb23e800000000, + 0x50523db000000000, 0x7737183100000000, 0xbe3c0dd200000000, + 0x9959285300000000, 0xb1f0360b00000000, 0x9695138a00000000, + 0xe1a20bbb00000000, 0xc6c72e3a00000000, 0xee6e306200000000, + 0xc90b15e300000000, 0x3d7f6b7f00000000, 0x1a1a4efe00000000, + 0x32b350a600000000, 0x15d6752700000000, 0x62e16d1600000000, + 0x4584489700000000, 0x6d2d56cf00000000, 0x4a48734e00000000, + 0x834366ad00000000, 0xa426432c00000000, 0x8c8f5d7400000000, + 0xabea78f500000000, 0xdcdd60c400000000, 0xfbb8454500000000, + 0xd3115b1d00000000, 0xf4747e9c00000000, 0x7afed6fe00000000, + 0x5d9bf37f00000000, 0x7532ed2700000000, 0x5257c8a600000000, + 0x2560d09700000000, 0x0205f51600000000, 0x2aaceb4e00000000, + 0x0dc9cecf00000000, 0xc4c2db2c00000000, 0xe3a7fead00000000, + 0xcb0ee0f500000000, 0xec6bc57400000000, 0x9b5cdd4500000000, + 0xbc39f8c400000000, 0x9490e69c00000000, 0xb3f5c31d00000000, + 0x4781bd8100000000, 0x60e4980000000000, 0x484d865800000000, + 0x6f28a3d900000000, 0x181fbbe800000000, 0x3f7a9e6900000000, + 0x17d3803100000000, 0x30b6a5b000000000, 0xf9bdb05300000000, + 0xded895d200000000, 0xf6718b8a00000000, 0xd114ae0b00000000, + 0xa623b63a00000000, 0x814693bb00000000, 0xa9ef8de300000000, + 0x8e8aa86200000000, 0xb5fadc2600000000, 0x929ff9a700000000, + 0xba36e7ff00000000, 0x9d53c27e00000000, 0xea64da4f00000000, + 0xcd01ffce00000000, 0xe5a8e19600000000, 0xc2cdc41700000000, + 0x0bc6d1f400000000, 0x2ca3f47500000000, 0x040aea2d00000000, + 0x236fcfac00000000, 0x5458d79d00000000, 0x733df21c00000000, + 0x5b94ec4400000000, 0x7cf1c9c500000000, 0x8885b75900000000, + 0xafe092d800000000, 0x87498c8000000000, 0xa02ca90100000000, + 0xd71bb13000000000, 0xf07e94b100000000, 0xd8d78ae900000000, + 0xffb2af6800000000, 0x36b9ba8b00000000, 0x11dc9f0a00000000, + 0x3975815200000000, 0x1e10a4d300000000, 0x6927bce200000000, + 0x4e42996300000000, 0x66eb873b00000000, 0x418ea2ba00000000, + 0xcf040ad800000000, 0xe8612f5900000000, 0xc0c8310100000000, + 0xe7ad148000000000, 0x909a0cb100000000, 0xb7ff293000000000, + 0x9f56376800000000, 0xb83312e900000000, 0x7138070a00000000, + 0x565d228b00000000, 0x7ef43cd300000000, 0x5991195200000000, + 0x2ea6016300000000, 0x09c324e200000000, 0x216a3aba00000000, + 0x060f1f3b00000000, 0xf27b61a700000000, 0xd51e442600000000, + 0xfdb75a7e00000000, 0xdad27fff00000000, 0xade567ce00000000, + 0x8a80424f00000000, 0xa2295c1700000000, 0x854c799600000000, + 0x4c476c7500000000, 0x6b2249f400000000, 0x438b57ac00000000, + 0x64ee722d00000000, 0x13d96a1c00000000, 0x34bc4f9d00000000, + 0x1c1551c500000000, 0x3b70744400000000, 0x6af5b94d00000000, + 0x4d909ccc00000000, 0x6539829400000000, 0x425ca71500000000, + 0x356bbf2400000000, 0x120e9aa500000000, 0x3aa784fd00000000, + 0x1dc2a17c00000000, 0xd4c9b49f00000000, 0xf3ac911e00000000, + 0xdb058f4600000000, 0xfc60aac700000000, 0x8b57b2f600000000, + 0xac32977700000000, 0x849b892f00000000, 0xa3feacae00000000, + 0x578ad23200000000, 0x70eff7b300000000, 0x5846e9eb00000000, + 0x7f23cc6a00000000, 0x0814d45b00000000, 0x2f71f1da00000000, + 0x07d8ef8200000000, 0x20bdca0300000000, 0xe9b6dfe000000000, + 0xced3fa6100000000, 0xe67ae43900000000, 0xc11fc1b800000000, + 0xb628d98900000000, 0x914dfc0800000000, 0xb9e4e25000000000, + 0x9e81c7d100000000, 0x100b6fb300000000, 0x376e4a3200000000, + 0x1fc7546a00000000, 0x38a271eb00000000, 0x4f9569da00000000, + 0x68f04c5b00000000, 0x4059520300000000, 0x673c778200000000, + 0xae37626100000000, 0x895247e000000000, 0xa1fb59b800000000, + 0x869e7c3900000000, 0xf1a9640800000000, 0xd6cc418900000000, + 0xfe655fd100000000, 0xd9007a5000000000, 0x2d7404cc00000000, + 0x0a11214d00000000, 0x22b83f1500000000, 0x05dd1a9400000000, + 0x72ea02a500000000, 0x558f272400000000, 0x7d26397c00000000, + 0x5a431cfd00000000, 0x9348091e00000000, 0xb42d2c9f00000000, + 0x9c8432c700000000, 0xbbe1174600000000, 0xccd60f7700000000, + 0xebb32af600000000, 0xc31a34ae00000000, 0xe47f112f00000000, + 0xdf0f656b00000000, 0xf86a40ea00000000, 0xd0c35eb200000000, + 0xf7a67b3300000000, 0x8091630200000000, 0xa7f4468300000000, + 0x8f5d58db00000000, 0xa8387d5a00000000, 0x613368b900000000, + 0x46564d3800000000, 0x6eff536000000000, 0x499a76e100000000, + 0x3ead6ed000000000, 0x19c84b5100000000, 0x3161550900000000, + 0x1604708800000000, 0xe2700e1400000000, 0xc5152b9500000000, + 0xedbc35cd00000000, 0xcad9104c00000000, 0xbdee087d00000000, + 0x9a8b2dfc00000000, 0xb22233a400000000, 0x9547162500000000, + 0x5c4c03c600000000, 0x7b29264700000000, 0x5380381f00000000, + 0x74e51d9e00000000, 0x03d205af00000000, 0x24b7202e00000000, + 0x0c1e3e7600000000, 0x2b7b1bf700000000, 0xa5f1b39500000000, + 0x8294961400000000, 0xaa3d884c00000000, 0x8d58adcd00000000, + 0xfa6fb5fc00000000, 0xdd0a907d00000000, 0xf5a38e2500000000, + 0xd2c6aba400000000, 0x1bcdbe4700000000, 0x3ca89bc600000000, + 0x1401859e00000000, 0x3364a01f00000000, 0x4453b82e00000000, + 0x63369daf00000000, 0x4b9f83f700000000, 0x6cfaa67600000000, + 0x988ed8ea00000000, 0xbfebfd6b00000000, 0x9742e33300000000, + 0xb027c6b200000000, 0xc710de8300000000, 0xe075fb0200000000, + 0xc8dce55a00000000, 0xefb9c0db00000000, 0x26b2d53800000000, + 0x01d7f0b900000000, 0x297eeee100000000, 0x0e1bcb6000000000, + 0x792cd35100000000, 0x5e49f6d000000000, 0x76e0e88800000000, + 0x5185cd0900000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f, + 0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91, + 0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e, + 0x72949f71, 0x0c18edfc, 0x97bda193, 0xe0237363, 0x7b863f0c, + 0x0f1ed683, 0x94bb9aec, 0xe325481c, 0x78800473, 0x0a149b02, + 0x91b1d76d, 0xe62f059d, 0x7d8a49f2, 0x0912a07d, 0x92b7ec12, + 0xe5293ee2, 0x7e8c728d, 0x1831dbf8, 0x83949797, 0xf40a4567, + 0x6faf0908, 0x1b37e087, 0x8092ace8, 0xf70c7e18, 0x6ca93277, + 0x1e3dad06, 0x8598e169, 0xf2063399, 0x69a37ff6, 0x1d3b9679, + 0x869eda16, 0xf10008e6, 0x6aa54489, 0x14293604, 0x8f8c7a6b, + 0xf812a89b, 0x63b7e4f4, 0x172f0d7b, 0x8c8a4114, 0xfb1493e4, + 0x60b1df8b, 0x122540fa, 0x89800c95, 0xfe1ede65, 0x65bb920a, + 0x11237b85, 0x8a8637ea, 0xfd18e51a, 0x66bda975, 0x3063b7f0, + 0xabc6fb9f, 0xdc58296f, 0x47fd6500, 0x33658c8f, 0xa8c0c0e0, + 0xdf5e1210, 0x44fb5e7f, 0x366fc10e, 0xadca8d61, 0xda545f91, + 0x41f113fe, 0x3569fa71, 0xaeccb61e, 0xd95264ee, 0x42f72881, + 0x3c7b5a0c, 0xa7de1663, 0xd040c493, 0x4be588fc, 0x3f7d6173, + 0xa4d82d1c, 0xd346ffec, 0x48e3b383, 0x3a772cf2, 0xa1d2609d, + 0xd64cb26d, 0x4de9fe02, 0x3971178d, 0xa2d45be2, 0xd54a8912, + 0x4eefc57d, 0x28526c08, 0xb3f72067, 0xc469f297, 0x5fccbef8, + 0x2b545777, 0xb0f11b18, 0xc76fc9e8, 0x5cca8587, 0x2e5e1af6, + 0xb5fb5699, 0xc2658469, 0x59c0c806, 0x2d582189, 0xb6fd6de6, + 0xc163bf16, 0x5ac6f379, 0x244a81f4, 0xbfefcd9b, 0xc8711f6b, + 0x53d45304, 0x274cba8b, 0xbce9f6e4, 0xcb772414, 0x50d2687b, + 0x2246f70a, 0xb9e3bb65, 0xce7d6995, 0x55d825fa, 0x2140cc75, + 0xbae5801a, 0xcd7b52ea, 0x56de1e85, 0x60c76fe0, 0xfb62238f, + 0x8cfcf17f, 0x1759bd10, 0x63c1549f, 0xf86418f0, 0x8ffaca00, + 0x145f866f, 0x66cb191e, 0xfd6e5571, 0x8af08781, 0x1155cbee, + 0x65cd2261, 0xfe686e0e, 0x89f6bcfe, 0x1253f091, 0x6cdf821c, + 0xf77ace73, 0x80e41c83, 0x1b4150ec, 0x6fd9b963, 0xf47cf50c, + 0x83e227fc, 0x18476b93, 0x6ad3f4e2, 0xf176b88d, 0x86e86a7d, + 0x1d4d2612, 0x69d5cf9d, 0xf27083f2, 0x85ee5102, 0x1e4b1d6d, + 0x78f6b418, 0xe353f877, 0x94cd2a87, 0x0f6866e8, 0x7bf08f67, + 0xe055c308, 0x97cb11f8, 0x0c6e5d97, 0x7efac2e6, 0xe55f8e89, + 0x92c15c79, 0x09641016, 0x7dfcf999, 0xe659b5f6, 0x91c76706, + 0x0a622b69, 0x74ee59e4, 0xef4b158b, 0x98d5c77b, 0x03708b14, + 0x77e8629b, 0xec4d2ef4, 0x9bd3fc04, 0x0076b06b, 0x72e22f1a, + 0xe9476375, 0x9ed9b185, 0x057cfdea, 0x71e41465, 0xea41580a, + 0x9ddf8afa, 0x067ac695, 0x50a4d810, 0xcb01947f, 0xbc9f468f, + 0x273a0ae0, 0x53a2e36f, 0xc807af00, 0xbf997df0, 0x243c319f, + 0x56a8aeee, 0xcd0de281, 0xba933071, 0x21367c1e, 0x55ae9591, + 0xce0bd9fe, 0xb9950b0e, 0x22304761, 0x5cbc35ec, 0xc7197983, + 0xb087ab73, 0x2b22e71c, 0x5fba0e93, 0xc41f42fc, 0xb381900c, + 0x2824dc63, 0x5ab04312, 0xc1150f7d, 0xb68bdd8d, 0x2d2e91e2, + 0x59b6786d, 0xc2133402, 0xb58de6f2, 0x2e28aa9d, 0x489503e8, + 0xd3304f87, 0xa4ae9d77, 0x3f0bd118, 0x4b933897, 0xd03674f8, + 0xa7a8a608, 0x3c0dea67, 0x4e997516, 0xd53c3979, 0xa2a2eb89, + 0x3907a7e6, 0x4d9f4e69, 0xd63a0206, 0xa1a4d0f6, 0x3a019c99, + 0x448dee14, 0xdf28a27b, 0xa8b6708b, 0x33133ce4, 0x478bd56b, + 0xdc2e9904, 0xabb04bf4, 0x3015079b, 0x428198ea, 0xd924d485, + 0xaeba0675, 0x351f4a1a, 0x4187a395, 0xda22effa, 0xadbc3d0a, + 0x36197165}, + {0x00000000, 0xc18edfc0, 0x586cb9c1, 0x99e26601, 0xb0d97382, + 0x7157ac42, 0xe8b5ca43, 0x293b1583, 0xbac3e145, 0x7b4d3e85, + 0xe2af5884, 0x23218744, 0x0a1a92c7, 0xcb944d07, 0x52762b06, + 0x93f8f4c6, 0xaef6c4cb, 0x6f781b0b, 0xf69a7d0a, 0x3714a2ca, + 0x1e2fb749, 0xdfa16889, 0x46430e88, 0x87cdd148, 0x1435258e, + 0xd5bbfa4e, 0x4c599c4f, 0x8dd7438f, 0xa4ec560c, 0x656289cc, + 0xfc80efcd, 0x3d0e300d, 0x869c8fd7, 0x47125017, 0xdef03616, + 0x1f7ee9d6, 0x3645fc55, 0xf7cb2395, 0x6e294594, 0xafa79a54, + 0x3c5f6e92, 0xfdd1b152, 0x6433d753, 0xa5bd0893, 0x8c861d10, + 0x4d08c2d0, 0xd4eaa4d1, 0x15647b11, 0x286a4b1c, 0xe9e494dc, + 0x7006f2dd, 0xb1882d1d, 0x98b3389e, 0x593de75e, 0xc0df815f, + 0x01515e9f, 0x92a9aa59, 0x53277599, 0xcac51398, 0x0b4bcc58, + 0x2270d9db, 0xe3fe061b, 0x7a1c601a, 0xbb92bfda, 0xd64819ef, + 0x17c6c62f, 0x8e24a02e, 0x4faa7fee, 0x66916a6d, 0xa71fb5ad, + 0x3efdd3ac, 0xff730c6c, 0x6c8bf8aa, 0xad05276a, 0x34e7416b, + 0xf5699eab, 0xdc528b28, 0x1ddc54e8, 0x843e32e9, 0x45b0ed29, + 0x78bedd24, 0xb93002e4, 0x20d264e5, 0xe15cbb25, 0xc867aea6, + 0x09e97166, 0x900b1767, 0x5185c8a7, 0xc27d3c61, 0x03f3e3a1, + 0x9a1185a0, 0x5b9f5a60, 0x72a44fe3, 0xb32a9023, 0x2ac8f622, + 0xeb4629e2, 0x50d49638, 0x915a49f8, 0x08b82ff9, 0xc936f039, + 0xe00de5ba, 0x21833a7a, 0xb8615c7b, 0x79ef83bb, 0xea17777d, + 0x2b99a8bd, 0xb27bcebc, 0x73f5117c, 0x5ace04ff, 0x9b40db3f, + 0x02a2bd3e, 0xc32c62fe, 0xfe2252f3, 0x3fac8d33, 0xa64eeb32, + 0x67c034f2, 0x4efb2171, 0x8f75feb1, 0x169798b0, 0xd7194770, + 0x44e1b3b6, 0x856f6c76, 0x1c8d0a77, 0xdd03d5b7, 0xf438c034, + 0x35b61ff4, 0xac5479f5, 0x6ddaa635, 0x77e1359f, 0xb66fea5f, + 0x2f8d8c5e, 0xee03539e, 0xc738461d, 0x06b699dd, 0x9f54ffdc, + 0x5eda201c, 0xcd22d4da, 0x0cac0b1a, 0x954e6d1b, 0x54c0b2db, + 0x7dfba758, 0xbc757898, 0x25971e99, 0xe419c159, 0xd917f154, + 0x18992e94, 0x817b4895, 0x40f59755, 0x69ce82d6, 0xa8405d16, + 0x31a23b17, 0xf02ce4d7, 0x63d41011, 0xa25acfd1, 0x3bb8a9d0, + 0xfa367610, 0xd30d6393, 0x1283bc53, 0x8b61da52, 0x4aef0592, + 0xf17dba48, 0x30f36588, 0xa9110389, 0x689fdc49, 0x41a4c9ca, + 0x802a160a, 0x19c8700b, 0xd846afcb, 0x4bbe5b0d, 0x8a3084cd, + 0x13d2e2cc, 0xd25c3d0c, 0xfb67288f, 0x3ae9f74f, 0xa30b914e, + 0x62854e8e, 0x5f8b7e83, 0x9e05a143, 0x07e7c742, 0xc6691882, + 0xef520d01, 0x2edcd2c1, 0xb73eb4c0, 0x76b06b00, 0xe5489fc6, + 0x24c64006, 0xbd242607, 0x7caaf9c7, 0x5591ec44, 0x941f3384, + 0x0dfd5585, 0xcc738a45, 0xa1a92c70, 0x6027f3b0, 0xf9c595b1, + 0x384b4a71, 0x11705ff2, 0xd0fe8032, 0x491ce633, 0x889239f3, + 0x1b6acd35, 0xdae412f5, 0x430674f4, 0x8288ab34, 0xabb3beb7, + 0x6a3d6177, 0xf3df0776, 0x3251d8b6, 0x0f5fe8bb, 0xced1377b, + 0x5733517a, 0x96bd8eba, 0xbf869b39, 0x7e0844f9, 0xe7ea22f8, + 0x2664fd38, 0xb59c09fe, 0x7412d63e, 0xedf0b03f, 0x2c7e6fff, + 0x05457a7c, 0xc4cba5bc, 0x5d29c3bd, 0x9ca71c7d, 0x2735a3a7, + 0xe6bb7c67, 0x7f591a66, 0xbed7c5a6, 0x97ecd025, 0x56620fe5, + 0xcf8069e4, 0x0e0eb624, 0x9df642e2, 0x5c789d22, 0xc59afb23, + 0x041424e3, 0x2d2f3160, 0xeca1eea0, 0x754388a1, 0xb4cd5761, + 0x89c3676c, 0x484db8ac, 0xd1afdead, 0x1021016d, 0x391a14ee, + 0xf894cb2e, 0x6176ad2f, 0xa0f872ef, 0x33008629, 0xf28e59e9, + 0x6b6c3fe8, 0xaae2e028, 0x83d9f5ab, 0x42572a6b, 0xdbb54c6a, + 0x1a3b93aa}, + {0x00000000, 0xefc26b3e, 0x04f5d03d, 0xeb37bb03, 0x09eba07a, + 0xe629cb44, 0x0d1e7047, 0xe2dc1b79, 0x13d740f4, 0xfc152bca, + 0x172290c9, 0xf8e0fbf7, 0x1a3ce08e, 0xf5fe8bb0, 0x1ec930b3, + 0xf10b5b8d, 0x27ae81e8, 0xc86cead6, 0x235b51d5, 0xcc993aeb, + 0x2e452192, 0xc1874aac, 0x2ab0f1af, 0xc5729a91, 0x3479c11c, + 0xdbbbaa22, 0x308c1121, 0xdf4e7a1f, 0x3d926166, 0xd2500a58, + 0x3967b15b, 0xd6a5da65, 0x4f5d03d0, 0xa09f68ee, 0x4ba8d3ed, + 0xa46ab8d3, 0x46b6a3aa, 0xa974c894, 0x42437397, 0xad8118a9, + 0x5c8a4324, 0xb348281a, 0x587f9319, 0xb7bdf827, 0x5561e35e, + 0xbaa38860, 0x51943363, 0xbe56585d, 0x68f38238, 0x8731e906, + 0x6c065205, 0x83c4393b, 0x61182242, 0x8eda497c, 0x65edf27f, + 0x8a2f9941, 0x7b24c2cc, 0x94e6a9f2, 0x7fd112f1, 0x901379cf, + 0x72cf62b6, 0x9d0d0988, 0x763ab28b, 0x99f8d9b5, 0x9eba07a0, + 0x71786c9e, 0x9a4fd79d, 0x758dbca3, 0x9751a7da, 0x7893cce4, + 0x93a477e7, 0x7c661cd9, 0x8d6d4754, 0x62af2c6a, 0x89989769, + 0x665afc57, 0x8486e72e, 0x6b448c10, 0x80733713, 0x6fb15c2d, + 0xb9148648, 0x56d6ed76, 0xbde15675, 0x52233d4b, 0xb0ff2632, + 0x5f3d4d0c, 0xb40af60f, 0x5bc89d31, 0xaac3c6bc, 0x4501ad82, + 0xae361681, 0x41f47dbf, 0xa32866c6, 0x4cea0df8, 0xa7ddb6fb, + 0x481fddc5, 0xd1e70470, 0x3e256f4e, 0xd512d44d, 0x3ad0bf73, + 0xd80ca40a, 0x37cecf34, 0xdcf97437, 0x333b1f09, 0xc2304484, + 0x2df22fba, 0xc6c594b9, 0x2907ff87, 0xcbdbe4fe, 0x24198fc0, + 0xcf2e34c3, 0x20ec5ffd, 0xf6498598, 0x198beea6, 0xf2bc55a5, + 0x1d7e3e9b, 0xffa225e2, 0x10604edc, 0xfb57f5df, 0x14959ee1, + 0xe59ec56c, 0x0a5cae52, 0xe16b1551, 0x0ea97e6f, 0xec756516, + 0x03b70e28, 0xe880b52b, 0x0742de15, 0xe6050901, 0x09c7623f, + 0xe2f0d93c, 0x0d32b202, 0xefeea97b, 0x002cc245, 0xeb1b7946, + 0x04d91278, 0xf5d249f5, 0x1a1022cb, 0xf12799c8, 0x1ee5f2f6, + 0xfc39e98f, 0x13fb82b1, 0xf8cc39b2, 0x170e528c, 0xc1ab88e9, + 0x2e69e3d7, 0xc55e58d4, 0x2a9c33ea, 0xc8402893, 0x278243ad, + 0xccb5f8ae, 0x23779390, 0xd27cc81d, 0x3dbea323, 0xd6891820, + 0x394b731e, 0xdb976867, 0x34550359, 0xdf62b85a, 0x30a0d364, + 0xa9580ad1, 0x469a61ef, 0xadaddaec, 0x426fb1d2, 0xa0b3aaab, + 0x4f71c195, 0xa4467a96, 0x4b8411a8, 0xba8f4a25, 0x554d211b, + 0xbe7a9a18, 0x51b8f126, 0xb364ea5f, 0x5ca68161, 0xb7913a62, + 0x5853515c, 0x8ef68b39, 0x6134e007, 0x8a035b04, 0x65c1303a, + 0x871d2b43, 0x68df407d, 0x83e8fb7e, 0x6c2a9040, 0x9d21cbcd, + 0x72e3a0f3, 0x99d41bf0, 0x761670ce, 0x94ca6bb7, 0x7b080089, + 0x903fbb8a, 0x7ffdd0b4, 0x78bf0ea1, 0x977d659f, 0x7c4ade9c, + 0x9388b5a2, 0x7154aedb, 0x9e96c5e5, 0x75a17ee6, 0x9a6315d8, + 0x6b684e55, 0x84aa256b, 0x6f9d9e68, 0x805ff556, 0x6283ee2f, + 0x8d418511, 0x66763e12, 0x89b4552c, 0x5f118f49, 0xb0d3e477, + 0x5be45f74, 0xb426344a, 0x56fa2f33, 0xb938440d, 0x520fff0e, + 0xbdcd9430, 0x4cc6cfbd, 0xa304a483, 0x48331f80, 0xa7f174be, + 0x452d6fc7, 0xaaef04f9, 0x41d8bffa, 0xae1ad4c4, 0x37e20d71, + 0xd820664f, 0x3317dd4c, 0xdcd5b672, 0x3e09ad0b, 0xd1cbc635, + 0x3afc7d36, 0xd53e1608, 0x24354d85, 0xcbf726bb, 0x20c09db8, + 0xcf02f686, 0x2ddeedff, 0xc21c86c1, 0x292b3dc2, 0xc6e956fc, + 0x104c8c99, 0xff8ee7a7, 0x14b95ca4, 0xfb7b379a, 0x19a72ce3, + 0xf66547dd, 0x1d52fcde, 0xf29097e0, 0x039bcc6d, 0xec59a753, + 0x076e1c50, 0xe8ac776e, 0x0a706c17, 0xe5b20729, 0x0e85bc2a, + 0xe147d714}, + {0x00000000, 0x177b1443, 0x2ef62886, 0x398d3cc5, 0x5dec510c, + 0x4a97454f, 0x731a798a, 0x64616dc9, 0xbbd8a218, 0xaca3b65b, + 0x952e8a9e, 0x82559edd, 0xe634f314, 0xf14fe757, 0xc8c2db92, + 0xdfb9cfd1, 0xacc04271, 0xbbbb5632, 0x82366af7, 0x954d7eb4, + 0xf12c137d, 0xe657073e, 0xdfda3bfb, 0xc8a12fb8, 0x1718e069, + 0x0063f42a, 0x39eec8ef, 0x2e95dcac, 0x4af4b165, 0x5d8fa526, + 0x640299e3, 0x73798da0, 0x82f182a3, 0x958a96e0, 0xac07aa25, + 0xbb7cbe66, 0xdf1dd3af, 0xc866c7ec, 0xf1ebfb29, 0xe690ef6a, + 0x392920bb, 0x2e5234f8, 0x17df083d, 0x00a41c7e, 0x64c571b7, + 0x73be65f4, 0x4a335931, 0x5d484d72, 0x2e31c0d2, 0x394ad491, + 0x00c7e854, 0x17bcfc17, 0x73dd91de, 0x64a6859d, 0x5d2bb958, + 0x4a50ad1b, 0x95e962ca, 0x82927689, 0xbb1f4a4c, 0xac645e0f, + 0xc80533c6, 0xdf7e2785, 0xe6f31b40, 0xf1880f03, 0xde920307, + 0xc9e91744, 0xf0642b81, 0xe71f3fc2, 0x837e520b, 0x94054648, + 0xad887a8d, 0xbaf36ece, 0x654aa11f, 0x7231b55c, 0x4bbc8999, + 0x5cc79dda, 0x38a6f013, 0x2fdde450, 0x1650d895, 0x012bccd6, + 0x72524176, 0x65295535, 0x5ca469f0, 0x4bdf7db3, 0x2fbe107a, + 0x38c50439, 0x014838fc, 0x16332cbf, 0xc98ae36e, 0xdef1f72d, + 0xe77ccbe8, 0xf007dfab, 0x9466b262, 0x831da621, 0xba909ae4, + 0xadeb8ea7, 0x5c6381a4, 0x4b1895e7, 0x7295a922, 0x65eebd61, + 0x018fd0a8, 0x16f4c4eb, 0x2f79f82e, 0x3802ec6d, 0xe7bb23bc, + 0xf0c037ff, 0xc94d0b3a, 0xde361f79, 0xba5772b0, 0xad2c66f3, + 0x94a15a36, 0x83da4e75, 0xf0a3c3d5, 0xe7d8d796, 0xde55eb53, + 0xc92eff10, 0xad4f92d9, 0xba34869a, 0x83b9ba5f, 0x94c2ae1c, + 0x4b7b61cd, 0x5c00758e, 0x658d494b, 0x72f65d08, 0x169730c1, + 0x01ec2482, 0x38611847, 0x2f1a0c04, 0x6655004f, 0x712e140c, + 0x48a328c9, 0x5fd83c8a, 0x3bb95143, 0x2cc24500, 0x154f79c5, + 0x02346d86, 0xdd8da257, 0xcaf6b614, 0xf37b8ad1, 0xe4009e92, + 0x8061f35b, 0x971ae718, 0xae97dbdd, 0xb9eccf9e, 0xca95423e, + 0xddee567d, 0xe4636ab8, 0xf3187efb, 0x97791332, 0x80020771, + 0xb98f3bb4, 0xaef42ff7, 0x714de026, 0x6636f465, 0x5fbbc8a0, + 0x48c0dce3, 0x2ca1b12a, 0x3bdaa569, 0x025799ac, 0x152c8def, + 0xe4a482ec, 0xf3df96af, 0xca52aa6a, 0xdd29be29, 0xb948d3e0, + 0xae33c7a3, 0x97befb66, 0x80c5ef25, 0x5f7c20f4, 0x480734b7, + 0x718a0872, 0x66f11c31, 0x029071f8, 0x15eb65bb, 0x2c66597e, + 0x3b1d4d3d, 0x4864c09d, 0x5f1fd4de, 0x6692e81b, 0x71e9fc58, + 0x15889191, 0x02f385d2, 0x3b7eb917, 0x2c05ad54, 0xf3bc6285, + 0xe4c776c6, 0xdd4a4a03, 0xca315e40, 0xae503389, 0xb92b27ca, + 0x80a61b0f, 0x97dd0f4c, 0xb8c70348, 0xafbc170b, 0x96312bce, + 0x814a3f8d, 0xe52b5244, 0xf2504607, 0xcbdd7ac2, 0xdca66e81, + 0x031fa150, 0x1464b513, 0x2de989d6, 0x3a929d95, 0x5ef3f05c, + 0x4988e41f, 0x7005d8da, 0x677ecc99, 0x14074139, 0x037c557a, + 0x3af169bf, 0x2d8a7dfc, 0x49eb1035, 0x5e900476, 0x671d38b3, + 0x70662cf0, 0xafdfe321, 0xb8a4f762, 0x8129cba7, 0x9652dfe4, + 0xf233b22d, 0xe548a66e, 0xdcc59aab, 0xcbbe8ee8, 0x3a3681eb, + 0x2d4d95a8, 0x14c0a96d, 0x03bbbd2e, 0x67dad0e7, 0x70a1c4a4, + 0x492cf861, 0x5e57ec22, 0x81ee23f3, 0x969537b0, 0xaf180b75, + 0xb8631f36, 0xdc0272ff, 0xcb7966bc, 0xf2f45a79, 0xe58f4e3a, + 0x96f6c39a, 0x818dd7d9, 0xb800eb1c, 0xaf7bff5f, 0xcb1a9296, + 0xdc6186d5, 0xe5ecba10, 0xf297ae53, 0x2d2e6182, 0x3a5575c1, + 0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808, + 0x494f0c4b}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x43147b17, 0x8628f62e, 0xc53c8d39, 0x0c51ec5d, + 0x4f45974a, 0x8a791a73, 0xc96d6164, 0x18a2d8bb, 0x5bb6a3ac, + 0x9e8a2e95, 0xdd9e5582, 0x14f334e6, 0x57e74ff1, 0x92dbc2c8, + 0xd1cfb9df, 0x7142c0ac, 0x3256bbbb, 0xf76a3682, 0xb47e4d95, + 0x7d132cf1, 0x3e0757e6, 0xfb3bdadf, 0xb82fa1c8, 0x69e01817, + 0x2af46300, 0xefc8ee39, 0xacdc952e, 0x65b1f44a, 0x26a58f5d, + 0xe3990264, 0xa08d7973, 0xa382f182, 0xe0968a95, 0x25aa07ac, + 0x66be7cbb, 0xafd31ddf, 0xecc766c8, 0x29fbebf1, 0x6aef90e6, + 0xbb202939, 0xf834522e, 0x3d08df17, 0x7e1ca400, 0xb771c564, + 0xf465be73, 0x3159334a, 0x724d485d, 0xd2c0312e, 0x91d44a39, + 0x54e8c700, 0x17fcbc17, 0xde91dd73, 0x9d85a664, 0x58b92b5d, + 0x1bad504a, 0xca62e995, 0x89769282, 0x4c4a1fbb, 0x0f5e64ac, + 0xc63305c8, 0x85277edf, 0x401bf3e6, 0x030f88f1, 0x070392de, + 0x4417e9c9, 0x812b64f0, 0xc23f1fe7, 0x0b527e83, 0x48460594, + 0x8d7a88ad, 0xce6ef3ba, 0x1fa14a65, 0x5cb53172, 0x9989bc4b, + 0xda9dc75c, 0x13f0a638, 0x50e4dd2f, 0x95d85016, 0xd6cc2b01, + 0x76415272, 0x35552965, 0xf069a45c, 0xb37ddf4b, 0x7a10be2f, + 0x3904c538, 0xfc384801, 0xbf2c3316, 0x6ee38ac9, 0x2df7f1de, + 0xe8cb7ce7, 0xabdf07f0, 0x62b26694, 0x21a61d83, 0xe49a90ba, + 0xa78eebad, 0xa481635c, 0xe795184b, 0x22a99572, 0x61bdee65, + 0xa8d08f01, 0xebc4f416, 0x2ef8792f, 0x6dec0238, 0xbc23bbe7, + 0xff37c0f0, 0x3a0b4dc9, 0x791f36de, 0xb07257ba, 0xf3662cad, + 0x365aa194, 0x754eda83, 0xd5c3a3f0, 0x96d7d8e7, 0x53eb55de, + 0x10ff2ec9, 0xd9924fad, 0x9a8634ba, 0x5fbab983, 0x1caec294, + 0xcd617b4b, 0x8e75005c, 0x4b498d65, 0x085df672, 0xc1309716, + 0x8224ec01, 0x47186138, 0x040c1a2f, 0x4f005566, 0x0c142e71, + 0xc928a348, 0x8a3cd85f, 0x4351b93b, 0x0045c22c, 0xc5794f15, + 0x866d3402, 0x57a28ddd, 0x14b6f6ca, 0xd18a7bf3, 0x929e00e4, + 0x5bf36180, 0x18e71a97, 0xdddb97ae, 0x9ecfecb9, 0x3e4295ca, + 0x7d56eedd, 0xb86a63e4, 0xfb7e18f3, 0x32137997, 0x71070280, + 0xb43b8fb9, 0xf72ff4ae, 0x26e04d71, 0x65f43666, 0xa0c8bb5f, + 0xe3dcc048, 0x2ab1a12c, 0x69a5da3b, 0xac995702, 0xef8d2c15, + 0xec82a4e4, 0xaf96dff3, 0x6aaa52ca, 0x29be29dd, 0xe0d348b9, + 0xa3c733ae, 0x66fbbe97, 0x25efc580, 0xf4207c5f, 0xb7340748, + 0x72088a71, 0x311cf166, 0xf8719002, 0xbb65eb15, 0x7e59662c, + 0x3d4d1d3b, 0x9dc06448, 0xded41f5f, 0x1be89266, 0x58fce971, + 0x91918815, 0xd285f302, 0x17b97e3b, 0x54ad052c, 0x8562bcf3, + 0xc676c7e4, 0x034a4add, 0x405e31ca, 0x893350ae, 0xca272bb9, + 0x0f1ba680, 0x4c0fdd97, 0x4803c7b8, 0x0b17bcaf, 0xce2b3196, + 0x8d3f4a81, 0x44522be5, 0x074650f2, 0xc27addcb, 0x816ea6dc, + 0x50a11f03, 0x13b56414, 0xd689e92d, 0x959d923a, 0x5cf0f35e, + 0x1fe48849, 0xdad80570, 0x99cc7e67, 0x39410714, 0x7a557c03, + 0xbf69f13a, 0xfc7d8a2d, 0x3510eb49, 0x7604905e, 0xb3381d67, + 0xf02c6670, 0x21e3dfaf, 0x62f7a4b8, 0xa7cb2981, 0xe4df5296, + 0x2db233f2, 0x6ea648e5, 0xab9ac5dc, 0xe88ebecb, 0xeb81363a, + 0xa8954d2d, 0x6da9c014, 0x2ebdbb03, 0xe7d0da67, 0xa4c4a170, + 0x61f82c49, 0x22ec575e, 0xf323ee81, 0xb0379596, 0x750b18af, + 0x361f63b8, 0xff7202dc, 0xbc6679cb, 0x795af4f2, 0x3a4e8fe5, + 0x9ac3f696, 0xd9d78d81, 0x1ceb00b8, 0x5fff7baf, 0x96921acb, + 0xd58661dc, 0x10baece5, 0x53ae97f2, 0x82612e2d, 0xc175553a, + 0x0449d803, 0x475da314, 0x8e30c270, 0xcd24b967, 0x0818345e, + 0x4b0c4f49}, + {0x00000000, 0x3e6bc2ef, 0x3dd0f504, 0x03bb37eb, 0x7aa0eb09, + 0x44cb29e6, 0x47701e0d, 0x791bdce2, 0xf440d713, 0xca2b15fc, + 0xc9902217, 0xf7fbe0f8, 0x8ee03c1a, 0xb08bfef5, 0xb330c91e, + 0x8d5b0bf1, 0xe881ae27, 0xd6ea6cc8, 0xd5515b23, 0xeb3a99cc, + 0x9221452e, 0xac4a87c1, 0xaff1b02a, 0x919a72c5, 0x1cc17934, + 0x22aabbdb, 0x21118c30, 0x1f7a4edf, 0x6661923d, 0x580a50d2, + 0x5bb16739, 0x65daa5d6, 0xd0035d4f, 0xee689fa0, 0xedd3a84b, + 0xd3b86aa4, 0xaaa3b646, 0x94c874a9, 0x97734342, 0xa91881ad, + 0x24438a5c, 0x1a2848b3, 0x19937f58, 0x27f8bdb7, 0x5ee36155, + 0x6088a3ba, 0x63339451, 0x5d5856be, 0x3882f368, 0x06e93187, + 0x0552066c, 0x3b39c483, 0x42221861, 0x7c49da8e, 0x7ff2ed65, + 0x41992f8a, 0xccc2247b, 0xf2a9e694, 0xf112d17f, 0xcf791390, + 0xb662cf72, 0x88090d9d, 0x8bb23a76, 0xb5d9f899, 0xa007ba9e, + 0x9e6c7871, 0x9dd74f9a, 0xa3bc8d75, 0xdaa75197, 0xe4cc9378, + 0xe777a493, 0xd91c667c, 0x54476d8d, 0x6a2caf62, 0x69979889, + 0x57fc5a66, 0x2ee78684, 0x108c446b, 0x13377380, 0x2d5cb16f, + 0x488614b9, 0x76edd656, 0x7556e1bd, 0x4b3d2352, 0x3226ffb0, + 0x0c4d3d5f, 0x0ff60ab4, 0x319dc85b, 0xbcc6c3aa, 0x82ad0145, + 0x811636ae, 0xbf7df441, 0xc66628a3, 0xf80dea4c, 0xfbb6dda7, + 0xc5dd1f48, 0x7004e7d1, 0x4e6f253e, 0x4dd412d5, 0x73bfd03a, + 0x0aa40cd8, 0x34cfce37, 0x3774f9dc, 0x091f3b33, 0x844430c2, + 0xba2ff22d, 0xb994c5c6, 0x87ff0729, 0xfee4dbcb, 0xc08f1924, + 0xc3342ecf, 0xfd5fec20, 0x988549f6, 0xa6ee8b19, 0xa555bcf2, + 0x9b3e7e1d, 0xe225a2ff, 0xdc4e6010, 0xdff557fb, 0xe19e9514, + 0x6cc59ee5, 0x52ae5c0a, 0x51156be1, 0x6f7ea90e, 0x166575ec, + 0x280eb703, 0x2bb580e8, 0x15de4207, 0x010905e6, 0x3f62c709, + 0x3cd9f0e2, 0x02b2320d, 0x7ba9eeef, 0x45c22c00, 0x46791beb, + 0x7812d904, 0xf549d2f5, 0xcb22101a, 0xc89927f1, 0xf6f2e51e, + 0x8fe939fc, 0xb182fb13, 0xb239ccf8, 0x8c520e17, 0xe988abc1, + 0xd7e3692e, 0xd4585ec5, 0xea339c2a, 0x932840c8, 0xad438227, + 0xaef8b5cc, 0x90937723, 0x1dc87cd2, 0x23a3be3d, 0x201889d6, + 0x1e734b39, 0x676897db, 0x59035534, 0x5ab862df, 0x64d3a030, + 0xd10a58a9, 0xef619a46, 0xecdaadad, 0xd2b16f42, 0xabaab3a0, + 0x95c1714f, 0x967a46a4, 0xa811844b, 0x254a8fba, 0x1b214d55, + 0x189a7abe, 0x26f1b851, 0x5fea64b3, 0x6181a65c, 0x623a91b7, + 0x5c515358, 0x398bf68e, 0x07e03461, 0x045b038a, 0x3a30c165, + 0x432b1d87, 0x7d40df68, 0x7efbe883, 0x40902a6c, 0xcdcb219d, + 0xf3a0e372, 0xf01bd499, 0xce701676, 0xb76bca94, 0x8900087b, + 0x8abb3f90, 0xb4d0fd7f, 0xa10ebf78, 0x9f657d97, 0x9cde4a7c, + 0xa2b58893, 0xdbae5471, 0xe5c5969e, 0xe67ea175, 0xd815639a, + 0x554e686b, 0x6b25aa84, 0x689e9d6f, 0x56f55f80, 0x2fee8362, + 0x1185418d, 0x123e7666, 0x2c55b489, 0x498f115f, 0x77e4d3b0, + 0x745fe45b, 0x4a3426b4, 0x332ffa56, 0x0d4438b9, 0x0eff0f52, + 0x3094cdbd, 0xbdcfc64c, 0x83a404a3, 0x801f3348, 0xbe74f1a7, + 0xc76f2d45, 0xf904efaa, 0xfabfd841, 0xc4d41aae, 0x710de237, + 0x4f6620d8, 0x4cdd1733, 0x72b6d5dc, 0x0bad093e, 0x35c6cbd1, + 0x367dfc3a, 0x08163ed5, 0x854d3524, 0xbb26f7cb, 0xb89dc020, + 0x86f602cf, 0xffedde2d, 0xc1861cc2, 0xc23d2b29, 0xfc56e9c6, + 0x998c4c10, 0xa7e78eff, 0xa45cb914, 0x9a377bfb, 0xe32ca719, + 0xdd4765f6, 0xdefc521d, 0xe09790f2, 0x6dcc9b03, 0x53a759ec, + 0x501c6e07, 0x6e77ace8, 0x176c700a, 0x2907b2e5, 0x2abc850e, + 0x14d747e1}, + {0x00000000, 0xc0df8ec1, 0xc1b96c58, 0x0166e299, 0x8273d9b0, + 0x42ac5771, 0x43cab5e8, 0x83153b29, 0x45e1c3ba, 0x853e4d7b, + 0x8458afe2, 0x44872123, 0xc7921a0a, 0x074d94cb, 0x062b7652, + 0xc6f4f893, 0xcbc4f6ae, 0x0b1b786f, 0x0a7d9af6, 0xcaa21437, + 0x49b72f1e, 0x8968a1df, 0x880e4346, 0x48d1cd87, 0x8e253514, + 0x4efabbd5, 0x4f9c594c, 0x8f43d78d, 0x0c56eca4, 0xcc896265, + 0xcdef80fc, 0x0d300e3d, 0xd78f9c86, 0x17501247, 0x1636f0de, + 0xd6e97e1f, 0x55fc4536, 0x9523cbf7, 0x9445296e, 0x549aa7af, + 0x926e5f3c, 0x52b1d1fd, 0x53d73364, 0x9308bda5, 0x101d868c, + 0xd0c2084d, 0xd1a4ead4, 0x117b6415, 0x1c4b6a28, 0xdc94e4e9, + 0xddf20670, 0x1d2d88b1, 0x9e38b398, 0x5ee73d59, 0x5f81dfc0, + 0x9f5e5101, 0x59aaa992, 0x99752753, 0x9813c5ca, 0x58cc4b0b, + 0xdbd97022, 0x1b06fee3, 0x1a601c7a, 0xdabf92bb, 0xef1948d6, + 0x2fc6c617, 0x2ea0248e, 0xee7faa4f, 0x6d6a9166, 0xadb51fa7, + 0xacd3fd3e, 0x6c0c73ff, 0xaaf88b6c, 0x6a2705ad, 0x6b41e734, + 0xab9e69f5, 0x288b52dc, 0xe854dc1d, 0xe9323e84, 0x29edb045, + 0x24ddbe78, 0xe40230b9, 0xe564d220, 0x25bb5ce1, 0xa6ae67c8, + 0x6671e909, 0x67170b90, 0xa7c88551, 0x613c7dc2, 0xa1e3f303, + 0xa085119a, 0x605a9f5b, 0xe34fa472, 0x23902ab3, 0x22f6c82a, + 0xe22946eb, 0x3896d450, 0xf8495a91, 0xf92fb808, 0x39f036c9, + 0xbae50de0, 0x7a3a8321, 0x7b5c61b8, 0xbb83ef79, 0x7d7717ea, + 0xbda8992b, 0xbcce7bb2, 0x7c11f573, 0xff04ce5a, 0x3fdb409b, + 0x3ebda202, 0xfe622cc3, 0xf35222fe, 0x338dac3f, 0x32eb4ea6, + 0xf234c067, 0x7121fb4e, 0xb1fe758f, 0xb0989716, 0x704719d7, + 0xb6b3e144, 0x766c6f85, 0x770a8d1c, 0xb7d503dd, 0x34c038f4, + 0xf41fb635, 0xf57954ac, 0x35a6da6d, 0x9f35e177, 0x5fea6fb6, + 0x5e8c8d2f, 0x9e5303ee, 0x1d4638c7, 0xdd99b606, 0xdcff549f, + 0x1c20da5e, 0xdad422cd, 0x1a0bac0c, 0x1b6d4e95, 0xdbb2c054, + 0x58a7fb7d, 0x987875bc, 0x991e9725, 0x59c119e4, 0x54f117d9, + 0x942e9918, 0x95487b81, 0x5597f540, 0xd682ce69, 0x165d40a8, + 0x173ba231, 0xd7e42cf0, 0x1110d463, 0xd1cf5aa2, 0xd0a9b83b, + 0x107636fa, 0x93630dd3, 0x53bc8312, 0x52da618b, 0x9205ef4a, + 0x48ba7df1, 0x8865f330, 0x890311a9, 0x49dc9f68, 0xcac9a441, + 0x0a162a80, 0x0b70c819, 0xcbaf46d8, 0x0d5bbe4b, 0xcd84308a, + 0xcce2d213, 0x0c3d5cd2, 0x8f2867fb, 0x4ff7e93a, 0x4e910ba3, + 0x8e4e8562, 0x837e8b5f, 0x43a1059e, 0x42c7e707, 0x821869c6, + 0x010d52ef, 0xc1d2dc2e, 0xc0b43eb7, 0x006bb076, 0xc69f48e5, + 0x0640c624, 0x072624bd, 0xc7f9aa7c, 0x44ec9155, 0x84331f94, + 0x8555fd0d, 0x458a73cc, 0x702ca9a1, 0xb0f32760, 0xb195c5f9, + 0x714a4b38, 0xf25f7011, 0x3280fed0, 0x33e61c49, 0xf3399288, + 0x35cd6a1b, 0xf512e4da, 0xf4740643, 0x34ab8882, 0xb7beb3ab, + 0x77613d6a, 0x7607dff3, 0xb6d85132, 0xbbe85f0f, 0x7b37d1ce, + 0x7a513357, 0xba8ebd96, 0x399b86bf, 0xf944087e, 0xf822eae7, + 0x38fd6426, 0xfe099cb5, 0x3ed61274, 0x3fb0f0ed, 0xff6f7e2c, + 0x7c7a4505, 0xbca5cbc4, 0xbdc3295d, 0x7d1ca79c, 0xa7a33527, + 0x677cbbe6, 0x661a597f, 0xa6c5d7be, 0x25d0ec97, 0xe50f6256, + 0xe46980cf, 0x24b60e0e, 0xe242f69d, 0x229d785c, 0x23fb9ac5, + 0xe3241404, 0x60312f2d, 0xa0eea1ec, 0xa1884375, 0x6157cdb4, + 0x6c67c389, 0xacb84d48, 0xaddeafd1, 0x6d012110, 0xee141a39, + 0x2ecb94f8, 0x2fad7661, 0xef72f8a0, 0x29860033, 0xe9598ef2, + 0xe83f6c6b, 0x28e0e2aa, 0xabf5d983, 0x6b2a5742, 0x6a4cb5db, + 0xaa933b1a}, + {0x00000000, 0x6f4ca59b, 0x9f9e3bec, 0xf0d29e77, 0x7f3b0603, + 0x1077a398, 0xe0a53def, 0x8fe99874, 0xfe760c06, 0x913aa99d, + 0x61e837ea, 0x0ea49271, 0x814d0a05, 0xee01af9e, 0x1ed331e9, + 0x719f9472, 0xfced180c, 0x93a1bd97, 0x637323e0, 0x0c3f867b, + 0x83d61e0f, 0xec9abb94, 0x1c4825e3, 0x73048078, 0x029b140a, + 0x6dd7b191, 0x9d052fe6, 0xf2498a7d, 0x7da01209, 0x12ecb792, + 0xe23e29e5, 0x8d728c7e, 0xf8db3118, 0x97979483, 0x67450af4, + 0x0809af6f, 0x87e0371b, 0xe8ac9280, 0x187e0cf7, 0x7732a96c, + 0x06ad3d1e, 0x69e19885, 0x993306f2, 0xf67fa369, 0x79963b1d, + 0x16da9e86, 0xe60800f1, 0x8944a56a, 0x04362914, 0x6b7a8c8f, + 0x9ba812f8, 0xf4e4b763, 0x7b0d2f17, 0x14418a8c, 0xe49314fb, + 0x8bdfb160, 0xfa402512, 0x950c8089, 0x65de1efe, 0x0a92bb65, + 0x857b2311, 0xea37868a, 0x1ae518fd, 0x75a9bd66, 0xf0b76330, + 0x9ffbc6ab, 0x6f2958dc, 0x0065fd47, 0x8f8c6533, 0xe0c0c0a8, + 0x10125edf, 0x7f5efb44, 0x0ec16f36, 0x618dcaad, 0x915f54da, + 0xfe13f141, 0x71fa6935, 0x1eb6ccae, 0xee6452d9, 0x8128f742, + 0x0c5a7b3c, 0x6316dea7, 0x93c440d0, 0xfc88e54b, 0x73617d3f, + 0x1c2dd8a4, 0xecff46d3, 0x83b3e348, 0xf22c773a, 0x9d60d2a1, + 0x6db24cd6, 0x02fee94d, 0x8d177139, 0xe25bd4a2, 0x12894ad5, + 0x7dc5ef4e, 0x086c5228, 0x6720f7b3, 0x97f269c4, 0xf8becc5f, + 0x7757542b, 0x181bf1b0, 0xe8c96fc7, 0x8785ca5c, 0xf61a5e2e, + 0x9956fbb5, 0x698465c2, 0x06c8c059, 0x8921582d, 0xe66dfdb6, + 0x16bf63c1, 0x79f3c65a, 0xf4814a24, 0x9bcdefbf, 0x6b1f71c8, + 0x0453d453, 0x8bba4c27, 0xe4f6e9bc, 0x142477cb, 0x7b68d250, + 0x0af74622, 0x65bbe3b9, 0x95697dce, 0xfa25d855, 0x75cc4021, + 0x1a80e5ba, 0xea527bcd, 0x851ede56, 0xe06fc760, 0x8f2362fb, + 0x7ff1fc8c, 0x10bd5917, 0x9f54c163, 0xf01864f8, 0x00cafa8f, + 0x6f865f14, 0x1e19cb66, 0x71556efd, 0x8187f08a, 0xeecb5511, + 0x6122cd65, 0x0e6e68fe, 0xfebcf689, 0x91f05312, 0x1c82df6c, + 0x73ce7af7, 0x831ce480, 0xec50411b, 0x63b9d96f, 0x0cf57cf4, + 0xfc27e283, 0x936b4718, 0xe2f4d36a, 0x8db876f1, 0x7d6ae886, + 0x12264d1d, 0x9dcfd569, 0xf28370f2, 0x0251ee85, 0x6d1d4b1e, + 0x18b4f678, 0x77f853e3, 0x872acd94, 0xe866680f, 0x678ff07b, + 0x08c355e0, 0xf811cb97, 0x975d6e0c, 0xe6c2fa7e, 0x898e5fe5, + 0x795cc192, 0x16106409, 0x99f9fc7d, 0xf6b559e6, 0x0667c791, + 0x692b620a, 0xe459ee74, 0x8b154bef, 0x7bc7d598, 0x148b7003, + 0x9b62e877, 0xf42e4dec, 0x04fcd39b, 0x6bb07600, 0x1a2fe272, + 0x756347e9, 0x85b1d99e, 0xeafd7c05, 0x6514e471, 0x0a5841ea, + 0xfa8adf9d, 0x95c67a06, 0x10d8a450, 0x7f9401cb, 0x8f469fbc, + 0xe00a3a27, 0x6fe3a253, 0x00af07c8, 0xf07d99bf, 0x9f313c24, + 0xeeaea856, 0x81e20dcd, 0x713093ba, 0x1e7c3621, 0x9195ae55, + 0xfed90bce, 0x0e0b95b9, 0x61473022, 0xec35bc5c, 0x837919c7, + 0x73ab87b0, 0x1ce7222b, 0x930eba5f, 0xfc421fc4, 0x0c9081b3, + 0x63dc2428, 0x1243b05a, 0x7d0f15c1, 0x8ddd8bb6, 0xe2912e2d, + 0x6d78b659, 0x023413c2, 0xf2e68db5, 0x9daa282e, 0xe8039548, + 0x874f30d3, 0x779daea4, 0x18d10b3f, 0x9738934b, 0xf87436d0, + 0x08a6a8a7, 0x67ea0d3c, 0x1675994e, 0x79393cd5, 0x89eba2a2, + 0xe6a70739, 0x694e9f4d, 0x06023ad6, 0xf6d0a4a1, 0x999c013a, + 0x14ee8d44, 0x7ba228df, 0x8b70b6a8, 0xe43c1333, 0x6bd58b47, + 0x04992edc, 0xf44bb0ab, 0x9b071530, 0xea988142, 0x85d424d9, + 0x7506baae, 0x1a4a1f35, 0x95a38741, 0xfaef22da, 0x0a3dbcad, + 0x65711936}}; + +#endif + +#endif + +#if N == 4 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xf1da05aa, 0x38c50d15, 0xc91f08bf, 0x718a1a2a, + 0x80501f80, 0x494f173f, 0xb8951295, 0xe3143454, 0x12ce31fe, + 0xdbd13941, 0x2a0b3ceb, 0x929e2e7e, 0x63442bd4, 0xaa5b236b, + 0x5b8126c1, 0x1d596ee9, 0xec836b43, 0x259c63fc, 0xd4466656, + 0x6cd374c3, 0x9d097169, 0x541679d6, 0xa5cc7c7c, 0xfe4d5abd, + 0x0f975f17, 0xc68857a8, 0x37525202, 0x8fc74097, 0x7e1d453d, + 0xb7024d82, 0x46d84828, 0x3ab2ddd2, 0xcb68d878, 0x0277d0c7, + 0xf3add56d, 0x4b38c7f8, 0xbae2c252, 0x73fdcaed, 0x8227cf47, + 0xd9a6e986, 0x287cec2c, 0xe163e493, 0x10b9e139, 0xa82cf3ac, + 0x59f6f606, 0x90e9feb9, 0x6133fb13, 0x27ebb33b, 0xd631b691, + 0x1f2ebe2e, 0xeef4bb84, 0x5661a911, 0xa7bbacbb, 0x6ea4a404, + 0x9f7ea1ae, 0xc4ff876f, 0x352582c5, 0xfc3a8a7a, 0x0de08fd0, + 0xb5759d45, 0x44af98ef, 0x8db09050, 0x7c6a95fa, 0x7565bba4, + 0x84bfbe0e, 0x4da0b6b1, 0xbc7ab31b, 0x04efa18e, 0xf535a424, + 0x3c2aac9b, 0xcdf0a931, 0x96718ff0, 0x67ab8a5a, 0xaeb482e5, + 0x5f6e874f, 0xe7fb95da, 0x16219070, 0xdf3e98cf, 0x2ee49d65, + 0x683cd54d, 0x99e6d0e7, 0x50f9d858, 0xa123ddf2, 0x19b6cf67, + 0xe86ccacd, 0x2173c272, 0xd0a9c7d8, 0x8b28e119, 0x7af2e4b3, + 0xb3edec0c, 0x4237e9a6, 0xfaa2fb33, 0x0b78fe99, 0xc267f626, + 0x33bdf38c, 0x4fd76676, 0xbe0d63dc, 0x77126b63, 0x86c86ec9, + 0x3e5d7c5c, 0xcf8779f6, 0x06987149, 0xf74274e3, 0xacc35222, + 0x5d195788, 0x94065f37, 0x65dc5a9d, 0xdd494808, 0x2c934da2, + 0xe58c451d, 0x145640b7, 0x528e089f, 0xa3540d35, 0x6a4b058a, + 0x9b910020, 0x230412b5, 0xd2de171f, 0x1bc11fa0, 0xea1b1a0a, + 0xb19a3ccb, 0x40403961, 0x895f31de, 0x78853474, 0xc01026e1, + 0x31ca234b, 0xf8d52bf4, 0x090f2e5e, 0xeacb7748, 0x1b1172e2, + 0xd20e7a5d, 0x23d47ff7, 0x9b416d62, 0x6a9b68c8, 0xa3846077, + 0x525e65dd, 0x09df431c, 0xf80546b6, 0x311a4e09, 0xc0c04ba3, + 0x78555936, 0x898f5c9c, 0x40905423, 0xb14a5189, 0xf79219a1, + 0x06481c0b, 0xcf5714b4, 0x3e8d111e, 0x8618038b, 0x77c20621, + 0xbedd0e9e, 0x4f070b34, 0x14862df5, 0xe55c285f, 0x2c4320e0, + 0xdd99254a, 0x650c37df, 0x94d63275, 0x5dc93aca, 0xac133f60, + 0xd079aa9a, 0x21a3af30, 0xe8bca78f, 0x1966a225, 0xa1f3b0b0, + 0x5029b51a, 0x9936bda5, 0x68ecb80f, 0x336d9ece, 0xc2b79b64, + 0x0ba893db, 0xfa729671, 0x42e784e4, 0xb33d814e, 0x7a2289f1, + 0x8bf88c5b, 0xcd20c473, 0x3cfac1d9, 0xf5e5c966, 0x043fcccc, + 0xbcaade59, 0x4d70dbf3, 0x846fd34c, 0x75b5d6e6, 0x2e34f027, + 0xdfeef58d, 0x16f1fd32, 0xe72bf898, 0x5fbeea0d, 0xae64efa7, + 0x677be718, 0x96a1e2b2, 0x9faeccec, 0x6e74c946, 0xa76bc1f9, + 0x56b1c453, 0xee24d6c6, 0x1ffed36c, 0xd6e1dbd3, 0x273bde79, + 0x7cbaf8b8, 0x8d60fd12, 0x447ff5ad, 0xb5a5f007, 0x0d30e292, + 0xfceae738, 0x35f5ef87, 0xc42fea2d, 0x82f7a205, 0x732da7af, + 0xba32af10, 0x4be8aaba, 0xf37db82f, 0x02a7bd85, 0xcbb8b53a, + 0x3a62b090, 0x61e39651, 0x903993fb, 0x59269b44, 0xa8fc9eee, + 0x10698c7b, 0xe1b389d1, 0x28ac816e, 0xd97684c4, 0xa51c113e, + 0x54c61494, 0x9dd91c2b, 0x6c031981, 0xd4960b14, 0x254c0ebe, + 0xec530601, 0x1d8903ab, 0x4608256a, 0xb7d220c0, 0x7ecd287f, + 0x8f172dd5, 0x37823f40, 0xc6583aea, 0x0f473255, 0xfe9d37ff, + 0xb8457fd7, 0x499f7a7d, 0x808072c2, 0x715a7768, 0xc9cf65fd, + 0x38156057, 0xf10a68e8, 0x00d06d42, 0x5b514b83, 0xaa8b4e29, + 0x63944696, 0x924e433c, 0x2adb51a9, 0xdb015403, 0x121e5cbc, + 0xe3c45916}, + {0x00000000, 0x0ee7e8d1, 0x1dcfd1a2, 0x13283973, 0x3b9fa344, + 0x35784b95, 0x265072e6, 0x28b79a37, 0x773f4688, 0x79d8ae59, + 0x6af0972a, 0x64177ffb, 0x4ca0e5cc, 0x42470d1d, 0x516f346e, + 0x5f88dcbf, 0xee7e8d10, 0xe09965c1, 0xf3b15cb2, 0xfd56b463, + 0xd5e12e54, 0xdb06c685, 0xc82efff6, 0xc6c91727, 0x9941cb98, + 0x97a62349, 0x848e1a3a, 0x8a69f2eb, 0xa2de68dc, 0xac39800d, + 0xbf11b97e, 0xb1f651af, 0x078c1c61, 0x096bf4b0, 0x1a43cdc3, + 0x14a42512, 0x3c13bf25, 0x32f457f4, 0x21dc6e87, 0x2f3b8656, + 0x70b35ae9, 0x7e54b238, 0x6d7c8b4b, 0x639b639a, 0x4b2cf9ad, + 0x45cb117c, 0x56e3280f, 0x5804c0de, 0xe9f29171, 0xe71579a0, + 0xf43d40d3, 0xfadaa802, 0xd26d3235, 0xdc8adae4, 0xcfa2e397, + 0xc1450b46, 0x9ecdd7f9, 0x902a3f28, 0x8302065b, 0x8de5ee8a, + 0xa55274bd, 0xabb59c6c, 0xb89da51f, 0xb67a4dce, 0x0f1838c2, + 0x01ffd013, 0x12d7e960, 0x1c3001b1, 0x34879b86, 0x3a607357, + 0x29484a24, 0x27afa2f5, 0x78277e4a, 0x76c0969b, 0x65e8afe8, + 0x6b0f4739, 0x43b8dd0e, 0x4d5f35df, 0x5e770cac, 0x5090e47d, + 0xe166b5d2, 0xef815d03, 0xfca96470, 0xf24e8ca1, 0xdaf91696, + 0xd41efe47, 0xc736c734, 0xc9d12fe5, 0x9659f35a, 0x98be1b8b, + 0x8b9622f8, 0x8571ca29, 0xadc6501e, 0xa321b8cf, 0xb00981bc, + 0xbeee696d, 0x089424a3, 0x0673cc72, 0x155bf501, 0x1bbc1dd0, + 0x330b87e7, 0x3dec6f36, 0x2ec45645, 0x2023be94, 0x7fab622b, + 0x714c8afa, 0x6264b389, 0x6c835b58, 0x4434c16f, 0x4ad329be, + 0x59fb10cd, 0x571cf81c, 0xe6eaa9b3, 0xe80d4162, 0xfb257811, + 0xf5c290c0, 0xdd750af7, 0xd392e226, 0xc0badb55, 0xce5d3384, + 0x91d5ef3b, 0x9f3207ea, 0x8c1a3e99, 0x82fdd648, 0xaa4a4c7f, + 0xa4ada4ae, 0xb7859ddd, 0xb962750c, 0x1e307184, 0x10d79955, + 0x03ffa026, 0x0d1848f7, 0x25afd2c0, 0x2b483a11, 0x38600362, + 0x3687ebb3, 0x690f370c, 0x67e8dfdd, 0x74c0e6ae, 0x7a270e7f, + 0x52909448, 0x5c777c99, 0x4f5f45ea, 0x41b8ad3b, 0xf04efc94, + 0xfea91445, 0xed812d36, 0xe366c5e7, 0xcbd15fd0, 0xc536b701, + 0xd61e8e72, 0xd8f966a3, 0x8771ba1c, 0x899652cd, 0x9abe6bbe, + 0x9459836f, 0xbcee1958, 0xb209f189, 0xa121c8fa, 0xafc6202b, + 0x19bc6de5, 0x175b8534, 0x0473bc47, 0x0a945496, 0x2223cea1, + 0x2cc42670, 0x3fec1f03, 0x310bf7d2, 0x6e832b6d, 0x6064c3bc, + 0x734cfacf, 0x7dab121e, 0x551c8829, 0x5bfb60f8, 0x48d3598b, + 0x4634b15a, 0xf7c2e0f5, 0xf9250824, 0xea0d3157, 0xe4ead986, + 0xcc5d43b1, 0xc2baab60, 0xd1929213, 0xdf757ac2, 0x80fda67d, + 0x8e1a4eac, 0x9d3277df, 0x93d59f0e, 0xbb620539, 0xb585ede8, + 0xa6add49b, 0xa84a3c4a, 0x11284946, 0x1fcfa197, 0x0ce798e4, + 0x02007035, 0x2ab7ea02, 0x245002d3, 0x37783ba0, 0x399fd371, + 0x66170fce, 0x68f0e71f, 0x7bd8de6c, 0x753f36bd, 0x5d88ac8a, + 0x536f445b, 0x40477d28, 0x4ea095f9, 0xff56c456, 0xf1b12c87, + 0xe29915f4, 0xec7efd25, 0xc4c96712, 0xca2e8fc3, 0xd906b6b0, + 0xd7e15e61, 0x886982de, 0x868e6a0f, 0x95a6537c, 0x9b41bbad, + 0xb3f6219a, 0xbd11c94b, 0xae39f038, 0xa0de18e9, 0x16a45527, + 0x1843bdf6, 0x0b6b8485, 0x058c6c54, 0x2d3bf663, 0x23dc1eb2, + 0x30f427c1, 0x3e13cf10, 0x619b13af, 0x6f7cfb7e, 0x7c54c20d, + 0x72b32adc, 0x5a04b0eb, 0x54e3583a, 0x47cb6149, 0x492c8998, + 0xf8dad837, 0xf63d30e6, 0xe5150995, 0xebf2e144, 0xc3457b73, + 0xcda293a2, 0xde8aaad1, 0xd06d4200, 0x8fe59ebf, 0x8102766e, + 0x922a4f1d, 0x9ccda7cc, 0xb47a3dfb, 0xba9dd52a, 0xa9b5ec59, + 0xa7520488}, + {0x00000000, 0x3c60e308, 0x78c1c610, 0x44a12518, 0xf1838c20, + 0xcde36f28, 0x89424a30, 0xb522a938, 0x38761e01, 0x0416fd09, + 0x40b7d811, 0x7cd73b19, 0xc9f59221, 0xf5957129, 0xb1345431, + 0x8d54b739, 0x70ec3c02, 0x4c8cdf0a, 0x082dfa12, 0x344d191a, + 0x816fb022, 0xbd0f532a, 0xf9ae7632, 0xc5ce953a, 0x489a2203, + 0x74fac10b, 0x305be413, 0x0c3b071b, 0xb919ae23, 0x85794d2b, + 0xc1d86833, 0xfdb88b3b, 0xe1d87804, 0xddb89b0c, 0x9919be14, + 0xa5795d1c, 0x105bf424, 0x2c3b172c, 0x689a3234, 0x54fad13c, + 0xd9ae6605, 0xe5ce850d, 0xa16fa015, 0x9d0f431d, 0x282dea25, + 0x144d092d, 0x50ec2c35, 0x6c8ccf3d, 0x91344406, 0xad54a70e, + 0xe9f58216, 0xd595611e, 0x60b7c826, 0x5cd72b2e, 0x18760e36, + 0x2416ed3e, 0xa9425a07, 0x9522b90f, 0xd1839c17, 0xede37f1f, + 0x58c1d627, 0x64a1352f, 0x20001037, 0x1c60f33f, 0x18c1f649, + 0x24a11541, 0x60003059, 0x5c60d351, 0xe9427a69, 0xd5229961, + 0x9183bc79, 0xade35f71, 0x20b7e848, 0x1cd70b40, 0x58762e58, + 0x6416cd50, 0xd1346468, 0xed548760, 0xa9f5a278, 0x95954170, + 0x682dca4b, 0x544d2943, 0x10ec0c5b, 0x2c8cef53, 0x99ae466b, + 0xa5cea563, 0xe16f807b, 0xdd0f6373, 0x505bd44a, 0x6c3b3742, + 0x289a125a, 0x14faf152, 0xa1d8586a, 0x9db8bb62, 0xd9199e7a, + 0xe5797d72, 0xf9198e4d, 0xc5796d45, 0x81d8485d, 0xbdb8ab55, + 0x089a026d, 0x34fae165, 0x705bc47d, 0x4c3b2775, 0xc16f904c, + 0xfd0f7344, 0xb9ae565c, 0x85ceb554, 0x30ec1c6c, 0x0c8cff64, + 0x482dda7c, 0x744d3974, 0x89f5b24f, 0xb5955147, 0xf134745f, + 0xcd549757, 0x78763e6f, 0x4416dd67, 0x00b7f87f, 0x3cd71b77, + 0xb183ac4e, 0x8de34f46, 0xc9426a5e, 0xf5228956, 0x4000206e, + 0x7c60c366, 0x38c1e67e, 0x04a10576, 0x3183ec92, 0x0de30f9a, + 0x49422a82, 0x7522c98a, 0xc00060b2, 0xfc6083ba, 0xb8c1a6a2, + 0x84a145aa, 0x09f5f293, 0x3595119b, 0x71343483, 0x4d54d78b, + 0xf8767eb3, 0xc4169dbb, 0x80b7b8a3, 0xbcd75bab, 0x416fd090, + 0x7d0f3398, 0x39ae1680, 0x05cef588, 0xb0ec5cb0, 0x8c8cbfb8, + 0xc82d9aa0, 0xf44d79a8, 0x7919ce91, 0x45792d99, 0x01d80881, + 0x3db8eb89, 0x889a42b1, 0xb4faa1b9, 0xf05b84a1, 0xcc3b67a9, + 0xd05b9496, 0xec3b779e, 0xa89a5286, 0x94fab18e, 0x21d818b6, + 0x1db8fbbe, 0x5919dea6, 0x65793dae, 0xe82d8a97, 0xd44d699f, + 0x90ec4c87, 0xac8caf8f, 0x19ae06b7, 0x25cee5bf, 0x616fc0a7, + 0x5d0f23af, 0xa0b7a894, 0x9cd74b9c, 0xd8766e84, 0xe4168d8c, + 0x513424b4, 0x6d54c7bc, 0x29f5e2a4, 0x159501ac, 0x98c1b695, + 0xa4a1559d, 0xe0007085, 0xdc60938d, 0x69423ab5, 0x5522d9bd, + 0x1183fca5, 0x2de31fad, 0x29421adb, 0x1522f9d3, 0x5183dccb, + 0x6de33fc3, 0xd8c196fb, 0xe4a175f3, 0xa00050eb, 0x9c60b3e3, + 0x113404da, 0x2d54e7d2, 0x69f5c2ca, 0x559521c2, 0xe0b788fa, + 0xdcd76bf2, 0x98764eea, 0xa416ade2, 0x59ae26d9, 0x65cec5d1, + 0x216fe0c9, 0x1d0f03c1, 0xa82daaf9, 0x944d49f1, 0xd0ec6ce9, + 0xec8c8fe1, 0x61d838d8, 0x5db8dbd0, 0x1919fec8, 0x25791dc0, + 0x905bb4f8, 0xac3b57f0, 0xe89a72e8, 0xd4fa91e0, 0xc89a62df, + 0xf4fa81d7, 0xb05ba4cf, 0x8c3b47c7, 0x3919eeff, 0x05790df7, + 0x41d828ef, 0x7db8cbe7, 0xf0ec7cde, 0xcc8c9fd6, 0x882dbace, + 0xb44d59c6, 0x016ff0fe, 0x3d0f13f6, 0x79ae36ee, 0x45ced5e6, + 0xb8765edd, 0x8416bdd5, 0xc0b798cd, 0xfcd77bc5, 0x49f5d2fd, + 0x759531f5, 0x313414ed, 0x0d54f7e5, 0x800040dc, 0xbc60a3d4, + 0xf8c186cc, 0xc4a165c4, 0x7183ccfc, 0x4de32ff4, 0x09420aec, + 0x3522e9e4}, + {0x00000000, 0x6307d924, 0xc60fb248, 0xa5086b6c, 0x576e62d1, + 0x3469bbf5, 0x9161d099, 0xf26609bd, 0xaedcc5a2, 0xcddb1c86, + 0x68d377ea, 0x0bd4aece, 0xf9b2a773, 0x9ab57e57, 0x3fbd153b, + 0x5cbacc1f, 0x86c88d05, 0xe5cf5421, 0x40c73f4d, 0x23c0e669, + 0xd1a6efd4, 0xb2a136f0, 0x17a95d9c, 0x74ae84b8, 0x281448a7, + 0x4b139183, 0xee1bfaef, 0x8d1c23cb, 0x7f7a2a76, 0x1c7df352, + 0xb975983e, 0xda72411a, 0xd6e01c4b, 0xb5e7c56f, 0x10efae03, + 0x73e87727, 0x818e7e9a, 0xe289a7be, 0x4781ccd2, 0x248615f6, + 0x783cd9e9, 0x1b3b00cd, 0xbe336ba1, 0xdd34b285, 0x2f52bb38, + 0x4c55621c, 0xe95d0970, 0x8a5ad054, 0x5028914e, 0x332f486a, + 0x96272306, 0xf520fa22, 0x0746f39f, 0x64412abb, 0xc14941d7, + 0xa24e98f3, 0xfef454ec, 0x9df38dc8, 0x38fbe6a4, 0x5bfc3f80, + 0xa99a363d, 0xca9def19, 0x6f958475, 0x0c925d51, 0x76b13ed7, + 0x15b6e7f3, 0xb0be8c9f, 0xd3b955bb, 0x21df5c06, 0x42d88522, + 0xe7d0ee4e, 0x84d7376a, 0xd86dfb75, 0xbb6a2251, 0x1e62493d, + 0x7d659019, 0x8f0399a4, 0xec044080, 0x490c2bec, 0x2a0bf2c8, + 0xf079b3d2, 0x937e6af6, 0x3676019a, 0x5571d8be, 0xa717d103, + 0xc4100827, 0x6118634b, 0x021fba6f, 0x5ea57670, 0x3da2af54, + 0x98aac438, 0xfbad1d1c, 0x09cb14a1, 0x6acccd85, 0xcfc4a6e9, + 0xacc37fcd, 0xa051229c, 0xc356fbb8, 0x665e90d4, 0x055949f0, + 0xf73f404d, 0x94389969, 0x3130f205, 0x52372b21, 0x0e8de73e, + 0x6d8a3e1a, 0xc8825576, 0xab858c52, 0x59e385ef, 0x3ae45ccb, + 0x9fec37a7, 0xfcebee83, 0x2699af99, 0x459e76bd, 0xe0961dd1, + 0x8391c4f5, 0x71f7cd48, 0x12f0146c, 0xb7f87f00, 0xd4ffa624, + 0x88456a3b, 0xeb42b31f, 0x4e4ad873, 0x2d4d0157, 0xdf2b08ea, + 0xbc2cd1ce, 0x1924baa2, 0x7a236386, 0xed627dae, 0x8e65a48a, + 0x2b6dcfe6, 0x486a16c2, 0xba0c1f7f, 0xd90bc65b, 0x7c03ad37, + 0x1f047413, 0x43beb80c, 0x20b96128, 0x85b10a44, 0xe6b6d360, + 0x14d0dadd, 0x77d703f9, 0xd2df6895, 0xb1d8b1b1, 0x6baaf0ab, + 0x08ad298f, 0xada542e3, 0xcea29bc7, 0x3cc4927a, 0x5fc34b5e, + 0xfacb2032, 0x99ccf916, 0xc5763509, 0xa671ec2d, 0x03798741, + 0x607e5e65, 0x921857d8, 0xf11f8efc, 0x5417e590, 0x37103cb4, + 0x3b8261e5, 0x5885b8c1, 0xfd8dd3ad, 0x9e8a0a89, 0x6cec0334, + 0x0febda10, 0xaae3b17c, 0xc9e46858, 0x955ea447, 0xf6597d63, + 0x5351160f, 0x3056cf2b, 0xc230c696, 0xa1371fb2, 0x043f74de, + 0x6738adfa, 0xbd4aece0, 0xde4d35c4, 0x7b455ea8, 0x1842878c, + 0xea248e31, 0x89235715, 0x2c2b3c79, 0x4f2ce55d, 0x13962942, + 0x7091f066, 0xd5999b0a, 0xb69e422e, 0x44f84b93, 0x27ff92b7, + 0x82f7f9db, 0xe1f020ff, 0x9bd34379, 0xf8d49a5d, 0x5ddcf131, + 0x3edb2815, 0xccbd21a8, 0xafbaf88c, 0x0ab293e0, 0x69b54ac4, + 0x350f86db, 0x56085fff, 0xf3003493, 0x9007edb7, 0x6261e40a, + 0x01663d2e, 0xa46e5642, 0xc7698f66, 0x1d1bce7c, 0x7e1c1758, + 0xdb147c34, 0xb813a510, 0x4a75acad, 0x29727589, 0x8c7a1ee5, + 0xef7dc7c1, 0xb3c70bde, 0xd0c0d2fa, 0x75c8b996, 0x16cf60b2, + 0xe4a9690f, 0x87aeb02b, 0x22a6db47, 0x41a10263, 0x4d335f32, + 0x2e348616, 0x8b3ced7a, 0xe83b345e, 0x1a5d3de3, 0x795ae4c7, + 0xdc528fab, 0xbf55568f, 0xe3ef9a90, 0x80e843b4, 0x25e028d8, + 0x46e7f1fc, 0xb481f841, 0xd7862165, 0x728e4a09, 0x1189932d, + 0xcbfbd237, 0xa8fc0b13, 0x0df4607f, 0x6ef3b95b, 0x9c95b0e6, + 0xff9269c2, 0x5a9a02ae, 0x399ddb8a, 0x65271795, 0x0620ceb1, + 0xa328a5dd, 0xc02f7cf9, 0x32497544, 0x514eac60, 0xf446c70c, + 0x97411e28}, + {0x00000000, 0x01b5fd1d, 0x036bfa3a, 0x02de0727, 0x06d7f474, + 0x07620969, 0x05bc0e4e, 0x0409f353, 0x0dafe8e8, 0x0c1a15f5, + 0x0ec412d2, 0x0f71efcf, 0x0b781c9c, 0x0acde181, 0x0813e6a6, + 0x09a61bbb, 0x1b5fd1d0, 0x1aea2ccd, 0x18342bea, 0x1981d6f7, + 0x1d8825a4, 0x1c3dd8b9, 0x1ee3df9e, 0x1f562283, 0x16f03938, + 0x1745c425, 0x159bc302, 0x142e3e1f, 0x1027cd4c, 0x11923051, + 0x134c3776, 0x12f9ca6b, 0x36bfa3a0, 0x370a5ebd, 0x35d4599a, + 0x3461a487, 0x306857d4, 0x31ddaac9, 0x3303adee, 0x32b650f3, + 0x3b104b48, 0x3aa5b655, 0x387bb172, 0x39ce4c6f, 0x3dc7bf3c, + 0x3c724221, 0x3eac4506, 0x3f19b81b, 0x2de07270, 0x2c558f6d, + 0x2e8b884a, 0x2f3e7557, 0x2b378604, 0x2a827b19, 0x285c7c3e, + 0x29e98123, 0x204f9a98, 0x21fa6785, 0x232460a2, 0x22919dbf, + 0x26986eec, 0x272d93f1, 0x25f394d6, 0x244669cb, 0x6d7f4740, + 0x6ccaba5d, 0x6e14bd7a, 0x6fa14067, 0x6ba8b334, 0x6a1d4e29, + 0x68c3490e, 0x6976b413, 0x60d0afa8, 0x616552b5, 0x63bb5592, + 0x620ea88f, 0x66075bdc, 0x67b2a6c1, 0x656ca1e6, 0x64d95cfb, + 0x76209690, 0x77956b8d, 0x754b6caa, 0x74fe91b7, 0x70f762e4, + 0x71429ff9, 0x739c98de, 0x722965c3, 0x7b8f7e78, 0x7a3a8365, + 0x78e48442, 0x7951795f, 0x7d588a0c, 0x7ced7711, 0x7e337036, + 0x7f868d2b, 0x5bc0e4e0, 0x5a7519fd, 0x58ab1eda, 0x591ee3c7, + 0x5d171094, 0x5ca2ed89, 0x5e7ceaae, 0x5fc917b3, 0x566f0c08, + 0x57daf115, 0x5504f632, 0x54b10b2f, 0x50b8f87c, 0x510d0561, + 0x53d30246, 0x5266ff5b, 0x409f3530, 0x412ac82d, 0x43f4cf0a, + 0x42413217, 0x4648c144, 0x47fd3c59, 0x45233b7e, 0x4496c663, + 0x4d30ddd8, 0x4c8520c5, 0x4e5b27e2, 0x4feedaff, 0x4be729ac, + 0x4a52d4b1, 0x488cd396, 0x49392e8b, 0xdafe8e80, 0xdb4b739d, + 0xd99574ba, 0xd82089a7, 0xdc297af4, 0xdd9c87e9, 0xdf4280ce, + 0xdef77dd3, 0xd7516668, 0xd6e49b75, 0xd43a9c52, 0xd58f614f, + 0xd186921c, 0xd0336f01, 0xd2ed6826, 0xd358953b, 0xc1a15f50, + 0xc014a24d, 0xc2caa56a, 0xc37f5877, 0xc776ab24, 0xc6c35639, + 0xc41d511e, 0xc5a8ac03, 0xcc0eb7b8, 0xcdbb4aa5, 0xcf654d82, + 0xced0b09f, 0xcad943cc, 0xcb6cbed1, 0xc9b2b9f6, 0xc80744eb, + 0xec412d20, 0xedf4d03d, 0xef2ad71a, 0xee9f2a07, 0xea96d954, + 0xeb232449, 0xe9fd236e, 0xe848de73, 0xe1eec5c8, 0xe05b38d5, + 0xe2853ff2, 0xe330c2ef, 0xe73931bc, 0xe68ccca1, 0xe452cb86, + 0xe5e7369b, 0xf71efcf0, 0xf6ab01ed, 0xf47506ca, 0xf5c0fbd7, + 0xf1c90884, 0xf07cf599, 0xf2a2f2be, 0xf3170fa3, 0xfab11418, + 0xfb04e905, 0xf9daee22, 0xf86f133f, 0xfc66e06c, 0xfdd31d71, + 0xff0d1a56, 0xfeb8e74b, 0xb781c9c0, 0xb63434dd, 0xb4ea33fa, + 0xb55fcee7, 0xb1563db4, 0xb0e3c0a9, 0xb23dc78e, 0xb3883a93, + 0xba2e2128, 0xbb9bdc35, 0xb945db12, 0xb8f0260f, 0xbcf9d55c, + 0xbd4c2841, 0xbf922f66, 0xbe27d27b, 0xacde1810, 0xad6be50d, + 0xafb5e22a, 0xae001f37, 0xaa09ec64, 0xabbc1179, 0xa962165e, + 0xa8d7eb43, 0xa171f0f8, 0xa0c40de5, 0xa21a0ac2, 0xa3aff7df, + 0xa7a6048c, 0xa613f991, 0xa4cdfeb6, 0xa57803ab, 0x813e6a60, + 0x808b977d, 0x8255905a, 0x83e06d47, 0x87e99e14, 0x865c6309, + 0x8482642e, 0x85379933, 0x8c918288, 0x8d247f95, 0x8ffa78b2, + 0x8e4f85af, 0x8a4676fc, 0x8bf38be1, 0x892d8cc6, 0x889871db, + 0x9a61bbb0, 0x9bd446ad, 0x990a418a, 0x98bfbc97, 0x9cb64fc4, + 0x9d03b2d9, 0x9fddb5fe, 0x9e6848e3, 0x97ce5358, 0x967bae45, + 0x94a5a962, 0x9510547f, 0x9119a72c, 0x90ac5a31, 0x92725d16, + 0x93c7a00b}, + {0x00000000, 0x6e8c1b41, 0xdd183682, 0xb3942dc3, 0x61416b45, + 0x0fcd7004, 0xbc595dc7, 0xd2d54686, 0xc282d68a, 0xac0ecdcb, + 0x1f9ae008, 0x7116fb49, 0xa3c3bdcf, 0xcd4fa68e, 0x7edb8b4d, + 0x1057900c, 0x5e74ab55, 0x30f8b014, 0x836c9dd7, 0xede08696, + 0x3f35c010, 0x51b9db51, 0xe22df692, 0x8ca1edd3, 0x9cf67ddf, + 0xf27a669e, 0x41ee4b5d, 0x2f62501c, 0xfdb7169a, 0x933b0ddb, + 0x20af2018, 0x4e233b59, 0xbce956aa, 0xd2654deb, 0x61f16028, + 0x0f7d7b69, 0xdda83def, 0xb32426ae, 0x00b00b6d, 0x6e3c102c, + 0x7e6b8020, 0x10e79b61, 0xa373b6a2, 0xcdffade3, 0x1f2aeb65, + 0x71a6f024, 0xc232dde7, 0xacbec6a6, 0xe29dfdff, 0x8c11e6be, + 0x3f85cb7d, 0x5109d03c, 0x83dc96ba, 0xed508dfb, 0x5ec4a038, + 0x3048bb79, 0x201f2b75, 0x4e933034, 0xfd071df7, 0x938b06b6, + 0x415e4030, 0x2fd25b71, 0x9c4676b2, 0xf2ca6df3, 0xa2a3ab15, + 0xcc2fb054, 0x7fbb9d97, 0x113786d6, 0xc3e2c050, 0xad6edb11, + 0x1efaf6d2, 0x7076ed93, 0x60217d9f, 0x0ead66de, 0xbd394b1d, + 0xd3b5505c, 0x016016da, 0x6fec0d9b, 0xdc782058, 0xb2f43b19, + 0xfcd70040, 0x925b1b01, 0x21cf36c2, 0x4f432d83, 0x9d966b05, + 0xf31a7044, 0x408e5d87, 0x2e0246c6, 0x3e55d6ca, 0x50d9cd8b, + 0xe34de048, 0x8dc1fb09, 0x5f14bd8f, 0x3198a6ce, 0x820c8b0d, + 0xec80904c, 0x1e4afdbf, 0x70c6e6fe, 0xc352cb3d, 0xadded07c, + 0x7f0b96fa, 0x11878dbb, 0xa213a078, 0xcc9fbb39, 0xdcc82b35, + 0xb2443074, 0x01d01db7, 0x6f5c06f6, 0xbd894070, 0xd3055b31, + 0x609176f2, 0x0e1d6db3, 0x403e56ea, 0x2eb24dab, 0x9d266068, + 0xf3aa7b29, 0x217f3daf, 0x4ff326ee, 0xfc670b2d, 0x92eb106c, + 0x82bc8060, 0xec309b21, 0x5fa4b6e2, 0x3128ada3, 0xe3fdeb25, + 0x8d71f064, 0x3ee5dda7, 0x5069c6e6, 0x9e36506b, 0xf0ba4b2a, + 0x432e66e9, 0x2da27da8, 0xff773b2e, 0x91fb206f, 0x226f0dac, + 0x4ce316ed, 0x5cb486e1, 0x32389da0, 0x81acb063, 0xef20ab22, + 0x3df5eda4, 0x5379f6e5, 0xe0eddb26, 0x8e61c067, 0xc042fb3e, + 0xaecee07f, 0x1d5acdbc, 0x73d6d6fd, 0xa103907b, 0xcf8f8b3a, + 0x7c1ba6f9, 0x1297bdb8, 0x02c02db4, 0x6c4c36f5, 0xdfd81b36, + 0xb1540077, 0x638146f1, 0x0d0d5db0, 0xbe997073, 0xd0156b32, + 0x22df06c1, 0x4c531d80, 0xffc73043, 0x914b2b02, 0x439e6d84, + 0x2d1276c5, 0x9e865b06, 0xf00a4047, 0xe05dd04b, 0x8ed1cb0a, + 0x3d45e6c9, 0x53c9fd88, 0x811cbb0e, 0xef90a04f, 0x5c048d8c, + 0x328896cd, 0x7cabad94, 0x1227b6d5, 0xa1b39b16, 0xcf3f8057, + 0x1deac6d1, 0x7366dd90, 0xc0f2f053, 0xae7eeb12, 0xbe297b1e, + 0xd0a5605f, 0x63314d9c, 0x0dbd56dd, 0xdf68105b, 0xb1e40b1a, + 0x027026d9, 0x6cfc3d98, 0x3c95fb7e, 0x5219e03f, 0xe18dcdfc, + 0x8f01d6bd, 0x5dd4903b, 0x33588b7a, 0x80cca6b9, 0xee40bdf8, + 0xfe172df4, 0x909b36b5, 0x230f1b76, 0x4d830037, 0x9f5646b1, + 0xf1da5df0, 0x424e7033, 0x2cc26b72, 0x62e1502b, 0x0c6d4b6a, + 0xbff966a9, 0xd1757de8, 0x03a03b6e, 0x6d2c202f, 0xdeb80dec, + 0xb03416ad, 0xa06386a1, 0xceef9de0, 0x7d7bb023, 0x13f7ab62, + 0xc122ede4, 0xafaef6a5, 0x1c3adb66, 0x72b6c027, 0x807cadd4, + 0xeef0b695, 0x5d649b56, 0x33e88017, 0xe13dc691, 0x8fb1ddd0, + 0x3c25f013, 0x52a9eb52, 0x42fe7b5e, 0x2c72601f, 0x9fe64ddc, + 0xf16a569d, 0x23bf101b, 0x4d330b5a, 0xfea72699, 0x902b3dd8, + 0xde080681, 0xb0841dc0, 0x03103003, 0x6d9c2b42, 0xbf496dc4, + 0xd1c57685, 0x62515b46, 0x0cdd4007, 0x1c8ad00b, 0x7206cb4a, + 0xc192e689, 0xaf1efdc8, 0x7dcbbb4e, 0x1347a00f, 0xa0d38dcc, + 0xce5f968d}, + {0x00000000, 0xe71da697, 0x154a4b6f, 0xf257edf8, 0x2a9496de, + 0xcd893049, 0x3fdeddb1, 0xd8c37b26, 0x55292dbc, 0xb2348b2b, + 0x406366d3, 0xa77ec044, 0x7fbdbb62, 0x98a01df5, 0x6af7f00d, + 0x8dea569a, 0xaa525b78, 0x4d4ffdef, 0xbf181017, 0x5805b680, + 0x80c6cda6, 0x67db6b31, 0x958c86c9, 0x7291205e, 0xff7b76c4, + 0x1866d053, 0xea313dab, 0x0d2c9b3c, 0xd5efe01a, 0x32f2468d, + 0xc0a5ab75, 0x27b80de2, 0x8fd5b0b1, 0x68c81626, 0x9a9ffbde, + 0x7d825d49, 0xa541266f, 0x425c80f8, 0xb00b6d00, 0x5716cb97, + 0xdafc9d0d, 0x3de13b9a, 0xcfb6d662, 0x28ab70f5, 0xf0680bd3, + 0x1775ad44, 0xe52240bc, 0x023fe62b, 0x2587ebc9, 0xc29a4d5e, + 0x30cda0a6, 0xd7d00631, 0x0f137d17, 0xe80edb80, 0x1a593678, + 0xfd4490ef, 0x70aec675, 0x97b360e2, 0x65e48d1a, 0x82f92b8d, + 0x5a3a50ab, 0xbd27f63c, 0x4f701bc4, 0xa86dbd53, 0xc4da6723, + 0x23c7c1b4, 0xd1902c4c, 0x368d8adb, 0xee4ef1fd, 0x0953576a, + 0xfb04ba92, 0x1c191c05, 0x91f34a9f, 0x76eeec08, 0x84b901f0, + 0x63a4a767, 0xbb67dc41, 0x5c7a7ad6, 0xae2d972e, 0x493031b9, + 0x6e883c5b, 0x89959acc, 0x7bc27734, 0x9cdfd1a3, 0x441caa85, + 0xa3010c12, 0x5156e1ea, 0xb64b477d, 0x3ba111e7, 0xdcbcb770, + 0x2eeb5a88, 0xc9f6fc1f, 0x11358739, 0xf62821ae, 0x047fcc56, + 0xe3626ac1, 0x4b0fd792, 0xac127105, 0x5e459cfd, 0xb9583a6a, + 0x619b414c, 0x8686e7db, 0x74d10a23, 0x93ccacb4, 0x1e26fa2e, + 0xf93b5cb9, 0x0b6cb141, 0xec7117d6, 0x34b26cf0, 0xd3afca67, + 0x21f8279f, 0xc6e58108, 0xe15d8cea, 0x06402a7d, 0xf417c785, + 0x130a6112, 0xcbc91a34, 0x2cd4bca3, 0xde83515b, 0x399ef7cc, + 0xb474a156, 0x536907c1, 0xa13eea39, 0x46234cae, 0x9ee03788, + 0x79fd911f, 0x8baa7ce7, 0x6cb7da70, 0x52c5c807, 0xb5d86e90, + 0x478f8368, 0xa09225ff, 0x78515ed9, 0x9f4cf84e, 0x6d1b15b6, + 0x8a06b321, 0x07ece5bb, 0xe0f1432c, 0x12a6aed4, 0xf5bb0843, + 0x2d787365, 0xca65d5f2, 0x3832380a, 0xdf2f9e9d, 0xf897937f, + 0x1f8a35e8, 0xedddd810, 0x0ac07e87, 0xd20305a1, 0x351ea336, + 0xc7494ece, 0x2054e859, 0xadbebec3, 0x4aa31854, 0xb8f4f5ac, + 0x5fe9533b, 0x872a281d, 0x60378e8a, 0x92606372, 0x757dc5e5, + 0xdd1078b6, 0x3a0dde21, 0xc85a33d9, 0x2f47954e, 0xf784ee68, + 0x109948ff, 0xe2cea507, 0x05d30390, 0x8839550a, 0x6f24f39d, + 0x9d731e65, 0x7a6eb8f2, 0xa2adc3d4, 0x45b06543, 0xb7e788bb, + 0x50fa2e2c, 0x774223ce, 0x905f8559, 0x620868a1, 0x8515ce36, + 0x5dd6b510, 0xbacb1387, 0x489cfe7f, 0xaf8158e8, 0x226b0e72, + 0xc576a8e5, 0x3721451d, 0xd03ce38a, 0x08ff98ac, 0xefe23e3b, + 0x1db5d3c3, 0xfaa87554, 0x961faf24, 0x710209b3, 0x8355e44b, + 0x644842dc, 0xbc8b39fa, 0x5b969f6d, 0xa9c17295, 0x4edcd402, + 0xc3368298, 0x242b240f, 0xd67cc9f7, 0x31616f60, 0xe9a21446, + 0x0ebfb2d1, 0xfce85f29, 0x1bf5f9be, 0x3c4df45c, 0xdb5052cb, + 0x2907bf33, 0xce1a19a4, 0x16d96282, 0xf1c4c415, 0x039329ed, + 0xe48e8f7a, 0x6964d9e0, 0x8e797f77, 0x7c2e928f, 0x9b333418, + 0x43f04f3e, 0xa4ede9a9, 0x56ba0451, 0xb1a7a2c6, 0x19ca1f95, + 0xfed7b902, 0x0c8054fa, 0xeb9df26d, 0x335e894b, 0xd4432fdc, + 0x2614c224, 0xc10964b3, 0x4ce33229, 0xabfe94be, 0x59a97946, + 0xbeb4dfd1, 0x6677a4f7, 0x816a0260, 0x733def98, 0x9420490f, + 0xb39844ed, 0x5485e27a, 0xa6d20f82, 0x41cfa915, 0x990cd233, + 0x7e1174a4, 0x8c46995c, 0x6b5b3fcb, 0xe6b16951, 0x01accfc6, + 0xf3fb223e, 0x14e684a9, 0xcc25ff8f, 0x2b385918, 0xd96fb4e0, + 0x3e721277}, + {0x00000000, 0xa58b900e, 0x9066265d, 0x35edb653, 0xfbbd4afb, + 0x5e36daf5, 0x6bdb6ca6, 0xce50fca8, 0x2c0b93b7, 0x898003b9, + 0xbc6db5ea, 0x19e625e4, 0xd7b6d94c, 0x723d4942, 0x47d0ff11, + 0xe25b6f1f, 0x5817276e, 0xfd9cb760, 0xc8710133, 0x6dfa913d, + 0xa3aa6d95, 0x0621fd9b, 0x33cc4bc8, 0x9647dbc6, 0x741cb4d9, + 0xd19724d7, 0xe47a9284, 0x41f1028a, 0x8fa1fe22, 0x2a2a6e2c, + 0x1fc7d87f, 0xba4c4871, 0xb02e4edc, 0x15a5ded2, 0x20486881, + 0x85c3f88f, 0x4b930427, 0xee189429, 0xdbf5227a, 0x7e7eb274, + 0x9c25dd6b, 0x39ae4d65, 0x0c43fb36, 0xa9c86b38, 0x67989790, + 0xc213079e, 0xf7feb1cd, 0x527521c3, 0xe83969b2, 0x4db2f9bc, + 0x785f4fef, 0xddd4dfe1, 0x13842349, 0xb60fb347, 0x83e20514, + 0x2669951a, 0xc432fa05, 0x61b96a0b, 0x5454dc58, 0xf1df4c56, + 0x3f8fb0fe, 0x9a0420f0, 0xafe996a3, 0x0a6206ad, 0xbb2d9bf9, + 0x1ea60bf7, 0x2b4bbda4, 0x8ec02daa, 0x4090d102, 0xe51b410c, + 0xd0f6f75f, 0x757d6751, 0x9726084e, 0x32ad9840, 0x07402e13, + 0xa2cbbe1d, 0x6c9b42b5, 0xc910d2bb, 0xfcfd64e8, 0x5976f4e6, + 0xe33abc97, 0x46b12c99, 0x735c9aca, 0xd6d70ac4, 0x1887f66c, + 0xbd0c6662, 0x88e1d031, 0x2d6a403f, 0xcf312f20, 0x6ababf2e, + 0x5f57097d, 0xfadc9973, 0x348c65db, 0x9107f5d5, 0xa4ea4386, + 0x0161d388, 0x0b03d525, 0xae88452b, 0x9b65f378, 0x3eee6376, + 0xf0be9fde, 0x55350fd0, 0x60d8b983, 0xc553298d, 0x27084692, + 0x8283d69c, 0xb76e60cf, 0x12e5f0c1, 0xdcb50c69, 0x793e9c67, + 0x4cd32a34, 0xe958ba3a, 0x5314f24b, 0xf69f6245, 0xc372d416, + 0x66f94418, 0xa8a9b8b0, 0x0d2228be, 0x38cf9eed, 0x9d440ee3, + 0x7f1f61fc, 0xda94f1f2, 0xef7947a1, 0x4af2d7af, 0x84a22b07, + 0x2129bb09, 0x14c40d5a, 0xb14f9d54, 0xad2a31b3, 0x08a1a1bd, + 0x3d4c17ee, 0x98c787e0, 0x56977b48, 0xf31ceb46, 0xc6f15d15, + 0x637acd1b, 0x8121a204, 0x24aa320a, 0x11478459, 0xb4cc1457, + 0x7a9ce8ff, 0xdf1778f1, 0xeafacea2, 0x4f715eac, 0xf53d16dd, + 0x50b686d3, 0x655b3080, 0xc0d0a08e, 0x0e805c26, 0xab0bcc28, + 0x9ee67a7b, 0x3b6dea75, 0xd936856a, 0x7cbd1564, 0x4950a337, + 0xecdb3339, 0x228bcf91, 0x87005f9f, 0xb2ede9cc, 0x176679c2, + 0x1d047f6f, 0xb88fef61, 0x8d625932, 0x28e9c93c, 0xe6b93594, + 0x4332a59a, 0x76df13c9, 0xd35483c7, 0x310fecd8, 0x94847cd6, + 0xa169ca85, 0x04e25a8b, 0xcab2a623, 0x6f39362d, 0x5ad4807e, + 0xff5f1070, 0x45135801, 0xe098c80f, 0xd5757e5c, 0x70feee52, + 0xbeae12fa, 0x1b2582f4, 0x2ec834a7, 0x8b43a4a9, 0x6918cbb6, + 0xcc935bb8, 0xf97eedeb, 0x5cf57de5, 0x92a5814d, 0x372e1143, + 0x02c3a710, 0xa748371e, 0x1607aa4a, 0xb38c3a44, 0x86618c17, + 0x23ea1c19, 0xedbae0b1, 0x483170bf, 0x7ddcc6ec, 0xd85756e2, + 0x3a0c39fd, 0x9f87a9f3, 0xaa6a1fa0, 0x0fe18fae, 0xc1b17306, + 0x643ae308, 0x51d7555b, 0xf45cc555, 0x4e108d24, 0xeb9b1d2a, + 0xde76ab79, 0x7bfd3b77, 0xb5adc7df, 0x102657d1, 0x25cbe182, + 0x8040718c, 0x621b1e93, 0xc7908e9d, 0xf27d38ce, 0x57f6a8c0, + 0x99a65468, 0x3c2dc466, 0x09c07235, 0xac4be23b, 0xa629e496, + 0x03a27498, 0x364fc2cb, 0x93c452c5, 0x5d94ae6d, 0xf81f3e63, + 0xcdf28830, 0x6879183e, 0x8a227721, 0x2fa9e72f, 0x1a44517c, + 0xbfcfc172, 0x719f3dda, 0xd414add4, 0xe1f91b87, 0x44728b89, + 0xfe3ec3f8, 0x5bb553f6, 0x6e58e5a5, 0xcbd375ab, 0x05838903, + 0xa008190d, 0x95e5af5e, 0x306e3f50, 0xd235504f, 0x77bec041, + 0x42537612, 0xe7d8e61c, 0x29881ab4, 0x8c038aba, 0xb9ee3ce9, + 0x1c65ace7}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0x0e908ba500000000, 0x5d26669000000000, + 0x53b6ed3500000000, 0xfb4abdfb00000000, 0xf5da365e00000000, + 0xa66cdb6b00000000, 0xa8fc50ce00000000, 0xb7930b2c00000000, + 0xb903808900000000, 0xeab56dbc00000000, 0xe425e61900000000, + 0x4cd9b6d700000000, 0x42493d7200000000, 0x11ffd04700000000, + 0x1f6f5be200000000, 0x6e27175800000000, 0x60b79cfd00000000, + 0x330171c800000000, 0x3d91fa6d00000000, 0x956daaa300000000, + 0x9bfd210600000000, 0xc84bcc3300000000, 0xc6db479600000000, + 0xd9b41c7400000000, 0xd72497d100000000, 0x84927ae400000000, + 0x8a02f14100000000, 0x22fea18f00000000, 0x2c6e2a2a00000000, + 0x7fd8c71f00000000, 0x71484cba00000000, 0xdc4e2eb000000000, + 0xd2dea51500000000, 0x8168482000000000, 0x8ff8c38500000000, + 0x2704934b00000000, 0x299418ee00000000, 0x7a22f5db00000000, + 0x74b27e7e00000000, 0x6bdd259c00000000, 0x654dae3900000000, + 0x36fb430c00000000, 0x386bc8a900000000, 0x9097986700000000, + 0x9e0713c200000000, 0xcdb1fef700000000, 0xc321755200000000, + 0xb26939e800000000, 0xbcf9b24d00000000, 0xef4f5f7800000000, + 0xe1dfd4dd00000000, 0x4923841300000000, 0x47b30fb600000000, + 0x1405e28300000000, 0x1a95692600000000, 0x05fa32c400000000, + 0x0b6ab96100000000, 0x58dc545400000000, 0x564cdff100000000, + 0xfeb08f3f00000000, 0xf020049a00000000, 0xa396e9af00000000, + 0xad06620a00000000, 0xf99b2dbb00000000, 0xf70ba61e00000000, + 0xa4bd4b2b00000000, 0xaa2dc08e00000000, 0x02d1904000000000, + 0x0c411be500000000, 0x5ff7f6d000000000, 0x51677d7500000000, + 0x4e08269700000000, 0x4098ad3200000000, 0x132e400700000000, + 0x1dbecba200000000, 0xb5429b6c00000000, 0xbbd210c900000000, + 0xe864fdfc00000000, 0xe6f4765900000000, 0x97bc3ae300000000, + 0x992cb14600000000, 0xca9a5c7300000000, 0xc40ad7d600000000, + 0x6cf6871800000000, 0x62660cbd00000000, 0x31d0e18800000000, + 0x3f406a2d00000000, 0x202f31cf00000000, 0x2ebfba6a00000000, + 0x7d09575f00000000, 0x7399dcfa00000000, 0xdb658c3400000000, + 0xd5f5079100000000, 0x8643eaa400000000, 0x88d3610100000000, + 0x25d5030b00000000, 0x2b4588ae00000000, 0x78f3659b00000000, + 0x7663ee3e00000000, 0xde9fbef000000000, 0xd00f355500000000, + 0x83b9d86000000000, 0x8d2953c500000000, 0x9246082700000000, + 0x9cd6838200000000, 0xcf606eb700000000, 0xc1f0e51200000000, + 0x690cb5dc00000000, 0x679c3e7900000000, 0x342ad34c00000000, + 0x3aba58e900000000, 0x4bf2145300000000, 0x45629ff600000000, + 0x16d472c300000000, 0x1844f96600000000, 0xb0b8a9a800000000, + 0xbe28220d00000000, 0xed9ecf3800000000, 0xe30e449d00000000, + 0xfc611f7f00000000, 0xf2f194da00000000, 0xa14779ef00000000, + 0xafd7f24a00000000, 0x072ba28400000000, 0x09bb292100000000, + 0x5a0dc41400000000, 0x549d4fb100000000, 0xb3312aad00000000, + 0xbda1a10800000000, 0xee174c3d00000000, 0xe087c79800000000, + 0x487b975600000000, 0x46eb1cf300000000, 0x155df1c600000000, + 0x1bcd7a6300000000, 0x04a2218100000000, 0x0a32aa2400000000, + 0x5984471100000000, 0x5714ccb400000000, 0xffe89c7a00000000, + 0xf17817df00000000, 0xa2cefaea00000000, 0xac5e714f00000000, + 0xdd163df500000000, 0xd386b65000000000, 0x80305b6500000000, + 0x8ea0d0c000000000, 0x265c800e00000000, 0x28cc0bab00000000, + 0x7b7ae69e00000000, 0x75ea6d3b00000000, 0x6a8536d900000000, + 0x6415bd7c00000000, 0x37a3504900000000, 0x3933dbec00000000, + 0x91cf8b2200000000, 0x9f5f008700000000, 0xcce9edb200000000, + 0xc279661700000000, 0x6f7f041d00000000, 0x61ef8fb800000000, + 0x3259628d00000000, 0x3cc9e92800000000, 0x9435b9e600000000, + 0x9aa5324300000000, 0xc913df7600000000, 0xc78354d300000000, + 0xd8ec0f3100000000, 0xd67c849400000000, 0x85ca69a100000000, + 0x8b5ae20400000000, 0x23a6b2ca00000000, 0x2d36396f00000000, + 0x7e80d45a00000000, 0x70105fff00000000, 0x0158134500000000, + 0x0fc898e000000000, 0x5c7e75d500000000, 0x52eefe7000000000, + 0xfa12aebe00000000, 0xf482251b00000000, 0xa734c82e00000000, + 0xa9a4438b00000000, 0xb6cb186900000000, 0xb85b93cc00000000, + 0xebed7ef900000000, 0xe57df55c00000000, 0x4d81a59200000000, + 0x43112e3700000000, 0x10a7c30200000000, 0x1e3748a700000000, + 0x4aaa071600000000, 0x443a8cb300000000, 0x178c618600000000, + 0x191cea2300000000, 0xb1e0baed00000000, 0xbf70314800000000, + 0xecc6dc7d00000000, 0xe25657d800000000, 0xfd390c3a00000000, + 0xf3a9879f00000000, 0xa01f6aaa00000000, 0xae8fe10f00000000, + 0x0673b1c100000000, 0x08e33a6400000000, 0x5b55d75100000000, + 0x55c55cf400000000, 0x248d104e00000000, 0x2a1d9beb00000000, + 0x79ab76de00000000, 0x773bfd7b00000000, 0xdfc7adb500000000, + 0xd157261000000000, 0x82e1cb2500000000, 0x8c71408000000000, + 0x931e1b6200000000, 0x9d8e90c700000000, 0xce387df200000000, + 0xc0a8f65700000000, 0x6854a69900000000, 0x66c42d3c00000000, + 0x3572c00900000000, 0x3be24bac00000000, 0x96e429a600000000, + 0x9874a20300000000, 0xcbc24f3600000000, 0xc552c49300000000, + 0x6dae945d00000000, 0x633e1ff800000000, 0x3088f2cd00000000, + 0x3e18796800000000, 0x2177228a00000000, 0x2fe7a92f00000000, + 0x7c51441a00000000, 0x72c1cfbf00000000, 0xda3d9f7100000000, + 0xd4ad14d400000000, 0x871bf9e100000000, 0x898b724400000000, + 0xf8c33efe00000000, 0xf653b55b00000000, 0xa5e5586e00000000, + 0xab75d3cb00000000, 0x0389830500000000, 0x0d1908a000000000, + 0x5eafe59500000000, 0x503f6e3000000000, 0x4f5035d200000000, + 0x41c0be7700000000, 0x1276534200000000, 0x1ce6d8e700000000, + 0xb41a882900000000, 0xba8a038c00000000, 0xe93ceeb900000000, + 0xe7ac651c00000000}, + {0x0000000000000000, 0x97a61de700000000, 0x6f4b4a1500000000, + 0xf8ed57f200000000, 0xde96942a00000000, 0x493089cd00000000, + 0xb1ddde3f00000000, 0x267bc3d800000000, 0xbc2d295500000000, + 0x2b8b34b200000000, 0xd366634000000000, 0x44c07ea700000000, + 0x62bbbd7f00000000, 0xf51da09800000000, 0x0df0f76a00000000, + 0x9a56ea8d00000000, 0x785b52aa00000000, 0xeffd4f4d00000000, + 0x171018bf00000000, 0x80b6055800000000, 0xa6cdc68000000000, + 0x316bdb6700000000, 0xc9868c9500000000, 0x5e20917200000000, + 0xc4767bff00000000, 0x53d0661800000000, 0xab3d31ea00000000, + 0x3c9b2c0d00000000, 0x1ae0efd500000000, 0x8d46f23200000000, + 0x75aba5c000000000, 0xe20db82700000000, 0xb1b0d58f00000000, + 0x2616c86800000000, 0xdefb9f9a00000000, 0x495d827d00000000, + 0x6f2641a500000000, 0xf8805c4200000000, 0x006d0bb000000000, + 0x97cb165700000000, 0x0d9dfcda00000000, 0x9a3be13d00000000, + 0x62d6b6cf00000000, 0xf570ab2800000000, 0xd30b68f000000000, + 0x44ad751700000000, 0xbc4022e500000000, 0x2be63f0200000000, + 0xc9eb872500000000, 0x5e4d9ac200000000, 0xa6a0cd3000000000, + 0x3106d0d700000000, 0x177d130f00000000, 0x80db0ee800000000, + 0x7836591a00000000, 0xef9044fd00000000, 0x75c6ae7000000000, + 0xe260b39700000000, 0x1a8de46500000000, 0x8d2bf98200000000, + 0xab503a5a00000000, 0x3cf627bd00000000, 0xc41b704f00000000, + 0x53bd6da800000000, 0x2367dac400000000, 0xb4c1c72300000000, + 0x4c2c90d100000000, 0xdb8a8d3600000000, 0xfdf14eee00000000, + 0x6a57530900000000, 0x92ba04fb00000000, 0x051c191c00000000, + 0x9f4af39100000000, 0x08ecee7600000000, 0xf001b98400000000, + 0x67a7a46300000000, 0x41dc67bb00000000, 0xd67a7a5c00000000, + 0x2e972dae00000000, 0xb931304900000000, 0x5b3c886e00000000, + 0xcc9a958900000000, 0x3477c27b00000000, 0xa3d1df9c00000000, + 0x85aa1c4400000000, 0x120c01a300000000, 0xeae1565100000000, + 0x7d474bb600000000, 0xe711a13b00000000, 0x70b7bcdc00000000, + 0x885aeb2e00000000, 0x1ffcf6c900000000, 0x3987351100000000, + 0xae2128f600000000, 0x56cc7f0400000000, 0xc16a62e300000000, + 0x92d70f4b00000000, 0x057112ac00000000, 0xfd9c455e00000000, + 0x6a3a58b900000000, 0x4c419b6100000000, 0xdbe7868600000000, + 0x230ad17400000000, 0xb4accc9300000000, 0x2efa261e00000000, + 0xb95c3bf900000000, 0x41b16c0b00000000, 0xd61771ec00000000, + 0xf06cb23400000000, 0x67caafd300000000, 0x9f27f82100000000, + 0x0881e5c600000000, 0xea8c5de100000000, 0x7d2a400600000000, + 0x85c717f400000000, 0x12610a1300000000, 0x341ac9cb00000000, + 0xa3bcd42c00000000, 0x5b5183de00000000, 0xccf79e3900000000, + 0x56a174b400000000, 0xc107695300000000, 0x39ea3ea100000000, + 0xae4c234600000000, 0x8837e09e00000000, 0x1f91fd7900000000, + 0xe77caa8b00000000, 0x70dab76c00000000, 0x07c8c55200000000, + 0x906ed8b500000000, 0x68838f4700000000, 0xff2592a000000000, + 0xd95e517800000000, 0x4ef84c9f00000000, 0xb6151b6d00000000, + 0x21b3068a00000000, 0xbbe5ec0700000000, 0x2c43f1e000000000, + 0xd4aea61200000000, 0x4308bbf500000000, 0x6573782d00000000, + 0xf2d565ca00000000, 0x0a38323800000000, 0x9d9e2fdf00000000, + 0x7f9397f800000000, 0xe8358a1f00000000, 0x10d8dded00000000, + 0x877ec00a00000000, 0xa10503d200000000, 0x36a31e3500000000, + 0xce4e49c700000000, 0x59e8542000000000, 0xc3bebead00000000, + 0x5418a34a00000000, 0xacf5f4b800000000, 0x3b53e95f00000000, + 0x1d282a8700000000, 0x8a8e376000000000, 0x7263609200000000, + 0xe5c57d7500000000, 0xb67810dd00000000, 0x21de0d3a00000000, + 0xd9335ac800000000, 0x4e95472f00000000, 0x68ee84f700000000, + 0xff48991000000000, 0x07a5cee200000000, 0x9003d30500000000, + 0x0a55398800000000, 0x9df3246f00000000, 0x651e739d00000000, + 0xf2b86e7a00000000, 0xd4c3ada200000000, 0x4365b04500000000, + 0xbb88e7b700000000, 0x2c2efa5000000000, 0xce23427700000000, + 0x59855f9000000000, 0xa168086200000000, 0x36ce158500000000, + 0x10b5d65d00000000, 0x8713cbba00000000, 0x7ffe9c4800000000, + 0xe85881af00000000, 0x720e6b2200000000, 0xe5a876c500000000, + 0x1d45213700000000, 0x8ae33cd000000000, 0xac98ff0800000000, + 0x3b3ee2ef00000000, 0xc3d3b51d00000000, 0x5475a8fa00000000, + 0x24af1f9600000000, 0xb309027100000000, 0x4be4558300000000, + 0xdc42486400000000, 0xfa398bbc00000000, 0x6d9f965b00000000, + 0x9572c1a900000000, 0x02d4dc4e00000000, 0x988236c300000000, + 0x0f242b2400000000, 0xf7c97cd600000000, 0x606f613100000000, + 0x4614a2e900000000, 0xd1b2bf0e00000000, 0x295fe8fc00000000, + 0xbef9f51b00000000, 0x5cf44d3c00000000, 0xcb5250db00000000, + 0x33bf072900000000, 0xa4191ace00000000, 0x8262d91600000000, + 0x15c4c4f100000000, 0xed29930300000000, 0x7a8f8ee400000000, + 0xe0d9646900000000, 0x777f798e00000000, 0x8f922e7c00000000, + 0x1834339b00000000, 0x3e4ff04300000000, 0xa9e9eda400000000, + 0x5104ba5600000000, 0xc6a2a7b100000000, 0x951fca1900000000, + 0x02b9d7fe00000000, 0xfa54800c00000000, 0x6df29deb00000000, + 0x4b895e3300000000, 0xdc2f43d400000000, 0x24c2142600000000, + 0xb36409c100000000, 0x2932e34c00000000, 0xbe94feab00000000, + 0x4679a95900000000, 0xd1dfb4be00000000, 0xf7a4776600000000, + 0x60026a8100000000, 0x98ef3d7300000000, 0x0f49209400000000, + 0xed4498b300000000, 0x7ae2855400000000, 0x820fd2a600000000, + 0x15a9cf4100000000, 0x33d20c9900000000, 0xa474117e00000000, + 0x5c99468c00000000, 0xcb3f5b6b00000000, 0x5169b1e600000000, + 0xc6cfac0100000000, 0x3e22fbf300000000, 0xa984e61400000000, + 0x8fff25cc00000000, 0x1859382b00000000, 0xe0b46fd900000000, + 0x7712723e00000000}, + {0x0000000000000000, 0x411b8c6e00000000, 0x823618dd00000000, + 0xc32d94b300000000, 0x456b416100000000, 0x0470cd0f00000000, + 0xc75d59bc00000000, 0x8646d5d200000000, 0x8ad682c200000000, + 0xcbcd0eac00000000, 0x08e09a1f00000000, 0x49fb167100000000, + 0xcfbdc3a300000000, 0x8ea64fcd00000000, 0x4d8bdb7e00000000, + 0x0c90571000000000, 0x55ab745e00000000, 0x14b0f83000000000, + 0xd79d6c8300000000, 0x9686e0ed00000000, 0x10c0353f00000000, + 0x51dbb95100000000, 0x92f62de200000000, 0xd3eda18c00000000, + 0xdf7df69c00000000, 0x9e667af200000000, 0x5d4bee4100000000, + 0x1c50622f00000000, 0x9a16b7fd00000000, 0xdb0d3b9300000000, + 0x1820af2000000000, 0x593b234e00000000, 0xaa56e9bc00000000, + 0xeb4d65d200000000, 0x2860f16100000000, 0x697b7d0f00000000, + 0xef3da8dd00000000, 0xae2624b300000000, 0x6d0bb00000000000, + 0x2c103c6e00000000, 0x20806b7e00000000, 0x619be71000000000, + 0xa2b673a300000000, 0xe3adffcd00000000, 0x65eb2a1f00000000, + 0x24f0a67100000000, 0xe7dd32c200000000, 0xa6c6beac00000000, + 0xfffd9de200000000, 0xbee6118c00000000, 0x7dcb853f00000000, + 0x3cd0095100000000, 0xba96dc8300000000, 0xfb8d50ed00000000, + 0x38a0c45e00000000, 0x79bb483000000000, 0x752b1f2000000000, + 0x3430934e00000000, 0xf71d07fd00000000, 0xb6068b9300000000, + 0x30405e4100000000, 0x715bd22f00000000, 0xb276469c00000000, + 0xf36dcaf200000000, 0x15aba3a200000000, 0x54b02fcc00000000, + 0x979dbb7f00000000, 0xd686371100000000, 0x50c0e2c300000000, + 0x11db6ead00000000, 0xd2f6fa1e00000000, 0x93ed767000000000, + 0x9f7d216000000000, 0xde66ad0e00000000, 0x1d4b39bd00000000, + 0x5c50b5d300000000, 0xda16600100000000, 0x9b0dec6f00000000, + 0x582078dc00000000, 0x193bf4b200000000, 0x4000d7fc00000000, + 0x011b5b9200000000, 0xc236cf2100000000, 0x832d434f00000000, + 0x056b969d00000000, 0x44701af300000000, 0x875d8e4000000000, + 0xc646022e00000000, 0xcad6553e00000000, 0x8bcdd95000000000, + 0x48e04de300000000, 0x09fbc18d00000000, 0x8fbd145f00000000, + 0xcea6983100000000, 0x0d8b0c8200000000, 0x4c9080ec00000000, + 0xbffd4a1e00000000, 0xfee6c67000000000, 0x3dcb52c300000000, + 0x7cd0dead00000000, 0xfa960b7f00000000, 0xbb8d871100000000, + 0x78a013a200000000, 0x39bb9fcc00000000, 0x352bc8dc00000000, + 0x743044b200000000, 0xb71dd00100000000, 0xf6065c6f00000000, + 0x704089bd00000000, 0x315b05d300000000, 0xf276916000000000, + 0xb36d1d0e00000000, 0xea563e4000000000, 0xab4db22e00000000, + 0x6860269d00000000, 0x297baaf300000000, 0xaf3d7f2100000000, + 0xee26f34f00000000, 0x2d0b67fc00000000, 0x6c10eb9200000000, + 0x6080bc8200000000, 0x219b30ec00000000, 0xe2b6a45f00000000, + 0xa3ad283100000000, 0x25ebfde300000000, 0x64f0718d00000000, + 0xa7dde53e00000000, 0xe6c6695000000000, 0x6b50369e00000000, + 0x2a4bbaf000000000, 0xe9662e4300000000, 0xa87da22d00000000, + 0x2e3b77ff00000000, 0x6f20fb9100000000, 0xac0d6f2200000000, + 0xed16e34c00000000, 0xe186b45c00000000, 0xa09d383200000000, + 0x63b0ac8100000000, 0x22ab20ef00000000, 0xa4edf53d00000000, + 0xe5f6795300000000, 0x26dbede000000000, 0x67c0618e00000000, + 0x3efb42c000000000, 0x7fe0ceae00000000, 0xbccd5a1d00000000, + 0xfdd6d67300000000, 0x7b9003a100000000, 0x3a8b8fcf00000000, + 0xf9a61b7c00000000, 0xb8bd971200000000, 0xb42dc00200000000, + 0xf5364c6c00000000, 0x361bd8df00000000, 0x770054b100000000, + 0xf146816300000000, 0xb05d0d0d00000000, 0x737099be00000000, + 0x326b15d000000000, 0xc106df2200000000, 0x801d534c00000000, + 0x4330c7ff00000000, 0x022b4b9100000000, 0x846d9e4300000000, + 0xc576122d00000000, 0x065b869e00000000, 0x47400af000000000, + 0x4bd05de000000000, 0x0acbd18e00000000, 0xc9e6453d00000000, + 0x88fdc95300000000, 0x0ebb1c8100000000, 0x4fa090ef00000000, + 0x8c8d045c00000000, 0xcd96883200000000, 0x94adab7c00000000, + 0xd5b6271200000000, 0x169bb3a100000000, 0x57803fcf00000000, + 0xd1c6ea1d00000000, 0x90dd667300000000, 0x53f0f2c000000000, + 0x12eb7eae00000000, 0x1e7b29be00000000, 0x5f60a5d000000000, + 0x9c4d316300000000, 0xdd56bd0d00000000, 0x5b1068df00000000, + 0x1a0be4b100000000, 0xd926700200000000, 0x983dfc6c00000000, + 0x7efb953c00000000, 0x3fe0195200000000, 0xfccd8de100000000, + 0xbdd6018f00000000, 0x3b90d45d00000000, 0x7a8b583300000000, + 0xb9a6cc8000000000, 0xf8bd40ee00000000, 0xf42d17fe00000000, + 0xb5369b9000000000, 0x761b0f2300000000, 0x3700834d00000000, + 0xb146569f00000000, 0xf05ddaf100000000, 0x33704e4200000000, + 0x726bc22c00000000, 0x2b50e16200000000, 0x6a4b6d0c00000000, + 0xa966f9bf00000000, 0xe87d75d100000000, 0x6e3ba00300000000, + 0x2f202c6d00000000, 0xec0db8de00000000, 0xad1634b000000000, + 0xa18663a000000000, 0xe09defce00000000, 0x23b07b7d00000000, + 0x62abf71300000000, 0xe4ed22c100000000, 0xa5f6aeaf00000000, + 0x66db3a1c00000000, 0x27c0b67200000000, 0xd4ad7c8000000000, + 0x95b6f0ee00000000, 0x569b645d00000000, 0x1780e83300000000, + 0x91c63de100000000, 0xd0ddb18f00000000, 0x13f0253c00000000, + 0x52eba95200000000, 0x5e7bfe4200000000, 0x1f60722c00000000, + 0xdc4de69f00000000, 0x9d566af100000000, 0x1b10bf2300000000, + 0x5a0b334d00000000, 0x9926a7fe00000000, 0xd83d2b9000000000, + 0x810608de00000000, 0xc01d84b000000000, 0x0330100300000000, + 0x422b9c6d00000000, 0xc46d49bf00000000, 0x8576c5d100000000, + 0x465b516200000000, 0x0740dd0c00000000, 0x0bd08a1c00000000, + 0x4acb067200000000, 0x89e692c100000000, 0xc8fd1eaf00000000, + 0x4ebbcb7d00000000, 0x0fa0471300000000, 0xcc8dd3a000000000, + 0x8d965fce00000000}, + {0x0000000000000000, 0x1dfdb50100000000, 0x3afa6b0300000000, + 0x2707de0200000000, 0x74f4d70600000000, 0x6909620700000000, + 0x4e0ebc0500000000, 0x53f3090400000000, 0xe8e8af0d00000000, + 0xf5151a0c00000000, 0xd212c40e00000000, 0xcfef710f00000000, + 0x9c1c780b00000000, 0x81e1cd0a00000000, 0xa6e6130800000000, + 0xbb1ba60900000000, 0xd0d15f1b00000000, 0xcd2cea1a00000000, + 0xea2b341800000000, 0xf7d6811900000000, 0xa425881d00000000, + 0xb9d83d1c00000000, 0x9edfe31e00000000, 0x8322561f00000000, + 0x3839f01600000000, 0x25c4451700000000, 0x02c39b1500000000, + 0x1f3e2e1400000000, 0x4ccd271000000000, 0x5130921100000000, + 0x76374c1300000000, 0x6bcaf91200000000, 0xa0a3bf3600000000, + 0xbd5e0a3700000000, 0x9a59d43500000000, 0x87a4613400000000, + 0xd457683000000000, 0xc9aadd3100000000, 0xeead033300000000, + 0xf350b63200000000, 0x484b103b00000000, 0x55b6a53a00000000, + 0x72b17b3800000000, 0x6f4cce3900000000, 0x3cbfc73d00000000, + 0x2142723c00000000, 0x0645ac3e00000000, 0x1bb8193f00000000, + 0x7072e02d00000000, 0x6d8f552c00000000, 0x4a888b2e00000000, + 0x57753e2f00000000, 0x0486372b00000000, 0x197b822a00000000, + 0x3e7c5c2800000000, 0x2381e92900000000, 0x989a4f2000000000, + 0x8567fa2100000000, 0xa260242300000000, 0xbf9d912200000000, + 0xec6e982600000000, 0xf1932d2700000000, 0xd694f32500000000, + 0xcb69462400000000, 0x40477f6d00000000, 0x5dbaca6c00000000, + 0x7abd146e00000000, 0x6740a16f00000000, 0x34b3a86b00000000, + 0x294e1d6a00000000, 0x0e49c36800000000, 0x13b4766900000000, + 0xa8afd06000000000, 0xb552656100000000, 0x9255bb6300000000, + 0x8fa80e6200000000, 0xdc5b076600000000, 0xc1a6b26700000000, + 0xe6a16c6500000000, 0xfb5cd96400000000, 0x9096207600000000, + 0x8d6b957700000000, 0xaa6c4b7500000000, 0xb791fe7400000000, + 0xe462f77000000000, 0xf99f427100000000, 0xde989c7300000000, + 0xc365297200000000, 0x787e8f7b00000000, 0x65833a7a00000000, + 0x4284e47800000000, 0x5f79517900000000, 0x0c8a587d00000000, + 0x1177ed7c00000000, 0x3670337e00000000, 0x2b8d867f00000000, + 0xe0e4c05b00000000, 0xfd19755a00000000, 0xda1eab5800000000, + 0xc7e31e5900000000, 0x9410175d00000000, 0x89eda25c00000000, + 0xaeea7c5e00000000, 0xb317c95f00000000, 0x080c6f5600000000, + 0x15f1da5700000000, 0x32f6045500000000, 0x2f0bb15400000000, + 0x7cf8b85000000000, 0x61050d5100000000, 0x4602d35300000000, + 0x5bff665200000000, 0x30359f4000000000, 0x2dc82a4100000000, + 0x0acff44300000000, 0x1732414200000000, 0x44c1484600000000, + 0x593cfd4700000000, 0x7e3b234500000000, 0x63c6964400000000, + 0xd8dd304d00000000, 0xc520854c00000000, 0xe2275b4e00000000, + 0xffdaee4f00000000, 0xac29e74b00000000, 0xb1d4524a00000000, + 0x96d38c4800000000, 0x8b2e394900000000, 0x808efeda00000000, + 0x9d734bdb00000000, 0xba7495d900000000, 0xa78920d800000000, + 0xf47a29dc00000000, 0xe9879cdd00000000, 0xce8042df00000000, + 0xd37df7de00000000, 0x686651d700000000, 0x759be4d600000000, + 0x529c3ad400000000, 0x4f618fd500000000, 0x1c9286d100000000, + 0x016f33d000000000, 0x2668edd200000000, 0x3b9558d300000000, + 0x505fa1c100000000, 0x4da214c000000000, 0x6aa5cac200000000, + 0x77587fc300000000, 0x24ab76c700000000, 0x3956c3c600000000, + 0x1e511dc400000000, 0x03aca8c500000000, 0xb8b70ecc00000000, + 0xa54abbcd00000000, 0x824d65cf00000000, 0x9fb0d0ce00000000, + 0xcc43d9ca00000000, 0xd1be6ccb00000000, 0xf6b9b2c900000000, + 0xeb4407c800000000, 0x202d41ec00000000, 0x3dd0f4ed00000000, + 0x1ad72aef00000000, 0x072a9fee00000000, 0x54d996ea00000000, + 0x492423eb00000000, 0x6e23fde900000000, 0x73de48e800000000, + 0xc8c5eee100000000, 0xd5385be000000000, 0xf23f85e200000000, + 0xefc230e300000000, 0xbc3139e700000000, 0xa1cc8ce600000000, + 0x86cb52e400000000, 0x9b36e7e500000000, 0xf0fc1ef700000000, + 0xed01abf600000000, 0xca0675f400000000, 0xd7fbc0f500000000, + 0x8408c9f100000000, 0x99f57cf000000000, 0xbef2a2f200000000, + 0xa30f17f300000000, 0x1814b1fa00000000, 0x05e904fb00000000, + 0x22eedaf900000000, 0x3f136ff800000000, 0x6ce066fc00000000, + 0x711dd3fd00000000, 0x561a0dff00000000, 0x4be7b8fe00000000, + 0xc0c981b700000000, 0xdd3434b600000000, 0xfa33eab400000000, + 0xe7ce5fb500000000, 0xb43d56b100000000, 0xa9c0e3b000000000, + 0x8ec73db200000000, 0x933a88b300000000, 0x28212eba00000000, + 0x35dc9bbb00000000, 0x12db45b900000000, 0x0f26f0b800000000, + 0x5cd5f9bc00000000, 0x41284cbd00000000, 0x662f92bf00000000, + 0x7bd227be00000000, 0x1018deac00000000, 0x0de56bad00000000, + 0x2ae2b5af00000000, 0x371f00ae00000000, 0x64ec09aa00000000, + 0x7911bcab00000000, 0x5e1662a900000000, 0x43ebd7a800000000, + 0xf8f071a100000000, 0xe50dc4a000000000, 0xc20a1aa200000000, + 0xdff7afa300000000, 0x8c04a6a700000000, 0x91f913a600000000, + 0xb6fecda400000000, 0xab0378a500000000, 0x606a3e8100000000, + 0x7d978b8000000000, 0x5a90558200000000, 0x476de08300000000, + 0x149ee98700000000, 0x09635c8600000000, 0x2e64828400000000, + 0x3399378500000000, 0x8882918c00000000, 0x957f248d00000000, + 0xb278fa8f00000000, 0xaf854f8e00000000, 0xfc76468a00000000, + 0xe18bf38b00000000, 0xc68c2d8900000000, 0xdb71988800000000, + 0xb0bb619a00000000, 0xad46d49b00000000, 0x8a410a9900000000, + 0x97bcbf9800000000, 0xc44fb69c00000000, 0xd9b2039d00000000, + 0xfeb5dd9f00000000, 0xe348689e00000000, 0x5853ce9700000000, + 0x45ae7b9600000000, 0x62a9a59400000000, 0x7f54109500000000, + 0x2ca7199100000000, 0x315aac9000000000, 0x165d729200000000, + 0x0ba0c79300000000}, + {0x0000000000000000, 0x24d9076300000000, 0x48b20fc600000000, + 0x6c6b08a500000000, 0xd1626e5700000000, 0xf5bb693400000000, + 0x99d0619100000000, 0xbd0966f200000000, 0xa2c5dcae00000000, + 0x861cdbcd00000000, 0xea77d36800000000, 0xceaed40b00000000, + 0x73a7b2f900000000, 0x577eb59a00000000, 0x3b15bd3f00000000, + 0x1fccba5c00000000, 0x058dc88600000000, 0x2154cfe500000000, + 0x4d3fc74000000000, 0x69e6c02300000000, 0xd4efa6d100000000, + 0xf036a1b200000000, 0x9c5da91700000000, 0xb884ae7400000000, + 0xa748142800000000, 0x8391134b00000000, 0xeffa1bee00000000, + 0xcb231c8d00000000, 0x762a7a7f00000000, 0x52f37d1c00000000, + 0x3e9875b900000000, 0x1a4172da00000000, 0x4b1ce0d600000000, + 0x6fc5e7b500000000, 0x03aeef1000000000, 0x2777e87300000000, + 0x9a7e8e8100000000, 0xbea789e200000000, 0xd2cc814700000000, + 0xf615862400000000, 0xe9d93c7800000000, 0xcd003b1b00000000, + 0xa16b33be00000000, 0x85b234dd00000000, 0x38bb522f00000000, + 0x1c62554c00000000, 0x70095de900000000, 0x54d05a8a00000000, + 0x4e91285000000000, 0x6a482f3300000000, 0x0623279600000000, + 0x22fa20f500000000, 0x9ff3460700000000, 0xbb2a416400000000, + 0xd74149c100000000, 0xf3984ea200000000, 0xec54f4fe00000000, + 0xc88df39d00000000, 0xa4e6fb3800000000, 0x803ffc5b00000000, + 0x3d369aa900000000, 0x19ef9dca00000000, 0x7584956f00000000, + 0x515d920c00000000, 0xd73eb17600000000, 0xf3e7b61500000000, + 0x9f8cbeb000000000, 0xbb55b9d300000000, 0x065cdf2100000000, + 0x2285d84200000000, 0x4eeed0e700000000, 0x6a37d78400000000, + 0x75fb6dd800000000, 0x51226abb00000000, 0x3d49621e00000000, + 0x1990657d00000000, 0xa499038f00000000, 0x804004ec00000000, + 0xec2b0c4900000000, 0xc8f20b2a00000000, 0xd2b379f000000000, + 0xf66a7e9300000000, 0x9a01763600000000, 0xbed8715500000000, + 0x03d117a700000000, 0x270810c400000000, 0x4b63186100000000, + 0x6fba1f0200000000, 0x7076a55e00000000, 0x54afa23d00000000, + 0x38c4aa9800000000, 0x1c1dadfb00000000, 0xa114cb0900000000, + 0x85cdcc6a00000000, 0xe9a6c4cf00000000, 0xcd7fc3ac00000000, + 0x9c2251a000000000, 0xb8fb56c300000000, 0xd4905e6600000000, + 0xf049590500000000, 0x4d403ff700000000, 0x6999389400000000, + 0x05f2303100000000, 0x212b375200000000, 0x3ee78d0e00000000, + 0x1a3e8a6d00000000, 0x765582c800000000, 0x528c85ab00000000, + 0xef85e35900000000, 0xcb5ce43a00000000, 0xa737ec9f00000000, + 0x83eeebfc00000000, 0x99af992600000000, 0xbd769e4500000000, + 0xd11d96e000000000, 0xf5c4918300000000, 0x48cdf77100000000, + 0x6c14f01200000000, 0x007ff8b700000000, 0x24a6ffd400000000, + 0x3b6a458800000000, 0x1fb342eb00000000, 0x73d84a4e00000000, + 0x57014d2d00000000, 0xea082bdf00000000, 0xced12cbc00000000, + 0xa2ba241900000000, 0x8663237a00000000, 0xae7d62ed00000000, + 0x8aa4658e00000000, 0xe6cf6d2b00000000, 0xc2166a4800000000, + 0x7f1f0cba00000000, 0x5bc60bd900000000, 0x37ad037c00000000, + 0x1374041f00000000, 0x0cb8be4300000000, 0x2861b92000000000, + 0x440ab18500000000, 0x60d3b6e600000000, 0xdddad01400000000, + 0xf903d77700000000, 0x9568dfd200000000, 0xb1b1d8b100000000, + 0xabf0aa6b00000000, 0x8f29ad0800000000, 0xe342a5ad00000000, + 0xc79ba2ce00000000, 0x7a92c43c00000000, 0x5e4bc35f00000000, + 0x3220cbfa00000000, 0x16f9cc9900000000, 0x093576c500000000, + 0x2dec71a600000000, 0x4187790300000000, 0x655e7e6000000000, + 0xd857189200000000, 0xfc8e1ff100000000, 0x90e5175400000000, + 0xb43c103700000000, 0xe561823b00000000, 0xc1b8855800000000, + 0xadd38dfd00000000, 0x890a8a9e00000000, 0x3403ec6c00000000, + 0x10daeb0f00000000, 0x7cb1e3aa00000000, 0x5868e4c900000000, + 0x47a45e9500000000, 0x637d59f600000000, 0x0f16515300000000, + 0x2bcf563000000000, 0x96c630c200000000, 0xb21f37a100000000, + 0xde743f0400000000, 0xfaad386700000000, 0xe0ec4abd00000000, + 0xc4354dde00000000, 0xa85e457b00000000, 0x8c87421800000000, + 0x318e24ea00000000, 0x1557238900000000, 0x793c2b2c00000000, + 0x5de52c4f00000000, 0x4229961300000000, 0x66f0917000000000, + 0x0a9b99d500000000, 0x2e429eb600000000, 0x934bf84400000000, + 0xb792ff2700000000, 0xdbf9f78200000000, 0xff20f0e100000000, + 0x7943d39b00000000, 0x5d9ad4f800000000, 0x31f1dc5d00000000, + 0x1528db3e00000000, 0xa821bdcc00000000, 0x8cf8baaf00000000, + 0xe093b20a00000000, 0xc44ab56900000000, 0xdb860f3500000000, + 0xff5f085600000000, 0x933400f300000000, 0xb7ed079000000000, + 0x0ae4616200000000, 0x2e3d660100000000, 0x42566ea400000000, + 0x668f69c700000000, 0x7cce1b1d00000000, 0x58171c7e00000000, + 0x347c14db00000000, 0x10a513b800000000, 0xadac754a00000000, + 0x8975722900000000, 0xe51e7a8c00000000, 0xc1c77def00000000, + 0xde0bc7b300000000, 0xfad2c0d000000000, 0x96b9c87500000000, + 0xb260cf1600000000, 0x0f69a9e400000000, 0x2bb0ae8700000000, + 0x47dba62200000000, 0x6302a14100000000, 0x325f334d00000000, + 0x1686342e00000000, 0x7aed3c8b00000000, 0x5e343be800000000, + 0xe33d5d1a00000000, 0xc7e45a7900000000, 0xab8f52dc00000000, + 0x8f5655bf00000000, 0x909aefe300000000, 0xb443e88000000000, + 0xd828e02500000000, 0xfcf1e74600000000, 0x41f881b400000000, + 0x652186d700000000, 0x094a8e7200000000, 0x2d93891100000000, + 0x37d2fbcb00000000, 0x130bfca800000000, 0x7f60f40d00000000, + 0x5bb9f36e00000000, 0xe6b0959c00000000, 0xc26992ff00000000, + 0xae029a5a00000000, 0x8adb9d3900000000, 0x9517276500000000, + 0xb1ce200600000000, 0xdda528a300000000, 0xf97c2fc000000000, + 0x4475493200000000, 0x60ac4e5100000000, 0x0cc746f400000000, + 0x281e419700000000}, + {0x0000000000000000, 0x08e3603c00000000, 0x10c6c17800000000, + 0x1825a14400000000, 0x208c83f100000000, 0x286fe3cd00000000, + 0x304a428900000000, 0x38a922b500000000, 0x011e763800000000, + 0x09fd160400000000, 0x11d8b74000000000, 0x193bd77c00000000, + 0x2192f5c900000000, 0x297195f500000000, 0x315434b100000000, + 0x39b7548d00000000, 0x023cec7000000000, 0x0adf8c4c00000000, + 0x12fa2d0800000000, 0x1a194d3400000000, 0x22b06f8100000000, + 0x2a530fbd00000000, 0x3276aef900000000, 0x3a95cec500000000, + 0x03229a4800000000, 0x0bc1fa7400000000, 0x13e45b3000000000, + 0x1b073b0c00000000, 0x23ae19b900000000, 0x2b4d798500000000, + 0x3368d8c100000000, 0x3b8bb8fd00000000, 0x0478d8e100000000, + 0x0c9bb8dd00000000, 0x14be199900000000, 0x1c5d79a500000000, + 0x24f45b1000000000, 0x2c173b2c00000000, 0x34329a6800000000, + 0x3cd1fa5400000000, 0x0566aed900000000, 0x0d85cee500000000, + 0x15a06fa100000000, 0x1d430f9d00000000, 0x25ea2d2800000000, + 0x2d094d1400000000, 0x352cec5000000000, 0x3dcf8c6c00000000, + 0x0644349100000000, 0x0ea754ad00000000, 0x1682f5e900000000, + 0x1e6195d500000000, 0x26c8b76000000000, 0x2e2bd75c00000000, + 0x360e761800000000, 0x3eed162400000000, 0x075a42a900000000, + 0x0fb9229500000000, 0x179c83d100000000, 0x1f7fe3ed00000000, + 0x27d6c15800000000, 0x2f35a16400000000, 0x3710002000000000, + 0x3ff3601c00000000, 0x49f6c11800000000, 0x4115a12400000000, + 0x5930006000000000, 0x51d3605c00000000, 0x697a42e900000000, + 0x619922d500000000, 0x79bc839100000000, 0x715fe3ad00000000, + 0x48e8b72000000000, 0x400bd71c00000000, 0x582e765800000000, + 0x50cd166400000000, 0x686434d100000000, 0x608754ed00000000, + 0x78a2f5a900000000, 0x7041959500000000, 0x4bca2d6800000000, + 0x43294d5400000000, 0x5b0cec1000000000, 0x53ef8c2c00000000, + 0x6b46ae9900000000, 0x63a5cea500000000, 0x7b806fe100000000, + 0x73630fdd00000000, 0x4ad45b5000000000, 0x42373b6c00000000, + 0x5a129a2800000000, 0x52f1fa1400000000, 0x6a58d8a100000000, + 0x62bbb89d00000000, 0x7a9e19d900000000, 0x727d79e500000000, + 0x4d8e19f900000000, 0x456d79c500000000, 0x5d48d88100000000, + 0x55abb8bd00000000, 0x6d029a0800000000, 0x65e1fa3400000000, + 0x7dc45b7000000000, 0x75273b4c00000000, 0x4c906fc100000000, + 0x44730ffd00000000, 0x5c56aeb900000000, 0x54b5ce8500000000, + 0x6c1cec3000000000, 0x64ff8c0c00000000, 0x7cda2d4800000000, + 0x74394d7400000000, 0x4fb2f58900000000, 0x475195b500000000, + 0x5f7434f100000000, 0x579754cd00000000, 0x6f3e767800000000, + 0x67dd164400000000, 0x7ff8b70000000000, 0x771bd73c00000000, + 0x4eac83b100000000, 0x464fe38d00000000, 0x5e6a42c900000000, + 0x568922f500000000, 0x6e20004000000000, 0x66c3607c00000000, + 0x7ee6c13800000000, 0x7605a10400000000, 0x92ec833100000000, + 0x9a0fe30d00000000, 0x822a424900000000, 0x8ac9227500000000, + 0xb26000c000000000, 0xba8360fc00000000, 0xa2a6c1b800000000, + 0xaa45a18400000000, 0x93f2f50900000000, 0x9b11953500000000, + 0x8334347100000000, 0x8bd7544d00000000, 0xb37e76f800000000, + 0xbb9d16c400000000, 0xa3b8b78000000000, 0xab5bd7bc00000000, + 0x90d06f4100000000, 0x98330f7d00000000, 0x8016ae3900000000, + 0x88f5ce0500000000, 0xb05cecb000000000, 0xb8bf8c8c00000000, + 0xa09a2dc800000000, 0xa8794df400000000, 0x91ce197900000000, + 0x992d794500000000, 0x8108d80100000000, 0x89ebb83d00000000, + 0xb1429a8800000000, 0xb9a1fab400000000, 0xa1845bf000000000, + 0xa9673bcc00000000, 0x96945bd000000000, 0x9e773bec00000000, + 0x86529aa800000000, 0x8eb1fa9400000000, 0xb618d82100000000, + 0xbefbb81d00000000, 0xa6de195900000000, 0xae3d796500000000, + 0x978a2de800000000, 0x9f694dd400000000, 0x874cec9000000000, + 0x8faf8cac00000000, 0xb706ae1900000000, 0xbfe5ce2500000000, + 0xa7c06f6100000000, 0xaf230f5d00000000, 0x94a8b7a000000000, + 0x9c4bd79c00000000, 0x846e76d800000000, 0x8c8d16e400000000, + 0xb424345100000000, 0xbcc7546d00000000, 0xa4e2f52900000000, + 0xac01951500000000, 0x95b6c19800000000, 0x9d55a1a400000000, + 0x857000e000000000, 0x8d9360dc00000000, 0xb53a426900000000, + 0xbdd9225500000000, 0xa5fc831100000000, 0xad1fe32d00000000, + 0xdb1a422900000000, 0xd3f9221500000000, 0xcbdc835100000000, + 0xc33fe36d00000000, 0xfb96c1d800000000, 0xf375a1e400000000, + 0xeb5000a000000000, 0xe3b3609c00000000, 0xda04341100000000, + 0xd2e7542d00000000, 0xcac2f56900000000, 0xc221955500000000, + 0xfa88b7e000000000, 0xf26bd7dc00000000, 0xea4e769800000000, + 0xe2ad16a400000000, 0xd926ae5900000000, 0xd1c5ce6500000000, + 0xc9e06f2100000000, 0xc1030f1d00000000, 0xf9aa2da800000000, + 0xf1494d9400000000, 0xe96cecd000000000, 0xe18f8cec00000000, + 0xd838d86100000000, 0xd0dbb85d00000000, 0xc8fe191900000000, + 0xc01d792500000000, 0xf8b45b9000000000, 0xf0573bac00000000, + 0xe8729ae800000000, 0xe091fad400000000, 0xdf629ac800000000, + 0xd781faf400000000, 0xcfa45bb000000000, 0xc7473b8c00000000, + 0xffee193900000000, 0xf70d790500000000, 0xef28d84100000000, + 0xe7cbb87d00000000, 0xde7cecf000000000, 0xd69f8ccc00000000, + 0xceba2d8800000000, 0xc6594db400000000, 0xfef06f0100000000, + 0xf6130f3d00000000, 0xee36ae7900000000, 0xe6d5ce4500000000, + 0xdd5e76b800000000, 0xd5bd168400000000, 0xcd98b7c000000000, + 0xc57bd7fc00000000, 0xfdd2f54900000000, 0xf531957500000000, + 0xed14343100000000, 0xe5f7540d00000000, 0xdc40008000000000, + 0xd4a360bc00000000, 0xcc86c1f800000000, 0xc465a1c400000000, + 0xfccc837100000000, 0xf42fe34d00000000, 0xec0a420900000000, + 0xe4e9223500000000}, + {0x0000000000000000, 0xd1e8e70e00000000, 0xa2d1cf1d00000000, + 0x7339281300000000, 0x44a39f3b00000000, 0x954b783500000000, + 0xe672502600000000, 0x379ab72800000000, 0x88463f7700000000, + 0x59aed87900000000, 0x2a97f06a00000000, 0xfb7f176400000000, + 0xcce5a04c00000000, 0x1d0d474200000000, 0x6e346f5100000000, + 0xbfdc885f00000000, 0x108d7eee00000000, 0xc16599e000000000, + 0xb25cb1f300000000, 0x63b456fd00000000, 0x542ee1d500000000, + 0x85c606db00000000, 0xf6ff2ec800000000, 0x2717c9c600000000, + 0x98cb419900000000, 0x4923a69700000000, 0x3a1a8e8400000000, + 0xebf2698a00000000, 0xdc68dea200000000, 0x0d8039ac00000000, + 0x7eb911bf00000000, 0xaf51f6b100000000, 0x611c8c0700000000, + 0xb0f46b0900000000, 0xc3cd431a00000000, 0x1225a41400000000, + 0x25bf133c00000000, 0xf457f43200000000, 0x876edc2100000000, + 0x56863b2f00000000, 0xe95ab37000000000, 0x38b2547e00000000, + 0x4b8b7c6d00000000, 0x9a639b6300000000, 0xadf92c4b00000000, + 0x7c11cb4500000000, 0x0f28e35600000000, 0xdec0045800000000, + 0x7191f2e900000000, 0xa07915e700000000, 0xd3403df400000000, + 0x02a8dafa00000000, 0x35326dd200000000, 0xe4da8adc00000000, + 0x97e3a2cf00000000, 0x460b45c100000000, 0xf9d7cd9e00000000, + 0x283f2a9000000000, 0x5b06028300000000, 0x8aeee58d00000000, + 0xbd7452a500000000, 0x6c9cb5ab00000000, 0x1fa59db800000000, + 0xce4d7ab600000000, 0xc238180f00000000, 0x13d0ff0100000000, + 0x60e9d71200000000, 0xb101301c00000000, 0x869b873400000000, + 0x5773603a00000000, 0x244a482900000000, 0xf5a2af2700000000, + 0x4a7e277800000000, 0x9b96c07600000000, 0xe8afe86500000000, + 0x39470f6b00000000, 0x0eddb84300000000, 0xdf355f4d00000000, + 0xac0c775e00000000, 0x7de4905000000000, 0xd2b566e100000000, + 0x035d81ef00000000, 0x7064a9fc00000000, 0xa18c4ef200000000, + 0x9616f9da00000000, 0x47fe1ed400000000, 0x34c736c700000000, + 0xe52fd1c900000000, 0x5af3599600000000, 0x8b1bbe9800000000, + 0xf822968b00000000, 0x29ca718500000000, 0x1e50c6ad00000000, + 0xcfb821a300000000, 0xbc8109b000000000, 0x6d69eebe00000000, + 0xa324940800000000, 0x72cc730600000000, 0x01f55b1500000000, + 0xd01dbc1b00000000, 0xe7870b3300000000, 0x366fec3d00000000, + 0x4556c42e00000000, 0x94be232000000000, 0x2b62ab7f00000000, + 0xfa8a4c7100000000, 0x89b3646200000000, 0x585b836c00000000, + 0x6fc1344400000000, 0xbe29d34a00000000, 0xcd10fb5900000000, + 0x1cf81c5700000000, 0xb3a9eae600000000, 0x62410de800000000, + 0x117825fb00000000, 0xc090c2f500000000, 0xf70a75dd00000000, + 0x26e292d300000000, 0x55dbbac000000000, 0x84335dce00000000, + 0x3befd59100000000, 0xea07329f00000000, 0x993e1a8c00000000, + 0x48d6fd8200000000, 0x7f4c4aaa00000000, 0xaea4ada400000000, + 0xdd9d85b700000000, 0x0c7562b900000000, 0x8471301e00000000, + 0x5599d71000000000, 0x26a0ff0300000000, 0xf748180d00000000, + 0xc0d2af2500000000, 0x113a482b00000000, 0x6203603800000000, + 0xb3eb873600000000, 0x0c370f6900000000, 0xdddfe86700000000, + 0xaee6c07400000000, 0x7f0e277a00000000, 0x4894905200000000, + 0x997c775c00000000, 0xea455f4f00000000, 0x3badb84100000000, + 0x94fc4ef000000000, 0x4514a9fe00000000, 0x362d81ed00000000, + 0xe7c566e300000000, 0xd05fd1cb00000000, 0x01b736c500000000, + 0x728e1ed600000000, 0xa366f9d800000000, 0x1cba718700000000, + 0xcd52968900000000, 0xbe6bbe9a00000000, 0x6f83599400000000, + 0x5819eebc00000000, 0x89f109b200000000, 0xfac821a100000000, + 0x2b20c6af00000000, 0xe56dbc1900000000, 0x34855b1700000000, + 0x47bc730400000000, 0x9654940a00000000, 0xa1ce232200000000, + 0x7026c42c00000000, 0x031fec3f00000000, 0xd2f70b3100000000, + 0x6d2b836e00000000, 0xbcc3646000000000, 0xcffa4c7300000000, + 0x1e12ab7d00000000, 0x29881c5500000000, 0xf860fb5b00000000, + 0x8b59d34800000000, 0x5ab1344600000000, 0xf5e0c2f700000000, + 0x240825f900000000, 0x57310dea00000000, 0x86d9eae400000000, + 0xb1435dcc00000000, 0x60abbac200000000, 0x139292d100000000, + 0xc27a75df00000000, 0x7da6fd8000000000, 0xac4e1a8e00000000, + 0xdf77329d00000000, 0x0e9fd59300000000, 0x390562bb00000000, + 0xe8ed85b500000000, 0x9bd4ada600000000, 0x4a3c4aa800000000, + 0x4649281100000000, 0x97a1cf1f00000000, 0xe498e70c00000000, + 0x3570000200000000, 0x02eab72a00000000, 0xd302502400000000, + 0xa03b783700000000, 0x71d39f3900000000, 0xce0f176600000000, + 0x1fe7f06800000000, 0x6cded87b00000000, 0xbd363f7500000000, + 0x8aac885d00000000, 0x5b446f5300000000, 0x287d474000000000, + 0xf995a04e00000000, 0x56c456ff00000000, 0x872cb1f100000000, + 0xf41599e200000000, 0x25fd7eec00000000, 0x1267c9c400000000, + 0xc38f2eca00000000, 0xb0b606d900000000, 0x615ee1d700000000, + 0xde82698800000000, 0x0f6a8e8600000000, 0x7c53a69500000000, + 0xadbb419b00000000, 0x9a21f6b300000000, 0x4bc911bd00000000, + 0x38f039ae00000000, 0xe918dea000000000, 0x2755a41600000000, + 0xf6bd431800000000, 0x85846b0b00000000, 0x546c8c0500000000, + 0x63f63b2d00000000, 0xb21edc2300000000, 0xc127f43000000000, + 0x10cf133e00000000, 0xaf139b6100000000, 0x7efb7c6f00000000, + 0x0dc2547c00000000, 0xdc2ab37200000000, 0xebb0045a00000000, + 0x3a58e35400000000, 0x4961cb4700000000, 0x98892c4900000000, + 0x37d8daf800000000, 0xe6303df600000000, 0x950915e500000000, + 0x44e1f2eb00000000, 0x737b45c300000000, 0xa293a2cd00000000, + 0xd1aa8ade00000000, 0x00426dd000000000, 0xbf9ee58f00000000, + 0x6e76028100000000, 0x1d4f2a9200000000, 0xcca7cd9c00000000, + 0xfb3d7ab400000000, 0x2ad59dba00000000, 0x59ecb5a900000000, + 0x880452a700000000}, + {0x0000000000000000, 0xaa05daf100000000, 0x150dc53800000000, + 0xbf081fc900000000, 0x2a1a8a7100000000, 0x801f508000000000, + 0x3f174f4900000000, 0x951295b800000000, 0x543414e300000000, + 0xfe31ce1200000000, 0x4139d1db00000000, 0xeb3c0b2a00000000, + 0x7e2e9e9200000000, 0xd42b446300000000, 0x6b235baa00000000, + 0xc126815b00000000, 0xe96e591d00000000, 0x436b83ec00000000, + 0xfc639c2500000000, 0x566646d400000000, 0xc374d36c00000000, + 0x6971099d00000000, 0xd679165400000000, 0x7c7ccca500000000, + 0xbd5a4dfe00000000, 0x175f970f00000000, 0xa85788c600000000, + 0x0252523700000000, 0x9740c78f00000000, 0x3d451d7e00000000, + 0x824d02b700000000, 0x2848d84600000000, 0xd2ddb23a00000000, + 0x78d868cb00000000, 0xc7d0770200000000, 0x6dd5adf300000000, + 0xf8c7384b00000000, 0x52c2e2ba00000000, 0xedcafd7300000000, + 0x47cf278200000000, 0x86e9a6d900000000, 0x2cec7c2800000000, + 0x93e463e100000000, 0x39e1b91000000000, 0xacf32ca800000000, + 0x06f6f65900000000, 0xb9fee99000000000, 0x13fb336100000000, + 0x3bb3eb2700000000, 0x91b631d600000000, 0x2ebe2e1f00000000, + 0x84bbf4ee00000000, 0x11a9615600000000, 0xbbacbba700000000, + 0x04a4a46e00000000, 0xaea17e9f00000000, 0x6f87ffc400000000, + 0xc582253500000000, 0x7a8a3afc00000000, 0xd08fe00d00000000, + 0x459d75b500000000, 0xef98af4400000000, 0x5090b08d00000000, + 0xfa956a7c00000000, 0xa4bb657500000000, 0x0ebebf8400000000, + 0xb1b6a04d00000000, 0x1bb37abc00000000, 0x8ea1ef0400000000, + 0x24a435f500000000, 0x9bac2a3c00000000, 0x31a9f0cd00000000, + 0xf08f719600000000, 0x5a8aab6700000000, 0xe582b4ae00000000, + 0x4f876e5f00000000, 0xda95fbe700000000, 0x7090211600000000, + 0xcf983edf00000000, 0x659de42e00000000, 0x4dd53c6800000000, + 0xe7d0e69900000000, 0x58d8f95000000000, 0xf2dd23a100000000, + 0x67cfb61900000000, 0xcdca6ce800000000, 0x72c2732100000000, + 0xd8c7a9d000000000, 0x19e1288b00000000, 0xb3e4f27a00000000, + 0x0cecedb300000000, 0xa6e9374200000000, 0x33fba2fa00000000, + 0x99fe780b00000000, 0x26f667c200000000, 0x8cf3bd3300000000, + 0x7666d74f00000000, 0xdc630dbe00000000, 0x636b127700000000, + 0xc96ec88600000000, 0x5c7c5d3e00000000, 0xf67987cf00000000, + 0x4971980600000000, 0xe37442f700000000, 0x2252c3ac00000000, + 0x8857195d00000000, 0x375f069400000000, 0x9d5adc6500000000, + 0x084849dd00000000, 0xa24d932c00000000, 0x1d458ce500000000, + 0xb740561400000000, 0x9f088e5200000000, 0x350d54a300000000, + 0x8a054b6a00000000, 0x2000919b00000000, 0xb512042300000000, + 0x1f17ded200000000, 0xa01fc11b00000000, 0x0a1a1bea00000000, + 0xcb3c9ab100000000, 0x6139404000000000, 0xde315f8900000000, + 0x7434857800000000, 0xe12610c000000000, 0x4b23ca3100000000, + 0xf42bd5f800000000, 0x5e2e0f0900000000, 0x4877cbea00000000, + 0xe272111b00000000, 0x5d7a0ed200000000, 0xf77fd42300000000, + 0x626d419b00000000, 0xc8689b6a00000000, 0x776084a300000000, + 0xdd655e5200000000, 0x1c43df0900000000, 0xb64605f800000000, + 0x094e1a3100000000, 0xa34bc0c000000000, 0x3659557800000000, + 0x9c5c8f8900000000, 0x2354904000000000, 0x89514ab100000000, + 0xa11992f700000000, 0x0b1c480600000000, 0xb41457cf00000000, + 0x1e118d3e00000000, 0x8b03188600000000, 0x2106c27700000000, + 0x9e0eddbe00000000, 0x340b074f00000000, 0xf52d861400000000, + 0x5f285ce500000000, 0xe020432c00000000, 0x4a2599dd00000000, + 0xdf370c6500000000, 0x7532d69400000000, 0xca3ac95d00000000, + 0x603f13ac00000000, 0x9aaa79d000000000, 0x30afa32100000000, + 0x8fa7bce800000000, 0x25a2661900000000, 0xb0b0f3a100000000, + 0x1ab5295000000000, 0xa5bd369900000000, 0x0fb8ec6800000000, + 0xce9e6d3300000000, 0x649bb7c200000000, 0xdb93a80b00000000, + 0x719672fa00000000, 0xe484e74200000000, 0x4e813db300000000, + 0xf189227a00000000, 0x5b8cf88b00000000, 0x73c420cd00000000, + 0xd9c1fa3c00000000, 0x66c9e5f500000000, 0xcccc3f0400000000, + 0x59deaabc00000000, 0xf3db704d00000000, 0x4cd36f8400000000, + 0xe6d6b57500000000, 0x27f0342e00000000, 0x8df5eedf00000000, + 0x32fdf11600000000, 0x98f82be700000000, 0x0deabe5f00000000, + 0xa7ef64ae00000000, 0x18e77b6700000000, 0xb2e2a19600000000, + 0xecccae9f00000000, 0x46c9746e00000000, 0xf9c16ba700000000, + 0x53c4b15600000000, 0xc6d624ee00000000, 0x6cd3fe1f00000000, + 0xd3dbe1d600000000, 0x79de3b2700000000, 0xb8f8ba7c00000000, + 0x12fd608d00000000, 0xadf57f4400000000, 0x07f0a5b500000000, + 0x92e2300d00000000, 0x38e7eafc00000000, 0x87eff53500000000, + 0x2dea2fc400000000, 0x05a2f78200000000, 0xafa72d7300000000, + 0x10af32ba00000000, 0xbaaae84b00000000, 0x2fb87df300000000, + 0x85bda70200000000, 0x3ab5b8cb00000000, 0x90b0623a00000000, + 0x5196e36100000000, 0xfb93399000000000, 0x449b265900000000, + 0xee9efca800000000, 0x7b8c691000000000, 0xd189b3e100000000, + 0x6e81ac2800000000, 0xc48476d900000000, 0x3e111ca500000000, + 0x9414c65400000000, 0x2b1cd99d00000000, 0x8119036c00000000, + 0x140b96d400000000, 0xbe0e4c2500000000, 0x010653ec00000000, + 0xab03891d00000000, 0x6a25084600000000, 0xc020d2b700000000, + 0x7f28cd7e00000000, 0xd52d178f00000000, 0x403f823700000000, + 0xea3a58c600000000, 0x5532470f00000000, 0xff379dfe00000000, + 0xd77f45b800000000, 0x7d7a9f4900000000, 0xc272808000000000, + 0x68775a7100000000, 0xfd65cfc900000000, 0x5760153800000000, + 0xe8680af100000000, 0x426dd00000000000, 0x834b515b00000000, + 0x294e8baa00000000, 0x9646946300000000, 0x3c434e9200000000, + 0xa951db2a00000000, 0x035401db00000000, 0xbc5c1e1200000000, + 0x1659c4e300000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87, + 0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede, + 0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab, + 0x8eea673a, 0xe6273e9e, 0x484faf0f, 0x61871bfd, 0xcfef8a6c, + 0x32167219, 0x9c7ee388, 0xb5b6577a, 0x1bdec6eb, 0x9534a1d1, + 0x3b5c3040, 0x129484b2, 0xbcfc1523, 0x4105ed56, 0xef6d7cc7, + 0xc6a5c835, 0x68cd59a4, 0x173f7b7d, 0xb957eaec, 0x909f5e1e, + 0x3ef7cf8f, 0xc30e37fa, 0x6d66a66b, 0x44ae1299, 0xeac68308, + 0x642ce432, 0xca4475a3, 0xe38cc151, 0x4de450c0, 0xb01da8b5, + 0x1e753924, 0x37bd8dd6, 0x99d51c47, 0xf11845e3, 0x5f70d472, + 0x76b86080, 0xd8d0f111, 0x25290964, 0x8b4198f5, 0xa2892c07, + 0x0ce1bd96, 0x820bdaac, 0x2c634b3d, 0x05abffcf, 0xabc36e5e, + 0x563a962b, 0xf85207ba, 0xd19ab348, 0x7ff222d9, 0x2e7ef6fa, + 0x8016676b, 0xa9ded399, 0x07b64208, 0xfa4fba7d, 0x54272bec, + 0x7def9f1e, 0xd3870e8f, 0x5d6d69b5, 0xf305f824, 0xdacd4cd6, + 0x74a5dd47, 0x895c2532, 0x2734b4a3, 0x0efc0051, 0xa09491c0, + 0xc859c864, 0x663159f5, 0x4ff9ed07, 0xe1917c96, 0x1c6884e3, + 0xb2001572, 0x9bc8a180, 0x35a03011, 0xbb4a572b, 0x1522c6ba, + 0x3cea7248, 0x9282e3d9, 0x6f7b1bac, 0xc1138a3d, 0xe8db3ecf, + 0x46b3af5e, 0x39418d87, 0x97291c16, 0xbee1a8e4, 0x10893975, + 0xed70c100, 0x43185091, 0x6ad0e463, 0xc4b875f2, 0x4a5212c8, + 0xe43a8359, 0xcdf237ab, 0x639aa63a, 0x9e635e4f, 0x300bcfde, + 0x19c37b2c, 0xb7abeabd, 0xdf66b319, 0x710e2288, 0x58c6967a, + 0xf6ae07eb, 0x0b57ff9e, 0xa53f6e0f, 0x8cf7dafd, 0x229f4b6c, + 0xac752c56, 0x021dbdc7, 0x2bd50935, 0x85bd98a4, 0x784460d1, + 0xd62cf140, 0xffe445b2, 0x518cd423, 0x5cfdedf4, 0xf2957c65, + 0xdb5dc897, 0x75355906, 0x88cca173, 0x26a430e2, 0x0f6c8410, + 0xa1041581, 0x2fee72bb, 0x8186e32a, 0xa84e57d8, 0x0626c649, + 0xfbdf3e3c, 0x55b7afad, 0x7c7f1b5f, 0xd2178ace, 0xbadad36a, + 0x14b242fb, 0x3d7af609, 0x93126798, 0x6eeb9fed, 0xc0830e7c, + 0xe94bba8e, 0x47232b1f, 0xc9c94c25, 0x67a1ddb4, 0x4e696946, + 0xe001f8d7, 0x1df800a2, 0xb3909133, 0x9a5825c1, 0x3430b450, + 0x4bc29689, 0xe5aa0718, 0xcc62b3ea, 0x620a227b, 0x9ff3da0e, + 0x319b4b9f, 0x1853ff6d, 0xb63b6efc, 0x38d109c6, 0x96b99857, + 0xbf712ca5, 0x1119bd34, 0xece04541, 0x4288d4d0, 0x6b406022, + 0xc528f1b3, 0xade5a817, 0x038d3986, 0x2a458d74, 0x842d1ce5, + 0x79d4e490, 0xd7bc7501, 0xfe74c1f3, 0x501c5062, 0xdef63758, + 0x709ea6c9, 0x5956123b, 0xf73e83aa, 0x0ac77bdf, 0xa4afea4e, + 0x8d675ebc, 0x230fcf2d, 0x72831b0e, 0xdceb8a9f, 0xf5233e6d, + 0x5b4baffc, 0xa6b25789, 0x08dac618, 0x211272ea, 0x8f7ae37b, + 0x01908441, 0xaff815d0, 0x8630a122, 0x285830b3, 0xd5a1c8c6, + 0x7bc95957, 0x5201eda5, 0xfc697c34, 0x94a42590, 0x3accb401, + 0x130400f3, 0xbd6c9162, 0x40956917, 0xeefdf886, 0xc7354c74, + 0x695ddde5, 0xe7b7badf, 0x49df2b4e, 0x60179fbc, 0xce7f0e2d, + 0x3386f658, 0x9dee67c9, 0xb426d33b, 0x1a4e42aa, 0x65bc6073, + 0xcbd4f1e2, 0xe21c4510, 0x4c74d481, 0xb18d2cf4, 0x1fe5bd65, + 0x362d0997, 0x98459806, 0x16afff3c, 0xb8c76ead, 0x910fda5f, + 0x3f674bce, 0xc29eb3bb, 0x6cf6222a, 0x453e96d8, 0xeb560749, + 0x839b5eed, 0x2df3cf7c, 0x043b7b8e, 0xaa53ea1f, 0x57aa126a, + 0xf9c283fb, 0xd00a3709, 0x7e62a698, 0xf088c1a2, 0x5ee05033, + 0x7728e4c1, 0xd9407550, 0x24b98d25, 0x8ad11cb4, 0xa319a846, + 0x0d7139d7}, + {0x00000000, 0xb9fbdbe8, 0xa886b191, 0x117d6a79, 0x8a7c6563, + 0x3387be8b, 0x22fad4f2, 0x9b010f1a, 0xcf89cc87, 0x7672176f, + 0x670f7d16, 0xdef4a6fe, 0x45f5a9e4, 0xfc0e720c, 0xed731875, + 0x5488c39d, 0x44629f4f, 0xfd9944a7, 0xece42ede, 0x551ff536, + 0xce1efa2c, 0x77e521c4, 0x66984bbd, 0xdf639055, 0x8beb53c8, + 0x32108820, 0x236de259, 0x9a9639b1, 0x019736ab, 0xb86ced43, + 0xa911873a, 0x10ea5cd2, 0x88c53e9e, 0x313ee576, 0x20438f0f, + 0x99b854e7, 0x02b95bfd, 0xbb428015, 0xaa3fea6c, 0x13c43184, + 0x474cf219, 0xfeb729f1, 0xefca4388, 0x56319860, 0xcd30977a, + 0x74cb4c92, 0x65b626eb, 0xdc4dfd03, 0xcca7a1d1, 0x755c7a39, + 0x64211040, 0xdddacba8, 0x46dbc4b2, 0xff201f5a, 0xee5d7523, + 0x57a6aecb, 0x032e6d56, 0xbad5b6be, 0xaba8dcc7, 0x1253072f, + 0x89520835, 0x30a9d3dd, 0x21d4b9a4, 0x982f624c, 0xcafb7b7d, + 0x7300a095, 0x627dcaec, 0xdb861104, 0x40871e1e, 0xf97cc5f6, + 0xe801af8f, 0x51fa7467, 0x0572b7fa, 0xbc896c12, 0xadf4066b, + 0x140fdd83, 0x8f0ed299, 0x36f50971, 0x27886308, 0x9e73b8e0, + 0x8e99e432, 0x37623fda, 0x261f55a3, 0x9fe48e4b, 0x04e58151, + 0xbd1e5ab9, 0xac6330c0, 0x1598eb28, 0x411028b5, 0xf8ebf35d, + 0xe9969924, 0x506d42cc, 0xcb6c4dd6, 0x7297963e, 0x63eafc47, + 0xda1127af, 0x423e45e3, 0xfbc59e0b, 0xeab8f472, 0x53432f9a, + 0xc8422080, 0x71b9fb68, 0x60c49111, 0xd93f4af9, 0x8db78964, + 0x344c528c, 0x253138f5, 0x9ccae31d, 0x07cbec07, 0xbe3037ef, + 0xaf4d5d96, 0x16b6867e, 0x065cdaac, 0xbfa70144, 0xaeda6b3d, + 0x1721b0d5, 0x8c20bfcf, 0x35db6427, 0x24a60e5e, 0x9d5dd5b6, + 0xc9d5162b, 0x702ecdc3, 0x6153a7ba, 0xd8a87c52, 0x43a97348, + 0xfa52a8a0, 0xeb2fc2d9, 0x52d41931, 0x4e87f0bb, 0xf77c2b53, + 0xe601412a, 0x5ffa9ac2, 0xc4fb95d8, 0x7d004e30, 0x6c7d2449, + 0xd586ffa1, 0x810e3c3c, 0x38f5e7d4, 0x29888dad, 0x90735645, + 0x0b72595f, 0xb28982b7, 0xa3f4e8ce, 0x1a0f3326, 0x0ae56ff4, + 0xb31eb41c, 0xa263de65, 0x1b98058d, 0x80990a97, 0x3962d17f, + 0x281fbb06, 0x91e460ee, 0xc56ca373, 0x7c97789b, 0x6dea12e2, + 0xd411c90a, 0x4f10c610, 0xf6eb1df8, 0xe7967781, 0x5e6dac69, + 0xc642ce25, 0x7fb915cd, 0x6ec47fb4, 0xd73fa45c, 0x4c3eab46, + 0xf5c570ae, 0xe4b81ad7, 0x5d43c13f, 0x09cb02a2, 0xb030d94a, + 0xa14db333, 0x18b668db, 0x83b767c1, 0x3a4cbc29, 0x2b31d650, + 0x92ca0db8, 0x8220516a, 0x3bdb8a82, 0x2aa6e0fb, 0x935d3b13, + 0x085c3409, 0xb1a7efe1, 0xa0da8598, 0x19215e70, 0x4da99ded, + 0xf4524605, 0xe52f2c7c, 0x5cd4f794, 0xc7d5f88e, 0x7e2e2366, + 0x6f53491f, 0xd6a892f7, 0x847c8bc6, 0x3d87502e, 0x2cfa3a57, + 0x9501e1bf, 0x0e00eea5, 0xb7fb354d, 0xa6865f34, 0x1f7d84dc, + 0x4bf54741, 0xf20e9ca9, 0xe373f6d0, 0x5a882d38, 0xc1892222, + 0x7872f9ca, 0x690f93b3, 0xd0f4485b, 0xc01e1489, 0x79e5cf61, + 0x6898a518, 0xd1637ef0, 0x4a6271ea, 0xf399aa02, 0xe2e4c07b, + 0x5b1f1b93, 0x0f97d80e, 0xb66c03e6, 0xa711699f, 0x1eeab277, + 0x85ebbd6d, 0x3c106685, 0x2d6d0cfc, 0x9496d714, 0x0cb9b558, + 0xb5426eb0, 0xa43f04c9, 0x1dc4df21, 0x86c5d03b, 0x3f3e0bd3, + 0x2e4361aa, 0x97b8ba42, 0xc33079df, 0x7acba237, 0x6bb6c84e, + 0xd24d13a6, 0x494c1cbc, 0xf0b7c754, 0xe1caad2d, 0x583176c5, + 0x48db2a17, 0xf120f1ff, 0xe05d9b86, 0x59a6406e, 0xc2a74f74, + 0x7b5c949c, 0x6a21fee5, 0xd3da250d, 0x8752e690, 0x3ea93d78, + 0x2fd45701, 0x962f8ce9, 0x0d2e83f3, 0xb4d5581b, 0xa5a83262, + 0x1c53e98a}, + {0x00000000, 0x9d0fe176, 0xe16ec4ad, 0x7c6125db, 0x19ac8f1b, + 0x84a36e6d, 0xf8c24bb6, 0x65cdaac0, 0x33591e36, 0xae56ff40, + 0xd237da9b, 0x4f383bed, 0x2af5912d, 0xb7fa705b, 0xcb9b5580, + 0x5694b4f6, 0x66b23c6c, 0xfbbddd1a, 0x87dcf8c1, 0x1ad319b7, + 0x7f1eb377, 0xe2115201, 0x9e7077da, 0x037f96ac, 0x55eb225a, + 0xc8e4c32c, 0xb485e6f7, 0x298a0781, 0x4c47ad41, 0xd1484c37, + 0xad2969ec, 0x3026889a, 0xcd6478d8, 0x506b99ae, 0x2c0abc75, + 0xb1055d03, 0xd4c8f7c3, 0x49c716b5, 0x35a6336e, 0xa8a9d218, + 0xfe3d66ee, 0x63328798, 0x1f53a243, 0x825c4335, 0xe791e9f5, + 0x7a9e0883, 0x06ff2d58, 0x9bf0cc2e, 0xabd644b4, 0x36d9a5c2, + 0x4ab88019, 0xd7b7616f, 0xb27acbaf, 0x2f752ad9, 0x53140f02, + 0xce1bee74, 0x988f5a82, 0x0580bbf4, 0x79e19e2f, 0xe4ee7f59, + 0x8123d599, 0x1c2c34ef, 0x604d1134, 0xfd42f042, 0x41b9f7f1, + 0xdcb61687, 0xa0d7335c, 0x3dd8d22a, 0x581578ea, 0xc51a999c, + 0xb97bbc47, 0x24745d31, 0x72e0e9c7, 0xefef08b1, 0x938e2d6a, + 0x0e81cc1c, 0x6b4c66dc, 0xf64387aa, 0x8a22a271, 0x172d4307, + 0x270bcb9d, 0xba042aeb, 0xc6650f30, 0x5b6aee46, 0x3ea74486, + 0xa3a8a5f0, 0xdfc9802b, 0x42c6615d, 0x1452d5ab, 0x895d34dd, + 0xf53c1106, 0x6833f070, 0x0dfe5ab0, 0x90f1bbc6, 0xec909e1d, + 0x719f7f6b, 0x8cdd8f29, 0x11d26e5f, 0x6db34b84, 0xf0bcaaf2, + 0x95710032, 0x087ee144, 0x741fc49f, 0xe91025e9, 0xbf84911f, + 0x228b7069, 0x5eea55b2, 0xc3e5b4c4, 0xa6281e04, 0x3b27ff72, + 0x4746daa9, 0xda493bdf, 0xea6fb345, 0x77605233, 0x0b0177e8, + 0x960e969e, 0xf3c33c5e, 0x6eccdd28, 0x12adf8f3, 0x8fa21985, + 0xd936ad73, 0x44394c05, 0x385869de, 0xa55788a8, 0xc09a2268, + 0x5d95c31e, 0x21f4e6c5, 0xbcfb07b3, 0x8373efe2, 0x1e7c0e94, + 0x621d2b4f, 0xff12ca39, 0x9adf60f9, 0x07d0818f, 0x7bb1a454, + 0xe6be4522, 0xb02af1d4, 0x2d2510a2, 0x51443579, 0xcc4bd40f, + 0xa9867ecf, 0x34899fb9, 0x48e8ba62, 0xd5e75b14, 0xe5c1d38e, + 0x78ce32f8, 0x04af1723, 0x99a0f655, 0xfc6d5c95, 0x6162bde3, + 0x1d039838, 0x800c794e, 0xd698cdb8, 0x4b972cce, 0x37f60915, + 0xaaf9e863, 0xcf3442a3, 0x523ba3d5, 0x2e5a860e, 0xb3556778, + 0x4e17973a, 0xd318764c, 0xaf795397, 0x3276b2e1, 0x57bb1821, + 0xcab4f957, 0xb6d5dc8c, 0x2bda3dfa, 0x7d4e890c, 0xe041687a, + 0x9c204da1, 0x012facd7, 0x64e20617, 0xf9ede761, 0x858cc2ba, + 0x188323cc, 0x28a5ab56, 0xb5aa4a20, 0xc9cb6ffb, 0x54c48e8d, + 0x3109244d, 0xac06c53b, 0xd067e0e0, 0x4d680196, 0x1bfcb560, + 0x86f35416, 0xfa9271cd, 0x679d90bb, 0x02503a7b, 0x9f5fdb0d, + 0xe33efed6, 0x7e311fa0, 0xc2ca1813, 0x5fc5f965, 0x23a4dcbe, + 0xbeab3dc8, 0xdb669708, 0x4669767e, 0x3a0853a5, 0xa707b2d3, + 0xf1930625, 0x6c9ce753, 0x10fdc288, 0x8df223fe, 0xe83f893e, + 0x75306848, 0x09514d93, 0x945eace5, 0xa478247f, 0x3977c509, + 0x4516e0d2, 0xd81901a4, 0xbdd4ab64, 0x20db4a12, 0x5cba6fc9, + 0xc1b58ebf, 0x97213a49, 0x0a2edb3f, 0x764ffee4, 0xeb401f92, + 0x8e8db552, 0x13825424, 0x6fe371ff, 0xf2ec9089, 0x0fae60cb, + 0x92a181bd, 0xeec0a466, 0x73cf4510, 0x1602efd0, 0x8b0d0ea6, + 0xf76c2b7d, 0x6a63ca0b, 0x3cf77efd, 0xa1f89f8b, 0xdd99ba50, + 0x40965b26, 0x255bf1e6, 0xb8541090, 0xc435354b, 0x593ad43d, + 0x691c5ca7, 0xf413bdd1, 0x8872980a, 0x157d797c, 0x70b0d3bc, + 0xedbf32ca, 0x91de1711, 0x0cd1f667, 0x5a454291, 0xc74aa3e7, + 0xbb2b863c, 0x2624674a, 0x43e9cd8a, 0xdee62cfc, 0xa2870927, + 0x3f88e851}, + {0x00000000, 0xdd96d985, 0x605cb54b, 0xbdca6cce, 0xc0b96a96, + 0x1d2fb313, 0xa0e5dfdd, 0x7d730658, 0x5a03d36d, 0x87950ae8, + 0x3a5f6626, 0xe7c9bfa3, 0x9abab9fb, 0x472c607e, 0xfae60cb0, + 0x2770d535, 0xb407a6da, 0x69917f5f, 0xd45b1391, 0x09cdca14, + 0x74becc4c, 0xa92815c9, 0x14e27907, 0xc974a082, 0xee0475b7, + 0x3392ac32, 0x8e58c0fc, 0x53ce1979, 0x2ebd1f21, 0xf32bc6a4, + 0x4ee1aa6a, 0x937773ef, 0xb37e4bf5, 0x6ee89270, 0xd322febe, + 0x0eb4273b, 0x73c72163, 0xae51f8e6, 0x139b9428, 0xce0d4dad, + 0xe97d9898, 0x34eb411d, 0x89212dd3, 0x54b7f456, 0x29c4f20e, + 0xf4522b8b, 0x49984745, 0x940e9ec0, 0x0779ed2f, 0xdaef34aa, + 0x67255864, 0xbab381e1, 0xc7c087b9, 0x1a565e3c, 0xa79c32f2, + 0x7a0aeb77, 0x5d7a3e42, 0x80ece7c7, 0x3d268b09, 0xe0b0528c, + 0x9dc354d4, 0x40558d51, 0xfd9fe19f, 0x2009381a, 0xbd8d91ab, + 0x601b482e, 0xddd124e0, 0x0047fd65, 0x7d34fb3d, 0xa0a222b8, + 0x1d684e76, 0xc0fe97f3, 0xe78e42c6, 0x3a189b43, 0x87d2f78d, + 0x5a442e08, 0x27372850, 0xfaa1f1d5, 0x476b9d1b, 0x9afd449e, + 0x098a3771, 0xd41ceef4, 0x69d6823a, 0xb4405bbf, 0xc9335de7, + 0x14a58462, 0xa96fe8ac, 0x74f93129, 0x5389e41c, 0x8e1f3d99, + 0x33d55157, 0xee4388d2, 0x93308e8a, 0x4ea6570f, 0xf36c3bc1, + 0x2efae244, 0x0ef3da5e, 0xd36503db, 0x6eaf6f15, 0xb339b690, + 0xce4ab0c8, 0x13dc694d, 0xae160583, 0x7380dc06, 0x54f00933, + 0x8966d0b6, 0x34acbc78, 0xe93a65fd, 0x944963a5, 0x49dfba20, + 0xf415d6ee, 0x29830f6b, 0xbaf47c84, 0x6762a501, 0xdaa8c9cf, + 0x073e104a, 0x7a4d1612, 0xa7dbcf97, 0x1a11a359, 0xc7877adc, + 0xe0f7afe9, 0x3d61766c, 0x80ab1aa2, 0x5d3dc327, 0x204ec57f, + 0xfdd81cfa, 0x40127034, 0x9d84a9b1, 0xa06a2517, 0x7dfcfc92, + 0xc036905c, 0x1da049d9, 0x60d34f81, 0xbd459604, 0x008ffaca, + 0xdd19234f, 0xfa69f67a, 0x27ff2fff, 0x9a354331, 0x47a39ab4, + 0x3ad09cec, 0xe7464569, 0x5a8c29a7, 0x871af022, 0x146d83cd, + 0xc9fb5a48, 0x74313686, 0xa9a7ef03, 0xd4d4e95b, 0x094230de, + 0xb4885c10, 0x691e8595, 0x4e6e50a0, 0x93f88925, 0x2e32e5eb, + 0xf3a43c6e, 0x8ed73a36, 0x5341e3b3, 0xee8b8f7d, 0x331d56f8, + 0x13146ee2, 0xce82b767, 0x7348dba9, 0xaede022c, 0xd3ad0474, + 0x0e3bddf1, 0xb3f1b13f, 0x6e6768ba, 0x4917bd8f, 0x9481640a, + 0x294b08c4, 0xf4ddd141, 0x89aed719, 0x54380e9c, 0xe9f26252, + 0x3464bbd7, 0xa713c838, 0x7a8511bd, 0xc74f7d73, 0x1ad9a4f6, + 0x67aaa2ae, 0xba3c7b2b, 0x07f617e5, 0xda60ce60, 0xfd101b55, + 0x2086c2d0, 0x9d4cae1e, 0x40da779b, 0x3da971c3, 0xe03fa846, + 0x5df5c488, 0x80631d0d, 0x1de7b4bc, 0xc0716d39, 0x7dbb01f7, + 0xa02dd872, 0xdd5ede2a, 0x00c807af, 0xbd026b61, 0x6094b2e4, + 0x47e467d1, 0x9a72be54, 0x27b8d29a, 0xfa2e0b1f, 0x875d0d47, + 0x5acbd4c2, 0xe701b80c, 0x3a976189, 0xa9e01266, 0x7476cbe3, + 0xc9bca72d, 0x142a7ea8, 0x695978f0, 0xb4cfa175, 0x0905cdbb, + 0xd493143e, 0xf3e3c10b, 0x2e75188e, 0x93bf7440, 0x4e29adc5, + 0x335aab9d, 0xeecc7218, 0x53061ed6, 0x8e90c753, 0xae99ff49, + 0x730f26cc, 0xcec54a02, 0x13539387, 0x6e2095df, 0xb3b64c5a, + 0x0e7c2094, 0xd3eaf911, 0xf49a2c24, 0x290cf5a1, 0x94c6996f, + 0x495040ea, 0x342346b2, 0xe9b59f37, 0x547ff3f9, 0x89e92a7c, + 0x1a9e5993, 0xc7088016, 0x7ac2ecd8, 0xa754355d, 0xda273305, + 0x07b1ea80, 0xba7b864e, 0x67ed5fcb, 0x409d8afe, 0x9d0b537b, + 0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523, + 0x3dee8ca6}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x85d996dd, 0x4bb55c60, 0xce6ccabd, 0x966ab9c0, + 0x13b32f1d, 0xdddfe5a0, 0x5806737d, 0x6dd3035a, 0xe80a9587, + 0x26665f3a, 0xa3bfc9e7, 0xfbb9ba9a, 0x7e602c47, 0xb00ce6fa, + 0x35d57027, 0xdaa607b4, 0x5f7f9169, 0x91135bd4, 0x14cacd09, + 0x4cccbe74, 0xc91528a9, 0x0779e214, 0x82a074c9, 0xb77504ee, + 0x32ac9233, 0xfcc0588e, 0x7919ce53, 0x211fbd2e, 0xa4c62bf3, + 0x6aaae14e, 0xef737793, 0xf54b7eb3, 0x7092e86e, 0xbefe22d3, + 0x3b27b40e, 0x6321c773, 0xe6f851ae, 0x28949b13, 0xad4d0dce, + 0x98987de9, 0x1d41eb34, 0xd32d2189, 0x56f4b754, 0x0ef2c429, + 0x8b2b52f4, 0x45479849, 0xc09e0e94, 0x2fed7907, 0xaa34efda, + 0x64582567, 0xe181b3ba, 0xb987c0c7, 0x3c5e561a, 0xf2329ca7, + 0x77eb0a7a, 0x423e7a5d, 0xc7e7ec80, 0x098b263d, 0x8c52b0e0, + 0xd454c39d, 0x518d5540, 0x9fe19ffd, 0x1a380920, 0xab918dbd, + 0x2e481b60, 0xe024d1dd, 0x65fd4700, 0x3dfb347d, 0xb822a2a0, + 0x764e681d, 0xf397fec0, 0xc6428ee7, 0x439b183a, 0x8df7d287, + 0x082e445a, 0x50283727, 0xd5f1a1fa, 0x1b9d6b47, 0x9e44fd9a, + 0x71378a09, 0xf4ee1cd4, 0x3a82d669, 0xbf5b40b4, 0xe75d33c9, + 0x6284a514, 0xace86fa9, 0x2931f974, 0x1ce48953, 0x993d1f8e, + 0x5751d533, 0xd28843ee, 0x8a8e3093, 0x0f57a64e, 0xc13b6cf3, + 0x44e2fa2e, 0x5edaf30e, 0xdb0365d3, 0x156faf6e, 0x90b639b3, + 0xc8b04ace, 0x4d69dc13, 0x830516ae, 0x06dc8073, 0x3309f054, + 0xb6d06689, 0x78bcac34, 0xfd653ae9, 0xa5634994, 0x20badf49, + 0xeed615f4, 0x6b0f8329, 0x847cf4ba, 0x01a56267, 0xcfc9a8da, + 0x4a103e07, 0x12164d7a, 0x97cfdba7, 0x59a3111a, 0xdc7a87c7, + 0xe9aff7e0, 0x6c76613d, 0xa21aab80, 0x27c33d5d, 0x7fc54e20, + 0xfa1cd8fd, 0x34701240, 0xb1a9849d, 0x17256aa0, 0x92fcfc7d, + 0x5c9036c0, 0xd949a01d, 0x814fd360, 0x049645bd, 0xcafa8f00, + 0x4f2319dd, 0x7af669fa, 0xff2fff27, 0x3143359a, 0xb49aa347, + 0xec9cd03a, 0x694546e7, 0xa7298c5a, 0x22f01a87, 0xcd836d14, + 0x485afbc9, 0x86363174, 0x03efa7a9, 0x5be9d4d4, 0xde304209, + 0x105c88b4, 0x95851e69, 0xa0506e4e, 0x2589f893, 0xebe5322e, + 0x6e3ca4f3, 0x363ad78e, 0xb3e34153, 0x7d8f8bee, 0xf8561d33, + 0xe26e1413, 0x67b782ce, 0xa9db4873, 0x2c02deae, 0x7404add3, + 0xf1dd3b0e, 0x3fb1f1b3, 0xba68676e, 0x8fbd1749, 0x0a648194, + 0xc4084b29, 0x41d1ddf4, 0x19d7ae89, 0x9c0e3854, 0x5262f2e9, + 0xd7bb6434, 0x38c813a7, 0xbd11857a, 0x737d4fc7, 0xf6a4d91a, + 0xaea2aa67, 0x2b7b3cba, 0xe517f607, 0x60ce60da, 0x551b10fd, + 0xd0c28620, 0x1eae4c9d, 0x9b77da40, 0xc371a93d, 0x46a83fe0, + 0x88c4f55d, 0x0d1d6380, 0xbcb4e71d, 0x396d71c0, 0xf701bb7d, + 0x72d82da0, 0x2ade5edd, 0xaf07c800, 0x616b02bd, 0xe4b29460, + 0xd167e447, 0x54be729a, 0x9ad2b827, 0x1f0b2efa, 0x470d5d87, + 0xc2d4cb5a, 0x0cb801e7, 0x8961973a, 0x6612e0a9, 0xe3cb7674, + 0x2da7bcc9, 0xa87e2a14, 0xf0785969, 0x75a1cfb4, 0xbbcd0509, + 0x3e1493d4, 0x0bc1e3f3, 0x8e18752e, 0x4074bf93, 0xc5ad294e, + 0x9dab5a33, 0x1872ccee, 0xd61e0653, 0x53c7908e, 0x49ff99ae, + 0xcc260f73, 0x024ac5ce, 0x87935313, 0xdf95206e, 0x5a4cb6b3, + 0x94207c0e, 0x11f9ead3, 0x242c9af4, 0xa1f50c29, 0x6f99c694, + 0xea405049, 0xb2462334, 0x379fb5e9, 0xf9f37f54, 0x7c2ae989, + 0x93599e1a, 0x168008c7, 0xd8ecc27a, 0x5d3554a7, 0x053327da, + 0x80eab107, 0x4e867bba, 0xcb5fed67, 0xfe8a9d40, 0x7b530b9d, + 0xb53fc120, 0x30e657fd, 0x68e02480, 0xed39b25d, 0x235578e0, + 0xa68cee3d}, + {0x00000000, 0x76e10f9d, 0xadc46ee1, 0xdb25617c, 0x1b8fac19, + 0x6d6ea384, 0xb64bc2f8, 0xc0aacd65, 0x361e5933, 0x40ff56ae, + 0x9bda37d2, 0xed3b384f, 0x2d91f52a, 0x5b70fab7, 0x80559bcb, + 0xf6b49456, 0x6c3cb266, 0x1addbdfb, 0xc1f8dc87, 0xb719d31a, + 0x77b31e7f, 0x015211e2, 0xda77709e, 0xac967f03, 0x5a22eb55, + 0x2cc3e4c8, 0xf7e685b4, 0x81078a29, 0x41ad474c, 0x374c48d1, + 0xec6929ad, 0x9a882630, 0xd87864cd, 0xae996b50, 0x75bc0a2c, + 0x035d05b1, 0xc3f7c8d4, 0xb516c749, 0x6e33a635, 0x18d2a9a8, + 0xee663dfe, 0x98873263, 0x43a2531f, 0x35435c82, 0xf5e991e7, + 0x83089e7a, 0x582dff06, 0x2eccf09b, 0xb444d6ab, 0xc2a5d936, + 0x1980b84a, 0x6f61b7d7, 0xafcb7ab2, 0xd92a752f, 0x020f1453, + 0x74ee1bce, 0x825a8f98, 0xf4bb8005, 0x2f9ee179, 0x597feee4, + 0x99d52381, 0xef342c1c, 0x34114d60, 0x42f042fd, 0xf1f7b941, + 0x8716b6dc, 0x5c33d7a0, 0x2ad2d83d, 0xea781558, 0x9c991ac5, + 0x47bc7bb9, 0x315d7424, 0xc7e9e072, 0xb108efef, 0x6a2d8e93, + 0x1ccc810e, 0xdc664c6b, 0xaa8743f6, 0x71a2228a, 0x07432d17, + 0x9dcb0b27, 0xeb2a04ba, 0x300f65c6, 0x46ee6a5b, 0x8644a73e, + 0xf0a5a8a3, 0x2b80c9df, 0x5d61c642, 0xabd55214, 0xdd345d89, + 0x06113cf5, 0x70f03368, 0xb05afe0d, 0xc6bbf190, 0x1d9e90ec, + 0x6b7f9f71, 0x298fdd8c, 0x5f6ed211, 0x844bb36d, 0xf2aabcf0, + 0x32007195, 0x44e17e08, 0x9fc41f74, 0xe92510e9, 0x1f9184bf, + 0x69708b22, 0xb255ea5e, 0xc4b4e5c3, 0x041e28a6, 0x72ff273b, + 0xa9da4647, 0xdf3b49da, 0x45b36fea, 0x33526077, 0xe877010b, + 0x9e960e96, 0x5e3cc3f3, 0x28ddcc6e, 0xf3f8ad12, 0x8519a28f, + 0x73ad36d9, 0x054c3944, 0xde695838, 0xa88857a5, 0x68229ac0, + 0x1ec3955d, 0xc5e6f421, 0xb307fbbc, 0xe2ef7383, 0x940e7c1e, + 0x4f2b1d62, 0x39ca12ff, 0xf960df9a, 0x8f81d007, 0x54a4b17b, + 0x2245bee6, 0xd4f12ab0, 0xa210252d, 0x79354451, 0x0fd44bcc, + 0xcf7e86a9, 0xb99f8934, 0x62bae848, 0x145be7d5, 0x8ed3c1e5, + 0xf832ce78, 0x2317af04, 0x55f6a099, 0x955c6dfc, 0xe3bd6261, + 0x3898031d, 0x4e790c80, 0xb8cd98d6, 0xce2c974b, 0x1509f637, + 0x63e8f9aa, 0xa34234cf, 0xd5a33b52, 0x0e865a2e, 0x786755b3, + 0x3a97174e, 0x4c7618d3, 0x975379af, 0xe1b27632, 0x2118bb57, + 0x57f9b4ca, 0x8cdcd5b6, 0xfa3dda2b, 0x0c894e7d, 0x7a6841e0, + 0xa14d209c, 0xd7ac2f01, 0x1706e264, 0x61e7edf9, 0xbac28c85, + 0xcc238318, 0x56aba528, 0x204aaab5, 0xfb6fcbc9, 0x8d8ec454, + 0x4d240931, 0x3bc506ac, 0xe0e067d0, 0x9601684d, 0x60b5fc1b, + 0x1654f386, 0xcd7192fa, 0xbb909d67, 0x7b3a5002, 0x0ddb5f9f, + 0xd6fe3ee3, 0xa01f317e, 0x1318cac2, 0x65f9c55f, 0xbedca423, + 0xc83dabbe, 0x089766db, 0x7e766946, 0xa553083a, 0xd3b207a7, + 0x250693f1, 0x53e79c6c, 0x88c2fd10, 0xfe23f28d, 0x3e893fe8, + 0x48683075, 0x934d5109, 0xe5ac5e94, 0x7f2478a4, 0x09c57739, + 0xd2e01645, 0xa40119d8, 0x64abd4bd, 0x124adb20, 0xc96fba5c, + 0xbf8eb5c1, 0x493a2197, 0x3fdb2e0a, 0xe4fe4f76, 0x921f40eb, + 0x52b58d8e, 0x24548213, 0xff71e36f, 0x8990ecf2, 0xcb60ae0f, + 0xbd81a192, 0x66a4c0ee, 0x1045cf73, 0xd0ef0216, 0xa60e0d8b, + 0x7d2b6cf7, 0x0bca636a, 0xfd7ef73c, 0x8b9ff8a1, 0x50ba99dd, + 0x265b9640, 0xe6f15b25, 0x901054b8, 0x4b3535c4, 0x3dd43a59, + 0xa75c1c69, 0xd1bd13f4, 0x0a987288, 0x7c797d15, 0xbcd3b070, + 0xca32bfed, 0x1117de91, 0x67f6d10c, 0x9142455a, 0xe7a34ac7, + 0x3c862bbb, 0x4a672426, 0x8acde943, 0xfc2ce6de, 0x270987a2, + 0x51e8883f}, + {0x00000000, 0xe8dbfbb9, 0x91b186a8, 0x796a7d11, 0x63657c8a, + 0x8bbe8733, 0xf2d4fa22, 0x1a0f019b, 0x87cc89cf, 0x6f177276, + 0x167d0f67, 0xfea6f4de, 0xe4a9f545, 0x0c720efc, 0x751873ed, + 0x9dc38854, 0x4f9f6244, 0xa74499fd, 0xde2ee4ec, 0x36f51f55, + 0x2cfa1ece, 0xc421e577, 0xbd4b9866, 0x559063df, 0xc853eb8b, + 0x20881032, 0x59e26d23, 0xb139969a, 0xab369701, 0x43ed6cb8, + 0x3a8711a9, 0xd25cea10, 0x9e3ec588, 0x76e53e31, 0x0f8f4320, + 0xe754b899, 0xfd5bb902, 0x158042bb, 0x6cea3faa, 0x8431c413, + 0x19f24c47, 0xf129b7fe, 0x8843caef, 0x60983156, 0x7a9730cd, + 0x924ccb74, 0xeb26b665, 0x03fd4ddc, 0xd1a1a7cc, 0x397a5c75, + 0x40102164, 0xa8cbdadd, 0xb2c4db46, 0x5a1f20ff, 0x23755dee, + 0xcbaea657, 0x566d2e03, 0xbeb6d5ba, 0xc7dca8ab, 0x2f075312, + 0x35085289, 0xddd3a930, 0xa4b9d421, 0x4c622f98, 0x7d7bfbca, + 0x95a00073, 0xecca7d62, 0x041186db, 0x1e1e8740, 0xf6c57cf9, + 0x8faf01e8, 0x6774fa51, 0xfab77205, 0x126c89bc, 0x6b06f4ad, + 0x83dd0f14, 0x99d20e8f, 0x7109f536, 0x08638827, 0xe0b8739e, + 0x32e4998e, 0xda3f6237, 0xa3551f26, 0x4b8ee49f, 0x5181e504, + 0xb95a1ebd, 0xc03063ac, 0x28eb9815, 0xb5281041, 0x5df3ebf8, + 0x249996e9, 0xcc426d50, 0xd64d6ccb, 0x3e969772, 0x47fcea63, + 0xaf2711da, 0xe3453e42, 0x0b9ec5fb, 0x72f4b8ea, 0x9a2f4353, + 0x802042c8, 0x68fbb971, 0x1191c460, 0xf94a3fd9, 0x6489b78d, + 0x8c524c34, 0xf5383125, 0x1de3ca9c, 0x07eccb07, 0xef3730be, + 0x965d4daf, 0x7e86b616, 0xacda5c06, 0x4401a7bf, 0x3d6bdaae, + 0xd5b02117, 0xcfbf208c, 0x2764db35, 0x5e0ea624, 0xb6d55d9d, + 0x2b16d5c9, 0xc3cd2e70, 0xbaa75361, 0x527ca8d8, 0x4873a943, + 0xa0a852fa, 0xd9c22feb, 0x3119d452, 0xbbf0874e, 0x532b7cf7, + 0x2a4101e6, 0xc29afa5f, 0xd895fbc4, 0x304e007d, 0x49247d6c, + 0xa1ff86d5, 0x3c3c0e81, 0xd4e7f538, 0xad8d8829, 0x45567390, + 0x5f59720b, 0xb78289b2, 0xcee8f4a3, 0x26330f1a, 0xf46fe50a, + 0x1cb41eb3, 0x65de63a2, 0x8d05981b, 0x970a9980, 0x7fd16239, + 0x06bb1f28, 0xee60e491, 0x73a36cc5, 0x9b78977c, 0xe212ea6d, + 0x0ac911d4, 0x10c6104f, 0xf81debf6, 0x817796e7, 0x69ac6d5e, + 0x25ce42c6, 0xcd15b97f, 0xb47fc46e, 0x5ca43fd7, 0x46ab3e4c, + 0xae70c5f5, 0xd71ab8e4, 0x3fc1435d, 0xa202cb09, 0x4ad930b0, + 0x33b34da1, 0xdb68b618, 0xc167b783, 0x29bc4c3a, 0x50d6312b, + 0xb80dca92, 0x6a512082, 0x828adb3b, 0xfbe0a62a, 0x133b5d93, + 0x09345c08, 0xe1efa7b1, 0x9885daa0, 0x705e2119, 0xed9da94d, + 0x054652f4, 0x7c2c2fe5, 0x94f7d45c, 0x8ef8d5c7, 0x66232e7e, + 0x1f49536f, 0xf792a8d6, 0xc68b7c84, 0x2e50873d, 0x573afa2c, + 0xbfe10195, 0xa5ee000e, 0x4d35fbb7, 0x345f86a6, 0xdc847d1f, + 0x4147f54b, 0xa99c0ef2, 0xd0f673e3, 0x382d885a, 0x222289c1, + 0xcaf97278, 0xb3930f69, 0x5b48f4d0, 0x89141ec0, 0x61cfe579, + 0x18a59868, 0xf07e63d1, 0xea71624a, 0x02aa99f3, 0x7bc0e4e2, + 0x931b1f5b, 0x0ed8970f, 0xe6036cb6, 0x9f6911a7, 0x77b2ea1e, + 0x6dbdeb85, 0x8566103c, 0xfc0c6d2d, 0x14d79694, 0x58b5b90c, + 0xb06e42b5, 0xc9043fa4, 0x21dfc41d, 0x3bd0c586, 0xd30b3e3f, + 0xaa61432e, 0x42bab897, 0xdf7930c3, 0x37a2cb7a, 0x4ec8b66b, + 0xa6134dd2, 0xbc1c4c49, 0x54c7b7f0, 0x2dadcae1, 0xc5763158, + 0x172adb48, 0xfff120f1, 0x869b5de0, 0x6e40a659, 0x744fa7c2, + 0x9c945c7b, 0xe5fe216a, 0x0d25dad3, 0x90e65287, 0x783da93e, + 0x0157d42f, 0xe98c2f96, 0xf3832e0d, 0x1b58d5b4, 0x6232a8a5, + 0x8ae9531c}, + {0x00000000, 0x919168ae, 0x6325a087, 0xf2b4c829, 0x874c31d4, + 0x16dd597a, 0xe4699153, 0x75f8f9fd, 0x4f9f1373, 0xde0e7bdd, + 0x2cbab3f4, 0xbd2bdb5a, 0xc8d322a7, 0x59424a09, 0xabf68220, + 0x3a67ea8e, 0x9e3e27e6, 0x0faf4f48, 0xfd1b8761, 0x6c8aefcf, + 0x19721632, 0x88e37e9c, 0x7a57b6b5, 0xebc6de1b, 0xd1a13495, + 0x40305c3b, 0xb2849412, 0x2315fcbc, 0x56ed0541, 0xc77c6def, + 0x35c8a5c6, 0xa459cd68, 0x7d7b3f17, 0xecea57b9, 0x1e5e9f90, + 0x8fcff73e, 0xfa370ec3, 0x6ba6666d, 0x9912ae44, 0x0883c6ea, + 0x32e42c64, 0xa37544ca, 0x51c18ce3, 0xc050e44d, 0xb5a81db0, + 0x2439751e, 0xd68dbd37, 0x471cd599, 0xe34518f1, 0x72d4705f, + 0x8060b876, 0x11f1d0d8, 0x64092925, 0xf598418b, 0x072c89a2, + 0x96bde10c, 0xacda0b82, 0x3d4b632c, 0xcfffab05, 0x5e6ec3ab, + 0x2b963a56, 0xba0752f8, 0x48b39ad1, 0xd922f27f, 0xfaf67e2e, + 0x6b671680, 0x99d3dea9, 0x0842b607, 0x7dba4ffa, 0xec2b2754, + 0x1e9fef7d, 0x8f0e87d3, 0xb5696d5d, 0x24f805f3, 0xd64ccdda, + 0x47dda574, 0x32255c89, 0xa3b43427, 0x5100fc0e, 0xc09194a0, + 0x64c859c8, 0xf5593166, 0x07edf94f, 0x967c91e1, 0xe384681c, + 0x721500b2, 0x80a1c89b, 0x1130a035, 0x2b574abb, 0xbac62215, + 0x4872ea3c, 0xd9e38292, 0xac1b7b6f, 0x3d8a13c1, 0xcf3edbe8, + 0x5eafb346, 0x878d4139, 0x161c2997, 0xe4a8e1be, 0x75398910, + 0x00c170ed, 0x91501843, 0x63e4d06a, 0xf275b8c4, 0xc812524a, + 0x59833ae4, 0xab37f2cd, 0x3aa69a63, 0x4f5e639e, 0xdecf0b30, + 0x2c7bc319, 0xbdeaabb7, 0x19b366df, 0x88220e71, 0x7a96c658, + 0xeb07aef6, 0x9eff570b, 0x0f6e3fa5, 0xfddaf78c, 0x6c4b9f22, + 0x562c75ac, 0xc7bd1d02, 0x3509d52b, 0xa498bd85, 0xd1604478, + 0x40f12cd6, 0xb245e4ff, 0x23d48c51, 0xf4edfd5c, 0x657c95f2, + 0x97c85ddb, 0x06593575, 0x73a1cc88, 0xe230a426, 0x10846c0f, + 0x811504a1, 0xbb72ee2f, 0x2ae38681, 0xd8574ea8, 0x49c62606, + 0x3c3edffb, 0xadafb755, 0x5f1b7f7c, 0xce8a17d2, 0x6ad3daba, + 0xfb42b214, 0x09f67a3d, 0x98671293, 0xed9feb6e, 0x7c0e83c0, + 0x8eba4be9, 0x1f2b2347, 0x254cc9c9, 0xb4dda167, 0x4669694e, + 0xd7f801e0, 0xa200f81d, 0x339190b3, 0xc125589a, 0x50b43034, + 0x8996c24b, 0x1807aae5, 0xeab362cc, 0x7b220a62, 0x0edaf39f, + 0x9f4b9b31, 0x6dff5318, 0xfc6e3bb6, 0xc609d138, 0x5798b996, + 0xa52c71bf, 0x34bd1911, 0x4145e0ec, 0xd0d48842, 0x2260406b, + 0xb3f128c5, 0x17a8e5ad, 0x86398d03, 0x748d452a, 0xe51c2d84, + 0x90e4d479, 0x0175bcd7, 0xf3c174fe, 0x62501c50, 0x5837f6de, + 0xc9a69e70, 0x3b125659, 0xaa833ef7, 0xdf7bc70a, 0x4eeaafa4, + 0xbc5e678d, 0x2dcf0f23, 0x0e1b8372, 0x9f8aebdc, 0x6d3e23f5, + 0xfcaf4b5b, 0x8957b2a6, 0x18c6da08, 0xea721221, 0x7be37a8f, + 0x41849001, 0xd015f8af, 0x22a13086, 0xb3305828, 0xc6c8a1d5, + 0x5759c97b, 0xa5ed0152, 0x347c69fc, 0x9025a494, 0x01b4cc3a, + 0xf3000413, 0x62916cbd, 0x17699540, 0x86f8fdee, 0x744c35c7, + 0xe5dd5d69, 0xdfbab7e7, 0x4e2bdf49, 0xbc9f1760, 0x2d0e7fce, + 0x58f68633, 0xc967ee9d, 0x3bd326b4, 0xaa424e1a, 0x7360bc65, + 0xe2f1d4cb, 0x10451ce2, 0x81d4744c, 0xf42c8db1, 0x65bde51f, + 0x97092d36, 0x06984598, 0x3cffaf16, 0xad6ec7b8, 0x5fda0f91, + 0xce4b673f, 0xbbb39ec2, 0x2a22f66c, 0xd8963e45, 0x490756eb, + 0xed5e9b83, 0x7ccff32d, 0x8e7b3b04, 0x1fea53aa, 0x6a12aa57, + 0xfb83c2f9, 0x09370ad0, 0x98a6627e, 0xa2c188f0, 0x3350e05e, + 0xc1e42877, 0x507540d9, 0x258db924, 0xb41cd18a, 0x46a819a3, + 0xd739710d}}; + +#endif + +#endif + +#if N == 5 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xaf449247, 0x85f822cf, 0x2abcb088, 0xd08143df, + 0x7fc5d198, 0x55796110, 0xfa3df357, 0x7a7381ff, 0xd53713b8, + 0xff8ba330, 0x50cf3177, 0xaaf2c220, 0x05b65067, 0x2f0ae0ef, + 0x804e72a8, 0xf4e703fe, 0x5ba391b9, 0x711f2131, 0xde5bb376, + 0x24664021, 0x8b22d266, 0xa19e62ee, 0x0edaf0a9, 0x8e948201, + 0x21d01046, 0x0b6ca0ce, 0xa4283289, 0x5e15c1de, 0xf1515399, + 0xdbede311, 0x74a97156, 0x32bf01bd, 0x9dfb93fa, 0xb7472372, + 0x1803b135, 0xe23e4262, 0x4d7ad025, 0x67c660ad, 0xc882f2ea, + 0x48cc8042, 0xe7881205, 0xcd34a28d, 0x627030ca, 0x984dc39d, + 0x370951da, 0x1db5e152, 0xb2f17315, 0xc6580243, 0x691c9004, + 0x43a0208c, 0xece4b2cb, 0x16d9419c, 0xb99dd3db, 0x93216353, + 0x3c65f114, 0xbc2b83bc, 0x136f11fb, 0x39d3a173, 0x96973334, + 0x6caac063, 0xc3ee5224, 0xe952e2ac, 0x461670eb, 0x657e037a, + 0xca3a913d, 0xe08621b5, 0x4fc2b3f2, 0xb5ff40a5, 0x1abbd2e2, + 0x3007626a, 0x9f43f02d, 0x1f0d8285, 0xb04910c2, 0x9af5a04a, + 0x35b1320d, 0xcf8cc15a, 0x60c8531d, 0x4a74e395, 0xe53071d2, + 0x91990084, 0x3edd92c3, 0x1461224b, 0xbb25b00c, 0x4118435b, + 0xee5cd11c, 0xc4e06194, 0x6ba4f3d3, 0xebea817b, 0x44ae133c, + 0x6e12a3b4, 0xc15631f3, 0x3b6bc2a4, 0x942f50e3, 0xbe93e06b, + 0x11d7722c, 0x57c102c7, 0xf8859080, 0xd2392008, 0x7d7db24f, + 0x87404118, 0x2804d35f, 0x02b863d7, 0xadfcf190, 0x2db28338, + 0x82f6117f, 0xa84aa1f7, 0x070e33b0, 0xfd33c0e7, 0x527752a0, + 0x78cbe228, 0xd78f706f, 0xa3260139, 0x0c62937e, 0x26de23f6, + 0x899ab1b1, 0x73a742e6, 0xdce3d0a1, 0xf65f6029, 0x591bf26e, + 0xd95580c6, 0x76111281, 0x5cada209, 0xf3e9304e, 0x09d4c319, + 0xa690515e, 0x8c2ce1d6, 0x23687391, 0xcafc06f4, 0x65b894b3, + 0x4f04243b, 0xe040b67c, 0x1a7d452b, 0xb539d76c, 0x9f8567e4, + 0x30c1f5a3, 0xb08f870b, 0x1fcb154c, 0x3577a5c4, 0x9a333783, + 0x600ec4d4, 0xcf4a5693, 0xe5f6e61b, 0x4ab2745c, 0x3e1b050a, + 0x915f974d, 0xbbe327c5, 0x14a7b582, 0xee9a46d5, 0x41ded492, + 0x6b62641a, 0xc426f65d, 0x446884f5, 0xeb2c16b2, 0xc190a63a, + 0x6ed4347d, 0x94e9c72a, 0x3bad556d, 0x1111e5e5, 0xbe5577a2, + 0xf8430749, 0x5707950e, 0x7dbb2586, 0xd2ffb7c1, 0x28c24496, + 0x8786d6d1, 0xad3a6659, 0x027ef41e, 0x823086b6, 0x2d7414f1, + 0x07c8a479, 0xa88c363e, 0x52b1c569, 0xfdf5572e, 0xd749e7a6, + 0x780d75e1, 0x0ca404b7, 0xa3e096f0, 0x895c2678, 0x2618b43f, + 0xdc254768, 0x7361d52f, 0x59dd65a7, 0xf699f7e0, 0x76d78548, + 0xd993170f, 0xf32fa787, 0x5c6b35c0, 0xa656c697, 0x091254d0, + 0x23aee458, 0x8cea761f, 0xaf82058e, 0x00c697c9, 0x2a7a2741, + 0x853eb506, 0x7f034651, 0xd047d416, 0xfafb649e, 0x55bff6d9, + 0xd5f18471, 0x7ab51636, 0x5009a6be, 0xff4d34f9, 0x0570c7ae, + 0xaa3455e9, 0x8088e561, 0x2fcc7726, 0x5b650670, 0xf4219437, + 0xde9d24bf, 0x71d9b6f8, 0x8be445af, 0x24a0d7e8, 0x0e1c6760, + 0xa158f527, 0x2116878f, 0x8e5215c8, 0xa4eea540, 0x0baa3707, + 0xf197c450, 0x5ed35617, 0x746fe69f, 0xdb2b74d8, 0x9d3d0433, + 0x32799674, 0x18c526fc, 0xb781b4bb, 0x4dbc47ec, 0xe2f8d5ab, + 0xc8446523, 0x6700f764, 0xe74e85cc, 0x480a178b, 0x62b6a703, + 0xcdf23544, 0x37cfc613, 0x988b5454, 0xb237e4dc, 0x1d73769b, + 0x69da07cd, 0xc69e958a, 0xec222502, 0x4366b745, 0xb95b4412, + 0x161fd655, 0x3ca366dd, 0x93e7f49a, 0x13a98632, 0xbced1475, + 0x9651a4fd, 0x391536ba, 0xc328c5ed, 0x6c6c57aa, 0x46d0e722, + 0xe9947565}, + {0x00000000, 0x4e890ba9, 0x9d121752, 0xd39b1cfb, 0xe15528e5, + 0xafdc234c, 0x7c473fb7, 0x32ce341e, 0x19db578b, 0x57525c22, + 0x84c940d9, 0xca404b70, 0xf88e7f6e, 0xb60774c7, 0x659c683c, + 0x2b156395, 0x33b6af16, 0x7d3fa4bf, 0xaea4b844, 0xe02db3ed, + 0xd2e387f3, 0x9c6a8c5a, 0x4ff190a1, 0x01789b08, 0x2a6df89d, + 0x64e4f334, 0xb77fefcf, 0xf9f6e466, 0xcb38d078, 0x85b1dbd1, + 0x562ac72a, 0x18a3cc83, 0x676d5e2c, 0x29e45585, 0xfa7f497e, + 0xb4f642d7, 0x863876c9, 0xc8b17d60, 0x1b2a619b, 0x55a36a32, + 0x7eb609a7, 0x303f020e, 0xe3a41ef5, 0xad2d155c, 0x9fe32142, + 0xd16a2aeb, 0x02f13610, 0x4c783db9, 0x54dbf13a, 0x1a52fa93, + 0xc9c9e668, 0x8740edc1, 0xb58ed9df, 0xfb07d276, 0x289cce8d, + 0x6615c524, 0x4d00a6b1, 0x0389ad18, 0xd012b1e3, 0x9e9bba4a, + 0xac558e54, 0xe2dc85fd, 0x31479906, 0x7fce92af, 0xcedabc58, + 0x8053b7f1, 0x53c8ab0a, 0x1d41a0a3, 0x2f8f94bd, 0x61069f14, + 0xb29d83ef, 0xfc148846, 0xd701ebd3, 0x9988e07a, 0x4a13fc81, + 0x049af728, 0x3654c336, 0x78ddc89f, 0xab46d464, 0xe5cfdfcd, + 0xfd6c134e, 0xb3e518e7, 0x607e041c, 0x2ef70fb5, 0x1c393bab, + 0x52b03002, 0x812b2cf9, 0xcfa22750, 0xe4b744c5, 0xaa3e4f6c, + 0x79a55397, 0x372c583e, 0x05e26c20, 0x4b6b6789, 0x98f07b72, + 0xd67970db, 0xa9b7e274, 0xe73ee9dd, 0x34a5f526, 0x7a2cfe8f, + 0x48e2ca91, 0x066bc138, 0xd5f0ddc3, 0x9b79d66a, 0xb06cb5ff, + 0xfee5be56, 0x2d7ea2ad, 0x63f7a904, 0x51399d1a, 0x1fb096b3, + 0xcc2b8a48, 0x82a281e1, 0x9a014d62, 0xd48846cb, 0x07135a30, + 0x499a5199, 0x7b546587, 0x35dd6e2e, 0xe64672d5, 0xa8cf797c, + 0x83da1ae9, 0xcd531140, 0x1ec80dbb, 0x50410612, 0x628f320c, + 0x2c0639a5, 0xff9d255e, 0xb1142ef7, 0x46c47ef1, 0x084d7558, + 0xdbd669a3, 0x955f620a, 0xa7915614, 0xe9185dbd, 0x3a834146, + 0x740a4aef, 0x5f1f297a, 0x119622d3, 0xc20d3e28, 0x8c843581, + 0xbe4a019f, 0xf0c30a36, 0x235816cd, 0x6dd11d64, 0x7572d1e7, + 0x3bfbda4e, 0xe860c6b5, 0xa6e9cd1c, 0x9427f902, 0xdaaef2ab, + 0x0935ee50, 0x47bce5f9, 0x6ca9866c, 0x22208dc5, 0xf1bb913e, + 0xbf329a97, 0x8dfcae89, 0xc375a520, 0x10eeb9db, 0x5e67b272, + 0x21a920dd, 0x6f202b74, 0xbcbb378f, 0xf2323c26, 0xc0fc0838, + 0x8e750391, 0x5dee1f6a, 0x136714c3, 0x38727756, 0x76fb7cff, + 0xa5606004, 0xebe96bad, 0xd9275fb3, 0x97ae541a, 0x443548e1, + 0x0abc4348, 0x121f8fcb, 0x5c968462, 0x8f0d9899, 0xc1849330, + 0xf34aa72e, 0xbdc3ac87, 0x6e58b07c, 0x20d1bbd5, 0x0bc4d840, + 0x454dd3e9, 0x96d6cf12, 0xd85fc4bb, 0xea91f0a5, 0xa418fb0c, + 0x7783e7f7, 0x390aec5e, 0x881ec2a9, 0xc697c900, 0x150cd5fb, + 0x5b85de52, 0x694bea4c, 0x27c2e1e5, 0xf459fd1e, 0xbad0f6b7, + 0x91c59522, 0xdf4c9e8b, 0x0cd78270, 0x425e89d9, 0x7090bdc7, + 0x3e19b66e, 0xed82aa95, 0xa30ba13c, 0xbba86dbf, 0xf5216616, + 0x26ba7aed, 0x68337144, 0x5afd455a, 0x14744ef3, 0xc7ef5208, + 0x896659a1, 0xa2733a34, 0xecfa319d, 0x3f612d66, 0x71e826cf, + 0x432612d1, 0x0daf1978, 0xde340583, 0x90bd0e2a, 0xef739c85, + 0xa1fa972c, 0x72618bd7, 0x3ce8807e, 0x0e26b460, 0x40afbfc9, + 0x9334a332, 0xddbda89b, 0xf6a8cb0e, 0xb821c0a7, 0x6bbadc5c, + 0x2533d7f5, 0x17fde3eb, 0x5974e842, 0x8aeff4b9, 0xc466ff10, + 0xdcc53393, 0x924c383a, 0x41d724c1, 0x0f5e2f68, 0x3d901b76, + 0x731910df, 0xa0820c24, 0xee0b078d, 0xc51e6418, 0x8b976fb1, + 0x580c734a, 0x168578e3, 0x244b4cfd, 0x6ac24754, 0xb9595baf, + 0xf7d05006}, + {0x00000000, 0x8d88fde2, 0xc060fd85, 0x4de80067, 0x5bb0fd4b, + 0xd63800a9, 0x9bd000ce, 0x1658fd2c, 0xb761fa96, 0x3ae90774, + 0x77010713, 0xfa89faf1, 0xecd107dd, 0x6159fa3f, 0x2cb1fa58, + 0xa13907ba, 0xb5b2f36d, 0x383a0e8f, 0x75d20ee8, 0xf85af30a, + 0xee020e26, 0x638af3c4, 0x2e62f3a3, 0xa3ea0e41, 0x02d309fb, + 0x8f5bf419, 0xc2b3f47e, 0x4f3b099c, 0x5963f4b0, 0xd4eb0952, + 0x99030935, 0x148bf4d7, 0xb014e09b, 0x3d9c1d79, 0x70741d1e, + 0xfdfce0fc, 0xeba41dd0, 0x662ce032, 0x2bc4e055, 0xa64c1db7, + 0x07751a0d, 0x8afde7ef, 0xc715e788, 0x4a9d1a6a, 0x5cc5e746, + 0xd14d1aa4, 0x9ca51ac3, 0x112de721, 0x05a613f6, 0x882eee14, + 0xc5c6ee73, 0x484e1391, 0x5e16eebd, 0xd39e135f, 0x9e761338, + 0x13feeeda, 0xb2c7e960, 0x3f4f1482, 0x72a714e5, 0xff2fe907, + 0xe977142b, 0x64ffe9c9, 0x2917e9ae, 0xa49f144c, 0xbb58c777, + 0x36d03a95, 0x7b383af2, 0xf6b0c710, 0xe0e83a3c, 0x6d60c7de, + 0x2088c7b9, 0xad003a5b, 0x0c393de1, 0x81b1c003, 0xcc59c064, + 0x41d13d86, 0x5789c0aa, 0xda013d48, 0x97e93d2f, 0x1a61c0cd, + 0x0eea341a, 0x8362c9f8, 0xce8ac99f, 0x4302347d, 0x555ac951, + 0xd8d234b3, 0x953a34d4, 0x18b2c936, 0xb98bce8c, 0x3403336e, + 0x79eb3309, 0xf463ceeb, 0xe23b33c7, 0x6fb3ce25, 0x225bce42, + 0xafd333a0, 0x0b4c27ec, 0x86c4da0e, 0xcb2cda69, 0x46a4278b, + 0x50fcdaa7, 0xdd742745, 0x909c2722, 0x1d14dac0, 0xbc2ddd7a, + 0x31a52098, 0x7c4d20ff, 0xf1c5dd1d, 0xe79d2031, 0x6a15ddd3, + 0x27fdddb4, 0xaa752056, 0xbefed481, 0x33762963, 0x7e9e2904, + 0xf316d4e6, 0xe54e29ca, 0x68c6d428, 0x252ed44f, 0xa8a629ad, + 0x099f2e17, 0x8417d3f5, 0xc9ffd392, 0x44772e70, 0x522fd35c, + 0xdfa72ebe, 0x924f2ed9, 0x1fc7d33b, 0xadc088af, 0x2048754d, + 0x6da0752a, 0xe02888c8, 0xf67075e4, 0x7bf88806, 0x36108861, + 0xbb987583, 0x1aa17239, 0x97298fdb, 0xdac18fbc, 0x5749725e, + 0x41118f72, 0xcc997290, 0x817172f7, 0x0cf98f15, 0x18727bc2, + 0x95fa8620, 0xd8128647, 0x559a7ba5, 0x43c28689, 0xce4a7b6b, + 0x83a27b0c, 0x0e2a86ee, 0xaf138154, 0x229b7cb6, 0x6f737cd1, + 0xe2fb8133, 0xf4a37c1f, 0x792b81fd, 0x34c3819a, 0xb94b7c78, + 0x1dd46834, 0x905c95d6, 0xddb495b1, 0x503c6853, 0x4664957f, + 0xcbec689d, 0x860468fa, 0x0b8c9518, 0xaab592a2, 0x273d6f40, + 0x6ad56f27, 0xe75d92c5, 0xf1056fe9, 0x7c8d920b, 0x3165926c, + 0xbced6f8e, 0xa8669b59, 0x25ee66bb, 0x680666dc, 0xe58e9b3e, + 0xf3d66612, 0x7e5e9bf0, 0x33b69b97, 0xbe3e6675, 0x1f0761cf, + 0x928f9c2d, 0xdf679c4a, 0x52ef61a8, 0x44b79c84, 0xc93f6166, + 0x84d76101, 0x095f9ce3, 0x16984fd8, 0x9b10b23a, 0xd6f8b25d, + 0x5b704fbf, 0x4d28b293, 0xc0a04f71, 0x8d484f16, 0x00c0b2f4, + 0xa1f9b54e, 0x2c7148ac, 0x619948cb, 0xec11b529, 0xfa494805, + 0x77c1b5e7, 0x3a29b580, 0xb7a14862, 0xa32abcb5, 0x2ea24157, + 0x634a4130, 0xeec2bcd2, 0xf89a41fe, 0x7512bc1c, 0x38fabc7b, + 0xb5724199, 0x144b4623, 0x99c3bbc1, 0xd42bbba6, 0x59a34644, + 0x4ffbbb68, 0xc273468a, 0x8f9b46ed, 0x0213bb0f, 0xa68caf43, + 0x2b0452a1, 0x66ec52c6, 0xeb64af24, 0xfd3c5208, 0x70b4afea, + 0x3d5caf8d, 0xb0d4526f, 0x11ed55d5, 0x9c65a837, 0xd18da850, + 0x5c0555b2, 0x4a5da89e, 0xc7d5557c, 0x8a3d551b, 0x07b5a8f9, + 0x133e5c2e, 0x9eb6a1cc, 0xd35ea1ab, 0x5ed65c49, 0x488ea165, + 0xc5065c87, 0x88ee5ce0, 0x0566a102, 0xa45fa6b8, 0x29d75b5a, + 0x643f5b3d, 0xe9b7a6df, 0xffef5bf3, 0x7267a611, 0x3f8fa676, + 0xb2075b94}, + {0x00000000, 0x80f0171f, 0xda91287f, 0x5a613f60, 0x6e5356bf, + 0xeea341a0, 0xb4c27ec0, 0x343269df, 0xdca6ad7e, 0x5c56ba61, + 0x06378501, 0x86c7921e, 0xb2f5fbc1, 0x3205ecde, 0x6864d3be, + 0xe894c4a1, 0x623c5cbd, 0xe2cc4ba2, 0xb8ad74c2, 0x385d63dd, + 0x0c6f0a02, 0x8c9f1d1d, 0xd6fe227d, 0x560e3562, 0xbe9af1c3, + 0x3e6ae6dc, 0x640bd9bc, 0xe4fbcea3, 0xd0c9a77c, 0x5039b063, + 0x0a588f03, 0x8aa8981c, 0xc478b97a, 0x4488ae65, 0x1ee99105, + 0x9e19861a, 0xaa2befc5, 0x2adbf8da, 0x70bac7ba, 0xf04ad0a5, + 0x18de1404, 0x982e031b, 0xc24f3c7b, 0x42bf2b64, 0x768d42bb, + 0xf67d55a4, 0xac1c6ac4, 0x2cec7ddb, 0xa644e5c7, 0x26b4f2d8, + 0x7cd5cdb8, 0xfc25daa7, 0xc817b378, 0x48e7a467, 0x12869b07, + 0x92768c18, 0x7ae248b9, 0xfa125fa6, 0xa07360c6, 0x208377d9, + 0x14b11e06, 0x94410919, 0xce203679, 0x4ed02166, 0x538074b5, + 0xd37063aa, 0x89115cca, 0x09e14bd5, 0x3dd3220a, 0xbd233515, + 0xe7420a75, 0x67b21d6a, 0x8f26d9cb, 0x0fd6ced4, 0x55b7f1b4, + 0xd547e6ab, 0xe1758f74, 0x6185986b, 0x3be4a70b, 0xbb14b014, + 0x31bc2808, 0xb14c3f17, 0xeb2d0077, 0x6bdd1768, 0x5fef7eb7, + 0xdf1f69a8, 0x857e56c8, 0x058e41d7, 0xed1a8576, 0x6dea9269, + 0x378bad09, 0xb77bba16, 0x8349d3c9, 0x03b9c4d6, 0x59d8fbb6, + 0xd928eca9, 0x97f8cdcf, 0x1708dad0, 0x4d69e5b0, 0xcd99f2af, + 0xf9ab9b70, 0x795b8c6f, 0x233ab30f, 0xa3caa410, 0x4b5e60b1, + 0xcbae77ae, 0x91cf48ce, 0x113f5fd1, 0x250d360e, 0xa5fd2111, + 0xff9c1e71, 0x7f6c096e, 0xf5c49172, 0x7534866d, 0x2f55b90d, + 0xafa5ae12, 0x9b97c7cd, 0x1b67d0d2, 0x4106efb2, 0xc1f6f8ad, + 0x29623c0c, 0xa9922b13, 0xf3f31473, 0x7303036c, 0x47316ab3, + 0xc7c17dac, 0x9da042cc, 0x1d5055d3, 0xa700e96a, 0x27f0fe75, + 0x7d91c115, 0xfd61d60a, 0xc953bfd5, 0x49a3a8ca, 0x13c297aa, + 0x933280b5, 0x7ba64414, 0xfb56530b, 0xa1376c6b, 0x21c77b74, + 0x15f512ab, 0x950505b4, 0xcf643ad4, 0x4f942dcb, 0xc53cb5d7, + 0x45cca2c8, 0x1fad9da8, 0x9f5d8ab7, 0xab6fe368, 0x2b9ff477, + 0x71fecb17, 0xf10edc08, 0x199a18a9, 0x996a0fb6, 0xc30b30d6, + 0x43fb27c9, 0x77c94e16, 0xf7395909, 0xad586669, 0x2da87176, + 0x63785010, 0xe388470f, 0xb9e9786f, 0x39196f70, 0x0d2b06af, + 0x8ddb11b0, 0xd7ba2ed0, 0x574a39cf, 0xbfdefd6e, 0x3f2eea71, + 0x654fd511, 0xe5bfc20e, 0xd18dabd1, 0x517dbcce, 0x0b1c83ae, + 0x8bec94b1, 0x01440cad, 0x81b41bb2, 0xdbd524d2, 0x5b2533cd, + 0x6f175a12, 0xefe74d0d, 0xb586726d, 0x35766572, 0xdde2a1d3, + 0x5d12b6cc, 0x077389ac, 0x87839eb3, 0xb3b1f76c, 0x3341e073, + 0x6920df13, 0xe9d0c80c, 0xf4809ddf, 0x74708ac0, 0x2e11b5a0, + 0xaee1a2bf, 0x9ad3cb60, 0x1a23dc7f, 0x4042e31f, 0xc0b2f400, + 0x282630a1, 0xa8d627be, 0xf2b718de, 0x72470fc1, 0x4675661e, + 0xc6857101, 0x9ce44e61, 0x1c14597e, 0x96bcc162, 0x164cd67d, + 0x4c2de91d, 0xccddfe02, 0xf8ef97dd, 0x781f80c2, 0x227ebfa2, + 0xa28ea8bd, 0x4a1a6c1c, 0xcaea7b03, 0x908b4463, 0x107b537c, + 0x24493aa3, 0xa4b92dbc, 0xfed812dc, 0x7e2805c3, 0x30f824a5, + 0xb00833ba, 0xea690cda, 0x6a991bc5, 0x5eab721a, 0xde5b6505, + 0x843a5a65, 0x04ca4d7a, 0xec5e89db, 0x6cae9ec4, 0x36cfa1a4, + 0xb63fb6bb, 0x820ddf64, 0x02fdc87b, 0x589cf71b, 0xd86ce004, + 0x52c47818, 0xd2346f07, 0x88555067, 0x08a54778, 0x3c972ea7, + 0xbc6739b8, 0xe60606d8, 0x66f611c7, 0x8e62d566, 0x0e92c279, + 0x54f3fd19, 0xd403ea06, 0xe03183d9, 0x60c194c6, 0x3aa0aba6, + 0xba50bcb9}, + {0x00000000, 0x9570d495, 0xf190af6b, 0x64e07bfe, 0x38505897, + 0xad208c02, 0xc9c0f7fc, 0x5cb02369, 0x70a0b12e, 0xe5d065bb, + 0x81301e45, 0x1440cad0, 0x48f0e9b9, 0xdd803d2c, 0xb96046d2, + 0x2c109247, 0xe141625c, 0x7431b6c9, 0x10d1cd37, 0x85a119a2, + 0xd9113acb, 0x4c61ee5e, 0x288195a0, 0xbdf14135, 0x91e1d372, + 0x049107e7, 0x60717c19, 0xf501a88c, 0xa9b18be5, 0x3cc15f70, + 0x5821248e, 0xcd51f01b, 0x19f3c2f9, 0x8c83166c, 0xe8636d92, + 0x7d13b907, 0x21a39a6e, 0xb4d34efb, 0xd0333505, 0x4543e190, + 0x695373d7, 0xfc23a742, 0x98c3dcbc, 0x0db30829, 0x51032b40, + 0xc473ffd5, 0xa093842b, 0x35e350be, 0xf8b2a0a5, 0x6dc27430, + 0x09220fce, 0x9c52db5b, 0xc0e2f832, 0x55922ca7, 0x31725759, + 0xa40283cc, 0x8812118b, 0x1d62c51e, 0x7982bee0, 0xecf26a75, + 0xb042491c, 0x25329d89, 0x41d2e677, 0xd4a232e2, 0x33e785f2, + 0xa6975167, 0xc2772a99, 0x5707fe0c, 0x0bb7dd65, 0x9ec709f0, + 0xfa27720e, 0x6f57a69b, 0x434734dc, 0xd637e049, 0xb2d79bb7, + 0x27a74f22, 0x7b176c4b, 0xee67b8de, 0x8a87c320, 0x1ff717b5, + 0xd2a6e7ae, 0x47d6333b, 0x233648c5, 0xb6469c50, 0xeaf6bf39, + 0x7f866bac, 0x1b661052, 0x8e16c4c7, 0xa2065680, 0x37768215, + 0x5396f9eb, 0xc6e62d7e, 0x9a560e17, 0x0f26da82, 0x6bc6a17c, + 0xfeb675e9, 0x2a14470b, 0xbf64939e, 0xdb84e860, 0x4ef43cf5, + 0x12441f9c, 0x8734cb09, 0xe3d4b0f7, 0x76a46462, 0x5ab4f625, + 0xcfc422b0, 0xab24594e, 0x3e548ddb, 0x62e4aeb2, 0xf7947a27, + 0x937401d9, 0x0604d54c, 0xcb552557, 0x5e25f1c2, 0x3ac58a3c, + 0xafb55ea9, 0xf3057dc0, 0x6675a955, 0x0295d2ab, 0x97e5063e, + 0xbbf59479, 0x2e8540ec, 0x4a653b12, 0xdf15ef87, 0x83a5ccee, + 0x16d5187b, 0x72356385, 0xe745b710, 0x67cf0be4, 0xf2bfdf71, + 0x965fa48f, 0x032f701a, 0x5f9f5373, 0xcaef87e6, 0xae0ffc18, + 0x3b7f288d, 0x176fbaca, 0x821f6e5f, 0xe6ff15a1, 0x738fc134, + 0x2f3fe25d, 0xba4f36c8, 0xdeaf4d36, 0x4bdf99a3, 0x868e69b8, + 0x13febd2d, 0x771ec6d3, 0xe26e1246, 0xbede312f, 0x2baee5ba, + 0x4f4e9e44, 0xda3e4ad1, 0xf62ed896, 0x635e0c03, 0x07be77fd, + 0x92cea368, 0xce7e8001, 0x5b0e5494, 0x3fee2f6a, 0xaa9efbff, + 0x7e3cc91d, 0xeb4c1d88, 0x8fac6676, 0x1adcb2e3, 0x466c918a, + 0xd31c451f, 0xb7fc3ee1, 0x228cea74, 0x0e9c7833, 0x9becaca6, + 0xff0cd758, 0x6a7c03cd, 0x36cc20a4, 0xa3bcf431, 0xc75c8fcf, + 0x522c5b5a, 0x9f7dab41, 0x0a0d7fd4, 0x6eed042a, 0xfb9dd0bf, + 0xa72df3d6, 0x325d2743, 0x56bd5cbd, 0xc3cd8828, 0xefdd1a6f, + 0x7aadcefa, 0x1e4db504, 0x8b3d6191, 0xd78d42f8, 0x42fd966d, + 0x261ded93, 0xb36d3906, 0x54288e16, 0xc1585a83, 0xa5b8217d, + 0x30c8f5e8, 0x6c78d681, 0xf9080214, 0x9de879ea, 0x0898ad7f, + 0x24883f38, 0xb1f8ebad, 0xd5189053, 0x406844c6, 0x1cd867af, + 0x89a8b33a, 0xed48c8c4, 0x78381c51, 0xb569ec4a, 0x201938df, + 0x44f94321, 0xd18997b4, 0x8d39b4dd, 0x18496048, 0x7ca91bb6, + 0xe9d9cf23, 0xc5c95d64, 0x50b989f1, 0x3459f20f, 0xa129269a, + 0xfd9905f3, 0x68e9d166, 0x0c09aa98, 0x99797e0d, 0x4ddb4cef, + 0xd8ab987a, 0xbc4be384, 0x293b3711, 0x758b1478, 0xe0fbc0ed, + 0x841bbb13, 0x116b6f86, 0x3d7bfdc1, 0xa80b2954, 0xcceb52aa, + 0x599b863f, 0x052ba556, 0x905b71c3, 0xf4bb0a3d, 0x61cbdea8, + 0xac9a2eb3, 0x39eafa26, 0x5d0a81d8, 0xc87a554d, 0x94ca7624, + 0x01baa2b1, 0x655ad94f, 0xf02a0dda, 0xdc3a9f9d, 0x494a4b08, + 0x2daa30f6, 0xb8dae463, 0xe46ac70a, 0x711a139f, 0x15fa6861, + 0x808abcf4}, + {0x00000000, 0xcf9e17c8, 0x444d29d1, 0x8bd33e19, 0x889a53a2, + 0x4704446a, 0xccd77a73, 0x03496dbb, 0xca45a105, 0x05dbb6cd, + 0x8e0888d4, 0x41969f1c, 0x42dff2a7, 0x8d41e56f, 0x0692db76, + 0xc90cccbe, 0x4ffa444b, 0x80645383, 0x0bb76d9a, 0xc4297a52, + 0xc76017e9, 0x08fe0021, 0x832d3e38, 0x4cb329f0, 0x85bfe54e, + 0x4a21f286, 0xc1f2cc9f, 0x0e6cdb57, 0x0d25b6ec, 0xc2bba124, + 0x49689f3d, 0x86f688f5, 0x9ff48896, 0x506a9f5e, 0xdbb9a147, + 0x1427b68f, 0x176edb34, 0xd8f0ccfc, 0x5323f2e5, 0x9cbde52d, + 0x55b12993, 0x9a2f3e5b, 0x11fc0042, 0xde62178a, 0xdd2b7a31, + 0x12b56df9, 0x996653e0, 0x56f84428, 0xd00eccdd, 0x1f90db15, + 0x9443e50c, 0x5bddf2c4, 0x58949f7f, 0x970a88b7, 0x1cd9b6ae, + 0xd347a166, 0x1a4b6dd8, 0xd5d57a10, 0x5e064409, 0x919853c1, + 0x92d13e7a, 0x5d4f29b2, 0xd69c17ab, 0x19020063, 0xe498176d, + 0x2b0600a5, 0xa0d53ebc, 0x6f4b2974, 0x6c0244cf, 0xa39c5307, + 0x284f6d1e, 0xe7d17ad6, 0x2eddb668, 0xe143a1a0, 0x6a909fb9, + 0xa50e8871, 0xa647e5ca, 0x69d9f202, 0xe20acc1b, 0x2d94dbd3, + 0xab625326, 0x64fc44ee, 0xef2f7af7, 0x20b16d3f, 0x23f80084, + 0xec66174c, 0x67b52955, 0xa82b3e9d, 0x6127f223, 0xaeb9e5eb, + 0x256adbf2, 0xeaf4cc3a, 0xe9bda181, 0x2623b649, 0xadf08850, + 0x626e9f98, 0x7b6c9ffb, 0xb4f28833, 0x3f21b62a, 0xf0bfa1e2, + 0xf3f6cc59, 0x3c68db91, 0xb7bbe588, 0x7825f240, 0xb1293efe, + 0x7eb72936, 0xf564172f, 0x3afa00e7, 0x39b36d5c, 0xf62d7a94, + 0x7dfe448d, 0xb2605345, 0x3496dbb0, 0xfb08cc78, 0x70dbf261, + 0xbf45e5a9, 0xbc0c8812, 0x73929fda, 0xf841a1c3, 0x37dfb60b, + 0xfed37ab5, 0x314d6d7d, 0xba9e5364, 0x750044ac, 0x76492917, + 0xb9d73edf, 0x320400c6, 0xfd9a170e, 0x1241289b, 0xdddf3f53, + 0x560c014a, 0x99921682, 0x9adb7b39, 0x55456cf1, 0xde9652e8, + 0x11084520, 0xd804899e, 0x179a9e56, 0x9c49a04f, 0x53d7b787, + 0x509eda3c, 0x9f00cdf4, 0x14d3f3ed, 0xdb4de425, 0x5dbb6cd0, + 0x92257b18, 0x19f64501, 0xd66852c9, 0xd5213f72, 0x1abf28ba, + 0x916c16a3, 0x5ef2016b, 0x97fecdd5, 0x5860da1d, 0xd3b3e404, + 0x1c2df3cc, 0x1f649e77, 0xd0fa89bf, 0x5b29b7a6, 0x94b7a06e, + 0x8db5a00d, 0x422bb7c5, 0xc9f889dc, 0x06669e14, 0x052ff3af, + 0xcab1e467, 0x4162da7e, 0x8efccdb6, 0x47f00108, 0x886e16c0, + 0x03bd28d9, 0xcc233f11, 0xcf6a52aa, 0x00f44562, 0x8b277b7b, + 0x44b96cb3, 0xc24fe446, 0x0dd1f38e, 0x8602cd97, 0x499cda5f, + 0x4ad5b7e4, 0x854ba02c, 0x0e989e35, 0xc10689fd, 0x080a4543, + 0xc794528b, 0x4c476c92, 0x83d97b5a, 0x809016e1, 0x4f0e0129, + 0xc4dd3f30, 0x0b4328f8, 0xf6d93ff6, 0x3947283e, 0xb2941627, + 0x7d0a01ef, 0x7e436c54, 0xb1dd7b9c, 0x3a0e4585, 0xf590524d, + 0x3c9c9ef3, 0xf302893b, 0x78d1b722, 0xb74fa0ea, 0xb406cd51, + 0x7b98da99, 0xf04be480, 0x3fd5f348, 0xb9237bbd, 0x76bd6c75, + 0xfd6e526c, 0x32f045a4, 0x31b9281f, 0xfe273fd7, 0x75f401ce, + 0xba6a1606, 0x7366dab8, 0xbcf8cd70, 0x372bf369, 0xf8b5e4a1, + 0xfbfc891a, 0x34629ed2, 0xbfb1a0cb, 0x702fb703, 0x692db760, + 0xa6b3a0a8, 0x2d609eb1, 0xe2fe8979, 0xe1b7e4c2, 0x2e29f30a, + 0xa5facd13, 0x6a64dadb, 0xa3681665, 0x6cf601ad, 0xe7253fb4, + 0x28bb287c, 0x2bf245c7, 0xe46c520f, 0x6fbf6c16, 0xa0217bde, + 0x26d7f32b, 0xe949e4e3, 0x629adafa, 0xad04cd32, 0xae4da089, + 0x61d3b741, 0xea008958, 0x259e9e90, 0xec92522e, 0x230c45e6, + 0xa8df7bff, 0x67416c37, 0x6408018c, 0xab961644, 0x2045285d, + 0xefdb3f95}, + {0x00000000, 0x24825136, 0x4904a26c, 0x6d86f35a, 0x920944d8, + 0xb68b15ee, 0xdb0de6b4, 0xff8fb782, 0xff638ff1, 0xdbe1dec7, + 0xb6672d9d, 0x92e57cab, 0x6d6acb29, 0x49e89a1f, 0x246e6945, + 0x00ec3873, 0x25b619a3, 0x01344895, 0x6cb2bbcf, 0x4830eaf9, + 0xb7bf5d7b, 0x933d0c4d, 0xfebbff17, 0xda39ae21, 0xdad59652, + 0xfe57c764, 0x93d1343e, 0xb7536508, 0x48dcd28a, 0x6c5e83bc, + 0x01d870e6, 0x255a21d0, 0x4b6c3346, 0x6fee6270, 0x0268912a, + 0x26eac01c, 0xd965779e, 0xfde726a8, 0x9061d5f2, 0xb4e384c4, + 0xb40fbcb7, 0x908ded81, 0xfd0b1edb, 0xd9894fed, 0x2606f86f, + 0x0284a959, 0x6f025a03, 0x4b800b35, 0x6eda2ae5, 0x4a587bd3, + 0x27de8889, 0x035cd9bf, 0xfcd36e3d, 0xd8513f0b, 0xb5d7cc51, + 0x91559d67, 0x91b9a514, 0xb53bf422, 0xd8bd0778, 0xfc3f564e, + 0x03b0e1cc, 0x2732b0fa, 0x4ab443a0, 0x6e361296, 0x96d8668c, + 0xb25a37ba, 0xdfdcc4e0, 0xfb5e95d6, 0x04d12254, 0x20537362, + 0x4dd58038, 0x6957d10e, 0x69bbe97d, 0x4d39b84b, 0x20bf4b11, + 0x043d1a27, 0xfbb2ada5, 0xdf30fc93, 0xb2b60fc9, 0x96345eff, + 0xb36e7f2f, 0x97ec2e19, 0xfa6add43, 0xdee88c75, 0x21673bf7, + 0x05e56ac1, 0x6863999b, 0x4ce1c8ad, 0x4c0df0de, 0x688fa1e8, + 0x050952b2, 0x218b0384, 0xde04b406, 0xfa86e530, 0x9700166a, + 0xb382475c, 0xddb455ca, 0xf93604fc, 0x94b0f7a6, 0xb032a690, + 0x4fbd1112, 0x6b3f4024, 0x06b9b37e, 0x223be248, 0x22d7da3b, + 0x06558b0d, 0x6bd37857, 0x4f512961, 0xb0de9ee3, 0x945ccfd5, + 0xf9da3c8f, 0xdd586db9, 0xf8024c69, 0xdc801d5f, 0xb106ee05, + 0x9584bf33, 0x6a0b08b1, 0x4e895987, 0x230faadd, 0x078dfbeb, + 0x0761c398, 0x23e392ae, 0x4e6561f4, 0x6ae730c2, 0x95688740, + 0xb1ead676, 0xdc6c252c, 0xf8ee741a, 0xf6c1cb59, 0xd2439a6f, + 0xbfc56935, 0x9b473803, 0x64c88f81, 0x404adeb7, 0x2dcc2ded, + 0x094e7cdb, 0x09a244a8, 0x2d20159e, 0x40a6e6c4, 0x6424b7f2, + 0x9bab0070, 0xbf295146, 0xd2afa21c, 0xf62df32a, 0xd377d2fa, + 0xf7f583cc, 0x9a737096, 0xbef121a0, 0x417e9622, 0x65fcc714, + 0x087a344e, 0x2cf86578, 0x2c145d0b, 0x08960c3d, 0x6510ff67, + 0x4192ae51, 0xbe1d19d3, 0x9a9f48e5, 0xf719bbbf, 0xd39bea89, + 0xbdadf81f, 0x992fa929, 0xf4a95a73, 0xd02b0b45, 0x2fa4bcc7, + 0x0b26edf1, 0x66a01eab, 0x42224f9d, 0x42ce77ee, 0x664c26d8, + 0x0bcad582, 0x2f4884b4, 0xd0c73336, 0xf4456200, 0x99c3915a, + 0xbd41c06c, 0x981be1bc, 0xbc99b08a, 0xd11f43d0, 0xf59d12e6, + 0x0a12a564, 0x2e90f452, 0x43160708, 0x6794563e, 0x67786e4d, + 0x43fa3f7b, 0x2e7ccc21, 0x0afe9d17, 0xf5712a95, 0xd1f37ba3, + 0xbc7588f9, 0x98f7d9cf, 0x6019add5, 0x449bfce3, 0x291d0fb9, + 0x0d9f5e8f, 0xf210e90d, 0xd692b83b, 0xbb144b61, 0x9f961a57, + 0x9f7a2224, 0xbbf87312, 0xd67e8048, 0xf2fcd17e, 0x0d7366fc, + 0x29f137ca, 0x4477c490, 0x60f595a6, 0x45afb476, 0x612de540, + 0x0cab161a, 0x2829472c, 0xd7a6f0ae, 0xf324a198, 0x9ea252c2, + 0xba2003f4, 0xbacc3b87, 0x9e4e6ab1, 0xf3c899eb, 0xd74ac8dd, + 0x28c57f5f, 0x0c472e69, 0x61c1dd33, 0x45438c05, 0x2b759e93, + 0x0ff7cfa5, 0x62713cff, 0x46f36dc9, 0xb97cda4b, 0x9dfe8b7d, + 0xf0787827, 0xd4fa2911, 0xd4161162, 0xf0944054, 0x9d12b30e, + 0xb990e238, 0x461f55ba, 0x629d048c, 0x0f1bf7d6, 0x2b99a6e0, + 0x0ec38730, 0x2a41d606, 0x47c7255c, 0x6345746a, 0x9ccac3e8, + 0xb84892de, 0xd5ce6184, 0xf14c30b2, 0xf1a008c1, 0xd52259f7, + 0xb8a4aaad, 0x9c26fb9b, 0x63a94c19, 0x472b1d2f, 0x2aadee75, + 0x0e2fbf43}, + {0x00000000, 0x36f290f3, 0x6de521e6, 0x5b17b115, 0xdbca43cc, + 0xed38d33f, 0xb62f622a, 0x80ddf2d9, 0x6ce581d9, 0x5a17112a, + 0x0100a03f, 0x37f230cc, 0xb72fc215, 0x81dd52e6, 0xdacae3f3, + 0xec387300, 0xd9cb03b2, 0xef399341, 0xb42e2254, 0x82dcb2a7, + 0x0201407e, 0x34f3d08d, 0x6fe46198, 0x5916f16b, 0xb52e826b, + 0x83dc1298, 0xd8cba38d, 0xee39337e, 0x6ee4c1a7, 0x58165154, + 0x0301e041, 0x35f370b2, 0x68e70125, 0x5e1591d6, 0x050220c3, + 0x33f0b030, 0xb32d42e9, 0x85dfd21a, 0xdec8630f, 0xe83af3fc, + 0x040280fc, 0x32f0100f, 0x69e7a11a, 0x5f1531e9, 0xdfc8c330, + 0xe93a53c3, 0xb22de2d6, 0x84df7225, 0xb12c0297, 0x87de9264, + 0xdcc92371, 0xea3bb382, 0x6ae6415b, 0x5c14d1a8, 0x070360bd, + 0x31f1f04e, 0xddc9834e, 0xeb3b13bd, 0xb02ca2a8, 0x86de325b, + 0x0603c082, 0x30f15071, 0x6be6e164, 0x5d147197, 0xd1ce024a, + 0xe73c92b9, 0xbc2b23ac, 0x8ad9b35f, 0x0a044186, 0x3cf6d175, + 0x67e16060, 0x5113f093, 0xbd2b8393, 0x8bd91360, 0xd0cea275, + 0xe63c3286, 0x66e1c05f, 0x501350ac, 0x0b04e1b9, 0x3df6714a, + 0x080501f8, 0x3ef7910b, 0x65e0201e, 0x5312b0ed, 0xd3cf4234, + 0xe53dd2c7, 0xbe2a63d2, 0x88d8f321, 0x64e08021, 0x521210d2, + 0x0905a1c7, 0x3ff73134, 0xbf2ac3ed, 0x89d8531e, 0xd2cfe20b, + 0xe43d72f8, 0xb929036f, 0x8fdb939c, 0xd4cc2289, 0xe23eb27a, + 0x62e340a3, 0x5411d050, 0x0f066145, 0x39f4f1b6, 0xd5cc82b6, + 0xe33e1245, 0xb829a350, 0x8edb33a3, 0x0e06c17a, 0x38f45189, + 0x63e3e09c, 0x5511706f, 0x60e200dd, 0x5610902e, 0x0d07213b, + 0x3bf5b1c8, 0xbb284311, 0x8ddad3e2, 0xd6cd62f7, 0xe03ff204, + 0x0c078104, 0x3af511f7, 0x61e2a0e2, 0x57103011, 0xd7cdc2c8, + 0xe13f523b, 0xba28e32e, 0x8cda73dd, 0x78ed02d5, 0x4e1f9226, + 0x15082333, 0x23fab3c0, 0xa3274119, 0x95d5d1ea, 0xcec260ff, + 0xf830f00c, 0x1408830c, 0x22fa13ff, 0x79eda2ea, 0x4f1f3219, + 0xcfc2c0c0, 0xf9305033, 0xa227e126, 0x94d571d5, 0xa1260167, + 0x97d49194, 0xccc32081, 0xfa31b072, 0x7aec42ab, 0x4c1ed258, + 0x1709634d, 0x21fbf3be, 0xcdc380be, 0xfb31104d, 0xa026a158, + 0x96d431ab, 0x1609c372, 0x20fb5381, 0x7bece294, 0x4d1e7267, + 0x100a03f0, 0x26f89303, 0x7def2216, 0x4b1db2e5, 0xcbc0403c, + 0xfd32d0cf, 0xa62561da, 0x90d7f129, 0x7cef8229, 0x4a1d12da, + 0x110aa3cf, 0x27f8333c, 0xa725c1e5, 0x91d75116, 0xcac0e003, + 0xfc3270f0, 0xc9c10042, 0xff3390b1, 0xa42421a4, 0x92d6b157, + 0x120b438e, 0x24f9d37d, 0x7fee6268, 0x491cf29b, 0xa524819b, + 0x93d61168, 0xc8c1a07d, 0xfe33308e, 0x7eeec257, 0x481c52a4, + 0x130be3b1, 0x25f97342, 0xa923009f, 0x9fd1906c, 0xc4c62179, + 0xf234b18a, 0x72e94353, 0x441bd3a0, 0x1f0c62b5, 0x29fef246, + 0xc5c68146, 0xf33411b5, 0xa823a0a0, 0x9ed13053, 0x1e0cc28a, + 0x28fe5279, 0x73e9e36c, 0x451b739f, 0x70e8032d, 0x461a93de, + 0x1d0d22cb, 0x2bffb238, 0xab2240e1, 0x9dd0d012, 0xc6c76107, + 0xf035f1f4, 0x1c0d82f4, 0x2aff1207, 0x71e8a312, 0x471a33e1, + 0xc7c7c138, 0xf13551cb, 0xaa22e0de, 0x9cd0702d, 0xc1c401ba, + 0xf7369149, 0xac21205c, 0x9ad3b0af, 0x1a0e4276, 0x2cfcd285, + 0x77eb6390, 0x4119f363, 0xad218063, 0x9bd31090, 0xc0c4a185, + 0xf6363176, 0x76ebc3af, 0x4019535c, 0x1b0ee249, 0x2dfc72ba, + 0x180f0208, 0x2efd92fb, 0x75ea23ee, 0x4318b31d, 0xc3c541c4, + 0xf537d137, 0xae206022, 0x98d2f0d1, 0x74ea83d1, 0x42181322, + 0x190fa237, 0x2ffd32c4, 0xaf20c01d, 0x99d250ee, 0xc2c5e1fb, + 0xf4377108}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0xf390f23600000000, 0xe621e56d00000000, + 0x15b1175b00000000, 0xcc43cadb00000000, 0x3fd338ed00000000, + 0x2a622fb600000000, 0xd9f2dd8000000000, 0xd981e56c00000000, + 0x2a11175a00000000, 0x3fa0000100000000, 0xcc30f23700000000, + 0x15c22fb700000000, 0xe652dd8100000000, 0xf3e3cada00000000, + 0x007338ec00000000, 0xb203cbd900000000, 0x419339ef00000000, + 0x54222eb400000000, 0xa7b2dc8200000000, 0x7e40010200000000, + 0x8dd0f33400000000, 0x9861e46f00000000, 0x6bf1165900000000, + 0x6b822eb500000000, 0x9812dc8300000000, 0x8da3cbd800000000, + 0x7e3339ee00000000, 0xa7c1e46e00000000, 0x5451165800000000, + 0x41e0010300000000, 0xb270f33500000000, 0x2501e76800000000, + 0xd691155e00000000, 0xc320020500000000, 0x30b0f03300000000, + 0xe9422db300000000, 0x1ad2df8500000000, 0x0f63c8de00000000, + 0xfcf33ae800000000, 0xfc80020400000000, 0x0f10f03200000000, + 0x1aa1e76900000000, 0xe931155f00000000, 0x30c3c8df00000000, + 0xc3533ae900000000, 0xd6e22db200000000, 0x2572df8400000000, + 0x97022cb100000000, 0x6492de8700000000, 0x7123c9dc00000000, + 0x82b33bea00000000, 0x5b41e66a00000000, 0xa8d1145c00000000, + 0xbd60030700000000, 0x4ef0f13100000000, 0x4e83c9dd00000000, + 0xbd133beb00000000, 0xa8a22cb000000000, 0x5b32de8600000000, + 0x82c0030600000000, 0x7150f13000000000, 0x64e1e66b00000000, + 0x9771145d00000000, 0x4a02ced100000000, 0xb9923ce700000000, + 0xac232bbc00000000, 0x5fb3d98a00000000, 0x8641040a00000000, + 0x75d1f63c00000000, 0x6060e16700000000, 0x93f0135100000000, + 0x93832bbd00000000, 0x6013d98b00000000, 0x75a2ced000000000, + 0x86323ce600000000, 0x5fc0e16600000000, 0xac50135000000000, + 0xb9e1040b00000000, 0x4a71f63d00000000, 0xf801050800000000, + 0x0b91f73e00000000, 0x1e20e06500000000, 0xedb0125300000000, + 0x3442cfd300000000, 0xc7d23de500000000, 0xd2632abe00000000, + 0x21f3d88800000000, 0x2180e06400000000, 0xd210125200000000, + 0xc7a1050900000000, 0x3431f73f00000000, 0xedc32abf00000000, + 0x1e53d88900000000, 0x0be2cfd200000000, 0xf8723de400000000, + 0x6f0329b900000000, 0x9c93db8f00000000, 0x8922ccd400000000, + 0x7ab23ee200000000, 0xa340e36200000000, 0x50d0115400000000, + 0x4561060f00000000, 0xb6f1f43900000000, 0xb682ccd500000000, + 0x45123ee300000000, 0x50a329b800000000, 0xa333db8e00000000, + 0x7ac1060e00000000, 0x8951f43800000000, 0x9ce0e36300000000, + 0x6f70115500000000, 0xdd00e26000000000, 0x2e90105600000000, + 0x3b21070d00000000, 0xc8b1f53b00000000, 0x114328bb00000000, + 0xe2d3da8d00000000, 0xf762cdd600000000, 0x04f23fe000000000, + 0x0481070c00000000, 0xf711f53a00000000, 0xe2a0e26100000000, + 0x1130105700000000, 0xc8c2cdd700000000, 0x3b523fe100000000, + 0x2ee328ba00000000, 0xdd73da8c00000000, 0xd502ed7800000000, + 0x26921f4e00000000, 0x3323081500000000, 0xc0b3fa2300000000, + 0x194127a300000000, 0xead1d59500000000, 0xff60c2ce00000000, + 0x0cf030f800000000, 0x0c83081400000000, 0xff13fa2200000000, + 0xeaa2ed7900000000, 0x19321f4f00000000, 0xc0c0c2cf00000000, + 0x335030f900000000, 0x26e127a200000000, 0xd571d59400000000, + 0x670126a100000000, 0x9491d49700000000, 0x8120c3cc00000000, + 0x72b031fa00000000, 0xab42ec7a00000000, 0x58d21e4c00000000, + 0x4d63091700000000, 0xbef3fb2100000000, 0xbe80c3cd00000000, + 0x4d1031fb00000000, 0x58a126a000000000, 0xab31d49600000000, + 0x72c3091600000000, 0x8153fb2000000000, 0x94e2ec7b00000000, + 0x67721e4d00000000, 0xf0030a1000000000, 0x0393f82600000000, + 0x1622ef7d00000000, 0xe5b21d4b00000000, 0x3c40c0cb00000000, + 0xcfd032fd00000000, 0xda6125a600000000, 0x29f1d79000000000, + 0x2982ef7c00000000, 0xda121d4a00000000, 0xcfa30a1100000000, + 0x3c33f82700000000, 0xe5c125a700000000, 0x1651d79100000000, + 0x03e0c0ca00000000, 0xf07032fc00000000, 0x4200c1c900000000, + 0xb19033ff00000000, 0xa42124a400000000, 0x57b1d69200000000, + 0x8e430b1200000000, 0x7dd3f92400000000, 0x6862ee7f00000000, + 0x9bf21c4900000000, 0x9b8124a500000000, 0x6811d69300000000, + 0x7da0c1c800000000, 0x8e3033fe00000000, 0x57c2ee7e00000000, + 0xa4521c4800000000, 0xb1e30b1300000000, 0x4273f92500000000, + 0x9f0023a900000000, 0x6c90d19f00000000, 0x7921c6c400000000, + 0x8ab134f200000000, 0x5343e97200000000, 0xa0d31b4400000000, + 0xb5620c1f00000000, 0x46f2fe2900000000, 0x4681c6c500000000, + 0xb51134f300000000, 0xa0a023a800000000, 0x5330d19e00000000, + 0x8ac20c1e00000000, 0x7952fe2800000000, 0x6ce3e97300000000, + 0x9f731b4500000000, 0x2d03e87000000000, 0xde931a4600000000, + 0xcb220d1d00000000, 0x38b2ff2b00000000, 0xe14022ab00000000, + 0x12d0d09d00000000, 0x0761c7c600000000, 0xf4f135f000000000, + 0xf4820d1c00000000, 0x0712ff2a00000000, 0x12a3e87100000000, + 0xe1331a4700000000, 0x38c1c7c700000000, 0xcb5135f100000000, + 0xdee022aa00000000, 0x2d70d09c00000000, 0xba01c4c100000000, + 0x499136f700000000, 0x5c2021ac00000000, 0xafb0d39a00000000, + 0x76420e1a00000000, 0x85d2fc2c00000000, 0x9063eb7700000000, + 0x63f3194100000000, 0x638021ad00000000, 0x9010d39b00000000, + 0x85a1c4c000000000, 0x763136f600000000, 0xafc3eb7600000000, + 0x5c53194000000000, 0x49e20e1b00000000, 0xba72fc2d00000000, + 0x08020f1800000000, 0xfb92fd2e00000000, 0xee23ea7500000000, + 0x1db3184300000000, 0xc441c5c300000000, 0x37d137f500000000, + 0x226020ae00000000, 0xd1f0d29800000000, 0xd183ea7400000000, + 0x2213184200000000, 0x37a20f1900000000, 0xc432fd2f00000000, + 0x1dc020af00000000, 0xee50d29900000000, 0xfbe1c5c200000000, + 0x087137f400000000}, + {0x0000000000000000, 0x3651822400000000, 0x6ca2044900000000, + 0x5af3866d00000000, 0xd844099200000000, 0xee158bb600000000, + 0xb4e60ddb00000000, 0x82b78fff00000000, 0xf18f63ff00000000, + 0xc7dee1db00000000, 0x9d2d67b600000000, 0xab7ce59200000000, + 0x29cb6a6d00000000, 0x1f9ae84900000000, 0x45696e2400000000, + 0x7338ec0000000000, 0xa319b62500000000, 0x9548340100000000, + 0xcfbbb26c00000000, 0xf9ea304800000000, 0x7b5dbfb700000000, + 0x4d0c3d9300000000, 0x17ffbbfe00000000, 0x21ae39da00000000, + 0x5296d5da00000000, 0x64c757fe00000000, 0x3e34d19300000000, + 0x086553b700000000, 0x8ad2dc4800000000, 0xbc835e6c00000000, + 0xe670d80100000000, 0xd0215a2500000000, 0x46336c4b00000000, + 0x7062ee6f00000000, 0x2a91680200000000, 0x1cc0ea2600000000, + 0x9e7765d900000000, 0xa826e7fd00000000, 0xf2d5619000000000, + 0xc484e3b400000000, 0xb7bc0fb400000000, 0x81ed8d9000000000, + 0xdb1e0bfd00000000, 0xed4f89d900000000, 0x6ff8062600000000, + 0x59a9840200000000, 0x035a026f00000000, 0x350b804b00000000, + 0xe52ada6e00000000, 0xd37b584a00000000, 0x8988de2700000000, + 0xbfd95c0300000000, 0x3d6ed3fc00000000, 0x0b3f51d800000000, + 0x51ccd7b500000000, 0x679d559100000000, 0x14a5b99100000000, + 0x22f43bb500000000, 0x7807bdd800000000, 0x4e563ffc00000000, + 0xcce1b00300000000, 0xfab0322700000000, 0xa043b44a00000000, + 0x9612366e00000000, 0x8c66d89600000000, 0xba375ab200000000, + 0xe0c4dcdf00000000, 0xd6955efb00000000, 0x5422d10400000000, + 0x6273532000000000, 0x3880d54d00000000, 0x0ed1576900000000, + 0x7de9bb6900000000, 0x4bb8394d00000000, 0x114bbf2000000000, + 0x271a3d0400000000, 0xa5adb2fb00000000, 0x93fc30df00000000, + 0xc90fb6b200000000, 0xff5e349600000000, 0x2f7f6eb300000000, + 0x192eec9700000000, 0x43dd6afa00000000, 0x758ce8de00000000, + 0xf73b672100000000, 0xc16ae50500000000, 0x9b99636800000000, + 0xadc8e14c00000000, 0xdef00d4c00000000, 0xe8a18f6800000000, + 0xb252090500000000, 0x84038b2100000000, 0x06b404de00000000, + 0x30e586fa00000000, 0x6a16009700000000, 0x5c4782b300000000, + 0xca55b4dd00000000, 0xfc0436f900000000, 0xa6f7b09400000000, + 0x90a632b000000000, 0x1211bd4f00000000, 0x24403f6b00000000, + 0x7eb3b90600000000, 0x48e23b2200000000, 0x3bdad72200000000, + 0x0d8b550600000000, 0x5778d36b00000000, 0x6129514f00000000, + 0xe39edeb000000000, 0xd5cf5c9400000000, 0x8f3cdaf900000000, + 0xb96d58dd00000000, 0x694c02f800000000, 0x5f1d80dc00000000, + 0x05ee06b100000000, 0x33bf849500000000, 0xb1080b6a00000000, + 0x8759894e00000000, 0xddaa0f2300000000, 0xebfb8d0700000000, + 0x98c3610700000000, 0xae92e32300000000, 0xf461654e00000000, + 0xc230e76a00000000, 0x4087689500000000, 0x76d6eab100000000, + 0x2c256cdc00000000, 0x1a74eef800000000, 0x59cbc1f600000000, + 0x6f9a43d200000000, 0x3569c5bf00000000, 0x0338479b00000000, + 0x818fc86400000000, 0xb7de4a4000000000, 0xed2dcc2d00000000, + 0xdb7c4e0900000000, 0xa844a20900000000, 0x9e15202d00000000, + 0xc4e6a64000000000, 0xf2b7246400000000, 0x7000ab9b00000000, + 0x465129bf00000000, 0x1ca2afd200000000, 0x2af32df600000000, + 0xfad277d300000000, 0xcc83f5f700000000, 0x9670739a00000000, + 0xa021f1be00000000, 0x22967e4100000000, 0x14c7fc6500000000, + 0x4e347a0800000000, 0x7865f82c00000000, 0x0b5d142c00000000, + 0x3d0c960800000000, 0x67ff106500000000, 0x51ae924100000000, + 0xd3191dbe00000000, 0xe5489f9a00000000, 0xbfbb19f700000000, + 0x89ea9bd300000000, 0x1ff8adbd00000000, 0x29a92f9900000000, + 0x735aa9f400000000, 0x450b2bd000000000, 0xc7bca42f00000000, + 0xf1ed260b00000000, 0xab1ea06600000000, 0x9d4f224200000000, + 0xee77ce4200000000, 0xd8264c6600000000, 0x82d5ca0b00000000, + 0xb484482f00000000, 0x3633c7d000000000, 0x006245f400000000, + 0x5a91c39900000000, 0x6cc041bd00000000, 0xbce11b9800000000, + 0x8ab099bc00000000, 0xd0431fd100000000, 0xe6129df500000000, + 0x64a5120a00000000, 0x52f4902e00000000, 0x0807164300000000, + 0x3e56946700000000, 0x4d6e786700000000, 0x7b3ffa4300000000, + 0x21cc7c2e00000000, 0x179dfe0a00000000, 0x952a71f500000000, + 0xa37bf3d100000000, 0xf98875bc00000000, 0xcfd9f79800000000, + 0xd5ad196000000000, 0xe3fc9b4400000000, 0xb90f1d2900000000, + 0x8f5e9f0d00000000, 0x0de910f200000000, 0x3bb892d600000000, + 0x614b14bb00000000, 0x571a969f00000000, 0x24227a9f00000000, + 0x1273f8bb00000000, 0x48807ed600000000, 0x7ed1fcf200000000, + 0xfc66730d00000000, 0xca37f12900000000, 0x90c4774400000000, + 0xa695f56000000000, 0x76b4af4500000000, 0x40e52d6100000000, + 0x1a16ab0c00000000, 0x2c47292800000000, 0xaef0a6d700000000, + 0x98a124f300000000, 0xc252a29e00000000, 0xf40320ba00000000, + 0x873bccba00000000, 0xb16a4e9e00000000, 0xeb99c8f300000000, + 0xddc84ad700000000, 0x5f7fc52800000000, 0x692e470c00000000, + 0x33ddc16100000000, 0x058c434500000000, 0x939e752b00000000, + 0xa5cff70f00000000, 0xff3c716200000000, 0xc96df34600000000, + 0x4bda7cb900000000, 0x7d8bfe9d00000000, 0x277878f000000000, + 0x1129fad400000000, 0x621116d400000000, 0x544094f000000000, + 0x0eb3129d00000000, 0x38e290b900000000, 0xba551f4600000000, + 0x8c049d6200000000, 0xd6f71b0f00000000, 0xe0a6992b00000000, + 0x3087c30e00000000, 0x06d6412a00000000, 0x5c25c74700000000, + 0x6a74456300000000, 0xe8c3ca9c00000000, 0xde9248b800000000, + 0x8461ced500000000, 0xb2304cf100000000, 0xc108a0f100000000, + 0xf75922d500000000, 0xadaaa4b800000000, 0x9bfb269c00000000, + 0x194ca96300000000, 0x2f1d2b4700000000, 0x75eead2a00000000, + 0x43bf2f0e00000000}, + {0x0000000000000000, 0xc8179ecf00000000, 0xd1294d4400000000, + 0x193ed38b00000000, 0xa2539a8800000000, 0x6a44044700000000, + 0x737ad7cc00000000, 0xbb6d490300000000, 0x05a145ca00000000, + 0xcdb6db0500000000, 0xd488088e00000000, 0x1c9f964100000000, + 0xa7f2df4200000000, 0x6fe5418d00000000, 0x76db920600000000, + 0xbecc0cc900000000, 0x4b44fa4f00000000, 0x8353648000000000, + 0x9a6db70b00000000, 0x527a29c400000000, 0xe91760c700000000, + 0x2100fe0800000000, 0x383e2d8300000000, 0xf029b34c00000000, + 0x4ee5bf8500000000, 0x86f2214a00000000, 0x9fccf2c100000000, + 0x57db6c0e00000000, 0xecb6250d00000000, 0x24a1bbc200000000, + 0x3d9f684900000000, 0xf588f68600000000, 0x9688f49f00000000, + 0x5e9f6a5000000000, 0x47a1b9db00000000, 0x8fb6271400000000, + 0x34db6e1700000000, 0xfcccf0d800000000, 0xe5f2235300000000, + 0x2de5bd9c00000000, 0x9329b15500000000, 0x5b3e2f9a00000000, + 0x4200fc1100000000, 0x8a1762de00000000, 0x317a2bdd00000000, + 0xf96db51200000000, 0xe053669900000000, 0x2844f85600000000, + 0xddcc0ed000000000, 0x15db901f00000000, 0x0ce5439400000000, + 0xc4f2dd5b00000000, 0x7f9f945800000000, 0xb7880a9700000000, + 0xaeb6d91c00000000, 0x66a147d300000000, 0xd86d4b1a00000000, + 0x107ad5d500000000, 0x0944065e00000000, 0xc153989100000000, + 0x7a3ed19200000000, 0xb2294f5d00000000, 0xab179cd600000000, + 0x6300021900000000, 0x6d1798e400000000, 0xa500062b00000000, + 0xbc3ed5a000000000, 0x74294b6f00000000, 0xcf44026c00000000, + 0x07539ca300000000, 0x1e6d4f2800000000, 0xd67ad1e700000000, + 0x68b6dd2e00000000, 0xa0a143e100000000, 0xb99f906a00000000, + 0x71880ea500000000, 0xcae547a600000000, 0x02f2d96900000000, + 0x1bcc0ae200000000, 0xd3db942d00000000, 0x265362ab00000000, + 0xee44fc6400000000, 0xf77a2fef00000000, 0x3f6db12000000000, + 0x8400f82300000000, 0x4c1766ec00000000, 0x5529b56700000000, + 0x9d3e2ba800000000, 0x23f2276100000000, 0xebe5b9ae00000000, + 0xf2db6a2500000000, 0x3accf4ea00000000, 0x81a1bde900000000, + 0x49b6232600000000, 0x5088f0ad00000000, 0x989f6e6200000000, + 0xfb9f6c7b00000000, 0x3388f2b400000000, 0x2ab6213f00000000, + 0xe2a1bff000000000, 0x59ccf6f300000000, 0x91db683c00000000, + 0x88e5bbb700000000, 0x40f2257800000000, 0xfe3e29b100000000, + 0x3629b77e00000000, 0x2f1764f500000000, 0xe700fa3a00000000, + 0x5c6db33900000000, 0x947a2df600000000, 0x8d44fe7d00000000, + 0x455360b200000000, 0xb0db963400000000, 0x78cc08fb00000000, + 0x61f2db7000000000, 0xa9e545bf00000000, 0x12880cbc00000000, + 0xda9f927300000000, 0xc3a141f800000000, 0x0bb6df3700000000, + 0xb57ad3fe00000000, 0x7d6d4d3100000000, 0x64539eba00000000, + 0xac44007500000000, 0x1729497600000000, 0xdf3ed7b900000000, + 0xc600043200000000, 0x0e179afd00000000, 0x9b28411200000000, + 0x533fdfdd00000000, 0x4a010c5600000000, 0x8216929900000000, + 0x397bdb9a00000000, 0xf16c455500000000, 0xe85296de00000000, + 0x2045081100000000, 0x9e8904d800000000, 0x569e9a1700000000, + 0x4fa0499c00000000, 0x87b7d75300000000, 0x3cda9e5000000000, + 0xf4cd009f00000000, 0xedf3d31400000000, 0x25e44ddb00000000, + 0xd06cbb5d00000000, 0x187b259200000000, 0x0145f61900000000, + 0xc95268d600000000, 0x723f21d500000000, 0xba28bf1a00000000, + 0xa3166c9100000000, 0x6b01f25e00000000, 0xd5cdfe9700000000, + 0x1dda605800000000, 0x04e4b3d300000000, 0xccf32d1c00000000, + 0x779e641f00000000, 0xbf89fad000000000, 0xa6b7295b00000000, + 0x6ea0b79400000000, 0x0da0b58d00000000, 0xc5b72b4200000000, + 0xdc89f8c900000000, 0x149e660600000000, 0xaff32f0500000000, + 0x67e4b1ca00000000, 0x7eda624100000000, 0xb6cdfc8e00000000, + 0x0801f04700000000, 0xc0166e8800000000, 0xd928bd0300000000, + 0x113f23cc00000000, 0xaa526acf00000000, 0x6245f40000000000, + 0x7b7b278b00000000, 0xb36cb94400000000, 0x46e44fc200000000, + 0x8ef3d10d00000000, 0x97cd028600000000, 0x5fda9c4900000000, + 0xe4b7d54a00000000, 0x2ca04b8500000000, 0x359e980e00000000, + 0xfd8906c100000000, 0x43450a0800000000, 0x8b5294c700000000, + 0x926c474c00000000, 0x5a7bd98300000000, 0xe116908000000000, + 0x29010e4f00000000, 0x303fddc400000000, 0xf828430b00000000, + 0xf63fd9f600000000, 0x3e28473900000000, 0x271694b200000000, + 0xef010a7d00000000, 0x546c437e00000000, 0x9c7bddb100000000, + 0x85450e3a00000000, 0x4d5290f500000000, 0xf39e9c3c00000000, + 0x3b8902f300000000, 0x22b7d17800000000, 0xeaa04fb700000000, + 0x51cd06b400000000, 0x99da987b00000000, 0x80e44bf000000000, + 0x48f3d53f00000000, 0xbd7b23b900000000, 0x756cbd7600000000, + 0x6c526efd00000000, 0xa445f03200000000, 0x1f28b93100000000, + 0xd73f27fe00000000, 0xce01f47500000000, 0x06166aba00000000, + 0xb8da667300000000, 0x70cdf8bc00000000, 0x69f32b3700000000, + 0xa1e4b5f800000000, 0x1a89fcfb00000000, 0xd29e623400000000, + 0xcba0b1bf00000000, 0x03b72f7000000000, 0x60b72d6900000000, + 0xa8a0b3a600000000, 0xb19e602d00000000, 0x7989fee200000000, + 0xc2e4b7e100000000, 0x0af3292e00000000, 0x13cdfaa500000000, + 0xdbda646a00000000, 0x651668a300000000, 0xad01f66c00000000, + 0xb43f25e700000000, 0x7c28bb2800000000, 0xc745f22b00000000, + 0x0f526ce400000000, 0x166cbf6f00000000, 0xde7b21a000000000, + 0x2bf3d72600000000, 0xe3e449e900000000, 0xfada9a6200000000, + 0x32cd04ad00000000, 0x89a04dae00000000, 0x41b7d36100000000, + 0x588900ea00000000, 0x909e9e2500000000, 0x2e5292ec00000000, + 0xe6450c2300000000, 0xff7bdfa800000000, 0x376c416700000000, + 0x8c01086400000000, 0x441696ab00000000, 0x5d28452000000000, + 0x953fdbef00000000}, + {0x0000000000000000, 0x95d4709500000000, 0x6baf90f100000000, + 0xfe7be06400000000, 0x9758503800000000, 0x028c20ad00000000, + 0xfcf7c0c900000000, 0x6923b05c00000000, 0x2eb1a07000000000, + 0xbb65d0e500000000, 0x451e308100000000, 0xd0ca401400000000, + 0xb9e9f04800000000, 0x2c3d80dd00000000, 0xd24660b900000000, + 0x4792102c00000000, 0x5c6241e100000000, 0xc9b6317400000000, + 0x37cdd11000000000, 0xa219a18500000000, 0xcb3a11d900000000, + 0x5eee614c00000000, 0xa095812800000000, 0x3541f1bd00000000, + 0x72d3e19100000000, 0xe707910400000000, 0x197c716000000000, + 0x8ca801f500000000, 0xe58bb1a900000000, 0x705fc13c00000000, + 0x8e24215800000000, 0x1bf051cd00000000, 0xf9c2f31900000000, + 0x6c16838c00000000, 0x926d63e800000000, 0x07b9137d00000000, + 0x6e9aa32100000000, 0xfb4ed3b400000000, 0x053533d000000000, + 0x90e1434500000000, 0xd773536900000000, 0x42a723fc00000000, + 0xbcdcc39800000000, 0x2908b30d00000000, 0x402b035100000000, + 0xd5ff73c400000000, 0x2b8493a000000000, 0xbe50e33500000000, + 0xa5a0b2f800000000, 0x3074c26d00000000, 0xce0f220900000000, + 0x5bdb529c00000000, 0x32f8e2c000000000, 0xa72c925500000000, + 0x5957723100000000, 0xcc8302a400000000, 0x8b11128800000000, + 0x1ec5621d00000000, 0xe0be827900000000, 0x756af2ec00000000, + 0x1c4942b000000000, 0x899d322500000000, 0x77e6d24100000000, + 0xe232a2d400000000, 0xf285e73300000000, 0x675197a600000000, + 0x992a77c200000000, 0x0cfe075700000000, 0x65ddb70b00000000, + 0xf009c79e00000000, 0x0e7227fa00000000, 0x9ba6576f00000000, + 0xdc34474300000000, 0x49e037d600000000, 0xb79bd7b200000000, + 0x224fa72700000000, 0x4b6c177b00000000, 0xdeb867ee00000000, + 0x20c3878a00000000, 0xb517f71f00000000, 0xaee7a6d200000000, + 0x3b33d64700000000, 0xc548362300000000, 0x509c46b600000000, + 0x39bff6ea00000000, 0xac6b867f00000000, 0x5210661b00000000, + 0xc7c4168e00000000, 0x805606a200000000, 0x1582763700000000, + 0xebf9965300000000, 0x7e2de6c600000000, 0x170e569a00000000, + 0x82da260f00000000, 0x7ca1c66b00000000, 0xe975b6fe00000000, + 0x0b47142a00000000, 0x9e9364bf00000000, 0x60e884db00000000, + 0xf53cf44e00000000, 0x9c1f441200000000, 0x09cb348700000000, + 0xf7b0d4e300000000, 0x6264a47600000000, 0x25f6b45a00000000, + 0xb022c4cf00000000, 0x4e5924ab00000000, 0xdb8d543e00000000, + 0xb2aee46200000000, 0x277a94f700000000, 0xd901749300000000, + 0x4cd5040600000000, 0x572555cb00000000, 0xc2f1255e00000000, + 0x3c8ac53a00000000, 0xa95eb5af00000000, 0xc07d05f300000000, + 0x55a9756600000000, 0xabd2950200000000, 0x3e06e59700000000, + 0x7994f5bb00000000, 0xec40852e00000000, 0x123b654a00000000, + 0x87ef15df00000000, 0xeecca58300000000, 0x7b18d51600000000, + 0x8563357200000000, 0x10b745e700000000, 0xe40bcf6700000000, + 0x71dfbff200000000, 0x8fa45f9600000000, 0x1a702f0300000000, + 0x73539f5f00000000, 0xe687efca00000000, 0x18fc0fae00000000, + 0x8d287f3b00000000, 0xcaba6f1700000000, 0x5f6e1f8200000000, + 0xa115ffe600000000, 0x34c18f7300000000, 0x5de23f2f00000000, + 0xc8364fba00000000, 0x364dafde00000000, 0xa399df4b00000000, + 0xb8698e8600000000, 0x2dbdfe1300000000, 0xd3c61e7700000000, + 0x46126ee200000000, 0x2f31debe00000000, 0xbae5ae2b00000000, + 0x449e4e4f00000000, 0xd14a3eda00000000, 0x96d82ef600000000, + 0x030c5e6300000000, 0xfd77be0700000000, 0x68a3ce9200000000, + 0x01807ece00000000, 0x94540e5b00000000, 0x6a2fee3f00000000, + 0xfffb9eaa00000000, 0x1dc93c7e00000000, 0x881d4ceb00000000, + 0x7666ac8f00000000, 0xe3b2dc1a00000000, 0x8a916c4600000000, + 0x1f451cd300000000, 0xe13efcb700000000, 0x74ea8c2200000000, + 0x33789c0e00000000, 0xa6acec9b00000000, 0x58d70cff00000000, + 0xcd037c6a00000000, 0xa420cc3600000000, 0x31f4bca300000000, + 0xcf8f5cc700000000, 0x5a5b2c5200000000, 0x41ab7d9f00000000, + 0xd47f0d0a00000000, 0x2a04ed6e00000000, 0xbfd09dfb00000000, + 0xd6f32da700000000, 0x43275d3200000000, 0xbd5cbd5600000000, + 0x2888cdc300000000, 0x6f1addef00000000, 0xfacead7a00000000, + 0x04b54d1e00000000, 0x91613d8b00000000, 0xf8428dd700000000, + 0x6d96fd4200000000, 0x93ed1d2600000000, 0x06396db300000000, + 0x168e285400000000, 0x835a58c100000000, 0x7d21b8a500000000, + 0xe8f5c83000000000, 0x81d6786c00000000, 0x140208f900000000, + 0xea79e89d00000000, 0x7fad980800000000, 0x383f882400000000, + 0xadebf8b100000000, 0x539018d500000000, 0xc644684000000000, + 0xaf67d81c00000000, 0x3ab3a88900000000, 0xc4c848ed00000000, + 0x511c387800000000, 0x4aec69b500000000, 0xdf38192000000000, + 0x2143f94400000000, 0xb49789d100000000, 0xddb4398d00000000, + 0x4860491800000000, 0xb61ba97c00000000, 0x23cfd9e900000000, + 0x645dc9c500000000, 0xf189b95000000000, 0x0ff2593400000000, + 0x9a2629a100000000, 0xf30599fd00000000, 0x66d1e96800000000, + 0x98aa090c00000000, 0x0d7e799900000000, 0xef4cdb4d00000000, + 0x7a98abd800000000, 0x84e34bbc00000000, 0x11373b2900000000, + 0x78148b7500000000, 0xedc0fbe000000000, 0x13bb1b8400000000, + 0x866f6b1100000000, 0xc1fd7b3d00000000, 0x54290ba800000000, + 0xaa52ebcc00000000, 0x3f869b5900000000, 0x56a52b0500000000, + 0xc3715b9000000000, 0x3d0abbf400000000, 0xa8decb6100000000, + 0xb32e9aac00000000, 0x26faea3900000000, 0xd8810a5d00000000, + 0x4d557ac800000000, 0x2476ca9400000000, 0xb1a2ba0100000000, + 0x4fd95a6500000000, 0xda0d2af000000000, 0x9d9f3adc00000000, + 0x084b4a4900000000, 0xf630aa2d00000000, 0x63e4dab800000000, + 0x0ac76ae400000000, 0x9f131a7100000000, 0x6168fa1500000000, + 0xf4bc8a8000000000}, + {0x0000000000000000, 0x1f17f08000000000, 0x7f2891da00000000, + 0x603f615a00000000, 0xbf56536e00000000, 0xa041a3ee00000000, + 0xc07ec2b400000000, 0xdf69323400000000, 0x7eada6dc00000000, + 0x61ba565c00000000, 0x0185370600000000, 0x1e92c78600000000, + 0xc1fbf5b200000000, 0xdeec053200000000, 0xbed3646800000000, + 0xa1c494e800000000, 0xbd5c3c6200000000, 0xa24bcce200000000, + 0xc274adb800000000, 0xdd635d3800000000, 0x020a6f0c00000000, + 0x1d1d9f8c00000000, 0x7d22fed600000000, 0x62350e5600000000, + 0xc3f19abe00000000, 0xdce66a3e00000000, 0xbcd90b6400000000, + 0xa3cefbe400000000, 0x7ca7c9d000000000, 0x63b0395000000000, + 0x038f580a00000000, 0x1c98a88a00000000, 0x7ab978c400000000, + 0x65ae884400000000, 0x0591e91e00000000, 0x1a86199e00000000, + 0xc5ef2baa00000000, 0xdaf8db2a00000000, 0xbac7ba7000000000, + 0xa5d04af000000000, 0x0414de1800000000, 0x1b032e9800000000, + 0x7b3c4fc200000000, 0x642bbf4200000000, 0xbb428d7600000000, + 0xa4557df600000000, 0xc46a1cac00000000, 0xdb7dec2c00000000, + 0xc7e544a600000000, 0xd8f2b42600000000, 0xb8cdd57c00000000, + 0xa7da25fc00000000, 0x78b317c800000000, 0x67a4e74800000000, + 0x079b861200000000, 0x188c769200000000, 0xb948e27a00000000, + 0xa65f12fa00000000, 0xc66073a000000000, 0xd977832000000000, + 0x061eb11400000000, 0x1909419400000000, 0x793620ce00000000, + 0x6621d04e00000000, 0xb574805300000000, 0xaa6370d300000000, + 0xca5c118900000000, 0xd54be10900000000, 0x0a22d33d00000000, + 0x153523bd00000000, 0x750a42e700000000, 0x6a1db26700000000, + 0xcbd9268f00000000, 0xd4ced60f00000000, 0xb4f1b75500000000, + 0xabe647d500000000, 0x748f75e100000000, 0x6b98856100000000, + 0x0ba7e43b00000000, 0x14b014bb00000000, 0x0828bc3100000000, + 0x173f4cb100000000, 0x77002deb00000000, 0x6817dd6b00000000, + 0xb77eef5f00000000, 0xa8691fdf00000000, 0xc8567e8500000000, + 0xd7418e0500000000, 0x76851aed00000000, 0x6992ea6d00000000, + 0x09ad8b3700000000, 0x16ba7bb700000000, 0xc9d3498300000000, + 0xd6c4b90300000000, 0xb6fbd85900000000, 0xa9ec28d900000000, + 0xcfcdf89700000000, 0xd0da081700000000, 0xb0e5694d00000000, + 0xaff299cd00000000, 0x709babf900000000, 0x6f8c5b7900000000, + 0x0fb33a2300000000, 0x10a4caa300000000, 0xb1605e4b00000000, + 0xae77aecb00000000, 0xce48cf9100000000, 0xd15f3f1100000000, + 0x0e360d2500000000, 0x1121fda500000000, 0x711e9cff00000000, + 0x6e096c7f00000000, 0x7291c4f500000000, 0x6d86347500000000, + 0x0db9552f00000000, 0x12aea5af00000000, 0xcdc7979b00000000, + 0xd2d0671b00000000, 0xb2ef064100000000, 0xadf8f6c100000000, + 0x0c3c622900000000, 0x132b92a900000000, 0x7314f3f300000000, + 0x6c03037300000000, 0xb36a314700000000, 0xac7dc1c700000000, + 0xcc42a09d00000000, 0xd355501d00000000, 0x6ae900a700000000, + 0x75fef02700000000, 0x15c1917d00000000, 0x0ad661fd00000000, + 0xd5bf53c900000000, 0xcaa8a34900000000, 0xaa97c21300000000, + 0xb580329300000000, 0x1444a67b00000000, 0x0b5356fb00000000, + 0x6b6c37a100000000, 0x747bc72100000000, 0xab12f51500000000, + 0xb405059500000000, 0xd43a64cf00000000, 0xcb2d944f00000000, + 0xd7b53cc500000000, 0xc8a2cc4500000000, 0xa89dad1f00000000, + 0xb78a5d9f00000000, 0x68e36fab00000000, 0x77f49f2b00000000, + 0x17cbfe7100000000, 0x08dc0ef100000000, 0xa9189a1900000000, + 0xb60f6a9900000000, 0xd6300bc300000000, 0xc927fb4300000000, + 0x164ec97700000000, 0x095939f700000000, 0x696658ad00000000, + 0x7671a82d00000000, 0x1050786300000000, 0x0f4788e300000000, + 0x6f78e9b900000000, 0x706f193900000000, 0xaf062b0d00000000, + 0xb011db8d00000000, 0xd02ebad700000000, 0xcf394a5700000000, + 0x6efddebf00000000, 0x71ea2e3f00000000, 0x11d54f6500000000, + 0x0ec2bfe500000000, 0xd1ab8dd100000000, 0xcebc7d5100000000, + 0xae831c0b00000000, 0xb194ec8b00000000, 0xad0c440100000000, + 0xb21bb48100000000, 0xd224d5db00000000, 0xcd33255b00000000, + 0x125a176f00000000, 0x0d4de7ef00000000, 0x6d7286b500000000, + 0x7265763500000000, 0xd3a1e2dd00000000, 0xccb6125d00000000, + 0xac89730700000000, 0xb39e838700000000, 0x6cf7b1b300000000, + 0x73e0413300000000, 0x13df206900000000, 0x0cc8d0e900000000, + 0xdf9d80f400000000, 0xc08a707400000000, 0xa0b5112e00000000, + 0xbfa2e1ae00000000, 0x60cbd39a00000000, 0x7fdc231a00000000, + 0x1fe3424000000000, 0x00f4b2c000000000, 0xa130262800000000, + 0xbe27d6a800000000, 0xde18b7f200000000, 0xc10f477200000000, + 0x1e66754600000000, 0x017185c600000000, 0x614ee49c00000000, + 0x7e59141c00000000, 0x62c1bc9600000000, 0x7dd64c1600000000, + 0x1de92d4c00000000, 0x02feddcc00000000, 0xdd97eff800000000, + 0xc2801f7800000000, 0xa2bf7e2200000000, 0xbda88ea200000000, + 0x1c6c1a4a00000000, 0x037beaca00000000, 0x63448b9000000000, + 0x7c537b1000000000, 0xa33a492400000000, 0xbc2db9a400000000, + 0xdc12d8fe00000000, 0xc305287e00000000, 0xa524f83000000000, + 0xba3308b000000000, 0xda0c69ea00000000, 0xc51b996a00000000, + 0x1a72ab5e00000000, 0x05655bde00000000, 0x655a3a8400000000, + 0x7a4dca0400000000, 0xdb895eec00000000, 0xc49eae6c00000000, + 0xa4a1cf3600000000, 0xbbb63fb600000000, 0x64df0d8200000000, + 0x7bc8fd0200000000, 0x1bf79c5800000000, 0x04e06cd800000000, + 0x1878c45200000000, 0x076f34d200000000, 0x6750558800000000, + 0x7847a50800000000, 0xa72e973c00000000, 0xb83967bc00000000, + 0xd80606e600000000, 0xc711f66600000000, 0x66d5628e00000000, + 0x79c2920e00000000, 0x19fdf35400000000, 0x06ea03d400000000, + 0xd98331e000000000, 0xc694c16000000000, 0xa6aba03a00000000, + 0xb9bc50ba00000000}, + {0x0000000000000000, 0xe2fd888d00000000, 0x85fd60c000000000, + 0x6700e84d00000000, 0x4bfdb05b00000000, 0xa90038d600000000, + 0xce00d09b00000000, 0x2cfd581600000000, 0x96fa61b700000000, + 0x7407e93a00000000, 0x1307017700000000, 0xf1fa89fa00000000, + 0xdd07d1ec00000000, 0x3ffa596100000000, 0x58fab12c00000000, + 0xba0739a100000000, 0x6df3b2b500000000, 0x8f0e3a3800000000, + 0xe80ed27500000000, 0x0af35af800000000, 0x260e02ee00000000, + 0xc4f38a6300000000, 0xa3f3622e00000000, 0x410eeaa300000000, + 0xfb09d30200000000, 0x19f45b8f00000000, 0x7ef4b3c200000000, + 0x9c093b4f00000000, 0xb0f4635900000000, 0x5209ebd400000000, + 0x3509039900000000, 0xd7f48b1400000000, 0x9be014b000000000, + 0x791d9c3d00000000, 0x1e1d747000000000, 0xfce0fcfd00000000, + 0xd01da4eb00000000, 0x32e02c6600000000, 0x55e0c42b00000000, + 0xb71d4ca600000000, 0x0d1a750700000000, 0xefe7fd8a00000000, + 0x88e715c700000000, 0x6a1a9d4a00000000, 0x46e7c55c00000000, + 0xa41a4dd100000000, 0xc31aa59c00000000, 0x21e72d1100000000, + 0xf613a60500000000, 0x14ee2e8800000000, 0x73eec6c500000000, + 0x91134e4800000000, 0xbdee165e00000000, 0x5f139ed300000000, + 0x3813769e00000000, 0xdaeefe1300000000, 0x60e9c7b200000000, + 0x82144f3f00000000, 0xe514a77200000000, 0x07e92fff00000000, + 0x2b1477e900000000, 0xc9e9ff6400000000, 0xaee9172900000000, + 0x4c149fa400000000, 0x77c758bb00000000, 0x953ad03600000000, + 0xf23a387b00000000, 0x10c7b0f600000000, 0x3c3ae8e000000000, + 0xdec7606d00000000, 0xb9c7882000000000, 0x5b3a00ad00000000, + 0xe13d390c00000000, 0x03c0b18100000000, 0x64c059cc00000000, + 0x863dd14100000000, 0xaac0895700000000, 0x483d01da00000000, + 0x2f3de99700000000, 0xcdc0611a00000000, 0x1a34ea0e00000000, + 0xf8c9628300000000, 0x9fc98ace00000000, 0x7d34024300000000, + 0x51c95a5500000000, 0xb334d2d800000000, 0xd4343a9500000000, + 0x36c9b21800000000, 0x8cce8bb900000000, 0x6e33033400000000, + 0x0933eb7900000000, 0xebce63f400000000, 0xc7333be200000000, + 0x25ceb36f00000000, 0x42ce5b2200000000, 0xa033d3af00000000, + 0xec274c0b00000000, 0x0edac48600000000, 0x69da2ccb00000000, + 0x8b27a44600000000, 0xa7dafc5000000000, 0x452774dd00000000, + 0x22279c9000000000, 0xc0da141d00000000, 0x7add2dbc00000000, + 0x9820a53100000000, 0xff204d7c00000000, 0x1dddc5f100000000, + 0x31209de700000000, 0xd3dd156a00000000, 0xb4ddfd2700000000, + 0x562075aa00000000, 0x81d4febe00000000, 0x6329763300000000, + 0x04299e7e00000000, 0xe6d416f300000000, 0xca294ee500000000, + 0x28d4c66800000000, 0x4fd42e2500000000, 0xad29a6a800000000, + 0x172e9f0900000000, 0xf5d3178400000000, 0x92d3ffc900000000, + 0x702e774400000000, 0x5cd32f5200000000, 0xbe2ea7df00000000, + 0xd92e4f9200000000, 0x3bd3c71f00000000, 0xaf88c0ad00000000, + 0x4d75482000000000, 0x2a75a06d00000000, 0xc88828e000000000, + 0xe47570f600000000, 0x0688f87b00000000, 0x6188103600000000, + 0x837598bb00000000, 0x3972a11a00000000, 0xdb8f299700000000, + 0xbc8fc1da00000000, 0x5e72495700000000, 0x728f114100000000, + 0x907299cc00000000, 0xf772718100000000, 0x158ff90c00000000, + 0xc27b721800000000, 0x2086fa9500000000, 0x478612d800000000, + 0xa57b9a5500000000, 0x8986c24300000000, 0x6b7b4ace00000000, + 0x0c7ba28300000000, 0xee862a0e00000000, 0x548113af00000000, + 0xb67c9b2200000000, 0xd17c736f00000000, 0x3381fbe200000000, + 0x1f7ca3f400000000, 0xfd812b7900000000, 0x9a81c33400000000, + 0x787c4bb900000000, 0x3468d41d00000000, 0xd6955c9000000000, + 0xb195b4dd00000000, 0x53683c5000000000, 0x7f95644600000000, + 0x9d68eccb00000000, 0xfa68048600000000, 0x18958c0b00000000, + 0xa292b5aa00000000, 0x406f3d2700000000, 0x276fd56a00000000, + 0xc5925de700000000, 0xe96f05f100000000, 0x0b928d7c00000000, + 0x6c92653100000000, 0x8e6fedbc00000000, 0x599b66a800000000, + 0xbb66ee2500000000, 0xdc66066800000000, 0x3e9b8ee500000000, + 0x1266d6f300000000, 0xf09b5e7e00000000, 0x979bb63300000000, + 0x75663ebe00000000, 0xcf61071f00000000, 0x2d9c8f9200000000, + 0x4a9c67df00000000, 0xa861ef5200000000, 0x849cb74400000000, + 0x66613fc900000000, 0x0161d78400000000, 0xe39c5f0900000000, + 0xd84f981600000000, 0x3ab2109b00000000, 0x5db2f8d600000000, + 0xbf4f705b00000000, 0x93b2284d00000000, 0x714fa0c000000000, + 0x164f488d00000000, 0xf4b2c00000000000, 0x4eb5f9a100000000, + 0xac48712c00000000, 0xcb48996100000000, 0x29b511ec00000000, + 0x054849fa00000000, 0xe7b5c17700000000, 0x80b5293a00000000, + 0x6248a1b700000000, 0xb5bc2aa300000000, 0x5741a22e00000000, + 0x30414a6300000000, 0xd2bcc2ee00000000, 0xfe419af800000000, + 0x1cbc127500000000, 0x7bbcfa3800000000, 0x994172b500000000, + 0x23464b1400000000, 0xc1bbc39900000000, 0xa6bb2bd400000000, + 0x4446a35900000000, 0x68bbfb4f00000000, 0x8a4673c200000000, + 0xed469b8f00000000, 0x0fbb130200000000, 0x43af8ca600000000, + 0xa152042b00000000, 0xc652ec6600000000, 0x24af64eb00000000, + 0x08523cfd00000000, 0xeaafb47000000000, 0x8daf5c3d00000000, + 0x6f52d4b000000000, 0xd555ed1100000000, 0x37a8659c00000000, + 0x50a88dd100000000, 0xb255055c00000000, 0x9ea85d4a00000000, + 0x7c55d5c700000000, 0x1b553d8a00000000, 0xf9a8b50700000000, + 0x2e5c3e1300000000, 0xcca1b69e00000000, 0xaba15ed300000000, + 0x495cd65e00000000, 0x65a18e4800000000, 0x875c06c500000000, + 0xe05cee8800000000, 0x02a1660500000000, 0xb8a65fa400000000, + 0x5a5bd72900000000, 0x3d5b3f6400000000, 0xdfa6b7e900000000, + 0xf35befff00000000, 0x11a6677200000000, 0x76a68f3f00000000, + 0x945b07b200000000}, + {0x0000000000000000, 0xa90b894e00000000, 0x5217129d00000000, + 0xfb1c9bd300000000, 0xe52855e100000000, 0x4c23dcaf00000000, + 0xb73f477c00000000, 0x1e34ce3200000000, 0x8b57db1900000000, + 0x225c525700000000, 0xd940c98400000000, 0x704b40ca00000000, + 0x6e7f8ef800000000, 0xc77407b600000000, 0x3c689c6500000000, + 0x9563152b00000000, 0x16afb63300000000, 0xbfa43f7d00000000, + 0x44b8a4ae00000000, 0xedb32de000000000, 0xf387e3d200000000, + 0x5a8c6a9c00000000, 0xa190f14f00000000, 0x089b780100000000, + 0x9df86d2a00000000, 0x34f3e46400000000, 0xcfef7fb700000000, + 0x66e4f6f900000000, 0x78d038cb00000000, 0xd1dbb18500000000, + 0x2ac72a5600000000, 0x83cca31800000000, 0x2c5e6d6700000000, + 0x8555e42900000000, 0x7e497ffa00000000, 0xd742f6b400000000, + 0xc976388600000000, 0x607db1c800000000, 0x9b612a1b00000000, + 0x326aa35500000000, 0xa709b67e00000000, 0x0e023f3000000000, + 0xf51ea4e300000000, 0x5c152dad00000000, 0x4221e39f00000000, + 0xeb2a6ad100000000, 0x1036f10200000000, 0xb93d784c00000000, + 0x3af1db5400000000, 0x93fa521a00000000, 0x68e6c9c900000000, + 0xc1ed408700000000, 0xdfd98eb500000000, 0x76d207fb00000000, + 0x8dce9c2800000000, 0x24c5156600000000, 0xb1a6004d00000000, + 0x18ad890300000000, 0xe3b112d000000000, 0x4aba9b9e00000000, + 0x548e55ac00000000, 0xfd85dce200000000, 0x0699473100000000, + 0xaf92ce7f00000000, 0x58bcdace00000000, 0xf1b7538000000000, + 0x0aabc85300000000, 0xa3a0411d00000000, 0xbd948f2f00000000, + 0x149f066100000000, 0xef839db200000000, 0x468814fc00000000, + 0xd3eb01d700000000, 0x7ae0889900000000, 0x81fc134a00000000, + 0x28f79a0400000000, 0x36c3543600000000, 0x9fc8dd7800000000, + 0x64d446ab00000000, 0xcddfcfe500000000, 0x4e136cfd00000000, + 0xe718e5b300000000, 0x1c047e6000000000, 0xb50ff72e00000000, + 0xab3b391c00000000, 0x0230b05200000000, 0xf92c2b8100000000, + 0x5027a2cf00000000, 0xc544b7e400000000, 0x6c4f3eaa00000000, + 0x9753a57900000000, 0x3e582c3700000000, 0x206ce20500000000, + 0x89676b4b00000000, 0x727bf09800000000, 0xdb7079d600000000, + 0x74e2b7a900000000, 0xdde93ee700000000, 0x26f5a53400000000, + 0x8ffe2c7a00000000, 0x91cae24800000000, 0x38c16b0600000000, + 0xc3ddf0d500000000, 0x6ad6799b00000000, 0xffb56cb000000000, + 0x56bee5fe00000000, 0xada27e2d00000000, 0x04a9f76300000000, + 0x1a9d395100000000, 0xb396b01f00000000, 0x488a2bcc00000000, + 0xe181a28200000000, 0x624d019a00000000, 0xcb4688d400000000, + 0x305a130700000000, 0x99519a4900000000, 0x8765547b00000000, + 0x2e6edd3500000000, 0xd57246e600000000, 0x7c79cfa800000000, + 0xe91ada8300000000, 0x401153cd00000000, 0xbb0dc81e00000000, + 0x1206415000000000, 0x0c328f6200000000, 0xa539062c00000000, + 0x5e259dff00000000, 0xf72e14b100000000, 0xf17ec44600000000, + 0x58754d0800000000, 0xa369d6db00000000, 0x0a625f9500000000, + 0x145691a700000000, 0xbd5d18e900000000, 0x4641833a00000000, + 0xef4a0a7400000000, 0x7a291f5f00000000, 0xd322961100000000, + 0x283e0dc200000000, 0x8135848c00000000, 0x9f014abe00000000, + 0x360ac3f000000000, 0xcd16582300000000, 0x641dd16d00000000, + 0xe7d1727500000000, 0x4edafb3b00000000, 0xb5c660e800000000, + 0x1ccde9a600000000, 0x02f9279400000000, 0xabf2aeda00000000, + 0x50ee350900000000, 0xf9e5bc4700000000, 0x6c86a96c00000000, + 0xc58d202200000000, 0x3e91bbf100000000, 0x979a32bf00000000, + 0x89aefc8d00000000, 0x20a575c300000000, 0xdbb9ee1000000000, + 0x72b2675e00000000, 0xdd20a92100000000, 0x742b206f00000000, + 0x8f37bbbc00000000, 0x263c32f200000000, 0x3808fcc000000000, + 0x9103758e00000000, 0x6a1fee5d00000000, 0xc314671300000000, + 0x5677723800000000, 0xff7cfb7600000000, 0x046060a500000000, + 0xad6be9eb00000000, 0xb35f27d900000000, 0x1a54ae9700000000, + 0xe148354400000000, 0x4843bc0a00000000, 0xcb8f1f1200000000, + 0x6284965c00000000, 0x99980d8f00000000, 0x309384c100000000, + 0x2ea74af300000000, 0x87acc3bd00000000, 0x7cb0586e00000000, + 0xd5bbd12000000000, 0x40d8c40b00000000, 0xe9d34d4500000000, + 0x12cfd69600000000, 0xbbc45fd800000000, 0xa5f091ea00000000, + 0x0cfb18a400000000, 0xf7e7837700000000, 0x5eec0a3900000000, + 0xa9c21e8800000000, 0x00c997c600000000, 0xfbd50c1500000000, + 0x52de855b00000000, 0x4cea4b6900000000, 0xe5e1c22700000000, + 0x1efd59f400000000, 0xb7f6d0ba00000000, 0x2295c59100000000, + 0x8b9e4cdf00000000, 0x7082d70c00000000, 0xd9895e4200000000, + 0xc7bd907000000000, 0x6eb6193e00000000, 0x95aa82ed00000000, + 0x3ca10ba300000000, 0xbf6da8bb00000000, 0x166621f500000000, + 0xed7aba2600000000, 0x4471336800000000, 0x5a45fd5a00000000, + 0xf34e741400000000, 0x0852efc700000000, 0xa159668900000000, + 0x343a73a200000000, 0x9d31faec00000000, 0x662d613f00000000, + 0xcf26e87100000000, 0xd112264300000000, 0x7819af0d00000000, + 0x830534de00000000, 0x2a0ebd9000000000, 0x859c73ef00000000, + 0x2c97faa100000000, 0xd78b617200000000, 0x7e80e83c00000000, + 0x60b4260e00000000, 0xc9bfaf4000000000, 0x32a3349300000000, + 0x9ba8bddd00000000, 0x0ecba8f600000000, 0xa7c021b800000000, + 0x5cdcba6b00000000, 0xf5d7332500000000, 0xebe3fd1700000000, + 0x42e8745900000000, 0xb9f4ef8a00000000, 0x10ff66c400000000, + 0x9333c5dc00000000, 0x3a384c9200000000, 0xc124d74100000000, + 0x682f5e0f00000000, 0x761b903d00000000, 0xdf10197300000000, + 0x240c82a000000000, 0x8d070bee00000000, 0x18641ec500000000, + 0xb16f978b00000000, 0x4a730c5800000000, 0xe378851600000000, + 0xfd4c4b2400000000, 0x5447c26a00000000, 0xaf5b59b900000000, + 0x0650d0f700000000}, + {0x0000000000000000, 0x479244af00000000, 0xcf22f88500000000, + 0x88b0bc2a00000000, 0xdf4381d000000000, 0x98d1c57f00000000, + 0x1061795500000000, 0x57f33dfa00000000, 0xff81737a00000000, + 0xb81337d500000000, 0x30a38bff00000000, 0x7731cf5000000000, + 0x20c2f2aa00000000, 0x6750b60500000000, 0xefe00a2f00000000, + 0xa8724e8000000000, 0xfe03e7f400000000, 0xb991a35b00000000, + 0x31211f7100000000, 0x76b35bde00000000, 0x2140662400000000, + 0x66d2228b00000000, 0xee629ea100000000, 0xa9f0da0e00000000, + 0x0182948e00000000, 0x4610d02100000000, 0xcea06c0b00000000, + 0x893228a400000000, 0xdec1155e00000000, 0x995351f100000000, + 0x11e3eddb00000000, 0x5671a97400000000, 0xbd01bf3200000000, + 0xfa93fb9d00000000, 0x722347b700000000, 0x35b1031800000000, + 0x62423ee200000000, 0x25d07a4d00000000, 0xad60c66700000000, + 0xeaf282c800000000, 0x4280cc4800000000, 0x051288e700000000, + 0x8da234cd00000000, 0xca30706200000000, 0x9dc34d9800000000, + 0xda51093700000000, 0x52e1b51d00000000, 0x1573f1b200000000, + 0x430258c600000000, 0x04901c6900000000, 0x8c20a04300000000, + 0xcbb2e4ec00000000, 0x9c41d91600000000, 0xdbd39db900000000, + 0x5363219300000000, 0x14f1653c00000000, 0xbc832bbc00000000, + 0xfb116f1300000000, 0x73a1d33900000000, 0x3433979600000000, + 0x63c0aa6c00000000, 0x2452eec300000000, 0xace252e900000000, + 0xeb70164600000000, 0x7a037e6500000000, 0x3d913aca00000000, + 0xb52186e000000000, 0xf2b3c24f00000000, 0xa540ffb500000000, + 0xe2d2bb1a00000000, 0x6a62073000000000, 0x2df0439f00000000, + 0x85820d1f00000000, 0xc21049b000000000, 0x4aa0f59a00000000, + 0x0d32b13500000000, 0x5ac18ccf00000000, 0x1d53c86000000000, + 0x95e3744a00000000, 0xd27130e500000000, 0x8400999100000000, + 0xc392dd3e00000000, 0x4b22611400000000, 0x0cb025bb00000000, + 0x5b43184100000000, 0x1cd15cee00000000, 0x9461e0c400000000, + 0xd3f3a46b00000000, 0x7b81eaeb00000000, 0x3c13ae4400000000, + 0xb4a3126e00000000, 0xf33156c100000000, 0xa4c26b3b00000000, + 0xe3502f9400000000, 0x6be093be00000000, 0x2c72d71100000000, + 0xc702c15700000000, 0x809085f800000000, 0x082039d200000000, + 0x4fb27d7d00000000, 0x1841408700000000, 0x5fd3042800000000, + 0xd763b80200000000, 0x90f1fcad00000000, 0x3883b22d00000000, + 0x7f11f68200000000, 0xf7a14aa800000000, 0xb0330e0700000000, + 0xe7c033fd00000000, 0xa052775200000000, 0x28e2cb7800000000, + 0x6f708fd700000000, 0x390126a300000000, 0x7e93620c00000000, + 0xf623de2600000000, 0xb1b19a8900000000, 0xe642a77300000000, + 0xa1d0e3dc00000000, 0x29605ff600000000, 0x6ef21b5900000000, + 0xc68055d900000000, 0x8112117600000000, 0x09a2ad5c00000000, + 0x4e30e9f300000000, 0x19c3d40900000000, 0x5e5190a600000000, + 0xd6e12c8c00000000, 0x9173682300000000, 0xf406fcca00000000, + 0xb394b86500000000, 0x3b24044f00000000, 0x7cb640e000000000, + 0x2b457d1a00000000, 0x6cd739b500000000, 0xe467859f00000000, + 0xa3f5c13000000000, 0x0b878fb000000000, 0x4c15cb1f00000000, + 0xc4a5773500000000, 0x8337339a00000000, 0xd4c40e6000000000, + 0x93564acf00000000, 0x1be6f6e500000000, 0x5c74b24a00000000, + 0x0a051b3e00000000, 0x4d975f9100000000, 0xc527e3bb00000000, + 0x82b5a71400000000, 0xd5469aee00000000, 0x92d4de4100000000, + 0x1a64626b00000000, 0x5df626c400000000, 0xf584684400000000, + 0xb2162ceb00000000, 0x3aa690c100000000, 0x7d34d46e00000000, + 0x2ac7e99400000000, 0x6d55ad3b00000000, 0xe5e5111100000000, + 0xa27755be00000000, 0x490743f800000000, 0x0e95075700000000, + 0x8625bb7d00000000, 0xc1b7ffd200000000, 0x9644c22800000000, + 0xd1d6868700000000, 0x59663aad00000000, 0x1ef47e0200000000, + 0xb686308200000000, 0xf114742d00000000, 0x79a4c80700000000, + 0x3e368ca800000000, 0x69c5b15200000000, 0x2e57f5fd00000000, + 0xa6e749d700000000, 0xe1750d7800000000, 0xb704a40c00000000, + 0xf096e0a300000000, 0x78265c8900000000, 0x3fb4182600000000, + 0x684725dc00000000, 0x2fd5617300000000, 0xa765dd5900000000, + 0xe0f799f600000000, 0x4885d77600000000, 0x0f1793d900000000, + 0x87a72ff300000000, 0xc0356b5c00000000, 0x97c656a600000000, + 0xd054120900000000, 0x58e4ae2300000000, 0x1f76ea8c00000000, + 0x8e0582af00000000, 0xc997c60000000000, 0x41277a2a00000000, + 0x06b53e8500000000, 0x5146037f00000000, 0x16d447d000000000, + 0x9e64fbfa00000000, 0xd9f6bf5500000000, 0x7184f1d500000000, + 0x3616b57a00000000, 0xbea6095000000000, 0xf9344dff00000000, + 0xaec7700500000000, 0xe95534aa00000000, 0x61e5888000000000, + 0x2677cc2f00000000, 0x7006655b00000000, 0x379421f400000000, + 0xbf249dde00000000, 0xf8b6d97100000000, 0xaf45e48b00000000, + 0xe8d7a02400000000, 0x60671c0e00000000, 0x27f558a100000000, + 0x8f87162100000000, 0xc815528e00000000, 0x40a5eea400000000, + 0x0737aa0b00000000, 0x50c497f100000000, 0x1756d35e00000000, + 0x9fe66f7400000000, 0xd8742bdb00000000, 0x33043d9d00000000, + 0x7496793200000000, 0xfc26c51800000000, 0xbbb481b700000000, + 0xec47bc4d00000000, 0xabd5f8e200000000, 0x236544c800000000, + 0x64f7006700000000, 0xcc854ee700000000, 0x8b170a4800000000, + 0x03a7b66200000000, 0x4435f2cd00000000, 0x13c6cf3700000000, + 0x54548b9800000000, 0xdce437b200000000, 0x9b76731d00000000, + 0xcd07da6900000000, 0x8a959ec600000000, 0x022522ec00000000, + 0x45b7664300000000, 0x12445bb900000000, 0x55d61f1600000000, + 0xdd66a33c00000000, 0x9af4e79300000000, 0x3286a91300000000, + 0x7514edbc00000000, 0xfda4519600000000, 0xba36153900000000, + 0xedc528c300000000, 0xaa576c6c00000000, 0x22e7d04600000000, + 0x657594e900000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59, + 0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4, + 0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67, + 0x7c9f7021, 0xe0c6ab25, 0x85a19063, 0x2a08dda9, 0x4f6fe6ef, + 0xae2b407c, 0xcb4c7b3a, 0x64e536f0, 0x01820db6, 0x7d1d7d97, + 0x187a46d1, 0xb7d30b1b, 0xd2b4305d, 0x33f096ce, 0x5697ad88, + 0xf93ee042, 0x9c59db04, 0x1afc500b, 0x7f9b6b4d, 0xd0322687, + 0xb5551dc1, 0x5411bb52, 0x31768014, 0x9edfcdde, 0xfbb8f698, + 0x872786b9, 0xe240bdff, 0x4de9f035, 0x288ecb73, 0xc9ca6de0, + 0xacad56a6, 0x03041b6c, 0x6663202a, 0xfa3afb2e, 0x9f5dc068, + 0x30f48da2, 0x5593b6e4, 0xb4d71077, 0xd1b02b31, 0x7e1966fb, + 0x1b7e5dbd, 0x67e12d9c, 0x028616da, 0xad2f5b10, 0xc8486056, + 0x290cc6c5, 0x4c6bfd83, 0xe3c2b049, 0x86a58b0f, 0x35f8a016, + 0x509f9b50, 0xff36d69a, 0x9a51eddc, 0x7b154b4f, 0x1e727009, + 0xb1db3dc3, 0xd4bc0685, 0xa82376a4, 0xcd444de2, 0x62ed0028, + 0x078a3b6e, 0xe6ce9dfd, 0x83a9a6bb, 0x2c00eb71, 0x4967d037, + 0xd53e0b33, 0xb0593075, 0x1ff07dbf, 0x7a9746f9, 0x9bd3e06a, + 0xfeb4db2c, 0x511d96e6, 0x347aada0, 0x48e5dd81, 0x2d82e6c7, + 0x822bab0d, 0xe74c904b, 0x060836d8, 0x636f0d9e, 0xccc64054, + 0xa9a17b12, 0x2f04f01d, 0x4a63cb5b, 0xe5ca8691, 0x80adbdd7, + 0x61e91b44, 0x048e2002, 0xab276dc8, 0xce40568e, 0xb2df26af, + 0xd7b81de9, 0x78115023, 0x1d766b65, 0xfc32cdf6, 0x9955f6b0, + 0x36fcbb7a, 0x539b803c, 0xcfc25b38, 0xaaa5607e, 0x050c2db4, + 0x606b16f2, 0x812fb061, 0xe4488b27, 0x4be1c6ed, 0x2e86fdab, + 0x52198d8a, 0x377eb6cc, 0x98d7fb06, 0xfdb0c040, 0x1cf466d3, + 0x79935d95, 0xd63a105f, 0xb35d2b19, 0x6bf1402c, 0x0e967b6a, + 0xa13f36a0, 0xc4580de6, 0x251cab75, 0x407b9033, 0xefd2ddf9, + 0x8ab5e6bf, 0xf62a969e, 0x934dadd8, 0x3ce4e012, 0x5983db54, + 0xb8c77dc7, 0xdda04681, 0x72090b4b, 0x176e300d, 0x8b37eb09, + 0xee50d04f, 0x41f99d85, 0x249ea6c3, 0xc5da0050, 0xa0bd3b16, + 0x0f1476dc, 0x6a734d9a, 0x16ec3dbb, 0x738b06fd, 0xdc224b37, + 0xb9457071, 0x5801d6e2, 0x3d66eda4, 0x92cfa06e, 0xf7a89b28, + 0x710d1027, 0x146a2b61, 0xbbc366ab, 0xdea45ded, 0x3fe0fb7e, + 0x5a87c038, 0xf52e8df2, 0x9049b6b4, 0xecd6c695, 0x89b1fdd3, + 0x2618b019, 0x437f8b5f, 0xa23b2dcc, 0xc75c168a, 0x68f55b40, + 0x0d926006, 0x91cbbb02, 0xf4ac8044, 0x5b05cd8e, 0x3e62f6c8, + 0xdf26505b, 0xba416b1d, 0x15e826d7, 0x708f1d91, 0x0c106db0, + 0x697756f6, 0xc6de1b3c, 0xa3b9207a, 0x42fd86e9, 0x279abdaf, + 0x8833f065, 0xed54cb23, 0x5e09e03a, 0x3b6edb7c, 0x94c796b6, + 0xf1a0adf0, 0x10e40b63, 0x75833025, 0xda2a7def, 0xbf4d46a9, + 0xc3d23688, 0xa6b50dce, 0x091c4004, 0x6c7b7b42, 0x8d3fddd1, + 0xe858e697, 0x47f1ab5d, 0x2296901b, 0xbecf4b1f, 0xdba87059, + 0x74013d93, 0x116606d5, 0xf022a046, 0x95459b00, 0x3aecd6ca, + 0x5f8bed8c, 0x23149dad, 0x4673a6eb, 0xe9daeb21, 0x8cbdd067, + 0x6df976f4, 0x089e4db2, 0xa7370078, 0xc2503b3e, 0x44f5b031, + 0x21928b77, 0x8e3bc6bd, 0xeb5cfdfb, 0x0a185b68, 0x6f7f602e, + 0xc0d62de4, 0xa5b116a2, 0xd92e6683, 0xbc495dc5, 0x13e0100f, + 0x76872b49, 0x97c38dda, 0xf2a4b69c, 0x5d0dfb56, 0x386ac010, + 0xa4331b14, 0xc1542052, 0x6efd6d98, 0x0b9a56de, 0xeadef04d, + 0x8fb9cb0b, 0x201086c1, 0x4577bd87, 0x39e8cda6, 0x5c8ff6e0, + 0xf326bb2a, 0x9641806c, 0x770526ff, 0x12621db9, 0xbdcb5073, + 0xd8ac6b35}, + {0x00000000, 0xd7e28058, 0x74b406f1, 0xa35686a9, 0xe9680de2, + 0x3e8a8dba, 0x9ddc0b13, 0x4a3e8b4b, 0x09a11d85, 0xde439ddd, + 0x7d151b74, 0xaaf79b2c, 0xe0c91067, 0x372b903f, 0x947d1696, + 0x439f96ce, 0x13423b0a, 0xc4a0bb52, 0x67f63dfb, 0xb014bda3, + 0xfa2a36e8, 0x2dc8b6b0, 0x8e9e3019, 0x597cb041, 0x1ae3268f, + 0xcd01a6d7, 0x6e57207e, 0xb9b5a026, 0xf38b2b6d, 0x2469ab35, + 0x873f2d9c, 0x50ddadc4, 0x26847614, 0xf166f64c, 0x523070e5, + 0x85d2f0bd, 0xcfec7bf6, 0x180efbae, 0xbb587d07, 0x6cbafd5f, + 0x2f256b91, 0xf8c7ebc9, 0x5b916d60, 0x8c73ed38, 0xc64d6673, + 0x11afe62b, 0xb2f96082, 0x651be0da, 0x35c64d1e, 0xe224cd46, + 0x41724bef, 0x9690cbb7, 0xdcae40fc, 0x0b4cc0a4, 0xa81a460d, + 0x7ff8c655, 0x3c67509b, 0xeb85d0c3, 0x48d3566a, 0x9f31d632, + 0xd50f5d79, 0x02eddd21, 0xa1bb5b88, 0x7659dbd0, 0x4d08ec28, + 0x9aea6c70, 0x39bcead9, 0xee5e6a81, 0xa460e1ca, 0x73826192, + 0xd0d4e73b, 0x07366763, 0x44a9f1ad, 0x934b71f5, 0x301df75c, + 0xe7ff7704, 0xadc1fc4f, 0x7a237c17, 0xd975fabe, 0x0e977ae6, + 0x5e4ad722, 0x89a8577a, 0x2afed1d3, 0xfd1c518b, 0xb722dac0, + 0x60c05a98, 0xc396dc31, 0x14745c69, 0x57ebcaa7, 0x80094aff, + 0x235fcc56, 0xf4bd4c0e, 0xbe83c745, 0x6961471d, 0xca37c1b4, + 0x1dd541ec, 0x6b8c9a3c, 0xbc6e1a64, 0x1f389ccd, 0xc8da1c95, + 0x82e497de, 0x55061786, 0xf650912f, 0x21b21177, 0x622d87b9, + 0xb5cf07e1, 0x16998148, 0xc17b0110, 0x8b458a5b, 0x5ca70a03, + 0xfff18caa, 0x28130cf2, 0x78cea136, 0xaf2c216e, 0x0c7aa7c7, + 0xdb98279f, 0x91a6acd4, 0x46442c8c, 0xe512aa25, 0x32f02a7d, + 0x716fbcb3, 0xa68d3ceb, 0x05dbba42, 0xd2393a1a, 0x9807b151, + 0x4fe53109, 0xecb3b7a0, 0x3b5137f8, 0x9a11d850, 0x4df35808, + 0xeea5dea1, 0x39475ef9, 0x7379d5b2, 0xa49b55ea, 0x07cdd343, + 0xd02f531b, 0x93b0c5d5, 0x4452458d, 0xe704c324, 0x30e6437c, + 0x7ad8c837, 0xad3a486f, 0x0e6ccec6, 0xd98e4e9e, 0x8953e35a, + 0x5eb16302, 0xfde7e5ab, 0x2a0565f3, 0x603beeb8, 0xb7d96ee0, + 0x148fe849, 0xc36d6811, 0x80f2fedf, 0x57107e87, 0xf446f82e, + 0x23a47876, 0x699af33d, 0xbe787365, 0x1d2ef5cc, 0xcacc7594, + 0xbc95ae44, 0x6b772e1c, 0xc821a8b5, 0x1fc328ed, 0x55fda3a6, + 0x821f23fe, 0x2149a557, 0xf6ab250f, 0xb534b3c1, 0x62d63399, + 0xc180b530, 0x16623568, 0x5c5cbe23, 0x8bbe3e7b, 0x28e8b8d2, + 0xff0a388a, 0xafd7954e, 0x78351516, 0xdb6393bf, 0x0c8113e7, + 0x46bf98ac, 0x915d18f4, 0x320b9e5d, 0xe5e91e05, 0xa67688cb, + 0x71940893, 0xd2c28e3a, 0x05200e62, 0x4f1e8529, 0x98fc0571, + 0x3baa83d8, 0xec480380, 0xd7193478, 0x00fbb420, 0xa3ad3289, + 0x744fb2d1, 0x3e71399a, 0xe993b9c2, 0x4ac53f6b, 0x9d27bf33, + 0xdeb829fd, 0x095aa9a5, 0xaa0c2f0c, 0x7deeaf54, 0x37d0241f, + 0xe032a447, 0x436422ee, 0x9486a2b6, 0xc45b0f72, 0x13b98f2a, + 0xb0ef0983, 0x670d89db, 0x2d330290, 0xfad182c8, 0x59870461, + 0x8e658439, 0xcdfa12f7, 0x1a1892af, 0xb94e1406, 0x6eac945e, + 0x24921f15, 0xf3709f4d, 0x502619e4, 0x87c499bc, 0xf19d426c, + 0x267fc234, 0x8529449d, 0x52cbc4c5, 0x18f54f8e, 0xcf17cfd6, + 0x6c41497f, 0xbba3c927, 0xf83c5fe9, 0x2fdedfb1, 0x8c885918, + 0x5b6ad940, 0x1154520b, 0xc6b6d253, 0x65e054fa, 0xb202d4a2, + 0xe2df7966, 0x353df93e, 0x966b7f97, 0x4189ffcf, 0x0bb77484, + 0xdc55f4dc, 0x7f037275, 0xa8e1f22d, 0xeb7e64e3, 0x3c9ce4bb, + 0x9fca6212, 0x4828e24a, 0x02166901, 0xd5f4e959, 0x76a26ff0, + 0xa140efa8}, + {0x00000000, 0xef52b6e1, 0x05d46b83, 0xea86dd62, 0x0ba8d706, + 0xe4fa61e7, 0x0e7cbc85, 0xe12e0a64, 0x1751ae0c, 0xf80318ed, + 0x1285c58f, 0xfdd7736e, 0x1cf9790a, 0xf3abcfeb, 0x192d1289, + 0xf67fa468, 0x2ea35c18, 0xc1f1eaf9, 0x2b77379b, 0xc425817a, + 0x250b8b1e, 0xca593dff, 0x20dfe09d, 0xcf8d567c, 0x39f2f214, + 0xd6a044f5, 0x3c269997, 0xd3742f76, 0x325a2512, 0xdd0893f3, + 0x378e4e91, 0xd8dcf870, 0x5d46b830, 0xb2140ed1, 0x5892d3b3, + 0xb7c06552, 0x56ee6f36, 0xb9bcd9d7, 0x533a04b5, 0xbc68b254, + 0x4a17163c, 0xa545a0dd, 0x4fc37dbf, 0xa091cb5e, 0x41bfc13a, + 0xaeed77db, 0x446baab9, 0xab391c58, 0x73e5e428, 0x9cb752c9, + 0x76318fab, 0x9963394a, 0x784d332e, 0x971f85cf, 0x7d9958ad, + 0x92cbee4c, 0x64b44a24, 0x8be6fcc5, 0x616021a7, 0x8e329746, + 0x6f1c9d22, 0x804e2bc3, 0x6ac8f6a1, 0x859a4040, 0xba8d7060, + 0x55dfc681, 0xbf591be3, 0x500bad02, 0xb125a766, 0x5e771187, + 0xb4f1cce5, 0x5ba37a04, 0xaddcde6c, 0x428e688d, 0xa808b5ef, + 0x475a030e, 0xa674096a, 0x4926bf8b, 0xa3a062e9, 0x4cf2d408, + 0x942e2c78, 0x7b7c9a99, 0x91fa47fb, 0x7ea8f11a, 0x9f86fb7e, + 0x70d44d9f, 0x9a5290fd, 0x7500261c, 0x837f8274, 0x6c2d3495, + 0x86abe9f7, 0x69f95f16, 0x88d75572, 0x6785e393, 0x8d033ef1, + 0x62518810, 0xe7cbc850, 0x08997eb1, 0xe21fa3d3, 0x0d4d1532, + 0xec631f56, 0x0331a9b7, 0xe9b774d5, 0x06e5c234, 0xf09a665c, + 0x1fc8d0bd, 0xf54e0ddf, 0x1a1cbb3e, 0xfb32b15a, 0x146007bb, + 0xfee6dad9, 0x11b46c38, 0xc9689448, 0x263a22a9, 0xccbcffcb, + 0x23ee492a, 0xc2c0434e, 0x2d92f5af, 0xc71428cd, 0x28469e2c, + 0xde393a44, 0x316b8ca5, 0xdbed51c7, 0x34bfe726, 0xd591ed42, + 0x3ac35ba3, 0xd04586c1, 0x3f173020, 0xae6be681, 0x41395060, + 0xabbf8d02, 0x44ed3be3, 0xa5c33187, 0x4a918766, 0xa0175a04, + 0x4f45ece5, 0xb93a488d, 0x5668fe6c, 0xbcee230e, 0x53bc95ef, + 0xb2929f8b, 0x5dc0296a, 0xb746f408, 0x581442e9, 0x80c8ba99, + 0x6f9a0c78, 0x851cd11a, 0x6a4e67fb, 0x8b606d9f, 0x6432db7e, + 0x8eb4061c, 0x61e6b0fd, 0x97991495, 0x78cba274, 0x924d7f16, + 0x7d1fc9f7, 0x9c31c393, 0x73637572, 0x99e5a810, 0x76b71ef1, + 0xf32d5eb1, 0x1c7fe850, 0xf6f93532, 0x19ab83d3, 0xf88589b7, + 0x17d73f56, 0xfd51e234, 0x120354d5, 0xe47cf0bd, 0x0b2e465c, + 0xe1a89b3e, 0x0efa2ddf, 0xefd427bb, 0x0086915a, 0xea004c38, + 0x0552fad9, 0xdd8e02a9, 0x32dcb448, 0xd85a692a, 0x3708dfcb, + 0xd626d5af, 0x3974634e, 0xd3f2be2c, 0x3ca008cd, 0xcadfaca5, + 0x258d1a44, 0xcf0bc726, 0x205971c7, 0xc1777ba3, 0x2e25cd42, + 0xc4a31020, 0x2bf1a6c1, 0x14e696e1, 0xfbb42000, 0x1132fd62, + 0xfe604b83, 0x1f4e41e7, 0xf01cf706, 0x1a9a2a64, 0xf5c89c85, + 0x03b738ed, 0xece58e0c, 0x0663536e, 0xe931e58f, 0x081fefeb, + 0xe74d590a, 0x0dcb8468, 0xe2993289, 0x3a45caf9, 0xd5177c18, + 0x3f91a17a, 0xd0c3179b, 0x31ed1dff, 0xdebfab1e, 0x3439767c, + 0xdb6bc09d, 0x2d1464f5, 0xc246d214, 0x28c00f76, 0xc792b997, + 0x26bcb3f3, 0xc9ee0512, 0x2368d870, 0xcc3a6e91, 0x49a02ed1, + 0xa6f29830, 0x4c744552, 0xa326f3b3, 0x4208f9d7, 0xad5a4f36, + 0x47dc9254, 0xa88e24b5, 0x5ef180dd, 0xb1a3363c, 0x5b25eb5e, + 0xb4775dbf, 0x555957db, 0xba0be13a, 0x508d3c58, 0xbfdf8ab9, + 0x670372c9, 0x8851c428, 0x62d7194a, 0x8d85afab, 0x6caba5cf, + 0x83f9132e, 0x697fce4c, 0x862d78ad, 0x7052dcc5, 0x9f006a24, + 0x7586b746, 0x9ad401a7, 0x7bfa0bc3, 0x94a8bd22, 0x7e2e6040, + 0x917cd6a1}, + {0x00000000, 0x87a6cb43, 0xd43c90c7, 0x539a5b84, 0x730827cf, + 0xf4aeec8c, 0xa734b708, 0x20927c4b, 0xe6104f9e, 0x61b684dd, + 0x322cdf59, 0xb58a141a, 0x95186851, 0x12bea312, 0x4124f896, + 0xc68233d5, 0x1751997d, 0x90f7523e, 0xc36d09ba, 0x44cbc2f9, + 0x6459beb2, 0xe3ff75f1, 0xb0652e75, 0x37c3e536, 0xf141d6e3, + 0x76e71da0, 0x257d4624, 0xa2db8d67, 0x8249f12c, 0x05ef3a6f, + 0x567561eb, 0xd1d3aaa8, 0x2ea332fa, 0xa905f9b9, 0xfa9fa23d, + 0x7d39697e, 0x5dab1535, 0xda0dde76, 0x899785f2, 0x0e314eb1, + 0xc8b37d64, 0x4f15b627, 0x1c8feda3, 0x9b2926e0, 0xbbbb5aab, + 0x3c1d91e8, 0x6f87ca6c, 0xe821012f, 0x39f2ab87, 0xbe5460c4, + 0xedce3b40, 0x6a68f003, 0x4afa8c48, 0xcd5c470b, 0x9ec61c8f, + 0x1960d7cc, 0xdfe2e419, 0x58442f5a, 0x0bde74de, 0x8c78bf9d, + 0xaceac3d6, 0x2b4c0895, 0x78d65311, 0xff709852, 0x5d4665f4, + 0xdae0aeb7, 0x897af533, 0x0edc3e70, 0x2e4e423b, 0xa9e88978, + 0xfa72d2fc, 0x7dd419bf, 0xbb562a6a, 0x3cf0e129, 0x6f6abaad, + 0xe8cc71ee, 0xc85e0da5, 0x4ff8c6e6, 0x1c629d62, 0x9bc45621, + 0x4a17fc89, 0xcdb137ca, 0x9e2b6c4e, 0x198da70d, 0x391fdb46, + 0xbeb91005, 0xed234b81, 0x6a8580c2, 0xac07b317, 0x2ba17854, + 0x783b23d0, 0xff9de893, 0xdf0f94d8, 0x58a95f9b, 0x0b33041f, + 0x8c95cf5c, 0x73e5570e, 0xf4439c4d, 0xa7d9c7c9, 0x207f0c8a, + 0x00ed70c1, 0x874bbb82, 0xd4d1e006, 0x53772b45, 0x95f51890, + 0x1253d3d3, 0x41c98857, 0xc66f4314, 0xe6fd3f5f, 0x615bf41c, + 0x32c1af98, 0xb56764db, 0x64b4ce73, 0xe3120530, 0xb0885eb4, + 0x372e95f7, 0x17bce9bc, 0x901a22ff, 0xc380797b, 0x4426b238, + 0x82a481ed, 0x05024aae, 0x5698112a, 0xd13eda69, 0xf1aca622, + 0x760a6d61, 0x259036e5, 0xa236fda6, 0xba8ccbe8, 0x3d2a00ab, + 0x6eb05b2f, 0xe916906c, 0xc984ec27, 0x4e222764, 0x1db87ce0, + 0x9a1eb7a3, 0x5c9c8476, 0xdb3a4f35, 0x88a014b1, 0x0f06dff2, + 0x2f94a3b9, 0xa83268fa, 0xfba8337e, 0x7c0ef83d, 0xaddd5295, + 0x2a7b99d6, 0x79e1c252, 0xfe470911, 0xded5755a, 0x5973be19, + 0x0ae9e59d, 0x8d4f2ede, 0x4bcd1d0b, 0xcc6bd648, 0x9ff18dcc, + 0x1857468f, 0x38c53ac4, 0xbf63f187, 0xecf9aa03, 0x6b5f6140, + 0x942ff912, 0x13893251, 0x401369d5, 0xc7b5a296, 0xe727dedd, + 0x6081159e, 0x331b4e1a, 0xb4bd8559, 0x723fb68c, 0xf5997dcf, + 0xa603264b, 0x21a5ed08, 0x01379143, 0x86915a00, 0xd50b0184, + 0x52adcac7, 0x837e606f, 0x04d8ab2c, 0x5742f0a8, 0xd0e43beb, + 0xf07647a0, 0x77d08ce3, 0x244ad767, 0xa3ec1c24, 0x656e2ff1, + 0xe2c8e4b2, 0xb152bf36, 0x36f47475, 0x1666083e, 0x91c0c37d, + 0xc25a98f9, 0x45fc53ba, 0xe7caae1c, 0x606c655f, 0x33f63edb, + 0xb450f598, 0x94c289d3, 0x13644290, 0x40fe1914, 0xc758d257, + 0x01dae182, 0x867c2ac1, 0xd5e67145, 0x5240ba06, 0x72d2c64d, + 0xf5740d0e, 0xa6ee568a, 0x21489dc9, 0xf09b3761, 0x773dfc22, + 0x24a7a7a6, 0xa3016ce5, 0x839310ae, 0x0435dbed, 0x57af8069, + 0xd0094b2a, 0x168b78ff, 0x912db3bc, 0xc2b7e838, 0x4511237b, + 0x65835f30, 0xe2259473, 0xb1bfcff7, 0x361904b4, 0xc9699ce6, + 0x4ecf57a5, 0x1d550c21, 0x9af3c762, 0xba61bb29, 0x3dc7706a, + 0x6e5d2bee, 0xe9fbe0ad, 0x2f79d378, 0xa8df183b, 0xfb4543bf, + 0x7ce388fc, 0x5c71f4b7, 0xdbd73ff4, 0x884d6470, 0x0febaf33, + 0xde38059b, 0x599eced8, 0x0a04955c, 0x8da25e1f, 0xad302254, + 0x2a96e917, 0x790cb293, 0xfeaa79d0, 0x38284a05, 0xbf8e8146, + 0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d, + 0x18ba364e}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x43cba687, 0xc7903cd4, 0x845b9a53, 0xcf270873, + 0x8cecaef4, 0x08b734a7, 0x4b7c9220, 0x9e4f10e6, 0xdd84b661, + 0x59df2c32, 0x1a148ab5, 0x51681895, 0x12a3be12, 0x96f82441, + 0xd53382c6, 0x7d995117, 0x3e52f790, 0xba096dc3, 0xf9c2cb44, + 0xb2be5964, 0xf175ffe3, 0x752e65b0, 0x36e5c337, 0xe3d641f1, + 0xa01de776, 0x24467d25, 0x678ddba2, 0x2cf14982, 0x6f3aef05, + 0xeb617556, 0xa8aad3d1, 0xfa32a32e, 0xb9f905a9, 0x3da29ffa, + 0x7e69397d, 0x3515ab5d, 0x76de0dda, 0xf2859789, 0xb14e310e, + 0x647db3c8, 0x27b6154f, 0xa3ed8f1c, 0xe026299b, 0xab5abbbb, + 0xe8911d3c, 0x6cca876f, 0x2f0121e8, 0x87abf239, 0xc46054be, + 0x403bceed, 0x03f0686a, 0x488cfa4a, 0x0b475ccd, 0x8f1cc69e, + 0xccd76019, 0x19e4e2df, 0x5a2f4458, 0xde74de0b, 0x9dbf788c, + 0xd6c3eaac, 0x95084c2b, 0x1153d678, 0x529870ff, 0xf465465d, + 0xb7aee0da, 0x33f57a89, 0x703edc0e, 0x3b424e2e, 0x7889e8a9, + 0xfcd272fa, 0xbf19d47d, 0x6a2a56bb, 0x29e1f03c, 0xadba6a6f, + 0xee71cce8, 0xa50d5ec8, 0xe6c6f84f, 0x629d621c, 0x2156c49b, + 0x89fc174a, 0xca37b1cd, 0x4e6c2b9e, 0x0da78d19, 0x46db1f39, + 0x0510b9be, 0x814b23ed, 0xc280856a, 0x17b307ac, 0x5478a12b, + 0xd0233b78, 0x93e89dff, 0xd8940fdf, 0x9b5fa958, 0x1f04330b, + 0x5ccf958c, 0x0e57e573, 0x4d9c43f4, 0xc9c7d9a7, 0x8a0c7f20, + 0xc170ed00, 0x82bb4b87, 0x06e0d1d4, 0x452b7753, 0x9018f595, + 0xd3d35312, 0x5788c941, 0x14436fc6, 0x5f3ffde6, 0x1cf45b61, + 0x98afc132, 0xdb6467b5, 0x73ceb464, 0x300512e3, 0xb45e88b0, + 0xf7952e37, 0xbce9bc17, 0xff221a90, 0x7b7980c3, 0x38b22644, + 0xed81a482, 0xae4a0205, 0x2a119856, 0x69da3ed1, 0x22a6acf1, + 0x616d0a76, 0xe5369025, 0xa6fd36a2, 0xe8cb8cba, 0xab002a3d, + 0x2f5bb06e, 0x6c9016e9, 0x27ec84c9, 0x6427224e, 0xe07cb81d, + 0xa3b71e9a, 0x76849c5c, 0x354f3adb, 0xb114a088, 0xf2df060f, + 0xb9a3942f, 0xfa6832a8, 0x7e33a8fb, 0x3df80e7c, 0x9552ddad, + 0xd6997b2a, 0x52c2e179, 0x110947fe, 0x5a75d5de, 0x19be7359, + 0x9de5e90a, 0xde2e4f8d, 0x0b1dcd4b, 0x48d66bcc, 0xcc8df19f, + 0x8f465718, 0xc43ac538, 0x87f163bf, 0x03aaf9ec, 0x40615f6b, + 0x12f92f94, 0x51328913, 0xd5691340, 0x96a2b5c7, 0xddde27e7, + 0x9e158160, 0x1a4e1b33, 0x5985bdb4, 0x8cb63f72, 0xcf7d99f5, + 0x4b2603a6, 0x08eda521, 0x43913701, 0x005a9186, 0x84010bd5, + 0xc7caad52, 0x6f607e83, 0x2cabd804, 0xa8f04257, 0xeb3be4d0, + 0xa04776f0, 0xe38cd077, 0x67d74a24, 0x241ceca3, 0xf12f6e65, + 0xb2e4c8e2, 0x36bf52b1, 0x7574f436, 0x3e086616, 0x7dc3c091, + 0xf9985ac2, 0xba53fc45, 0x1caecae7, 0x5f656c60, 0xdb3ef633, + 0x98f550b4, 0xd389c294, 0x90426413, 0x1419fe40, 0x57d258c7, + 0x82e1da01, 0xc12a7c86, 0x4571e6d5, 0x06ba4052, 0x4dc6d272, + 0x0e0d74f5, 0x8a56eea6, 0xc99d4821, 0x61379bf0, 0x22fc3d77, + 0xa6a7a724, 0xe56c01a3, 0xae109383, 0xeddb3504, 0x6980af57, + 0x2a4b09d0, 0xff788b16, 0xbcb32d91, 0x38e8b7c2, 0x7b231145, + 0x305f8365, 0x739425e2, 0xf7cfbfb1, 0xb4041936, 0xe69c69c9, + 0xa557cf4e, 0x210c551d, 0x62c7f39a, 0x29bb61ba, 0x6a70c73d, + 0xee2b5d6e, 0xade0fbe9, 0x78d3792f, 0x3b18dfa8, 0xbf4345fb, + 0xfc88e37c, 0xb7f4715c, 0xf43fd7db, 0x70644d88, 0x33afeb0f, + 0x9b0538de, 0xd8ce9e59, 0x5c95040a, 0x1f5ea28d, 0x542230ad, + 0x17e9962a, 0x93b20c79, 0xd079aafe, 0x054a2838, 0x46818ebf, + 0xc2da14ec, 0x8111b26b, 0xca6d204b, 0x89a686cc, 0x0dfd1c9f, + 0x4e36ba18}, + {0x00000000, 0xe1b652ef, 0x836bd405, 0x62dd86ea, 0x06d7a80b, + 0xe761fae4, 0x85bc7c0e, 0x640a2ee1, 0x0cae5117, 0xed1803f8, + 0x8fc58512, 0x6e73d7fd, 0x0a79f91c, 0xebcfabf3, 0x89122d19, + 0x68a47ff6, 0x185ca32e, 0xf9eaf1c1, 0x9b37772b, 0x7a8125c4, + 0x1e8b0b25, 0xff3d59ca, 0x9de0df20, 0x7c568dcf, 0x14f2f239, + 0xf544a0d6, 0x9799263c, 0x762f74d3, 0x12255a32, 0xf39308dd, + 0x914e8e37, 0x70f8dcd8, 0x30b8465d, 0xd10e14b2, 0xb3d39258, + 0x5265c0b7, 0x366fee56, 0xd7d9bcb9, 0xb5043a53, 0x54b268bc, + 0x3c16174a, 0xdda045a5, 0xbf7dc34f, 0x5ecb91a0, 0x3ac1bf41, + 0xdb77edae, 0xb9aa6b44, 0x581c39ab, 0x28e4e573, 0xc952b79c, + 0xab8f3176, 0x4a396399, 0x2e334d78, 0xcf851f97, 0xad58997d, + 0x4ceecb92, 0x244ab464, 0xc5fce68b, 0xa7216061, 0x4697328e, + 0x229d1c6f, 0xc32b4e80, 0xa1f6c86a, 0x40409a85, 0x60708dba, + 0x81c6df55, 0xe31b59bf, 0x02ad0b50, 0x66a725b1, 0x8711775e, + 0xe5ccf1b4, 0x047aa35b, 0x6cdedcad, 0x8d688e42, 0xefb508a8, + 0x0e035a47, 0x6a0974a6, 0x8bbf2649, 0xe962a0a3, 0x08d4f24c, + 0x782c2e94, 0x999a7c7b, 0xfb47fa91, 0x1af1a87e, 0x7efb869f, + 0x9f4dd470, 0xfd90529a, 0x1c260075, 0x74827f83, 0x95342d6c, + 0xf7e9ab86, 0x165ff969, 0x7255d788, 0x93e38567, 0xf13e038d, + 0x10885162, 0x50c8cbe7, 0xb17e9908, 0xd3a31fe2, 0x32154d0d, + 0x561f63ec, 0xb7a93103, 0xd574b7e9, 0x34c2e506, 0x5c669af0, + 0xbdd0c81f, 0xdf0d4ef5, 0x3ebb1c1a, 0x5ab132fb, 0xbb076014, + 0xd9dae6fe, 0x386cb411, 0x489468c9, 0xa9223a26, 0xcbffbccc, + 0x2a49ee23, 0x4e43c0c2, 0xaff5922d, 0xcd2814c7, 0x2c9e4628, + 0x443a39de, 0xa58c6b31, 0xc751eddb, 0x26e7bf34, 0x42ed91d5, + 0xa35bc33a, 0xc18645d0, 0x2030173f, 0x81e66bae, 0x60503941, + 0x028dbfab, 0xe33bed44, 0x8731c3a5, 0x6687914a, 0x045a17a0, + 0xe5ec454f, 0x8d483ab9, 0x6cfe6856, 0x0e23eebc, 0xef95bc53, + 0x8b9f92b2, 0x6a29c05d, 0x08f446b7, 0xe9421458, 0x99bac880, + 0x780c9a6f, 0x1ad11c85, 0xfb674e6a, 0x9f6d608b, 0x7edb3264, + 0x1c06b48e, 0xfdb0e661, 0x95149997, 0x74a2cb78, 0x167f4d92, + 0xf7c91f7d, 0x93c3319c, 0x72756373, 0x10a8e599, 0xf11eb776, + 0xb15e2df3, 0x50e87f1c, 0x3235f9f6, 0xd383ab19, 0xb78985f8, + 0x563fd717, 0x34e251fd, 0xd5540312, 0xbdf07ce4, 0x5c462e0b, + 0x3e9ba8e1, 0xdf2dfa0e, 0xbb27d4ef, 0x5a918600, 0x384c00ea, + 0xd9fa5205, 0xa9028edd, 0x48b4dc32, 0x2a695ad8, 0xcbdf0837, + 0xafd526d6, 0x4e637439, 0x2cbef2d3, 0xcd08a03c, 0xa5acdfca, + 0x441a8d25, 0x26c70bcf, 0xc7715920, 0xa37b77c1, 0x42cd252e, + 0x2010a3c4, 0xc1a6f12b, 0xe196e614, 0x0020b4fb, 0x62fd3211, + 0x834b60fe, 0xe7414e1f, 0x06f71cf0, 0x642a9a1a, 0x859cc8f5, + 0xed38b703, 0x0c8ee5ec, 0x6e536306, 0x8fe531e9, 0xebef1f08, + 0x0a594de7, 0x6884cb0d, 0x893299e2, 0xf9ca453a, 0x187c17d5, + 0x7aa1913f, 0x9b17c3d0, 0xff1ded31, 0x1eabbfde, 0x7c763934, + 0x9dc06bdb, 0xf564142d, 0x14d246c2, 0x760fc028, 0x97b992c7, + 0xf3b3bc26, 0x1205eec9, 0x70d86823, 0x916e3acc, 0xd12ea049, + 0x3098f2a6, 0x5245744c, 0xb3f326a3, 0xd7f90842, 0x364f5aad, + 0x5492dc47, 0xb5248ea8, 0xdd80f15e, 0x3c36a3b1, 0x5eeb255b, + 0xbf5d77b4, 0xdb575955, 0x3ae10bba, 0x583c8d50, 0xb98adfbf, + 0xc9720367, 0x28c45188, 0x4a19d762, 0xabaf858d, 0xcfa5ab6c, + 0x2e13f983, 0x4cce7f69, 0xad782d86, 0xc5dc5270, 0x246a009f, + 0x46b78675, 0xa701d49a, 0xc30bfa7b, 0x22bda894, 0x40602e7e, + 0xa1d67c91}, + {0x00000000, 0x5880e2d7, 0xf106b474, 0xa98656a3, 0xe20d68e9, + 0xba8d8a3e, 0x130bdc9d, 0x4b8b3e4a, 0x851da109, 0xdd9d43de, + 0x741b157d, 0x2c9bf7aa, 0x6710c9e0, 0x3f902b37, 0x96167d94, + 0xce969f43, 0x0a3b4213, 0x52bba0c4, 0xfb3df667, 0xa3bd14b0, + 0xe8362afa, 0xb0b6c82d, 0x19309e8e, 0x41b07c59, 0x8f26e31a, + 0xd7a601cd, 0x7e20576e, 0x26a0b5b9, 0x6d2b8bf3, 0x35ab6924, + 0x9c2d3f87, 0xc4addd50, 0x14768426, 0x4cf666f1, 0xe5703052, + 0xbdf0d285, 0xf67beccf, 0xaefb0e18, 0x077d58bb, 0x5ffdba6c, + 0x916b252f, 0xc9ebc7f8, 0x606d915b, 0x38ed738c, 0x73664dc6, + 0x2be6af11, 0x8260f9b2, 0xdae01b65, 0x1e4dc635, 0x46cd24e2, + 0xef4b7241, 0xb7cb9096, 0xfc40aedc, 0xa4c04c0b, 0x0d461aa8, + 0x55c6f87f, 0x9b50673c, 0xc3d085eb, 0x6a56d348, 0x32d6319f, + 0x795d0fd5, 0x21dded02, 0x885bbba1, 0xd0db5976, 0x28ec084d, + 0x706cea9a, 0xd9eabc39, 0x816a5eee, 0xcae160a4, 0x92618273, + 0x3be7d4d0, 0x63673607, 0xadf1a944, 0xf5714b93, 0x5cf71d30, + 0x0477ffe7, 0x4ffcc1ad, 0x177c237a, 0xbefa75d9, 0xe67a970e, + 0x22d74a5e, 0x7a57a889, 0xd3d1fe2a, 0x8b511cfd, 0xc0da22b7, + 0x985ac060, 0x31dc96c3, 0x695c7414, 0xa7caeb57, 0xff4a0980, + 0x56cc5f23, 0x0e4cbdf4, 0x45c783be, 0x1d476169, 0xb4c137ca, + 0xec41d51d, 0x3c9a8c6b, 0x641a6ebc, 0xcd9c381f, 0x951cdac8, + 0xde97e482, 0x86170655, 0x2f9150f6, 0x7711b221, 0xb9872d62, + 0xe107cfb5, 0x48819916, 0x10017bc1, 0x5b8a458b, 0x030aa75c, + 0xaa8cf1ff, 0xf20c1328, 0x36a1ce78, 0x6e212caf, 0xc7a77a0c, + 0x9f2798db, 0xd4aca691, 0x8c2c4446, 0x25aa12e5, 0x7d2af032, + 0xb3bc6f71, 0xeb3c8da6, 0x42badb05, 0x1a3a39d2, 0x51b10798, + 0x0931e54f, 0xa0b7b3ec, 0xf837513b, 0x50d8119a, 0x0858f34d, + 0xa1dea5ee, 0xf95e4739, 0xb2d57973, 0xea559ba4, 0x43d3cd07, + 0x1b532fd0, 0xd5c5b093, 0x8d455244, 0x24c304e7, 0x7c43e630, + 0x37c8d87a, 0x6f483aad, 0xc6ce6c0e, 0x9e4e8ed9, 0x5ae35389, + 0x0263b15e, 0xabe5e7fd, 0xf365052a, 0xb8ee3b60, 0xe06ed9b7, + 0x49e88f14, 0x11686dc3, 0xdffef280, 0x877e1057, 0x2ef846f4, + 0x7678a423, 0x3df39a69, 0x657378be, 0xccf52e1d, 0x9475ccca, + 0x44ae95bc, 0x1c2e776b, 0xb5a821c8, 0xed28c31f, 0xa6a3fd55, + 0xfe231f82, 0x57a54921, 0x0f25abf6, 0xc1b334b5, 0x9933d662, + 0x30b580c1, 0x68356216, 0x23be5c5c, 0x7b3ebe8b, 0xd2b8e828, + 0x8a380aff, 0x4e95d7af, 0x16153578, 0xbf9363db, 0xe713810c, + 0xac98bf46, 0xf4185d91, 0x5d9e0b32, 0x051ee9e5, 0xcb8876a6, + 0x93089471, 0x3a8ec2d2, 0x620e2005, 0x29851e4f, 0x7105fc98, + 0xd883aa3b, 0x800348ec, 0x783419d7, 0x20b4fb00, 0x8932ada3, + 0xd1b24f74, 0x9a39713e, 0xc2b993e9, 0x6b3fc54a, 0x33bf279d, + 0xfd29b8de, 0xa5a95a09, 0x0c2f0caa, 0x54afee7d, 0x1f24d037, + 0x47a432e0, 0xee226443, 0xb6a28694, 0x720f5bc4, 0x2a8fb913, + 0x8309efb0, 0xdb890d67, 0x9002332d, 0xc882d1fa, 0x61048759, + 0x3984658e, 0xf712facd, 0xaf92181a, 0x06144eb9, 0x5e94ac6e, + 0x151f9224, 0x4d9f70f3, 0xe4192650, 0xbc99c487, 0x6c429df1, + 0x34c27f26, 0x9d442985, 0xc5c4cb52, 0x8e4ff518, 0xd6cf17cf, + 0x7f49416c, 0x27c9a3bb, 0xe95f3cf8, 0xb1dfde2f, 0x1859888c, + 0x40d96a5b, 0x0b525411, 0x53d2b6c6, 0xfa54e065, 0xa2d402b2, + 0x6679dfe2, 0x3ef93d35, 0x977f6b96, 0xcfff8941, 0x8474b70b, + 0xdcf455dc, 0x7572037f, 0x2df2e1a8, 0xe3647eeb, 0xbbe49c3c, + 0x1262ca9f, 0x4ae22848, 0x01691602, 0x59e9f4d5, 0xf06fa276, + 0xa8ef40a1}, + {0x00000000, 0x463b6765, 0x8c76ceca, 0xca4da9af, 0x59ebed4e, + 0x1fd08a2b, 0xd59d2384, 0x93a644e1, 0xb2d6db9d, 0xf4edbcf8, + 0x3ea01557, 0x789b7232, 0xeb3d36d3, 0xad0651b6, 0x674bf819, + 0x21709f7c, 0x25abc6e0, 0x6390a185, 0xa9dd082a, 0xefe66f4f, + 0x7c402bae, 0x3a7b4ccb, 0xf036e564, 0xb60d8201, 0x977d1d7d, + 0xd1467a18, 0x1b0bd3b7, 0x5d30b4d2, 0xce96f033, 0x88ad9756, + 0x42e03ef9, 0x04db599c, 0x0b50fc1a, 0x4d6b9b7f, 0x872632d0, + 0xc11d55b5, 0x52bb1154, 0x14807631, 0xdecddf9e, 0x98f6b8fb, + 0xb9862787, 0xffbd40e2, 0x35f0e94d, 0x73cb8e28, 0xe06dcac9, + 0xa656adac, 0x6c1b0403, 0x2a206366, 0x2efb3afa, 0x68c05d9f, + 0xa28df430, 0xe4b69355, 0x7710d7b4, 0x312bb0d1, 0xfb66197e, + 0xbd5d7e1b, 0x9c2de167, 0xda168602, 0x105b2fad, 0x566048c8, + 0xc5c60c29, 0x83fd6b4c, 0x49b0c2e3, 0x0f8ba586, 0x16a0f835, + 0x509b9f50, 0x9ad636ff, 0xdced519a, 0x4f4b157b, 0x0970721e, + 0xc33ddbb1, 0x8506bcd4, 0xa47623a8, 0xe24d44cd, 0x2800ed62, + 0x6e3b8a07, 0xfd9dcee6, 0xbba6a983, 0x71eb002c, 0x37d06749, + 0x330b3ed5, 0x753059b0, 0xbf7df01f, 0xf946977a, 0x6ae0d39b, + 0x2cdbb4fe, 0xe6961d51, 0xa0ad7a34, 0x81dde548, 0xc7e6822d, + 0x0dab2b82, 0x4b904ce7, 0xd8360806, 0x9e0d6f63, 0x5440c6cc, + 0x127ba1a9, 0x1df0042f, 0x5bcb634a, 0x9186cae5, 0xd7bdad80, + 0x441be961, 0x02208e04, 0xc86d27ab, 0x8e5640ce, 0xaf26dfb2, + 0xe91db8d7, 0x23501178, 0x656b761d, 0xf6cd32fc, 0xb0f65599, + 0x7abbfc36, 0x3c809b53, 0x385bc2cf, 0x7e60a5aa, 0xb42d0c05, + 0xf2166b60, 0x61b02f81, 0x278b48e4, 0xedc6e14b, 0xabfd862e, + 0x8a8d1952, 0xccb67e37, 0x06fbd798, 0x40c0b0fd, 0xd366f41c, + 0x955d9379, 0x5f103ad6, 0x192b5db3, 0x2c40f16b, 0x6a7b960e, + 0xa0363fa1, 0xe60d58c4, 0x75ab1c25, 0x33907b40, 0xf9ddd2ef, + 0xbfe6b58a, 0x9e962af6, 0xd8ad4d93, 0x12e0e43c, 0x54db8359, + 0xc77dc7b8, 0x8146a0dd, 0x4b0b0972, 0x0d306e17, 0x09eb378b, + 0x4fd050ee, 0x859df941, 0xc3a69e24, 0x5000dac5, 0x163bbda0, + 0xdc76140f, 0x9a4d736a, 0xbb3dec16, 0xfd068b73, 0x374b22dc, + 0x717045b9, 0xe2d60158, 0xa4ed663d, 0x6ea0cf92, 0x289ba8f7, + 0x27100d71, 0x612b6a14, 0xab66c3bb, 0xed5da4de, 0x7efbe03f, + 0x38c0875a, 0xf28d2ef5, 0xb4b64990, 0x95c6d6ec, 0xd3fdb189, + 0x19b01826, 0x5f8b7f43, 0xcc2d3ba2, 0x8a165cc7, 0x405bf568, + 0x0660920d, 0x02bbcb91, 0x4480acf4, 0x8ecd055b, 0xc8f6623e, + 0x5b5026df, 0x1d6b41ba, 0xd726e815, 0x911d8f70, 0xb06d100c, + 0xf6567769, 0x3c1bdec6, 0x7a20b9a3, 0xe986fd42, 0xafbd9a27, + 0x65f03388, 0x23cb54ed, 0x3ae0095e, 0x7cdb6e3b, 0xb696c794, + 0xf0ada0f1, 0x630be410, 0x25308375, 0xef7d2ada, 0xa9464dbf, + 0x8836d2c3, 0xce0db5a6, 0x04401c09, 0x427b7b6c, 0xd1dd3f8d, + 0x97e658e8, 0x5dabf147, 0x1b909622, 0x1f4bcfbe, 0x5970a8db, + 0x933d0174, 0xd5066611, 0x46a022f0, 0x009b4595, 0xcad6ec3a, + 0x8ced8b5f, 0xad9d1423, 0xeba67346, 0x21ebdae9, 0x67d0bd8c, + 0xf476f96d, 0xb24d9e08, 0x780037a7, 0x3e3b50c2, 0x31b0f544, + 0x778b9221, 0xbdc63b8e, 0xfbfd5ceb, 0x685b180a, 0x2e607f6f, + 0xe42dd6c0, 0xa216b1a5, 0x83662ed9, 0xc55d49bc, 0x0f10e013, + 0x492b8776, 0xda8dc397, 0x9cb6a4f2, 0x56fb0d5d, 0x10c06a38, + 0x141b33a4, 0x522054c1, 0x986dfd6e, 0xde569a0b, 0x4df0deea, + 0x0bcbb98f, 0xc1861020, 0x87bd7745, 0xa6cde839, 0xe0f68f5c, + 0x2abb26f3, 0x6c804196, 0xff260577, 0xb91d6212, 0x7350cbbd, + 0x356bacd8}}; + +#endif + +#endif + +#if N == 6 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x3db1ecdc, 0x7b63d9b8, 0x46d23564, 0xf6c7b370, + 0xcb765fac, 0x8da46ac8, 0xb0158614, 0x36fe60a1, 0x0b4f8c7d, + 0x4d9db919, 0x702c55c5, 0xc039d3d1, 0xfd883f0d, 0xbb5a0a69, + 0x86ebe6b5, 0x6dfcc142, 0x504d2d9e, 0x169f18fa, 0x2b2ef426, + 0x9b3b7232, 0xa68a9eee, 0xe058ab8a, 0xdde94756, 0x5b02a1e3, + 0x66b34d3f, 0x2061785b, 0x1dd09487, 0xadc51293, 0x9074fe4f, + 0xd6a6cb2b, 0xeb1727f7, 0xdbf98284, 0xe6486e58, 0xa09a5b3c, + 0x9d2bb7e0, 0x2d3e31f4, 0x108fdd28, 0x565de84c, 0x6bec0490, + 0xed07e225, 0xd0b60ef9, 0x96643b9d, 0xabd5d741, 0x1bc05155, + 0x2671bd89, 0x60a388ed, 0x5d126431, 0xb60543c6, 0x8bb4af1a, + 0xcd669a7e, 0xf0d776a2, 0x40c2f0b6, 0x7d731c6a, 0x3ba1290e, + 0x0610c5d2, 0x80fb2367, 0xbd4acfbb, 0xfb98fadf, 0xc6291603, + 0x763c9017, 0x4b8d7ccb, 0x0d5f49af, 0x30eea573, 0x6c820349, + 0x5133ef95, 0x17e1daf1, 0x2a50362d, 0x9a45b039, 0xa7f45ce5, + 0xe1266981, 0xdc97855d, 0x5a7c63e8, 0x67cd8f34, 0x211fba50, + 0x1cae568c, 0xacbbd098, 0x910a3c44, 0xd7d80920, 0xea69e5fc, + 0x017ec20b, 0x3ccf2ed7, 0x7a1d1bb3, 0x47acf76f, 0xf7b9717b, + 0xca089da7, 0x8cdaa8c3, 0xb16b441f, 0x3780a2aa, 0x0a314e76, + 0x4ce37b12, 0x715297ce, 0xc14711da, 0xfcf6fd06, 0xba24c862, + 0x879524be, 0xb77b81cd, 0x8aca6d11, 0xcc185875, 0xf1a9b4a9, + 0x41bc32bd, 0x7c0dde61, 0x3adfeb05, 0x076e07d9, 0x8185e16c, + 0xbc340db0, 0xfae638d4, 0xc757d408, 0x7742521c, 0x4af3bec0, + 0x0c218ba4, 0x31906778, 0xda87408f, 0xe736ac53, 0xa1e49937, + 0x9c5575eb, 0x2c40f3ff, 0x11f11f23, 0x57232a47, 0x6a92c69b, + 0xec79202e, 0xd1c8ccf2, 0x971af996, 0xaaab154a, 0x1abe935e, + 0x270f7f82, 0x61dd4ae6, 0x5c6ca63a, 0xd9040692, 0xe4b5ea4e, + 0xa267df2a, 0x9fd633f6, 0x2fc3b5e2, 0x1272593e, 0x54a06c5a, + 0x69118086, 0xeffa6633, 0xd24b8aef, 0x9499bf8b, 0xa9285357, + 0x193dd543, 0x248c399f, 0x625e0cfb, 0x5fefe027, 0xb4f8c7d0, + 0x89492b0c, 0xcf9b1e68, 0xf22af2b4, 0x423f74a0, 0x7f8e987c, + 0x395cad18, 0x04ed41c4, 0x8206a771, 0xbfb74bad, 0xf9657ec9, + 0xc4d49215, 0x74c11401, 0x4970f8dd, 0x0fa2cdb9, 0x32132165, + 0x02fd8416, 0x3f4c68ca, 0x799e5dae, 0x442fb172, 0xf43a3766, + 0xc98bdbba, 0x8f59eede, 0xb2e80202, 0x3403e4b7, 0x09b2086b, + 0x4f603d0f, 0x72d1d1d3, 0xc2c457c7, 0xff75bb1b, 0xb9a78e7f, + 0x841662a3, 0x6f014554, 0x52b0a988, 0x14629cec, 0x29d37030, + 0x99c6f624, 0xa4771af8, 0xe2a52f9c, 0xdf14c340, 0x59ff25f5, + 0x644ec929, 0x229cfc4d, 0x1f2d1091, 0xaf389685, 0x92897a59, + 0xd45b4f3d, 0xe9eaa3e1, 0xb58605db, 0x8837e907, 0xcee5dc63, + 0xf35430bf, 0x4341b6ab, 0x7ef05a77, 0x38226f13, 0x059383cf, + 0x8378657a, 0xbec989a6, 0xf81bbcc2, 0xc5aa501e, 0x75bfd60a, + 0x480e3ad6, 0x0edc0fb2, 0x336de36e, 0xd87ac499, 0xe5cb2845, + 0xa3191d21, 0x9ea8f1fd, 0x2ebd77e9, 0x130c9b35, 0x55deae51, + 0x686f428d, 0xee84a438, 0xd33548e4, 0x95e77d80, 0xa856915c, + 0x18431748, 0x25f2fb94, 0x6320cef0, 0x5e91222c, 0x6e7f875f, + 0x53ce6b83, 0x151c5ee7, 0x28adb23b, 0x98b8342f, 0xa509d8f3, + 0xe3dbed97, 0xde6a014b, 0x5881e7fe, 0x65300b22, 0x23e23e46, + 0x1e53d29a, 0xae46548e, 0x93f7b852, 0xd5258d36, 0xe89461ea, + 0x0383461d, 0x3e32aac1, 0x78e09fa5, 0x45517379, 0xf544f56d, + 0xc8f519b1, 0x8e272cd5, 0xb396c009, 0x357d26bc, 0x08ccca60, + 0x4e1eff04, 0x73af13d8, 0xc3ba95cc, 0xfe0b7910, 0xb8d94c74, + 0x8568a0a8}, + {0x00000000, 0x69790b65, 0xd2f216ca, 0xbb8b1daf, 0x7e952bd5, + 0x17ec20b0, 0xac673d1f, 0xc51e367a, 0xfd2a57aa, 0x94535ccf, + 0x2fd84160, 0x46a14a05, 0x83bf7c7f, 0xeac6771a, 0x514d6ab5, + 0x383461d0, 0x2125a915, 0x485ca270, 0xf3d7bfdf, 0x9aaeb4ba, + 0x5fb082c0, 0x36c989a5, 0x8d42940a, 0xe43b9f6f, 0xdc0ffebf, + 0xb576f5da, 0x0efde875, 0x6784e310, 0xa29ad56a, 0xcbe3de0f, + 0x7068c3a0, 0x1911c8c5, 0x424b522a, 0x2b32594f, 0x90b944e0, + 0xf9c04f85, 0x3cde79ff, 0x55a7729a, 0xee2c6f35, 0x87556450, + 0xbf610580, 0xd6180ee5, 0x6d93134a, 0x04ea182f, 0xc1f42e55, + 0xa88d2530, 0x1306389f, 0x7a7f33fa, 0x636efb3f, 0x0a17f05a, + 0xb19cedf5, 0xd8e5e690, 0x1dfbd0ea, 0x7482db8f, 0xcf09c620, + 0xa670cd45, 0x9e44ac95, 0xf73da7f0, 0x4cb6ba5f, 0x25cfb13a, + 0xe0d18740, 0x89a88c25, 0x3223918a, 0x5b5a9aef, 0x8496a454, + 0xedefaf31, 0x5664b29e, 0x3f1db9fb, 0xfa038f81, 0x937a84e4, + 0x28f1994b, 0x4188922e, 0x79bcf3fe, 0x10c5f89b, 0xab4ee534, + 0xc237ee51, 0x0729d82b, 0x6e50d34e, 0xd5dbcee1, 0xbca2c584, + 0xa5b30d41, 0xccca0624, 0x77411b8b, 0x1e3810ee, 0xdb262694, + 0xb25f2df1, 0x09d4305e, 0x60ad3b3b, 0x58995aeb, 0x31e0518e, + 0x8a6b4c21, 0xe3124744, 0x260c713e, 0x4f757a5b, 0xf4fe67f4, + 0x9d876c91, 0xc6ddf67e, 0xafa4fd1b, 0x142fe0b4, 0x7d56ebd1, + 0xb848ddab, 0xd131d6ce, 0x6abacb61, 0x03c3c004, 0x3bf7a1d4, + 0x528eaab1, 0xe905b71e, 0x807cbc7b, 0x45628a01, 0x2c1b8164, + 0x97909ccb, 0xfee997ae, 0xe7f85f6b, 0x8e81540e, 0x350a49a1, + 0x5c7342c4, 0x996d74be, 0xf0147fdb, 0x4b9f6274, 0x22e66911, + 0x1ad208c1, 0x73ab03a4, 0xc8201e0b, 0xa159156e, 0x64472314, + 0x0d3e2871, 0xb6b535de, 0xdfcc3ebb, 0xd25c4ee9, 0xbb25458c, + 0x00ae5823, 0x69d75346, 0xacc9653c, 0xc5b06e59, 0x7e3b73f6, + 0x17427893, 0x2f761943, 0x460f1226, 0xfd840f89, 0x94fd04ec, + 0x51e33296, 0x389a39f3, 0x8311245c, 0xea682f39, 0xf379e7fc, + 0x9a00ec99, 0x218bf136, 0x48f2fa53, 0x8deccc29, 0xe495c74c, + 0x5f1edae3, 0x3667d186, 0x0e53b056, 0x672abb33, 0xdca1a69c, + 0xb5d8adf9, 0x70c69b83, 0x19bf90e6, 0xa2348d49, 0xcb4d862c, + 0x90171cc3, 0xf96e17a6, 0x42e50a09, 0x2b9c016c, 0xee823716, + 0x87fb3c73, 0x3c7021dc, 0x55092ab9, 0x6d3d4b69, 0x0444400c, + 0xbfcf5da3, 0xd6b656c6, 0x13a860bc, 0x7ad16bd9, 0xc15a7676, + 0xa8237d13, 0xb132b5d6, 0xd84bbeb3, 0x63c0a31c, 0x0ab9a879, + 0xcfa79e03, 0xa6de9566, 0x1d5588c9, 0x742c83ac, 0x4c18e27c, + 0x2561e919, 0x9eeaf4b6, 0xf793ffd3, 0x328dc9a9, 0x5bf4c2cc, + 0xe07fdf63, 0x8906d406, 0x56caeabd, 0x3fb3e1d8, 0x8438fc77, + 0xed41f712, 0x285fc168, 0x4126ca0d, 0xfaadd7a2, 0x93d4dcc7, + 0xabe0bd17, 0xc299b672, 0x7912abdd, 0x106ba0b8, 0xd57596c2, + 0xbc0c9da7, 0x07878008, 0x6efe8b6d, 0x77ef43a8, 0x1e9648cd, + 0xa51d5562, 0xcc645e07, 0x097a687d, 0x60036318, 0xdb887eb7, + 0xb2f175d2, 0x8ac51402, 0xe3bc1f67, 0x583702c8, 0x314e09ad, + 0xf4503fd7, 0x9d2934b2, 0x26a2291d, 0x4fdb2278, 0x1481b897, + 0x7df8b3f2, 0xc673ae5d, 0xaf0aa538, 0x6a149342, 0x036d9827, + 0xb8e68588, 0xd19f8eed, 0xe9abef3d, 0x80d2e458, 0x3b59f9f7, + 0x5220f292, 0x973ec4e8, 0xfe47cf8d, 0x45ccd222, 0x2cb5d947, + 0x35a41182, 0x5cdd1ae7, 0xe7560748, 0x8e2f0c2d, 0x4b313a57, + 0x22483132, 0x99c32c9d, 0xf0ba27f8, 0xc88e4628, 0xa1f74d4d, + 0x1a7c50e2, 0x73055b87, 0xb61b6dfd, 0xdf626698, 0x64e97b37, + 0x0d907052}, + {0x00000000, 0x7fc99b93, 0xff933726, 0x805aacb5, 0x2457680d, + 0x5b9ef39e, 0xdbc45f2b, 0xa40dc4b8, 0x48aed01a, 0x37674b89, + 0xb73de73c, 0xc8f47caf, 0x6cf9b817, 0x13302384, 0x936a8f31, + 0xeca314a2, 0x915da034, 0xee943ba7, 0x6ece9712, 0x11070c81, + 0xb50ac839, 0xcac353aa, 0x4a99ff1f, 0x3550648c, 0xd9f3702e, + 0xa63aebbd, 0x26604708, 0x59a9dc9b, 0xfda41823, 0x826d83b0, + 0x02372f05, 0x7dfeb496, 0xf9ca4629, 0x8603ddba, 0x0659710f, + 0x7990ea9c, 0xdd9d2e24, 0xa254b5b7, 0x220e1902, 0x5dc78291, + 0xb1649633, 0xcead0da0, 0x4ef7a115, 0x313e3a86, 0x9533fe3e, + 0xeafa65ad, 0x6aa0c918, 0x1569528b, 0x6897e61d, 0x175e7d8e, + 0x9704d13b, 0xe8cd4aa8, 0x4cc08e10, 0x33091583, 0xb353b936, + 0xcc9a22a5, 0x20393607, 0x5ff0ad94, 0xdfaa0121, 0xa0639ab2, + 0x046e5e0a, 0x7ba7c599, 0xfbfd692c, 0x8434f2bf, 0x28e58a13, + 0x572c1180, 0xd776bd35, 0xa8bf26a6, 0x0cb2e21e, 0x737b798d, + 0xf321d538, 0x8ce84eab, 0x604b5a09, 0x1f82c19a, 0x9fd86d2f, + 0xe011f6bc, 0x441c3204, 0x3bd5a997, 0xbb8f0522, 0xc4469eb1, + 0xb9b82a27, 0xc671b1b4, 0x462b1d01, 0x39e28692, 0x9def422a, + 0xe226d9b9, 0x627c750c, 0x1db5ee9f, 0xf116fa3d, 0x8edf61ae, + 0x0e85cd1b, 0x714c5688, 0xd5419230, 0xaa8809a3, 0x2ad2a516, + 0x551b3e85, 0xd12fcc3a, 0xaee657a9, 0x2ebcfb1c, 0x5175608f, + 0xf578a437, 0x8ab13fa4, 0x0aeb9311, 0x75220882, 0x99811c20, + 0xe64887b3, 0x66122b06, 0x19dbb095, 0xbdd6742d, 0xc21fefbe, + 0x4245430b, 0x3d8cd898, 0x40726c0e, 0x3fbbf79d, 0xbfe15b28, + 0xc028c0bb, 0x64250403, 0x1bec9f90, 0x9bb63325, 0xe47fa8b6, + 0x08dcbc14, 0x77152787, 0xf74f8b32, 0x888610a1, 0x2c8bd419, + 0x53424f8a, 0xd318e33f, 0xacd178ac, 0x51cb1426, 0x2e028fb5, + 0xae582300, 0xd191b893, 0x759c7c2b, 0x0a55e7b8, 0x8a0f4b0d, + 0xf5c6d09e, 0x1965c43c, 0x66ac5faf, 0xe6f6f31a, 0x993f6889, + 0x3d32ac31, 0x42fb37a2, 0xc2a19b17, 0xbd680084, 0xc096b412, + 0xbf5f2f81, 0x3f058334, 0x40cc18a7, 0xe4c1dc1f, 0x9b08478c, + 0x1b52eb39, 0x649b70aa, 0x88386408, 0xf7f1ff9b, 0x77ab532e, + 0x0862c8bd, 0xac6f0c05, 0xd3a69796, 0x53fc3b23, 0x2c35a0b0, + 0xa801520f, 0xd7c8c99c, 0x57926529, 0x285bfeba, 0x8c563a02, + 0xf39fa191, 0x73c50d24, 0x0c0c96b7, 0xe0af8215, 0x9f661986, + 0x1f3cb533, 0x60f52ea0, 0xc4f8ea18, 0xbb31718b, 0x3b6bdd3e, + 0x44a246ad, 0x395cf23b, 0x469569a8, 0xc6cfc51d, 0xb9065e8e, + 0x1d0b9a36, 0x62c201a5, 0xe298ad10, 0x9d513683, 0x71f22221, + 0x0e3bb9b2, 0x8e611507, 0xf1a88e94, 0x55a54a2c, 0x2a6cd1bf, + 0xaa367d0a, 0xd5ffe699, 0x792e9e35, 0x06e705a6, 0x86bda913, + 0xf9743280, 0x5d79f638, 0x22b06dab, 0xa2eac11e, 0xdd235a8d, + 0x31804e2f, 0x4e49d5bc, 0xce137909, 0xb1dae29a, 0x15d72622, + 0x6a1ebdb1, 0xea441104, 0x958d8a97, 0xe8733e01, 0x97baa592, + 0x17e00927, 0x682992b4, 0xcc24560c, 0xb3edcd9f, 0x33b7612a, + 0x4c7efab9, 0xa0ddee1b, 0xdf147588, 0x5f4ed93d, 0x208742ae, + 0x848a8616, 0xfb431d85, 0x7b19b130, 0x04d02aa3, 0x80e4d81c, + 0xff2d438f, 0x7f77ef3a, 0x00be74a9, 0xa4b3b011, 0xdb7a2b82, + 0x5b208737, 0x24e91ca4, 0xc84a0806, 0xb7839395, 0x37d93f20, + 0x4810a4b3, 0xec1d600b, 0x93d4fb98, 0x138e572d, 0x6c47ccbe, + 0x11b97828, 0x6e70e3bb, 0xee2a4f0e, 0x91e3d49d, 0x35ee1025, + 0x4a278bb6, 0xca7d2703, 0xb5b4bc90, 0x5917a832, 0x26de33a1, + 0xa6849f14, 0xd94d0487, 0x7d40c03f, 0x02895bac, 0x82d3f719, + 0xfd1a6c8a}, + {0x00000000, 0xa396284c, 0x9c5d56d9, 0x3fcb7e95, 0xe3cbabf3, + 0x405d83bf, 0x7f96fd2a, 0xdc00d566, 0x1ce651a7, 0xbf7079eb, + 0x80bb077e, 0x232d2f32, 0xff2dfa54, 0x5cbbd218, 0x6370ac8d, + 0xc0e684c1, 0x39cca34e, 0x9a5a8b02, 0xa591f597, 0x0607dddb, + 0xda0708bd, 0x799120f1, 0x465a5e64, 0xe5cc7628, 0x252af2e9, + 0x86bcdaa5, 0xb977a430, 0x1ae18c7c, 0xc6e1591a, 0x65777156, + 0x5abc0fc3, 0xf92a278f, 0x7399469c, 0xd00f6ed0, 0xefc41045, + 0x4c523809, 0x9052ed6f, 0x33c4c523, 0x0c0fbbb6, 0xaf9993fa, + 0x6f7f173b, 0xcce93f77, 0xf32241e2, 0x50b469ae, 0x8cb4bcc8, + 0x2f229484, 0x10e9ea11, 0xb37fc25d, 0x4a55e5d2, 0xe9c3cd9e, + 0xd608b30b, 0x759e9b47, 0xa99e4e21, 0x0a08666d, 0x35c318f8, + 0x965530b4, 0x56b3b475, 0xf5259c39, 0xcaeee2ac, 0x6978cae0, + 0xb5781f86, 0x16ee37ca, 0x2925495f, 0x8ab36113, 0xe7328d38, + 0x44a4a574, 0x7b6fdbe1, 0xd8f9f3ad, 0x04f926cb, 0xa76f0e87, + 0x98a47012, 0x3b32585e, 0xfbd4dc9f, 0x5842f4d3, 0x67898a46, + 0xc41fa20a, 0x181f776c, 0xbb895f20, 0x844221b5, 0x27d409f9, + 0xdefe2e76, 0x7d68063a, 0x42a378af, 0xe13550e3, 0x3d358585, + 0x9ea3adc9, 0xa168d35c, 0x02fefb10, 0xc2187fd1, 0x618e579d, + 0x5e452908, 0xfdd30144, 0x21d3d422, 0x8245fc6e, 0xbd8e82fb, + 0x1e18aab7, 0x94abcba4, 0x373de3e8, 0x08f69d7d, 0xab60b531, + 0x77606057, 0xd4f6481b, 0xeb3d368e, 0x48ab1ec2, 0x884d9a03, + 0x2bdbb24f, 0x1410ccda, 0xb786e496, 0x6b8631f0, 0xc81019bc, + 0xf7db6729, 0x544d4f65, 0xad6768ea, 0x0ef140a6, 0x313a3e33, + 0x92ac167f, 0x4eacc319, 0xed3aeb55, 0xd2f195c0, 0x7167bd8c, + 0xb181394d, 0x12171101, 0x2ddc6f94, 0x8e4a47d8, 0x524a92be, + 0xf1dcbaf2, 0xce17c467, 0x6d81ec2b, 0x15141c31, 0xb682347d, + 0x89494ae8, 0x2adf62a4, 0xf6dfb7c2, 0x55499f8e, 0x6a82e11b, + 0xc914c957, 0x09f24d96, 0xaa6465da, 0x95af1b4f, 0x36393303, + 0xea39e665, 0x49afce29, 0x7664b0bc, 0xd5f298f0, 0x2cd8bf7f, + 0x8f4e9733, 0xb085e9a6, 0x1313c1ea, 0xcf13148c, 0x6c853cc0, + 0x534e4255, 0xf0d86a19, 0x303eeed8, 0x93a8c694, 0xac63b801, + 0x0ff5904d, 0xd3f5452b, 0x70636d67, 0x4fa813f2, 0xec3e3bbe, + 0x668d5aad, 0xc51b72e1, 0xfad00c74, 0x59462438, 0x8546f15e, + 0x26d0d912, 0x191ba787, 0xba8d8fcb, 0x7a6b0b0a, 0xd9fd2346, + 0xe6365dd3, 0x45a0759f, 0x99a0a0f9, 0x3a3688b5, 0x05fdf620, + 0xa66bde6c, 0x5f41f9e3, 0xfcd7d1af, 0xc31caf3a, 0x608a8776, + 0xbc8a5210, 0x1f1c7a5c, 0x20d704c9, 0x83412c85, 0x43a7a844, + 0xe0318008, 0xdffafe9d, 0x7c6cd6d1, 0xa06c03b7, 0x03fa2bfb, + 0x3c31556e, 0x9fa77d22, 0xf2269109, 0x51b0b945, 0x6e7bc7d0, + 0xcdedef9c, 0x11ed3afa, 0xb27b12b6, 0x8db06c23, 0x2e26446f, + 0xeec0c0ae, 0x4d56e8e2, 0x729d9677, 0xd10bbe3b, 0x0d0b6b5d, + 0xae9d4311, 0x91563d84, 0x32c015c8, 0xcbea3247, 0x687c1a0b, + 0x57b7649e, 0xf4214cd2, 0x282199b4, 0x8bb7b1f8, 0xb47ccf6d, + 0x17eae721, 0xd70c63e0, 0x749a4bac, 0x4b513539, 0xe8c71d75, + 0x34c7c813, 0x9751e05f, 0xa89a9eca, 0x0b0cb686, 0x81bfd795, + 0x2229ffd9, 0x1de2814c, 0xbe74a900, 0x62747c66, 0xc1e2542a, + 0xfe292abf, 0x5dbf02f3, 0x9d598632, 0x3ecfae7e, 0x0104d0eb, + 0xa292f8a7, 0x7e922dc1, 0xdd04058d, 0xe2cf7b18, 0x41595354, + 0xb87374db, 0x1be55c97, 0x242e2202, 0x87b80a4e, 0x5bb8df28, + 0xf82ef764, 0xc7e589f1, 0x6473a1bd, 0xa495257c, 0x07030d30, + 0x38c873a5, 0x9b5e5be9, 0x475e8e8f, 0xe4c8a6c3, 0xdb03d856, + 0x7895f01a}, + {0x00000000, 0x2a283862, 0x545070c4, 0x7e7848a6, 0xa8a0e188, + 0x8288d9ea, 0xfcf0914c, 0xd6d8a92e, 0x8a30c551, 0xa018fd33, + 0xde60b595, 0xf4488df7, 0x229024d9, 0x08b81cbb, 0x76c0541d, + 0x5ce86c7f, 0xcf108ce3, 0xe538b481, 0x9b40fc27, 0xb168c445, + 0x67b06d6b, 0x4d985509, 0x33e01daf, 0x19c825cd, 0x452049b2, + 0x6f0871d0, 0x11703976, 0x3b580114, 0xed80a83a, 0xc7a89058, + 0xb9d0d8fe, 0x93f8e09c, 0x45501f87, 0x6f7827e5, 0x11006f43, + 0x3b285721, 0xedf0fe0f, 0xc7d8c66d, 0xb9a08ecb, 0x9388b6a9, + 0xcf60dad6, 0xe548e2b4, 0x9b30aa12, 0xb1189270, 0x67c03b5e, + 0x4de8033c, 0x33904b9a, 0x19b873f8, 0x8a409364, 0xa068ab06, + 0xde10e3a0, 0xf438dbc2, 0x22e072ec, 0x08c84a8e, 0x76b00228, + 0x5c983a4a, 0x00705635, 0x2a586e57, 0x542026f1, 0x7e081e93, + 0xa8d0b7bd, 0x82f88fdf, 0xfc80c779, 0xd6a8ff1b, 0x8aa03f0e, + 0xa088076c, 0xdef04fca, 0xf4d877a8, 0x2200de86, 0x0828e6e4, + 0x7650ae42, 0x5c789620, 0x0090fa5f, 0x2ab8c23d, 0x54c08a9b, + 0x7ee8b2f9, 0xa8301bd7, 0x821823b5, 0xfc606b13, 0xd6485371, + 0x45b0b3ed, 0x6f988b8f, 0x11e0c329, 0x3bc8fb4b, 0xed105265, + 0xc7386a07, 0xb94022a1, 0x93681ac3, 0xcf8076bc, 0xe5a84ede, + 0x9bd00678, 0xb1f83e1a, 0x67209734, 0x4d08af56, 0x3370e7f0, + 0x1958df92, 0xcff02089, 0xe5d818eb, 0x9ba0504d, 0xb188682f, + 0x6750c101, 0x4d78f963, 0x3300b1c5, 0x192889a7, 0x45c0e5d8, + 0x6fe8ddba, 0x1190951c, 0x3bb8ad7e, 0xed600450, 0xc7483c32, + 0xb9307494, 0x93184cf6, 0x00e0ac6a, 0x2ac89408, 0x54b0dcae, + 0x7e98e4cc, 0xa8404de2, 0x82687580, 0xfc103d26, 0xd6380544, + 0x8ad0693b, 0xa0f85159, 0xde8019ff, 0xf4a8219d, 0x227088b3, + 0x0858b0d1, 0x7620f877, 0x5c08c015, 0xce31785d, 0xe419403f, + 0x9a610899, 0xb04930fb, 0x669199d5, 0x4cb9a1b7, 0x32c1e911, + 0x18e9d173, 0x4401bd0c, 0x6e29856e, 0x1051cdc8, 0x3a79f5aa, + 0xeca15c84, 0xc68964e6, 0xb8f12c40, 0x92d91422, 0x0121f4be, + 0x2b09ccdc, 0x5571847a, 0x7f59bc18, 0xa9811536, 0x83a92d54, + 0xfdd165f2, 0xd7f95d90, 0x8b1131ef, 0xa139098d, 0xdf41412b, + 0xf5697949, 0x23b1d067, 0x0999e805, 0x77e1a0a3, 0x5dc998c1, + 0x8b6167da, 0xa1495fb8, 0xdf31171e, 0xf5192f7c, 0x23c18652, + 0x09e9be30, 0x7791f696, 0x5db9cef4, 0x0151a28b, 0x2b799ae9, + 0x5501d24f, 0x7f29ea2d, 0xa9f14303, 0x83d97b61, 0xfda133c7, + 0xd7890ba5, 0x4471eb39, 0x6e59d35b, 0x10219bfd, 0x3a09a39f, + 0xecd10ab1, 0xc6f932d3, 0xb8817a75, 0x92a94217, 0xce412e68, + 0xe469160a, 0x9a115eac, 0xb03966ce, 0x66e1cfe0, 0x4cc9f782, + 0x32b1bf24, 0x18998746, 0x44914753, 0x6eb97f31, 0x10c13797, + 0x3ae90ff5, 0xec31a6db, 0xc6199eb9, 0xb861d61f, 0x9249ee7d, + 0xcea18202, 0xe489ba60, 0x9af1f2c6, 0xb0d9caa4, 0x6601638a, + 0x4c295be8, 0x3251134e, 0x18792b2c, 0x8b81cbb0, 0xa1a9f3d2, + 0xdfd1bb74, 0xf5f98316, 0x23212a38, 0x0909125a, 0x77715afc, + 0x5d59629e, 0x01b10ee1, 0x2b993683, 0x55e17e25, 0x7fc94647, + 0xa911ef69, 0x8339d70b, 0xfd419fad, 0xd769a7cf, 0x01c158d4, + 0x2be960b6, 0x55912810, 0x7fb91072, 0xa961b95c, 0x8349813e, + 0xfd31c998, 0xd719f1fa, 0x8bf19d85, 0xa1d9a5e7, 0xdfa1ed41, + 0xf589d523, 0x23517c0d, 0x0979446f, 0x77010cc9, 0x5d2934ab, + 0xced1d437, 0xe4f9ec55, 0x9a81a4f3, 0xb0a99c91, 0x667135bf, + 0x4c590ddd, 0x3221457b, 0x18097d19, 0x44e11166, 0x6ec92904, + 0x10b161a2, 0x3a9959c0, 0xec41f0ee, 0xc669c88c, 0xb811802a, + 0x9239b848}, + {0x00000000, 0x4713f6fb, 0x8e27edf6, 0xc9341b0d, 0xc73eddad, + 0x802d2b56, 0x4919305b, 0x0e0ac6a0, 0x550cbd1b, 0x121f4be0, + 0xdb2b50ed, 0x9c38a616, 0x923260b6, 0xd521964d, 0x1c158d40, + 0x5b067bbb, 0xaa197a36, 0xed0a8ccd, 0x243e97c0, 0x632d613b, + 0x6d27a79b, 0x2a345160, 0xe3004a6d, 0xa413bc96, 0xff15c72d, + 0xb80631d6, 0x71322adb, 0x3621dc20, 0x382b1a80, 0x7f38ec7b, + 0xb60cf776, 0xf11f018d, 0x8f43f22d, 0xc85004d6, 0x01641fdb, + 0x4677e920, 0x487d2f80, 0x0f6ed97b, 0xc65ac276, 0x8149348d, + 0xda4f4f36, 0x9d5cb9cd, 0x5468a2c0, 0x137b543b, 0x1d71929b, + 0x5a626460, 0x93567f6d, 0xd4458996, 0x255a881b, 0x62497ee0, + 0xab7d65ed, 0xec6e9316, 0xe26455b6, 0xa577a34d, 0x6c43b840, + 0x2b504ebb, 0x70563500, 0x3745c3fb, 0xfe71d8f6, 0xb9622e0d, + 0xb768e8ad, 0xf07b1e56, 0x394f055b, 0x7e5cf3a0, 0xc5f6e21b, + 0x82e514e0, 0x4bd10fed, 0x0cc2f916, 0x02c83fb6, 0x45dbc94d, + 0x8cefd240, 0xcbfc24bb, 0x90fa5f00, 0xd7e9a9fb, 0x1eddb2f6, + 0x59ce440d, 0x57c482ad, 0x10d77456, 0xd9e36f5b, 0x9ef099a0, + 0x6fef982d, 0x28fc6ed6, 0xe1c875db, 0xa6db8320, 0xa8d14580, + 0xefc2b37b, 0x26f6a876, 0x61e55e8d, 0x3ae32536, 0x7df0d3cd, + 0xb4c4c8c0, 0xf3d73e3b, 0xfdddf89b, 0xbace0e60, 0x73fa156d, + 0x34e9e396, 0x4ab51036, 0x0da6e6cd, 0xc492fdc0, 0x83810b3b, + 0x8d8bcd9b, 0xca983b60, 0x03ac206d, 0x44bfd696, 0x1fb9ad2d, + 0x58aa5bd6, 0x919e40db, 0xd68db620, 0xd8877080, 0x9f94867b, + 0x56a09d76, 0x11b36b8d, 0xe0ac6a00, 0xa7bf9cfb, 0x6e8b87f6, + 0x2998710d, 0x2792b7ad, 0x60814156, 0xa9b55a5b, 0xeea6aca0, + 0xb5a0d71b, 0xf2b321e0, 0x3b873aed, 0x7c94cc16, 0x729e0ab6, + 0x358dfc4d, 0xfcb9e740, 0xbbaa11bb, 0x509cc277, 0x178f348c, + 0xdebb2f81, 0x99a8d97a, 0x97a21fda, 0xd0b1e921, 0x1985f22c, + 0x5e9604d7, 0x05907f6c, 0x42838997, 0x8bb7929a, 0xcca46461, + 0xc2aea2c1, 0x85bd543a, 0x4c894f37, 0x0b9ab9cc, 0xfa85b841, + 0xbd964eba, 0x74a255b7, 0x33b1a34c, 0x3dbb65ec, 0x7aa89317, + 0xb39c881a, 0xf48f7ee1, 0xaf89055a, 0xe89af3a1, 0x21aee8ac, + 0x66bd1e57, 0x68b7d8f7, 0x2fa42e0c, 0xe6903501, 0xa183c3fa, + 0xdfdf305a, 0x98ccc6a1, 0x51f8ddac, 0x16eb2b57, 0x18e1edf7, + 0x5ff21b0c, 0x96c60001, 0xd1d5f6fa, 0x8ad38d41, 0xcdc07bba, + 0x04f460b7, 0x43e7964c, 0x4ded50ec, 0x0afea617, 0xc3cabd1a, + 0x84d94be1, 0x75c64a6c, 0x32d5bc97, 0xfbe1a79a, 0xbcf25161, + 0xb2f897c1, 0xf5eb613a, 0x3cdf7a37, 0x7bcc8ccc, 0x20caf777, + 0x67d9018c, 0xaeed1a81, 0xe9feec7a, 0xe7f42ada, 0xa0e7dc21, + 0x69d3c72c, 0x2ec031d7, 0x956a206c, 0xd279d697, 0x1b4dcd9a, + 0x5c5e3b61, 0x5254fdc1, 0x15470b3a, 0xdc731037, 0x9b60e6cc, + 0xc0669d77, 0x87756b8c, 0x4e417081, 0x0952867a, 0x075840da, + 0x404bb621, 0x897fad2c, 0xce6c5bd7, 0x3f735a5a, 0x7860aca1, + 0xb154b7ac, 0xf6474157, 0xf84d87f7, 0xbf5e710c, 0x766a6a01, + 0x31799cfa, 0x6a7fe741, 0x2d6c11ba, 0xe4580ab7, 0xa34bfc4c, + 0xad413aec, 0xea52cc17, 0x2366d71a, 0x647521e1, 0x1a29d241, + 0x5d3a24ba, 0x940e3fb7, 0xd31dc94c, 0xdd170fec, 0x9a04f917, + 0x5330e21a, 0x142314e1, 0x4f256f5a, 0x083699a1, 0xc10282ac, + 0x86117457, 0x881bb2f7, 0xcf08440c, 0x063c5f01, 0x412fa9fa, + 0xb030a877, 0xf7235e8c, 0x3e174581, 0x7904b37a, 0x770e75da, + 0x301d8321, 0xf929982c, 0xbe3a6ed7, 0xe53c156c, 0xa22fe397, + 0x6b1bf89a, 0x2c080e61, 0x2202c8c1, 0x65113e3a, 0xac252537, + 0xeb36d3cc}, + {0x00000000, 0xa13984ee, 0x99020f9d, 0x383b8b73, 0xe975197b, + 0x484c9d95, 0x707716e6, 0xd14e9208, 0x099b34b7, 0xa8a2b059, + 0x90993b2a, 0x31a0bfc4, 0xe0ee2dcc, 0x41d7a922, 0x79ec2251, + 0xd8d5a6bf, 0x1336696e, 0xb20fed80, 0x8a3466f3, 0x2b0de21d, + 0xfa437015, 0x5b7af4fb, 0x63417f88, 0xc278fb66, 0x1aad5dd9, + 0xbb94d937, 0x83af5244, 0x2296d6aa, 0xf3d844a2, 0x52e1c04c, + 0x6ada4b3f, 0xcbe3cfd1, 0x266cd2dc, 0x87555632, 0xbf6edd41, + 0x1e5759af, 0xcf19cba7, 0x6e204f49, 0x561bc43a, 0xf72240d4, + 0x2ff7e66b, 0x8ece6285, 0xb6f5e9f6, 0x17cc6d18, 0xc682ff10, + 0x67bb7bfe, 0x5f80f08d, 0xfeb97463, 0x355abbb2, 0x94633f5c, + 0xac58b42f, 0x0d6130c1, 0xdc2fa2c9, 0x7d162627, 0x452dad54, + 0xe41429ba, 0x3cc18f05, 0x9df80beb, 0xa5c38098, 0x04fa0476, + 0xd5b4967e, 0x748d1290, 0x4cb699e3, 0xed8f1d0d, 0x4cd9a5b8, + 0xede02156, 0xd5dbaa25, 0x74e22ecb, 0xa5acbcc3, 0x0495382d, + 0x3caeb35e, 0x9d9737b0, 0x4542910f, 0xe47b15e1, 0xdc409e92, + 0x7d791a7c, 0xac378874, 0x0d0e0c9a, 0x353587e9, 0x940c0307, + 0x5fefccd6, 0xfed64838, 0xc6edc34b, 0x67d447a5, 0xb69ad5ad, + 0x17a35143, 0x2f98da30, 0x8ea15ede, 0x5674f861, 0xf74d7c8f, + 0xcf76f7fc, 0x6e4f7312, 0xbf01e11a, 0x1e3865f4, 0x2603ee87, + 0x873a6a69, 0x6ab57764, 0xcb8cf38a, 0xf3b778f9, 0x528efc17, + 0x83c06e1f, 0x22f9eaf1, 0x1ac26182, 0xbbfbe56c, 0x632e43d3, + 0xc217c73d, 0xfa2c4c4e, 0x5b15c8a0, 0x8a5b5aa8, 0x2b62de46, + 0x13595535, 0xb260d1db, 0x79831e0a, 0xd8ba9ae4, 0xe0811197, + 0x41b89579, 0x90f60771, 0x31cf839f, 0x09f408ec, 0xa8cd8c02, + 0x70182abd, 0xd121ae53, 0xe91a2520, 0x4823a1ce, 0x996d33c6, + 0x3854b728, 0x006f3c5b, 0xa156b8b5, 0x99b34b70, 0x388acf9e, + 0x00b144ed, 0xa188c003, 0x70c6520b, 0xd1ffd6e5, 0xe9c45d96, + 0x48fdd978, 0x90287fc7, 0x3111fb29, 0x092a705a, 0xa813f4b4, + 0x795d66bc, 0xd864e252, 0xe05f6921, 0x4166edcf, 0x8a85221e, + 0x2bbca6f0, 0x13872d83, 0xb2bea96d, 0x63f03b65, 0xc2c9bf8b, + 0xfaf234f8, 0x5bcbb016, 0x831e16a9, 0x22279247, 0x1a1c1934, + 0xbb259dda, 0x6a6b0fd2, 0xcb528b3c, 0xf369004f, 0x525084a1, + 0xbfdf99ac, 0x1ee61d42, 0x26dd9631, 0x87e412df, 0x56aa80d7, + 0xf7930439, 0xcfa88f4a, 0x6e910ba4, 0xb644ad1b, 0x177d29f5, + 0x2f46a286, 0x8e7f2668, 0x5f31b460, 0xfe08308e, 0xc633bbfd, + 0x670a3f13, 0xace9f0c2, 0x0dd0742c, 0x35ebff5f, 0x94d27bb1, + 0x459ce9b9, 0xe4a56d57, 0xdc9ee624, 0x7da762ca, 0xa572c475, + 0x044b409b, 0x3c70cbe8, 0x9d494f06, 0x4c07dd0e, 0xed3e59e0, + 0xd505d293, 0x743c567d, 0xd56aeec8, 0x74536a26, 0x4c68e155, + 0xed5165bb, 0x3c1ff7b3, 0x9d26735d, 0xa51df82e, 0x04247cc0, + 0xdcf1da7f, 0x7dc85e91, 0x45f3d5e2, 0xe4ca510c, 0x3584c304, + 0x94bd47ea, 0xac86cc99, 0x0dbf4877, 0xc65c87a6, 0x67650348, + 0x5f5e883b, 0xfe670cd5, 0x2f299edd, 0x8e101a33, 0xb62b9140, + 0x171215ae, 0xcfc7b311, 0x6efe37ff, 0x56c5bc8c, 0xf7fc3862, + 0x26b2aa6a, 0x878b2e84, 0xbfb0a5f7, 0x1e892119, 0xf3063c14, + 0x523fb8fa, 0x6a043389, 0xcb3db767, 0x1a73256f, 0xbb4aa181, + 0x83712af2, 0x2248ae1c, 0xfa9d08a3, 0x5ba48c4d, 0x639f073e, + 0xc2a683d0, 0x13e811d8, 0xb2d19536, 0x8aea1e45, 0x2bd39aab, + 0xe030557a, 0x4109d194, 0x79325ae7, 0xd80bde09, 0x09454c01, + 0xa87cc8ef, 0x9047439c, 0x317ec772, 0xe9ab61cd, 0x4892e523, + 0x70a96e50, 0xd190eabe, 0x00de78b6, 0xa1e7fc58, 0x99dc772b, + 0x38e5f3c5}, + {0x00000000, 0xe81790a1, 0x0b5e2703, 0xe349b7a2, 0x16bc4e06, + 0xfeabdea7, 0x1de26905, 0xf5f5f9a4, 0x2d789c0c, 0xc56f0cad, + 0x2626bb0f, 0xce312bae, 0x3bc4d20a, 0xd3d342ab, 0x309af509, + 0xd88d65a8, 0x5af13818, 0xb2e6a8b9, 0x51af1f1b, 0xb9b88fba, + 0x4c4d761e, 0xa45ae6bf, 0x4713511d, 0xaf04c1bc, 0x7789a414, + 0x9f9e34b5, 0x7cd78317, 0x94c013b6, 0x6135ea12, 0x89227ab3, + 0x6a6bcd11, 0x827c5db0, 0xb5e27030, 0x5df5e091, 0xbebc5733, + 0x56abc792, 0xa35e3e36, 0x4b49ae97, 0xa8001935, 0x40178994, + 0x989aec3c, 0x708d7c9d, 0x93c4cb3f, 0x7bd35b9e, 0x8e26a23a, + 0x6631329b, 0x85788539, 0x6d6f1598, 0xef134828, 0x0704d889, + 0xe44d6f2b, 0x0c5aff8a, 0xf9af062e, 0x11b8968f, 0xf2f1212d, + 0x1ae6b18c, 0xc26bd424, 0x2a7c4485, 0xc935f327, 0x21226386, + 0xd4d79a22, 0x3cc00a83, 0xdf89bd21, 0x379e2d80, 0xb0b5e621, + 0x58a27680, 0xbbebc122, 0x53fc5183, 0xa609a827, 0x4e1e3886, + 0xad578f24, 0x45401f85, 0x9dcd7a2d, 0x75daea8c, 0x96935d2e, + 0x7e84cd8f, 0x8b71342b, 0x6366a48a, 0x802f1328, 0x68388389, + 0xea44de39, 0x02534e98, 0xe11af93a, 0x090d699b, 0xfcf8903f, + 0x14ef009e, 0xf7a6b73c, 0x1fb1279d, 0xc73c4235, 0x2f2bd294, + 0xcc626536, 0x2475f597, 0xd1800c33, 0x39979c92, 0xdade2b30, + 0x32c9bb91, 0x05579611, 0xed4006b0, 0x0e09b112, 0xe61e21b3, + 0x13ebd817, 0xfbfc48b6, 0x18b5ff14, 0xf0a26fb5, 0x282f0a1d, + 0xc0389abc, 0x23712d1e, 0xcb66bdbf, 0x3e93441b, 0xd684d4ba, + 0x35cd6318, 0xdddaf3b9, 0x5fa6ae09, 0xb7b13ea8, 0x54f8890a, + 0xbcef19ab, 0x491ae00f, 0xa10d70ae, 0x4244c70c, 0xaa5357ad, + 0x72de3205, 0x9ac9a2a4, 0x79801506, 0x919785a7, 0x64627c03, + 0x8c75eca2, 0x6f3c5b00, 0x872bcba1, 0xba1aca03, 0x520d5aa2, + 0xb144ed00, 0x59537da1, 0xaca68405, 0x44b114a4, 0xa7f8a306, + 0x4fef33a7, 0x9762560f, 0x7f75c6ae, 0x9c3c710c, 0x742be1ad, + 0x81de1809, 0x69c988a8, 0x8a803f0a, 0x6297afab, 0xe0ebf21b, + 0x08fc62ba, 0xebb5d518, 0x03a245b9, 0xf657bc1d, 0x1e402cbc, + 0xfd099b1e, 0x151e0bbf, 0xcd936e17, 0x2584feb6, 0xc6cd4914, + 0x2edad9b5, 0xdb2f2011, 0x3338b0b0, 0xd0710712, 0x386697b3, + 0x0ff8ba33, 0xe7ef2a92, 0x04a69d30, 0xecb10d91, 0x1944f435, + 0xf1536494, 0x121ad336, 0xfa0d4397, 0x2280263f, 0xca97b69e, + 0x29de013c, 0xc1c9919d, 0x343c6839, 0xdc2bf898, 0x3f624f3a, + 0xd775df9b, 0x5509822b, 0xbd1e128a, 0x5e57a528, 0xb6403589, + 0x43b5cc2d, 0xaba25c8c, 0x48ebeb2e, 0xa0fc7b8f, 0x78711e27, + 0x90668e86, 0x732f3924, 0x9b38a985, 0x6ecd5021, 0x86dac080, + 0x65937722, 0x8d84e783, 0x0aaf2c22, 0xe2b8bc83, 0x01f10b21, + 0xe9e69b80, 0x1c136224, 0xf404f285, 0x174d4527, 0xff5ad586, + 0x27d7b02e, 0xcfc0208f, 0x2c89972d, 0xc49e078c, 0x316bfe28, + 0xd97c6e89, 0x3a35d92b, 0xd222498a, 0x505e143a, 0xb849849b, + 0x5b003339, 0xb317a398, 0x46e25a3c, 0xaef5ca9d, 0x4dbc7d3f, + 0xa5abed9e, 0x7d268836, 0x95311897, 0x7678af35, 0x9e6f3f94, + 0x6b9ac630, 0x838d5691, 0x60c4e133, 0x88d37192, 0xbf4d5c12, + 0x575accb3, 0xb4137b11, 0x5c04ebb0, 0xa9f11214, 0x41e682b5, + 0xa2af3517, 0x4ab8a5b6, 0x9235c01e, 0x7a2250bf, 0x996be71d, + 0x717c77bc, 0x84898e18, 0x6c9e1eb9, 0x8fd7a91b, 0x67c039ba, + 0xe5bc640a, 0x0dabf4ab, 0xeee24309, 0x06f5d3a8, 0xf3002a0c, + 0x1b17baad, 0xf85e0d0f, 0x10499dae, 0xc8c4f806, 0x20d368a7, + 0xc39adf05, 0x2b8d4fa4, 0xde78b600, 0x366f26a1, 0xd5269103, + 0x3d3101a2}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0xa19017e800000000, 0x03275e0b00000000, + 0xa2b749e300000000, 0x064ebc1600000000, 0xa7deabfe00000000, + 0x0569e21d00000000, 0xa4f9f5f500000000, 0x0c9c782d00000000, + 0xad0c6fc500000000, 0x0fbb262600000000, 0xae2b31ce00000000, + 0x0ad2c43b00000000, 0xab42d3d300000000, 0x09f59a3000000000, + 0xa8658dd800000000, 0x1838f15a00000000, 0xb9a8e6b200000000, + 0x1b1faf5100000000, 0xba8fb8b900000000, 0x1e764d4c00000000, + 0xbfe65aa400000000, 0x1d51134700000000, 0xbcc104af00000000, + 0x14a4897700000000, 0xb5349e9f00000000, 0x1783d77c00000000, + 0xb613c09400000000, 0x12ea356100000000, 0xb37a228900000000, + 0x11cd6b6a00000000, 0xb05d7c8200000000, 0x3070e2b500000000, + 0x91e0f55d00000000, 0x3357bcbe00000000, 0x92c7ab5600000000, + 0x363e5ea300000000, 0x97ae494b00000000, 0x351900a800000000, + 0x9489174000000000, 0x3cec9a9800000000, 0x9d7c8d7000000000, + 0x3fcbc49300000000, 0x9e5bd37b00000000, 0x3aa2268e00000000, + 0x9b32316600000000, 0x3985788500000000, 0x98156f6d00000000, + 0x284813ef00000000, 0x89d8040700000000, 0x2b6f4de400000000, + 0x8aff5a0c00000000, 0x2e06aff900000000, 0x8f96b81100000000, + 0x2d21f1f200000000, 0x8cb1e61a00000000, 0x24d46bc200000000, + 0x85447c2a00000000, 0x27f335c900000000, 0x8663222100000000, + 0x229ad7d400000000, 0x830ac03c00000000, 0x21bd89df00000000, + 0x802d9e3700000000, 0x21e6b5b000000000, 0x8076a25800000000, + 0x22c1ebbb00000000, 0x8351fc5300000000, 0x27a809a600000000, + 0x86381e4e00000000, 0x248f57ad00000000, 0x851f404500000000, + 0x2d7acd9d00000000, 0x8ceada7500000000, 0x2e5d939600000000, + 0x8fcd847e00000000, 0x2b34718b00000000, 0x8aa4666300000000, + 0x28132f8000000000, 0x8983386800000000, 0x39de44ea00000000, + 0x984e530200000000, 0x3af91ae100000000, 0x9b690d0900000000, + 0x3f90f8fc00000000, 0x9e00ef1400000000, 0x3cb7a6f700000000, + 0x9d27b11f00000000, 0x35423cc700000000, 0x94d22b2f00000000, + 0x366562cc00000000, 0x97f5752400000000, 0x330c80d100000000, + 0x929c973900000000, 0x302bdeda00000000, 0x91bbc93200000000, + 0x1196570500000000, 0xb00640ed00000000, 0x12b1090e00000000, + 0xb3211ee600000000, 0x17d8eb1300000000, 0xb648fcfb00000000, + 0x14ffb51800000000, 0xb56fa2f000000000, 0x1d0a2f2800000000, + 0xbc9a38c000000000, 0x1e2d712300000000, 0xbfbd66cb00000000, + 0x1b44933e00000000, 0xbad484d600000000, 0x1863cd3500000000, + 0xb9f3dadd00000000, 0x09aea65f00000000, 0xa83eb1b700000000, + 0x0a89f85400000000, 0xab19efbc00000000, 0x0fe01a4900000000, + 0xae700da100000000, 0x0cc7444200000000, 0xad5753aa00000000, + 0x0532de7200000000, 0xa4a2c99a00000000, 0x0615807900000000, + 0xa785979100000000, 0x037c626400000000, 0xa2ec758c00000000, + 0x005b3c6f00000000, 0xa1cb2b8700000000, 0x03ca1aba00000000, + 0xa25a0d5200000000, 0x00ed44b100000000, 0xa17d535900000000, + 0x0584a6ac00000000, 0xa414b14400000000, 0x06a3f8a700000000, + 0xa733ef4f00000000, 0x0f56629700000000, 0xaec6757f00000000, + 0x0c713c9c00000000, 0xade12b7400000000, 0x0918de8100000000, + 0xa888c96900000000, 0x0a3f808a00000000, 0xabaf976200000000, + 0x1bf2ebe000000000, 0xba62fc0800000000, 0x18d5b5eb00000000, + 0xb945a20300000000, 0x1dbc57f600000000, 0xbc2c401e00000000, + 0x1e9b09fd00000000, 0xbf0b1e1500000000, 0x176e93cd00000000, + 0xb6fe842500000000, 0x1449cdc600000000, 0xb5d9da2e00000000, + 0x11202fdb00000000, 0xb0b0383300000000, 0x120771d000000000, + 0xb397663800000000, 0x33baf80f00000000, 0x922aefe700000000, + 0x309da60400000000, 0x910db1ec00000000, 0x35f4441900000000, + 0x946453f100000000, 0x36d31a1200000000, 0x97430dfa00000000, + 0x3f26802200000000, 0x9eb697ca00000000, 0x3c01de2900000000, + 0x9d91c9c100000000, 0x39683c3400000000, 0x98f82bdc00000000, + 0x3a4f623f00000000, 0x9bdf75d700000000, 0x2b82095500000000, + 0x8a121ebd00000000, 0x28a5575e00000000, 0x893540b600000000, + 0x2dccb54300000000, 0x8c5ca2ab00000000, 0x2eebeb4800000000, + 0x8f7bfca000000000, 0x271e717800000000, 0x868e669000000000, + 0x24392f7300000000, 0x85a9389b00000000, 0x2150cd6e00000000, + 0x80c0da8600000000, 0x2277936500000000, 0x83e7848d00000000, + 0x222caf0a00000000, 0x83bcb8e200000000, 0x210bf10100000000, + 0x809be6e900000000, 0x2462131c00000000, 0x85f204f400000000, + 0x27454d1700000000, 0x86d55aff00000000, 0x2eb0d72700000000, + 0x8f20c0cf00000000, 0x2d97892c00000000, 0x8c079ec400000000, + 0x28fe6b3100000000, 0x896e7cd900000000, 0x2bd9353a00000000, + 0x8a4922d200000000, 0x3a145e5000000000, 0x9b8449b800000000, + 0x3933005b00000000, 0x98a317b300000000, 0x3c5ae24600000000, + 0x9dcaf5ae00000000, 0x3f7dbc4d00000000, 0x9eedaba500000000, + 0x3688267d00000000, 0x9718319500000000, 0x35af787600000000, + 0x943f6f9e00000000, 0x30c69a6b00000000, 0x91568d8300000000, + 0x33e1c46000000000, 0x9271d38800000000, 0x125c4dbf00000000, + 0xb3cc5a5700000000, 0x117b13b400000000, 0xb0eb045c00000000, + 0x1412f1a900000000, 0xb582e64100000000, 0x1735afa200000000, + 0xb6a5b84a00000000, 0x1ec0359200000000, 0xbf50227a00000000, + 0x1de76b9900000000, 0xbc777c7100000000, 0x188e898400000000, + 0xb91e9e6c00000000, 0x1ba9d78f00000000, 0xba39c06700000000, + 0x0a64bce500000000, 0xabf4ab0d00000000, 0x0943e2ee00000000, + 0xa8d3f50600000000, 0x0c2a00f300000000, 0xadba171b00000000, + 0x0f0d5ef800000000, 0xae9d491000000000, 0x06f8c4c800000000, + 0xa768d32000000000, 0x05df9ac300000000, 0xa44f8d2b00000000, + 0x00b678de00000000, 0xa1266f3600000000, 0x039126d500000000, + 0xa201313d00000000}, + {0x0000000000000000, 0xee8439a100000000, 0x9d0f029900000000, + 0x738b3b3800000000, 0x7b1975e900000000, 0x959d4c4800000000, + 0xe616777000000000, 0x08924ed100000000, 0xb7349b0900000000, + 0x59b0a2a800000000, 0x2a3b999000000000, 0xc4bfa03100000000, + 0xcc2deee000000000, 0x22a9d74100000000, 0x5122ec7900000000, + 0xbfa6d5d800000000, 0x6e69361300000000, 0x80ed0fb200000000, + 0xf366348a00000000, 0x1de20d2b00000000, 0x157043fa00000000, + 0xfbf47a5b00000000, 0x887f416300000000, 0x66fb78c200000000, + 0xd95dad1a00000000, 0x37d994bb00000000, 0x4452af8300000000, + 0xaad6962200000000, 0xa244d8f300000000, 0x4cc0e15200000000, + 0x3f4bda6a00000000, 0xd1cfe3cb00000000, 0xdcd26c2600000000, + 0x3256558700000000, 0x41dd6ebf00000000, 0xaf59571e00000000, + 0xa7cb19cf00000000, 0x494f206e00000000, 0x3ac41b5600000000, + 0xd44022f700000000, 0x6be6f72f00000000, 0x8562ce8e00000000, + 0xf6e9f5b600000000, 0x186dcc1700000000, 0x10ff82c600000000, + 0xfe7bbb6700000000, 0x8df0805f00000000, 0x6374b9fe00000000, + 0xb2bb5a3500000000, 0x5c3f639400000000, 0x2fb458ac00000000, + 0xc130610d00000000, 0xc9a22fdc00000000, 0x2726167d00000000, + 0x54ad2d4500000000, 0xba2914e400000000, 0x058fc13c00000000, + 0xeb0bf89d00000000, 0x9880c3a500000000, 0x7604fa0400000000, + 0x7e96b4d500000000, 0x90128d7400000000, 0xe399b64c00000000, + 0x0d1d8fed00000000, 0xb8a5d94c00000000, 0x5621e0ed00000000, + 0x25aadbd500000000, 0xcb2ee27400000000, 0xc3bcaca500000000, + 0x2d38950400000000, 0x5eb3ae3c00000000, 0xb037979d00000000, + 0x0f91424500000000, 0xe1157be400000000, 0x929e40dc00000000, + 0x7c1a797d00000000, 0x748837ac00000000, 0x9a0c0e0d00000000, + 0xe987353500000000, 0x07030c9400000000, 0xd6ccef5f00000000, + 0x3848d6fe00000000, 0x4bc3edc600000000, 0xa547d46700000000, + 0xadd59ab600000000, 0x4351a31700000000, 0x30da982f00000000, + 0xde5ea18e00000000, 0x61f8745600000000, 0x8f7c4df700000000, + 0xfcf776cf00000000, 0x12734f6e00000000, 0x1ae101bf00000000, + 0xf465381e00000000, 0x87ee032600000000, 0x696a3a8700000000, + 0x6477b56a00000000, 0x8af38ccb00000000, 0xf978b7f300000000, + 0x17fc8e5200000000, 0x1f6ec08300000000, 0xf1eaf92200000000, + 0x8261c21a00000000, 0x6ce5fbbb00000000, 0xd3432e6300000000, + 0x3dc717c200000000, 0x4e4c2cfa00000000, 0xa0c8155b00000000, + 0xa85a5b8a00000000, 0x46de622b00000000, 0x3555591300000000, + 0xdbd160b200000000, 0x0a1e837900000000, 0xe49abad800000000, + 0x971181e000000000, 0x7995b84100000000, 0x7107f69000000000, + 0x9f83cf3100000000, 0xec08f40900000000, 0x028ccda800000000, + 0xbd2a187000000000, 0x53ae21d100000000, 0x20251ae900000000, + 0xcea1234800000000, 0xc6336d9900000000, 0x28b7543800000000, + 0x5b3c6f0000000000, 0xb5b856a100000000, 0x704bb39900000000, + 0x9ecf8a3800000000, 0xed44b10000000000, 0x03c088a100000000, + 0x0b52c67000000000, 0xe5d6ffd100000000, 0x965dc4e900000000, + 0x78d9fd4800000000, 0xc77f289000000000, 0x29fb113100000000, + 0x5a702a0900000000, 0xb4f413a800000000, 0xbc665d7900000000, + 0x52e264d800000000, 0x21695fe000000000, 0xcfed664100000000, + 0x1e22858a00000000, 0xf0a6bc2b00000000, 0x832d871300000000, + 0x6da9beb200000000, 0x653bf06300000000, 0x8bbfc9c200000000, + 0xf834f2fa00000000, 0x16b0cb5b00000000, 0xa9161e8300000000, + 0x4792272200000000, 0x34191c1a00000000, 0xda9d25bb00000000, + 0xd20f6b6a00000000, 0x3c8b52cb00000000, 0x4f0069f300000000, + 0xa184505200000000, 0xac99dfbf00000000, 0x421de61e00000000, + 0x3196dd2600000000, 0xdf12e48700000000, 0xd780aa5600000000, + 0x390493f700000000, 0x4a8fa8cf00000000, 0xa40b916e00000000, + 0x1bad44b600000000, 0xf5297d1700000000, 0x86a2462f00000000, + 0x68267f8e00000000, 0x60b4315f00000000, 0x8e3008fe00000000, + 0xfdbb33c600000000, 0x133f0a6700000000, 0xc2f0e9ac00000000, + 0x2c74d00d00000000, 0x5fffeb3500000000, 0xb17bd29400000000, + 0xb9e99c4500000000, 0x576da5e400000000, 0x24e69edc00000000, + 0xca62a77d00000000, 0x75c472a500000000, 0x9b404b0400000000, + 0xe8cb703c00000000, 0x064f499d00000000, 0x0edd074c00000000, + 0xe0593eed00000000, 0x93d205d500000000, 0x7d563c7400000000, + 0xc8ee6ad500000000, 0x266a537400000000, 0x55e1684c00000000, + 0xbb6551ed00000000, 0xb3f71f3c00000000, 0x5d73269d00000000, + 0x2ef81da500000000, 0xc07c240400000000, 0x7fdaf1dc00000000, + 0x915ec87d00000000, 0xe2d5f34500000000, 0x0c51cae400000000, + 0x04c3843500000000, 0xea47bd9400000000, 0x99cc86ac00000000, + 0x7748bf0d00000000, 0xa6875cc600000000, 0x4803656700000000, + 0x3b885e5f00000000, 0xd50c67fe00000000, 0xdd9e292f00000000, + 0x331a108e00000000, 0x40912bb600000000, 0xae15121700000000, + 0x11b3c7cf00000000, 0xff37fe6e00000000, 0x8cbcc55600000000, + 0x6238fcf700000000, 0x6aaab22600000000, 0x842e8b8700000000, + 0xf7a5b0bf00000000, 0x1921891e00000000, 0x143c06f300000000, + 0xfab83f5200000000, 0x8933046a00000000, 0x67b73dcb00000000, + 0x6f25731a00000000, 0x81a14abb00000000, 0xf22a718300000000, + 0x1cae482200000000, 0xa3089dfa00000000, 0x4d8ca45b00000000, + 0x3e079f6300000000, 0xd083a6c200000000, 0xd811e81300000000, + 0x3695d1b200000000, 0x451eea8a00000000, 0xab9ad32b00000000, + 0x7a5530e000000000, 0x94d1094100000000, 0xe75a327900000000, + 0x09de0bd800000000, 0x014c450900000000, 0xefc87ca800000000, + 0x9c43479000000000, 0x72c77e3100000000, 0xcd61abe900000000, + 0x23e5924800000000, 0x506ea97000000000, 0xbeea90d100000000, + 0xb678de0000000000, 0x58fce7a100000000, 0x2b77dc9900000000, + 0xc5f3e53800000000}, + {0x0000000000000000, 0xfbf6134700000000, 0xf6ed278e00000000, + 0x0d1b34c900000000, 0xaddd3ec700000000, 0x562b2d8000000000, + 0x5b30194900000000, 0xa0c60a0e00000000, 0x1bbd0c5500000000, + 0xe04b1f1200000000, 0xed502bdb00000000, 0x16a6389c00000000, + 0xb660329200000000, 0x4d9621d500000000, 0x408d151c00000000, + 0xbb7b065b00000000, 0x367a19aa00000000, 0xcd8c0aed00000000, + 0xc0973e2400000000, 0x3b612d6300000000, 0x9ba7276d00000000, + 0x6051342a00000000, 0x6d4a00e300000000, 0x96bc13a400000000, + 0x2dc715ff00000000, 0xd63106b800000000, 0xdb2a327100000000, + 0x20dc213600000000, 0x801a2b3800000000, 0x7bec387f00000000, + 0x76f70cb600000000, 0x8d011ff100000000, 0x2df2438f00000000, + 0xd60450c800000000, 0xdb1f640100000000, 0x20e9774600000000, + 0x802f7d4800000000, 0x7bd96e0f00000000, 0x76c25ac600000000, + 0x8d34498100000000, 0x364f4fda00000000, 0xcdb95c9d00000000, + 0xc0a2685400000000, 0x3b547b1300000000, 0x9b92711d00000000, + 0x6064625a00000000, 0x6d7f569300000000, 0x968945d400000000, + 0x1b885a2500000000, 0xe07e496200000000, 0xed657dab00000000, + 0x16936eec00000000, 0xb65564e200000000, 0x4da377a500000000, + 0x40b8436c00000000, 0xbb4e502b00000000, 0x0035567000000000, + 0xfbc3453700000000, 0xf6d871fe00000000, 0x0d2e62b900000000, + 0xade868b700000000, 0x561e7bf000000000, 0x5b054f3900000000, + 0xa0f35c7e00000000, 0x1be2f6c500000000, 0xe014e58200000000, + 0xed0fd14b00000000, 0x16f9c20c00000000, 0xb63fc80200000000, + 0x4dc9db4500000000, 0x40d2ef8c00000000, 0xbb24fccb00000000, + 0x005ffa9000000000, 0xfba9e9d700000000, 0xf6b2dd1e00000000, + 0x0d44ce5900000000, 0xad82c45700000000, 0x5674d71000000000, + 0x5b6fe3d900000000, 0xa099f09e00000000, 0x2d98ef6f00000000, + 0xd66efc2800000000, 0xdb75c8e100000000, 0x2083dba600000000, + 0x8045d1a800000000, 0x7bb3c2ef00000000, 0x76a8f62600000000, + 0x8d5ee56100000000, 0x3625e33a00000000, 0xcdd3f07d00000000, + 0xc0c8c4b400000000, 0x3b3ed7f300000000, 0x9bf8ddfd00000000, + 0x600eceba00000000, 0x6d15fa7300000000, 0x96e3e93400000000, + 0x3610b54a00000000, 0xcde6a60d00000000, 0xc0fd92c400000000, + 0x3b0b818300000000, 0x9bcd8b8d00000000, 0x603b98ca00000000, + 0x6d20ac0300000000, 0x96d6bf4400000000, 0x2dadb91f00000000, + 0xd65baa5800000000, 0xdb409e9100000000, 0x20b68dd600000000, + 0x807087d800000000, 0x7b86949f00000000, 0x769da05600000000, + 0x8d6bb31100000000, 0x006aace000000000, 0xfb9cbfa700000000, + 0xf6878b6e00000000, 0x0d71982900000000, 0xadb7922700000000, + 0x5641816000000000, 0x5b5ab5a900000000, 0xa0aca6ee00000000, + 0x1bd7a0b500000000, 0xe021b3f200000000, 0xed3a873b00000000, + 0x16cc947c00000000, 0xb60a9e7200000000, 0x4dfc8d3500000000, + 0x40e7b9fc00000000, 0xbb11aabb00000000, 0x77c29c5000000000, + 0x8c348f1700000000, 0x812fbbde00000000, 0x7ad9a89900000000, + 0xda1fa29700000000, 0x21e9b1d000000000, 0x2cf2851900000000, + 0xd704965e00000000, 0x6c7f900500000000, 0x9789834200000000, + 0x9a92b78b00000000, 0x6164a4cc00000000, 0xc1a2aec200000000, + 0x3a54bd8500000000, 0x374f894c00000000, 0xccb99a0b00000000, + 0x41b885fa00000000, 0xba4e96bd00000000, 0xb755a27400000000, + 0x4ca3b13300000000, 0xec65bb3d00000000, 0x1793a87a00000000, + 0x1a889cb300000000, 0xe17e8ff400000000, 0x5a0589af00000000, + 0xa1f39ae800000000, 0xace8ae2100000000, 0x571ebd6600000000, + 0xf7d8b76800000000, 0x0c2ea42f00000000, 0x013590e600000000, + 0xfac383a100000000, 0x5a30dfdf00000000, 0xa1c6cc9800000000, + 0xacddf85100000000, 0x572beb1600000000, 0xf7ede11800000000, + 0x0c1bf25f00000000, 0x0100c69600000000, 0xfaf6d5d100000000, + 0x418dd38a00000000, 0xba7bc0cd00000000, 0xb760f40400000000, + 0x4c96e74300000000, 0xec50ed4d00000000, 0x17a6fe0a00000000, + 0x1abdcac300000000, 0xe14bd98400000000, 0x6c4ac67500000000, + 0x97bcd53200000000, 0x9aa7e1fb00000000, 0x6151f2bc00000000, + 0xc197f8b200000000, 0x3a61ebf500000000, 0x377adf3c00000000, + 0xcc8ccc7b00000000, 0x77f7ca2000000000, 0x8c01d96700000000, + 0x811aedae00000000, 0x7aecfee900000000, 0xda2af4e700000000, + 0x21dce7a000000000, 0x2cc7d36900000000, 0xd731c02e00000000, + 0x6c206a9500000000, 0x97d679d200000000, 0x9acd4d1b00000000, + 0x613b5e5c00000000, 0xc1fd545200000000, 0x3a0b471500000000, + 0x371073dc00000000, 0xcce6609b00000000, 0x779d66c000000000, + 0x8c6b758700000000, 0x8170414e00000000, 0x7a86520900000000, + 0xda40580700000000, 0x21b64b4000000000, 0x2cad7f8900000000, + 0xd75b6cce00000000, 0x5a5a733f00000000, 0xa1ac607800000000, + 0xacb754b100000000, 0x574147f600000000, 0xf7874df800000000, + 0x0c715ebf00000000, 0x016a6a7600000000, 0xfa9c793100000000, + 0x41e77f6a00000000, 0xba116c2d00000000, 0xb70a58e400000000, + 0x4cfc4ba300000000, 0xec3a41ad00000000, 0x17cc52ea00000000, + 0x1ad7662300000000, 0xe121756400000000, 0x41d2291a00000000, + 0xba243a5d00000000, 0xb73f0e9400000000, 0x4cc91dd300000000, + 0xec0f17dd00000000, 0x17f9049a00000000, 0x1ae2305300000000, + 0xe114231400000000, 0x5a6f254f00000000, 0xa199360800000000, + 0xac8202c100000000, 0x5774118600000000, 0xf7b21b8800000000, + 0x0c4408cf00000000, 0x015f3c0600000000, 0xfaa92f4100000000, + 0x77a830b000000000, 0x8c5e23f700000000, 0x8145173e00000000, + 0x7ab3047900000000, 0xda750e7700000000, 0x21831d3000000000, + 0x2c9829f900000000, 0xd76e3abe00000000, 0x6c153ce500000000, + 0x97e32fa200000000, 0x9af81b6b00000000, 0x610e082c00000000, + 0xc1c8022200000000, 0x3a3e116500000000, 0x372525ac00000000, + 0xccd336eb00000000}, + {0x0000000000000000, 0x6238282a00000000, 0xc470505400000000, + 0xa648787e00000000, 0x88e1a0a800000000, 0xead9888200000000, + 0x4c91f0fc00000000, 0x2ea9d8d600000000, 0x51c5308a00000000, + 0x33fd18a000000000, 0x95b560de00000000, 0xf78d48f400000000, + 0xd924902200000000, 0xbb1cb80800000000, 0x1d54c07600000000, + 0x7f6ce85c00000000, 0xe38c10cf00000000, 0x81b438e500000000, + 0x27fc409b00000000, 0x45c468b100000000, 0x6b6db06700000000, + 0x0955984d00000000, 0xaf1de03300000000, 0xcd25c81900000000, + 0xb249204500000000, 0xd071086f00000000, 0x7639701100000000, + 0x1401583b00000000, 0x3aa880ed00000000, 0x5890a8c700000000, + 0xfed8d0b900000000, 0x9ce0f89300000000, 0x871f504500000000, + 0xe527786f00000000, 0x436f001100000000, 0x2157283b00000000, + 0x0ffef0ed00000000, 0x6dc6d8c700000000, 0xcb8ea0b900000000, + 0xa9b6889300000000, 0xd6da60cf00000000, 0xb4e248e500000000, + 0x12aa309b00000000, 0x709218b100000000, 0x5e3bc06700000000, + 0x3c03e84d00000000, 0x9a4b903300000000, 0xf873b81900000000, + 0x6493408a00000000, 0x06ab68a000000000, 0xa0e310de00000000, + 0xc2db38f400000000, 0xec72e02200000000, 0x8e4ac80800000000, + 0x2802b07600000000, 0x4a3a985c00000000, 0x3556700000000000, + 0x576e582a00000000, 0xf126205400000000, 0x931e087e00000000, + 0xbdb7d0a800000000, 0xdf8ff88200000000, 0x79c780fc00000000, + 0x1bffa8d600000000, 0x0e3fa08a00000000, 0x6c0788a000000000, + 0xca4ff0de00000000, 0xa877d8f400000000, 0x86de002200000000, + 0xe4e6280800000000, 0x42ae507600000000, 0x2096785c00000000, + 0x5ffa900000000000, 0x3dc2b82a00000000, 0x9b8ac05400000000, + 0xf9b2e87e00000000, 0xd71b30a800000000, 0xb523188200000000, + 0x136b60fc00000000, 0x715348d600000000, 0xedb3b04500000000, + 0x8f8b986f00000000, 0x29c3e01100000000, 0x4bfbc83b00000000, + 0x655210ed00000000, 0x076a38c700000000, 0xa12240b900000000, + 0xc31a689300000000, 0xbc7680cf00000000, 0xde4ea8e500000000, + 0x7806d09b00000000, 0x1a3ef8b100000000, 0x3497206700000000, + 0x56af084d00000000, 0xf0e7703300000000, 0x92df581900000000, + 0x8920f0cf00000000, 0xeb18d8e500000000, 0x4d50a09b00000000, + 0x2f6888b100000000, 0x01c1506700000000, 0x63f9784d00000000, + 0xc5b1003300000000, 0xa789281900000000, 0xd8e5c04500000000, + 0xbadde86f00000000, 0x1c95901100000000, 0x7eadb83b00000000, + 0x500460ed00000000, 0x323c48c700000000, 0x947430b900000000, + 0xf64c189300000000, 0x6aace00000000000, 0x0894c82a00000000, + 0xaedcb05400000000, 0xcce4987e00000000, 0xe24d40a800000000, + 0x8075688200000000, 0x263d10fc00000000, 0x440538d600000000, + 0x3b69d08a00000000, 0x5951f8a000000000, 0xff1980de00000000, + 0x9d21a8f400000000, 0xb388702200000000, 0xd1b0580800000000, + 0x77f8207600000000, 0x15c0085c00000000, 0x5d7831ce00000000, + 0x3f4019e400000000, 0x9908619a00000000, 0xfb3049b000000000, + 0xd599916600000000, 0xb7a1b94c00000000, 0x11e9c13200000000, + 0x73d1e91800000000, 0x0cbd014400000000, 0x6e85296e00000000, + 0xc8cd511000000000, 0xaaf5793a00000000, 0x845ca1ec00000000, + 0xe66489c600000000, 0x402cf1b800000000, 0x2214d99200000000, + 0xbef4210100000000, 0xdccc092b00000000, 0x7a84715500000000, + 0x18bc597f00000000, 0x361581a900000000, 0x542da98300000000, + 0xf265d1fd00000000, 0x905df9d700000000, 0xef31118b00000000, + 0x8d0939a100000000, 0x2b4141df00000000, 0x497969f500000000, + 0x67d0b12300000000, 0x05e8990900000000, 0xa3a0e17700000000, + 0xc198c95d00000000, 0xda67618b00000000, 0xb85f49a100000000, + 0x1e1731df00000000, 0x7c2f19f500000000, 0x5286c12300000000, + 0x30bee90900000000, 0x96f6917700000000, 0xf4ceb95d00000000, + 0x8ba2510100000000, 0xe99a792b00000000, 0x4fd2015500000000, + 0x2dea297f00000000, 0x0343f1a900000000, 0x617bd98300000000, + 0xc733a1fd00000000, 0xa50b89d700000000, 0x39eb714400000000, + 0x5bd3596e00000000, 0xfd9b211000000000, 0x9fa3093a00000000, + 0xb10ad1ec00000000, 0xd332f9c600000000, 0x757a81b800000000, + 0x1742a99200000000, 0x682e41ce00000000, 0x0a1669e400000000, + 0xac5e119a00000000, 0xce6639b000000000, 0xe0cfe16600000000, + 0x82f7c94c00000000, 0x24bfb13200000000, 0x4687991800000000, + 0x5347914400000000, 0x317fb96e00000000, 0x9737c11000000000, + 0xf50fe93a00000000, 0xdba631ec00000000, 0xb99e19c600000000, + 0x1fd661b800000000, 0x7dee499200000000, 0x0282a1ce00000000, + 0x60ba89e400000000, 0xc6f2f19a00000000, 0xa4cad9b000000000, + 0x8a63016600000000, 0xe85b294c00000000, 0x4e13513200000000, + 0x2c2b791800000000, 0xb0cb818b00000000, 0xd2f3a9a100000000, + 0x74bbd1df00000000, 0x1683f9f500000000, 0x382a212300000000, + 0x5a12090900000000, 0xfc5a717700000000, 0x9e62595d00000000, + 0xe10eb10100000000, 0x8336992b00000000, 0x257ee15500000000, + 0x4746c97f00000000, 0x69ef11a900000000, 0x0bd7398300000000, + 0xad9f41fd00000000, 0xcfa769d700000000, 0xd458c10100000000, + 0xb660e92b00000000, 0x1028915500000000, 0x7210b97f00000000, + 0x5cb961a900000000, 0x3e81498300000000, 0x98c931fd00000000, + 0xfaf119d700000000, 0x859df18b00000000, 0xe7a5d9a100000000, + 0x41eda1df00000000, 0x23d589f500000000, 0x0d7c512300000000, + 0x6f44790900000000, 0xc90c017700000000, 0xab34295d00000000, + 0x37d4d1ce00000000, 0x55ecf9e400000000, 0xf3a4819a00000000, + 0x919ca9b000000000, 0xbf35716600000000, 0xdd0d594c00000000, + 0x7b45213200000000, 0x197d091800000000, 0x6611e14400000000, + 0x0429c96e00000000, 0xa261b11000000000, 0xc059993a00000000, + 0xeef041ec00000000, 0x8cc869c600000000, 0x2a8011b800000000, + 0x48b8399200000000}, + {0x0000000000000000, 0x4c2896a300000000, 0xd9565d9c00000000, + 0x957ecb3f00000000, 0xf3abcbe300000000, 0xbf835d4000000000, + 0x2afd967f00000000, 0x66d500dc00000000, 0xa751e61c00000000, + 0xeb7970bf00000000, 0x7e07bb8000000000, 0x322f2d2300000000, + 0x54fa2dff00000000, 0x18d2bb5c00000000, 0x8dac706300000000, + 0xc184e6c000000000, 0x4ea3cc3900000000, 0x028b5a9a00000000, + 0x97f591a500000000, 0xdbdd070600000000, 0xbd0807da00000000, + 0xf120917900000000, 0x645e5a4600000000, 0x2876cce500000000, + 0xe9f22a2500000000, 0xa5dabc8600000000, 0x30a477b900000000, + 0x7c8ce11a00000000, 0x1a59e1c600000000, 0x5671776500000000, + 0xc30fbc5a00000000, 0x8f272af900000000, 0x9c46997300000000, + 0xd06e0fd000000000, 0x4510c4ef00000000, 0x0938524c00000000, + 0x6fed529000000000, 0x23c5c43300000000, 0xb6bb0f0c00000000, + 0xfa9399af00000000, 0x3b177f6f00000000, 0x773fe9cc00000000, + 0xe24122f300000000, 0xae69b45000000000, 0xc8bcb48c00000000, + 0x8494222f00000000, 0x11eae91000000000, 0x5dc27fb300000000, + 0xd2e5554a00000000, 0x9ecdc3e900000000, 0x0bb308d600000000, + 0x479b9e7500000000, 0x214e9ea900000000, 0x6d66080a00000000, + 0xf818c33500000000, 0xb430559600000000, 0x75b4b35600000000, + 0x399c25f500000000, 0xace2eeca00000000, 0xe0ca786900000000, + 0x861f78b500000000, 0xca37ee1600000000, 0x5f49252900000000, + 0x1361b38a00000000, 0x388d32e700000000, 0x74a5a44400000000, + 0xe1db6f7b00000000, 0xadf3f9d800000000, 0xcb26f90400000000, + 0x870e6fa700000000, 0x1270a49800000000, 0x5e58323b00000000, + 0x9fdcd4fb00000000, 0xd3f4425800000000, 0x468a896700000000, + 0x0aa21fc400000000, 0x6c771f1800000000, 0x205f89bb00000000, + 0xb521428400000000, 0xf909d42700000000, 0x762efede00000000, + 0x3a06687d00000000, 0xaf78a34200000000, 0xe35035e100000000, + 0x8585353d00000000, 0xc9ada39e00000000, 0x5cd368a100000000, + 0x10fbfe0200000000, 0xd17f18c200000000, 0x9d578e6100000000, + 0x0829455e00000000, 0x4401d3fd00000000, 0x22d4d32100000000, + 0x6efc458200000000, 0xfb828ebd00000000, 0xb7aa181e00000000, + 0xa4cbab9400000000, 0xe8e33d3700000000, 0x7d9df60800000000, + 0x31b560ab00000000, 0x5760607700000000, 0x1b48f6d400000000, + 0x8e363deb00000000, 0xc21eab4800000000, 0x039a4d8800000000, + 0x4fb2db2b00000000, 0xdacc101400000000, 0x96e486b700000000, + 0xf031866b00000000, 0xbc1910c800000000, 0x2967dbf700000000, + 0x654f4d5400000000, 0xea6867ad00000000, 0xa640f10e00000000, + 0x333e3a3100000000, 0x7f16ac9200000000, 0x19c3ac4e00000000, + 0x55eb3aed00000000, 0xc095f1d200000000, 0x8cbd677100000000, + 0x4d3981b100000000, 0x0111171200000000, 0x946fdc2d00000000, + 0xd8474a8e00000000, 0xbe924a5200000000, 0xf2badcf100000000, + 0x67c417ce00000000, 0x2bec816d00000000, 0x311c141500000000, + 0x7d3482b600000000, 0xe84a498900000000, 0xa462df2a00000000, + 0xc2b7dff600000000, 0x8e9f495500000000, 0x1be1826a00000000, + 0x57c914c900000000, 0x964df20900000000, 0xda6564aa00000000, + 0x4f1baf9500000000, 0x0333393600000000, 0x65e639ea00000000, + 0x29ceaf4900000000, 0xbcb0647600000000, 0xf098f2d500000000, + 0x7fbfd82c00000000, 0x33974e8f00000000, 0xa6e985b000000000, + 0xeac1131300000000, 0x8c1413cf00000000, 0xc03c856c00000000, + 0x55424e5300000000, 0x196ad8f000000000, 0xd8ee3e3000000000, + 0x94c6a89300000000, 0x01b863ac00000000, 0x4d90f50f00000000, + 0x2b45f5d300000000, 0x676d637000000000, 0xf213a84f00000000, + 0xbe3b3eec00000000, 0xad5a8d6600000000, 0xe1721bc500000000, + 0x740cd0fa00000000, 0x3824465900000000, 0x5ef1468500000000, + 0x12d9d02600000000, 0x87a71b1900000000, 0xcb8f8dba00000000, + 0x0a0b6b7a00000000, 0x4623fdd900000000, 0xd35d36e600000000, + 0x9f75a04500000000, 0xf9a0a09900000000, 0xb588363a00000000, + 0x20f6fd0500000000, 0x6cde6ba600000000, 0xe3f9415f00000000, + 0xafd1d7fc00000000, 0x3aaf1cc300000000, 0x76878a6000000000, + 0x10528abc00000000, 0x5c7a1c1f00000000, 0xc904d72000000000, + 0x852c418300000000, 0x44a8a74300000000, 0x088031e000000000, + 0x9dfefadf00000000, 0xd1d66c7c00000000, 0xb7036ca000000000, + 0xfb2bfa0300000000, 0x6e55313c00000000, 0x227da79f00000000, + 0x099126f200000000, 0x45b9b05100000000, 0xd0c77b6e00000000, + 0x9cefedcd00000000, 0xfa3aed1100000000, 0xb6127bb200000000, + 0x236cb08d00000000, 0x6f44262e00000000, 0xaec0c0ee00000000, + 0xe2e8564d00000000, 0x77969d7200000000, 0x3bbe0bd100000000, + 0x5d6b0b0d00000000, 0x11439dae00000000, 0x843d569100000000, + 0xc815c03200000000, 0x4732eacb00000000, 0x0b1a7c6800000000, + 0x9e64b75700000000, 0xd24c21f400000000, 0xb499212800000000, + 0xf8b1b78b00000000, 0x6dcf7cb400000000, 0x21e7ea1700000000, + 0xe0630cd700000000, 0xac4b9a7400000000, 0x3935514b00000000, + 0x751dc7e800000000, 0x13c8c73400000000, 0x5fe0519700000000, + 0xca9e9aa800000000, 0x86b60c0b00000000, 0x95d7bf8100000000, + 0xd9ff292200000000, 0x4c81e21d00000000, 0x00a974be00000000, + 0x667c746200000000, 0x2a54e2c100000000, 0xbf2a29fe00000000, + 0xf302bf5d00000000, 0x3286599d00000000, 0x7eaecf3e00000000, + 0xebd0040100000000, 0xa7f892a200000000, 0xc12d927e00000000, + 0x8d0504dd00000000, 0x187bcfe200000000, 0x5453594100000000, + 0xdb7473b800000000, 0x975ce51b00000000, 0x02222e2400000000, + 0x4e0ab88700000000, 0x28dfb85b00000000, 0x64f72ef800000000, + 0xf189e5c700000000, 0xbda1736400000000, 0x7c2595a400000000, + 0x300d030700000000, 0xa573c83800000000, 0xe95b5e9b00000000, + 0x8f8e5e4700000000, 0xc3a6c8e400000000, 0x56d803db00000000, + 0x1af0957800000000}, + {0x0000000000000000, 0x939bc97f00000000, 0x263793ff00000000, + 0xb5ac5a8000000000, 0x0d68572400000000, 0x9ef39e5b00000000, + 0x2b5fc4db00000000, 0xb8c40da400000000, 0x1ad0ae4800000000, + 0x894b673700000000, 0x3ce73db700000000, 0xaf7cf4c800000000, + 0x17b8f96c00000000, 0x8423301300000000, 0x318f6a9300000000, + 0xa214a3ec00000000, 0x34a05d9100000000, 0xa73b94ee00000000, + 0x1297ce6e00000000, 0x810c071100000000, 0x39c80ab500000000, + 0xaa53c3ca00000000, 0x1fff994a00000000, 0x8c64503500000000, + 0x2e70f3d900000000, 0xbdeb3aa600000000, 0x0847602600000000, + 0x9bdca95900000000, 0x2318a4fd00000000, 0xb0836d8200000000, + 0x052f370200000000, 0x96b4fe7d00000000, 0x2946caf900000000, + 0xbadd038600000000, 0x0f71590600000000, 0x9cea907900000000, + 0x242e9ddd00000000, 0xb7b554a200000000, 0x02190e2200000000, + 0x9182c75d00000000, 0x339664b100000000, 0xa00dadce00000000, + 0x15a1f74e00000000, 0x863a3e3100000000, 0x3efe339500000000, + 0xad65faea00000000, 0x18c9a06a00000000, 0x8b52691500000000, + 0x1de6976800000000, 0x8e7d5e1700000000, 0x3bd1049700000000, + 0xa84acde800000000, 0x108ec04c00000000, 0x8315093300000000, + 0x36b953b300000000, 0xa5229acc00000000, 0x0736392000000000, + 0x94adf05f00000000, 0x2101aadf00000000, 0xb29a63a000000000, + 0x0a5e6e0400000000, 0x99c5a77b00000000, 0x2c69fdfb00000000, + 0xbff2348400000000, 0x138ae52800000000, 0x80112c5700000000, + 0x35bd76d700000000, 0xa626bfa800000000, 0x1ee2b20c00000000, + 0x8d797b7300000000, 0x38d521f300000000, 0xab4ee88c00000000, + 0x095a4b6000000000, 0x9ac1821f00000000, 0x2f6dd89f00000000, + 0xbcf611e000000000, 0x04321c4400000000, 0x97a9d53b00000000, + 0x22058fbb00000000, 0xb19e46c400000000, 0x272ab8b900000000, + 0xb4b171c600000000, 0x011d2b4600000000, 0x9286e23900000000, + 0x2a42ef9d00000000, 0xb9d926e200000000, 0x0c757c6200000000, + 0x9feeb51d00000000, 0x3dfa16f100000000, 0xae61df8e00000000, + 0x1bcd850e00000000, 0x88564c7100000000, 0x309241d500000000, + 0xa30988aa00000000, 0x16a5d22a00000000, 0x853e1b5500000000, + 0x3acc2fd100000000, 0xa957e6ae00000000, 0x1cfbbc2e00000000, + 0x8f60755100000000, 0x37a478f500000000, 0xa43fb18a00000000, + 0x1193eb0a00000000, 0x8208227500000000, 0x201c819900000000, + 0xb38748e600000000, 0x062b126600000000, 0x95b0db1900000000, + 0x2d74d6bd00000000, 0xbeef1fc200000000, 0x0b43454200000000, + 0x98d88c3d00000000, 0x0e6c724000000000, 0x9df7bb3f00000000, + 0x285be1bf00000000, 0xbbc028c000000000, 0x0304256400000000, + 0x909fec1b00000000, 0x2533b69b00000000, 0xb6a87fe400000000, + 0x14bcdc0800000000, 0x8727157700000000, 0x328b4ff700000000, + 0xa110868800000000, 0x19d48b2c00000000, 0x8a4f425300000000, + 0x3fe318d300000000, 0xac78d1ac00000000, 0x2614cb5100000000, + 0xb58f022e00000000, 0x002358ae00000000, 0x93b891d100000000, + 0x2b7c9c7500000000, 0xb8e7550a00000000, 0x0d4b0f8a00000000, + 0x9ed0c6f500000000, 0x3cc4651900000000, 0xaf5fac6600000000, + 0x1af3f6e600000000, 0x89683f9900000000, 0x31ac323d00000000, + 0xa237fb4200000000, 0x179ba1c200000000, 0x840068bd00000000, + 0x12b496c000000000, 0x812f5fbf00000000, 0x3483053f00000000, + 0xa718cc4000000000, 0x1fdcc1e400000000, 0x8c47089b00000000, + 0x39eb521b00000000, 0xaa709b6400000000, 0x0864388800000000, + 0x9bfff1f700000000, 0x2e53ab7700000000, 0xbdc8620800000000, + 0x050c6fac00000000, 0x9697a6d300000000, 0x233bfc5300000000, + 0xb0a0352c00000000, 0x0f5201a800000000, 0x9cc9c8d700000000, + 0x2965925700000000, 0xbafe5b2800000000, 0x023a568c00000000, + 0x91a19ff300000000, 0x240dc57300000000, 0xb7960c0c00000000, + 0x1582afe000000000, 0x8619669f00000000, 0x33b53c1f00000000, + 0xa02ef56000000000, 0x18eaf8c400000000, 0x8b7131bb00000000, + 0x3edd6b3b00000000, 0xad46a24400000000, 0x3bf25c3900000000, + 0xa869954600000000, 0x1dc5cfc600000000, 0x8e5e06b900000000, + 0x369a0b1d00000000, 0xa501c26200000000, 0x10ad98e200000000, + 0x8336519d00000000, 0x2122f27100000000, 0xb2b93b0e00000000, + 0x0715618e00000000, 0x948ea8f100000000, 0x2c4aa55500000000, + 0xbfd16c2a00000000, 0x0a7d36aa00000000, 0x99e6ffd500000000, + 0x359e2e7900000000, 0xa605e70600000000, 0x13a9bd8600000000, + 0x803274f900000000, 0x38f6795d00000000, 0xab6db02200000000, + 0x1ec1eaa200000000, 0x8d5a23dd00000000, 0x2f4e803100000000, + 0xbcd5494e00000000, 0x097913ce00000000, 0x9ae2dab100000000, + 0x2226d71500000000, 0xb1bd1e6a00000000, 0x041144ea00000000, + 0x978a8d9500000000, 0x013e73e800000000, 0x92a5ba9700000000, + 0x2709e01700000000, 0xb492296800000000, 0x0c5624cc00000000, + 0x9fcdedb300000000, 0x2a61b73300000000, 0xb9fa7e4c00000000, + 0x1beedda000000000, 0x887514df00000000, 0x3dd94e5f00000000, + 0xae42872000000000, 0x16868a8400000000, 0x851d43fb00000000, + 0x30b1197b00000000, 0xa32ad00400000000, 0x1cd8e48000000000, + 0x8f432dff00000000, 0x3aef777f00000000, 0xa974be0000000000, + 0x11b0b3a400000000, 0x822b7adb00000000, 0x3787205b00000000, + 0xa41ce92400000000, 0x06084ac800000000, 0x959383b700000000, + 0x203fd93700000000, 0xb3a4104800000000, 0x0b601dec00000000, + 0x98fbd49300000000, 0x2d578e1300000000, 0xbecc476c00000000, + 0x2878b91100000000, 0xbbe3706e00000000, 0x0e4f2aee00000000, + 0x9dd4e39100000000, 0x2510ee3500000000, 0xb68b274a00000000, + 0x03277dca00000000, 0x90bcb4b500000000, 0x32a8175900000000, + 0xa133de2600000000, 0x149f84a600000000, 0x87044dd900000000, + 0x3fc0407d00000000, 0xac5b890200000000, 0x19f7d38200000000, + 0x8a6c1afd00000000}, + {0x0000000000000000, 0x650b796900000000, 0xca16f2d200000000, + 0xaf1d8bbb00000000, 0xd52b957e00000000, 0xb020ec1700000000, + 0x1f3d67ac00000000, 0x7a361ec500000000, 0xaa572afd00000000, + 0xcf5c539400000000, 0x6041d82f00000000, 0x054aa14600000000, + 0x7f7cbf8300000000, 0x1a77c6ea00000000, 0xb56a4d5100000000, + 0xd061343800000000, 0x15a9252100000000, 0x70a25c4800000000, + 0xdfbfd7f300000000, 0xbab4ae9a00000000, 0xc082b05f00000000, + 0xa589c93600000000, 0x0a94428d00000000, 0x6f9f3be400000000, + 0xbffe0fdc00000000, 0xdaf576b500000000, 0x75e8fd0e00000000, + 0x10e3846700000000, 0x6ad59aa200000000, 0x0fdee3cb00000000, + 0xa0c3687000000000, 0xc5c8111900000000, 0x2a524b4200000000, + 0x4f59322b00000000, 0xe044b99000000000, 0x854fc0f900000000, + 0xff79de3c00000000, 0x9a72a75500000000, 0x356f2cee00000000, + 0x5064558700000000, 0x800561bf00000000, 0xe50e18d600000000, + 0x4a13936d00000000, 0x2f18ea0400000000, 0x552ef4c100000000, + 0x30258da800000000, 0x9f38061300000000, 0xfa337f7a00000000, + 0x3ffb6e6300000000, 0x5af0170a00000000, 0xf5ed9cb100000000, + 0x90e6e5d800000000, 0xead0fb1d00000000, 0x8fdb827400000000, + 0x20c609cf00000000, 0x45cd70a600000000, 0x95ac449e00000000, + 0xf0a73df700000000, 0x5fbab64c00000000, 0x3ab1cf2500000000, + 0x4087d1e000000000, 0x258ca88900000000, 0x8a91233200000000, + 0xef9a5a5b00000000, 0x54a4968400000000, 0x31afefed00000000, + 0x9eb2645600000000, 0xfbb91d3f00000000, 0x818f03fa00000000, + 0xe4847a9300000000, 0x4b99f12800000000, 0x2e92884100000000, + 0xfef3bc7900000000, 0x9bf8c51000000000, 0x34e54eab00000000, + 0x51ee37c200000000, 0x2bd8290700000000, 0x4ed3506e00000000, + 0xe1cedbd500000000, 0x84c5a2bc00000000, 0x410db3a500000000, + 0x2406cacc00000000, 0x8b1b417700000000, 0xee10381e00000000, + 0x942626db00000000, 0xf12d5fb200000000, 0x5e30d40900000000, + 0x3b3bad6000000000, 0xeb5a995800000000, 0x8e51e03100000000, + 0x214c6b8a00000000, 0x444712e300000000, 0x3e710c2600000000, + 0x5b7a754f00000000, 0xf467fef400000000, 0x916c879d00000000, + 0x7ef6ddc600000000, 0x1bfda4af00000000, 0xb4e02f1400000000, + 0xd1eb567d00000000, 0xabdd48b800000000, 0xced631d100000000, + 0x61cbba6a00000000, 0x04c0c30300000000, 0xd4a1f73b00000000, + 0xb1aa8e5200000000, 0x1eb705e900000000, 0x7bbc7c8000000000, + 0x018a624500000000, 0x64811b2c00000000, 0xcb9c909700000000, + 0xae97e9fe00000000, 0x6b5ff8e700000000, 0x0e54818e00000000, + 0xa1490a3500000000, 0xc442735c00000000, 0xbe746d9900000000, + 0xdb7f14f000000000, 0x74629f4b00000000, 0x1169e62200000000, + 0xc108d21a00000000, 0xa403ab7300000000, 0x0b1e20c800000000, + 0x6e1559a100000000, 0x1423476400000000, 0x71283e0d00000000, + 0xde35b5b600000000, 0xbb3eccdf00000000, 0xe94e5cd200000000, + 0x8c4525bb00000000, 0x2358ae0000000000, 0x4653d76900000000, + 0x3c65c9ac00000000, 0x596eb0c500000000, 0xf6733b7e00000000, + 0x9378421700000000, 0x4319762f00000000, 0x26120f4600000000, + 0x890f84fd00000000, 0xec04fd9400000000, 0x9632e35100000000, + 0xf3399a3800000000, 0x5c24118300000000, 0x392f68ea00000000, + 0xfce779f300000000, 0x99ec009a00000000, 0x36f18b2100000000, + 0x53faf24800000000, 0x29ccec8d00000000, 0x4cc795e400000000, + 0xe3da1e5f00000000, 0x86d1673600000000, 0x56b0530e00000000, + 0x33bb2a6700000000, 0x9ca6a1dc00000000, 0xf9add8b500000000, + 0x839bc67000000000, 0xe690bf1900000000, 0x498d34a200000000, + 0x2c864dcb00000000, 0xc31c179000000000, 0xa6176ef900000000, + 0x090ae54200000000, 0x6c019c2b00000000, 0x163782ee00000000, + 0x733cfb8700000000, 0xdc21703c00000000, 0xb92a095500000000, + 0x694b3d6d00000000, 0x0c40440400000000, 0xa35dcfbf00000000, + 0xc656b6d600000000, 0xbc60a81300000000, 0xd96bd17a00000000, + 0x76765ac100000000, 0x137d23a800000000, 0xd6b532b100000000, + 0xb3be4bd800000000, 0x1ca3c06300000000, 0x79a8b90a00000000, + 0x039ea7cf00000000, 0x6695dea600000000, 0xc988551d00000000, + 0xac832c7400000000, 0x7ce2184c00000000, 0x19e9612500000000, + 0xb6f4ea9e00000000, 0xd3ff93f700000000, 0xa9c98d3200000000, + 0xccc2f45b00000000, 0x63df7fe000000000, 0x06d4068900000000, + 0xbdeaca5600000000, 0xd8e1b33f00000000, 0x77fc388400000000, + 0x12f741ed00000000, 0x68c15f2800000000, 0x0dca264100000000, + 0xa2d7adfa00000000, 0xc7dcd49300000000, 0x17bde0ab00000000, + 0x72b699c200000000, 0xddab127900000000, 0xb8a06b1000000000, + 0xc29675d500000000, 0xa79d0cbc00000000, 0x0880870700000000, + 0x6d8bfe6e00000000, 0xa843ef7700000000, 0xcd48961e00000000, + 0x62551da500000000, 0x075e64cc00000000, 0x7d687a0900000000, + 0x1863036000000000, 0xb77e88db00000000, 0xd275f1b200000000, + 0x0214c58a00000000, 0x671fbce300000000, 0xc802375800000000, + 0xad094e3100000000, 0xd73f50f400000000, 0xb234299d00000000, + 0x1d29a22600000000, 0x7822db4f00000000, 0x97b8811400000000, + 0xf2b3f87d00000000, 0x5dae73c600000000, 0x38a50aaf00000000, + 0x4293146a00000000, 0x27986d0300000000, 0x8885e6b800000000, + 0xed8e9fd100000000, 0x3defabe900000000, 0x58e4d28000000000, + 0xf7f9593b00000000, 0x92f2205200000000, 0xe8c43e9700000000, + 0x8dcf47fe00000000, 0x22d2cc4500000000, 0x47d9b52c00000000, + 0x8211a43500000000, 0xe71add5c00000000, 0x480756e700000000, + 0x2d0c2f8e00000000, 0x573a314b00000000, 0x3231482200000000, + 0x9d2cc39900000000, 0xf827baf000000000, 0x28468ec800000000, + 0x4d4df7a100000000, 0xe2507c1a00000000, 0x875b057300000000, + 0xfd6d1bb600000000, 0x986662df00000000, 0x377be96400000000, + 0x5270900d00000000}, + {0x0000000000000000, 0xdcecb13d00000000, 0xb8d9637b00000000, + 0x6435d24600000000, 0x70b3c7f600000000, 0xac5f76cb00000000, + 0xc86aa48d00000000, 0x148615b000000000, 0xa160fe3600000000, + 0x7d8c4f0b00000000, 0x19b99d4d00000000, 0xc5552c7000000000, + 0xd1d339c000000000, 0x0d3f88fd00000000, 0x690a5abb00000000, + 0xb5e6eb8600000000, 0x42c1fc6d00000000, 0x9e2d4d5000000000, + 0xfa189f1600000000, 0x26f42e2b00000000, 0x32723b9b00000000, + 0xee9e8aa600000000, 0x8aab58e000000000, 0x5647e9dd00000000, + 0xe3a1025b00000000, 0x3f4db36600000000, 0x5b78612000000000, + 0x8794d01d00000000, 0x9312c5ad00000000, 0x4ffe749000000000, + 0x2bcba6d600000000, 0xf72717eb00000000, 0x8482f9db00000000, + 0x586e48e600000000, 0x3c5b9aa000000000, 0xe0b72b9d00000000, + 0xf4313e2d00000000, 0x28dd8f1000000000, 0x4ce85d5600000000, + 0x9004ec6b00000000, 0x25e207ed00000000, 0xf90eb6d000000000, + 0x9d3b649600000000, 0x41d7d5ab00000000, 0x5551c01b00000000, + 0x89bd712600000000, 0xed88a36000000000, 0x3164125d00000000, + 0xc64305b600000000, 0x1aafb48b00000000, 0x7e9a66cd00000000, + 0xa276d7f000000000, 0xb6f0c24000000000, 0x6a1c737d00000000, + 0x0e29a13b00000000, 0xd2c5100600000000, 0x6723fb8000000000, + 0xbbcf4abd00000000, 0xdffa98fb00000000, 0x031629c600000000, + 0x17903c7600000000, 0xcb7c8d4b00000000, 0xaf495f0d00000000, + 0x73a5ee3000000000, 0x4903826c00000000, 0x95ef335100000000, + 0xf1dae11700000000, 0x2d36502a00000000, 0x39b0459a00000000, + 0xe55cf4a700000000, 0x816926e100000000, 0x5d8597dc00000000, + 0xe8637c5a00000000, 0x348fcd6700000000, 0x50ba1f2100000000, + 0x8c56ae1c00000000, 0x98d0bbac00000000, 0x443c0a9100000000, + 0x2009d8d700000000, 0xfce569ea00000000, 0x0bc27e0100000000, + 0xd72ecf3c00000000, 0xb31b1d7a00000000, 0x6ff7ac4700000000, + 0x7b71b9f700000000, 0xa79d08ca00000000, 0xc3a8da8c00000000, + 0x1f446bb100000000, 0xaaa2803700000000, 0x764e310a00000000, + 0x127be34c00000000, 0xce97527100000000, 0xda1147c100000000, + 0x06fdf6fc00000000, 0x62c824ba00000000, 0xbe24958700000000, + 0xcd817bb700000000, 0x116dca8a00000000, 0x755818cc00000000, + 0xa9b4a9f100000000, 0xbd32bc4100000000, 0x61de0d7c00000000, + 0x05ebdf3a00000000, 0xd9076e0700000000, 0x6ce1858100000000, + 0xb00d34bc00000000, 0xd438e6fa00000000, 0x08d457c700000000, + 0x1c52427700000000, 0xc0bef34a00000000, 0xa48b210c00000000, + 0x7867903100000000, 0x8f4087da00000000, 0x53ac36e700000000, + 0x3799e4a100000000, 0xeb75559c00000000, 0xfff3402c00000000, + 0x231ff11100000000, 0x472a235700000000, 0x9bc6926a00000000, + 0x2e2079ec00000000, 0xf2ccc8d100000000, 0x96f91a9700000000, + 0x4a15abaa00000000, 0x5e93be1a00000000, 0x827f0f2700000000, + 0xe64add6100000000, 0x3aa66c5c00000000, 0x920604d900000000, + 0x4eeab5e400000000, 0x2adf67a200000000, 0xf633d69f00000000, + 0xe2b5c32f00000000, 0x3e59721200000000, 0x5a6ca05400000000, + 0x8680116900000000, 0x3366faef00000000, 0xef8a4bd200000000, + 0x8bbf999400000000, 0x575328a900000000, 0x43d53d1900000000, + 0x9f398c2400000000, 0xfb0c5e6200000000, 0x27e0ef5f00000000, + 0xd0c7f8b400000000, 0x0c2b498900000000, 0x681e9bcf00000000, + 0xb4f22af200000000, 0xa0743f4200000000, 0x7c988e7f00000000, + 0x18ad5c3900000000, 0xc441ed0400000000, 0x71a7068200000000, + 0xad4bb7bf00000000, 0xc97e65f900000000, 0x1592d4c400000000, + 0x0114c17400000000, 0xddf8704900000000, 0xb9cda20f00000000, + 0x6521133200000000, 0x1684fd0200000000, 0xca684c3f00000000, + 0xae5d9e7900000000, 0x72b12f4400000000, 0x66373af400000000, + 0xbadb8bc900000000, 0xdeee598f00000000, 0x0202e8b200000000, + 0xb7e4033400000000, 0x6b08b20900000000, 0x0f3d604f00000000, + 0xd3d1d17200000000, 0xc757c4c200000000, 0x1bbb75ff00000000, + 0x7f8ea7b900000000, 0xa362168400000000, 0x5445016f00000000, + 0x88a9b05200000000, 0xec9c621400000000, 0x3070d32900000000, + 0x24f6c69900000000, 0xf81a77a400000000, 0x9c2fa5e200000000, + 0x40c314df00000000, 0xf525ff5900000000, 0x29c94e6400000000, + 0x4dfc9c2200000000, 0x91102d1f00000000, 0x859638af00000000, + 0x597a899200000000, 0x3d4f5bd400000000, 0xe1a3eae900000000, + 0xdb0586b500000000, 0x07e9378800000000, 0x63dce5ce00000000, + 0xbf3054f300000000, 0xabb6414300000000, 0x775af07e00000000, + 0x136f223800000000, 0xcf83930500000000, 0x7a65788300000000, + 0xa689c9be00000000, 0xc2bc1bf800000000, 0x1e50aac500000000, + 0x0ad6bf7500000000, 0xd63a0e4800000000, 0xb20fdc0e00000000, + 0x6ee36d3300000000, 0x99c47ad800000000, 0x4528cbe500000000, + 0x211d19a300000000, 0xfdf1a89e00000000, 0xe977bd2e00000000, + 0x359b0c1300000000, 0x51aede5500000000, 0x8d426f6800000000, + 0x38a484ee00000000, 0xe44835d300000000, 0x807de79500000000, + 0x5c9156a800000000, 0x4817431800000000, 0x94fbf22500000000, + 0xf0ce206300000000, 0x2c22915e00000000, 0x5f877f6e00000000, + 0x836bce5300000000, 0xe75e1c1500000000, 0x3bb2ad2800000000, + 0x2f34b89800000000, 0xf3d809a500000000, 0x97eddbe300000000, + 0x4b016ade00000000, 0xfee7815800000000, 0x220b306500000000, + 0x463ee22300000000, 0x9ad2531e00000000, 0x8e5446ae00000000, + 0x52b8f79300000000, 0x368d25d500000000, 0xea6194e800000000, + 0x1d46830300000000, 0xc1aa323e00000000, 0xa59fe07800000000, + 0x7973514500000000, 0x6df544f500000000, 0xb119f5c800000000, + 0xd52c278e00000000, 0x09c096b300000000, 0xbc267d3500000000, + 0x60cacc0800000000, 0x04ff1e4e00000000, 0xd813af7300000000, + 0xcc95bac300000000, 0x10790bfe00000000, 0x744cd9b800000000, + 0xa8a0688500000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f, + 0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999, + 0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee, + 0xe3150bc9, 0x7f6b7f3d, 0xfe4e1a1a, 0xa650b332, 0x2775d615, + 0x166de162, 0x97488445, 0xcf562d6d, 0x4e73484a, 0xad664383, + 0x2c4326a4, 0x745d8f8c, 0xf578eaab, 0xc460dddc, 0x4545b8fb, + 0x1d5b11d3, 0x9c7e74f4, 0xfed6fe7a, 0x7ff39b5d, 0x27ed3275, + 0xa6c85752, 0x97d06025, 0x16f50502, 0x4eebac2a, 0xcfcec90d, + 0x2cdbc2c4, 0xadfea7e3, 0xf5e00ecb, 0x74c56bec, 0x45dd5c9b, + 0xc4f839bc, 0x9ce69094, 0x1dc3f5b3, 0x81bd8147, 0x0098e460, + 0x58864d48, 0xd9a3286f, 0xe8bb1f18, 0x699e7a3f, 0x3180d317, + 0xb0a5b630, 0x53b0bdf9, 0xd295d8de, 0x8a8b71f6, 0x0bae14d1, + 0x3ab623a6, 0xbb934681, 0xe38defa9, 0x62a88a8e, 0x26dcfab5, + 0xa7f99f92, 0xffe736ba, 0x7ec2539d, 0x4fda64ea, 0xceff01cd, + 0x96e1a8e5, 0x17c4cdc2, 0xf4d1c60b, 0x75f4a32c, 0x2dea0a04, + 0xaccf6f23, 0x9dd75854, 0x1cf23d73, 0x44ec945b, 0xc5c9f17c, + 0x59b78588, 0xd892e0af, 0x808c4987, 0x01a92ca0, 0x30b11bd7, + 0xb1947ef0, 0xe98ad7d8, 0x68afb2ff, 0x8bbab936, 0x0a9fdc11, + 0x52817539, 0xd3a4101e, 0xe2bc2769, 0x6399424e, 0x3b87eb66, + 0xbaa28e41, 0xd80a04cf, 0x592f61e8, 0x0131c8c0, 0x8014ade7, + 0xb10c9a90, 0x3029ffb7, 0x6837569f, 0xe91233b8, 0x0a073871, + 0x8b225d56, 0xd33cf47e, 0x52199159, 0x6301a62e, 0xe224c309, + 0xba3a6a21, 0x3b1f0f06, 0xa7617bf2, 0x26441ed5, 0x7e5ab7fd, + 0xff7fd2da, 0xce67e5ad, 0x4f42808a, 0x175c29a2, 0x96794c85, + 0x756c474c, 0xf449226b, 0xac578b43, 0x2d72ee64, 0x1c6ad913, + 0x9d4fbc34, 0xc551151c, 0x4474703b, 0x4db9f56a, 0xcc9c904d, + 0x94823965, 0x15a75c42, 0x24bf6b35, 0xa59a0e12, 0xfd84a73a, + 0x7ca1c21d, 0x9fb4c9d4, 0x1e91acf3, 0x468f05db, 0xc7aa60fc, + 0xf6b2578b, 0x779732ac, 0x2f899b84, 0xaeacfea3, 0x32d28a57, + 0xb3f7ef70, 0xebe94658, 0x6acc237f, 0x5bd41408, 0xdaf1712f, + 0x82efd807, 0x03cabd20, 0xe0dfb6e9, 0x61fad3ce, 0x39e47ae6, + 0xb8c11fc1, 0x89d928b6, 0x08fc4d91, 0x50e2e4b9, 0xd1c7819e, + 0xb36f0b10, 0x324a6e37, 0x6a54c71f, 0xeb71a238, 0xda69954f, + 0x5b4cf068, 0x03525940, 0x82773c67, 0x616237ae, 0xe0475289, + 0xb859fba1, 0x397c9e86, 0x0864a9f1, 0x8941ccd6, 0xd15f65fe, + 0x507a00d9, 0xcc04742d, 0x4d21110a, 0x153fb822, 0x941add05, + 0xa502ea72, 0x24278f55, 0x7c39267d, 0xfd1c435a, 0x1e094893, + 0x9f2c2db4, 0xc732849c, 0x4617e1bb, 0x770fd6cc, 0xf62ab3eb, + 0xae341ac3, 0x2f117fe4, 0x6b650fdf, 0xea406af8, 0xb25ec3d0, + 0x337ba6f7, 0x02639180, 0x8346f4a7, 0xdb585d8f, 0x5a7d38a8, + 0xb9683361, 0x384d5646, 0x6053ff6e, 0xe1769a49, 0xd06ead3e, + 0x514bc819, 0x09556131, 0x88700416, 0x140e70e2, 0x952b15c5, + 0xcd35bced, 0x4c10d9ca, 0x7d08eebd, 0xfc2d8b9a, 0xa43322b2, + 0x25164795, 0xc6034c5c, 0x4726297b, 0x1f388053, 0x9e1de574, + 0xaf05d203, 0x2e20b724, 0x763e1e0c, 0xf71b7b2b, 0x95b3f1a5, + 0x14969482, 0x4c883daa, 0xcdad588d, 0xfcb56ffa, 0x7d900add, + 0x258ea3f5, 0xa4abc6d2, 0x47becd1b, 0xc69ba83c, 0x9e850114, + 0x1fa06433, 0x2eb85344, 0xaf9d3663, 0xf7839f4b, 0x76a6fa6c, + 0xead88e98, 0x6bfdebbf, 0x33e34297, 0xb2c627b0, 0x83de10c7, + 0x02fb75e0, 0x5ae5dcc8, 0xdbc0b9ef, 0x38d5b226, 0xb9f0d701, + 0xe1ee7e29, 0x60cb1b0e, 0x51d32c79, 0xd0f6495e, 0x88e8e076, + 0x09cd8551}, + {0x00000000, 0x9b73ead4, 0xed96d3e9, 0x76e5393d, 0x005ca193, + 0x9b2f4b47, 0xedca727a, 0x76b998ae, 0x00b94326, 0x9bcaa9f2, + 0xed2f90cf, 0x765c7a1b, 0x00e5e2b5, 0x9b960861, 0xed73315c, + 0x7600db88, 0x0172864c, 0x9a016c98, 0xece455a5, 0x7797bf71, + 0x012e27df, 0x9a5dcd0b, 0xecb8f436, 0x77cb1ee2, 0x01cbc56a, + 0x9ab82fbe, 0xec5d1683, 0x772efc57, 0x019764f9, 0x9ae48e2d, + 0xec01b710, 0x77725dc4, 0x02e50c98, 0x9996e64c, 0xef73df71, + 0x740035a5, 0x02b9ad0b, 0x99ca47df, 0xef2f7ee2, 0x745c9436, + 0x025c4fbe, 0x992fa56a, 0xefca9c57, 0x74b97683, 0x0200ee2d, + 0x997304f9, 0xef963dc4, 0x74e5d710, 0x03978ad4, 0x98e46000, + 0xee01593d, 0x7572b3e9, 0x03cb2b47, 0x98b8c193, 0xee5df8ae, + 0x752e127a, 0x032ec9f2, 0x985d2326, 0xeeb81a1b, 0x75cbf0cf, + 0x03726861, 0x980182b5, 0xeee4bb88, 0x7597515c, 0x05ca1930, + 0x9eb9f3e4, 0xe85ccad9, 0x732f200d, 0x0596b8a3, 0x9ee55277, + 0xe8006b4a, 0x7373819e, 0x05735a16, 0x9e00b0c2, 0xe8e589ff, + 0x7396632b, 0x052ffb85, 0x9e5c1151, 0xe8b9286c, 0x73cac2b8, + 0x04b89f7c, 0x9fcb75a8, 0xe92e4c95, 0x725da641, 0x04e43eef, + 0x9f97d43b, 0xe972ed06, 0x720107d2, 0x0401dc5a, 0x9f72368e, + 0xe9970fb3, 0x72e4e567, 0x045d7dc9, 0x9f2e971d, 0xe9cbae20, + 0x72b844f4, 0x072f15a8, 0x9c5cff7c, 0xeab9c641, 0x71ca2c95, + 0x0773b43b, 0x9c005eef, 0xeae567d2, 0x71968d06, 0x0796568e, + 0x9ce5bc5a, 0xea008567, 0x71736fb3, 0x07caf71d, 0x9cb91dc9, + 0xea5c24f4, 0x712fce20, 0x065d93e4, 0x9d2e7930, 0xebcb400d, + 0x70b8aad9, 0x06013277, 0x9d72d8a3, 0xeb97e19e, 0x70e40b4a, + 0x06e4d0c2, 0x9d973a16, 0xeb72032b, 0x7001e9ff, 0x06b87151, + 0x9dcb9b85, 0xeb2ea2b8, 0x705d486c, 0x0b943260, 0x90e7d8b4, + 0xe602e189, 0x7d710b5d, 0x0bc893f3, 0x90bb7927, 0xe65e401a, + 0x7d2daace, 0x0b2d7146, 0x905e9b92, 0xe6bba2af, 0x7dc8487b, + 0x0b71d0d5, 0x90023a01, 0xe6e7033c, 0x7d94e9e8, 0x0ae6b42c, + 0x91955ef8, 0xe77067c5, 0x7c038d11, 0x0aba15bf, 0x91c9ff6b, + 0xe72cc656, 0x7c5f2c82, 0x0a5ff70a, 0x912c1dde, 0xe7c924e3, + 0x7cbace37, 0x0a035699, 0x9170bc4d, 0xe7958570, 0x7ce66fa4, + 0x09713ef8, 0x9202d42c, 0xe4e7ed11, 0x7f9407c5, 0x092d9f6b, + 0x925e75bf, 0xe4bb4c82, 0x7fc8a656, 0x09c87dde, 0x92bb970a, + 0xe45eae37, 0x7f2d44e3, 0x0994dc4d, 0x92e73699, 0xe4020fa4, + 0x7f71e570, 0x0803b8b4, 0x93705260, 0xe5956b5d, 0x7ee68189, + 0x085f1927, 0x932cf3f3, 0xe5c9cace, 0x7eba201a, 0x08bafb92, + 0x93c91146, 0xe52c287b, 0x7e5fc2af, 0x08e65a01, 0x9395b0d5, + 0xe57089e8, 0x7e03633c, 0x0e5e2b50, 0x952dc184, 0xe3c8f8b9, + 0x78bb126d, 0x0e028ac3, 0x95716017, 0xe394592a, 0x78e7b3fe, + 0x0ee76876, 0x959482a2, 0xe371bb9f, 0x7802514b, 0x0ebbc9e5, + 0x95c82331, 0xe32d1a0c, 0x785ef0d8, 0x0f2cad1c, 0x945f47c8, + 0xe2ba7ef5, 0x79c99421, 0x0f700c8f, 0x9403e65b, 0xe2e6df66, + 0x799535b2, 0x0f95ee3a, 0x94e604ee, 0xe2033dd3, 0x7970d707, + 0x0fc94fa9, 0x94baa57d, 0xe25f9c40, 0x792c7694, 0x0cbb27c8, + 0x97c8cd1c, 0xe12df421, 0x7a5e1ef5, 0x0ce7865b, 0x97946c8f, + 0xe17155b2, 0x7a02bf66, 0x0c0264ee, 0x97718e3a, 0xe194b707, + 0x7ae75dd3, 0x0c5ec57d, 0x972d2fa9, 0xe1c81694, 0x7abbfc40, + 0x0dc9a184, 0x96ba4b50, 0xe05f726d, 0x7b2c98b9, 0x0d950017, + 0x96e6eac3, 0xe003d3fe, 0x7b70392a, 0x0d70e2a2, 0x96030876, + 0xe0e6314b, 0x7b95db9f, 0x0d2c4331, 0x965fa9e5, 0xe0ba90d8, + 0x7bc97a0c}, + {0x00000000, 0x172864c0, 0x2e50c980, 0x3978ad40, 0x5ca19300, + 0x4b89f7c0, 0x72f15a80, 0x65d93e40, 0xb9432600, 0xae6b42c0, + 0x9713ef80, 0x803b8b40, 0xe5e2b500, 0xf2cad1c0, 0xcbb27c80, + 0xdc9a1840, 0xa9f74a41, 0xbedf2e81, 0x87a783c1, 0x908fe701, + 0xf556d941, 0xe27ebd81, 0xdb0610c1, 0xcc2e7401, 0x10b46c41, + 0x079c0881, 0x3ee4a5c1, 0x29ccc101, 0x4c15ff41, 0x5b3d9b81, + 0x624536c1, 0x756d5201, 0x889f92c3, 0x9fb7f603, 0xa6cf5b43, + 0xb1e73f83, 0xd43e01c3, 0xc3166503, 0xfa6ec843, 0xed46ac83, + 0x31dcb4c3, 0x26f4d003, 0x1f8c7d43, 0x08a41983, 0x6d7d27c3, + 0x7a554303, 0x432dee43, 0x54058a83, 0x2168d882, 0x3640bc42, + 0x0f381102, 0x181075c2, 0x7dc94b82, 0x6ae12f42, 0x53998202, + 0x44b1e6c2, 0x982bfe82, 0x8f039a42, 0xb67b3702, 0xa15353c2, + 0xc48a6d82, 0xd3a20942, 0xeadaa402, 0xfdf2c0c2, 0xca4e23c7, + 0xdd664707, 0xe41eea47, 0xf3368e87, 0x96efb0c7, 0x81c7d407, + 0xb8bf7947, 0xaf971d87, 0x730d05c7, 0x64256107, 0x5d5dcc47, + 0x4a75a887, 0x2fac96c7, 0x3884f207, 0x01fc5f47, 0x16d43b87, + 0x63b96986, 0x74910d46, 0x4de9a006, 0x5ac1c4c6, 0x3f18fa86, + 0x28309e46, 0x11483306, 0x066057c6, 0xdafa4f86, 0xcdd22b46, + 0xf4aa8606, 0xe382e2c6, 0x865bdc86, 0x9173b846, 0xa80b1506, + 0xbf2371c6, 0x42d1b104, 0x55f9d5c4, 0x6c817884, 0x7ba91c44, + 0x1e702204, 0x095846c4, 0x3020eb84, 0x27088f44, 0xfb929704, + 0xecbaf3c4, 0xd5c25e84, 0xc2ea3a44, 0xa7330404, 0xb01b60c4, + 0x8963cd84, 0x9e4ba944, 0xeb26fb45, 0xfc0e9f85, 0xc57632c5, + 0xd25e5605, 0xb7876845, 0xa0af0c85, 0x99d7a1c5, 0x8effc505, + 0x5265dd45, 0x454db985, 0x7c3514c5, 0x6b1d7005, 0x0ec44e45, + 0x19ec2a85, 0x209487c5, 0x37bce305, 0x4fed41cf, 0x58c5250f, + 0x61bd884f, 0x7695ec8f, 0x134cd2cf, 0x0464b60f, 0x3d1c1b4f, + 0x2a347f8f, 0xf6ae67cf, 0xe186030f, 0xd8feae4f, 0xcfd6ca8f, + 0xaa0ff4cf, 0xbd27900f, 0x845f3d4f, 0x9377598f, 0xe61a0b8e, + 0xf1326f4e, 0xc84ac20e, 0xdf62a6ce, 0xbabb988e, 0xad93fc4e, + 0x94eb510e, 0x83c335ce, 0x5f592d8e, 0x4871494e, 0x7109e40e, + 0x662180ce, 0x03f8be8e, 0x14d0da4e, 0x2da8770e, 0x3a8013ce, + 0xc772d30c, 0xd05ab7cc, 0xe9221a8c, 0xfe0a7e4c, 0x9bd3400c, + 0x8cfb24cc, 0xb583898c, 0xa2abed4c, 0x7e31f50c, 0x691991cc, + 0x50613c8c, 0x4749584c, 0x2290660c, 0x35b802cc, 0x0cc0af8c, + 0x1be8cb4c, 0x6e85994d, 0x79adfd8d, 0x40d550cd, 0x57fd340d, + 0x32240a4d, 0x250c6e8d, 0x1c74c3cd, 0x0b5ca70d, 0xd7c6bf4d, + 0xc0eedb8d, 0xf99676cd, 0xeebe120d, 0x8b672c4d, 0x9c4f488d, + 0xa537e5cd, 0xb21f810d, 0x85a36208, 0x928b06c8, 0xabf3ab88, + 0xbcdbcf48, 0xd902f108, 0xce2a95c8, 0xf7523888, 0xe07a5c48, + 0x3ce04408, 0x2bc820c8, 0x12b08d88, 0x0598e948, 0x6041d708, + 0x7769b3c8, 0x4e111e88, 0x59397a48, 0x2c542849, 0x3b7c4c89, + 0x0204e1c9, 0x152c8509, 0x70f5bb49, 0x67dddf89, 0x5ea572c9, + 0x498d1609, 0x95170e49, 0x823f6a89, 0xbb47c7c9, 0xac6fa309, + 0xc9b69d49, 0xde9ef989, 0xe7e654c9, 0xf0ce3009, 0x0d3cf0cb, + 0x1a14940b, 0x236c394b, 0x34445d8b, 0x519d63cb, 0x46b5070b, + 0x7fcdaa4b, 0x68e5ce8b, 0xb47fd6cb, 0xa357b20b, 0x9a2f1f4b, + 0x8d077b8b, 0xe8de45cb, 0xfff6210b, 0xc68e8c4b, 0xd1a6e88b, + 0xa4cbba8a, 0xb3e3de4a, 0x8a9b730a, 0x9db317ca, 0xf86a298a, + 0xef424d4a, 0xd63ae00a, 0xc11284ca, 0x1d889c8a, 0x0aa0f84a, + 0x33d8550a, 0x24f031ca, 0x41290f8a, 0x56016b4a, 0x6f79c60a, + 0x7851a2ca}, + {0x00000000, 0x9fda839e, 0xe4c4017d, 0x7b1e82e3, 0x12f904bb, + 0x8d238725, 0xf63d05c6, 0x69e78658, 0x25f20976, 0xba288ae8, + 0xc136080b, 0x5eec8b95, 0x370b0dcd, 0xa8d18e53, 0xd3cf0cb0, + 0x4c158f2e, 0x4be412ec, 0xd43e9172, 0xaf201391, 0x30fa900f, + 0x591d1657, 0xc6c795c9, 0xbdd9172a, 0x220394b4, 0x6e161b9a, + 0xf1cc9804, 0x8ad21ae7, 0x15089979, 0x7cef1f21, 0xe3359cbf, + 0x982b1e5c, 0x07f19dc2, 0x97c825d8, 0x0812a646, 0x730c24a5, + 0xecd6a73b, 0x85312163, 0x1aeba2fd, 0x61f5201e, 0xfe2fa380, + 0xb23a2cae, 0x2de0af30, 0x56fe2dd3, 0xc924ae4d, 0xa0c32815, + 0x3f19ab8b, 0x44072968, 0xdbddaaf6, 0xdc2c3734, 0x43f6b4aa, + 0x38e83649, 0xa732b5d7, 0xced5338f, 0x510fb011, 0x2a1132f2, + 0xb5cbb16c, 0xf9de3e42, 0x6604bddc, 0x1d1a3f3f, 0x82c0bca1, + 0xeb273af9, 0x74fdb967, 0x0fe33b84, 0x9039b81a, 0xf4e14df1, + 0x6b3bce6f, 0x10254c8c, 0x8fffcf12, 0xe618494a, 0x79c2cad4, + 0x02dc4837, 0x9d06cba9, 0xd1134487, 0x4ec9c719, 0x35d745fa, + 0xaa0dc664, 0xc3ea403c, 0x5c30c3a2, 0x272e4141, 0xb8f4c2df, + 0xbf055f1d, 0x20dfdc83, 0x5bc15e60, 0xc41bddfe, 0xadfc5ba6, + 0x3226d838, 0x49385adb, 0xd6e2d945, 0x9af7566b, 0x052dd5f5, + 0x7e335716, 0xe1e9d488, 0x880e52d0, 0x17d4d14e, 0x6cca53ad, + 0xf310d033, 0x63296829, 0xfcf3ebb7, 0x87ed6954, 0x1837eaca, + 0x71d06c92, 0xee0aef0c, 0x95146def, 0x0aceee71, 0x46db615f, + 0xd901e2c1, 0xa21f6022, 0x3dc5e3bc, 0x542265e4, 0xcbf8e67a, + 0xb0e66499, 0x2f3ce707, 0x28cd7ac5, 0xb717f95b, 0xcc097bb8, + 0x53d3f826, 0x3a347e7e, 0xa5eefde0, 0xdef07f03, 0x412afc9d, + 0x0d3f73b3, 0x92e5f02d, 0xe9fb72ce, 0x7621f150, 0x1fc67708, + 0x801cf496, 0xfb027675, 0x64d8f5eb, 0x32b39da3, 0xad691e3d, + 0xd6779cde, 0x49ad1f40, 0x204a9918, 0xbf901a86, 0xc48e9865, + 0x5b541bfb, 0x174194d5, 0x889b174b, 0xf38595a8, 0x6c5f1636, + 0x05b8906e, 0x9a6213f0, 0xe17c9113, 0x7ea6128d, 0x79578f4f, + 0xe68d0cd1, 0x9d938e32, 0x02490dac, 0x6bae8bf4, 0xf474086a, + 0x8f6a8a89, 0x10b00917, 0x5ca58639, 0xc37f05a7, 0xb8618744, + 0x27bb04da, 0x4e5c8282, 0xd186011c, 0xaa9883ff, 0x35420061, + 0xa57bb87b, 0x3aa13be5, 0x41bfb906, 0xde653a98, 0xb782bcc0, + 0x28583f5e, 0x5346bdbd, 0xcc9c3e23, 0x8089b10d, 0x1f533293, + 0x644db070, 0xfb9733ee, 0x9270b5b6, 0x0daa3628, 0x76b4b4cb, + 0xe96e3755, 0xee9faa97, 0x71452909, 0x0a5babea, 0x95812874, + 0xfc66ae2c, 0x63bc2db2, 0x18a2af51, 0x87782ccf, 0xcb6da3e1, + 0x54b7207f, 0x2fa9a29c, 0xb0732102, 0xd994a75a, 0x464e24c4, + 0x3d50a627, 0xa28a25b9, 0xc652d052, 0x598853cc, 0x2296d12f, + 0xbd4c52b1, 0xd4abd4e9, 0x4b715777, 0x306fd594, 0xafb5560a, + 0xe3a0d924, 0x7c7a5aba, 0x0764d859, 0x98be5bc7, 0xf159dd9f, + 0x6e835e01, 0x159ddce2, 0x8a475f7c, 0x8db6c2be, 0x126c4120, + 0x6972c3c3, 0xf6a8405d, 0x9f4fc605, 0x0095459b, 0x7b8bc778, + 0xe45144e6, 0xa844cbc8, 0x379e4856, 0x4c80cab5, 0xd35a492b, + 0xbabdcf73, 0x25674ced, 0x5e79ce0e, 0xc1a34d90, 0x519af58a, + 0xce407614, 0xb55ef4f7, 0x2a847769, 0x4363f131, 0xdcb972af, + 0xa7a7f04c, 0x387d73d2, 0x7468fcfc, 0xebb27f62, 0x90acfd81, + 0x0f767e1f, 0x6691f847, 0xf94b7bd9, 0x8255f93a, 0x1d8f7aa4, + 0x1a7ee766, 0x85a464f8, 0xfebae61b, 0x61606585, 0x0887e3dd, + 0x975d6043, 0xec43e2a0, 0x7399613e, 0x3f8cee10, 0xa0566d8e, + 0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6, + 0x566b6848}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x9e83da9f, 0x7d01c4e4, 0xe3821e7b, 0xbb04f912, + 0x2587238d, 0xc6053df6, 0x5886e769, 0x7609f225, 0xe88a28ba, + 0x0b0836c1, 0x958bec5e, 0xcd0d0b37, 0x538ed1a8, 0xb00ccfd3, + 0x2e8f154c, 0xec12e44b, 0x72913ed4, 0x911320af, 0x0f90fa30, + 0x57161d59, 0xc995c7c6, 0x2a17d9bd, 0xb4940322, 0x9a1b166e, + 0x0498ccf1, 0xe71ad28a, 0x79990815, 0x211fef7c, 0xbf9c35e3, + 0x5c1e2b98, 0xc29df107, 0xd825c897, 0x46a61208, 0xa5240c73, + 0x3ba7d6ec, 0x63213185, 0xfda2eb1a, 0x1e20f561, 0x80a32ffe, + 0xae2c3ab2, 0x30afe02d, 0xd32dfe56, 0x4dae24c9, 0x1528c3a0, + 0x8bab193f, 0x68290744, 0xf6aadddb, 0x34372cdc, 0xaab4f643, + 0x4936e838, 0xd7b532a7, 0x8f33d5ce, 0x11b00f51, 0xf232112a, + 0x6cb1cbb5, 0x423edef9, 0xdcbd0466, 0x3f3f1a1d, 0xa1bcc082, + 0xf93a27eb, 0x67b9fd74, 0x843be30f, 0x1ab83990, 0xf14de1f4, + 0x6fce3b6b, 0x8c4c2510, 0x12cfff8f, 0x4a4918e6, 0xd4cac279, + 0x3748dc02, 0xa9cb069d, 0x874413d1, 0x19c7c94e, 0xfa45d735, + 0x64c60daa, 0x3c40eac3, 0xa2c3305c, 0x41412e27, 0xdfc2f4b8, + 0x1d5f05bf, 0x83dcdf20, 0x605ec15b, 0xfedd1bc4, 0xa65bfcad, + 0x38d82632, 0xdb5a3849, 0x45d9e2d6, 0x6b56f79a, 0xf5d52d05, + 0x1657337e, 0x88d4e9e1, 0xd0520e88, 0x4ed1d417, 0xad53ca6c, + 0x33d010f3, 0x29682963, 0xb7ebf3fc, 0x5469ed87, 0xcaea3718, + 0x926cd071, 0x0cef0aee, 0xef6d1495, 0x71eece0a, 0x5f61db46, + 0xc1e201d9, 0x22601fa2, 0xbce3c53d, 0xe4652254, 0x7ae6f8cb, + 0x9964e6b0, 0x07e73c2f, 0xc57acd28, 0x5bf917b7, 0xb87b09cc, + 0x26f8d353, 0x7e7e343a, 0xe0fdeea5, 0x037ff0de, 0x9dfc2a41, + 0xb3733f0d, 0x2df0e592, 0xce72fbe9, 0x50f12176, 0x0877c61f, + 0x96f41c80, 0x757602fb, 0xebf5d864, 0xa39db332, 0x3d1e69ad, + 0xde9c77d6, 0x401fad49, 0x18994a20, 0x861a90bf, 0x65988ec4, + 0xfb1b545b, 0xd5944117, 0x4b179b88, 0xa89585f3, 0x36165f6c, + 0x6e90b805, 0xf013629a, 0x13917ce1, 0x8d12a67e, 0x4f8f5779, + 0xd10c8de6, 0x328e939d, 0xac0d4902, 0xf48bae6b, 0x6a0874f4, + 0x898a6a8f, 0x1709b010, 0x3986a55c, 0xa7057fc3, 0x448761b8, + 0xda04bb27, 0x82825c4e, 0x1c0186d1, 0xff8398aa, 0x61004235, + 0x7bb87ba5, 0xe53ba13a, 0x06b9bf41, 0x983a65de, 0xc0bc82b7, + 0x5e3f5828, 0xbdbd4653, 0x233e9ccc, 0x0db18980, 0x9332531f, + 0x70b04d64, 0xee3397fb, 0xb6b57092, 0x2836aa0d, 0xcbb4b476, + 0x55376ee9, 0x97aa9fee, 0x09294571, 0xeaab5b0a, 0x74288195, + 0x2cae66fc, 0xb22dbc63, 0x51afa218, 0xcf2c7887, 0xe1a36dcb, + 0x7f20b754, 0x9ca2a92f, 0x022173b0, 0x5aa794d9, 0xc4244e46, + 0x27a6503d, 0xb9258aa2, 0x52d052c6, 0xcc538859, 0x2fd19622, + 0xb1524cbd, 0xe9d4abd4, 0x7757714b, 0x94d56f30, 0x0a56b5af, + 0x24d9a0e3, 0xba5a7a7c, 0x59d86407, 0xc75bbe98, 0x9fdd59f1, + 0x015e836e, 0xe2dc9d15, 0x7c5f478a, 0xbec2b68d, 0x20416c12, + 0xc3c37269, 0x5d40a8f6, 0x05c64f9f, 0x9b459500, 0x78c78b7b, + 0xe64451e4, 0xc8cb44a8, 0x56489e37, 0xb5ca804c, 0x2b495ad3, + 0x73cfbdba, 0xed4c6725, 0x0ece795e, 0x904da3c1, 0x8af59a51, + 0x147640ce, 0xf7f45eb5, 0x6977842a, 0x31f16343, 0xaf72b9dc, + 0x4cf0a7a7, 0xd2737d38, 0xfcfc6874, 0x627fb2eb, 0x81fdac90, + 0x1f7e760f, 0x47f89166, 0xd97b4bf9, 0x3af95582, 0xa47a8f1d, + 0x66e77e1a, 0xf864a485, 0x1be6bafe, 0x85656061, 0xdde38708, + 0x43605d97, 0xa0e243ec, 0x3e619973, 0x10ee8c3f, 0x8e6d56a0, + 0x6def48db, 0xf36c9244, 0xabea752d, 0x3569afb2, 0xd6ebb1c9, + 0x48686b56}, + {0x00000000, 0xc0642817, 0x80c9502e, 0x40ad7839, 0x0093a15c, + 0xc0f7894b, 0x805af172, 0x403ed965, 0x002643b9, 0xc0426bae, + 0x80ef1397, 0x408b3b80, 0x00b5e2e5, 0xc0d1caf2, 0x807cb2cb, + 0x40189adc, 0x414af7a9, 0x812edfbe, 0xc183a787, 0x01e78f90, + 0x41d956f5, 0x81bd7ee2, 0xc11006db, 0x01742ecc, 0x416cb410, + 0x81089c07, 0xc1a5e43e, 0x01c1cc29, 0x41ff154c, 0x819b3d5b, + 0xc1364562, 0x01526d75, 0xc3929f88, 0x03f6b79f, 0x435bcfa6, + 0x833fe7b1, 0xc3013ed4, 0x036516c3, 0x43c86efa, 0x83ac46ed, + 0xc3b4dc31, 0x03d0f426, 0x437d8c1f, 0x8319a408, 0xc3277d6d, + 0x0343557a, 0x43ee2d43, 0x838a0554, 0x82d86821, 0x42bc4036, + 0x0211380f, 0xc2751018, 0x824bc97d, 0x422fe16a, 0x02829953, + 0xc2e6b144, 0x82fe2b98, 0x429a038f, 0x02377bb6, 0xc25353a1, + 0x826d8ac4, 0x4209a2d3, 0x02a4daea, 0xc2c0f2fd, 0xc7234eca, + 0x074766dd, 0x47ea1ee4, 0x878e36f3, 0xc7b0ef96, 0x07d4c781, + 0x4779bfb8, 0x871d97af, 0xc7050d73, 0x07612564, 0x47cc5d5d, + 0x87a8754a, 0xc796ac2f, 0x07f28438, 0x475ffc01, 0x873bd416, + 0x8669b963, 0x460d9174, 0x06a0e94d, 0xc6c4c15a, 0x86fa183f, + 0x469e3028, 0x06334811, 0xc6576006, 0x864ffada, 0x462bd2cd, + 0x0686aaf4, 0xc6e282e3, 0x86dc5b86, 0x46b87391, 0x06150ba8, + 0xc67123bf, 0x04b1d142, 0xc4d5f955, 0x8478816c, 0x441ca97b, + 0x0422701e, 0xc4465809, 0x84eb2030, 0x448f0827, 0x049792fb, + 0xc4f3baec, 0x845ec2d5, 0x443aeac2, 0x040433a7, 0xc4601bb0, + 0x84cd6389, 0x44a94b9e, 0x45fb26eb, 0x859f0efc, 0xc53276c5, + 0x05565ed2, 0x456887b7, 0x850cafa0, 0xc5a1d799, 0x05c5ff8e, + 0x45dd6552, 0x85b94d45, 0xc514357c, 0x05701d6b, 0x454ec40e, + 0x852aec19, 0xc5879420, 0x05e3bc37, 0xcf41ed4f, 0x0f25c558, + 0x4f88bd61, 0x8fec9576, 0xcfd24c13, 0x0fb66404, 0x4f1b1c3d, + 0x8f7f342a, 0xcf67aef6, 0x0f0386e1, 0x4faefed8, 0x8fcad6cf, + 0xcff40faa, 0x0f9027bd, 0x4f3d5f84, 0x8f597793, 0x8e0b1ae6, + 0x4e6f32f1, 0x0ec24ac8, 0xcea662df, 0x8e98bbba, 0x4efc93ad, + 0x0e51eb94, 0xce35c383, 0x8e2d595f, 0x4e497148, 0x0ee40971, + 0xce802166, 0x8ebef803, 0x4edad014, 0x0e77a82d, 0xce13803a, + 0x0cd372c7, 0xccb75ad0, 0x8c1a22e9, 0x4c7e0afe, 0x0c40d39b, + 0xcc24fb8c, 0x8c8983b5, 0x4cedaba2, 0x0cf5317e, 0xcc911969, + 0x8c3c6150, 0x4c584947, 0x0c669022, 0xcc02b835, 0x8cafc00c, + 0x4ccbe81b, 0x4d99856e, 0x8dfdad79, 0xcd50d540, 0x0d34fd57, + 0x4d0a2432, 0x8d6e0c25, 0xcdc3741c, 0x0da75c0b, 0x4dbfc6d7, + 0x8ddbeec0, 0xcd7696f9, 0x0d12beee, 0x4d2c678b, 0x8d484f9c, + 0xcde537a5, 0x0d811fb2, 0x0862a385, 0xc8068b92, 0x88abf3ab, + 0x48cfdbbc, 0x08f102d9, 0xc8952ace, 0x883852f7, 0x485c7ae0, + 0x0844e03c, 0xc820c82b, 0x888db012, 0x48e99805, 0x08d74160, + 0xc8b36977, 0x881e114e, 0x487a3959, 0x4928542c, 0x894c7c3b, + 0xc9e10402, 0x09852c15, 0x49bbf570, 0x89dfdd67, 0xc972a55e, + 0x09168d49, 0x490e1795, 0x896a3f82, 0xc9c747bb, 0x09a36fac, + 0x499db6c9, 0x89f99ede, 0xc954e6e7, 0x0930cef0, 0xcbf03c0d, + 0x0b94141a, 0x4b396c23, 0x8b5d4434, 0xcb639d51, 0x0b07b546, + 0x4baacd7f, 0x8bcee568, 0xcbd67fb4, 0x0bb257a3, 0x4b1f2f9a, + 0x8b7b078d, 0xcb45dee8, 0x0b21f6ff, 0x4b8c8ec6, 0x8be8a6d1, + 0x8abacba4, 0x4adee3b3, 0x0a739b8a, 0xca17b39d, 0x8a296af8, + 0x4a4d42ef, 0x0ae03ad6, 0xca8412c1, 0x8a9c881d, 0x4af8a00a, + 0x0a55d833, 0xca31f024, 0x8a0f2941, 0x4a6b0156, 0x0ac6796f, + 0xcaa25178}, + {0x00000000, 0xd4ea739b, 0xe9d396ed, 0x3d39e576, 0x93a15c00, + 0x474b2f9b, 0x7a72caed, 0xae98b976, 0x2643b900, 0xf2a9ca9b, + 0xcf902fed, 0x1b7a5c76, 0xb5e2e500, 0x6108969b, 0x5c3173ed, + 0x88db0076, 0x4c867201, 0x986c019a, 0xa555e4ec, 0x71bf9777, + 0xdf272e01, 0x0bcd5d9a, 0x36f4b8ec, 0xe21ecb77, 0x6ac5cb01, + 0xbe2fb89a, 0x83165dec, 0x57fc2e77, 0xf9649701, 0x2d8ee49a, + 0x10b701ec, 0xc45d7277, 0x980ce502, 0x4ce69699, 0x71df73ef, + 0xa5350074, 0x0badb902, 0xdf47ca99, 0xe27e2fef, 0x36945c74, + 0xbe4f5c02, 0x6aa52f99, 0x579ccaef, 0x8376b974, 0x2dee0002, + 0xf9047399, 0xc43d96ef, 0x10d7e574, 0xd48a9703, 0x0060e498, + 0x3d5901ee, 0xe9b37275, 0x472bcb03, 0x93c1b898, 0xaef85dee, + 0x7a122e75, 0xf2c92e03, 0x26235d98, 0x1b1ab8ee, 0xcff0cb75, + 0x61687203, 0xb5820198, 0x88bbe4ee, 0x5c519775, 0x3019ca05, + 0xe4f3b99e, 0xd9ca5ce8, 0x0d202f73, 0xa3b89605, 0x7752e59e, + 0x4a6b00e8, 0x9e817373, 0x165a7305, 0xc2b0009e, 0xff89e5e8, + 0x2b639673, 0x85fb2f05, 0x51115c9e, 0x6c28b9e8, 0xb8c2ca73, + 0x7c9fb804, 0xa875cb9f, 0x954c2ee9, 0x41a65d72, 0xef3ee404, + 0x3bd4979f, 0x06ed72e9, 0xd2070172, 0x5adc0104, 0x8e36729f, + 0xb30f97e9, 0x67e5e472, 0xc97d5d04, 0x1d972e9f, 0x20aecbe9, + 0xf444b872, 0xa8152f07, 0x7cff5c9c, 0x41c6b9ea, 0x952cca71, + 0x3bb47307, 0xef5e009c, 0xd267e5ea, 0x068d9671, 0x8e569607, + 0x5abce59c, 0x678500ea, 0xb36f7371, 0x1df7ca07, 0xc91db99c, + 0xf4245cea, 0x20ce2f71, 0xe4935d06, 0x30792e9d, 0x0d40cbeb, + 0xd9aab870, 0x77320106, 0xa3d8729d, 0x9ee197eb, 0x4a0be470, + 0xc2d0e406, 0x163a979d, 0x2b0372eb, 0xffe90170, 0x5171b806, + 0x859bcb9d, 0xb8a22eeb, 0x6c485d70, 0x6032940b, 0xb4d8e790, + 0x89e102e6, 0x5d0b717d, 0xf393c80b, 0x2779bb90, 0x1a405ee6, + 0xceaa2d7d, 0x46712d0b, 0x929b5e90, 0xafa2bbe6, 0x7b48c87d, + 0xd5d0710b, 0x013a0290, 0x3c03e7e6, 0xe8e9947d, 0x2cb4e60a, + 0xf85e9591, 0xc56770e7, 0x118d037c, 0xbf15ba0a, 0x6bffc991, + 0x56c62ce7, 0x822c5f7c, 0x0af75f0a, 0xde1d2c91, 0xe324c9e7, + 0x37ceba7c, 0x9956030a, 0x4dbc7091, 0x708595e7, 0xa46fe67c, + 0xf83e7109, 0x2cd40292, 0x11ede7e4, 0xc507947f, 0x6b9f2d09, + 0xbf755e92, 0x824cbbe4, 0x56a6c87f, 0xde7dc809, 0x0a97bb92, + 0x37ae5ee4, 0xe3442d7f, 0x4ddc9409, 0x9936e792, 0xa40f02e4, + 0x70e5717f, 0xb4b80308, 0x60527093, 0x5d6b95e5, 0x8981e67e, + 0x27195f08, 0xf3f32c93, 0xcecac9e5, 0x1a20ba7e, 0x92fbba08, + 0x4611c993, 0x7b282ce5, 0xafc25f7e, 0x015ae608, 0xd5b09593, + 0xe88970e5, 0x3c63037e, 0x502b5e0e, 0x84c12d95, 0xb9f8c8e3, + 0x6d12bb78, 0xc38a020e, 0x17607195, 0x2a5994e3, 0xfeb3e778, + 0x7668e70e, 0xa2829495, 0x9fbb71e3, 0x4b510278, 0xe5c9bb0e, + 0x3123c895, 0x0c1a2de3, 0xd8f05e78, 0x1cad2c0f, 0xc8475f94, + 0xf57ebae2, 0x2194c979, 0x8f0c700f, 0x5be60394, 0x66dfe6e2, + 0xb2359579, 0x3aee950f, 0xee04e694, 0xd33d03e2, 0x07d77079, + 0xa94fc90f, 0x7da5ba94, 0x409c5fe2, 0x94762c79, 0xc827bb0c, + 0x1ccdc897, 0x21f42de1, 0xf51e5e7a, 0x5b86e70c, 0x8f6c9497, + 0xb25571e1, 0x66bf027a, 0xee64020c, 0x3a8e7197, 0x07b794e1, + 0xd35de77a, 0x7dc55e0c, 0xa92f2d97, 0x9416c8e1, 0x40fcbb7a, + 0x84a1c90d, 0x504bba96, 0x6d725fe0, 0xb9982c7b, 0x1700950d, + 0xc3eae696, 0xfed303e0, 0x2a39707b, 0xa2e2700d, 0x76080396, + 0x4b31e6e0, 0x9fdb957b, 0x31432c0d, 0xe5a95f96, 0xd890bae0, + 0x0c7ac97b}, + {0x00000000, 0x27652581, 0x0fcc3bd9, 0x28a91e58, 0x5f9e0669, + 0x78fb23e8, 0x50523db0, 0x77371831, 0xbe3c0dd2, 0x99592853, + 0xb1f0360b, 0x9695138a, 0xe1a20bbb, 0xc6c72e3a, 0xee6e3062, + 0xc90b15e3, 0x3d7f6b7f, 0x1a1a4efe, 0x32b350a6, 0x15d67527, + 0x62e16d16, 0x45844897, 0x6d2d56cf, 0x4a48734e, 0x834366ad, + 0xa426432c, 0x8c8f5d74, 0xabea78f5, 0xdcdd60c4, 0xfbb84545, + 0xd3115b1d, 0xf4747e9c, 0x7afed6fe, 0x5d9bf37f, 0x7532ed27, + 0x5257c8a6, 0x2560d097, 0x0205f516, 0x2aaceb4e, 0x0dc9cecf, + 0xc4c2db2c, 0xe3a7fead, 0xcb0ee0f5, 0xec6bc574, 0x9b5cdd45, + 0xbc39f8c4, 0x9490e69c, 0xb3f5c31d, 0x4781bd81, 0x60e49800, + 0x484d8658, 0x6f28a3d9, 0x181fbbe8, 0x3f7a9e69, 0x17d38031, + 0x30b6a5b0, 0xf9bdb053, 0xded895d2, 0xf6718b8a, 0xd114ae0b, + 0xa623b63a, 0x814693bb, 0xa9ef8de3, 0x8e8aa862, 0xb5fadc26, + 0x929ff9a7, 0xba36e7ff, 0x9d53c27e, 0xea64da4f, 0xcd01ffce, + 0xe5a8e196, 0xc2cdc417, 0x0bc6d1f4, 0x2ca3f475, 0x040aea2d, + 0x236fcfac, 0x5458d79d, 0x733df21c, 0x5b94ec44, 0x7cf1c9c5, + 0x8885b759, 0xafe092d8, 0x87498c80, 0xa02ca901, 0xd71bb130, + 0xf07e94b1, 0xd8d78ae9, 0xffb2af68, 0x36b9ba8b, 0x11dc9f0a, + 0x39758152, 0x1e10a4d3, 0x6927bce2, 0x4e429963, 0x66eb873b, + 0x418ea2ba, 0xcf040ad8, 0xe8612f59, 0xc0c83101, 0xe7ad1480, + 0x909a0cb1, 0xb7ff2930, 0x9f563768, 0xb83312e9, 0x7138070a, + 0x565d228b, 0x7ef43cd3, 0x59911952, 0x2ea60163, 0x09c324e2, + 0x216a3aba, 0x060f1f3b, 0xf27b61a7, 0xd51e4426, 0xfdb75a7e, + 0xdad27fff, 0xade567ce, 0x8a80424f, 0xa2295c17, 0x854c7996, + 0x4c476c75, 0x6b2249f4, 0x438b57ac, 0x64ee722d, 0x13d96a1c, + 0x34bc4f9d, 0x1c1551c5, 0x3b707444, 0x6af5b94d, 0x4d909ccc, + 0x65398294, 0x425ca715, 0x356bbf24, 0x120e9aa5, 0x3aa784fd, + 0x1dc2a17c, 0xd4c9b49f, 0xf3ac911e, 0xdb058f46, 0xfc60aac7, + 0x8b57b2f6, 0xac329777, 0x849b892f, 0xa3feacae, 0x578ad232, + 0x70eff7b3, 0x5846e9eb, 0x7f23cc6a, 0x0814d45b, 0x2f71f1da, + 0x07d8ef82, 0x20bdca03, 0xe9b6dfe0, 0xced3fa61, 0xe67ae439, + 0xc11fc1b8, 0xb628d989, 0x914dfc08, 0xb9e4e250, 0x9e81c7d1, + 0x100b6fb3, 0x376e4a32, 0x1fc7546a, 0x38a271eb, 0x4f9569da, + 0x68f04c5b, 0x40595203, 0x673c7782, 0xae376261, 0x895247e0, + 0xa1fb59b8, 0x869e7c39, 0xf1a96408, 0xd6cc4189, 0xfe655fd1, + 0xd9007a50, 0x2d7404cc, 0x0a11214d, 0x22b83f15, 0x05dd1a94, + 0x72ea02a5, 0x558f2724, 0x7d26397c, 0x5a431cfd, 0x9348091e, + 0xb42d2c9f, 0x9c8432c7, 0xbbe11746, 0xccd60f77, 0xebb32af6, + 0xc31a34ae, 0xe47f112f, 0xdf0f656b, 0xf86a40ea, 0xd0c35eb2, + 0xf7a67b33, 0x80916302, 0xa7f44683, 0x8f5d58db, 0xa8387d5a, + 0x613368b9, 0x46564d38, 0x6eff5360, 0x499a76e1, 0x3ead6ed0, + 0x19c84b51, 0x31615509, 0x16047088, 0xe2700e14, 0xc5152b95, + 0xedbc35cd, 0xcad9104c, 0xbdee087d, 0x9a8b2dfc, 0xb22233a4, + 0x95471625, 0x5c4c03c6, 0x7b292647, 0x5380381f, 0x74e51d9e, + 0x03d205af, 0x24b7202e, 0x0c1e3e76, 0x2b7b1bf7, 0xa5f1b395, + 0x82949614, 0xaa3d884c, 0x8d58adcd, 0xfa6fb5fc, 0xdd0a907d, + 0xf5a38e25, 0xd2c6aba4, 0x1bcdbe47, 0x3ca89bc6, 0x1401859e, + 0x3364a01f, 0x4453b82e, 0x63369daf, 0x4b9f83f7, 0x6cfaa676, + 0x988ed8ea, 0xbfebfd6b, 0x9742e333, 0xb027c6b2, 0xc710de83, + 0xe075fb02, 0xc8dce55a, 0xefb9c0db, 0x26b2d538, 0x01d7f0b9, + 0x297eeee1, 0x0e1bcb60, 0x792cd351, 0x5e49f6d0, 0x76e0e888, + 0x5185cd09}}; + +#endif + +#endif + +#endif + +local const z_crc_t FAR x2n_table[] = { + 0x40000000, 0x20000000, 0x08000000, 0x00800000, 0x00008000, + 0xedb88320, 0xb1e6b092, 0xa06a2517, 0xed627dae, 0x88d14467, + 0xd7bbfe6a, 0xec447f11, 0x8e7ea170, 0x6427800e, 0x4d47bae0, + 0x09fe548f, 0x83852d0f, 0x30362f1a, 0x7b5a9cc3, 0x31fec169, + 0x9fec022a, 0x6c8dedc4, 0x15d6874d, 0x5fde7a4e, 0xbad90e37, + 0x2e4e5eef, 0x4eaba214, 0xa8a472c0, 0x429a969e, 0x148d302a, + 0xc40ba6d0, 0xc4e22c3c}; diff --git a/thirdparty/freetype/src/gzip/ftgzip.c b/thirdparty/freetype/src/gzip/ftgzip.c index 8f98a7d17b..34bbe4dafa 100644 --- a/thirdparty/freetype/src/gzip/ftgzip.c +++ b/thirdparty/freetype/src/gzip/ftgzip.c @@ -8,7 +8,7 @@ * parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -69,10 +69,21 @@ /* */ /* so that configuration with `FT_CONFIG_OPTION_SYSTEM_ZLIB' might */ /* include the wrong `zconf.h' file, leading to errors. */ -#include "zlib.h" -#undef SLOW -#define SLOW 1 /* we can't use asm-optimized sources here! */ + /* `HAVE_HIDDEN` should be defined if */ + /* */ + /* __attribute__((visibility("hidden"))) */ + /* */ + /* is supported by the compiler, which prevents internal symbols from */ + /* being exported by the library. */ +#if defined( __GNUC__ ) || defined( __clang__ ) +#define HAVE_HIDDEN 1 +#define ZEXPORT +#define ZEXTERN static +#endif + +#define Z_SOLO 1 +#define Z_FREETYPE 1 #if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ /* We disable the warning `conversion from XXX to YYY, */ @@ -83,24 +94,23 @@ #pragma warning( disable : 4244 ) #endif /* _MSC_VER */ - /* Urgh. `inflate_mask' must not be declared twice -- C++ doesn't like - this. We temporarily disable it and load all necessary header files. */ -#define NO_INFLATE_MASK -#include "zutil.h" -#include "inftrees.h" -#include "infblock.h" -#include "infcodes.h" -#include "infutil.h" -#undef NO_INFLATE_MASK - - /* infutil.c must be included before infcodes.c */ +#if defined( __GNUC__ ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +#pragma GCC diagnostic ignored "-Wredundant-decls" +#endif + #include "zutil.c" -#include "inftrees.c" -#include "infutil.c" -#include "infcodes.c" -#include "infblock.c" +#include "inffast.c" #include "inflate.c" +#include "inftrees.c" #include "adler32.c" +#include "crc32.c" + +#if defined( __GNUC__ ) +#pragma GCC diagnostic pop +#endif #if defined( _MSC_VER ) #pragma warning( pop ) @@ -150,7 +160,7 @@ #if !defined( FT_CONFIG_OPTION_SYSTEM_ZLIB ) && !defined( USE_ZLIB_ZCALLOC ) - local voidpf + voidpf ZLIB_INTERNAL zcalloc ( voidpf opaque, unsigned items, unsigned size ) @@ -158,7 +168,8 @@ return ft_gzip_alloc( opaque, items, size ); } - local void + + void ZLIB_INTERNAL zcfree( voidpf opaque, voidpf ptr ) { @@ -751,16 +762,7 @@ stream.zfree = ft_gzip_free; stream.opaque = memory; - /* This is a temporary fix and will be removed once the internal - * copy of zlib is updated to the newest version. The `|32' flag - * is only supported in the new versions of zlib to enable gzip - * encoded header. - */ -#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB err = inflateInit2( &stream, MAX_WBITS|32 ); -#else - err = inflateInit2( &stream, MAX_WBITS ); -#endif if ( err != Z_OK ) return FT_THROW( Invalid_Argument ); diff --git a/thirdparty/freetype/src/gzip/ftzconf.h b/thirdparty/freetype/src/gzip/ftzconf.h index 3abf0ba03b..5e1d68a004 100644 --- a/thirdparty/freetype/src/gzip/ftzconf.h +++ b/thirdparty/freetype/src/gzip/ftzconf.h @@ -1,109 +1,255 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2002 Jean-loup Gailly. + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ -#ifndef _ZCONF_H -#define _ZCONF_H +#ifndef ZCONF_H +#define ZCONF_H /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ -# define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflateParams z_deflateParams -# define inflateInit2_ z_inflateInit2_ -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateReset z_inflateReset -# define compress z_compress -# define compress2 z_compress2 -# define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table - -# define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong -# define Bytef z_Bytef -# define charf z_charf -# define intf z_intf -# define uIntf z_uIntf -# define uLongf z_uLongf -# define voidpf z_voidpf -# define voidp z_voidp -#endif - -#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) -# define WIN32 -#endif -#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) -# ifndef __32BIT__ -# define __32BIT__ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols and init macros */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define crc32_z z_crc32_z +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary +# define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflateValidate z_inflateValidate +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# define uncompress2 z_uncompress2 +# endif +# define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile # endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + #endif + #if defined(__MSDOS__) && !defined(MSDOS) # define MSDOS #endif - -/* WinCE doesn't have errno.h */ -#ifdef _WIN32_WCE -# define NO_ERRNO_H +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif #endif - /* * Compile with -DMAXSEG_64K if the alloc function cannot allocate more * than 64k bytes at a time (needed on systems with 16-bit int). */ -#if defined(MSDOS) && !defined(__32BIT__) +#ifdef SYS16BIT # define MAXSEG_64K #endif #ifdef MSDOS # define UNALIGNED_OK #endif -#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) -# define STDC -#endif -#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__) +#ifdef __STDC_VERSION__ # ifndef STDC # define STDC # endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC #endif #ifndef STDC # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const +# define const /* note: need a more gentle solution here */ # endif #endif -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Old Borland C and LCC incorrectly complains about missing returns: */ -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) -# define NEED_DUMMY_RETURN +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const #endif -#if defined(__LCC__) -# define NEED_DUMMY_RETURN +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include <stddef.h> + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong #endif /* Maximum value for memLevel in deflateInit2 */ @@ -133,7 +279,7 @@ Of course this will generally degrade compression (there's no free lunch). The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes for small objects. */ @@ -147,75 +293,101 @@ # endif #endif +#ifndef Z_ARG /* function prototypes for stdarg */ +# if defined(STDC) || defined(Z_HAVE_STDARG_H) +# define Z_ARG(args) args +# else +# define Z_ARG(args) () +# endif +#endif + /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, * just define FAR to be empty. */ -#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif # endif -#endif -#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) -# ifndef __32BIT__ +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ # define SMALL_MEDIUM -# define FAR _far +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif # endif #endif -/* Compile with -DZLIB_DLL for Windows DLL support */ -#if defined(ZLIB_DLL) -# if defined(_WINDOWS) || defined(WINDOWS) +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI # ifdef FAR # undef FAR # endif # include <windows.h> -# define ZEXPORT(x) x WINAPI + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI # ifdef WIN32 -# define ZEXPORTVA(x) x WINAPIV +# define ZEXPORTVA WINAPIV # else -# define ZEXPORTVA(x) x FAR _cdecl _export +# define ZEXPORTVA FAR CDECL # endif # endif -# if defined (__BORLANDC__) -# if (__BORLANDC__ >= 0x0500) && defined (WIN32) -# include <windows.h> -# define ZEXPORT(x) x __declspec(dllexport) WINAPI -# define ZEXPORTRVA(x) x __declspec(dllexport) WINAPIV +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) # else -# if defined (_Windows) && defined (__DLL__) -# define ZEXPORT(x) x _export -# define ZEXPORTVA(x) x _export -# endif +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) # endif # endif #endif - +#ifndef ZEXTERN +# define ZEXTERN extern +#endif #ifndef ZEXPORT -# define ZEXPORT(x) static x +# define ZEXPORT #endif #ifndef ZEXPORTVA -# define ZEXPORTVA(x) static x -#endif -#ifndef ZEXTERN -# define ZEXTERN(x) static x -#endif -#ifndef ZEXTERNDEF -# define ZEXTERNDEF(x) static x +# define ZEXPORTVA #endif #ifndef FAR -# define FAR +# define FAR #endif -#if !defined(MACOS) && !defined(TARGET_OS_MAC) +#if !defined(__MACTYPES__) typedef unsigned char Byte; /* 8 bits */ #endif typedef unsigned int uInt; /* 16 bits or more */ @@ -233,52 +405,130 @@ typedef uInt FAR uIntf; typedef uLong FAR uLongf; #ifdef STDC - typedef void FAR *voidpf; - typedef void *voidp; + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include <limits.h> +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short +# endif +#endif + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; #else - typedef Byte FAR *voidpf; - typedef Byte *voidp; + typedef unsigned long z_crc_t; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H #endif -#ifdef HAVE_UNISTD_H -# include <sys/types.h> /* for off_t */ -# include <unistd.h> /* for SEEK_* and off_t */ -# define z_off_t off_t +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_STDARG_H #endif -#ifndef SEEK_SET + +#ifdef STDC +# ifndef Z_SOLO +# include <sys/types.h> /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include <stdarg.h> /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include <stddef.h> /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) +# define Z_HAVE_UNISTD_H +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) +# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include <unixio.h> /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif + #ifndef z_off_t -# define z_off_t long +# define z_off_t long +#endif + +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t +# endif #endif /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(inflate_blocks,"INBL") -# pragma map(inflate_blocks_new,"INBLNE") -# pragma map(inflate_blocks_free,"INBLFR") -# pragma map(inflate_blocks_reset,"INBLRE") -# pragma map(inflate_codes_free,"INCOFR") -# pragma map(inflate_codes,"INCO") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_flush,"INFLU") -# pragma map(inflate_mask,"INMA") -# pragma map(inflate_set_dictionary,"INSEDI2") -# pragma map(inflate_copyright,"INCOPY") -# pragma map(inflate_trees_bits,"INTRBI") -# pragma map(inflate_trees_dynamic,"INTRDY") -# pragma map(inflate_trees_fixed,"INTRFI") -# pragma map(inflate_trees_free,"INTRFR") -#endif - -#endif /* _ZCONF_H */ + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/thirdparty/freetype/src/gzip/gzguts.h b/thirdparty/freetype/src/gzip/gzguts.h new file mode 100644 index 0000000000..4f09a52a7a --- /dev/null +++ b/thirdparty/freetype/src/gzip/gzguts.h @@ -0,0 +1,219 @@ +/* gzguts.h -- zlib internal header definitions for gz* operations + * Copyright (C) 2004-2019 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#ifdef _LARGEFILE64_SOURCE +# ifndef _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 +# endif +# ifdef _FILE_OFFSET_BITS +# undef _FILE_OFFSET_BITS +# endif +#endif + +#ifdef HAVE_HIDDEN +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + +#include <stdio.h> +#include "zlib.h" +#ifdef STDC +# include <string.h> +# include <stdlib.h> +# include <limits.h> +#endif + +#ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +#endif +#include <fcntl.h> + +#ifdef _WIN32 +# include <stddef.h> +#endif + +#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) +# include <io.h> +#endif + +#if defined(_WIN32) +# define WIDECHAR +#endif + +#ifdef WINAPI_FAMILY +# define open _open +# define read _read +# define write _write +# define close _close +#endif + +#ifdef NO_DEFLATE /* for compatibility with old definition */ +# define NO_GZCOMPRESS +#endif + +#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#if defined(__CYGWIN__) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#ifndef HAVE_VSNPRINTF +# ifdef MSDOS +/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), + but for now we just assume it doesn't. */ +# define NO_vsnprintf +# endif +# ifdef __TURBOC__ +# define NO_vsnprintf +# endif +# ifdef WIN32 +/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ +# if !defined(vsnprintf) && !defined(NO_vsnprintf) +# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) +# define vsnprintf _vsnprintf +# endif +# endif +# endif +# ifdef __SASC +# define NO_vsnprintf +# endif +# ifdef VMS +# define NO_vsnprintf +# endif +# ifdef __OS400__ +# define NO_vsnprintf +# endif +# ifdef __MVS__ +# define NO_vsnprintf +# endif +#endif + +/* unlike snprintf (which is required in C99), _snprintf does not guarantee + null termination of the result -- however this is only used in gzlib.c where + the result is assured to fit in the space provided */ +#if defined(_MSC_VER) && _MSC_VER < 1900 +# define snprintf _snprintf +#endif + +#ifndef local +# define local static +#endif +/* since "static" is used to mean two completely different things in C, we + define "local" for the non-static meaning of "static", for readability + (compile with -Dlocal if your debugger can't find static symbols) */ + +/* gz* functions always use library allocation functions */ +#ifndef STDC + extern voidp malloc OF((uInt size)); + extern void free OF((voidpf ptr)); +#endif + +/* get errno and strerror definition */ +#if defined UNDER_CE +# include <windows.h> +# define zstrerror() gz_strwinerror((DWORD)GetLastError()) +#else +# ifndef NO_STRERROR +# include <errno.h> +# define zstrerror() strerror(errno) +# else +# define zstrerror() "stdio error (consult errno)" +# endif +#endif + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); +#endif + +/* default memLevel */ +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif + +/* default i/o buffer size -- double this for output when reading (this and + twice this must be able to fit in an unsigned type) */ +#define GZBUFSIZE 8192 + +/* gzip modes, also provide a little integrity check on the passed structure */ +#define GZ_NONE 0 +#define GZ_READ 7247 +#define GZ_WRITE 31153 +#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ + +/* values for gz_state how */ +#define LOOK 0 /* look for a gzip header */ +#define COPY__ 1 /* copy input directly */ +#define GZIP 2 /* decompress a gzip stream */ + +/* internal gzip file state data structure */ +typedef struct { + /* exposed contents for gzgetc() macro */ + struct gzFile_s x; /* "x" for exposed */ + /* x.have: number of bytes available at x.next */ + /* x.next: next output data to deliver or write */ + /* x.pos: current position in uncompressed data */ + /* used for both reading and writing */ + int mode; /* see gzip modes above */ + int fd; /* file descriptor */ + char *path; /* path or fd for error messages */ + unsigned size; /* buffer size, zero if not allocated yet */ + unsigned want; /* requested buffer size, default is GZBUFSIZE */ + unsigned char *in; /* input buffer (double-sized when writing) */ + unsigned char *out; /* output buffer (double-sized when reading) */ + int direct; /* 0 if processing gzip, 1 if transparent */ + /* just for reading */ + int how; /* 0: get header, 1: copy, 2: decompress */ + z_off64_t start; /* where the gzip data started, for rewinding */ + int eof; /* true if end of input file reached */ + int past; /* true if read requested past end */ + /* just for writing */ + int level; /* compression level */ + int strategy; /* compression strategy */ + int reset; /* true if a reset is pending after a Z_FINISH */ + /* seek request */ + z_off64_t skip; /* amount to skip (already rewound if backwards) */ + int seek; /* true if seek request pending */ + /* error information */ + int err; /* error code */ + char *msg; /* error message */ + /* zlib inflate or deflate stream */ + z_stream strm; /* stream structure in-place (not a pointer) */ +} gz_state; +typedef gz_state FAR *gz_statep; + +/* shared functions */ +void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); +#if defined UNDER_CE +char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); +#endif + +/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t + value -- needed when comparing unsigned to z_off64_t, which is signed + (possible z_off64_t types off_t, off64_t, and long are all signed) */ +#ifdef INT_MAX +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) +#else +unsigned ZLIB_INTERNAL gz_intmax OF((void)); +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) +#endif diff --git a/thirdparty/freetype/src/gzip/infback.c b/thirdparty/freetype/src/gzip/infback.c new file mode 100644 index 0000000000..5fb8c67941 --- /dev/null +++ b/thirdparty/freetype/src/gzip/infback.c @@ -0,0 +1,641 @@ +/* infback.c -- inflate using a call-back interface + * Copyright (C) 1995-2022 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + This code is largely copied from inflate.c. Normally either infback.o or + inflate.o would be linked into an application--not both. The interface + with inffast.c is retained so that optimized assembler-coded versions of + inflate_fast() can be used with either inflate.c or infback.c. + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* function prototypes */ +local void fixedtables OF((struct inflate_state FAR *state)); + +/* + strm provides memory allocation functions in zalloc and zfree, or + Z_NULL to use the library memory allocation functions. + + windowBits is in the range 8..15, and window is a user-supplied + window and output buffer that is 2**windowBits bytes. + */ +int ZEXPORT inflateBackInit_( + z_streamp strm, + int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size) +{ + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL || window == Z_NULL || + windowBits < 8 || windowBits > 15) + return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; +#endif + } + if (strm->zfree == (free_func)0) +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zfree = zcfree; +#endif + state = (struct inflate_state FAR *)ZALLOC(strm, 1, + sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (struct internal_state FAR *)state; + state->dmax = 32768U; + state->wbits = (uInt)windowBits; + state->wsize = 1U << windowBits; + state->window = window; + state->wnext = 0; + state->whave = 0; + return Z_OK; +} + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +local void fixedtables( + struct inflate_state FAR *state) +{ +#ifdef BUILDFIXED + static int virgin = 1; + static code *lenfix, *distfix; + static code fixed[544]; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + unsigned sym, bits; + static code *next; + + /* literal/length table */ + sym = 0; + while (sym < 144) state->lens[sym++] = 8; + while (sym < 256) state->lens[sym++] = 9; + while (sym < 280) state->lens[sym++] = 7; + while (sym < 288) state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); + + /* distance table */ + sym = 0; + while (sym < 32) state->lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); + + /* do this just once */ + virgin = 0; + } +#else /* !BUILDFIXED */ +# include "inffixed.h" +#endif /* BUILDFIXED */ + state->lencode = lenfix; + state->lenbits = 9; + state->distcode = distfix; + state->distbits = 5; +} + +/* Macros for inflateBack(): */ + +/* Load returned state from inflate_fast() */ +#define LOAD() \ + do { \ + put = strm->next_out; \ + left = strm->avail_out; \ + next = strm->next_in; \ + have = strm->avail_in; \ + hold = state->hold; \ + bits = state->bits; \ + } while (0) + +/* Set state from registers for inflate_fast() */ +#define RESTORE() \ + do { \ + strm->next_out = put; \ + strm->avail_out = left; \ + strm->next_in = next; \ + strm->avail_in = have; \ + state->hold = hold; \ + state->bits = bits; \ + } while (0) + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Assure that some input is available. If input is requested, but denied, + then return a Z_BUF_ERROR from inflateBack(). */ +#define PULL() \ + do { \ + if (have == 0) { \ + have = in(in_desc, &next); \ + if (have == 0) { \ + next = Z_NULL; \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflateBack() + with an error if there is no input available. */ +#define PULLBYTE() \ + do { \ + PULL(); \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflateBack() with + an error. */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n < 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* Assure that some output space is available, by writing out the window + if it's full. If the write fails, return from inflateBack() with a + Z_BUF_ERROR. */ +#define ROOM() \ + do { \ + if (left == 0) { \ + put = state->window; \ + left = state->wsize; \ + state->whave = left; \ + if (out(out_desc, put, left)) { \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* + strm provides the memory allocation functions and window buffer on input, + and provides information on the unused input on return. For Z_DATA_ERROR + returns, strm will also provide an error message. + + in() and out() are the call-back input and output functions. When + inflateBack() needs more input, it calls in(). When inflateBack() has + filled the window with output, or when it completes with data in the + window, it calls out() to write out the data. The application must not + change the provided input until in() is called again or inflateBack() + returns. The application must not change the window/output buffer until + inflateBack() returns. + + in() and out() are called with a descriptor parameter provided in the + inflateBack() call. This parameter can be a structure that provides the + information required to do the read or write, as well as accumulated + information on the input and output such as totals and check values. + + in() should return zero on failure. out() should return non-zero on + failure. If either in() or out() fails, than inflateBack() returns a + Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it + was in() or out() that caused in the error. Otherwise, inflateBack() + returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format + error, or Z_MEM_ERROR if it could not allocate memory for the state. + inflateBack() can also return Z_STREAM_ERROR if the input parameters + are not correct, i.e. strm is Z_NULL or the state was not initialized. + */ +int ZEXPORT inflateBack( + z_streamp strm, + in_func in, + void FAR *in_desc, + out_func out, + void FAR *out_desc) +{ + struct inflate_state FAR *state; + z_const unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have, left; /* available input and output */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code here; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + /* Check that the strm exists and that the state was initialized */ + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* Reset the state */ + strm->msg = Z_NULL; + state->mode = TYPE; + state->last = 0; + state->whave = 0; + next = strm->next_in; + have = next != Z_NULL ? strm->avail_in : 0; + hold = 0; + bits = 0; + put = state->window; + left = state->wsize; + + /* Inflate until end of block marked as last */ + for (;;) + switch (state->mode) { + case TYPE: + /* determine and dispatch block type */ + if (state->last) { + BYTEBITS(); + state->mode = DONE; + break; + } + NEEDBITS(3); + state->last = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + state->last ? " (last)" : "")); + state->mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + Tracev((stderr, "inflate: fixed codes block%s\n", + state->last ? " (last)" : "")); + state->mode = LEN; /* decode codes */ + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + state->last ? " (last)" : "")); + state->mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + state->mode = BAD; + } + DROPBITS(2); + break; + + case STORED: + /* get and verify stored block length */ + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + state->mode = BAD; + break; + } + state->length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %u\n", + state->length)); + INITBITS(); + + /* copy stored block from input to output */ + while (state->length != 0) { + copy = state->length; + PULL(); + ROOM(); + if (copy > have) copy = have; + if (copy > left) copy = left; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + state->length -= copy; + } + Tracev((stderr, "inflate: stored end\n")); + state->mode = TYPE; + break; + + case TABLE: + /* get dynamic table entries descriptor */ + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); +#ifndef PKZIP_BUG_WORKAROUND + if (state->nlen > 286 || state->ndist > 30) { + strm->msg = (char *)"too many length or distance symbols"; + state->mode = BAD; + break; + } +#endif + Tracev((stderr, "inflate: table sizes ok\n")); + + /* get code length code lengths (not a typo) */ + state->have = 0; + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 7; + ret = inflate_table(CODES, state->lens, 19, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + + /* get length and distance code code lengths */ + state->have = 0; + while (state->have < state->nlen + state->ndist) { + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.val < 16) { + DROPBITS(here.bits); + state->lens[state->have++] = here.val; + } + else { + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + len = (unsigned)(state->lens[state->have - 1]); + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (state->mode == BAD) break; + + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 9; + ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + state->mode = BAD; + break; + } + state->distcode = (code const FAR *)(state->next); + state->distbits = 6; + ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, + &(state->next), &(state->distbits), state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN; + /* fallthrough */ + + case LEN: + /* use inflate_fast() if we have enough input and output */ + if (have >= 6 && left >= 258) { + RESTORE(); + if (state->whave < state->wsize) + state->whave = state->wsize - left; + inflate_fast(strm, state->wsize); + LOAD(); + break; + } + + /* get a literal, length, or end-of-block code */ + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.op && (here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(here.bits); + state->length = (unsigned)here.val; + + /* process literal */ + if (here.op == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here.val)); + ROOM(); + *put++ = (unsigned char)(state->length); + left--; + state->mode = LEN; + break; + } + + /* process end of block */ + if (here.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + + /* invalid code */ + if (here.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + + /* length code -- get extra bits, if any */ + state->extra = (unsigned)(here.op) & 15; + if (state->extra != 0) { + NEEDBITS(state->extra); + state->length += BITS(state->extra); + DROPBITS(state->extra); + } + Tracevv((stderr, "inflate: length %u\n", state->length)); + + /* get distance code */ + for (;;) { + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if ((here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(here.bits); + if (here.op & 64) { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + state->offset = (unsigned)here.val; + + /* get distance extra bits, if any */ + state->extra = (unsigned)(here.op) & 15; + if (state->extra != 0) { + NEEDBITS(state->extra); + state->offset += BITS(state->extra); + DROPBITS(state->extra); + } + if (state->offset > state->wsize - (state->whave < state->wsize ? + left : 0)) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } + Tracevv((stderr, "inflate: distance %u\n", state->offset)); + + /* copy match from window to output */ + do { + ROOM(); + copy = state->wsize - state->offset; + if (copy < left) { + from = put + copy; + copy = left - copy; + } + else { + from = put - state->offset; + copy = left; + } + if (copy > state->length) copy = state->length; + state->length -= copy; + left -= copy; + do { + *put++ = *from++; + } while (--copy); + } while (state->length != 0); + break; + + case DONE: + /* inflate stream terminated properly -- write leftover output */ + ret = Z_STREAM_END; + if (left < state->wsize) { + if (out(out_desc, state->window, state->wsize - left)) + ret = Z_BUF_ERROR; + } + goto inf_leave; + + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + + default: /* can't happen, but makes compilers happy */ + ret = Z_STREAM_ERROR; + goto inf_leave; + } + + /* Return unused input */ + inf_leave: + strm->next_in = next; + strm->avail_in = have; + return ret; +} + +int ZEXPORT inflateBackEnd( + z_streamp strm) +{ + if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) + return Z_STREAM_ERROR; + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} diff --git a/thirdparty/freetype/src/gzip/infblock.c b/thirdparty/freetype/src/gzip/infblock.c deleted file mode 100644 index 2b4f0c2b53..0000000000 --- a/thirdparty/freetype/src/gzip/infblock.c +++ /dev/null @@ -1,392 +0,0 @@ -/* infblock.c -- interpret and process block types to last block - * Copyright (C) 1995-2002 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "infblock.h" -#include "inftrees.h" -#include "infcodes.h" -#include "infutil.h" - - -/* simplify the use of the inflate_huft type with some defines */ -#define exop word.what.Exop -#define bits word.what.Bits - -/* Table for deflate from PKZIP's appnote.txt. */ -local const uInt border[] = { /* Order of the bit length code lengths */ - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - -/* - Notes beyond the 1.93a appnote.txt: - - 1. Distance pointers never point before the beginning of the output - stream. - 2. Distance pointers can point back across blocks, up to 32k away. - 3. There is an implied maximum of 7 bits for the bit length table and - 15 bits for the actual data. - 4. If only one code exists, then it is encoded using one bit. (Zero - would be more efficient, but perhaps a little confusing.) If two - codes exist, they are coded using one bit each (0 and 1). - 5. There is no way of sending zero distance codes--a dummy must be - sent if there are none. (History: a pre 2.0 version of PKZIP would - store blocks with no distance codes, but this was discovered to be - too harsh a criterion.) Valid only for 1.93a. 2.04c does allow - zero distance codes, which is sent as one code of zero bits in - length. - 6. There are up to 286 literal/length codes. Code 256 represents the - end-of-block. Note however that the static length tree defines - 288 codes just to fill out the Huffman codes. Codes 286 and 287 - cannot be used though, since there is no length base or extra bits - defined for them. Similarily, there are up to 30 distance codes. - However, static trees define 32 codes (all 5 bits) to fill out the - Huffman codes, but the last two had better not show up in the data. - 7. Unzip can check dynamic Huffman blocks for complete code sets. - The exception is that a single code would not be complete (see #4). - 8. The five bits following the block type is really the number of - literal codes sent minus 257. - 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits - (1+6+6). Therefore, to output three times the length, you output - three codes (1+1+1), whereas to output four times the same length, - you only need two codes (1+3). Hmm. - 10. In the tree reconstruction algorithm, Code = Code + Increment - only if BitLength(i) is not zero. (Pretty obvious.) - 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) - 12. Note: length code 284 can represent 227-258, but length code 285 - really is 258. The last length deserves its own, short code - since it gets used a lot in very redundant files. The length - 258 is special since 258 - 3 (the min match length) is 255. - 13. The literal/length and distance code bit lengths are read as a - single stream of lengths. It is possible (and advantageous) for - a repeat code (16, 17, or 18) to go across the boundary between - the two sets of lengths. - */ - - -local void inflate_blocks_reset( /* s, z, c) */ -inflate_blocks_statef *s, -z_streamp z, -uLongf *c ) -{ - if (c != Z_NULL) - *c = s->check; - if (s->mode == BTREE || s->mode == DTREE) - ZFREE(z, s->sub.trees.blens); - if (s->mode == CODES) - inflate_codes_free(s->sub.decode.codes, z); - s->mode = TYPE; - s->bitk = 0; - s->bitb = 0; - s->read = s->write = s->window; - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0); - Tracev((stderr, "inflate: blocks reset\n")); -} - - -local inflate_blocks_statef *inflate_blocks_new( /* z, c, w) */ -z_streamp z, -check_func c, -uInt w ) -{ - inflate_blocks_statef *s; - - if ((s = (inflate_blocks_statef *)ZALLOC - (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL) - return s; - if ((s->hufts = - (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL) - { - ZFREE(z, s); - return Z_NULL; - } - if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL) - { - ZFREE(z, s->hufts); - ZFREE(z, s); - return Z_NULL; - } - s->end = s->window + w; - s->checkfn = c; - s->mode = TYPE; - Tracev((stderr, "inflate: blocks allocated\n")); - inflate_blocks_reset(s, z, Z_NULL); - return s; -} - - -local int inflate_blocks( /* s, z, r) */ -inflate_blocks_statef *s, -z_streamp z, -int r ) -{ - uInt t; /* temporary storage */ - uLong b; /* bit buffer */ - uInt k; /* bits in bit buffer */ - Bytef *p; /* input data pointer */ - uInt n; /* bytes available there */ - Bytef *q; /* output window write pointer */ - uInt m; /* bytes to end of window or read pointer */ - - /* copy input/output information to locals (UPDATE macro restores) */ - LOAD - - /* process input based on current state */ - while (1) switch (s->mode) - { - case TYPE: - NEEDBITS(3) - t = (uInt)b & 7; - s->last = t & 1; - switch (t >> 1) - { - case 0: /* stored */ - Tracev((stderr, "inflate: stored block%s\n", - s->last ? " (last)" : "")); - DUMPBITS(3) - t = k & 7; /* go to byte boundary */ - DUMPBITS(t) - s->mode = LENS; /* get length of stored block */ - break; - case 1: /* fixed */ - Tracev((stderr, "inflate: fixed codes block%s\n", - s->last ? " (last)" : "")); - { - uInt bl, bd; - inflate_huft *tl, *td; - - inflate_trees_fixed(&bl, &bd, (const inflate_huft**)&tl, - (const inflate_huft**)&td, z); - s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z); - if (s->sub.decode.codes == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - } - DUMPBITS(3) - s->mode = CODES; - break; - case 2: /* dynamic */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - s->last ? " (last)" : "")); - DUMPBITS(3) - s->mode = TABLE; - break; - case 3: /* illegal */ - DUMPBITS(3) - s->mode = BAD; - z->msg = (char*)"invalid block type"; - r = Z_DATA_ERROR; - LEAVE - } - break; - case LENS: - NEEDBITS(32) - if ((((~b) >> 16) & 0xffff) != (b & 0xffff)) - { - s->mode = BAD; - z->msg = (char*)"invalid stored block lengths"; - r = Z_DATA_ERROR; - LEAVE - } - s->sub.left = (uInt)b & 0xffff; - b = k = 0; /* dump bits */ - Tracev((stderr, "inflate: stored length %u\n", s->sub.left)); - s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE); - break; - case STORED: - if (n == 0) - LEAVE - NEEDOUT - t = s->sub.left; - if (t > n) t = n; - if (t > m) t = m; - zmemcpy(q, p, t); - p += t; n -= t; - q += t; m -= t; - if ((s->sub.left -= t) != 0) - break; - Tracev((stderr, "inflate: stored end, %lu total out\n", - z->total_out + (q >= s->read ? q - s->read : - (s->end - s->read) + (q - s->window)))); - s->mode = s->last ? DRY : TYPE; - break; - case TABLE: - NEEDBITS(14) - s->sub.trees.table = t = (uInt)b & 0x3fff; -#ifndef PKZIP_BUG_WORKAROUND - if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) - { - s->mode = BAD; - z->msg = (char*)"too many length or distance symbols"; - r = Z_DATA_ERROR; - LEAVE - } -#endif - t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); - if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - DUMPBITS(14) - s->sub.trees.index = 0; - Tracev((stderr, "inflate: table sizes ok\n")); - s->mode = BTREE; - /* fall through */ - case BTREE: - while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) - { - NEEDBITS(3) - s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7; - DUMPBITS(3) - } - while (s->sub.trees.index < 19) - s->sub.trees.blens[border[s->sub.trees.index++]] = 0; - s->sub.trees.bb = 7; - t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb, - &s->sub.trees.tb, s->hufts, z); - if (t != Z_OK) - { - r = t; - if (r == Z_DATA_ERROR) - { - ZFREE(z, s->sub.trees.blens); - s->mode = BAD; - } - LEAVE - } - s->sub.trees.index = 0; - Tracev((stderr, "inflate: bits tree ok\n")); - s->mode = DTREE; - /* fall through */ - case DTREE: - while (t = s->sub.trees.table, - s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) - { - inflate_huft *h; - uInt i, j, c; - - t = s->sub.trees.bb; - NEEDBITS(t) - h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]); - t = h->bits; - c = h->base; - if (c < 16) - { - DUMPBITS(t) - s->sub.trees.blens[s->sub.trees.index++] = c; - } - else /* c == 16..18 */ - { - i = c == 18 ? 7 : c - 14; - j = c == 18 ? 11 : 3; - NEEDBITS(t + i) - DUMPBITS(t) - j += (uInt)b & inflate_mask[i]; - DUMPBITS(i) - i = s->sub.trees.index; - t = s->sub.trees.table; - if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || - (c == 16 && i < 1)) - { - ZFREE(z, s->sub.trees.blens); - s->mode = BAD; - z->msg = (char*)"invalid bit length repeat"; - r = Z_DATA_ERROR; - LEAVE - } - c = c == 16 ? s->sub.trees.blens[i - 1] : 0; - do { - s->sub.trees.blens[i++] = c; - } while (--j); - s->sub.trees.index = i; - } - } - s->sub.trees.tb = Z_NULL; - { - uInt bl, bd; - inflate_huft *tl, *td; - inflate_codes_statef *c; - - bl = 9; /* must be <= 9 for lookahead assumptions */ - bd = 6; /* must be <= 9 for lookahead assumptions */ - t = s->sub.trees.table; - t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), - s->sub.trees.blens, &bl, &bd, &tl, &td, - s->hufts, z); - if (t != Z_OK) - { - if (t == (uInt)Z_DATA_ERROR) - { - ZFREE(z, s->sub.trees.blens); - s->mode = BAD; - } - r = t; - LEAVE - } - Tracev((stderr, "inflate: trees ok\n")); - if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - s->sub.decode.codes = c; - } - ZFREE(z, s->sub.trees.blens); - s->mode = CODES; - /* fall through */ - case CODES: - UPDATE - if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) - return inflate_flush(s, z, r); - r = Z_OK; - inflate_codes_free(s->sub.decode.codes, z); - LOAD - Tracev((stderr, "inflate: codes end, %lu total out\n", - z->total_out + (q >= s->read ? q - s->read : - (s->end - s->read) + (q - s->window)))); - if (!s->last) - { - s->mode = TYPE; - break; - } - s->mode = DRY; - /* fall through */ - case DRY: - FLUSH - if (s->read != s->write) - LEAVE - s->mode = DONE; - /* fall through */ - case DONE: - r = Z_STREAM_END; - LEAVE - case BAD: - r = Z_DATA_ERROR; - LEAVE - default: - r = Z_STREAM_ERROR; - LEAVE - } -#ifdef NEED_DUMMY_RETURN - return 0; -#endif -} - - -local int inflate_blocks_free( /* s, z) */ -inflate_blocks_statef *s, -z_streamp z ) -{ - inflate_blocks_reset(s, z, Z_NULL); - ZFREE(z, s->window); - ZFREE(z, s->hufts); - ZFREE(z, s); - Tracev((stderr, "inflate: blocks freed\n")); - return Z_OK; -} - - diff --git a/thirdparty/freetype/src/gzip/infblock.h b/thirdparty/freetype/src/gzip/infblock.h deleted file mode 100644 index c2535a1e45..0000000000 --- a/thirdparty/freetype/src/gzip/infblock.h +++ /dev/null @@ -1,36 +0,0 @@ -/* infblock.h -- header to use infblock.c - * Copyright (C) 1995-2002 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -#ifndef _INFBLOCK_H -#define _INFBLOCK_H - -struct inflate_blocks_state; -typedef struct inflate_blocks_state FAR inflate_blocks_statef; - -local inflate_blocks_statef * inflate_blocks_new OF(( - z_streamp z, - check_func c, /* check function */ - uInt w)); /* window size */ - -local int inflate_blocks OF(( - inflate_blocks_statef *, - z_streamp , - int)); /* initial return code */ - -local void inflate_blocks_reset OF(( - inflate_blocks_statef *, - z_streamp , - uLongf *)); /* check value on output */ - -local int inflate_blocks_free OF(( - inflate_blocks_statef *, - z_streamp)); - -#endif /* _INFBLOCK_H */ diff --git a/thirdparty/freetype/src/gzip/infcodes.c b/thirdparty/freetype/src/gzip/infcodes.c deleted file mode 100644 index ba30654990..0000000000 --- a/thirdparty/freetype/src/gzip/infcodes.c +++ /dev/null @@ -1,254 +0,0 @@ -/* infcodes.c -- process literals and length/distance pairs - * Copyright (C) 1995-2002 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" -#include "infblock.h" -#include "infcodes.h" -#include "infutil.h" - -/* simplify the use of the inflate_huft type with some defines */ -#define exop word.what.Exop -#define bits word.what.Bits - -typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ - START, /* x: set up for LEN */ - LEN, /* i: get length/literal/eob next */ - LENEXT, /* i: getting length extra (have base) */ - DIST, /* i: get distance next */ - DISTEXT, /* i: getting distance extra */ - COPY, /* o: copying bytes in window, waiting for space */ - LIT, /* o: got literal, waiting for output space */ - WASH, /* o: got eob, possibly still output waiting */ - END, /* x: got eob and all data flushed */ - BADCODE} /* x: got error */ -inflate_codes_mode; - -/* inflate codes private state */ -struct inflate_codes_state { - - /* mode */ - inflate_codes_mode mode; /* current inflate_codes mode */ - - /* mode dependent information */ - uInt len; - union { - struct { - inflate_huft *tree; /* pointer into tree */ - uInt need; /* bits needed */ - } code; /* if LEN or DIST, where in tree */ - uInt lit; /* if LIT, literal */ - struct { - uInt get; /* bits to get for extra */ - uInt dist; /* distance back to copy from */ - } copy; /* if EXT or COPY, where and how much */ - } sub; /* submode */ - - /* mode independent information */ - Byte lbits; /* ltree bits decoded per branch */ - Byte dbits; /* dtree bits decoder per branch */ - inflate_huft *ltree; /* literal/length/eob tree */ - inflate_huft *dtree; /* distance tree */ - -}; - - -local inflate_codes_statef *inflate_codes_new( /* bl, bd, tl, td, z) */ -uInt bl, uInt bd, -inflate_huft *tl, -inflate_huft *td, /* need separate declaration for Borland C++ */ -z_streamp z ) -{ - inflate_codes_statef *c; - - if ((c = (inflate_codes_statef *) - ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL) - { - c->mode = START; - c->lbits = (Byte)bl; - c->dbits = (Byte)bd; - c->ltree = tl; - c->dtree = td; - Tracev((stderr, "inflate: codes new\n")); - } - return c; -} - - -local int inflate_codes( /* s, z, r) */ -inflate_blocks_statef *s, -z_streamp z, -int r ) -{ - uInt j; /* temporary storage */ - inflate_huft *t; /* temporary pointer */ - uInt e; /* extra bits or operation */ - uLong b; /* bit buffer */ - uInt k; /* bits in bit buffer */ - Bytef *p; /* input data pointer */ - uInt n; /* bytes available there */ - Bytef *q; /* output window write pointer */ - uInt m; /* bytes to end of window or read pointer */ - Bytef *f; /* pointer to copy strings from */ - inflate_codes_statef *c = s->sub.decode.codes; /* codes state */ - - /* copy input/output information to locals (UPDATE macro restores) */ - LOAD - - /* process input and output based on current state */ - while (1) switch (c->mode) - { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ - case START: /* x: set up for LEN */ -#ifndef SLOW - if (m >= 258 && n >= 10) - { - UPDATE - r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z); - LOAD - if (r != Z_OK) - { - c->mode = r == Z_STREAM_END ? WASH : BADCODE; - break; - } - } -#endif /* !SLOW */ - c->sub.code.need = c->lbits; - c->sub.code.tree = c->ltree; - c->mode = LEN; - /* fall through */ - case LEN: /* i: get length/literal/eob next */ - j = c->sub.code.need; - NEEDBITS(j) - t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); - DUMPBITS(t->bits) - e = (uInt)(t->exop); - if (e == 0) /* literal */ - { - c->sub.lit = t->base; - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", t->base)); - c->mode = LIT; - break; - } - if (e & 16) /* length */ - { - c->sub.copy.get = e & 15; - c->len = t->base; - c->mode = LENEXT; - break; - } - if ((e & 64) == 0) /* next table */ - { - c->sub.code.need = e; - c->sub.code.tree = t + t->base; - break; - } - if (e & 32) /* end of block */ - { - Tracevv((stderr, "inflate: end of block\n")); - c->mode = WASH; - break; - } - c->mode = BADCODE; /* invalid code */ - z->msg = (char*)"invalid literal/length code"; - r = Z_DATA_ERROR; - LEAVE - case LENEXT: /* i: getting length extra (have base) */ - j = c->sub.copy.get; - NEEDBITS(j) - c->len += (uInt)b & inflate_mask[j]; - DUMPBITS(j) - c->sub.code.need = c->dbits; - c->sub.code.tree = c->dtree; - Tracevv((stderr, "inflate: length %u\n", c->len)); - c->mode = DIST; - /* fall through */ - case DIST: /* i: get distance next */ - j = c->sub.code.need; - NEEDBITS(j) - t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); - DUMPBITS(t->bits) - e = (uInt)(t->exop); - if (e & 16) /* distance */ - { - c->sub.copy.get = e & 15; - c->sub.copy.dist = t->base; - c->mode = DISTEXT; - break; - } - if ((e & 64) == 0) /* next table */ - { - c->sub.code.need = e; - c->sub.code.tree = t + t->base; - break; - } - c->mode = BADCODE; /* invalid code */ - z->msg = (char*)"invalid distance code"; - r = Z_DATA_ERROR; - LEAVE - case DISTEXT: /* i: getting distance extra */ - j = c->sub.copy.get; - NEEDBITS(j) - c->sub.copy.dist += (uInt)b & inflate_mask[j]; - DUMPBITS(j) - Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); - c->mode = COPY; - /* fall through */ - case COPY: /* o: copying bytes in window, waiting for space */ - f = q - c->sub.copy.dist; - while (f < s->window) /* modulo window size-"while" instead */ - f += s->end - s->window; /* of "if" handles invalid distances */ - while (c->len) - { - NEEDOUT - OUTBYTE(*f++) - if (f == s->end) - f = s->window; - c->len--; - } - c->mode = START; - break; - case LIT: /* o: got literal, waiting for output space */ - NEEDOUT - OUTBYTE(c->sub.lit) - c->mode = START; - break; - case WASH: /* o: got eob, possibly more output */ - if (k > 7) /* return unused byte, if any */ - { - Assert(k < 16, "inflate_codes grabbed too many bytes") - k -= 8; - n++; - p--; /* can always return one */ - } - FLUSH - if (s->read != s->write) - LEAVE - c->mode = END; - /* fall through */ - case END: - r = Z_STREAM_END; - LEAVE - case BADCODE: /* x: got error */ - r = Z_DATA_ERROR; - LEAVE - default: - r = Z_STREAM_ERROR; - LEAVE - } -#ifdef NEED_DUMMY_RETURN - return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ -#endif -} - - -local void inflate_codes_free( /* c, z) */ -inflate_codes_statef *c, -z_streamp z ) -{ - ZFREE(z, c); - Tracev((stderr, "inflate: codes free\n")); -} diff --git a/thirdparty/freetype/src/gzip/infcodes.h b/thirdparty/freetype/src/gzip/infcodes.h deleted file mode 100644 index 154d7f896c..0000000000 --- a/thirdparty/freetype/src/gzip/infcodes.h +++ /dev/null @@ -1,31 +0,0 @@ -/* infcodes.h -- header to use infcodes.c - * Copyright (C) 1995-2002 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -#ifndef _INFCODES_H -#define _INFCODES_H - -struct inflate_codes_state; -typedef struct inflate_codes_state FAR inflate_codes_statef; - -local inflate_codes_statef *inflate_codes_new OF(( - uInt, uInt, - inflate_huft *, inflate_huft *, - z_streamp )); - -local int inflate_codes OF(( - inflate_blocks_statef *, - z_streamp , - int)); - -local void inflate_codes_free OF(( - inflate_codes_statef *, - z_streamp )); - -#endif /* _INFCODES_H */ diff --git a/thirdparty/freetype/src/gzip/inffast.c b/thirdparty/freetype/src/gzip/inffast.c new file mode 100644 index 0000000000..809737b13c --- /dev/null +++ b/thirdparty/freetype/src/gzip/inffast.c @@ -0,0 +1,323 @@ +/* inffast.c -- fast decoding + * Copyright (C) 1995-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +#ifdef ASMINF +# pragma message("Assembler code may have bugs -- use at your own risk") +#else + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ +void ZLIB_INTERNAL inflate_fast( + z_streamp strm, + unsigned start) +{ + struct inflate_state FAR *state; + z_const unsigned char FAR *in; /* local strm->next_in */ + z_const unsigned char FAR *last; /* have enough input while in < last */ + unsigned char FAR *out; /* local strm->next_out */ + unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ + unsigned char FAR *end; /* while out < end, enough space available */ +#ifdef INFLATE_STRICT + unsigned dmax; /* maximum distance from zlib header */ +#endif + unsigned wsize; /* window size or zero if not using window */ + unsigned whave; /* valid bytes in the window */ + unsigned wnext; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ + unsigned long hold; /* local strm->hold */ + unsigned bits; /* local strm->bits */ + code const FAR *lcode; /* local strm->lencode */ + code const FAR *dcode; /* local strm->distcode */ + unsigned lmask; /* mask for first level of length codes */ + unsigned dmask; /* mask for first level of distance codes */ + code const *here; /* retrieved table entry */ + unsigned op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + unsigned len; /* match length, unused bytes */ + unsigned dist; /* match distance */ + unsigned char FAR *from; /* where to copy match from */ + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + in = strm->next_in; + last = in + (strm->avail_in - 5); + out = strm->next_out; + beg = out - (start - strm->avail_out); + end = out + (strm->avail_out - 257); +#ifdef INFLATE_STRICT + dmax = state->dmax; +#endif + wsize = state->wsize; + whave = state->whave; + wnext = state->wnext; + window = state->window; + hold = state->hold; + bits = state->bits; + lcode = state->lencode; + dcode = state->distcode; + lmask = (1U << state->lenbits) - 1; + dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + do { + if (bits < 15) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + here = lcode + (hold & lmask); + dolen: + op = (unsigned)(here->bits); + hold >>= op; + bits -= op; + op = (unsigned)(here->op); + if (op == 0) { /* literal */ + Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here->val)); + *out++ = (unsigned char)(here->val); + } + else if (op & 16) { /* length base */ + len = (unsigned)(here->val); + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + len += (unsigned)hold & ((1U << op) - 1); + hold >>= op; + bits -= op; + } + Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + here = dcode + (hold & dmask); + dodist: + op = (unsigned)(here->bits); + hold >>= op; + bits -= op; + op = (unsigned)(here->op); + if (op & 16) { /* distance base */ + dist = (unsigned)(here->val); + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + } + dist += (unsigned)hold & ((1U << op) - 1); +#ifdef INFLATE_STRICT + if (dist > dmax) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#endif + hold >>= op; + bits -= op; + Tracevv((stderr, "inflate: distance %u\n", dist)); + op = (unsigned)(out - beg); /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state->sane) { + strm->msg = + (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + if (len <= op - whave) { + do { + *out++ = 0; + } while (--len); + continue; + } + len -= op - whave; + do { + *out++ = 0; + } while (--op > whave); + if (op == 0) { + from = out - dist; + do { + *out++ = *from++; + } while (--len); + continue; + } +#endif + } + from = window; + if (wnext == 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = window; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + while (len > 2) { + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; + len -= 3; + } + if (len) { + *out++ = *from++; + if (len > 1) + *out++ = *from++; + } + } + else { + from = out - dist; /* copy direct from output */ + do { /* minimum length is three */ + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; + len -= 3; + } while (len > 2); + if (len) { + *out++ = *from++; + if (len > 1) + *out++ = *from++; + } + } + } + else if ((op & 64) == 0) { /* 2nd level distance code */ + here = dcode + here->val + (hold & ((1U << op) - 1)); + goto dodist; + } + else { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + } + else if ((op & 64) == 0) { /* 2nd level length code */ + here = lcode + here->val + (hold & ((1U << op) - 1)); + goto dolen; + } + else if (op & 32) { /* end-of-block */ + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + else { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + } while (in < last && out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + in -= len; + bits -= len << 3; + hold &= (1U << bits) - 1; + + /* update state and return */ + strm->next_in = in; + strm->next_out = out; + strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); + strm->avail_out = (unsigned)(out < end ? + 257 + (end - out) : 257 - (out - end)); + state->hold = hold; + state->bits = bits; + return; +} + +/* + inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): + - Using bit fields for code structure + - Different op definition to avoid & for extra bits (do & for table bits) + - Three separate decoding do-loops for direct, window, and wnext == 0 + - Special case for distance > 1 copies to do overlapped load and store copy + - Explicit branch predictions (based on measured branch probabilities) + - Deferring match copy and interspersed it with decoding subsequent codes + - Swapping literal/length else + - Swapping window/direct else + - Larger unrolled copy loops (three is about right) + - Moving len -= 3 statement into middle of loop + */ + +#endif /* !ASMINF */ diff --git a/thirdparty/freetype/src/gzip/inffast.h b/thirdparty/freetype/src/gzip/inffast.h new file mode 100644 index 0000000000..e5c1aa4ca8 --- /dev/null +++ b/thirdparty/freetype/src/gzip/inffast.h @@ -0,0 +1,11 @@ +/* inffast.h -- header to use inffast.c + * Copyright (C) 1995-2003, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/thirdparty/freetype/src/gzip/inffixed.h b/thirdparty/freetype/src/gzip/inffixed.h index 4d4760ea00..d628327769 100644 --- a/thirdparty/freetype/src/gzip/inffixed.h +++ b/thirdparty/freetype/src/gzip/inffixed.h @@ -1,151 +1,94 @@ -/* inffixed.h -- table for decoding fixed codes - * Generated automatically by the maketree.c program - */ + /* inffixed.h -- table for decoding fixed codes + * Generated automatically by makefixed(). + */ -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ + /* WARNING: this file should *not* be used by applications. + It is part of the implementation of this library and is + subject to change. Applications should only use zlib.h. + */ -local const uInt fixed_bl = 9; -local const uInt fixed_bd = 5; -local const inflate_huft fixed_tl[] = { - {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, - {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192}, - {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160}, - {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224}, - {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144}, - {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208}, - {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176}, - {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240}, - {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, - {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200}, - {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168}, - {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232}, - {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152}, - {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216}, - {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184}, - {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248}, - {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, - {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196}, - {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164}, - {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228}, - {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148}, - {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212}, - {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180}, - {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244}, - {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, - {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204}, - {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172}, - {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236}, - {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156}, - {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220}, - {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188}, - {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252}, - {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, - {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194}, - {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162}, - {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226}, - {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146}, - {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210}, - {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178}, - {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242}, - {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, - {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202}, - {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170}, - {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234}, - {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154}, - {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218}, - {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186}, - {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250}, - {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, - {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198}, - {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166}, - {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230}, - {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150}, - {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214}, - {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182}, - {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246}, - {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, - {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206}, - {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174}, - {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238}, - {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158}, - {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222}, - {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190}, - {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254}, - {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, - {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193}, - {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161}, - {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225}, - {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145}, - {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209}, - {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177}, - {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241}, - {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, - {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201}, - {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169}, - {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233}, - {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153}, - {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217}, - {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185}, - {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249}, - {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, - {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197}, - {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165}, - {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229}, - {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149}, - {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213}, - {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181}, - {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245}, - {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, - {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205}, - {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173}, - {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237}, - {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157}, - {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221}, - {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189}, - {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253}, - {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, - {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195}, - {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163}, - {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227}, - {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147}, - {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211}, - {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179}, - {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243}, - {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, - {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203}, - {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171}, - {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235}, - {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155}, - {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219}, - {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187}, - {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251}, - {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, - {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199}, - {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167}, - {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231}, - {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151}, - {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215}, - {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183}, - {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247}, - {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, - {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207}, - {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175}, - {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239}, - {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159}, - {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223}, - {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191}, - {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255} - }; -local const inflate_huft fixed_td[] = { - {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097}, - {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385}, - {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193}, - {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577}, - {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145}, - {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577}, - {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289}, - {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577} - }; + static const code lenfix[512] = { + {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, + {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, + {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, + {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, + {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, + {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, + {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, + {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, + {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, + {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, + {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, + {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, + {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, + {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, + {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, + {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, + {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, + {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, + {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, + {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, + {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, + {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, + {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, + {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, + {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, + {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, + {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, + {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, + {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, + {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, + {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, + {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, + {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, + {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, + {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, + {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, + {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, + {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, + {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, + {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, + {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, + {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, + {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, + {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, + {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, + {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, + {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, + {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, + {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, + {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, + {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, + {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, + {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, + {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, + {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, + {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, + {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, + {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, + {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, + {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, + {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, + {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, + {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, + {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, + {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, + {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, + {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, + {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, + {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, + {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, + {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, + {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, + {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, + {0,9,255} + }; + + static const code distfix[32] = { + {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, + {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, + {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, + {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, + {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, + {22,5,193},{64,5,0} + }; diff --git a/thirdparty/freetype/src/gzip/inflate.c b/thirdparty/freetype/src/gzip/inflate.c index 95e2653662..5bf5b815e5 100644 --- a/thirdparty/freetype/src/gzip/inflate.c +++ b/thirdparty/freetype/src/gzip/inflate.c @@ -1,283 +1,1610 @@ -/* inflate.c -- zlib interface to inflate modules - * Copyright (C) 1995-2002 Mark Adler +/* inflate.c -- zlib decompression + * Copyright (C) 1995-2022 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ +/* + * Change history: + * + * 1.2.beta0 24 Nov 2002 + * - First version -- complete rewrite of inflate to simplify code, avoid + * creation of window when not needed, minimize use of window when it is + * needed, make inffast.c even faster, implement gzip decoding, and to + * improve code readability and style over the previous zlib inflate code + * + * 1.2.beta1 25 Nov 2002 + * - Use pointers for available input and output checking in inffast.c + * - Remove input and output counters in inffast.c + * - Change inffast.c entry and loop from avail_in >= 7 to >= 6 + * - Remove unnecessary second byte pull from length extra in inffast.c + * - Unroll direct copy to three copies per loop in inffast.c + * + * 1.2.beta2 4 Dec 2002 + * - Change external routine names to reduce potential conflicts + * - Correct filename to inffixed.h for fixed tables in inflate.c + * - Make hbuf[] unsigned char to match parameter type in inflate.c + * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) + * to avoid negation problem on Alphas (64 bit) in inflate.c + * + * 1.2.beta3 22 Dec 2002 + * - Add comments on state->bits assertion in inffast.c + * - Add comments on op field in inftrees.h + * - Fix bug in reuse of allocated window after inflateReset() + * - Remove bit fields--back to byte structure for speed + * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths + * - Change post-increments to pre-increments in inflate_fast(), PPC biased? + * - Add compile time option, POSTINC, to use post-increments instead (Intel?) + * - Make MATCH copy in inflate() much faster for when inflate_fast() not used + * - Use local copies of stream next and avail values, as well as local bit + * buffer and bit count in inflate()--for speed when inflate_fast() not used + * + * 1.2.beta4 1 Jan 2003 + * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings + * - Move a comment on output buffer sizes from inffast.c to inflate.c + * - Add comments in inffast.c to introduce the inflate_fast() routine + * - Rearrange window copies in inflate_fast() for speed and simplification + * - Unroll last copy for window match in inflate_fast() + * - Use local copies of window variables in inflate_fast() for speed + * - Pull out common wnext == 0 case for speed in inflate_fast() + * - Make op and len in inflate_fast() unsigned for consistency + * - Add FAR to lcode and dcode declarations in inflate_fast() + * - Simplified bad distance check in inflate_fast() + * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new + * source file infback.c to provide a call-back interface to inflate for + * programs like gzip and unzip -- uses window as output buffer to avoid + * window copying + * + * 1.2.beta5 1 Jan 2003 + * - Improved inflateBack() interface to allow the caller to provide initial + * input in strm. + * - Fixed stored blocks bug in inflateBack() + * + * 1.2.beta6 4 Jan 2003 + * - Added comments in inffast.c on effectiveness of POSTINC + * - Typecasting all around to reduce compiler warnings + * - Changed loops from while (1) or do {} while (1) to for (;;), again to + * make compilers happy + * - Changed type of window in inflateBackInit() to unsigned char * + * + * 1.2.beta7 27 Jan 2003 + * - Changed many types to unsigned or unsigned short to avoid warnings + * - Added inflateCopy() function + * + * 1.2.0 9 Mar 2003 + * - Changed inflateBack() interface to provide separate opaque descriptors + * for the in() and out() functions + * - Changed inflateBack() argument and in_func typedef to swap the length + * and buffer address return values for the input function + * - Check next_in and next_out for Z_NULL on entry to inflate() + * + * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. + */ + #include "zutil.h" -#include "infblock.h" - -#define DONE INFLATE_DONE -#define BAD INFLATE_BAD - -typedef enum { - METHOD, /* waiting for method byte */ - FLAG, /* waiting for flag byte */ - DICT4, /* four dictionary check bytes to go */ - DICT3, /* three dictionary check bytes to go */ - DICT2, /* two dictionary check bytes to go */ - DICT1, /* one dictionary check byte to go */ - DICT0, /* waiting for inflateSetDictionary */ - BLOCKS, /* decompressing blocks */ - CHECK4, /* four check bytes to go */ - CHECK3, /* three check bytes to go */ - CHECK2, /* two check bytes to go */ - CHECK1, /* one check byte to go */ - DONE, /* finished check, done */ - BAD} /* got an error--stay here */ -inflate_mode; - -/* inflate private state */ -struct internal_state { - - /* mode */ - inflate_mode mode; /* current inflate mode */ - - /* mode dependent information */ - union { - uInt method; /* if FLAGS, method byte */ - struct { - uLong was; /* computed check value */ - uLong need; /* stream check value */ - } check; /* if CHECK, check values to compare */ - uInt marker; /* if BAD, inflateSync's marker bytes count */ - } sub; /* submode */ - - /* mode independent information */ - int nowrap; /* flag for no wrapper */ - uInt wbits; /* log2(window size) (8..15, defaults to 15) */ - inflate_blocks_statef - *blocks; /* current inflate_blocks state */ - -}; - - -ZEXPORT(int) inflateReset( /* z) */ -z_streamp z ) +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +#ifdef MAKEFIXED +# ifndef BUILDFIXED +# define BUILDFIXED +# endif +#endif + +/* function prototypes */ +local int inflateStateCheck OF((z_streamp strm)); +local void fixedtables OF((struct inflate_state FAR *state)); +local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, + unsigned copy)); +#ifdef BUILDFIXED + void makefixed OF((void)); +#endif +#ifndef Z_FREETYPE +local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, + unsigned len)); +#endif + +local int inflateStateCheck( + z_streamp strm) { - if (z == Z_NULL || z->state == Z_NULL) - return Z_STREAM_ERROR; - z->total_in = z->total_out = 0; - z->msg = Z_NULL; - z->state->mode = z->state->nowrap ? BLOCKS : METHOD; - inflate_blocks_reset(z->state->blocks, z, Z_NULL); - Tracev((stderr, "inflate: reset\n")); - return Z_OK; + struct inflate_state FAR *state; + if (strm == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) + return 1; + state = (struct inflate_state FAR *)strm->state; + if (state == Z_NULL || state->strm != strm || + state->mode < HEAD || state->mode > SYNC) + return 1; + return 0; } +int ZEXPORT inflateResetKeep( + z_streamp strm) +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + strm->total_in = strm->total_out = state->total = 0; + strm->msg = Z_NULL; + if (state->wrap) /* to support ill-conceived Java test suite */ + strm->adler = state->wrap & 1; + state->mode = HEAD; + state->last = 0; + state->havedict = 0; + state->flags = -1; + state->dmax = 32768U; + state->head = Z_NULL; + state->hold = 0; + state->bits = 0; + state->lencode = state->distcode = state->next = state->codes; + state->sane = 1; + state->back = -1; + Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} -ZEXPORT(int) inflateEnd( /* z) */ -z_streamp z ) +int ZEXPORT inflateReset( + z_streamp strm) { - if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) - return Z_STREAM_ERROR; - if (z->state->blocks != Z_NULL) - inflate_blocks_free(z->state->blocks, z); - ZFREE(z, z->state); - z->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + state->wsize = 0; + state->whave = 0; + state->wnext = 0; + return inflateResetKeep(strm); } +int ZEXPORT inflateReset2( + z_streamp strm, + int windowBits) +{ + int wrap; + struct inflate_state FAR *state; + + /* get the state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 5; +#ifdef GUNZIP + if (windowBits < 48) + windowBits &= 15; +#endif + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) + return Z_STREAM_ERROR; + if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { + ZFREE(strm, state->window); + state->window = Z_NULL; + } + + /* update state and reset the rest of it */ + state->wrap = wrap; + state->wbits = (unsigned)windowBits; + return inflateReset(strm); +} -ZEXPORT(int) inflateInit2_( /* z, w, version, stream_size) */ -z_streamp z, -int w, -const char *version, -int stream_size ) +int ZEXPORT inflateInit2_( + z_streamp strm, + int windowBits, + const char *version, + int stream_size) { - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != sizeof(z_stream)) - return Z_VERSION_ERROR; - - /* initialize state */ - if (z == Z_NULL) - return Z_STREAM_ERROR; - z->msg = Z_NULL; - if (z->zalloc == Z_NULL) - { - z->zalloc = zcalloc; - z->opaque = (voidpf)0; - } - if (z->zfree == Z_NULL) z->zfree = zcfree; - if ((z->state = (struct internal_state FAR *) - ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL) - return Z_MEM_ERROR; - z->state->blocks = Z_NULL; - - /* handle undocumented nowrap option (no zlib header or check) */ - z->state->nowrap = 0; - if (w < 0) - { - w = - w; - z->state->nowrap = 1; - } - - /* set window size */ - if (w < 8 || w > 15) - { - inflateEnd(z); - return Z_STREAM_ERROR; - } - z->state->wbits = (uInt)w; - - /* create inflate_blocks state */ - if ((z->state->blocks = - inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w)) - == Z_NULL) - { - inflateEnd(z); - return Z_MEM_ERROR; - } - Tracev((stderr, "inflate: allocated\n")); - - /* reset state */ - inflateReset(z); - return Z_OK; + int ret; + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL) return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; +#endif + } + if (strm->zfree == (free_func)0) +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zfree = zcfree; +#endif + state = (struct inflate_state FAR *) + ZALLOC(strm, 1, sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (struct internal_state FAR *)state; + state->strm = strm; + state->window = Z_NULL; + state->mode = HEAD; /* to pass state test in inflateReset2() */ + ret = inflateReset2(strm, windowBits); + if (ret != Z_OK) { + ZFREE(strm, state); + strm->state = Z_NULL; + } + return ret; } +int ZEXPORT inflateInit_( + z_streamp strm, + const char *version, + int stream_size) +{ + return inflateInit2_(strm, DEF_WBITS, version, stream_size); +} +#ifndef Z_FREETYPE -#undef NEEDBYTE -#define NEEDBYTE {if(z->avail_in==0)return r;r=f;} +int ZEXPORT inflatePrime( + z_streamp strm, + int bits, + int value) +{ + struct inflate_state FAR *state; -#undef NEXTBYTE -#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (bits < 0) { + state->hold = 0; + state->bits = 0; + return Z_OK; + } + if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR; + value &= (1L << bits) - 1; + state->hold += (unsigned)value << state->bits; + state->bits += (uInt)bits; + return Z_OK; +} +#endif /* !Z_FREETYPE */ -ZEXPORT(int) inflate( /* z, f) */ -z_streamp z, -int f ) +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +local void fixedtables( + struct inflate_state FAR *state) { - int r; - uInt b; - - if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL) - return Z_STREAM_ERROR; - f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; - r = Z_BUF_ERROR; - while (1) switch (z->state->mode) - { - case METHOD: - NEEDBYTE - if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED) - { - z->state->mode = BAD; - z->msg = (char*)"unknown compression method"; - z->state->sub.marker = 5; /* can't try inflateSync */ - break; - } - if ((z->state->sub.method >> 4) + 8 > z->state->wbits) - { - z->state->mode = BAD; - z->msg = (char*)"invalid window size"; - z->state->sub.marker = 5; /* can't try inflateSync */ - break; - } - z->state->mode = FLAG; - /* fall through */ - case FLAG: - NEEDBYTE - b = NEXTBYTE; - if (((z->state->sub.method << 8) + b) % 31) - { - z->state->mode = BAD; - z->msg = (char*)"incorrect header check"; - z->state->sub.marker = 5; /* can't try inflateSync */ - break; - } - Tracev((stderr, "inflate: zlib header ok\n")); - if (!(b & PRESET_DICT)) - { - z->state->mode = BLOCKS; - break; - } - z->state->mode = DICT4; - /* fall through */ - case DICT4: - NEEDBYTE - z->state->sub.check.need = (uLong)NEXTBYTE << 24; - z->state->mode = DICT3; - /* fall through */ - case DICT3: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE << 16; - z->state->mode = DICT2; - /* fall through */ - case DICT2: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE << 8; - z->state->mode = DICT1; - /* fall through */ - case DICT1: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE; - z->adler = z->state->sub.check.need; - z->state->mode = DICT0; - return Z_NEED_DICT; - case DICT0: - z->state->mode = BAD; - z->msg = (char*)"need dictionary"; - z->state->sub.marker = 0; /* can try inflateSync */ - return Z_STREAM_ERROR; - case BLOCKS: - r = inflate_blocks(z->state->blocks, z, r); - if (r == Z_DATA_ERROR) - { - z->state->mode = BAD; - z->state->sub.marker = 0; /* can try inflateSync */ - break; - } - if (r == Z_OK) - r = f; - if (r != Z_STREAM_END) - return r; - r = f; - inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was); - if (z->state->nowrap) - { - z->state->mode = DONE; - break; - } - z->state->mode = CHECK4; - /* fall through */ - case CHECK4: - NEEDBYTE - z->state->sub.check.need = (uLong)NEXTBYTE << 24; - z->state->mode = CHECK3; - /* fall through */ - case CHECK3: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE << 16; - z->state->mode = CHECK2; - /* fall through */ - case CHECK2: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE << 8; - z->state->mode = CHECK1; - /* fall through */ - case CHECK1: - NEEDBYTE - z->state->sub.check.need += (uLong)NEXTBYTE; - - if (z->state->sub.check.was != z->state->sub.check.need) - { - z->state->mode = BAD; - z->msg = (char*)"incorrect data check"; - z->state->sub.marker = 5; /* can't try inflateSync */ +#ifdef BUILDFIXED + static int virgin = 1; + static code *lenfix, *distfix; + static code fixed[544]; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + unsigned sym, bits; + static code *next; + + /* literal/length table */ + sym = 0; + while (sym < 144) state->lens[sym++] = 8; + while (sym < 256) state->lens[sym++] = 9; + while (sym < 280) state->lens[sym++] = 7; + while (sym < 288) state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); + + /* distance table */ + sym = 0; + while (sym < 32) state->lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); + + /* do this just once */ + virgin = 0; + } +#else /* !BUILDFIXED */ +# include "inffixed.h" +#endif /* BUILDFIXED */ + state->lencode = lenfix; + state->lenbits = 9; + state->distcode = distfix; + state->distbits = 5; +} + +#ifdef MAKEFIXED +#include <stdio.h> + +/* + Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also + defines BUILDFIXED, so the tables are built on the fly. makefixed() writes + those tables to stdout, which would be piped to inffixed.h. A small program + can simply call makefixed to do this: + + void makefixed(void); + + int main(void) + { + makefixed(); + return 0; + } + + Then that can be linked with zlib built with MAKEFIXED defined and run: + + a.out > inffixed.h + */ +void makefixed() +{ + unsigned low, size; + struct inflate_state state; + + fixedtables(&state); + puts(" /* inffixed.h -- table for decoding fixed codes"); + puts(" * Generated automatically by makefixed()."); + puts(" */"); + puts(""); + puts(" /* WARNING: this file should *not* be used by applications."); + puts(" It is part of the implementation of this library and is"); + puts(" subject to change. Applications should only use zlib.h."); + puts(" */"); + puts(""); + size = 1U << 9; + printf(" static const code lenfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 7) == 0) printf("\n "); + printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op, + state.lencode[low].bits, state.lencode[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); + size = 1U << 5; + printf("\n static const code distfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 6) == 0) printf("\n "); + printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, + state.distcode[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); +} +#endif /* MAKEFIXED */ + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +local int updatewindow( + z_streamp strm, + const Bytef *end, + unsigned copy) +{ + struct inflate_state FAR *state; + unsigned dist; + + state = (struct inflate_state FAR *)strm->state; + + /* if it hasn't been done already, allocate space for the window */ + if (state->window == Z_NULL) { + state->window = (unsigned char FAR *) + ZALLOC(strm, 1U << state->wbits, + sizeof(unsigned char)); + if (state->window == Z_NULL) return 1; + } + + /* if window not in use yet, initialize */ + if (state->wsize == 0) { + state->wsize = 1U << state->wbits; + state->wnext = 0; + state->whave = 0; + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state->wsize) { + zmemcpy(state->window, end - state->wsize, state->wsize); + state->wnext = 0; + state->whave = state->wsize; + } + else { + dist = state->wsize - state->wnext; + if (dist > copy) dist = copy; + zmemcpy(state->window + state->wnext, end - copy, dist); + copy -= dist; + if (copy) { + zmemcpy(state->window, end - copy, copy); + state->wnext = copy; + state->whave = state->wsize; + } + else { + state->wnext += dist; + if (state->wnext == state->wsize) state->wnext = 0; + if (state->whave < state->wsize) state->whave += dist; + } + } + return 0; +} + +/* Macros for inflate(): */ + +/* check function to use adler32() for zlib or crc32() for gzip */ +#ifdef GUNZIP +# define UPDATE_CHECK(check, buf, len) \ + (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) +#else +# define UPDATE_CHECK(check, buf, len) adler32(check, buf, len) +#endif + +/* check macros for header crc */ +#ifdef GUNZIP +# define CRC2(check, word) \ + do { \ + hbuf[0] = (unsigned char)(word); \ + hbuf[1] = (unsigned char)((word) >> 8); \ + check = crc32(check, hbuf, 2); \ + } while (0) + +# define CRC4(check, word) \ + do { \ + hbuf[0] = (unsigned char)(word); \ + hbuf[1] = (unsigned char)((word) >> 8); \ + hbuf[2] = (unsigned char)((word) >> 16); \ + hbuf[3] = (unsigned char)((word) >> 24); \ + check = crc32(check, hbuf, 4); \ + } while (0) +#endif + +/* Load registers with state in inflate() for speed */ +#define LOAD() \ + do { \ + put = strm->next_out; \ + left = strm->avail_out; \ + next = strm->next_in; \ + have = strm->avail_in; \ + hold = state->hold; \ + bits = state->bits; \ + } while (0) + +/* Restore state from registers in inflate() */ +#define RESTORE() \ + do { \ + strm->next_out = put; \ + strm->avail_out = left; \ + strm->next_in = next; \ + strm->avail_in = have; \ + state->hold = hold; \ + state->bits = bits; \ + } while (0) + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflate() + if there is no input available. */ +#define PULLBYTE() \ + do { \ + if (have == 0) goto inf_leave; \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflate(). */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n < 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* + inflate() uses a state machine to process as much input data and generate as + much output data as possible before returning. The state machine is + structured roughly as follows: + + for (;;) switch (state) { + ... + case STATEn: + if (not enough input data or output space to make progress) + return; + ... make progress ... + state = STATEm; break; - } - Tracev((stderr, "inflate: zlib check ok\n")); - z->state->mode = DONE; - /* fall through */ - case DONE: - return Z_STREAM_END; - case BAD: - return Z_DATA_ERROR; - default: - return Z_STREAM_ERROR; - } -#ifdef NEED_DUMMY_RETURN - return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ + ... + } + + so when inflate() is called again, the same case is attempted again, and + if the appropriate resources are provided, the machine proceeds to the + next state. The NEEDBITS() macro is usually the way the state evaluates + whether it can proceed or should return. NEEDBITS() does the return if + the requested bits are not available. The typical use of the BITS macros + is: + + NEEDBITS(n); + ... do something with BITS(n) ... + DROPBITS(n); + + where NEEDBITS(n) either returns from inflate() if there isn't enough + input left to load n bits into the accumulator, or it continues. BITS(n) + gives the low n bits in the accumulator. When done, DROPBITS(n) drops + the low n bits off the accumulator. INITBITS() clears the accumulator + and sets the number of available bits to zero. BYTEBITS() discards just + enough bits to put the accumulator on a byte boundary. After BYTEBITS() + and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. + + NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return + if there is no input available. The decoding of variable length codes uses + PULLBYTE() directly in order to pull just enough bytes to decode the next + code, and no more. + + Some states loop until they get enough input, making sure that enough + state information is maintained to continue the loop where it left off + if NEEDBITS() returns in the loop. For example, want, need, and keep + would all have to actually be part of the saved state in case NEEDBITS() + returns: + + case STATEw: + while (want < need) { + NEEDBITS(n); + keep[want++] = BITS(n); + DROPBITS(n); + } + state = STATEx; + case STATEx: + + As shown above, if the next state is also the next case, then the break + is omitted. + + A state may also return if there is not enough output space available to + complete that state. Those states are copying stored data, writing a + literal byte, and copying a matching string. + + When returning, a "goto inf_leave" is used to update the total counters, + update the check value, and determine whether any progress has been made + during that inflate() call in order to return the proper return code. + Progress is defined as a change in either strm->avail_in or strm->avail_out. + When there is a window, goto inf_leave will update the window with the last + output written. If a goto inf_leave occurs in the middle of decompression + and there is no window currently, goto inf_leave will create one and copy + output to the window for the next call of inflate(). + + In this implementation, the flush parameter of inflate() only affects the + return code (per zlib.h). inflate() always writes as much as possible to + strm->next_out, given the space available and the provided input--the effect + documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers + the allocation of and copying into a sliding window until necessary, which + provides the effect documented in zlib.h for Z_FINISH when the entire input + stream available. So the only thing the flush parameter actually does is: + when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it + will return Z_BUF_ERROR if it has not reached the end of the stream. + */ + +int ZEXPORT inflate( + z_streamp strm, + int flush) +{ + struct inflate_state FAR *state; + z_const unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have, left; /* available input and output */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned in, out; /* save starting available input and output */ + unsigned copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code here; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ +#ifdef GUNZIP + unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ #endif + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + if (inflateStateCheck(strm) || strm->next_out == Z_NULL || + (strm->next_in == Z_NULL && strm->avail_in != 0)) + return Z_STREAM_ERROR; + + state = (struct inflate_state FAR *)strm->state; + if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ + LOAD(); + in = have; + out = left; + ret = Z_OK; + for (;;) + switch (state->mode) { + case HEAD: + if (state->wrap == 0) { + state->mode = TYPEDO; + break; + } + NEEDBITS(16); +#ifdef GUNZIP + if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ + if (state->wbits == 0) + state->wbits = 15; + state->check = crc32(0L, Z_NULL, 0); + CRC2(state->check, hold); + INITBITS(); + state->mode = FLAGS; + break; + } + if (state->head != Z_NULL) + state->head->done = -1; + if (!(state->wrap & 1) || /* check if zlib header allowed */ +#else + if ( +#endif + ((BITS(8) << 8) + (hold >> 8)) % 31) { + strm->msg = (char *)"incorrect header check"; + state->mode = BAD; + break; + } + if (BITS(4) != Z_DEFLATED) { + strm->msg = (char *)"unknown compression method"; + state->mode = BAD; + break; + } + DROPBITS(4); + len = BITS(4) + 8; + if (state->wbits == 0) + state->wbits = len; + if (len > 15 || len > state->wbits) { + strm->msg = (char *)"invalid window size"; + state->mode = BAD; + break; + } + state->dmax = 1U << len; + state->flags = 0; /* indicate zlib header */ + Tracev((stderr, "inflate: zlib header ok\n")); + strm->adler = state->check = adler32(0L, Z_NULL, 0); + state->mode = hold & 0x200 ? DICTID : TYPE; + INITBITS(); + break; +#ifdef GUNZIP + case FLAGS: + NEEDBITS(16); + state->flags = (int)(hold); + if ((state->flags & 0xff) != Z_DEFLATED) { + strm->msg = (char *)"unknown compression method"; + state->mode = BAD; + break; + } + if (state->flags & 0xe000) { + strm->msg = (char *)"unknown header flags set"; + state->mode = BAD; + break; + } + if (state->head != Z_NULL) + state->head->text = (int)((hold >> 8) & 1); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + state->mode = TIME; + /* fallthrough */ + case TIME: + NEEDBITS(32); + if (state->head != Z_NULL) + state->head->time = hold; + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC4(state->check, hold); + INITBITS(); + state->mode = OS; + /* fallthrough */ + case OS: + NEEDBITS(16); + if (state->head != Z_NULL) { + state->head->xflags = (int)(hold & 0xff); + state->head->os = (int)(hold >> 8); + } + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + state->mode = EXLEN; + /* fallthrough */ + case EXLEN: + if (state->flags & 0x0400) { + NEEDBITS(16); + state->length = (unsigned)(hold); + if (state->head != Z_NULL) + state->head->extra_len = (unsigned)hold; + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + } + else if (state->head != Z_NULL) + state->head->extra = Z_NULL; + state->mode = EXTRA; + /* fallthrough */ + case EXTRA: + if (state->flags & 0x0400) { + copy = state->length; + if (copy > have) copy = have; + if (copy) { + if (state->head != Z_NULL && + state->head->extra != Z_NULL) { + len = state->head->extra_len - state->length; + zmemcpy(state->head->extra + len, next, + len + copy > state->head->extra_max ? + state->head->extra_max - len : copy); + } + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + state->length -= copy; + } + if (state->length) goto inf_leave; + } + state->length = 0; + state->mode = NAME; + /* fallthrough */ + case NAME: + if (state->flags & 0x0800) { + if (have == 0) goto inf_leave; + copy = 0; + do { + len = (unsigned)(next[copy++]); + if (state->head != Z_NULL && + state->head->name != Z_NULL && + state->length < state->head->name_max) + state->head->name[state->length++] = (Bytef)len; + } while (len && copy < have); + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + if (len) goto inf_leave; + } + else if (state->head != Z_NULL) + state->head->name = Z_NULL; + state->length = 0; + state->mode = COMMENT; + /* fallthrough */ + case COMMENT: + if (state->flags & 0x1000) { + if (have == 0) goto inf_leave; + copy = 0; + do { + len = (unsigned)(next[copy++]); + if (state->head != Z_NULL && + state->head->comment != Z_NULL && + state->length < state->head->comm_max) + state->head->comment[state->length++] = (Bytef)len; + } while (len && copy < have); + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + if (len) goto inf_leave; + } + else if (state->head != Z_NULL) + state->head->comment = Z_NULL; + state->mode = HCRC; + /* fallthrough */ + case HCRC: + if (state->flags & 0x0200) { + NEEDBITS(16); + if ((state->wrap & 4) && hold != (state->check & 0xffff)) { + strm->msg = (char *)"header crc mismatch"; + state->mode = BAD; + break; + } + INITBITS(); + } + if (state->head != Z_NULL) { + state->head->hcrc = (int)((state->flags >> 9) & 1); + state->head->done = 1; + } + strm->adler = state->check = crc32(0L, Z_NULL, 0); + state->mode = TYPE; + break; +#endif + case DICTID: + NEEDBITS(32); + strm->adler = state->check = ZSWAP32(hold); + INITBITS(); + state->mode = DICT; + /* fallthrough */ + case DICT: + if (state->havedict == 0) { + RESTORE(); + return Z_NEED_DICT; + } + strm->adler = state->check = adler32(0L, Z_NULL, 0); + state->mode = TYPE; + /* fallthrough */ + case TYPE: + if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; + /* fallthrough */ + case TYPEDO: + if (state->last) { + BYTEBITS(); + state->mode = CHECK; + break; + } + NEEDBITS(3); + state->last = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + state->last ? " (last)" : "")); + state->mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + Tracev((stderr, "inflate: fixed codes block%s\n", + state->last ? " (last)" : "")); + state->mode = LEN_; /* decode codes */ + if (flush == Z_TREES) { + DROPBITS(2); + goto inf_leave; + } + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + state->last ? " (last)" : "")); + state->mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + state->mode = BAD; + } + DROPBITS(2); + break; + case STORED: + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + state->mode = BAD; + break; + } + state->length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %u\n", + state->length)); + INITBITS(); + state->mode = COPY_; + if (flush == Z_TREES) goto inf_leave; + /* fallthrough */ + case COPY_: + state->mode = COPY; + /* fallthrough */ + case COPY: + copy = state->length; + if (copy) { + if (copy > have) copy = have; + if (copy > left) copy = left; + if (copy == 0) goto inf_leave; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + state->length -= copy; + break; + } + Tracev((stderr, "inflate: stored end\n")); + state->mode = TYPE; + break; + case TABLE: + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); +#ifndef PKZIP_BUG_WORKAROUND + if (state->nlen > 286 || state->ndist > 30) { + strm->msg = (char *)"too many length or distance symbols"; + state->mode = BAD; + break; + } +#endif + Tracev((stderr, "inflate: table sizes ok\n")); + state->have = 0; + state->mode = LENLENS; + /* fallthrough */ + case LENLENS: + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + state->lencode = (const code FAR *)(state->next); + state->lenbits = 7; + ret = inflate_table(CODES, state->lens, 19, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + state->have = 0; + state->mode = CODELENS; + /* fallthrough */ + case CODELENS: + while (state->have < state->nlen + state->ndist) { + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.val < 16) { + DROPBITS(here.bits); + state->lens[state->have++] = here.val; + } + else { + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + len = state->lens[state->have - 1]; + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (state->mode == BAD) break; + + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state->next = state->codes; + state->lencode = (const code FAR *)(state->next); + state->lenbits = 9; + ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + state->mode = BAD; + break; + } + state->distcode = (const code FAR *)(state->next); + state->distbits = 6; + ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, + &(state->next), &(state->distbits), state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN_; + if (flush == Z_TREES) goto inf_leave; + /* fallthrough */ + case LEN_: + state->mode = LEN; + /* fallthrough */ + case LEN: + if (have >= 6 && left >= 258) { + RESTORE(); + inflate_fast(strm, out); + LOAD(); + if (state->mode == TYPE) + state->back = -1; + break; + } + state->back = 0; + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.op && (here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + state->back += last.bits; + } + DROPBITS(here.bits); + state->back += here.bits; + state->length = (unsigned)here.val; + if ((int)(here.op) == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here.val)); + state->mode = LIT; + break; + } + if (here.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + state->back = -1; + state->mode = TYPE; + break; + } + if (here.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + state->extra = (unsigned)(here.op) & 15; + state->mode = LENEXT; + /* fallthrough */ + case LENEXT: + if (state->extra) { + NEEDBITS(state->extra); + state->length += BITS(state->extra); + DROPBITS(state->extra); + state->back += state->extra; + } + Tracevv((stderr, "inflate: length %u\n", state->length)); + state->was = state->length; + state->mode = DIST; + /* fallthrough */ + case DIST: + for (;;) { + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if ((here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + state->back += last.bits; + } + DROPBITS(here.bits); + state->back += here.bits; + if (here.op & 64) { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + state->offset = (unsigned)here.val; + state->extra = (unsigned)(here.op) & 15; + state->mode = DISTEXT; + /* fallthrough */ + case DISTEXT: + if (state->extra) { + NEEDBITS(state->extra); + state->offset += BITS(state->extra); + DROPBITS(state->extra); + state->back += state->extra; + } +#ifdef INFLATE_STRICT + if (state->offset > state->dmax) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#endif + Tracevv((stderr, "inflate: distance %u\n", state->offset)); + state->mode = MATCH; + /* fallthrough */ + case MATCH: + if (left == 0) goto inf_leave; + copy = out - left; + if (state->offset > copy) { /* copy from window */ + copy = state->offset - copy; + if (copy > state->whave) { + if (state->sane) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + Trace((stderr, "inflate.c too far\n")); + copy -= state->whave; + if (copy > state->length) copy = state->length; + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = 0; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; +#endif + } + if (copy > state->wnext) { + copy -= state->wnext; + from = state->window + (state->wsize - copy); + } + else + from = state->window + (state->wnext - copy); + if (copy > state->length) copy = state->length; + } + else { /* copy from output */ + from = put - state->offset; + copy = state->length; + } + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = *from++; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; + case LIT: + if (left == 0) goto inf_leave; + *put++ = (unsigned char)(state->length); + left--; + state->mode = LEN; + break; + case CHECK: + if (state->wrap) { + NEEDBITS(32); + out -= left; + strm->total_out += out; + state->total += out; + if ((state->wrap & 4) && out) + strm->adler = state->check = + UPDATE_CHECK(state->check, put - out, out); + out = left; + if ((state->wrap & 4) && ( +#ifdef GUNZIP + state->flags ? hold : +#endif + ZSWAP32(hold)) != state->check) { + strm->msg = (char *)"incorrect data check"; + state->mode = BAD; + break; + } + INITBITS(); + Tracev((stderr, "inflate: check matches trailer\n")); + } +#ifdef GUNZIP + state->mode = LENGTH; + /* fallthrough */ + case LENGTH: + if (state->wrap && state->flags) { + NEEDBITS(32); + if ((state->wrap & 4) && hold != (state->total & 0xffffffff)) { + strm->msg = (char *)"incorrect length check"; + state->mode = BAD; + break; + } + INITBITS(); + Tracev((stderr, "inflate: length matches trailer\n")); + } +#endif + state->mode = DONE; + /* fallthrough */ + case DONE: + ret = Z_STREAM_END; + goto inf_leave; + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* fallthrough */ + default: + return Z_STREAM_ERROR; + } + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + inf_leave: + RESTORE(); + if (state->wsize || (out != strm->avail_out && state->mode < BAD && + (state->mode < CHECK || flush != Z_FINISH))) + if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { + state->mode = MEM; + return Z_MEM_ERROR; + } + in -= strm->avail_in; + out -= strm->avail_out; + strm->total_in += in; + strm->total_out += out; + state->total += out; + if ((state->wrap & 4) && out) + strm->adler = state->check = + UPDATE_CHECK(state->check, strm->next_out - out, out); + strm->data_type = (int)state->bits + (state->last ? 64 : 0) + + (state->mode == TYPE ? 128 : 0) + + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); + if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) + ret = Z_BUF_ERROR; + return ret; +} + +int ZEXPORT inflateEnd( + z_streamp strm) +{ + struct inflate_state FAR *state; + if (inflateStateCheck(strm)) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (state->window != Z_NULL) ZFREE(strm, state->window); + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} + +#ifndef Z_FREETYPE + +int ZEXPORT inflateGetDictionary( + z_streamp strm, + Bytef *dictionary, + uInt *dictLength) +{ + struct inflate_state FAR *state; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* copy dictionary */ + if (state->whave && dictionary != Z_NULL) { + zmemcpy(dictionary, state->window + state->wnext, + state->whave - state->wnext); + zmemcpy(dictionary + state->whave - state->wnext, + state->window, state->wnext); + } + if (dictLength != Z_NULL) + *dictLength = state->whave; + return Z_OK; +} + +int ZEXPORT inflateSetDictionary( + z_streamp strm, + const Bytef *dictionary, + uInt dictLength) +{ + struct inflate_state FAR *state; + unsigned long dictid; + int ret; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (state->wrap != 0 && state->mode != DICT) + return Z_STREAM_ERROR; + + /* check for correct dictionary identifier */ + if (state->mode == DICT) { + dictid = adler32(0L, Z_NULL, 0); + dictid = adler32(dictid, dictionary, dictLength); + if (dictid != state->check) + return Z_DATA_ERROR; + } + + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary + dictLength, dictLength); + if (ret) { + state->mode = MEM; + return Z_MEM_ERROR; + } + state->havedict = 1; + Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +int ZEXPORT inflateGetHeader( + z_streamp strm, + gz_headerp head) +{ + struct inflate_state FAR *state; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; + + /* save header structure */ + state->head = head; + head->done = 0; + return Z_OK; +} + +/* + Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found + or when out of input. When called, *have is the number of pattern bytes + found in order so far, in 0..3. On return *have is updated to the new + state. If on return *have equals four, then the pattern was found and the + return value is how many bytes were read including the last byte of the + pattern. If *have is less than four, then the pattern has not been found + yet and the return value is len. In the latter case, syncsearch() can be + called again with more data and the *have state. *have is initialized to + zero for the first call. + */ +local unsigned syncsearch( + unsigned FAR *have, + const unsigned char FAR *buf, + unsigned len) +{ + unsigned got; + unsigned next; + + got = *have; + next = 0; + while (next < len && got < 4) { + if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) + got++; + else if (buf[next]) + got = 0; + else + got = 4 - got; + next++; + } + *have = got; + return next; +} + +int ZEXPORT inflateSync( + z_streamp strm) +{ + unsigned len; /* number of bytes to look at or looked at */ + int flags; /* temporary to save header status */ + unsigned long in, out; /* temporary to save total_in and total_out */ + unsigned char buf[4]; /* to restore bit buffer to byte string */ + struct inflate_state FAR *state; + + /* check parameters */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; + + /* if first time, start search in bit buffer */ + if (state->mode != SYNC) { + state->mode = SYNC; + state->hold <<= state->bits & 7; + state->bits -= state->bits & 7; + len = 0; + while (state->bits >= 8) { + buf[len++] = (unsigned char)(state->hold); + state->hold >>= 8; + state->bits -= 8; + } + state->have = 0; + syncsearch(&(state->have), buf, len); + } + + /* search available input */ + len = syncsearch(&(state->have), strm->next_in, strm->avail_in); + strm->avail_in -= len; + strm->next_in += len; + strm->total_in += len; + + /* return no joy or set up to restart inflate() on a new block */ + if (state->have != 4) return Z_DATA_ERROR; + if (state->flags == -1) + state->wrap = 0; /* if no header yet, treat as raw */ + else + state->wrap &= ~4; /* no point in computing a check value now */ + flags = state->flags; + in = strm->total_in; out = strm->total_out; + inflateReset(strm); + strm->total_in = in; strm->total_out = out; + state->flags = flags; + state->mode = TYPE; + return Z_OK; +} + +#endif /* !Z_FREETYPE */ + +/* + Returns true if inflate is currently at the end of a block generated by + Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + implementation to provide an additional safety check. PPP uses + Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored + block. When decompressing, PPP checks that at the end of input packet, + inflate is waiting for these length bytes. + */ +int ZEXPORT inflateSyncPoint( + z_streamp strm) +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + return state->mode == STORED && state->bits == 0; +} + +#ifndef Z_FREETYPE + +int ZEXPORT inflateCopy( + z_streamp dest, + z_streamp source) +{ + struct inflate_state FAR *state; + struct inflate_state FAR *copy; + unsigned char FAR *window; + unsigned wsize; + + /* check input */ + if (inflateStateCheck(source) || dest == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)source->state; + + /* allocate space */ + copy = (struct inflate_state FAR *) + ZALLOC(source, 1, sizeof(struct inflate_state)); + if (copy == Z_NULL) return Z_MEM_ERROR; + window = Z_NULL; + if (state->window != Z_NULL) { + window = (unsigned char FAR *) + ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); + if (window == Z_NULL) { + ZFREE(source, copy); + return Z_MEM_ERROR; + } + } + + /* copy state */ + zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); + zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); + copy->strm = dest; + if (state->lencode >= state->codes && + state->lencode <= state->codes + ENOUGH - 1) { + copy->lencode = copy->codes + (state->lencode - state->codes); + copy->distcode = copy->codes + (state->distcode - state->codes); + } + copy->next = copy->codes + (state->next - state->codes); + if (window != Z_NULL) { + wsize = 1U << state->wbits; + zmemcpy(window, state->window, wsize); + } + copy->window = window; + dest->state = (struct internal_state FAR *)copy; + return Z_OK; +} + +#endif /* !Z_FREETYPE */ + +int ZEXPORT inflateUndermine( + z_streamp strm, + int subvert) +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + state->sane = !subvert; + return Z_OK; +#else + (void)subvert; + state->sane = 1; + return Z_DATA_ERROR; +#endif +} + +int ZEXPORT inflateValidate( + z_streamp strm, + int check) +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (check && state->wrap) + state->wrap |= 4; + else + state->wrap &= ~4; + return Z_OK; +} + +#ifndef Z_FREETYPE + +long ZEXPORT inflateMark( + z_streamp strm) +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) + return -(1L << 16); + state = (struct inflate_state FAR *)strm->state; + return (long)(((unsigned long)((long)state->back)) << 16) + + (state->mode == COPY ? state->length : + (state->mode == MATCH ? state->was - state->length : 0)); +} + +unsigned long ZEXPORT inflateCodesUsed( + z_streamp strm) +{ + struct inflate_state FAR *state; + if (inflateStateCheck(strm)) return (unsigned long)-1; + state = (struct inflate_state FAR *)strm->state; + return (unsigned long)(state->next - state->codes); } +#endif /* !Z_FREETYPE */ diff --git a/thirdparty/freetype/src/gzip/inflate.h b/thirdparty/freetype/src/gzip/inflate.h new file mode 100644 index 0000000000..c6f5a52e16 --- /dev/null +++ b/thirdparty/freetype/src/gzip/inflate.h @@ -0,0 +1,131 @@ +/* inflate.h -- internal inflate state definition + * Copyright (C) 1995-2019 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#ifndef INFLATE_H +#define INFLATE_H + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* define NO_GZIP when compiling if you want to disable gzip header and + trailer decoding by inflate(). NO_GZIP would be used to avoid linking in + the crc code when it is not needed. For shared libraries, gzip decoding + should be left enabled. */ +#ifndef NO_GZIP +# define GUNZIP +#endif + +/* Possible inflate modes between inflate() calls */ +typedef enum { + HEAD = 16180, /* i: waiting for magic header */ + FLAGS, /* i: waiting for method and flags (gzip) */ + TIME, /* i: waiting for modification time (gzip) */ + OS, /* i: waiting for extra flags and operating system (gzip) */ + EXLEN, /* i: waiting for extra length (gzip) */ + EXTRA, /* i: waiting for extra bytes (gzip) */ + NAME, /* i: waiting for end of file name (gzip) */ + COMMENT, /* i: waiting for end of comment (gzip) */ + HCRC, /* i: waiting for header crc (gzip) */ + DICTID, /* i: waiting for dictionary check value */ + DICT, /* waiting for inflateSetDictionary() call */ + TYPE, /* i: waiting for type bits, including last-flag bit */ + TYPEDO, /* i: same, but skip check to exit inflate on new block */ + STORED, /* i: waiting for stored size (length and complement) */ + COPY_, /* i/o: same as COPY below, but only first time in */ + COPY, /* i/o: waiting for input or output to copy stored block */ + TABLE, /* i: waiting for dynamic block table lengths */ + LENLENS, /* i: waiting for code length code lengths */ + CODELENS, /* i: waiting for length/lit and distance code lengths */ + LEN_, /* i: same as LEN below, but only first time in */ + LEN, /* i: waiting for length/lit/eob code */ + LENEXT, /* i: waiting for length extra bits */ + DIST, /* i: waiting for distance code */ + DISTEXT, /* i: waiting for distance extra bits */ + MATCH, /* o: waiting for output space to copy string */ + LIT, /* o: waiting for output space to write literal */ + CHECK, /* i: waiting for 32-bit check value */ + LENGTH, /* i: waiting for 32-bit length (gzip) */ + DONE, /* finished check, done -- remain here until reset */ + BAD, /* got a data error -- remain here until reset */ + MEM, /* got an inflate() memory error -- remain here until reset */ + SYNC /* looking for synchronization bytes to restart inflate() */ +} inflate_mode; + +/* + State transitions between above modes - + + (most modes can go to BAD or MEM on error -- not shown for clarity) + + Process header: + HEAD -> (gzip) or (zlib) or (raw) + (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> + HCRC -> TYPE + (zlib) -> DICTID or TYPE + DICTID -> DICT -> TYPE + (raw) -> TYPEDO + Read deflate blocks: + TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK + STORED -> COPY_ -> COPY -> TYPE + TABLE -> LENLENS -> CODELENS -> LEN_ + LEN_ -> LEN + Read deflate codes in fixed or dynamic block: + LEN -> LENEXT or LIT or TYPE + LENEXT -> DIST -> DISTEXT -> MATCH -> LEN + LIT -> LEN + Process trailer: + CHECK -> LENGTH -> DONE + */ + +/* State maintained between inflate() calls -- approximately 7K bytes, not + including the allocated sliding window, which is up to 32K bytes. */ +struct inflate_state { + z_streamp strm; /* pointer back to this zlib stream */ + inflate_mode mode; /* current inflate mode */ + int last; /* true if processing last block */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip, + bit 2 true to validate check value */ + int havedict; /* true if dictionary provided */ + int flags; /* gzip header method and flags, 0 if zlib, or + -1 if raw or no header yet */ + unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ + unsigned long check; /* protected copy of check value */ + unsigned long total; /* protected copy of output count */ + gz_headerp head; /* where to save gzip header information */ + /* sliding window */ + unsigned wbits; /* log base 2 of requested window size */ + unsigned wsize; /* window size or zero if not using window */ + unsigned whave; /* valid bytes in the window */ + unsigned wnext; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if needed */ + /* bit accumulator */ + unsigned long hold; /* input bit accumulator */ + unsigned bits; /* number of bits in "in" */ + /* for string and stored block copying */ + unsigned length; /* literal or length of data to copy */ + unsigned offset; /* distance back to copy string from */ + /* for table and code decoding */ + unsigned extra; /* extra bits needed */ + /* fixed and dynamic code tables */ + code const FAR *lencode; /* starting table for length/literal codes */ + code const FAR *distcode; /* starting table for distance codes */ + unsigned lenbits; /* index bits for lencode */ + unsigned distbits; /* index bits for distcode */ + /* dynamic table building */ + unsigned ncode; /* number of code length code lengths */ + unsigned nlen; /* number of length code lengths */ + unsigned ndist; /* number of distance code lengths */ + unsigned have; /* number of code lengths in lens[] */ + code FAR *next; /* next available space in codes[] */ + unsigned short lens[320]; /* temporary storage for code lengths */ + unsigned short work[288]; /* work area for code table building */ + code codes[ENOUGH]; /* space for code tables */ + int sane; /* if false, allow invalid distance too far */ + int back; /* bits back of last unprocessed length/lit */ + unsigned was; /* initial length of match */ +}; + +#endif /* INFLATE_H */ diff --git a/thirdparty/freetype/src/gzip/inftrees.c b/thirdparty/freetype/src/gzip/inftrees.c index 56f52b1701..0b58b29b1b 100644 --- a/thirdparty/freetype/src/gzip/inftrees.c +++ b/thirdparty/freetype/src/gzip/inftrees.c @@ -1,20 +1,15 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2002 Mark Adler + * Copyright (C) 1995-2022 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zutil.h" #include "inftrees.h" -#if !defined(BUILDFIXED) && !defined(STDC) -# define BUILDFIXED /* non ANSI compilers may not accept inffixed.h */ -#endif +#define MAXBITS 15 - -#if 0 -local const char inflate_copyright[] = - " inflate 1.1.4 Copyright 1995-2002 Mark Adler "; -#endif +const char inflate_copyright[] = + " inflate 1.2.12 Copyright 1995-2022 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -22,447 +17,288 @@ local const char inflate_copyright[] = copyright string in the executable of your product. */ -/* simplify the use of the inflate_huft type with some defines */ -#define exop word.what.Exop -#define bits word.what.Bits - - -local int huft_build OF(( - uIntf *, /* code lengths in bits */ - uInt, /* number of codes */ - uInt, /* number of "simple" codes */ - const uIntf *, /* list of base values for non-simple codes */ - const uIntf *, /* list of extra bits for non-simple codes */ - inflate_huft * FAR*,/* result: starting table */ - uIntf *, /* maximum lookup bits (returns actual) */ - inflate_huft *, /* space for trees */ - uInt *, /* hufts used in space */ - uIntf * )); /* space for values */ - -/* Tables for deflate from PKZIP's appnote.txt. */ -local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ +/* + Build a set of tables to decode the provided canonical Huffman code. + The code lengths are lens[0..codes-1]. The result starts at *table, + whose indices are 0..2^bits-1. work is a writable array of at least + lens shorts, which is used as a work area. type is the type of code + to be generated, CODES, LENS, or DISTS. On return, zero is success, + -1 is an invalid code, and +1 means that ENOUGH isn't enough. table + on return points to the next available entry's address. bits is the + requested root table index bits, and on return it is the actual root + table index bits. It will differ if the request is greater than the + longest code or if it is less than the shortest code. + */ +int ZLIB_INTERNAL inflate_table( + codetype type, + unsigned short FAR *lens, + unsigned codes, + code FAR * FAR *table, + unsigned FAR *bits, + unsigned short FAR *work) +{ + unsigned len; /* a code's length in bits */ + unsigned sym; /* index of code symbols */ + unsigned min, max; /* minimum and maximum code lengths */ + unsigned root; /* number of index bits for root table */ + unsigned curr; /* number of index bits for current table */ + unsigned drop; /* code bits to drop for sub-table */ + int left; /* number of prefix codes available */ + unsigned used; /* code entries in table used */ + unsigned huff; /* Huffman code */ + unsigned incr; /* for incrementing code, index */ + unsigned fill; /* index for replicating entries */ + unsigned low; /* low bits for current root entry */ + unsigned mask; /* mask for low root bits */ + code here; /* table entry for duplication */ + code FAR *next; /* next available space in table */ + const unsigned short FAR *base; /* base value table to use */ + const unsigned short FAR *extra; /* extra bits table to use */ + unsigned match; /* use base and extra for symbol >= match */ + unsigned short count[MAXBITS+1]; /* number of codes of each length */ + unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ + static const unsigned short lbase[31] = { /* Length codes 257..285 base */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - /* see note #13 above about 258 */ -local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */ -local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ + static const unsigned short lext[31] = { /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 202}; + static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577}; -local const uInt cpdext[30] = { /* Extra bits for distance codes */ - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, - 12, 12, 13, 13}; - -/* - Huffman code decoding is performed using a multi-level table lookup. - The fastest way to decode is to simply build a lookup table whose - size is determined by the longest code. However, the time it takes - to build this table can also be a factor if the data being decoded - is not very long. The most common codes are necessarily the - shortest codes, so those codes dominate the decoding time, and hence - the speed. The idea is you can have a shorter table that decodes the - shorter, more probable codes, and then point to subsidiary tables for - the longer codes. The time it costs to decode the longer codes is - then traded against the time it takes to make longer tables. - - This results of this trade are in the variables lbits and dbits - below. lbits is the number of bits the first level table for literal/ - length codes can decode in one step, and dbits is the same thing for - the distance codes. Subsequent tables are also less than or equal to - those sizes. These values may be adjusted either when all of the - codes are shorter than that, in which case the longest code length in - bits is used, or when the shortest code is *longer* than the requested - table size, in which case the length of the shortest code in bits is - used. - - There are two different values for the two tables, since they code a - different number of possibilities each. The literal/length table - codes 286 possible values, or in a flat code, a little over eight - bits. The distance table codes 30 possible values, or a little less - than five bits, flat. The optimum values for speed end up being - about one bit more than those, so lbits is 8+1 and dbits is 5+1. - The optimum values may differ though from machine to machine, and - possibly even between compilers. Your mileage may vary. - */ - - -/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ -#define BMAX 15 /* maximum bit length of any code */ - -local int huft_build( /* b, n, s, d, e, t, m, hp, hn, v) */ -uIntf *b, /* code lengths in bits (all assumed <= BMAX) */ -uInt n, /* number of codes (assumed <= 288) */ -uInt s, /* number of simple-valued codes (0..s-1) */ -const uIntf *d, /* list of base values for non-simple codes */ -const uIntf *e, /* list of extra bits for non-simple codes */ -inflate_huft * FAR *t, /* result: starting table */ -uIntf *m, /* maximum lookup bits, returns actual */ -inflate_huft *hp, /* space for trees */ -uInt *hn, /* hufts used in space */ -uIntf *v /* working area: values in order of bit length */ -/* Given a list of code lengths and a maximum table size, make a set of - tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR - if the given code set is incomplete (the tables are still built in this - case), or Z_DATA_ERROR if the input is invalid. */ -) -{ + 8193, 12289, 16385, 24577, 0, 0}; + static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64}; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) + count[len] = 0; + for (sym = 0; sym < codes; sym++) + count[lens[sym]]++; + + /* bound code lengths, force root to be within code lengths */ + root = *bits; + for (max = MAXBITS; max >= 1; max--) + if (count[max] != 0) break; + if (root > max) root = max; + if (max == 0) { /* no symbols to code at all */ + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)1; + here.val = (unsigned short)0; + *(*table)++ = here; /* make a table to force an error */ + *(*table)++ = here; + *bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) + if (count[min] != 0) break; + if (root < min) root = min; + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) return -1; /* over-subscribed */ + } + if (left > 0 && (type == CODES || max != 1)) + return -1; /* incomplete set */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + count[len]; + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) + if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + switch (type) { + case CODES: + base = extra = work; /* dummy value--not used */ + match = 20; + break; + case LENS: + base = lbase; + extra = lext; + match = 257; + break; + default: /* DISTS */ + base = dbase; + extra = dext; + match = 0; + } - uInt a; /* counter for codes of length k */ - uInt c[BMAX+1]; /* bit length count table */ - uInt f; /* i repeats in table every f entries */ - int g; /* maximum code length */ - int h; /* table level */ - uInt i; /* counter, current code */ - uInt j; /* counter */ - int k; /* number of bits in current code */ - int l; /* bits per table (returned in m) */ - uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ - uIntf *p; /* pointer into c[], b[], or v[] */ - inflate_huft *q; /* points to current table */ - struct inflate_huft_s r; /* table entry for structure assignment */ - inflate_huft *u[BMAX]; /* table stack */ - int w; /* bits before this table == (l * h) */ - uInt x[BMAX+1]; /* bit offsets, then code stack */ - uIntf *xp; /* pointer into x */ - int y; /* number of dummy codes added */ - uInt z; /* number of entries in current table */ - - - /* Make compiler happy */ - r.base = 0; - - /* Generate counts for each bit length */ - p = c; -#define C0 *p++ = 0; -#define C2 C0 C0 C0 C0 -#define C4 C2 C2 C2 C2 - C4 /* clear c[]--assume BMAX+1 is 16 */ - p = b; i = n; - do { - c[*p++]++; /* assume all entries <= BMAX */ - } while (--i); - if (c[0] == n) /* null input--all zero length codes */ - { - *t = (inflate_huft *)Z_NULL; - *m = 0; - return Z_OK; - } - - - /* Find minimum and maximum length, bound *m by those */ - l = *m; - for (j = 1; j <= BMAX; j++) - if (c[j]) - break; - k = j; /* minimum code length */ - if ((uInt)l < j) - l = j; - for (i = BMAX; i; i--) - if (c[i]) - break; - g = i; /* maximum code length */ - if ((uInt)l > i) - l = i; - *m = l; - - - /* Adjust last length count to fill out codes, if needed */ - for (y = 1 << j; j < i; j++, y <<= 1) - if ((y -= c[j]) < 0) - return Z_DATA_ERROR; - if ((y -= c[i]) < 0) - return Z_DATA_ERROR; - c[i] += y; - - - /* Generate starting offsets into the value table for each length */ - x[1] = j = 0; - p = c + 1; xp = x + 2; - while (--i) { /* note that i == g from above */ - *xp++ = (j += *p++); - } - - - /* Make a table of values in order of bit lengths */ - p = b; i = 0; - do { - if ((j = *p++) != 0) - v[x[j]++] = i; - } while (++i < n); - n = x[g]; /* set n to length of v */ - - - /* Generate the Huffman codes and for each, make the table entries */ - x[0] = i = 0; /* first Huffman code is zero */ - p = v; /* grab values in bit order */ - h = -1; /* no tables yet--level -1 */ - w = -l; /* bits decoded == (l * h) */ - u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */ - q = (inflate_huft *)Z_NULL; /* ditto */ - z = 0; /* ditto */ - - /* go through the bit lengths (k already is bits in shortest code) */ - for (; k <= g; k++) - { - a = c[k]; - while (a--) - { - /* here i is the Huffman code of length k bits for value *p */ - /* make tables up to required level */ - while (k > w + l) - { - h++; - w += l; /* previous table always l bits */ - - /* compute minimum size table less than or equal to l bits */ - z = g - w; - z = z > (uInt)l ? (uInt)l : z; /* table size upper limit */ - if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ - { /* too few codes for k-w bit table */ - f -= a + 1; /* deduct codes from patterns left */ - xp = c + k; - if (j < z) - while (++j < z) /* try smaller tables up to z bits */ - { - if ((f <<= 1) <= *++xp) - break; /* enough codes to use up j bits */ - f -= *xp; /* else deduct codes from patterns */ - } + /* initialize state for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = *table; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = (unsigned)(-1); /* trigger new sub-table when len > root */ + used = 1U << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) + return 1; + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here.bits = (unsigned char)(len - drop); + if (work[sym] + 1U < match) { + here.op = (unsigned char)0; + here.val = work[sym]; } - z = 1 << j; /* table entries for j-bit table */ - - /* allocate new table */ - if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ - return Z_DATA_ERROR; /* overflow of MANY */ - u[h] = q = hp + *hn; - *hn += z; - - /* connect to last table, if there is one */ - if (h) - { - x[h] = i; /* save pattern for backing up */ - r.bits = (Byte)l; /* bits to dump before this table */ - r.exop = (Byte)j; /* bits in this table */ - j = i >> (w - l); - r.base = (uInt)(q - u[h-1] - j); /* offset to this table */ - u[h-1][j] = r; /* connect to last table */ + else if (work[sym] >= match) { + here.op = (unsigned char)(extra[work[sym] - match]); + here.val = base[work[sym] - match]; + } + else { + here.op = (unsigned char)(32 + 64); /* end of block */ + here.val = 0; } - else - *t = q; /* first table is returned result */ - } - - /* set up table entry in r */ - r.bits = (Byte)(k - w); - if (p >= v + n) - r.exop = 128 + 64; /* out of values--invalid code */ - else if (*p < s) - { - r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */ - r.base = *p++; /* simple code is just the value */ - } - else - { - r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */ - r.base = d[*p++ - s]; - } - - /* fill code-like entries with r */ - f = 1 << (k - w); - for (j = i >> w; j < z; j += f) - q[j] = r; - - /* backwards increment the k-bit code i */ - for (j = 1 << (k - 1); i & j; j >>= 1) - i ^= j; - i ^= j; - - /* backup over finished tables */ - mask = (1 << w) - 1; /* needed on HP, cc -O bug */ - while ((i & mask) != x[h]) - { - h--; /* don't need to update q */ - w -= l; - mask = (1 << w) - 1; - } - } - } - - - /* Return Z_BUF_ERROR if we were given an incomplete table */ - return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; -} + /* replicate for those indices with low len bits equal to huff */ + incr = 1U << (len - drop); + fill = 1U << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + next[(huff >> drop) + fill] = here; + } while (fill != 0); + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; -local int inflate_trees_bits( /* c, bb, tb, hp, z) */ -uIntf *c, /* 19 code lengths */ -uIntf *bb, /* bits tree desired/actual depth */ -inflate_huft * FAR *tb, /* bits tree result */ -inflate_huft *hp, /* space for trees */ -z_streamp z /* for messages */ -) -{ - int r; - uInt hn = 0; /* hufts used in space */ - uIntf *v; /* work area for huft_build */ - - if ((v = (uIntf*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL) - return Z_MEM_ERROR; - r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, - tb, bb, hp, &hn, v); - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed dynamic bit lengths tree"; - else if (r == Z_BUF_ERROR || *bb == 0) - { - z->msg = (char*)"incomplete dynamic bit lengths tree"; - r = Z_DATA_ERROR; - } - ZFREE(z, v); - return r; -} + /* go to next symbol, update count, len */ + sym++; + if (--(count[len]) == 0) { + if (len == max) break; + len = lens[work[sym]]; + } + /* create new sub-table if needed */ + if (len > root && (huff & mask) != low) { + /* if first time, transition to sub-tables */ + if (drop == 0) + drop = root; + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = (int)(1 << curr); + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) break; + curr++; + left <<= 1; + } -local int inflate_trees_dynamic( /* nl, nd, c, bl, bd, tl, td, hp, z) */ -uInt nl, /* number of literal/length codes */ -uInt nd, /* number of distance codes */ -uIntf *c, /* that many (total) code lengths */ -uIntf *bl, /* literal desired/actual bit depth */ -uIntf *bd, /* distance desired/actual bit depth */ -inflate_huft * FAR *tl, /* literal/length tree result */ -inflate_huft * FAR *td, /* distance tree result */ -inflate_huft *hp, /* space for trees */ -z_streamp z /* for messages */ -) -{ - int r; - uInt hn = 0; /* hufts used in space */ - uIntf *v; /* work area for huft_build */ - - /* allocate work area */ - if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) - return Z_MEM_ERROR; - - /* build literal/length tree */ - r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v); - if (r != Z_OK || *bl == 0) - { - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed literal/length tree"; - else if (r != Z_MEM_ERROR) - { - z->msg = (char*)"incomplete literal/length tree"; - r = Z_DATA_ERROR; - } - ZFREE(z, v); - return r; - } - - /* build distance tree */ - r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v); - if (r != Z_OK || (*bd == 0 && nl > 257)) - { - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed distance tree"; - else if (r == Z_BUF_ERROR) { -#if 0 - { -#endif -#ifdef PKZIP_BUG_WORKAROUND - r = Z_OK; - } -#else - z->msg = (char*)"incomplete distance tree"; - r = Z_DATA_ERROR; - } - else if (r != Z_MEM_ERROR) - { - z->msg = (char*)"empty distance tree with lengths"; - r = Z_DATA_ERROR; + /* check for enough space */ + used += 1U << curr; + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) + return 1; + + /* point entry in root table to sub-table */ + low = huff & mask; + (*table)[low].op = (unsigned char)curr; + (*table)[low].bits = (unsigned char)root; + (*table)[low].val = (unsigned short)(next - *table); + } } - ZFREE(z, v); - return r; -#endif - } - - /* done */ - ZFREE(z, v); - return Z_OK; -} - -/* build fixed tables only once--keep them here */ -#ifdef BUILDFIXED -local int fixed_built = 0; -#define FIXEDH 544 /* number of hufts used by fixed tables */ -local inflate_huft fixed_mem[FIXEDH]; -local uInt fixed_bl; -local uInt fixed_bd; -local inflate_huft *fixed_tl; -local inflate_huft *fixed_td; -#else -#include "inffixed.h" -#endif - - -local int inflate_trees_fixed( /* bl, bd, tl, td, z) */ -uIntf *bl, /* literal desired/actual bit depth */ -uIntf *bd, /* distance desired/actual bit depth */ -const inflate_huft * FAR *tl, /* literal/length tree result */ -const inflate_huft * FAR *td, /* distance tree result */ -z_streamp z /* for memory allocation */ -) -{ -#ifdef BUILDFIXED - /* build fixed tables if not already */ - if (!fixed_built) - { - int k; /* temporary variable */ - uInt f = 0; /* number of hufts used in fixed_mem */ - uIntf *c; /* length list for huft_build */ - uIntf *v; /* work area for huft_build */ - - /* allocate memory */ - if ((c = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) - return Z_MEM_ERROR; - if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) - { - ZFREE(z, c); - return Z_MEM_ERROR; + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff != 0) { + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)(len - drop); + here.val = (unsigned short)0; + next[huff] = here; } - /* literal table */ - for (k = 0; k < 144; k++) - c[k] = 8; - for (; k < 256; k++) - c[k] = 9; - for (; k < 280; k++) - c[k] = 7; - for (; k < 288; k++) - c[k] = 8; - fixed_bl = 9; - huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, - fixed_mem, &f, v); - - /* distance table */ - for (k = 0; k < 30; k++) - c[k] = 5; - fixed_bd = 5; - huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, - fixed_mem, &f, v); - - /* done */ - ZFREE(z, v); - ZFREE(z, c); - fixed_built = 1; - } -#else - FT_UNUSED(z); -#endif - *bl = fixed_bl; - *bd = fixed_bd; - *tl = fixed_tl; - *td = fixed_td; - return Z_OK; + /* set return parameters */ + *table += used; + *bits = root; + return 0; } diff --git a/thirdparty/freetype/src/gzip/inftrees.h b/thirdparty/freetype/src/gzip/inftrees.h index 07bf2aa0bf..c94eb78b5d 100644 --- a/thirdparty/freetype/src/gzip/inftrees.h +++ b/thirdparty/freetype/src/gzip/inftrees.h @@ -1,63 +1,67 @@ /* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2002 Mark Adler + * Copyright (C) 1995-2005, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ +#ifndef INFTREES_H +#define INFTREES_H + /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ -/* Huffman code lookup table entry--this entry is four bytes for machines - that have 16-bit pointers (e.g. PC's in the small or medium model). */ - -#ifndef _INFTREES_H -#define _INFTREES_H - -typedef struct inflate_huft_s FAR inflate_huft; - -struct inflate_huft_s { - union { - struct { - Byte Exop; /* number of extra bits or operation */ - Byte Bits; /* number of bits in this code or subcode */ - } what; - uInt pad; /* pad structure to a power of 2 (4 bytes for */ - } word; /* 16-bit, 8 bytes for 32-bit int's) */ - uInt base; /* literal, length base, distance base, - or table offset */ -}; - -/* Maximum size of dynamic tree. The maximum found in a long but non- - exhaustive search was 1004 huft structures (850 for length/literals - and 154 for distances, the latter actually the result of an - exhaustive search). The actual maximum is not known, but the - value below is more than safe. */ -#define MANY 1440 - -local int inflate_trees_bits OF(( - uIntf *, /* 19 code lengths */ - uIntf *, /* bits tree desired/actual depth */ - inflate_huft * FAR *, /* bits tree result */ - inflate_huft *, /* space for trees */ - z_streamp)); /* for messages */ - -local int inflate_trees_dynamic OF(( - uInt, /* number of literal/length codes */ - uInt, /* number of distance codes */ - uIntf *, /* that many (total) code lengths */ - uIntf *, /* literal desired/actual bit depth */ - uIntf *, /* distance desired/actual bit depth */ - inflate_huft * FAR *, /* literal/length tree result */ - inflate_huft * FAR *, /* distance tree result */ - inflate_huft *, /* space for trees */ - z_streamp)); /* for messages */ - -local int inflate_trees_fixed OF(( - uIntf *, /* literal desired/actual bit depth */ - uIntf *, /* distance desired/actual bit depth */ - const inflate_huft * FAR *, /* literal/length tree result */ - const inflate_huft * FAR *, /* distance tree result */ - z_streamp)); /* for memory allocation */ - -#endif /* _INFTREES_H */ +/* Structure for decoding tables. Each entry provides either the + information needed to do the operation requested by the code that + indexed that table entry, or it provides a pointer to another + table that indexes more bits of the code. op indicates whether + the entry is a pointer to another table, a literal, a length or + distance, an end-of-block, or an invalid code. For a table + pointer, the low four bits of op is the number of index bits of + that table. For a length or distance, the low four bits of op + is the number of extra bits to get after the code. bits is + the number of bits in this code or part of the code to drop off + of the bit buffer. val is the actual byte to output in the case + of a literal, the base length or distance, or the offset from + the current table to the next table. Each entry is four bytes. */ +typedef struct { + unsigned char op; /* operation, extra bits, table bits */ + unsigned char bits; /* bits in this part of the code */ + unsigned short val; /* offset in table or code value */ +} code; + +/* op values as set by inflate_table(): + 00000000 - literal + 0000tttt - table link, tttt != 0 is the number of table index bits + 0001eeee - length or distance, eeee is the number of extra bits + 01100000 - end of block + 01000000 - invalid code + */ + +/* Maximum size of the dynamic table. The maximum number of code structures is + 1444, which is the sum of 852 for literal/length codes and 592 for distance + codes. These values were found by exhaustive searches using the program + examples/enough.c found in the zlib distribtution. The arguments to that + program are the number of symbols, the initial root table size, and the + maximum bit length of a code. "enough 286 9 15" for literal/length codes + returns returns 852, and "enough 30 6 15" for distance codes returns 592. + The initial root table size (9 or 6) is found in the fifth argument of the + inflate_table() calls in inflate.c and infback.c. If the root table size is + changed, then these maximum sizes would be need to be recalculated and + updated. */ +#define ENOUGH_LENS 852 +#define ENOUGH_DISTS 592 +#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) + +/* Type of code to build for inflate_table() */ +typedef enum { + CODES, + LENS, + DISTS +} codetype; + +int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work)); + +#endif /* INFTREES_H_ */ diff --git a/thirdparty/freetype/src/gzip/infutil.c b/thirdparty/freetype/src/gzip/infutil.c deleted file mode 100644 index 6087b40647..0000000000 --- a/thirdparty/freetype/src/gzip/infutil.c +++ /dev/null @@ -1,86 +0,0 @@ -/* inflate_util.c -- data and routines common to blocks and codes - * Copyright (C) 1995-2002 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "infblock.h" -#include "inftrees.h" -#include "infcodes.h" -#include "infutil.h" - - -/* And'ing with mask[n] masks the lower n bits */ -local const uInt inflate_mask[17] = { - 0x0000, - 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, - 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff -}; - - -/* copy as much as possible from the sliding window to the output area */ -local int inflate_flush( /* s, z, r) */ -inflate_blocks_statef *s, -z_streamp z, -int r ) -{ - uInt n; - Bytef *p; - Bytef *q; - - /* local copies of source and destination pointers */ - p = z->next_out; - q = s->read; - - /* compute number of bytes to copy as far as end of window */ - n = (uInt)((q <= s->write ? s->write : s->end) - q); - if (n > z->avail_out) n = z->avail_out; - if (n && r == Z_BUF_ERROR) r = Z_OK; - - /* update counters */ - z->avail_out -= n; - z->total_out += n; - - /* update check information */ - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(s->check, q, n); - - /* copy as far as end of window */ - zmemcpy(p, q, n); - p += n; - q += n; - - /* see if more to copy at beginning of window */ - if (q == s->end) - { - /* wrap pointers */ - q = s->window; - if (s->write == s->end) - s->write = s->window; - - /* compute bytes to copy */ - n = (uInt)(s->write - q); - if (n > z->avail_out) n = z->avail_out; - if (n && r == Z_BUF_ERROR) r = Z_OK; - - /* update counters */ - z->avail_out -= n; - z->total_out += n; - - /* update check information */ - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(s->check, q, n); - - /* copy */ - zmemcpy(p, q, n); - p += n; - q += n; - } - - /* update pointers */ - z->next_out = p; - s->read = q; - - /* done */ - return r; -} diff --git a/thirdparty/freetype/src/gzip/infutil.h b/thirdparty/freetype/src/gzip/infutil.h deleted file mode 100644 index cdf18b4f90..0000000000 --- a/thirdparty/freetype/src/gzip/infutil.h +++ /dev/null @@ -1,98 +0,0 @@ -/* infutil.h -- types and macros common to blocks and codes - * Copyright (C) 1995-2002 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -#ifndef _INFUTIL_H -#define _INFUTIL_H - -typedef enum { - TYPE, /* get type bits (3, including end bit) */ - LENS, /* get lengths for stored */ - STORED, /* processing stored block */ - TABLE, /* get table lengths */ - BTREE, /* get bit lengths tree for a dynamic block */ - DTREE, /* get length, distance trees for a dynamic block */ - CODES, /* processing fixed or dynamic block */ - DRY, /* output remaining window bytes */ - DONE, /* finished last block, done */ - BAD} /* got a data error--stuck here */ -inflate_block_mode; - -/* inflate blocks semi-private state */ -struct inflate_blocks_state { - - /* mode */ - inflate_block_mode mode; /* current inflate_block mode */ - - /* mode dependent information */ - union { - uInt left; /* if STORED, bytes left to copy */ - struct { - uInt table; /* table lengths (14 bits) */ - uInt index; /* index into blens (or border) */ - uIntf *blens; /* bit lengths of codes */ - uInt bb; /* bit length tree depth */ - inflate_huft *tb; /* bit length decoding tree */ - } trees; /* if DTREE, decoding info for trees */ - struct { - inflate_codes_statef - *codes; - } decode; /* if CODES, current state */ - } sub; /* submode */ - uInt last; /* true if this block is the last block */ - - /* mode independent information */ - uInt bitk; /* bits in bit buffer */ - uLong bitb; /* bit buffer */ - inflate_huft *hufts; /* single malloc for tree space */ - Bytef *window; /* sliding window */ - Bytef *end; /* one byte after sliding window */ - Bytef *read; /* window read pointer */ - Bytef *write; /* window write pointer */ - check_func checkfn; /* check function */ - uLong check; /* check on output */ - -}; - - -/* defines for inflate input/output */ -/* update pointers and return */ -#define UPDBITS {s->bitb=b;s->bitk=k;} -#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;} -#define UPDOUT {s->write=q;} -#define UPDATE {UPDBITS UPDIN UPDOUT} -#define LEAVE {UPDATE return inflate_flush(s,z,r);} -/* get bytes and bits */ -#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} -#define NEEDBYTE {if(n)r=Z_OK;else LEAVE} -#define NEXTBYTE (n--,*p++) -#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}} -#define DUMPBITS(j) {b>>=(j);k-=(j);} -/* output bytes */ -#define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q) -#define LOADOUT {q=s->write;m=(uInt)WAVAIL;} -#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} -#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT} -#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} -#define OUTBYTE(a) {*q++=(Byte)(a);m--;} -/* load local pointers */ -#define LOAD {LOADIN LOADOUT} - -/* masks for lower bits (size given to avoid silly warnings with Visual C++) */ -#ifndef NO_INFLATE_MASK -local const uInt inflate_mask[17]; -#endif - -/* copy as much as possible from the sliding window to the output area */ -local int inflate_flush OF(( - inflate_blocks_statef *, - z_streamp , - int)); - -#endif diff --git a/thirdparty/freetype/src/gzip/zlib.h b/thirdparty/freetype/src/gzip/zlib.h index a4e82c6a02..d760140c2e 100644 --- a/thirdparty/freetype/src/gzip/zlib.h +++ b/thirdparty/freetype/src/gzip/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.1.4, March 11th, 2002 + version 1.2.12, March 11th, 2022 - Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -24,12 +24,12 @@ The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt - (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). + Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 + (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). */ -#ifndef _ZLIB_H -#define _ZLIB_H +#ifndef ZLIB_H +#define ZLIB_H #include "ftzconf.h" @@ -37,27 +37,45 @@ extern "C" { #endif -#define ZLIB_VERSION "1.1.4" +#define ZLIB_VERSION "1.2.12" +#define ZLIB_VERNUM 0x12c0 +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 2 +#define ZLIB_VER_REVISION 12 +#define ZLIB_VER_SUBREVISION 0 /* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed - data. This version of the library supports only one compression method - (deflation) but other algorithms will be added later and will have the same - stream interface. - - Compression can be done in a single step if the buffers are large - enough (for example if an input file is mmap'ed), or can be done by - repeated calls of the compression function. In the latter case, the - application must provide more input and/or consume the output + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. + + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output (providing more output space) before each call. - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio. + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio using the functions that start + with "gz". The gzip format is different from the zlib format. gzip is a + gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + + This library can optionally read and write gzip and raw deflate streams in + memory as well. - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never - crash even in case of corrupted input. + The zlib format was designed to be compact and fast for use in memory + and on communications channels. The gzip format was designed for single- + file compression on file systems, has a larger header than zlib to maintain + directory information, and uses a different, slower check method than zlib. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in the case of corrupted input. */ typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); @@ -66,68 +84,95 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address)); struct internal_state; typedef struct z_stream_s { - Bytef *next_in; /* next input byte */ + z_const Bytef *next_in; /* next input byte */ uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total nb of input bytes read so far */ + uLong total_in; /* total number of input bytes read so far */ - Bytef *next_out; /* next output byte should be put there */ + Bytef *next_out; /* next output byte will go here */ uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total nb of bytes output so far */ + uLong total_out; /* total number of bytes output so far */ - char *msg; /* last error message, NULL if no error */ + z_const char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ alloc_func zalloc; /* used to allocate the internal state */ free_func zfree; /* used to free the internal state */ voidpf opaque; /* private data object passed to zalloc and zfree */ - int data_type; /* best guess about the data type: ascii or binary */ - uLong adler; /* adler32 value of the uncompressed data */ + int data_type; /* best guess about the data type: binary or text + for deflate, or the decoding state for inflate */ + uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ uLong reserved; /* reserved for future use */ } z_stream; typedef z_stream FAR *z_streamp; /* - The application must update next_in and avail_in when avail_in has - dropped to zero. It must update next_out and avail_out when avail_out - has dropped to zero. The application must initialize zalloc, zfree and - opaque before calling the init function. All other fields are set by the - compression library and must not be updated by the application. + gzip header information passed to and from zlib routines. See RFC 1952 + for more details on the meanings of these fields. +*/ +typedef struct gz_header_s { + int text; /* true if compressed data believed to be text */ + uLong time; /* modification time */ + int xflags; /* extra flags (not used when writing a gzip file) */ + int os; /* operating system */ + Bytef *extra; /* pointer to extra field or Z_NULL if none */ + uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ + uInt extra_max; /* space at extra (only when reading header) */ + Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ + uInt name_max; /* space at name (only when reading header) */ + Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ + uInt comm_max; /* space at comment (only when reading header) */ + int hcrc; /* true if there was or will be a header crc */ + int done; /* true when done reading gzip header (not used + when writing a gzip file) */ +} gz_header; + +typedef gz_header FAR *gz_headerp; - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the +/* + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the opaque value. - zalloc must return Z_NULL if there is not enough memory for the object. + zalloc must return Z_NULL if there is not enough memory for the object. If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, - pointers returned by zalloc for objects of exactly 65536 bytes *must* - have their offset normalized to zero. The default allocation function - provided by this library ensures this (see zutil.c). To reduce memory - requirements and avoid any allocation of 64K objects, at the expense of - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or - progress reports. After compression, total_in holds the total size of - the uncompressed data and may be saved for use in the decompressor - (particularly if the decompressor wants to decompress everything in - a single step). + thread safe. In that case, zlib is thread-safe. When zalloc and zfree are + Z_NULL on entry to the initialization function, they are set to internal + routines that use the standard library functions malloc() and free(). + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use by the decompressor (particularly + if the decompressor wants to decompress everything in a single step). */ /* constants */ #define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_PARTIAL_FLUSH 1 #define Z_SYNC_FLUSH 2 #define Z_FULL_FLUSH 3 #define Z_FINISH 4 -/* Allowed flush values; see deflate() below for details */ +#define Z_BLOCK 5 +#define Z_TREES 6 +/* Allowed flush values; see deflate() and inflate() below for details */ #define Z_OK 0 #define Z_STREAM_END 1 @@ -138,8 +183,8 @@ typedef z_stream FAR *z_streamp; #define Z_MEM_ERROR (-4) #define Z_BUF_ERROR (-5) #define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative - * values are errors, positive values are used for special but normal events. +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. */ #define Z_NO_COMPRESSION 0 @@ -150,636 +195,1522 @@ typedef z_stream FAR *z_streamp; #define Z_FILTERED 1 #define Z_HUFFMAN_ONLY 2 +#define Z_RLE 3 +#define Z_FIXED 4 #define Z_DEFAULT_STRATEGY 0 /* compression strategy; see deflateInit2() below for details */ #define Z_BINARY 0 -#define Z_ASCII 1 +#define Z_TEXT 1 +#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ #define Z_UNKNOWN 2 -/* Possible values of the data_type field */ +/* Possible values of the data_type field for deflate() */ #define Z_DEFLATED 8 /* The deflate compression method (the only one supported in this version) */ #define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ +#ifndef Z_FREETYPE + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + /* basic functions */ +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is - not compatible with the zlib.h header file used by the application. - This check is automatically made by deflateInit and inflateInit. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. */ /* -ZEXTERN(int) deflateInit OF((z_streamp strm, int level)); +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. deflateInit does not - perform any compression: this will be done by deflate(). + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). */ - +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); /* deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce some - output latency (reading input without producing any output) except when + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when forced to flush. - The detailed semantics are as follows. deflate performs one or both of the + The detailed semantics are as follows. deflate performs one or both of the following actions: - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not + accordingly. If not all input can be processed (because there is not enough room in the output buffer), next_in and avail_in are updated and processing will resume at this point for the next call of deflate(). - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. + - Generate more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). - Some output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating avail_in or avail_out accordingly; avail_out - should never be zero before the call. The application can consume the - compressed output when it wants, for example when the output buffer is full - (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK - and with zero avail_out, it must be called again after making room in the - output buffer because there might be more output pending. + should be set only when necessary. Some output may be provided even if + flush is zero. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. See deflatePending(), + which can be used if desired to determine whether or not there is more ouput + in that case. + + Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumulate before producing output, in order to + maximize compression. If the parameter flush is set to Z_SYNC_FLUSH, all pending output is flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In particular - avail_in is zero after the call if enough output space has been provided - before the call.) Flushing may degrade compression for some compression - algorithms and so it should be used only when necessary. + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed + codes block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. If flush is set to Z_FULL_FLUSH, all output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - the compression. + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + compression. If deflate returns with avail_out == 0, this function must be called again with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero - avail_out). + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out is greater than six to avoid repeated flush markers due to + avail_out == 0 on return. If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there - was enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the - stream are deflateReset or deflateEnd. - - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least - 0.1% larger than avail_in plus 12 bytes. If deflate does not return - Z_STREAM_END, then it must be called again as described above. - - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update data_type if it can make a good guess about - the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered - binary. This field is only for information purposes and does not affect - the compression algorithm in any manner. + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this + function must be called again with Z_FINISH and more output space (updated + avail_out) but no more input data, until it returns with Z_STREAM_END or an + error. After deflate has returned Z_STREAM_END, the only possible operations + on the stream are deflateReset or deflateEnd. + + Z_FINISH can be used in the first deflate call after deflateInit if all the + compression is to be done in a single step. In order to complete in one + call, avail_out must be at least the value returned by deflateBound (see + below). Then deflate is guaranteed to return Z_STREAM_END. If not enough + output space is provided, deflate will not return Z_STREAM_END, and it must + be called again as described above. + + deflate() sets strm->adler to the Adler-32 checksum of all input read + so far (that is, total_in bytes). If a gzip stream is being generated, then + strm->adler will be the CRC-32 checksum of the input read so far. (See + deflateInit2 below.) + + deflate() may update strm->data_type if it can make a good guess about + the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is + considered binary. This field is only for information purposes and does not + affect the compression algorithm in any manner. deflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if all input has been consumed and all output has been produced (only when flush is set to Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). + if next_in or next_out was Z_NULL or the state was inadvertently written over + by the application), or Z_BUF_ERROR if no progress is possible (for example + avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and + deflate() can be called again with more input and more output space to + continue compressing. */ +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. + This function discards any unprocessed input and does not flush any pending + output. deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, - msg may be set but then points to a static string (which must not be + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be deallocated). */ +#endif /* !Z_FREETYPE */ /* -ZEXTERN(int) inflateInit OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - Initializes the internal stream state for decompression. The fields + Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. + the caller. In the current version of inflate, the provided input is not + read or consumed. The allocation of a sliding window will be deferred to + the first call of inflate (if the decompression does not complete on the + first call). If zalloc and zfree are set to Z_NULL, inflateInit updates + them to use default allocation functions. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression. + Actual decompression will be done by inflate(). So next_in, and avail_in, + next_out, and avail_out are unused and unchanged. The current + implementation of inflateInit() does not process any header information -- + that is deferred until inflate() is called. */ -ZEXTERN(int) inflate OF((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); /* inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may some - introduce some output latency (reading input without producing any output) - except when forced to flush. + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. - The detailed semantics are as follows. inflate performs one or both of the + The detailed semantics are as follows. inflate performs one or both of the following actions: - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing - will resume at this point for the next call of inflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there - is no more input data or no more space in the output buffer (see below - about the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating the next_* and avail_* values accordingly. - The application can consume the uncompressed output when it wants, for - example when the output buffer is full (avail_out == 0), or after each - call of inflate(). If inflate returns Z_OK and with zero avail_out, it - must be called again after making room in the output buffer because there - might be more output pending. - - If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much - output as possible to the output buffer. The flushing behavior of inflate is - not specified for values of the flush parameter other than Z_SYNC_FLUSH - and Z_FINISH, but the current implementation actually flushes as much output - as possible anyway. + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), then next_in and avail_in are updated + accordingly, and processing will resume at this point for the next call of + inflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. If the + caller of inflate() does not provide both available input and available + output space, it is possible that there will be no progress made. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. + + The Z_BLOCK option assists in appending to or combining deflate streams. + To assist in this, on return inflate() always sets strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step - (a single call of inflate), the parameter flush should be set to - Z_FINISH. In this case all pending input is processed and all pending - output is flushed; avail_out must be large enough to hold all the - uncompressed data. (The size of the uncompressed data may have been saved - by the compressor for this purpose.) The next operation on this stream must - be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster routine - may be used for the single inflate() call. - - If a preset dictionary is needed at this point (see inflateSetDictionary - below), inflate sets strm-adler to the adler32 checksum of the - dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise - it sets strm->adler to the adler32 checksum of all output produced - so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or - an error code as described below. At the end of the stream, inflate() - checks that its computed adler32 checksum is equal to that saved by the - compressor and returns Z_STREAM_END only if the checksum is correct. + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all of the uncompressed data for the + operation to complete. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The use of Z_FINISH is not + required to perform an inflation in one step. However it may be used to + inform inflate that a faster approach can be used for the single inflate() + call. Z_FINISH also informs inflate to not maintain a sliding window if the + stream completes, which reduces inflate's memory footprint. If the stream + does not complete, either because not all of the stream is provided or not + enough output space is provided, then a sliding window will be allocated and + inflate() can be called again to continue the operation as if Z_NO_FLUSH had + been used. + + In this implementation, inflate() always flushes as much output as + possible to the output buffer, and always uses the faster approach on the + first call. So the effects of the flush parameter in this implementation are + on the return value of inflate() as noted below, when inflate() returns early + when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of + memory for a sliding window when Z_FINISH is used. + + If a preset dictionary is needed after this call (see inflateSetDictionary + below), inflate sets strm->adler to the Adler-32 checksum of the dictionary + chosen by the compressor and returns Z_NEED_DICT; otherwise it sets + strm->adler to the Adler-32 checksum of all output produced so far (that is, + total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described + below. At the end of the stream, inflate() checks that its computed Adler-32 + checksum is equal to that saved by the compressor and returns Z_STREAM_END + only if the checksum is correct. + + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained unless inflateGetHeader() is used. When processing + gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output + produced so far. The CRC-32 is checked against the gzip trailer, as is the + uncompressed length, modulo 2^32. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has been reached and all uncompressed output has been produced, Z_NEED_DICT if a preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect - adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent - (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if no progress is possible or if there was not - enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR - case, the application may then call inflateSync to look for a good - compression block. + corrupted (input stream not conforming to the zlib format or incorrect check + value, in which case strm->msg points to a string with a more specific + error), Z_STREAM_ERROR if the stream structure was inconsistent (for example + next_in or next_out was Z_NULL, or the state was inadvertently written over + by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR + if no progress was possible or if there was not enough room in the output + buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + inflate() can be called again with more input and more output space to + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is to be attempted. */ -ZEXTERN(int) inflateEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. + This function discards any unprocessed input and does not flush any pending + output. - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). + inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state + was inconsistent. */ + /* Advanced functions */ /* The following functions are needed only in some special applications. */ +#ifndef Z_FREETYPE + /* -ZEXTERN(int) deflateInit2 OF((z_streamp strm, +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy)); - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller. + This is another version of deflateInit with more compression options. The + fields zalloc, zfree and opaque must be initialized before by the caller. - The method parameter is the compression method. It must be Z_DEFLATED in + The method parameter is the compression method. It must be Z_DEFLATED in this version of the library. The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if deflateInit is used instead. + For the current implementation of deflate(), a windowBits value of 8 (a + window size of 256 bytes) is not supported. As a result, a request for 8 + will result in 9 (a 512-byte window). In that case, providing 8 to + inflateInit2() will result in an error when the zlib header with 9 is + checked against the initialization of inflate(). The remedy is to not use 8 + with deflateInit2() with this initialization, or at least in that case use 9 + with inflateInit2(). + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute a check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to the appropriate value, + if the operating system was determined at compile time. If a gzip stream is + being written, strm->adler is a CRC-32 instead of an Adler-32. + + For raw deflate or gzip encoding, a request for a 256-byte window is + rejected as invalid, since only the zlib header provides a means of + transmitting the window size to the decompressor. + The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel. + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. - The strategy parameter is used to tune the compression algorithm. Use the + The strategy parameter is used to tune the compression algorithm. Use the value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match). Filtered data consists mostly of small values with a - somewhat random distribution. In this case, the compression algorithm is - tuned to compress them better. The effect of Z_FILTERED is to force more - Huffman coding and less string matching; it is somewhat intermediate - between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects - the compression ratio but not the correctness of the compressed output even - if it is not set appropriately. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. deflateInit2 does - not perform any compression: this will be done by deflate(). + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). */ +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); /* Initializes the compression dictionary from the given byte sequence - without producing any compressed output. This function must be called - immediately after deflateInit, deflateInit2 or deflateReset, before any - call of deflate. The compressor and decompressor must use exactly the same - dictionary (see inflateSetDictionary). + without producing any compressed output. When using the zlib format, this + function must be called immediately after deflateInit, deflateInit2 or + deflateReset, and before any call of deflate. When doing raw deflate, this + function must be called either before any call of deflate, or immediately + after the completion of a deflate block, i.e. after all input has been + consumed and all output has been delivered when using any of the flush + options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The + compressor and decompressor must use exactly the same dictionary (see + inflateSetDictionary). The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a + used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. Depending on the size of the compression data structures selected by deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size in - deflate or deflate2. Thus the strings most likely to be useful should be - put at the end of the dictionary, not at the front. + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. - Upon return of this function, strm->adler is set to the Adler32 value + Upon return of this function, strm->adler is set to the Adler-32 value of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The Adler32 value + which dictionary has been used by the compressor. (The Adler-32 value applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) + actually used by the compressor.) If a raw deflate was requested, then the + Adler-32 value is not computed and strm->adler is not set. deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent (for example if deflate has already been called for this stream - or if the compression method is bsort). deflateSetDictionary does not - perform any compression: this will be done by deflate(). + or if not at a block boundary for raw deflate). deflateSetDictionary does + not perform any compression: this will be done by deflate(). */ +ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by deflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If deflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similary, if dictLength is Z_NULL, then it is not set. + + deflateGetDictionary() may return a length less than the window size, even + when more than the window size in input has been provided. It may return up + to 258 bytes less in that case, due to how zlib's implementation of deflate + manages the sliding window and lookahead for matches, where matches can be + up to 258 bytes long. If the application needs the last window-size bytes of + input, then that would need to be saved by the application outside of zlib. + + deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); /* Sets the destination stream as a complete copy of the source stream. This function can be useful when several compression strategies will be tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed + data with a filter. The streams that will be discarded should then be freed by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and - can consume lots of memory. + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and + (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); /* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. - The stream will keep the same compression level and any other attributes - that may have been set by deflateInit2. + This function is equivalent to deflateEnd followed by deflateInit, but + does not free and reallocate the internal compression state. The stream + will leave the compression level and any other attributes that may have been + set unchanged. - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). */ +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); /* Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be + interpretation of level and strategy is as in deflateInit2(). This can be used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different - strategy. If the compression level is changed, the input available so far - is compressed with the old level (and may be flushed); the new level will - take effect only at the next call of deflate(). + to switch to a different kind of input data requiring a different strategy. + If the compression approach (which is a function of the level) or the + strategy is changed, and if there have been any deflate() calls since the + state was initialized or reset, then the input available so far is + compressed with the old level and strategy using deflate(strm, Z_BLOCK). + There are three approaches for the compression levels 0, 1..3, and 4..9 + respectively. The new level and strategy will take effect at the next call + of deflate(). + + If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does + not have enough output space to complete, then the parameter change will not + take effect. In this case, deflateParams() can be called again with the + same parameters and more output space to try again. + + In order to assure a change in the parameters on the first try, the + deflate stream should be flushed using deflate() with Z_BLOCK or other flush + request until strm.avail_out is not zero, before calling deflateParams(). + Then no more input data should be provided before the deflateParams() call. + If this is done, the old level and strategy will be applied to the data + compressed before deflateParams(), and the new level and strategy will be + applied to the the data compressed after deflateParams(). + + deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream + state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if + there was not enough output space to complete the compression of the + available input data before a change in the strategy or approach. Note that + in the case of a Z_BUF_ERROR, the parameters are not changed. A return + value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be + retried with more output space. +*/ - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to - be compressed and flushed. In particular, strm->avail_out must be non-zero. +ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain)); +/* + Fine tune deflate's internal compression parameters. This should only be + used by someone who understands the algorithm used by zlib's deflate for + searching for the best matching string, and even then only by the most + fanatic optimizer trying to squeeze out the last compressed bit for their + specific input data. Read the deflate.c source code for the meaning of the + max_lazy, good_length, nice_length, and max_chain parameters. + + deflateTune() can be called after deflateInit() or deflateInit2(), and + returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. + */ - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR - if strm->avail_out was zero. +ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, + uLong sourceLen)); +/* + deflateBound() returns an upper bound on the compressed size after + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). If that first deflate() call is provided the + sourceLen input bytes, an output buffer allocated to the size returned by + deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed + to return Z_STREAM_END. Note that it is possible for the compressed size to + be larger than the value returned by deflateBound() if flush options other + than Z_FINISH or Z_NO_FLUSH are used. */ +ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, + unsigned *pending, + int *bits)); +/* + deflatePending() returns the number of bytes and bits of output that have + been generated, but not yet provided in the available output. The bytes not + provided would be due to the available output space having being consumed. + The number of bits of output not provided are between 0 and 7, where they + await more bits to join them in order to fill out a full byte. If pending + or bits are Z_NULL, then those values are not set. + + deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. + */ + +ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, + int bits, + int value)); /* -ZEXTERN(int) inflateInit2 OF((z_streamp strm, + deflatePrime() inserts bits in the deflate output stream. The intent + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. + + deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough + room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, + gz_headerp head)); +/* + deflateSetHeader() provides gzip header information for when a gzip + stream is requested by deflateInit2(). deflateSetHeader() may be called + after deflateInit2() or deflateReset() and before the first call of + deflate(). The text, time, os, extra field, name, and comment information + in the provided gz_header structure are written to the gzip header (xflag is + ignored -- the extra flags are set according to the compression level). The + caller must assure that, if not Z_NULL, name and comment are terminated with + a zero byte, and that if extra is not Z_NULL, that extra_len bytes are + available there. If hcrc is true, a gzip header crc is included. Note that + the current versions of the command-line version of gzip (up through version + 1.3.x) do not support header crc's, and will report that it is a "multi-part + gzip file" and give up. + + If deflateSetHeader is not used, the default gzip header has text false, + the time set to zero, and os set to 255, with no extra, name, or comment + fields. The gzip header is returned to the default state by deflateReset(). + + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, int windowBits)); - This is another version of inflateInit with an extra parameter. The + This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by the caller. The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. If a compressed stream with a larger window size is given as - input, inflate() will return with the error code Z_DATA_ERROR instead of - trying to allocate a larger window. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative - memLevel). msg is set to null if there is no error message. inflateInit2 - does not perform any decompression apart from reading the zlib header if - present: this will be done by inflate(). (So next_in and avail_in may be - modified, but next_out and avail_out are unchanged.) + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an Adler-32 or a CRC-32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see + below), inflate() will *not* automatically decode concatenated gzip members. + inflate() will return Z_STREAM_END at the end of the gzip member. The state + would need to be reset to continue decoding a subsequent gzip member. This + *must* be done if there is more data after a gzip member, in order for the + decompression to be compliant with the gzip standard (RFC 1952). + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. */ +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); /* Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate - if this call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the Adler32 value returned by this call of - inflate. The compressor and decompressor must use exactly the same - dictionary (see deflateSetDictionary). + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler-32 value returned by that call of inflate. + The compressor and decompressor must use exactly the same dictionary (see + deflateSetDictionary). For raw inflate, this function can be called at any + time to set the dictionary. If the provided dictionary is smaller than the + window and there is already data in the window, then the provided dictionary + will amend what's there. The application must insure that the dictionary + that was used for compression is provided. inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect Adler32 value). inflateSetDictionary does not + expected one (incorrect Adler-32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of inflate(). */ +ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by inflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If inflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similary, if dictLength is Z_NULL, then it is not set. + + inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); /* - Skips invalid compressed data until a full flush point (see above the - description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. + Skips invalid compressed data until a possible full flush point (see above + for the description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync searches for a 00 00 FF FF pattern in the compressed data. + All full flush points have this pattern, but not all occurrences of this + pattern are full flush points. + + inflateSync returns Z_OK if a possible full flush point has been found, + Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point + has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. + In the success case, the application may save the current current value of + total_in which indicates where valid compressed data was found. In the + error case, the application may repeatedly call inflateSync, providing more + input each time, until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. - inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR - if no more input was provided, Z_DATA_ERROR if no flush point has been found, - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success - case, the application may save the current value of total_in which - indicates where valid compressed data was found. In the error case, the - application may repeatedly call inflateSync, providing more input each time, - until success or end of the input data. + This function can be useful when randomly accessing a large stream. The + first pass through the stream can periodically record the inflate state, + allowing restarting inflate at those points when randomly accessing the + stream. + + inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. */ -ZEXTERN(int) inflateReset OF((z_streamp strm)); +#endif /* !Z_FREETYPE */ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); /* This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. - The stream will keep attributes that may have been set by inflateInit2. + but does not free and reallocate the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, + int windowBits)); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. If the window size is changed, then the + memory allocated for the window is freed, and the window will be reallocated + by inflate() if needed. + + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. +*/ + +#ifndef Z_FREETYPE + +ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + This function inserts bits in the inflate input stream. The intent is + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above, or -65536 if the provided + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, + gz_headerp head)); +/* + inflateGetHeader() requests that gzip header information be stored in the + provided gz_header structure. inflateGetHeader() may be called after + inflateInit2() or inflateReset(), and before the first call of inflate(). + As inflate() processes the gzip stream, head->done is zero until the header + is completed, at which time head->done is set to one. If a zlib stream is + being decoded, then head->done is set to -1 to indicate that there will be + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. + + The text, time, xflags, and os fields are filled in with the gzip header + contents. hcrc is set to true if there is a header CRC. (The header CRC + was valid if done is set to one.) If extra is not Z_NULL, then extra_max + contains the maximum number of bytes to write to extra. Once done is true, + extra_len contains the actual extra field length, and extra contains the + extra field, or that field truncated if extra_max is less than extra_len. + If name is not Z_NULL, then up to name_max characters are written there, + terminated with a zero unless the length is greater than name_max. If + comment is not Z_NULL, then up to comm_max characters are written there, + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its + absence. This allows the use of deflateSetHeader() with the returned + structure to duplicate the header. However if those fields are set to + allocated memory, then the application will need to save those pointers + elsewhere so that they can be eventually freed. + + If inflateGetHeader is not used, then the header information is simply + discarded. The header is always checked for validity, including the header + CRC if present. inflateReset() will reset the process to discard the header + information. The application would need to call inflateGetHeader() again to + retrieve the header from the next gzip stream. + + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +#endif /* !Z_FREETYPE */ + +/* +ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, + unsigned char FAR *window)); + + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + See inflateBack() for the usage of these routines. + + inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of + the parameters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. +*/ + +typedef unsigned (*in_func) OF((void FAR *, + z_const unsigned char FAR * FAR *)); +typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). +#ifndef Z_FREETYPE + +ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); +/* + inflateBack() does a raw inflate with a single call using a call-back + interface for input and output. This is potentially more efficient than + inflate() for file i/o applications, in that it avoids copying between the + output and the sliding window by simply making the window itself the output + buffer. inflate() can be faster on modern CPUs when used with large + buffers. inflateBack() trusts the application to not change the output + buffer passed by the output function, at least until inflateBack() returns. + + inflateBackInit() must be called first to allocate the internal state + and to initialize the state with the user-provided window buffer. + inflateBack() may then be used multiple times to inflate a complete, raw + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. + + A raw deflate stream is one with no zlib or gzip header or trailer. + This routine would normally be used in a utility that reads zip or gzip + files and writes out uncompressed files. The utility would decode the + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the default + behavior of inflate(), which expects a zlib header and trailer around the + deflate stream. + + inflateBack() uses two subroutines supplied by the caller that are then + called by inflateBack() for input and output. inflateBack() calls those + routines until it reads a complete deflate stream and writes out all of the + uncompressed data, or until it encounters an error. The function's + parameters and return types are defined above in the in_func and out_func + typedefs. inflateBack() will call in(in_desc, &buf) which should return the + number of bytes of provided input, and a pointer to that input in buf. If + there is no input available, in() must return zero -- buf is ignored in that + case -- and inflateBack() will return a buffer error. inflateBack() will + call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. + out() should return zero on success, or non-zero on failure. If out() + returns non-zero, inflateBack() will return with an error. Neither in() nor + out() are permitted to change the contents of the window provided to + inflateBackInit(), which is also the buffer that out() uses to write from. + The length written by out() will be at most the window size. Any non-zero + amount of input may be provided by in(). + + For convenience, inflateBack() can be provided input on the first call by + setting strm->next_in and strm->avail_in. If that input is exhausted, then + in() will be called. Therefore strm->next_in must be initialized before + calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called + immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in + must also be initialized, and then if strm->avail_in is not zero, input will + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + + The in_desc and out_desc parameters of inflateBack() is passed as the + first parameter of in() and out() respectively when they are called. These + descriptors can be optionally used to pass any information that the caller- + supplied in() and out() functions need to do their job. + + On return, inflateBack() will set strm->next_in and strm->avail_in to + pass back any unused input that was provided by the last in() call. The + return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. */ +ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); +/* + All memory allocated by inflateBackInit() is freed. + + inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream + state was inconsistent. +*/ + +ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); +/* Return flags indicating compile-time options. + + Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: + 1.0: size of uInt + 3.2: size of uLong + 5.4: size of voidpf (pointer) + 7.6: size of z_off_t + + Compiler, assembler, and debug options: + 8: ZLIB_DEBUG + 9: ASMV or ASMINF -- use ASM code + 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention + 11: 0 (reserved) + + One-time table building (smaller code, but not thread-safe if true): + 12: BUILDFIXED -- build static block decoding tables when needed + 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed + 14,15: 0 (reserved) + + Library content (indicates missing functionality): + 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking + deflate code when not needed) + 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect + and decode gzip streams (to avoid linking crc code) + 18-19: 0 (reserved) + + Operation variations (changes in library functionality): + 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate + 21: FASTEST -- deflate algorithm with only one, lowest compression level + 22,23: 0 (reserved) + + The sprintf variant used by gzprintf (zero is best): + 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format + 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! + 26: 0 = returns value, 1 = void -- 1 means inferred string length returned + + Remainder: + 27-31: 0 (reserved) + */ + +#endif /* !Z_FREETYPE */ + +#ifndef Z_SOLO /* utility functions */ /* - The following utility functions are implemented on top of the - basic stream-oriented functions. To simplify the interface, some - default options are assumed (compression level and memory usage, - standard memory allocation functions). The source code of these - utility functions can easily be modified if you need special options. + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. */ +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); /* Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be at least 0.1% larger than - sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the - compressed buffer. - This function can be used to compress a whole file at once if the - input file is mmap'ed. + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. compress() is equivalent to compress2() with a level + parameter of Z_DEFAULT_COMPRESSION. + compress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer. */ +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); /* - Compresses the source buffer into the destination buffer. The level + Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least 0.1% larger than sourceLen plus - 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, Z_STREAM_ERROR if the level parameter is invalid. */ +ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); +/* + compressBound() returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); /* Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed data. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted. + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In + the case where there is not enough room, uncompress() will fill the output + buffer with the uncompressed data up to that point. +*/ + +ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen)); +/* + Same as uncompress, except that sourceLen is a pointer, where the + length of the source is *sourceLen. On return, *sourceLen is the number of + source bytes consumed. +*/ + + /* gzip file access functions */ + +/* + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. */ +typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ /* - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb") but can also include a compression level - ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for - Huffman only compression as in "wb1h". (See the description - of deflateInit2 for more information about the strategy parameter.) +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); + + Open the gzip (.gz) file at path for reading and decompressing, or + compressing and writing. The mode parameter is as in fopen ("rb" or "wb") + but can also include a compression level ("wb9") or a strategy: 'f' for + filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h", + 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression + as in "wb9F". (See the description of deflateInit2 for more information + about the strategy parameter.) 'T' will request transparent writing or + appending with no compression and not using the gzip format. + + "a" can be used instead of "w" to request that the gzip stream that will + be written be appended to the file. "+" will result in an error, since + reading and writing to the same gzip file is not supported. The addition of + "x" when writing will create the file exclusively, which fails if the file + already exists. On systems that support it, the addition of "e" when + reading or writing will set the flag to close the file on an execve() call. + + These functions, as well as gzip, will read and decode a sequence of gzip + streams in a file. The append function of gzopen() can be used to create + such a file. (Also see gzflush() for another way to do this.) When + appending, gzopen does not test whether the file begins with a gzip stream, + nor does it look for the end of the gzip streams to begin appending. gzopen + will simply append a gzip stream to the existing file. gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. + case gzread will directly read from the file without decompression. When + reading, this will be detected automatically by looking for the magic two- + byte gzip header. + + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ - gzopen returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). */ +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + Associate a gzFile with the file descriptor fd. File descriptors are + obtained from calls like open, dup, creat, pipe or fileno (if the file has + been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. If you are using fileno() to get the + file descriptor from a FILE *, then you will have to use dup() to avoid + double-close()ing the file descriptor. Both gzclose() and fclose() will + close the associated file descriptor, so they need to have different file + descriptors. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ +ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); /* - gzdopen() associates a gzFile with the file descriptor fd. File - descriptors are obtained from calls like open, dup, creat, pipe or - fileno (in the file has been previously opened with fopen). - The mode parameter is as in gzopen. - The next call of gzclose on the returned gzFile will also close the - file descriptor fd, just like fclose(fdopen(fd), mode) closes the file - descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). - gzdopen returns NULL if there was insufficient memory to allocate - the (de)compression state. + Set the internal buffer size used by this library's functions for file to + size. The default buffer size is 8192 bytes. This function must be called + after gzopen() or gzdopen(), and before any other calls that read or write + the file. The buffer memory allocation is always deferred to the first read + or write. Three times that size in buffer space is allocated. A larger + buffer size of, for example, 64K or 128K bytes will noticeably increase the + speed of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. */ +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); /* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. + Dynamically update the compression level and strategy for file. See the + description of deflateInit2 for the meaning of these parameters. Previously + provided data is flushed before applying the parameter changes. + + gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not + opened for writing, Z_ERRNO if there is an error writing the flushed data, + or Z_MEM_ERROR if there is a memory allocation error. */ +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); /* - Reads the given number of uncompressed bytes from the compressed file. - If the input file was not in gzip format, gzread copies the given number - of bytes into the buffer. - gzread returns the number of uncompressed bytes actually read (0 for - end of file, -1 for error). */ + Read and decompress up to len uncompressed bytes from file into buf. If + the input file is not in gzip format, gzread copies the given number of + bytes into the buffer directly from the file. + + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream. Any number of gzip streams may be + concatenated in the input file, and will all be decompressed by gzread(). + If something other than a gzip stream is encountered after a gzip stream, + that remaining trailing garbage is ignored (and no error is returned). + + gzread can be used to read a gzip file that is being concurrently written. + Upon reaching the end of the input, gzread will return with the available + data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then + gzclearerr can be used to clear the end of file indicator in order to permit + gzread to be tried again. Z_OK indicates that a gzip stream was completed + on the last gzread. Z_BUF_ERROR indicates that the input file ended in the + middle of a gzip stream. Note that gzread does not return -1 in the event + of an incomplete gzip stream. This error is deferred until gzclose(), which + will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip + stream. Alternatively, gzerror can be used before gzclose to detect this + case. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. If len is too large to fit in an int, + then nothing is read, -1 is returned, and the error state is set to + Z_STREAM_ERROR. +*/ +ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, + gzFile file)); /* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes actually written - (0 in case of error). + Read and decompress up to nitems items of size size from file into buf, + otherwise operating as gzread() does. This duplicates the interface of + stdio's fread(), with size_t request and return types. If the library + defines size_t, then z_size_t is identical to size_t. If not, then z_size_t + is an unsigned integer type that can contain a pointer. + + gzfread() returns the number of full items read of size size, or zero if + the end of the file was reached and a full item could not be read, or if + there was an error. gzerror() must be consulted if zero is returned in + order to determine if there was an error. If the multiplication of size and + nitems overflows, i.e. the product does not fit in a z_size_t, then nothing + is read, zero is returned, and the error state is set to Z_STREAM_ERROR. + + In the event that the end of file is reached and only a partial item is + available at the end, i.e. the remaining uncompressed data length is not a + multiple of size, then the final partial item is nevetheless read into buf + and the end-of-file flag is set. The length of the partial item read is not + provided, but could be inferred from the result of gztell(). This behavior + is the same as the behavior of fread() implementations in common libraries, + but it prevents the direct use of gzfread() to read a concurrently written + file, reseting and retrying on end-of-file, when size is not 1. */ +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len)); /* - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). + Compress and write the len uncompressed bytes at buf to file. gzwrite + returns the number of uncompressed bytes written or 0 in case of error. */ +ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, + z_size_t nitems, gzFile file)); /* - Writes the given null-terminated string to the compressed file, excluding + Compress and write nitems items of size size from buf to file, duplicating + the interface of stdio's fwrite(), with size_t request and return types. If + the library defines size_t, then z_size_t is identical to size_t. If not, + then z_size_t is an unsigned integer type that can contain a pointer. + + gzfwrite() returns the number of full items written of size size, or zero + if there was an error. If the multiplication of size and nitems overflows, + i.e. the product does not fit in a z_size_t, then nothing is written, zero + is returned, and the error state is set to Z_STREAM_ERROR. +*/ + +ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); +/* + Convert, format, compress, and write the arguments (...) to file under + control of the string format, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or a negative zlib error code in case + of error. The number of uncompressed bytes written is limited to 8191, or + one less than the buffer size given to gzbuffer(). The caller should assure + that this limit is not exceeded. If it is exceeded, then gzprintf() will + return an error (0) with nothing written. In this case, there may also be a + buffer overflow with unpredictable consequences, which is possible only if + zlib was compiled with the insecure functions sprintf() or vsprintf(), + because the secure snprintf() or vsnprintf() functions were not available. + This can be determined using zlibCompileFlags(). +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Compress and write the given null-terminated string s to file, excluding the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. + + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Read and decompress bytes from file into buf, until len-1 characters are + read, or until a newline character is read and transferred to buf, or an + end-of-file condition is encountered. If any characters are read or if len + is one, the string is terminated with a null character. If no characters + are read due to an end-of-file or len is less than one, then the buffer is + left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. */ +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); /* - Reads bytes from the compressed file until len-1 characters are read, or - a newline character is read and transferred to buf, or an end-of-file - condition is encountered. The string is then terminated with a null - character. - gzgets returns buf, or Z_NULL in case of error. + Compress and write c, converted to an unsigned char, into file. gzputc + returns the value that was written, or -1 in case of error. */ +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); /* - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. + Read and decompress one byte from file. gzgetc returns this byte or -1 + in case of end of file or error. This is implemented as a macro for speed. + As such, it does not do all of the checking the other functions do. I.e. + it does not check to see if file is NULL, nor whether the structure file + points to has been clobbered or not. */ +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); /* - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. + Push c back onto the stream for file to be read as the first character on + the next read. At least one character of push-back is always allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). */ +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); /* - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. The return value is the zlib - error number (see function gzerror below). gzflush returns Z_OK if - the flush parameter is Z_FINISH and all output could be flushed. - gzflush should be called only when strictly necessary because it can - degrade compression. + Flush all pending output to file. The parameter flush is as in the + deflate() function. The return value is the zlib error number (see function + gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatenated gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. */ /* - Sets the starting position for the next gzread or gzwrite on the - given compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); + + Set the starting position to offset relative to whence for the next gzread + or gzwrite on file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are + extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position. - gzseek returns the resulting offset location as measured in bytes from + gzseek returns the resulting offset location as measured in bytes from the beginning of the uncompressed stream, or -1 in case of error, in particular if the file is opened for writing and the new starting position would be before the current position. */ +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); /* - Rewinds the given file. This function is supported only for reading. + Rewind file. This function is supported only for reading. - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET). */ /* - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) + Return the starting position for the next gzread or gzwrite on file. + This position represents a number of bytes in the uncompressed data stream, + and is zero when starting, even if appending or reading a gzip stream from + the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); + + Return the current compressed (actual) read or write offset of file. This + offset includes the count of bytes that precede the gzip stream, for example + when appending or when using gzdopen() for reading. When reading, the + offset does not include as yet unused buffered input. This information can + be used for a progress indicator. On error, gzoffset() returns -1. +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Return true (1) if the end-of-file indicator for file has been set while + reading, false (0) otherwise. Note that the end-of-file indicator is set + only if the read tried to go past the end of the input, but came up short. + Therefore, just like feof(), gzeof() may return false even if there is no + more data to read, in the event that the last read request was for the exact + number of bytes remaining in the input file. This will happen if the input + file size is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. +*/ + +ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); +/* + Return true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). + + When writing, gzdirect() returns true (1) if transparent writing was + requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: + gzdirect() is not needed when writing. Transparent writing must be + explicitly requested, so the application already knows the answer. When + linking statically, using gzdirect() will include all of the zlib code for + gzip file reading and decompression, which may not be desired.) */ +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); /* - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. + Flush all pending output for file, if necessary, close file and + deallocate the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the + last read ended in the middle of a gzip stream, or Z_OK on success. */ +ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); /* - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. */ +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); /* - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. + Return the error message for the last error which occurred on file. + errnum is set to zlib error number. If an error occurred in the file system + and not in the compression library, errnum is set to Z_ERRNO and the + application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. */ +ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); +/* + Clear the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip + file that is being written concurrently. +*/ + +#endif /* !Z_SOLO */ + /* checksum functions */ /* These functions are not related to compression but are exported - anyway because they might be useful in applications using the - compression library. + anyway because they might be useful in applications using the compression + library. */ -ZEXTERN(uLong) adler32 OF((uLong adler, const Bytef *buf, uInt len)); - +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is NULL, this function returns - the required initial value for the checksum. - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. Usage example: + return the updated checksum. An Adler-32 value is in the range of a 32-bit + unsigned integer. If buf is Z_NULL, this function returns the required + initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed + much faster. + + Usage example: uLong adler = adler32(0L, Z_NULL, 0); @@ -789,11 +1720,32 @@ ZEXTERN(uLong) adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ +ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, + z_size_t len)); +/* + Same as adler32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, + z_off_t len2)); + + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 + and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for + each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note + that the z_off_t type (like off_t) is a signed integer. If len2 is + negative, the result has no meaning or utility. +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); /* - Update a running crc with the bytes buf[0..len-1] and return the updated - crc. If buf is NULL, this function returns the required initial value - for the crc. Pre- and post-conditioning (one's complement) is performed - within this function so it shouldn't be done by the application. + Update a running CRC-32 with the bytes buf[0..len-1] and return the + updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. + If buf is Z_NULL, this function returns the required initial value for the + crc. Pre- and post-conditioning (one's complement) is performed within this + function so it shouldn't be done by the application. + Usage example: uLong crc = crc32(0L, Z_NULL, 0); @@ -804,27 +1756,213 @@ ZEXTERN(uLong) adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (crc != original_crc) error(); */ +#ifndef Z_FREETYPE + +ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf, + z_size_t len)); +/* + Same as crc32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); + + Combine two CRC-32 check values into one. For two sequences of bytes, + seq1 and seq2 with lengths len1 and len2, CRC-32 check values were + calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 + check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and + len2. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2)); + + Return the operator corresponding to length len2, to be used with + crc32_combine_op(). +*/ + +ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); +/* + Give the same result as crc32_combine(), using op in place of len2. op is + is generated from len2 by crc32_combine_gen(). This will be faster than + crc32_combine() if the generated op is used more than once. +*/ + /* various hacks, don't look :) */ /* deflateInit and inflateInit are macros to allow checking the zlib version * and the compiler's view of z_stream: */ -ZEXTERN(int) inflateInit2_ OF((z_streamp strm, int windowBits, +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size)); +#ifdef Z_PREFIX_SET +# define z_deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define z_inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#else +# define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#endif + +#else /* Z_FREETYPE */ + + +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, const char *version, int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) + +#endif /* Z_FREETYPE */ + + +#ifndef Z_SOLO + +/* gzgetc() macro and its supporting function and exposed data structure. Note + * that the real internal state is much larger than the exposed structure. + * This abbreviated structure exposes just enough for the gzgetc() macro. The + * user should not mess with these exposed elements, since their names or + * behavior could change in the future, perhaps even capriciously. They can + * only be used by the gzgetc() macro. You have been warned. + */ +struct gzFile_s { + unsigned have; + unsigned char *next; + z_off64_t pos; +}; +ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +# define z_gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#else +# define gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#endif + +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#ifdef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t)); +#endif + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) +# ifdef Z_PREFIX_SET +# define z_gzopen z_gzopen64 +# define z_gzseek z_gzseek64 +# define z_gztell z_gztell64 +# define z_gzoffset z_gzoffset64 +# define z_adler32_combine z_adler32_combine64 +# define z_crc32_combine z_crc32_combine64 +# define z_crc32_combine_gen z_crc32_combine_gen64 +# else +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# define crc32_combine_gen crc32_combine_gen64 +# endif +# ifndef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); +#endif + +#else /* Z_SOLO */ + +#ifndef Z_FREETYPE + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); +#endif + +#endif /* !Z_SOLO */ + +/* undocumented functions */ +#ifndef Z_FREETYPE +ZEXTERN const char * ZEXPORT zError OF((int)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); +ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); +ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp)); +ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); +ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); +#if defined(_WIN32) && !defined(Z_SOLO) +ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, + const char *mode)); +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, + const char *format, + va_list va)); +# endif +#endif +#endif /* !Z_FREETYPE */ #ifdef __cplusplus } #endif -#endif /* _ZLIB_H */ +#endif /* ZLIB_H */ diff --git a/thirdparty/freetype/src/gzip/zutil.c b/thirdparty/freetype/src/gzip/zutil.c index 7ad0c1f81b..a19ac2b96d 100644 --- a/thirdparty/freetype/src/gzip/zutil.c +++ b/thirdparty/freetype/src/gzip/zutil.c @@ -1,23 +1,155 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2002 Jean-loup Gailly. + * Copyright (C) 1995-2017 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ #include "zutil.h" +#ifndef Z_SOLO +# include "gzguts.h" +#endif -#ifndef STDC -extern void exit OF((int)); +z_const char * const z_errmsg[10] = { + (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */ + (z_const char *)"stream end", /* Z_STREAM_END 1 */ + (z_const char *)"", /* Z_OK 0 */ + (z_const char *)"file error", /* Z_ERRNO (-1) */ + (z_const char *)"stream error", /* Z_STREAM_ERROR (-2) */ + (z_const char *)"data error", /* Z_DATA_ERROR (-3) */ + (z_const char *)"insufficient memory", /* Z_MEM_ERROR (-4) */ + (z_const char *)"buffer error", /* Z_BUF_ERROR (-5) */ + (z_const char *)"incompatible version",/* Z_VERSION_ERROR (-6) */ + (z_const char *)"" +}; + + +const char * ZEXPORT zlibVersion() +{ + return ZLIB_VERSION; +} + +uLong ZEXPORT zlibCompileFlags() +{ + uLong flags; + + flags = 0; + switch ((int)(sizeof(uInt))) { + case 2: break; + case 4: flags += 1; break; + case 8: flags += 2; break; + default: flags += 3; + } + switch ((int)(sizeof(uLong))) { + case 2: break; + case 4: flags += 1 << 2; break; + case 8: flags += 2 << 2; break; + default: flags += 3 << 2; + } + switch ((int)(sizeof(voidpf))) { + case 2: break; + case 4: flags += 1 << 4; break; + case 8: flags += 2 << 4; break; + default: flags += 3 << 4; + } + switch ((int)(sizeof(z_off_t))) { + case 2: break; + case 4: flags += 1 << 6; break; + case 8: flags += 2 << 6; break; + default: flags += 3 << 6; + } +#ifdef ZLIB_DEBUG + flags += 1 << 8; +#endif +#if defined(ASMV) || defined(ASMINF) + flags += 1 << 9; +#endif +#ifdef ZLIB_WINAPI + flags += 1 << 10; +#endif +#ifdef BUILDFIXED + flags += 1 << 12; +#endif +#ifdef DYNAMIC_CRC_TABLE + flags += 1 << 13; +#endif +#ifdef NO_GZCOMPRESS + flags += 1L << 16; +#endif +#ifdef NO_GZIP + flags += 1L << 17; +#endif +#ifdef PKZIP_BUG_WORKAROUND + flags += 1L << 20; +#endif +#ifdef FASTEST + flags += 1L << 21; +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifdef NO_vsnprintf + flags += 1L << 25; +# ifdef HAS_vsprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_vsnprintf_void + flags += 1L << 26; +# endif +# endif +#else + flags += 1L << 24; +# ifdef NO_snprintf + flags += 1L << 25; +# ifdef HAS_sprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_snprintf_void + flags += 1L << 26; +# endif +# endif +#endif + return flags; +} + +#ifdef ZLIB_DEBUG +#include <stdlib.h> +# ifndef verbose +# define verbose 0 +# endif +int ZLIB_INTERNAL z_verbose = verbose; + +void ZLIB_INTERNAL z_error ( + char *m) +{ + fprintf(stderr, "%s\n", m); + exit(1); +} #endif +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError( + int err) +{ + return ERR_MSG(err); +} + +#if defined(_WIN32_WCE) && _WIN32_WCE < 0x800 + /* The older Microsoft C Run-Time Library for Windows CE doesn't have + * errno. We define it as a global variable to simplify porting. + * Its value is always 0 and should not be used. + */ + int errno = 0; +#endif #ifndef HAVE_MEMCPY -void zmemcpy(dest, source, len) - Bytef* dest; - const Bytef* source; - uInt len; +void ZLIB_INTERNAL zmemcpy( + Bytef* dest, + const Bytef* source, + uInt len) { if (len == 0) return; do { @@ -25,10 +157,10 @@ void zmemcpy(dest, source, len) } while (--len != 0); } -int zmemcmp(s1, s2, len) - const Bytef* s1; - const Bytef* s2; - uInt len; +int ZLIB_INTERNAL zmemcmp( + const Bytef* s1, + const Bytef* s2, + uInt len) { uInt j; @@ -38,9 +170,9 @@ int zmemcmp(s1, s2, len) return 0; } -void zmemzero(dest, len) - Bytef* dest; - uInt len; +void ZLIB_INTERNAL zmemzero( + Bytef* dest, + uInt len) { if (len == 0) return; do { @@ -49,11 +181,13 @@ void zmemzero(dest, len) } #endif -#if defined( MSDOS ) && defined( __TURBOC__ ) && !defined( MY_ZCALLOC ) -#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__) -/* Small and medium model in Turbo C are for now limited to near allocation - * with reduced MAX_WBITS and MAX_MEM_LEVEL - */ +#ifndef Z_SOLO + +#ifdef SYS16BIT + +#ifdef __TURBOC__ +/* Turbo C in 16-bit mode */ + # define MY_ZCALLOC /* Turbo C malloc() does not allow dynamic allocation of 64K bytes @@ -80,11 +214,13 @@ local ptr_table table[MAX_PTR]; * a protected system like OS/2. Use Microsoft C instead. */ -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) { - voidpf buf = opaque; /* just to make some compilers happy */ + voidpf buf; ulg bsize = (ulg)items*size; + (void)opaque; + /* If we allocate less than 65520 bytes, we assume that farmalloc * will return a usable pointer which doesn't have to be normalized. */ @@ -104,9 +240,12 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) return buf; } -void zcfree (voidpf opaque, voidpf ptr) +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { int n; + + (void)opaque; + if (*(ush*)&ptr != 0) { /* object < 64K */ farfree(ptr); return; @@ -122,14 +261,13 @@ void zcfree (voidpf opaque, voidpf ptr) next_ptr--; return; } - ptr = opaque; /* just to make some compilers happy */ Assert(0, "zcfree: ptr not found"); } -#endif -#endif /* MSDOS && __TURBOC__ */ + +#endif /* __TURBOC__ */ -#if defined(M_I86) && !defined(__32BIT__) && !defined( MY_ZCALLOC ) +#ifdef M_I86 /* Microsoft C in 16-bit mode */ # define MY_ZCALLOC @@ -139,43 +277,49 @@ void zcfree (voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) { - if (opaque) opaque = 0; /* to make compiler happy */ + (void)opaque; return _halloc((long)items, size); } -void zcfree (voidpf opaque, voidpf ptr) +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { - if (opaque) opaque = 0; /* to make compiler happy */ + (void)opaque; _hfree(ptr); } -#endif /* MSC */ +#endif /* M_I86 */ + +#endif /* SYS16BIT */ #ifndef MY_ZCALLOC /* Any system without a special alloc function */ #ifndef STDC -extern voidp ft_scalloc OF((uInt items, uInt size)); -extern void ft_sfree OF((voidpf ptr)); +extern voidp malloc OF((uInt size)); +extern voidp calloc OF((uInt items, uInt size)); +extern void free OF((voidpf ptr)); #endif -voidpf zcalloc (opaque, items, size) - voidpf opaque; - unsigned items; - unsigned size; +voidpf ZLIB_INTERNAL zcalloc ( + voidpf opaque, + unsigned items, + unsigned size) { - if (opaque) items += size - size; /* make compiler happy */ - return (voidpf)ft_scalloc(items, size); + (void)opaque; + return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : + (voidpf)calloc(items, size); } -void zcfree (opaque, ptr) - voidpf opaque; - voidpf ptr; +void ZLIB_INTERNAL zcfree ( + voidpf opaque, + voidpf ptr) { - ft_sfree(ptr); - if (opaque) return; /* make compiler happy */ + (void)opaque; + free(ptr); } #endif /* MY_ZCALLOC */ + +#endif /* !Z_SOLO */ diff --git a/thirdparty/freetype/src/gzip/zutil.h b/thirdparty/freetype/src/gzip/zutil.h index c9688cd9c0..14f0f1a85e 100644 --- a/thirdparty/freetype/src/gzip/zutil.h +++ b/thirdparty/freetype/src/gzip/zutil.h @@ -1,5 +1,5 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2002 Jean-loup Gailly. + * Copyright (C) 1995-2022 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -10,26 +10,31 @@ /* @(#) $Id$ */ -#ifndef _Z_UTIL_H -#define _Z_UTIL_H +#ifndef ZUTIL_H +#define ZUTIL_H + +#ifdef HAVE_HIDDEN +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif #include "zlib.h" -#ifdef STDC -# include <stddef.h> +#if defined(STDC) && !defined(Z_SOLO) +# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) +# include <stddef.h> +# endif # include <string.h> # include <stdlib.h> #endif -#ifdef NO_ERRNO_H - extern int errno; -#else -# include <errno.h> -#endif #ifndef local # define local static #endif -/* compile with -Dlocal if your debugger can't find static symbols */ +/* since "static" is used to mean two completely different things in C, we + define "local" for the non-static meaning of "static", for readability + (compile with -Dlocal if your debugger can't find static symbols) */ typedef unsigned char uch; typedef uch FAR uchf; @@ -37,9 +42,24 @@ typedef unsigned short ush; typedef ush FAR ushf; typedef unsigned long ulg; +#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC) +# include <limits.h> +# if (ULONG_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned long +# elif (ULLONG_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned long long +# elif (UINT_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned +# endif +#endif + +extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ +/* (size given to avoid silly warnings with Visual C++) */ + +#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] #define ERR_RETURN(strm,err) \ - return (strm->msg = (char*)ERR_MSG(err), (err)) + return (strm->msg = ERR_MSG(err), (err)) /* To be used only when the state is known to be valid */ /* common constants */ @@ -69,90 +89,129 @@ typedef unsigned long ulg; /* target dependencies */ -#ifdef MSDOS +#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) # define OS_CODE 0x00 -# if defined(__TURBOC__) || defined(__BORLANDC__) -# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include <alloc.h> +# ifndef Z_SOLO +# if defined(__TURBOC__) || defined(__BORLANDC__) +# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) + /* Allow compilation with ANSI keywords only enabled */ + void _Cdecl farfree( void *block ); + void *_Cdecl farmalloc( unsigned long nbytes ); +# else +# include <alloc.h> +# endif +# else /* MSC or DJGPP */ +# include <malloc.h> # endif -# else /* MSC or DJGPP */ # endif #endif -#ifdef OS2 -# define OS_CODE 0x06 -#endif - -#ifdef WIN32 /* Window 95 & Windows NT */ -# define OS_CODE 0x0b +#ifdef AMIGA +# define OS_CODE 1 #endif #if defined(VAXC) || defined(VMS) -# define OS_CODE 0x02 +# define OS_CODE 2 # define F_OPEN(name, mode) \ - ft_fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") + fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") #endif -#ifdef AMIGA -# define OS_CODE 0x01 +#ifdef __370__ +# if __TARGET_LIB__ < 0x20000000 +# define OS_CODE 4 +# elif __TARGET_LIB__ < 0x40000000 +# define OS_CODE 11 +# else +# define OS_CODE 8 +# endif #endif #if defined(ATARI) || defined(atarist) -# define OS_CODE 0x05 +# define OS_CODE 5 +#endif + +#ifdef OS2 +# define OS_CODE 6 +# if defined(M_I86) && !defined(Z_SOLO) +# include <malloc.h> +# endif #endif #if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 0x07 -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include <unix.h> /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ +# define OS_CODE 7 +# ifndef Z_SOLO +# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +# include <unix.h> /* for fdopen */ +# else +# ifndef fdopen +# define fdopen(fd,mode) NULL /* No fdopen() */ +# endif # endif # endif #endif -#ifdef __50SERIES /* Prime/PRIMOS */ -# define OS_CODE 0x0F +#ifdef __acorn +# define OS_CODE 13 +#endif + +#if defined(WIN32) && !defined(__CYGWIN__) +# define OS_CODE 10 +#endif + +#ifdef _BEOS_ +# define OS_CODE 16 #endif -#ifdef TOPS20 -# define OS_CODE 0x0a +#ifdef __TOS_OS400__ +# define OS_CODE 18 +#endif + +#ifdef __APPLE__ +# define OS_CODE 19 #endif #if defined(_BEOS_) || defined(RISCOS) # define fdopen(fd,mode) NULL /* No fdopen() */ #endif -#if (defined(_MSC_VER) && (_MSC_VER > 600)) -# define fdopen(fd,type) _fdopen(fd,type) +#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX +# if defined(_WIN32_WCE) +# define fdopen(fd,mode) NULL /* No fdopen() */ +# else +# define fdopen(fd,type) _fdopen(fd,type) +# endif #endif +#if defined(__BORLANDC__) && !defined(MSDOS) + #pragma warn -8004 + #pragma warn -8008 + #pragma warn -8066 +#endif - /* Common defaults */ +#ifndef Z_FREETYPE + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_WIN32) && \ + (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +#endif + +#endif /* !Z_FREETYPE */ + + /* common defaults */ #ifndef OS_CODE -# define OS_CODE 0x03 /* assume Unix */ +# define OS_CODE 3 /* assume Unix */ #endif #ifndef F_OPEN -# define F_OPEN(name, mode) ft_fopen((name), (mode)) +# define F_OPEN(name, mode) fopen((name), (mode)) #endif /* functions */ -#ifdef HAVE_STRERROR - extern char *strerror OF((int)); -# define zstrerror(errnum) strerror(errnum) -#else -# define zstrerror(errnum) "" -#endif - -#if defined(pyr) +#if defined(pyr) || defined(Z_SOLO) # define NO_MEMCPY #endif #if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) @@ -176,16 +235,16 @@ typedef unsigned long ulg; # define zmemzero(dest, len) ft_memset(dest, 0, len) # endif #else - extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - extern void zmemzero OF((Bytef* dest, uInt len)); + void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); #endif /* Diagnostic functions */ -#ifdef DEBUG +#ifdef ZLIB_DEBUG # include <stdio.h> - extern int z_verbose; - extern void z_error OF((char *m)); + extern int ZLIB_INTERNAL z_verbose; + extern void ZLIB_INTERNAL z_error OF((char *m)); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} # define Trace(x) {if (z_verbose>=0) fprintf x ;} # define Tracev(x) {if (z_verbose>0) fprintf x ;} @@ -201,15 +260,19 @@ typedef unsigned long ulg; # define Tracecv(c,x) #endif - -typedef uLong (*check_func) OF((uLong check, const Bytef *buf, - uInt len)); -local voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); -local void zcfree OF((voidpf opaque, voidpf ptr)); +#ifndef Z_SOLO + voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, + unsigned size)); + void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); +#endif #define ZALLOC(strm, items, size) \ (*((strm)->zalloc))((strm)->opaque, (items), (size)) #define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) #define TRY_FREE(s, p) {if (p) ZFREE(s, p);} -#endif /* _Z_UTIL_H */ +/* Reverse the bytes in a 32-bit value */ +#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ + (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) + +#endif /* ZUTIL_H */ diff --git a/thirdparty/freetype/src/lzw/ftlzw.c b/thirdparty/freetype/src/lzw/ftlzw.c index e112418ab1..e12efcaa56 100644 --- a/thirdparty/freetype/src/lzw/ftlzw.c +++ b/thirdparty/freetype/src/lzw/ftlzw.c @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * Albert Chin-A-Young. * * based on code in `src/gzip/ftgzip.c' @@ -369,7 +369,7 @@ FT_ZERO( stream ); stream->memory = memory; - if ( !FT_NEW( zip ) ) + if ( !FT_QNEW( zip ) ) { error = ft_lzw_file_init( zip, stream, source ); if ( error ) diff --git a/thirdparty/freetype/src/lzw/ftzopen.c b/thirdparty/freetype/src/lzw/ftzopen.c index 8b5b357f36..aaa98be211 100644 --- a/thirdparty/freetype/src/lzw/ftzopen.c +++ b/thirdparty/freetype/src/lzw/ftzopen.c @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/lzw/ftzopen.h b/thirdparty/freetype/src/lzw/ftzopen.h index 9ada742c73..86fccfe3be 100644 --- a/thirdparty/freetype/src/lzw/ftzopen.h +++ b/thirdparty/freetype/src/lzw/ftzopen.h @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvalid.c b/thirdparty/freetype/src/otvalid/otvalid.c index 869233ce8c..f5344ca031 100644 --- a/thirdparty/freetype/src/otvalid/otvalid.c +++ b/thirdparty/freetype/src/otvalid/otvalid.c @@ -4,7 +4,7 @@ * * FreeType validator for OpenType tables (body only). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvalid.h b/thirdparty/freetype/src/otvalid/otvalid.h index f8ca454d6e..6274858f51 100644 --- a/thirdparty/freetype/src/otvalid/otvalid.h +++ b/thirdparty/freetype/src/otvalid/otvalid.h @@ -4,7 +4,7 @@ * * OpenType table validation (specification only). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvbase.c b/thirdparty/freetype/src/otvalid/otvbase.c index 83f998cdb1..70de653b19 100644 --- a/thirdparty/freetype/src/otvalid/otvbase.c +++ b/thirdparty/freetype/src/otvalid/otvbase.c @@ -4,7 +4,7 @@ * * OpenType BASE table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvcommn.c b/thirdparty/freetype/src/otvalid/otvcommn.c index 40624bb159..b9873ff21b 100644 --- a/thirdparty/freetype/src/otvalid/otvcommn.c +++ b/thirdparty/freetype/src/otvalid/otvcommn.c @@ -4,7 +4,7 @@ * * OpenType common tables validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvcommn.h b/thirdparty/freetype/src/otvalid/otvcommn.h index 3b096ecca8..f1e4a6a9a6 100644 --- a/thirdparty/freetype/src/otvalid/otvcommn.h +++ b/thirdparty/freetype/src/otvalid/otvcommn.h @@ -4,7 +4,7 @@ * * OpenType common tables validation (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otverror.h b/thirdparty/freetype/src/otvalid/otverror.h index 3e23234f36..8c75c58299 100644 --- a/thirdparty/freetype/src/otvalid/otverror.h +++ b/thirdparty/freetype/src/otvalid/otverror.h @@ -4,7 +4,7 @@ * * OpenType validation module error codes (specification only). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvgdef.c b/thirdparty/freetype/src/otvalid/otvgdef.c index 5a160a4142..425335336d 100644 --- a/thirdparty/freetype/src/otvalid/otvgdef.c +++ b/thirdparty/freetype/src/otvalid/otvgdef.c @@ -4,7 +4,7 @@ * * OpenType GDEF table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvgpos.c b/thirdparty/freetype/src/otvalid/otvgpos.c index e0d4e420de..52e2cd1c22 100644 --- a/thirdparty/freetype/src/otvalid/otvgpos.c +++ b/thirdparty/freetype/src/otvalid/otvgpos.c @@ -4,7 +4,7 @@ * * OpenType GPOS table validation (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvgpos.h b/thirdparty/freetype/src/otvalid/otvgpos.h index 176a68883f..85ef609160 100644 --- a/thirdparty/freetype/src/otvalid/otvgpos.h +++ b/thirdparty/freetype/src/otvalid/otvgpos.h @@ -4,7 +4,7 @@ * * OpenType GPOS table validator (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvgsub.c b/thirdparty/freetype/src/otvalid/otvgsub.c index b426a17449..3b6dcbb7ae 100644 --- a/thirdparty/freetype/src/otvalid/otvgsub.c +++ b/thirdparty/freetype/src/otvalid/otvgsub.c @@ -4,7 +4,7 @@ * * OpenType GSUB table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvjstf.c b/thirdparty/freetype/src/otvalid/otvjstf.c index 404dda88a1..0934716a5a 100644 --- a/thirdparty/freetype/src/otvalid/otvjstf.c +++ b/thirdparty/freetype/src/otvalid/otvjstf.c @@ -4,7 +4,7 @@ * * OpenType JSTF table validation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvmath.c b/thirdparty/freetype/src/otvalid/otvmath.c index b4bfabb62e..a59557b375 100644 --- a/thirdparty/freetype/src/otvalid/otvmath.c +++ b/thirdparty/freetype/src/otvalid/otvmath.c @@ -4,7 +4,7 @@ * * OpenType MATH table validation (body). * - * Copyright (C) 2007-2021 by + * Copyright (C) 2007-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by George Williams. diff --git a/thirdparty/freetype/src/otvalid/otvmod.c b/thirdparty/freetype/src/otvalid/otvmod.c index b7d674b5e2..3fc2dbe504 100644 --- a/thirdparty/freetype/src/otvalid/otvmod.c +++ b/thirdparty/freetype/src/otvalid/otvmod.c @@ -4,7 +4,7 @@ * * FreeType's OpenType validation module implementation (body). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvmod.h b/thirdparty/freetype/src/otvalid/otvmod.h index 37c20e0023..2f0bcd6e44 100644 --- a/thirdparty/freetype/src/otvalid/otvmod.h +++ b/thirdparty/freetype/src/otvalid/otvmod.h @@ -5,7 +5,7 @@ * FreeType's OpenType validation module implementation * (specification). * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pcf/README b/thirdparty/freetype/src/pcf/README deleted file mode 100644 index 09ea970eda..0000000000 --- a/thirdparty/freetype/src/pcf/README +++ /dev/null @@ -1,96 +0,0 @@ - FreeType font driver for PCF fonts - - Francesco Zappa Nardelli - <francesco.zappa.nardelli@ens.fr> - - -Introduction -************ - -PCF (Portable Compiled Format) is a binary bitmap font format, largely used -in X world. This code implements a PCF driver for the FreeType library. -Glyph images are loaded into memory only on demand, thus leading to a small -memory footprint. - -Information on the PCF font format can only be worked out from -`pcfread.c', and `pcfwrite.c', to be found, for instance, in the XFree86 -(www.xfree86.org) source tree (xc/lib/font/bitmap/). - -Many good bitmap fonts in bdf format come with XFree86: they can be -compiled into the pcf format using the `bdftopcf' utility. - - -Supported hardware -****************** - -The driver has been tested on linux/x86 and sunos5.5/sparc. In both -cases the compiler was gcc. When back in Paris, I will test it also -on linux/alpha. - - -Encodings -********* - -Use `FT_Get_BDF_Charset_ID' to access the encoding and registry. - -The driver always exports `ft_encoding_none' as face->charmap.encoding. -FT_Get_Char_Index() behavior is unmodified, that is, it converts the ULong -value given as argument into the corresponding glyph number. - - -Known problems -************** - -- dealing explicitly with encodings breaks the uniformity of FreeType 2 - API. - -- except for encodings properties, client applications have no - visibility of the PCF_Face object. This means that applications - cannot directly access font tables and are obliged to trust - FreeType. - -- currently, glyph names and ink_metrics are ignored. - -I plan to give full visibility of the PCF_Face object in the next -release of the driver, thus implementing also glyph names and -ink_metrics. - -- height is defined as (ascent - descent). Is this correct? - -- if unable to read size information from the font, PCF_Init_Face - sets available_size->width and available_size->height to 12. - -- too many english grammar errors in the readme file :-( - - -License -******* - -Copyright (C) 2000 by Francesco Zappa Nardelli - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -Credits -******* - -Keith Packard wrote the pcf driver found in XFree86. His work is at -the same time the specification and the sample implementation of the -PCF format. Undoubtedly, this driver is inspired from his work. diff --git a/thirdparty/freetype/src/pcf/pcfread.c b/thirdparty/freetype/src/pcf/pcfread.c index e60a0a5141..f167bcb8ae 100644 --- a/thirdparty/freetype/src/pcf/pcfread.c +++ b/thirdparty/freetype/src/pcf/pcfread.c @@ -1034,16 +1034,6 @@ THE SOFTWARE. enc->lastRow > 0xFF ) return FT_THROW( Invalid_Table ); - nencoding = (FT_ULong)( enc->lastCol - enc->firstCol + 1 ) * - (FT_ULong)( enc->lastRow - enc->firstRow + 1 ); - - if ( FT_NEW_ARRAY( enc->offset, nencoding ) ) - goto Bail; - - error = FT_Stream_EnterFrame( stream, 2 * nencoding ); - if ( error ) - goto Exit; - FT_TRACE5(( "\n" )); defaultCharRow = enc->defaultChar >> 8; @@ -1064,6 +1054,13 @@ THE SOFTWARE. defaultCharCol = enc->firstCol; } + nencoding = (FT_ULong)( enc->lastCol - enc->firstCol + 1 ) * + (FT_ULong)( enc->lastRow - enc->firstRow + 1 ); + + error = FT_Stream_EnterFrame( stream, 2 * nencoding ); + if ( error ) + goto Bail; + /* * FreeType mandates that glyph index 0 is the `undefined glyph', which * PCF calls the `default character'. However, FreeType needs glyph @@ -1109,6 +1106,9 @@ THE SOFTWARE. /* copy metrics of default character to index 0 */ face->metrics[0] = face->metrics[defaultCharEncodingOffset]; + if ( FT_QNEW_ARRAY( enc->offset, nencoding ) ) + goto Bail; + /* now loop over all values */ offset = enc->offset; for ( i = enc->firstRow; i <= enc->lastRow; i++ ) @@ -1131,11 +1131,6 @@ THE SOFTWARE. } FT_Stream_ExitFrame( stream ); - return error; - - Exit: - FT_FREE( enc->offset ); - Bail: return error; } diff --git a/thirdparty/freetype/src/pfr/pfr.c b/thirdparty/freetype/src/pfr/pfr.c index 4058ad5652..1dd38f9393 100644 --- a/thirdparty/freetype/src/pfr/pfr.c +++ b/thirdparty/freetype/src/pfr/pfr.c @@ -4,7 +4,7 @@ * * FreeType PFR driver component. * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrcmap.c b/thirdparty/freetype/src/pfr/pfrcmap.c index 6a7f573594..6fa2417dc1 100644 --- a/thirdparty/freetype/src/pfr/pfrcmap.c +++ b/thirdparty/freetype/src/pfr/pfrcmap.c @@ -4,7 +4,7 @@ * * FreeType PFR cmap handling (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrcmap.h b/thirdparty/freetype/src/pfr/pfrcmap.h index 17c02a2b4b..afde164f9b 100644 --- a/thirdparty/freetype/src/pfr/pfrcmap.h +++ b/thirdparty/freetype/src/pfr/pfrcmap.h @@ -4,7 +4,7 @@ * * FreeType PFR cmap handling (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrdrivr.c b/thirdparty/freetype/src/pfr/pfrdrivr.c index 16b8f79471..2a753c583a 100644 --- a/thirdparty/freetype/src/pfr/pfrdrivr.c +++ b/thirdparty/freetype/src/pfr/pfrdrivr.c @@ -4,7 +4,7 @@ * * FreeType PFR driver interface (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrdrivr.h b/thirdparty/freetype/src/pfr/pfrdrivr.h index 6ff16fea06..cfd749ab0e 100644 --- a/thirdparty/freetype/src/pfr/pfrdrivr.h +++ b/thirdparty/freetype/src/pfr/pfrdrivr.h @@ -4,7 +4,7 @@ * * High-level Type PFR driver interface (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrerror.h b/thirdparty/freetype/src/pfr/pfrerror.h index 255696efed..98b8f2fd58 100644 --- a/thirdparty/freetype/src/pfr/pfrerror.h +++ b/thirdparty/freetype/src/pfr/pfrerror.h @@ -4,7 +4,7 @@ * * PFR error codes (specification only). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrgload.c b/thirdparty/freetype/src/pfr/pfrgload.c index b400042a86..1b8d6cdecc 100644 --- a/thirdparty/freetype/src/pfr/pfrgload.c +++ b/thirdparty/freetype/src/pfr/pfrgload.c @@ -4,7 +4,7 @@ * * FreeType PFR glyph loader (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrgload.h b/thirdparty/freetype/src/pfr/pfrgload.h index b726d564fc..af59296910 100644 --- a/thirdparty/freetype/src/pfr/pfrgload.h +++ b/thirdparty/freetype/src/pfr/pfrgload.h @@ -4,7 +4,7 @@ * * FreeType PFR glyph loader (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrload.c b/thirdparty/freetype/src/pfr/pfrload.c index a9c1e2834a..6bf7979750 100644 --- a/thirdparty/freetype/src/pfr/pfrload.c +++ b/thirdparty/freetype/src/pfr/pfrload.c @@ -4,7 +4,7 @@ * * FreeType PFR loader (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -993,7 +993,7 @@ PFR_CHECK_SIZE( count * Size ); - if ( FT_NEW_ARRAY( phy_font->chars, count ) ) + if ( FT_QNEW_ARRAY( phy_font->chars, count ) ) goto Fail; for ( n = 0; n < count; n++ ) diff --git a/thirdparty/freetype/src/pfr/pfrload.h b/thirdparty/freetype/src/pfr/pfrload.h index 4f467d1bad..5e0f451fa0 100644 --- a/thirdparty/freetype/src/pfr/pfrload.h +++ b/thirdparty/freetype/src/pfr/pfrload.h @@ -4,7 +4,7 @@ * * FreeType PFR loader (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrobjs.c b/thirdparty/freetype/src/pfr/pfrobjs.c index 3080cb650b..5a6e3979d5 100644 --- a/thirdparty/freetype/src/pfr/pfrobjs.c +++ b/thirdparty/freetype/src/pfr/pfrobjs.c @@ -4,7 +4,7 @@ * * FreeType PFR object methods (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -207,7 +207,7 @@ pfrface->height = (FT_Short)( ( pfrface->units_per_EM * 12 ) / 10 ); if ( pfrface->height < pfrface->ascender - pfrface->descender ) - pfrface->height = (FT_Short)(pfrface->ascender - pfrface->descender); + pfrface->height = (FT_Short)( pfrface->ascender - pfrface->descender ); if ( phy_font->num_strikes > 0 ) { diff --git a/thirdparty/freetype/src/pfr/pfrobjs.h b/thirdparty/freetype/src/pfr/pfrobjs.h index 70b05395b8..9ffc297d59 100644 --- a/thirdparty/freetype/src/pfr/pfrobjs.h +++ b/thirdparty/freetype/src/pfr/pfrobjs.h @@ -4,7 +4,7 @@ * * FreeType PFR object methods (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrsbit.c b/thirdparty/freetype/src/pfr/pfrsbit.c index 255fd58772..8b23fa156d 100644 --- a/thirdparty/freetype/src/pfr/pfrsbit.c +++ b/thirdparty/freetype/src/pfr/pfrsbit.c @@ -4,7 +4,7 @@ * * FreeType PFR bitmap loader (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrsbit.h b/thirdparty/freetype/src/pfr/pfrsbit.h index f50d8013aa..b948a3842f 100644 --- a/thirdparty/freetype/src/pfr/pfrsbit.h +++ b/thirdparty/freetype/src/pfr/pfrsbit.h @@ -4,7 +4,7 @@ * * FreeType PFR bitmap loader (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrtypes.h b/thirdparty/freetype/src/pfr/pfrtypes.h index dc4fead700..d9a0c78953 100644 --- a/thirdparty/freetype/src/pfr/pfrtypes.h +++ b/thirdparty/freetype/src/pfr/pfrtypes.h @@ -4,7 +4,7 @@ * * FreeType PFR data structures (specification only). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/afmparse.c b/thirdparty/freetype/src/psaux/afmparse.c index 0ad1760518..bd86129f7e 100644 --- a/thirdparty/freetype/src/psaux/afmparse.c +++ b/thirdparty/freetype/src/psaux/afmparse.c @@ -4,7 +4,7 @@ * * AFM parser (body). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/afmparse.h b/thirdparty/freetype/src/psaux/afmparse.h index 44b05b2cac..eee49e3601 100644 --- a/thirdparty/freetype/src/psaux/afmparse.h +++ b/thirdparty/freetype/src/psaux/afmparse.h @@ -4,7 +4,7 @@ * * AFM parser (specification). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/cffdecode.c b/thirdparty/freetype/src/psaux/cffdecode.c index 29b68a8e4f..92139c93ad 100644 --- a/thirdparty/freetype/src/psaux/cffdecode.c +++ b/thirdparty/freetype/src/psaux/cffdecode.c @@ -4,7 +4,7 @@ * * PostScript CFF (Type 2) decoding routines (body). * - * Copyright (C) 2017-2021 by + * Copyright (C) 2017-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -248,7 +248,7 @@ else #endif /* FT_CONFIG_OPTION_INCREMENTAL */ { - CFF_Font cff = (CFF_Font)(face->extra.data); + CFF_Font cff = (CFF_Font)( face->extra.data ); bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar ); diff --git a/thirdparty/freetype/src/psaux/cffdecode.h b/thirdparty/freetype/src/psaux/cffdecode.h index b1314ed1c1..a9f6761824 100644 --- a/thirdparty/freetype/src/psaux/cffdecode.h +++ b/thirdparty/freetype/src/psaux/cffdecode.h @@ -4,7 +4,7 @@ * * PostScript CFF (Type 2) decoding routines (specification). * - * Copyright (C) 2017-2021 by + * Copyright (C) 2017-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psaux.c b/thirdparty/freetype/src/psaux/psaux.c index 2960c8b696..2ac7949479 100644 --- a/thirdparty/freetype/src/psaux/psaux.c +++ b/thirdparty/freetype/src/psaux/psaux.c @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript driver component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psauxerr.h b/thirdparty/freetype/src/psaux/psauxerr.h index e8ee29166c..1504b34ee5 100644 --- a/thirdparty/freetype/src/psaux/psauxerr.h +++ b/thirdparty/freetype/src/psaux/psauxerr.h @@ -4,7 +4,7 @@ * * PS auxiliary module error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psauxmod.c b/thirdparty/freetype/src/psaux/psauxmod.c index 52da23365e..113490abcd 100644 --- a/thirdparty/freetype/src/psaux/psauxmod.c +++ b/thirdparty/freetype/src/psaux/psauxmod.c @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript module implementation (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psauxmod.h b/thirdparty/freetype/src/psaux/psauxmod.h index e3e8063220..2d508edc2a 100644 --- a/thirdparty/freetype/src/psaux/psauxmod.h +++ b/thirdparty/freetype/src/psaux/psauxmod.h @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript module implementation (specification). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psconv.c b/thirdparty/freetype/src/psaux/psconv.c index c28d65df29..9b8c0d90c3 100644 --- a/thirdparty/freetype/src/psaux/psconv.c +++ b/thirdparty/freetype/src/psaux/psconv.c @@ -4,7 +4,7 @@ * * Some convenience conversions (body). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -535,11 +535,11 @@ if ( r & 1 ) { - *buffer = (FT_Byte)(*buffer + c); + *buffer = (FT_Byte)( *buffer + c ); buffer++; } else - *buffer = (FT_Byte)(c << 4); + *buffer = (FT_Byte)( c << 4 ); r++; } @@ -572,8 +572,8 @@ if ( p >= limit ) return 0; - if ( n > (FT_UInt)(limit - p) ) - n = (FT_UInt)(limit - p); + if ( n > (FT_UInt)( limit - p ) ) + n = (FT_UInt)( limit - p ); for ( r = 0; r < n; r++ ) { diff --git a/thirdparty/freetype/src/psaux/psconv.h b/thirdparty/freetype/src/psaux/psconv.h index cd91a7bb56..650d7c93b2 100644 --- a/thirdparty/freetype/src/psaux/psconv.h +++ b/thirdparty/freetype/src/psaux/psconv.h @@ -4,7 +4,7 @@ * * Some convenience conversions (specification). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psintrp.c b/thirdparty/freetype/src/psaux/psintrp.c index c550533a0f..6c640eebd5 100644 --- a/thirdparty/freetype/src/psaux/psintrp.c +++ b/thirdparty/freetype/src/psaux/psintrp.c @@ -1900,7 +1900,8 @@ /* WeightVector */ { FT_UInt idx; - PS_Blend blend = decoder->blend; + PS_Blend blend = decoder->blend; + FT_UInt len_buildchar = decoder->len_buildchar; if ( arg_cnt != 1 || !blend ) @@ -1908,14 +1909,15 @@ idx = (FT_UInt)cf2_stack_popInt( opStack ); - if ( idx + blend->num_designs > - decoder->len_buildchar ) + if ( len_buildchar < blend->num_designs || + len_buildchar - blend->num_designs < idx ) goto Unexpected_OtherSubr; - ft_memcpy( &decoder->buildchar[idx], - blend->weight_vector, - blend->num_designs * - sizeof ( blend->weight_vector[0] ) ); + if ( decoder->buildchar && blend->weight_vector ) + ft_memcpy( &decoder->buildchar[idx], + blend->weight_vector, + blend->num_designs * + sizeof ( blend->weight_vector[0] ) ); } break; diff --git a/thirdparty/freetype/src/psaux/psobjs.c b/thirdparty/freetype/src/psaux/psobjs.c index 30f501916a..371e538020 100644 --- a/thirdparty/freetype/src/psaux/psobjs.c +++ b/thirdparty/freetype/src/psaux/psobjs.c @@ -4,7 +4,7 @@ * * Auxiliary functions for PostScript fonts (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -99,45 +99,31 @@ } - static void - shift_elements( PS_Table table, - FT_Byte* old_base ) - { - FT_PtrDist delta = table->block - old_base; - FT_Byte** offset = table->elements; - FT_Byte** limit = offset + table->max_elems; - - - for ( ; offset < limit; offset++ ) - { - if ( offset[0] ) - offset[0] += delta; - } - } - - static FT_Error - reallocate_t1_table( PS_Table table, - FT_Offset new_size ) + ps_table_realloc( PS_Table table, + FT_Offset new_size ) { FT_Memory memory = table->memory; FT_Byte* old_base = table->block; FT_Error error; - /* allocate new base block */ - if ( FT_ALLOC( table->block, new_size ) ) - { - table->block = old_base; + /* (re)allocate the base block */ + if ( FT_REALLOC( table->block, table->capacity, new_size ) ) return error; - } - /* copy elements and shift offsets */ - if ( old_base ) + /* rebase offsets if necessary */ + if ( old_base && table->block != old_base ) { - FT_MEM_COPY( table->block, old_base, table->capacity ); - shift_elements( table, old_base ); - FT_FREE( old_base ); + FT_Byte** offset = table->elements; + FT_Byte** limit = offset + table->max_elems; + + + for ( ; offset < limit; offset++ ) + { + if ( *offset ) + *offset = table->block + ( *offset - old_base ); + } } table->capacity = new_size; @@ -204,7 +190,7 @@ new_size = FT_PAD_CEIL( new_size, 1024 ); } - error = reallocate_t1_table( table, new_size ); + error = ps_table_realloc( table, new_size ); if ( error ) return error; @@ -234,32 +220,12 @@ * @InOut: * table :: * The target table. - * - * @Note: - * This function does NOT release the heap's memory block. It is up - * to the caller to clean it, or reference it in its own structures. */ FT_LOCAL_DEF( void ) ps_table_done( PS_Table table ) { - FT_Memory memory = table->memory; - FT_Error error; - FT_Byte* old_base = table->block; - - - /* should never fail, because rec.cursor <= rec.size */ - if ( !old_base ) - return; - - if ( FT_QALLOC( table->block, table->cursor ) ) - return; - FT_MEM_COPY( table->block, old_base, table->cursor ); - shift_elements( table, old_base ); - - table->capacity = table->cursor; - FT_FREE( old_base ); - - FT_UNUSED( error ); + /* no problem if shrinking fails */ + ps_table_realloc( table, table->cursor ); } @@ -552,7 +518,7 @@ if ( *cur == '<' ) /* <...> */ { - if ( cur + 1 < limit && *(cur + 1) == '<' ) /* << */ + if ( cur + 1 < limit && *( cur + 1 ) == '<' ) /* << */ { cur++; cur++; @@ -1098,7 +1064,6 @@ { FT_Byte* q = (FT_Byte*)objects[idx] + field->offset; FT_Long val; - FT_String* string = NULL; skip_spaces( &cur, limit ); @@ -1148,8 +1113,9 @@ case T1_FIELD_TYPE_STRING: case T1_FIELD_TYPE_KEY: { - FT_Memory memory = parser->memory; - FT_UInt len = (FT_UInt)( limit - cur ); + FT_Memory memory = parser->memory; + FT_UInt len = (FT_UInt)( limit - cur ); + FT_String* string = NULL; if ( cur >= limit ) @@ -1190,7 +1156,6 @@ FT_TRACE0(( "ps_parser_load_field: overwriting field %s\n", field->ident )); FT_FREE( *(FT_String**)q ); - *(FT_String**)q = NULL; } if ( FT_QALLOC( string, len + 1 ) ) diff --git a/thirdparty/freetype/src/psaux/psobjs.h b/thirdparty/freetype/src/psaux/psobjs.h index 99d16959a7..f01d4bd503 100644 --- a/thirdparty/freetype/src/psaux/psobjs.h +++ b/thirdparty/freetype/src/psaux/psobjs.h @@ -4,7 +4,7 @@ * * Auxiliary functions for PostScript fonts (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/t1cmap.c b/thirdparty/freetype/src/psaux/t1cmap.c index 3e7c577a18..f297ce75e1 100644 --- a/thirdparty/freetype/src/psaux/t1cmap.c +++ b/thirdparty/freetype/src/psaux/t1cmap.c @@ -4,7 +4,7 @@ * * Type 1 character map support (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/t1cmap.h b/thirdparty/freetype/src/psaux/t1cmap.h index 8f69600ca4..460d91f590 100644 --- a/thirdparty/freetype/src/psaux/t1cmap.h +++ b/thirdparty/freetype/src/psaux/t1cmap.h @@ -4,7 +4,7 @@ * * Type 1 character map support (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/t1decode.c b/thirdparty/freetype/src/psaux/t1decode.c index 7e65bde632..1cdf436fa7 100644 --- a/thirdparty/freetype/src/psaux/t1decode.c +++ b/thirdparty/freetype/src/psaux/t1decode.c @@ -4,7 +4,7 @@ * * PostScript Type 1 decoding routines (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/t1decode.h b/thirdparty/freetype/src/psaux/t1decode.h index eea9d34b04..d60d61c904 100644 --- a/thirdparty/freetype/src/psaux/t1decode.h +++ b/thirdparty/freetype/src/psaux/t1decode.h @@ -4,7 +4,7 @@ * * PostScript Type 1 decoding routines (specification). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshalgo.c b/thirdparty/freetype/src/pshinter/pshalgo.c index 227caeae33..dca539766f 100644 --- a/thirdparty/freetype/src/pshinter/pshalgo.c +++ b/thirdparty/freetype/src/pshinter/pshalgo.c @@ -4,7 +4,7 @@ * * PostScript hinting algorithm (body). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used @@ -182,13 +182,13 @@ count = hints->num_hints; /* allocate our tables */ - if ( FT_NEW_ARRAY( table->sort, 2 * count ) || - FT_NEW_ARRAY( table->hints, count ) || - FT_NEW_ARRAY( table->zones, 2 * count + 1 ) ) + if ( FT_QNEW_ARRAY( table->sort, 2 * count ) || + FT_QNEW_ARRAY( table->hints, count ) || + FT_QNEW_ARRAY( table->zones, 2 * count + 1 ) ) goto Exit; table->max_hints = count; - table->sort_global = table->sort + count; + table->sort_global = FT_OFFSET( table->sort, count ); table->num_hints = 0; table->num_zones = 0; table->zone = NULL; @@ -1167,8 +1167,8 @@ memory = glyph->memory = globals->memory; /* allocate and setup points + contours arrays */ - if ( FT_NEW_ARRAY( glyph->points, outline->n_points ) || - FT_NEW_ARRAY( glyph->contours, outline->n_contours ) ) + if ( FT_QNEW_ARRAY( glyph->points, outline->n_points ) || + FT_QNEW_ARRAY( glyph->contours, outline->n_contours ) ) goto Exit; glyph->num_points = (FT_UInt)outline->n_points; @@ -1228,8 +1228,9 @@ FT_Pos dxi, dyi, dxo, dyo; + point->flags = 0; if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) ) - point->flags = PSH_POINT_OFF; + psh_point_set_off( point ); dxi = vec[n].x - vec[n_prev].x; dyi = vec[n].y - vec[n_prev].y; @@ -1242,14 +1243,14 @@ point->dir_out = psh_compute_dir( dxo, dyo ); /* detect smooth points */ - if ( point->flags & PSH_POINT_OFF ) - point->flags |= PSH_POINT_SMOOTH; + if ( psh_point_is_off( point ) ) + psh_point_set_smooth( point ); else if ( point->dir_in == point->dir_out ) { if ( point->dir_out != PSH_DIR_NONE || psh_corner_is_flat( dxi, dyi, dxo, dyo ) ) - point->flags |= PSH_POINT_SMOOTH; + psh_point_set_smooth( point ); } } } @@ -1547,8 +1548,9 @@ /* the accepted shift for strong points in fractional pixels */ #define PSH_STRONG_THRESHOLD 32 - /* the maximum shift value in font units */ -#define PSH_STRONG_THRESHOLD_MAXIMUM 30 + /* the maximum shift value in font units tuned to distinguish */ + /* between stems and serifs in URW+ font collection */ +#define PSH_STRONG_THRESHOLD_MAXIMUM 12 /* find strong points in a glyph */ @@ -1797,7 +1799,7 @@ FT_Error error; - if ( FT_NEW_ARRAY( strongs, num_strongs ) ) + if ( FT_QNEW_ARRAY( strongs, num_strongs ) ) return; } @@ -2110,14 +2112,17 @@ FT_Fixed old_x_scale = x_scale; FT_Fixed old_y_scale = y_scale; - FT_Fixed scaled; - FT_Fixed fitted; + FT_Fixed scaled = 0; + FT_Fixed fitted = 0; FT_Bool rescale = FALSE; - scaled = FT_MulFix( globals->blues.normal_top.zones->org_ref, y_scale ); - fitted = FT_PIX_ROUND( scaled ); + if ( globals->blues.normal_top.count ) + { + scaled = FT_MulFix( globals->blues.normal_top.zones->org_ref, y_scale ); + fitted = FT_PIX_ROUND( scaled ); + } if ( fitted != 0 && scaled != fitted ) { diff --git a/thirdparty/freetype/src/pshinter/pshalgo.h b/thirdparty/freetype/src/pshinter/pshalgo.h index 999c60192b..ab978bf6d0 100644 --- a/thirdparty/freetype/src/pshinter/pshalgo.h +++ b/thirdparty/freetype/src/pshinter/pshalgo.h @@ -4,7 +4,7 @@ * * PostScript hinting algorithm (specification). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshglob.c b/thirdparty/freetype/src/pshinter/pshglob.c index 2ca0f665c6..887ea8d9c1 100644 --- a/thirdparty/freetype/src/pshinter/pshglob.c +++ b/thirdparty/freetype/src/pshinter/pshglob.c @@ -5,7 +5,7 @@ * PostScript hinter global hinting management (body). * Inspired by the new auto-hinter module. * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used @@ -650,7 +650,7 @@ FT_Error error; - if ( !FT_NEW( globals ) ) + if ( !FT_QNEW( globals ) ) { FT_UInt count; FT_Short* read; diff --git a/thirdparty/freetype/src/pshinter/pshglob.h b/thirdparty/freetype/src/pshinter/pshglob.h index a8f9953fa0..47247f969e 100644 --- a/thirdparty/freetype/src/pshinter/pshglob.h +++ b/thirdparty/freetype/src/pshinter/pshglob.h @@ -4,7 +4,7 @@ * * PostScript hinter global hinting management. * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshinter.c b/thirdparty/freetype/src/pshinter/pshinter.c index 705143dcdc..22315685f9 100644 --- a/thirdparty/freetype/src/pshinter/pshinter.c +++ b/thirdparty/freetype/src/pshinter/pshinter.c @@ -4,7 +4,7 @@ * * FreeType PostScript Hinting module * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshmod.c b/thirdparty/freetype/src/pshinter/pshmod.c index 6674041f7e..a74a4fe99f 100644 --- a/thirdparty/freetype/src/pshinter/pshmod.c +++ b/thirdparty/freetype/src/pshinter/pshmod.c @@ -4,7 +4,7 @@ * * FreeType PostScript hinter module implementation (body). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshmod.h b/thirdparty/freetype/src/pshinter/pshmod.h index 8b229bb077..cdf95b7c20 100644 --- a/thirdparty/freetype/src/pshinter/pshmod.h +++ b/thirdparty/freetype/src/pshinter/pshmod.h @@ -4,7 +4,7 @@ * * PostScript hinter module interface (specification). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshnterr.h b/thirdparty/freetype/src/pshinter/pshnterr.h index 567d765132..789afb5990 100644 --- a/thirdparty/freetype/src/pshinter/pshnterr.h +++ b/thirdparty/freetype/src/pshinter/pshnterr.h @@ -4,7 +4,7 @@ * * PS Hinter error codes (specification only). * - * Copyright (C) 2003-2021 by + * Copyright (C) 2003-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshrec.c b/thirdparty/freetype/src/pshinter/pshrec.c index 1faabdaafa..2a5cffbada 100644 --- a/thirdparty/freetype/src/pshinter/pshrec.c +++ b/thirdparty/freetype/src/pshinter/pshrec.c @@ -4,7 +4,7 @@ * * FreeType PostScript hints recorder (body). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -63,16 +63,14 @@ { FT_UInt old_max = table->max_hints; FT_UInt new_max = count; - FT_Error error = FT_Err_Ok; + FT_Error error; - if ( new_max > old_max ) - { - /* try to grow the table */ - new_max = FT_PAD_CEIL( new_max, 8 ); - if ( !FT_RENEW_ARRAY( table->hints, old_max, new_max ) ) - table->max_hints = new_max; - } + /* try to grow the table */ + new_max = FT_PAD_CEIL( new_max, 8 ); + if ( !FT_QRENEW_ARRAY( table->hints, old_max, new_max ) ) + table->max_hints = new_max; + return error; } @@ -90,17 +88,14 @@ count = table->num_hints; count++; - if ( count >= table->max_hints ) + if ( count > table->max_hints ) { error = ps_hint_table_ensure( table, count, memory ); if ( error ) goto Exit; } - hint = table->hints + count - 1; - hint->pos = 0; - hint->len = 0; - hint->flags = 0; + hint = table->hints + count - 1; /* initialized upstream */ table->num_hints = count; @@ -136,14 +131,15 @@ FT_UInt count, FT_Memory memory ) { - FT_UInt old_max = ( mask->max_bits + 7 ) >> 3; - FT_UInt new_max = ( count + 7 ) >> 3; + FT_UInt old_max = mask->max_bits >> 3; + FT_UInt new_max = ( count + 7 ) >> 3; FT_Error error = FT_Err_Ok; if ( new_max > old_max ) { new_max = FT_PAD_CEIL( new_max, 8 ); + /* added bytes are zeroed here */ if ( !FT_RENEW_ARRAY( mask->bytes, old_max, new_max ) ) mask->max_bits = new_max * 8; } @@ -154,31 +150,15 @@ /* test a bit value in a given mask */ static FT_Int ps_mask_test_bit( PS_Mask mask, - FT_Int idx ) + FT_UInt idx ) { - if ( (FT_UInt)idx >= mask->num_bits ) + if ( idx >= mask->num_bits ) return 0; return mask->bytes[idx >> 3] & ( 0x80 >> ( idx & 7 ) ); } - /* clear a given bit */ - static void - ps_mask_clear_bit( PS_Mask mask, - FT_UInt idx ) - { - FT_Byte* p; - - - if ( idx >= mask->num_bits ) - return; - - p = mask->bytes + ( idx >> 3 ); - p[0] = (FT_Byte)( p[0] & ~( 0x80 >> ( idx & 7 ) ) ); - } - - /* set a given bit, possibly grow the mask */ static FT_Error ps_mask_set_bit( PS_Mask mask, @@ -269,6 +249,10 @@ mask = table->masks + count - 1; mask->num_bits = 0; mask->end_point = 0; + /* reused mask must be cleared */ + if ( mask->max_bits ) + FT_MEM_ZERO( mask->bytes, mask->max_bits >> 3 ); + table->num_masks = count; Exit: @@ -426,7 +410,7 @@ PS_Mask mask2 = table->masks + index2; FT_UInt count1 = mask1->num_bits; FT_UInt count2 = mask2->num_bits; - FT_Int delta; + FT_UInt delta; if ( count2 > 0 ) @@ -437,15 +421,14 @@ /* if "count2" is greater than "count1", we need to grow the */ - /* first bitset, and clear the highest bits */ + /* first bitset */ if ( count2 > count1 ) { error = ps_mask_ensure( mask1, count2, memory ); if ( error ) goto Exit; - for ( pos = count1; pos < count2; pos++ ) - ps_mask_clear_bit( mask1, pos ); + mask1->num_bits = count2; } /* merge (unite) the bitsets */ @@ -467,7 +450,7 @@ mask2->end_point = 0; /* number of masks to move */ - delta = (FT_Int)( table->num_masks - 1 - index2 ); + delta = table->num_masks - 1 - index2; if ( delta > 0 ) { /* move to end of table for reuse */ @@ -476,7 +459,7 @@ ft_memmove( mask2, mask2 + 1, - (FT_UInt)delta * sizeof ( PS_MaskRec ) ); + delta * sizeof ( PS_MaskRec ) ); mask2[delta] = dummy; } @@ -647,7 +630,7 @@ FT_Int pos, FT_Int len, FT_Memory memory, - FT_Int *aindex ) + FT_UInt *aindex ) { FT_Error error = FT_Err_Ok; FT_UInt flags = 0; @@ -665,9 +648,6 @@ len = 0; } - if ( aindex ) - *aindex = -1; - /* now, lookup stem in the current hints table */ { PS_Mask mask; @@ -704,7 +684,7 @@ goto Exit; if ( aindex ) - *aindex = (FT_Int)idx; + *aindex = idx; } Exit: @@ -715,9 +695,9 @@ /* add a "hstem3/vstem3" counter to our dimension table */ static FT_Error ps_dimension_add_counter( PS_Dimension dim, - FT_Int hint1, - FT_Int hint2, - FT_Int hint3, + FT_UInt hint1, + FT_UInt hint2, + FT_UInt hint3, FT_Memory memory ) { FT_Error error = FT_Err_Ok; @@ -744,26 +724,17 @@ } /* now, set the bits for our hints in the counter mask */ - if ( hint1 >= 0 ) - { - error = ps_mask_set_bit( counter, (FT_UInt)hint1, memory ); - if ( error ) - goto Exit; - } + error = ps_mask_set_bit( counter, hint1, memory ); + if ( error ) + goto Exit; - if ( hint2 >= 0 ) - { - error = ps_mask_set_bit( counter, (FT_UInt)hint2, memory ); - if ( error ) - goto Exit; - } + error = ps_mask_set_bit( counter, hint2, memory ); + if ( error ) + goto Exit; - if ( hint3 >= 0 ) - { - error = ps_mask_set_bit( counter, (FT_UInt)hint3, memory ); - if ( error ) - goto Exit; - } + error = ps_mask_set_bit( counter, hint3, memory ); + if ( error ) + goto Exit; Exit: return error; @@ -892,7 +863,7 @@ PS_Dimension dim; FT_Memory memory = hints->memory; FT_Int count; - FT_Int idx[3]; + FT_UInt idx[3]; /* limit "dimension" to 0..1 */ diff --git a/thirdparty/freetype/src/pshinter/pshrec.h b/thirdparty/freetype/src/pshinter/pshrec.h index e483981d9d..a0d37979cc 100644 --- a/thirdparty/freetype/src/pshinter/pshrec.h +++ b/thirdparty/freetype/src/pshinter/pshrec.h @@ -4,7 +4,7 @@ * * Postscript (Type1/Type2) hints recorder (specification). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/psmodule.c b/thirdparty/freetype/src/psnames/psmodule.c index 74adefa15b..e7d51e950e 100644 --- a/thirdparty/freetype/src/psnames/psmodule.c +++ b/thirdparty/freetype/src/psnames/psmodule.c @@ -4,7 +4,7 @@ * * psnames module implementation (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/psmodule.h b/thirdparty/freetype/src/psnames/psmodule.h index e92a975e9d..ff3eda564c 100644 --- a/thirdparty/freetype/src/psnames/psmodule.h +++ b/thirdparty/freetype/src/psnames/psmodule.h @@ -4,7 +4,7 @@ * * High-level psnames module interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/psnamerr.h b/thirdparty/freetype/src/psnames/psnamerr.h index 888b76c4f6..ae56620275 100644 --- a/thirdparty/freetype/src/psnames/psnamerr.h +++ b/thirdparty/freetype/src/psnames/psnamerr.h @@ -4,7 +4,7 @@ * * PS names module error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/psnames.c b/thirdparty/freetype/src/psnames/psnames.c index e7be6707d6..c844a317fd 100644 --- a/thirdparty/freetype/src/psnames/psnames.c +++ b/thirdparty/freetype/src/psnames/psnames.c @@ -4,7 +4,7 @@ * * FreeType psnames module component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/pstables.h b/thirdparty/freetype/src/psnames/pstables.h index 0bcadca9cc..d28d580b9c 100644 --- a/thirdparty/freetype/src/psnames/pstables.h +++ b/thirdparty/freetype/src/psnames/pstables.h @@ -4,7 +4,7 @@ * * PostScript glyph names. * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/raster/ftmisc.h b/thirdparty/freetype/src/raster/ftmisc.h index b12a051234..75fb5f8437 100644 --- a/thirdparty/freetype/src/raster/ftmisc.h +++ b/thirdparty/freetype/src/raster/ftmisc.h @@ -5,7 +5,7 @@ * Miscellaneous macros for stand-alone rasterizer (specification * only). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/thirdparty/freetype/src/raster/ftraster.c b/thirdparty/freetype/src/raster/ftraster.c index bfc059c1e8..68b0e1fdd9 100644 --- a/thirdparty/freetype/src/raster/ftraster.c +++ b/thirdparty/freetype/src/raster/ftraster.c @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -2269,7 +2269,7 @@ /* This is due to the fact that, in the vast majority of cases, */ /* the span length in bytes is relatively small. */ while ( --c2 > 0 ) - *(++target) = 0xFF; + *( ++target ) = 0xFF; target[1] |= f2; } diff --git a/thirdparty/freetype/src/raster/ftraster.h b/thirdparty/freetype/src/raster/ftraster.h index 4affd48b51..e9ece8cf0b 100644 --- a/thirdparty/freetype/src/raster/ftraster.h +++ b/thirdparty/freetype/src/raster/ftraster.h @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/thirdparty/freetype/src/raster/ftrend1.c b/thirdparty/freetype/src/raster/ftrend1.c index 236a8daf0a..f319f03d9c 100644 --- a/thirdparty/freetype/src/raster/ftrend1.c +++ b/thirdparty/freetype/src/raster/ftrend1.c @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer interface (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/raster/ftrend1.h b/thirdparty/freetype/src/raster/ftrend1.h index e4cea53741..14ec336b11 100644 --- a/thirdparty/freetype/src/raster/ftrend1.h +++ b/thirdparty/freetype/src/raster/ftrend1.h @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/raster/raster.c b/thirdparty/freetype/src/raster/raster.c index ad81a39414..324cc5661c 100644 --- a/thirdparty/freetype/src/raster/raster.c +++ b/thirdparty/freetype/src/raster/raster.c @@ -4,7 +4,7 @@ * * FreeType monochrome rasterer module component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/raster/rasterrs.h b/thirdparty/freetype/src/raster/rasterrs.h index 852dd5bc31..8b1ebf07a3 100644 --- a/thirdparty/freetype/src/raster/rasterrs.h +++ b/thirdparty/freetype/src/raster/rasterrs.h @@ -4,7 +4,7 @@ * * monochrome renderer error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sdf/ftbsdf.c b/thirdparty/freetype/src/sdf/ftbsdf.c index 8da5c9d9e0..1328ac4988 100644 --- a/thirdparty/freetype/src/sdf/ftbsdf.c +++ b/thirdparty/freetype/src/sdf/ftbsdf.c @@ -4,7 +4,7 @@ * * Signed Distance Field support for bitmap fonts (body only). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -177,11 +177,11 @@ * * @Fields: * dist :: - * Vector length of the `near` parameter. Can be squared or absolute + * Vector length of the `prox` parameter. Can be squared or absolute * depending on the `USE_SQUARED_DISTANCES` macro defined in file * `ftsdfcommon.h`. * - * near :: + * prox :: * Vector to the nearest edge. Can also be interpreted as shortest * distance of a point. * @@ -194,7 +194,7 @@ typedef struct ED_ { FT_16D16 dist; - FT_16D16_Vec near; + FT_16D16_Vec prox; FT_Byte alpha; } ED; @@ -595,18 +595,18 @@ worker->rows ) ) { /* approximate the edge distance for edge pixels */ - ed[index].near = compute_edge_distance( ed + index, + ed[index].prox = compute_edge_distance( ed + index, i, j, worker->width, worker->rows ); - ed[index].dist = VECTOR_LENGTH_16D16( ed[index].near ); + ed[index].dist = VECTOR_LENGTH_16D16( ed[index].prox ); } else { /* for non-edge pixels assign far away distances */ ed[index].dist = 400 * ONE; - ed[index].near.x = 200 * ONE; - ed[index].near.y = 200 * ONE; + ed[index].prox.x = 200 * ONE; + ed[index].prox.y = 200 * ONE; } } } @@ -756,8 +756,6 @@ byte = (FT_Byte)( 1 << mod ); t[t_index].alpha = pixel & byte ? 255 : 0; - - pixel = 0; } } } @@ -873,7 +871,7 @@ if ( dist < current->dist ) { - dist_vec = to_check->near; + dist_vec = to_check->prox; dist_vec.x += x_offset * ONE; dist_vec.y += y_offset * ONE; @@ -882,7 +880,7 @@ if ( dist < current->dist ) { current->dist = dist; - current->near = dist_vec; + current->prox = dist_vec; } } } @@ -1098,7 +1096,7 @@ FT_Int i, j; FT_SDFFormat* t_buffer; - FT_16D16 spread; + FT_16D16 sp_sq, spread; if ( !worker || !target ) @@ -1118,11 +1116,13 @@ goto Exit; } + spread = FT_INT_16D16( worker->params.spread ); + #if USE_SQUARED_DISTANCES - spread = FT_INT_16D16( worker->params.spread * - worker->params.spread ); + sp_sq = FT_INT_16D16( worker->params.spread * + worker->params.spread ); #else - spread = FT_INT_16D16( worker->params.spread ); + sp_sq = FT_INT_16D16( worker->params.spread ); #endif for ( j = 0; j < r; j++ ) @@ -1138,8 +1138,8 @@ index = j * w + i; dist = worker->distance_map[index].dist; - if ( dist < 0 || dist > spread ) - dist = spread; + if ( dist < 0 || dist > sp_sq ) + dist = sp_sq; #if USE_SQUARED_DISTANCES dist = square_root( dist ); diff --git a/thirdparty/freetype/src/sdf/ftsdf.c b/thirdparty/freetype/src/sdf/ftsdf.c index f69cf49b47..ffac8bf465 100644 --- a/thirdparty/freetype/src/sdf/ftsdf.c +++ b/thirdparty/freetype/src/sdf/ftsdf.c @@ -4,7 +4,7 @@ * * Signed Distance Field support for outline fonts (body). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -497,7 +497,7 @@ goto Exit; } - if ( !FT_QALLOC( ptr, sizeof ( *ptr ) ) ) + if ( !FT_QNEW( ptr ) ) { *ptr = null_edge; *edge = ptr; @@ -536,7 +536,7 @@ goto Exit; } - if ( !FT_QALLOC( ptr, sizeof ( *ptr ) ) ) + if ( !FT_QNEW( ptr ) ) { *ptr = null_contour; *contour = ptr; @@ -591,7 +591,7 @@ goto Exit; } - if ( !FT_QALLOC( ptr, sizeof ( *ptr ) ) ) + if ( !FT_QNEW( ptr ) ) { *ptr = null_shape; ptr->memory = memory; @@ -738,6 +738,18 @@ contour = shape->contours; + /* If the control point coincides with any of the end points */ + /* then it is a line and should be treated as one to avoid */ + /* unnecessary complexity later in the algorithm. */ + if ( ( contour->last_pos.x == control_1->x && + contour->last_pos.y == control_1->y ) || + ( control_1->x == to->x && + control_1->y == to->y ) ) + { + sdf_line_to( to, user ); + goto Exit; + } + FT_CALL( sdf_edge_new( memory, &edge ) ); edge->edge_type = SDF_EDGE_CONIC; @@ -764,9 +776,9 @@ const FT_26D6_Vec* to, void* user ) { - SDF_Shape* shape = ( SDF_Shape* )user; - SDF_Edge* edge = NULL; - SDF_Contour* contour = NULL; + SDF_Shape* shape = ( SDF_Shape* )user; + SDF_Edge* edge = NULL; + SDF_Contour* contour = NULL; FT_Error error = FT_Err_Ok; FT_Memory memory = shape->memory; @@ -1065,7 +1077,7 @@ static FT_Error split_sdf_conic( FT_Memory memory, FT_26D6_Vec* control_points, - FT_Int max_splits, + FT_UInt max_splits, SDF_Edge** out ) { FT_Error error = FT_Err_Ok; @@ -1134,26 +1146,41 @@ static FT_Error split_sdf_cubic( FT_Memory memory, FT_26D6_Vec* control_points, - FT_Int max_splits, + FT_UInt max_splits, SDF_Edge** out ) { - FT_Error error = FT_Err_Ok; - FT_26D6_Vec cpos[7]; - SDF_Edge* left,* right; + FT_Error error = FT_Err_Ok; + FT_26D6_Vec cpos[7]; + SDF_Edge* left, *right; + const FT_26D6 threshold = ONE_PIXEL / 4; - if ( !memory || !out ) + if ( !memory || !out ) { error = FT_THROW( Invalid_Argument ); goto Exit; } - /* split the conic */ + /* split the cubic */ cpos[0] = control_points[0]; cpos[1] = control_points[1]; cpos[2] = control_points[2]; cpos[3] = control_points[3]; + /* If the segment is flat enough we won't get any benefit by */ + /* splitting it further, so we can just stop splitting. */ + /* */ + /* Check the deviation of the Bezier curve and stop if it is */ + /* smaller than the pre-defined `threshold` value. */ + if ( FT_ABS( 2 * cpos[0].x - 3 * cpos[1].x + cpos[3].x ) < threshold && + FT_ABS( 2 * cpos[0].y - 3 * cpos[1].y + cpos[3].y ) < threshold && + FT_ABS( cpos[0].x - 3 * cpos[2].x + 2 * cpos[3].x ) < threshold && + FT_ABS( cpos[0].y - 3 * cpos[2].y + 2 * cpos[3].y ) < threshold ) + { + split_cubic( cpos ); + goto Append; + } + split_cubic( cpos ); /* If max number of splits is done */ @@ -1250,13 +1277,32 @@ /* Subdivide the curve and add it to the list. */ { FT_26D6_Vec ctrls[3]; + FT_26D6 dx, dy; + FT_UInt num_splits; ctrls[0] = edge->start_pos; ctrls[1] = edge->control_a; ctrls[2] = edge->end_pos; - error = split_sdf_conic( memory, ctrls, 32, &new_edges ); + dx = FT_ABS( ctrls[2].x + ctrls[0].x - 2 * ctrls[1].x ); + dy = FT_ABS( ctrls[2].y + ctrls[0].y - 2 * ctrls[1].y ); + if ( dx < dy ) + dx = dy; + + /* Calculate the number of necessary bisections. Each */ + /* bisection causes a four-fold reduction of the deviation, */ + /* hence we bisect the Bezier curve until the deviation */ + /* becomes less than 1/8th of a pixel. For more details */ + /* check file `ftgrays.c`. */ + num_splits = 1; + while ( dx > ONE_PIXEL / 8 ) + { + dx >>= 2; + num_splits <<= 1; + } + + error = split_sdf_conic( memory, ctrls, num_splits, &new_edges ); } break; @@ -1277,9 +1323,11 @@ default: error = FT_THROW( Invalid_Argument ); - goto Exit; } + if ( error != FT_Err_Ok ) + goto Exit; + edges = edges->next; } @@ -2966,7 +3014,7 @@ diff = current_dist.distance - min_dist.distance; - if ( FT_ABS(diff ) < CORNER_CHECK_EPSILON ) + if ( FT_ABS( diff ) < CORNER_CHECK_EPSILON ) min_dist = resolve_corner( min_dist, current_dist ); else if ( diff < 0 ) min_dist = current_dist; @@ -3240,7 +3288,7 @@ buffer = (FT_SDFFormat*)bitmap->buffer; if ( USE_SQUARED_DISTANCES ) - sp_sq = fixed_spread * fixed_spread; + sp_sq = FT_INT_16D16( (FT_Int)( spread * spread ) ); else sp_sq = fixed_spread; @@ -3284,6 +3332,7 @@ FT_26D6_Vec grid_point = zero_vector; SDF_Signed_Distance dist = max_sdf; FT_UInt index = 0; + FT_16D16 diff = 0; if ( x < 0 || x >= width ) @@ -3311,7 +3360,7 @@ if ( dist.distance > sp_sq ) continue; - /* square_root the values and fit in a 6.10 fixed-point */ + /* take the square root of the distance if required */ if ( USE_SQUARED_DISTANCES ) dist.distance = square_root( dist.distance ); @@ -3323,11 +3372,15 @@ /* check whether the pixel is set or not */ if ( dists[index].sign == 0 ) dists[index] = dist; - else if ( dists[index].distance > dist.distance ) - dists[index] = dist; - else if ( FT_ABS( dists[index].distance - dist.distance ) - < CORNER_CHECK_EPSILON ) - dists[index] = resolve_corner( dists[index], dist ); + else + { + diff = FT_ABS( dists[index].distance - dist.distance ); + + if ( diff <= CORNER_CHECK_EPSILON ) + dists[index] = resolve_corner( dists[index], dist ); + else if ( dists[index].distance > dist.distance ) + dists[index] = dist; + } } } diff --git a/thirdparty/freetype/src/sdf/ftsdf.h b/thirdparty/freetype/src/sdf/ftsdf.h index 187b418af3..5f6b3f52aa 100644 --- a/thirdparty/freetype/src/sdf/ftsdf.h +++ b/thirdparty/freetype/src/sdf/ftsdf.h @@ -4,7 +4,7 @@ * * Signed Distance Field support (specification). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/ftsdfcommon.c b/thirdparty/freetype/src/sdf/ftsdfcommon.c index 91aa521bb3..072a36ea6c 100644 --- a/thirdparty/freetype/src/sdf/ftsdfcommon.c +++ b/thirdparty/freetype/src/sdf/ftsdfcommon.c @@ -4,7 +4,7 @@ * * Auxiliary data for Signed Distance Field support (body). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/ftsdfcommon.h b/thirdparty/freetype/src/sdf/ftsdfcommon.h index 44f6bba53f..af4490bbca 100644 --- a/thirdparty/freetype/src/sdf/ftsdfcommon.h +++ b/thirdparty/freetype/src/sdf/ftsdfcommon.h @@ -4,7 +4,7 @@ * * Auxiliary data for Signed Distance Field support (specification). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -48,6 +48,8 @@ FT_BEGIN_HEADER #define MIN_SPREAD 2 /* maximum spread supported by the renderer */ #define MAX_SPREAD 32 + /* pixel size in 26.6 */ +#define ONE_PIXEL ( 1 << 6 ) /************************************************************************** diff --git a/thirdparty/freetype/src/sdf/ftsdferrs.h b/thirdparty/freetype/src/sdf/ftsdferrs.h index dbb113d537..b28867609a 100644 --- a/thirdparty/freetype/src/sdf/ftsdferrs.h +++ b/thirdparty/freetype/src/sdf/ftsdferrs.h @@ -4,7 +4,7 @@ * * Signed Distance Field error codes (specification only). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/ftsdfrend.c b/thirdparty/freetype/src/sdf/ftsdfrend.c index 30f2e62a4f..b0213a40d3 100644 --- a/thirdparty/freetype/src/sdf/ftsdfrend.c +++ b/thirdparty/freetype/src/sdf/ftsdfrend.c @@ -4,7 +4,7 @@ * * Signed Distance Field renderer interface (body). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -298,15 +298,9 @@ goto Exit; } - /* the rows and pitch must be valid after presetting the */ - /* bitmap using outline */ + /* nothing to render */ if ( !bitmap->rows || !bitmap->pitch ) - { - FT_ERROR(( "ft_sdf_render: failed to preset bitmap\n" )); - - error = FT_THROW( Cannot_Render_Glyph ); - goto Exit; - } + return FT_Err_Ok; /* the padding will simply be equal to the `spread' */ x_pad = sdf_module->spread; @@ -525,13 +519,9 @@ goto Exit; } + /* nothing to render */ if ( !bitmap->rows || !bitmap->pitch ) - { - FT_ERROR(( "ft_bsdf_render: invalid bitmap size\n" )); - - error = FT_THROW( Invalid_Argument ); - goto Exit; - } + return FT_Err_Ok; FT_Bitmap_New( &target ); diff --git a/thirdparty/freetype/src/sdf/ftsdfrend.h b/thirdparty/freetype/src/sdf/ftsdfrend.h index bc88707ec2..cdb9c5f02f 100644 --- a/thirdparty/freetype/src/sdf/ftsdfrend.h +++ b/thirdparty/freetype/src/sdf/ftsdfrend.h @@ -4,7 +4,7 @@ * * Signed Distance Field renderer interface (specification). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/sdf.c b/thirdparty/freetype/src/sdf/sdf.c index 1bc3fc385c..297ba9ab02 100644 --- a/thirdparty/freetype/src/sdf/sdf.c +++ b/thirdparty/freetype/src/sdf/sdf.c @@ -4,7 +4,7 @@ * * FreeType Signed Distance Field renderer module component (body only). * - * Copyright (C) 2020-2021 by + * Copyright (C) 2020-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sfnt/pngshim.c b/thirdparty/freetype/src/sfnt/pngshim.c index 02fe37440c..0ce4bdb6b5 100644 --- a/thirdparty/freetype/src/sfnt/pngshim.c +++ b/thirdparty/freetype/src/sfnt/pngshim.c @@ -4,7 +4,7 @@ * * PNG Bitmap glyph support. * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * Google, Inc. * Written by Stuart Gill and Behdad Esfahbod. * @@ -367,7 +367,7 @@ } /* transform transparency to alpha */ - if ( png_get_valid(png, info, PNG_INFO_tRNS ) ) + if ( png_get_valid( png, info, PNG_INFO_tRNS ) ) png_set_tRNS_to_alpha( png ); if ( bitdepth == 16 ) @@ -387,7 +387,7 @@ png_set_filler( png, 0xFF, PNG_FILLER_AFTER ); /* recheck header after setting EXPAND options */ - png_read_update_info(png, info ); + png_read_update_info( png, info ); png_get_IHDR( png, info, &imgWidth, &imgHeight, &bitdepth, &color_type, &interlace, diff --git a/thirdparty/freetype/src/sfnt/pngshim.h b/thirdparty/freetype/src/sfnt/pngshim.h index 89efd27545..36d749c3c3 100644 --- a/thirdparty/freetype/src/sfnt/pngshim.h +++ b/thirdparty/freetype/src/sfnt/pngshim.h @@ -4,7 +4,7 @@ * * PNG Bitmap glyph support. * - * Copyright (C) 2013-2021 by + * Copyright (C) 2013-2022 by * Google, Inc. * Written by Stuart Gill and Behdad Esfahbod. * diff --git a/thirdparty/freetype/src/sfnt/sfdriver.c b/thirdparty/freetype/src/sfnt/sfdriver.c index d1d01c99e5..cc121e5790 100644 --- a/thirdparty/freetype/src/sfnt/sfdriver.c +++ b/thirdparty/freetype/src/sfnt/sfdriver.c @@ -4,7 +4,7 @@ * * High-level SFNT driver interface (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -36,6 +36,10 @@ #include "ttcpal.h" #endif +#ifdef FT_CONFIG_OPTION_SVG +#include "ttsvg.h" +#endif + #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES #include "ttpost.h" #endif @@ -491,15 +495,13 @@ char_type_func char_type, FT_Bool report_invalid_characters ) { - FT_Error error = FT_Err_Ok; + FT_Error error; char* result = NULL; FT_String* r; FT_Char* p; FT_UInt len; - FT_UNUSED( error ); - if ( FT_QALLOC( result, entry->stringLength / 2 + 1 ) ) return NULL; @@ -550,15 +552,13 @@ char_type_func char_type, FT_Bool report_invalid_characters ) { - FT_Error error = FT_Err_Ok; + FT_Error error; char* result = NULL; FT_String* r; FT_Char* p; FT_UInt len; - FT_UNUSED( error ); - if ( FT_QALLOC( result, entry->stringLength + 1 ) ) return NULL; @@ -1214,6 +1214,12 @@ #define PUT_COLOR_LAYERS( a ) NULL #endif +#ifdef FT_CONFIG_OPTION_SVG +#define PUT_SVG_SUPPORT( a ) a +#else +#define PUT_SVG_SUPPORT( a ) NULL +#endif + #define PUT_COLOR_LAYERS_V1( a ) PUT_COLOR_LAYERS( a ) #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES @@ -1308,7 +1314,14 @@ tt_face_get_metrics, /* TT_Get_Metrics_Func get_metrics */ tt_face_get_name, /* TT_Get_Name_Func get_name */ - sfnt_get_name_id /* TT_Get_Name_ID_Func get_name_id */ + sfnt_get_name_id, /* TT_Get_Name_ID_Func get_name_id */ + + PUT_SVG_SUPPORT( tt_face_load_svg ), + /* TT_Load_Table_Func load_svg */ + PUT_SVG_SUPPORT( tt_face_free_svg ), + /* TT_Free_Table_Func free_svg */ + PUT_SVG_SUPPORT( tt_face_load_svg_doc ) + /* TT_Load_Svg_Doc_Func load_svg_doc */ ) diff --git a/thirdparty/freetype/src/sfnt/sfdriver.h b/thirdparty/freetype/src/sfnt/sfdriver.h index 8d5b5ce367..6a2e3e9c7b 100644 --- a/thirdparty/freetype/src/sfnt/sfdriver.h +++ b/thirdparty/freetype/src/sfnt/sfdriver.h @@ -4,7 +4,7 @@ * * High-level SFNT driver interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sferrors.h b/thirdparty/freetype/src/sfnt/sferrors.h index 78e6f03513..99ef3f9fce 100644 --- a/thirdparty/freetype/src/sfnt/sferrors.h +++ b/thirdparty/freetype/src/sfnt/sferrors.h @@ -4,7 +4,7 @@ * * SFNT error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfnt.c b/thirdparty/freetype/src/sfnt/sfnt.c index 97692cdfb0..9b3ceaedc0 100644 --- a/thirdparty/freetype/src/sfnt/sfnt.c +++ b/thirdparty/freetype/src/sfnt/sfnt.c @@ -4,7 +4,7 @@ * * Single object library component. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -27,6 +27,7 @@ #include "ttcmap.c" #include "ttcolr.c" #include "ttcpal.c" +#include "ttsvg.c" #include "ttkern.c" #include "ttload.c" diff --git a/thirdparty/freetype/src/sfnt/sfobjs.c b/thirdparty/freetype/src/sfnt/sfobjs.c index 7891024790..a0da984e7a 100644 --- a/thirdparty/freetype/src/sfnt/sfobjs.c +++ b/thirdparty/freetype/src/sfnt/sfobjs.c @@ -4,7 +4,7 @@ * * SFNT object management (base). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -566,7 +566,7 @@ face_index = FT_ABS( face_instance_index ) & 0xFFFF; /* value -(N+1) requests information on index N */ - if ( face_instance_index < 0 ) + if ( face_instance_index < 0 && face_index > 0 ) face_index--; if ( face_index >= face->ttc_header.count ) @@ -784,17 +784,23 @@ FT_Int num_params, FT_Parameter* params ) { - FT_Error error; + FT_Error error; #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES - FT_Error psnames_error; + FT_Error psnames_error; #endif - FT_Bool has_outline; - FT_Bool is_apple_sbit; - FT_Bool is_apple_sbix; - FT_Bool has_CBLC; - FT_Bool has_CBDT; - FT_Bool ignore_typographic_family = FALSE; - FT_Bool ignore_typographic_subfamily = FALSE; + + FT_Bool has_outline; + FT_Bool is_apple_sbit; + + FT_Bool has_CBLC; + FT_Bool has_CBDT; + FT_Bool has_EBLC; + FT_Bool has_bloc; + FT_Bool has_sbix; + + FT_Bool ignore_typographic_family = FALSE; + FT_Bool ignore_typographic_subfamily = FALSE; + FT_Bool ignore_sbix = FALSE; SFNT_Service sfnt = (SFNT_Service)face->sfnt; @@ -813,6 +819,8 @@ ignore_typographic_family = TRUE; else if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY ) ignore_typographic_subfamily = TRUE; + else if ( params[i].tag == FT_PARAM_TAG_IGNORE_SBIX ) + ignore_sbix = TRUE; } } @@ -848,14 +856,17 @@ tt_face_lookup_table( face, TTAG_CFF2 ) ); #endif - is_apple_sbit = 0; - is_apple_sbix = !face->goto_table( face, TTAG_sbix, stream, 0 ); + /* check which sbit formats are present */ + has_CBLC = !face->goto_table( face, TTAG_CBLC, stream, 0 ); + has_CBDT = !face->goto_table( face, TTAG_CBDT, stream, 0 ); + has_EBLC = !face->goto_table( face, TTAG_EBLC, stream, 0 ); + has_bloc = !face->goto_table( face, TTAG_bloc, stream, 0 ); + has_sbix = !face->goto_table( face, TTAG_sbix, stream, 0 ); - /* Apple 'sbix' color bitmaps are rendered scaled and then the 'glyf' - * outline rendered on top. We don't support that yet, so just ignore - * the 'glyf' outline and advertise it as a bitmap-only font. */ - if ( is_apple_sbix ) - has_outline = FALSE; + is_apple_sbit = FALSE; + + if ( ignore_sbix ) + has_sbix = FALSE; /* if this font doesn't contain outlines, we try to load */ /* a `bhed' table */ @@ -867,16 +878,13 @@ /* load the font header (`head' table) if this isn't an Apple */ /* sbit font file */ - if ( !is_apple_sbit || is_apple_sbix ) + if ( !is_apple_sbit || has_sbix ) { LOAD_( head ); if ( error ) goto Exit; } - has_CBLC = !face->goto_table( face, TTAG_CBLC, stream, 0 ); - has_CBDT = !face->goto_table( face, TTAG_CBDT, stream, 0 ); - /* Ignore outlines for CBLC/CBDT fonts. */ if ( has_CBLC || has_CBDT ) has_outline = FALSE; @@ -986,7 +994,11 @@ /* the optional tables */ /* embedded bitmap support */ - if ( sfnt->load_eblc ) + /* TODO: Replace this clumsy check for all possible sbit tables */ + /* with something better (for example, by passing a parameter */ + /* to suppress 'sbix' loading). */ + if ( sfnt->load_eblc && + ( has_CBLC || has_EBLC || has_bloc || has_sbix ) ) LOAD_( eblc ); /* colored glyph support */ @@ -996,6 +1008,10 @@ LOAD_( colr ); } + /* OpenType-SVG glyph support */ + if ( sfnt->load_svg ) + LOAD_( svg ); + /* consider the pclt, kerning, and gasp tables as optional */ LOAD_( pclt ); LOAD_( gasp ); @@ -1050,11 +1066,19 @@ */ if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_CBLC || face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX || - face->colr ) + face->colr || + face->svg ) flags |= FT_FACE_FLAG_COLOR; /* color glyphs */ if ( has_outline == TRUE ) - flags |= FT_FACE_FLAG_SCALABLE; /* scalable outlines */ + { + /* by default (and for backward compatibility) we handle */ + /* fonts with an 'sbix' table as bitmap-only */ + if ( has_sbix ) + flags |= FT_FACE_FLAG_SBIX; /* with 'sbix' bitmaps */ + else + flags |= FT_FACE_FLAG_SCALABLE; /* scalable outlines */ + } /* The sfnt driver only supports bitmap fonts natively, thus we */ /* don't set FT_FACE_FLAG_HINTER. */ @@ -1277,7 +1301,8 @@ * * Set up metrics. */ - if ( FT_IS_SCALABLE( root ) ) + if ( FT_IS_SCALABLE( root ) || + FT_HAS_SBIX( root ) ) { /* XXX What about if outline header is missing */ /* (e.g. sfnt wrapped bitmap)? */ @@ -1416,6 +1441,12 @@ sfnt->free_cpal( face ); sfnt->free_colr( face ); } + +#ifdef FT_CONFIG_OPTION_SVG + /* free SVG data */ + if ( sfnt->free_svg ) + sfnt->free_svg( face ); +#endif } #ifdef TT_CONFIG_OPTION_BDF diff --git a/thirdparty/freetype/src/sfnt/sfobjs.h b/thirdparty/freetype/src/sfnt/sfobjs.h index 172c47ebb4..1d99bfede4 100644 --- a/thirdparty/freetype/src/sfnt/sfobjs.h +++ b/thirdparty/freetype/src/sfnt/sfobjs.h @@ -4,7 +4,7 @@ * * SFNT object management (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfwoff.c b/thirdparty/freetype/src/sfnt/sfwoff.c index 422c816a21..0e8ec3fa93 100644 --- a/thirdparty/freetype/src/sfnt/sfwoff.c +++ b/thirdparty/freetype/src/sfnt/sfwoff.c @@ -4,7 +4,7 @@ * * WOFF format management (base). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -64,7 +64,6 @@ FT_FREE( stream->base ); stream->size = 0; - stream->base = NULL; stream->close = NULL; } diff --git a/thirdparty/freetype/src/sfnt/sfwoff.h b/thirdparty/freetype/src/sfnt/sfwoff.h index 3fbdac0fde..5866a16194 100644 --- a/thirdparty/freetype/src/sfnt/sfwoff.h +++ b/thirdparty/freetype/src/sfnt/sfwoff.h @@ -4,7 +4,7 @@ * * WOFFF format management (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfwoff2.c b/thirdparty/freetype/src/sfnt/sfwoff2.c index 5ee8dea28a..b2855b8e72 100644 --- a/thirdparty/freetype/src/sfnt/sfwoff2.c +++ b/thirdparty/freetype/src/sfnt/sfwoff2.c @@ -4,7 +4,7 @@ * * WOFF2 format management (base). * - * Copyright (C) 2019-2021 by + * Copyright (C) 2019-2022 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -84,6 +84,8 @@ #define BBOX_STREAM 5 #define INSTRUCTION_STREAM 6 +#define HAVE_OVERLAP_SIMPLE_BITMAP 0x1 + static void stream_close( FT_Stream stream ) @@ -94,7 +96,6 @@ FT_FREE( stream->base ); stream->size = 0; - stream->base = NULL; stream->close = NULL; } @@ -523,6 +524,7 @@ const WOFF2_Point points, FT_UShort n_contours, FT_UShort instruction_len, + FT_Bool have_overlap, FT_Byte* dst, FT_ULong dst_size, FT_ULong* glyph_size ) @@ -550,6 +552,9 @@ FT_Int dy = point.y - last_y; + if ( i == 0 && have_overlap ) + flag |= GLYF_OVERLAP_SIMPLE; + if ( dx == 0 ) flag |= GLYF_THIS_X_IS_SAME; else if ( dx > -256 && dx < 256 ) @@ -834,15 +839,18 @@ FT_UInt num_substreams = 7; + FT_UShort option_flags; FT_UShort num_glyphs; FT_UShort index_format; FT_ULong expected_loca_length; FT_UInt offset; FT_UInt i; FT_ULong points_size; - FT_ULong bitmap_length; FT_ULong glyph_buf_size; FT_ULong bbox_bitmap_offset; + FT_ULong bbox_bitmap_length; + FT_ULong overlap_bitmap_offset = 0; + FT_ULong overlap_bitmap_length = 0; const FT_ULong glyf_start = *out_offset; FT_ULong dest_offset = *out_offset; @@ -858,15 +866,17 @@ if ( FT_NEW_ARRAY( substreams, num_substreams ) ) goto Fail; - if ( FT_STREAM_SKIP( 4 ) ) + if ( FT_STREAM_SKIP( 2 ) ) + goto Fail; + if ( FT_READ_USHORT( option_flags ) ) goto Fail; if ( FT_READ_USHORT( num_glyphs ) ) goto Fail; if ( FT_READ_USHORT( index_format ) ) goto Fail; - FT_TRACE4(( "num_glyphs = %u; index_format = %u\n", - num_glyphs, index_format )); + FT_TRACE4(( "option_flags = %u; num_glyphs = %u; index_format = %u\n", + option_flags, num_glyphs, index_format )); info->num_glyphs = num_glyphs; @@ -879,7 +889,7 @@ if ( info->loca_table->dst_length != expected_loca_length ) goto Fail; - offset = ( 2 + num_substreams ) * 4; + offset = 2 + 2 + 2 + 2 + ( num_substreams * 4 ); if ( offset > info->glyf_table->TransformLength ) goto Fail; @@ -902,6 +912,20 @@ offset += substream_size; } + if ( option_flags & HAVE_OVERLAP_SIMPLE_BITMAP ) + { + /* Size of overlapBitmap = floor((numGlyphs + 7) / 8) */ + overlap_bitmap_length = ( num_glyphs + 7U ) >> 3; + if ( overlap_bitmap_length > info->glyf_table->TransformLength - offset ) + goto Fail; + + overlap_bitmap_offset = pos + offset; + + FT_TRACE5(( " Overlap bitmap: offset = %lu; size = %lu;\n", + overlap_bitmap_offset, overlap_bitmap_length )); + offset += overlap_bitmap_length; + } + if ( FT_NEW_ARRAY( loca_values, num_glyphs + 1 ) ) goto Fail; @@ -909,8 +933,9 @@ bbox_bitmap_offset = substreams[BBOX_STREAM].offset; /* Size of bboxBitmap = 4 * floor((numGlyphs + 31) / 32) */ - bitmap_length = ( ( num_glyphs + 31U ) >> 5 ) << 2; - substreams[BBOX_STREAM].offset += bitmap_length; + bbox_bitmap_length = ( ( num_glyphs + 31U ) >> 5 ) << 2; + /* bboxStreamSize is the combined size of bboxBitmap and bboxStream. */ + substreams[BBOX_STREAM].offset += bbox_bitmap_length; glyph_buf_size = WOFF2_DEFAULT_GLYPH_BUF; if ( FT_NEW_ARRAY( glyph_buf, glyph_buf_size ) ) @@ -948,7 +973,7 @@ /* composite glyph */ FT_Bool have_instructions = FALSE; FT_UShort instruction_size = 0; - FT_ULong composite_size; + FT_ULong composite_size = 0; FT_ULong size_needed; FT_Byte* pointer = NULL; @@ -1026,8 +1051,11 @@ FT_ULong flag_size; FT_ULong triplet_size; FT_ULong triplet_bytes_used; - FT_Byte* flags_buf = NULL; - FT_Byte* triplet_buf = NULL; + FT_Bool have_overlap = FALSE; + FT_Byte overlap_bitmap; + FT_ULong overlap_offset; + FT_Byte* flags_buf = NULL; + FT_Byte* triplet_buf = NULL; FT_UShort instruction_size; FT_ULong size_needed; FT_Int end_point; @@ -1036,6 +1064,17 @@ FT_Byte* pointer = NULL; + /* Set `have_overlap`. */ + if ( overlap_bitmap_offset ) + { + overlap_offset = overlap_bitmap_offset + ( i >> 3 ); + if ( FT_STREAM_SEEK( overlap_offset ) || + FT_READ_BYTE( overlap_bitmap ) ) + goto Fail; + if ( overlap_bitmap & ( 0x80 >> ( i & 7 ) ) ) + have_overlap = TRUE; + } + if ( FT_NEW_ARRAY( n_points_arr, n_contours ) ) goto Fail; @@ -1156,6 +1195,7 @@ points, n_contours, instruction_size, + have_overlap, glyph_buf, glyph_buf_size, &glyph_size ) ) @@ -2064,7 +2104,7 @@ error = FT_THROW( Invalid_Table ); goto Exit; } - file_offset = ROUND4(woff2.metaOffset + woff2.metaLength); + file_offset = ROUND4( woff2.metaOffset + woff2.metaLength ); } if ( woff2.privOffset ) @@ -2074,7 +2114,7 @@ error = FT_THROW( Invalid_Table ); goto Exit; } - file_offset = ROUND4(woff2.privOffset + woff2.privLength); + file_offset = ROUND4( woff2.privOffset + woff2.privLength ); } if ( file_offset != ( ROUND4( woff2.length ) ) ) @@ -2086,7 +2126,7 @@ /* Validate requested face index. */ *num_faces = woff2.num_fonts; /* value -(N+1) requests information on index N */ - if ( *face_instance_index < 0 ) + if ( *face_instance_index < 0 && face_index > 0 ) face_index--; if ( face_index >= woff2.num_fonts ) diff --git a/thirdparty/freetype/src/sfnt/sfwoff2.h b/thirdparty/freetype/src/sfnt/sfwoff2.h index fa78b02429..e84982ed9c 100644 --- a/thirdparty/freetype/src/sfnt/sfwoff2.h +++ b/thirdparty/freetype/src/sfnt/sfwoff2.h @@ -4,7 +4,7 @@ * * WOFFF2 format management (specification). * - * Copyright (C) 2019-2021 by + * Copyright (C) 2019-2022 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -56,6 +56,7 @@ FT_BEGIN_HEADER #define GLYF_REPEAT 1 << 3 #define GLYF_THIS_X_IS_SAME 1 << 4 #define GLYF_THIS_Y_IS_SAME 1 << 5 +#define GLYF_OVERLAP_SIMPLE 1 << 6 /* Other constants */ #define CONTOUR_OFFSET_END_POINT 10 diff --git a/thirdparty/freetype/src/sfnt/ttbdf.c b/thirdparty/freetype/src/sfnt/ttbdf.c index b8d9473a63..4d2faf2385 100644 --- a/thirdparty/freetype/src/sfnt/ttbdf.c +++ b/thirdparty/freetype/src/sfnt/ttbdf.c @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded BDF properties (body). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttbdf.h b/thirdparty/freetype/src/sfnt/ttbdf.h index 91271d916f..b7b11c9bec 100644 --- a/thirdparty/freetype/src/sfnt/ttbdf.h +++ b/thirdparty/freetype/src/sfnt/ttbdf.h @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded BDF properties (specification). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttcmap.c b/thirdparty/freetype/src/sfnt/ttcmap.c index b369d83788..bfeabacb7d 100644 --- a/thirdparty/freetype/src/sfnt/ttcmap.c +++ b/thirdparty/freetype/src/sfnt/ttcmap.c @@ -4,7 +4,7 @@ * * TrueType character mapping table (cmap) support (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -465,7 +465,7 @@ if ( subheader ) { FT_Byte* p = subheader; - FT_UInt idx = (FT_UInt)(char_code & 0xFF); + FT_UInt idx = (FT_UInt)( char_code & 0xFF ); FT_UInt start, count; FT_Int delta; FT_UInt offset; diff --git a/thirdparty/freetype/src/sfnt/ttcmap.h b/thirdparty/freetype/src/sfnt/ttcmap.h index 504fc951c4..b10860b345 100644 --- a/thirdparty/freetype/src/sfnt/ttcmap.h +++ b/thirdparty/freetype/src/sfnt/ttcmap.h @@ -4,7 +4,7 @@ * * TrueType character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttcmapc.h b/thirdparty/freetype/src/sfnt/ttcmapc.h index 4e6cd46ba8..6822a9cd6b 100644 --- a/thirdparty/freetype/src/sfnt/ttcmapc.h +++ b/thirdparty/freetype/src/sfnt/ttcmapc.h @@ -4,7 +4,7 @@ * * TT CMAP classes definitions (specification only). * - * Copyright (C) 2009-2021 by + * Copyright (C) 2009-2022 by * Oran Agra and Mickey Gabel. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttcolr.c b/thirdparty/freetype/src/sfnt/ttcolr.c index 8f5cc8bcd1..d54231fd64 100644 --- a/thirdparty/freetype/src/sfnt/ttcolr.c +++ b/thirdparty/freetype/src/sfnt/ttcolr.c @@ -4,7 +4,7 @@ * * TrueType and OpenType colored glyph layer support (body). * - * Copyright (C) 2018-2021 by + * Copyright (C) 2018-2022 by * David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg. * * Originally written by Shao Yu Zhang <shaozhang@fb.com>. @@ -522,19 +522,29 @@ else if ( apaint->format == FT_COLR_PAINTFORMAT_RADIAL_GRADIENT ) { + FT_Pos tmp; + + if ( !read_color_line( child_table_p, &apaint->u.radial_gradient.colorline ) ) return 0; + /* In the OpenType specification, `r0` and `r1` are defined as */ + /* `UFWORD`. Since FreeType doesn't have a corresponding 16.16 */ + /* format we convert to `FWORD` and replace negative values with */ + /* (32bit) `FT_INT_MAX`. */ + apaint->u.radial_gradient.c0.x = INT_TO_FIXED( FT_NEXT_SHORT( p ) ); apaint->u.radial_gradient.c0.y = INT_TO_FIXED( FT_NEXT_SHORT( p ) ); - apaint->u.radial_gradient.r0 = FT_NEXT_USHORT( p ) << 16; + tmp = INT_TO_FIXED( FT_NEXT_SHORT( p ) ); + apaint->u.radial_gradient.r0 = tmp < 0 ? FT_INT_MAX : tmp; apaint->u.radial_gradient.c1.x = INT_TO_FIXED( FT_NEXT_SHORT( p ) ); apaint->u.radial_gradient.c1.y = INT_TO_FIXED( FT_NEXT_SHORT( p ) ); - apaint->u.radial_gradient.r1 = FT_NEXT_USHORT( p ) << 16; + tmp = INT_TO_FIXED( FT_NEXT_SHORT( p ) ); + apaint->u.radial_gradient.r1 = tmp < 0 ? FT_INT_MAX : tmp; return 1; } @@ -824,7 +834,7 @@ { Colr* colr; - FT_Byte *p, *p1, *clip_base; + FT_Byte *p, *p1, *clip_base, *limit; FT_Byte clip_list_format; FT_ULong num_clip_boxes, i; @@ -847,16 +857,32 @@ p = colr->clip_list; + /* Limit points to the first byte after the end of the color table. */ + /* Thus, in subsequent limit checks below we need to check whether the */ + /* read pointer is strictly greater than a position offset by certain */ + /* field sizes to the left of that position. */ + limit = (FT_Byte*)colr->table + colr->table_size; + + /* Check whether we can extract one `uint8` and one `uint32`. */ + if ( p > limit - ( 1 + 4 ) ) + return 0; + clip_base = p; clip_list_format = FT_NEXT_BYTE ( p ); /* Format byte used here to be able to upgrade ClipList for >16bit */ - /* glyph ids; for now we can expect it to be 0. */ + /* glyph ids; for now we can expect it to be 0. */ if ( !( clip_list_format == 1 ) ) return 0; num_clip_boxes = FT_NEXT_ULONG( p ); + /* Check whether we can extract two `uint16` and one `Offset24`, */ + /* `num_clip_boxes` times. */ + if ( colr->table_size / ( 2 + 2 + 3 ) < num_clip_boxes || + p > limit - ( 2 + 2 + 3 ) * num_clip_boxes ) + return 0; + for ( i = 0; i < num_clip_boxes; ++i ) { gid_start = FT_NEXT_USHORT( p ); @@ -867,7 +893,8 @@ { p1 = (FT_Byte*)( clip_base + clip_box_offset ); - if ( p1 >= ( (FT_Byte*)colr->table + colr->table_size ) ) + /* Check whether we can extract one `uint8`. */ + if ( p1 > limit - 1 ) return 0; format = FT_NEXT_BYTE( p1 ); @@ -875,6 +902,10 @@ if ( format > 1 ) return 0; + /* Check whether we can extract four `FWORD`. */ + if ( p1 > limit - ( 2 + 2 + 2 + 2 ) ) + return 0; + /* `face->root.size->metrics.x_scale` and `y_scale` are factors */ /* that scale a font unit value in integers to a 26.6 fixed value */ /* according to the requested size, see for example */ diff --git a/thirdparty/freetype/src/sfnt/ttcolr.h b/thirdparty/freetype/src/sfnt/ttcolr.h index b81e4cb958..4200cb2976 100644 --- a/thirdparty/freetype/src/sfnt/ttcolr.h +++ b/thirdparty/freetype/src/sfnt/ttcolr.h @@ -4,7 +4,7 @@ * * TrueType and OpenType colored glyph layer support (specification). * - * Copyright (C) 2018-2021 by + * Copyright (C) 2018-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang <shaozhang@fb.com>. diff --git a/thirdparty/freetype/src/sfnt/ttcpal.c b/thirdparty/freetype/src/sfnt/ttcpal.c index a0d84bca3a..9ae535cbda 100644 --- a/thirdparty/freetype/src/sfnt/ttcpal.c +++ b/thirdparty/freetype/src/sfnt/ttcpal.c @@ -4,7 +4,7 @@ * * TrueType and OpenType color palette support (body). * - * Copyright (C) 2018-2021 by + * Copyright (C) 2018-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang <shaozhang@fb.com>. diff --git a/thirdparty/freetype/src/sfnt/ttcpal.h b/thirdparty/freetype/src/sfnt/ttcpal.h index 1c5586855b..4717d224fc 100644 --- a/thirdparty/freetype/src/sfnt/ttcpal.h +++ b/thirdparty/freetype/src/sfnt/ttcpal.h @@ -4,7 +4,7 @@ * * TrueType and OpenType color palette support (specification). * - * Copyright (C) 2018-2021 by + * Copyright (C) 2018-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang <shaozhang@fb.com>. diff --git a/thirdparty/freetype/src/sfnt/ttkern.c b/thirdparty/freetype/src/sfnt/ttkern.c index bb1922caf9..ca1c509406 100644 --- a/thirdparty/freetype/src/sfnt/ttkern.c +++ b/thirdparty/freetype/src/sfnt/ttkern.c @@ -5,7 +5,7 @@ * Load the basic TrueType kerning table. This doesn't handle * kerning data within the GPOS table at the moment. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -94,7 +94,7 @@ p_next = p; - p += 2; /* skip version */ + p += 2; /* skip version */ length = FT_NEXT_USHORT( p ); coverage = FT_NEXT_USHORT( p ); @@ -144,7 +144,7 @@ cur_pair = FT_NEXT_ULONG( p ); - if ( cur_pair <= old_pair ) + if ( cur_pair < old_pair ) break; p += 2; @@ -187,11 +187,18 @@ FT_UInt left_glyph, FT_UInt right_glyph ) { - FT_Int result = 0; - FT_UInt count, mask; - FT_Byte* p = face->kern_table; - FT_Byte* p_limit = p + face->kern_table_size; + FT_Int result = 0; + FT_UInt count, mask; + FT_Byte* p; + FT_Byte* p_limit; + + + if ( !face->kern_table ) + return result; + + p = face->kern_table; + p_limit = p + face->kern_table_size; p += 4; mask = 0x0001; diff --git a/thirdparty/freetype/src/sfnt/ttkern.h b/thirdparty/freetype/src/sfnt/ttkern.h index 3d8f1e8347..f063558313 100644 --- a/thirdparty/freetype/src/sfnt/ttkern.h +++ b/thirdparty/freetype/src/sfnt/ttkern.h @@ -5,7 +5,7 @@ * Load the basic TrueType kerning table. This doesn't handle * kerning data within the GPOS table at the moment. * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttload.c b/thirdparty/freetype/src/sfnt/ttload.c index 51416d80b4..c83bd197fe 100644 --- a/thirdparty/freetype/src/sfnt/ttload.c +++ b/thirdparty/freetype/src/sfnt/ttload.c @@ -5,7 +5,7 @@ * Load the basic TrueType tables, i.e., tables that can be either in * TTF or OTF fonts (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -205,7 +205,6 @@ if ( FT_STREAM_READ_FIELDS( table_dir_entry_fields, &table ) ) { - nn--; FT_TRACE2(( "check_table_dir:" " can read only %d table%s in font (instead of %d)\n", nn, nn == 1 ? "" : "s", sfnt->num_tables )); diff --git a/thirdparty/freetype/src/sfnt/ttload.h b/thirdparty/freetype/src/sfnt/ttload.h index cab15cd238..5368971c31 100644 --- a/thirdparty/freetype/src/sfnt/ttload.h +++ b/thirdparty/freetype/src/sfnt/ttload.h @@ -5,7 +5,7 @@ * Load the basic TrueType tables, i.e., tables that can be either in * TTF or OTF fonts (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttmtx.c b/thirdparty/freetype/src/sfnt/ttmtx.c index 7aece36fb0..88377327c6 100644 --- a/thirdparty/freetype/src/sfnt/ttmtx.c +++ b/thirdparty/freetype/src/sfnt/ttmtx.c @@ -4,7 +4,7 @@ * * Load the metrics tables common to TTF and OTF fonts (body). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttmtx.h b/thirdparty/freetype/src/sfnt/ttmtx.h index 270170d478..1e45b949a5 100644 --- a/thirdparty/freetype/src/sfnt/ttmtx.h +++ b/thirdparty/freetype/src/sfnt/ttmtx.h @@ -4,7 +4,7 @@ * * Load the metrics tables common to TTF and OTF fonts (specification). * - * Copyright (C) 2006-2021 by + * Copyright (C) 2006-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttpost.c b/thirdparty/freetype/src/sfnt/ttpost.c index b92ca5db14..1a885a15c5 100644 --- a/thirdparty/freetype/src/sfnt/ttpost.c +++ b/thirdparty/freetype/src/sfnt/ttpost.c @@ -5,7 +5,7 @@ * PostScript name table processing for TrueType and OpenType fonts * (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttpost.h b/thirdparty/freetype/src/sfnt/ttpost.h index 6d65b5766c..bf9342a9f5 100644 --- a/thirdparty/freetype/src/sfnt/ttpost.h +++ b/thirdparty/freetype/src/sfnt/ttpost.h @@ -5,7 +5,7 @@ * PostScript name table processing for TrueType and OpenType fonts * (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttsbit.c b/thirdparty/freetype/src/sfnt/ttsbit.c index e9ba697dba..bf73d04e54 100644 --- a/thirdparty/freetype/src/sfnt/ttsbit.c +++ b/thirdparty/freetype/src/sfnt/ttsbit.c @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded bitmap support (body). * - * Copyright (C) 2005-2021 by + * Copyright (C) 2005-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Copyright 2013 by Google, Inc. @@ -172,17 +172,8 @@ goto Exit; } -#ifdef FT_DEBUG_LEVEL_TRACE - /* we currently don't support bit 1; however, it is better to */ - /* draw at least something... */ if ( flags == 3 ) - { - FT_TRACE1(( "tt_face_load_sbit_strikes:" - " sbix overlay not supported yet\n" )); - FT_TRACE1(( " " - " expect bad rendering results\n" )); - } -#endif + face->root.face_flags |= FT_FACE_FLAG_SBIX_OVERLAY; /* * Count the number of strikes available in the table. We are a bit @@ -730,6 +721,9 @@ pitch = bitmap->pitch; line = bitmap->buffer; + if ( !line ) + goto Exit; + width = decoder->metrics->width; height = decoder->metrics->height; @@ -1577,17 +1571,34 @@ if ( !error ) { - FT_Short abearing; + FT_Short abearing; /* not used here */ FT_UShort aadvance; tt_face_get_metrics( face, FALSE, glyph_index, &abearing, &aadvance ); metrics->horiBearingX = (FT_Short)originOffsetX; - metrics->horiBearingY = (FT_Short)( -originOffsetY + metrics->height ); + metrics->vertBearingX = (FT_Short)originOffsetX; + + metrics->horiBearingY = (FT_Short)( originOffsetY + metrics->height ); + metrics->vertBearingY = (FT_Short)originOffsetY; + metrics->horiAdvance = (FT_UShort)( aadvance * face->root.size->metrics.x_ppem / face->header.Units_Per_EM ); + + if ( face->vertical_info ) + tt_face_get_metrics( face, TRUE, glyph_index, &abearing, &aadvance ); + else if ( face->os2.version != 0xFFFFU ) + aadvance = (FT_UShort)FT_ABS( face->os2.sTypoAscender - + face->os2.sTypoDescender ); + else + aadvance = (FT_UShort)FT_ABS( face->horizontal.Ascender - + face->horizontal.Descender ); + + metrics->vertAdvance = (FT_UShort)( aadvance * + face->root.size->metrics.x_ppem / + face->header.Units_Per_EM ); } return error; diff --git a/thirdparty/freetype/src/sfnt/ttsbit.h b/thirdparty/freetype/src/sfnt/ttsbit.h index 7a0ed92e92..c967bffba3 100644 --- a/thirdparty/freetype/src/sfnt/ttsbit.h +++ b/thirdparty/freetype/src/sfnt/ttsbit.h @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded bitmap support (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttsvg.c b/thirdparty/freetype/src/sfnt/ttsvg.c new file mode 100644 index 0000000000..69277da577 --- /dev/null +++ b/thirdparty/freetype/src/sfnt/ttsvg.c @@ -0,0 +1,403 @@ +/**************************************************************************** + * + * ttsvg.c + * + * OpenType SVG Color (specification). + * + * Copyright (C) 2022 by + * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + + /************************************************************************** + * + * 'SVG' table specification: + * + * https://docs.microsoft.com/en-us/typography/opentype/spec/svg + * + */ + +#include <ft2build.h> +#include <freetype/internal/ftstream.h> +#include <freetype/internal/ftobjs.h> +#include <freetype/internal/ftdebug.h> +#include <freetype/tttags.h> +#include <freetype/ftgzip.h> +#include <freetype/otsvg.h> + + +#ifdef FT_CONFIG_OPTION_SVG + +#include "ttsvg.h" + + + /* NOTE: These table sizes are given by the specification. */ +#define SVG_TABLE_HEADER_SIZE (10U) +#define SVG_DOCUMENT_RECORD_SIZE (12U) +#define SVG_DOCUMENT_LIST_MINIMUM_SIZE (2U + SVG_DOCUMENT_RECORD_SIZE) +#define SVG_MINIMUM_SIZE (SVG_TABLE_HEADER_SIZE + \ + SVG_DOCUMENT_LIST_MINIMUM_SIZE) + + + typedef struct Svg_ + { + FT_UShort version; /* table version (starting at 0) */ + FT_UShort num_entries; /* number of SVG document records */ + + FT_Byte* svg_doc_list; /* pointer to the start of SVG Document List */ + + void* table; /* memory that backs up SVG */ + FT_ULong table_size; + + } Svg; + + + /************************************************************************** + * + * The macro FT_COMPONENT is used in trace mode. It is an implicit + * parameter of the FT_TRACE() and FT_ERROR() macros, usued to print/log + * messages during execution. + */ +#undef FT_COMPONENT +#define FT_COMPONENT ttsvg + + + FT_LOCAL_DEF( FT_Error ) + tt_face_load_svg( TT_Face face, + FT_Stream stream ) + { + FT_Error error; + FT_Memory memory = face->root.memory; + + FT_ULong table_size; + FT_Byte* table = NULL; + FT_Byte* p = NULL; + Svg* svg = NULL; + FT_ULong offsetToSVGDocumentList; + + + error = face->goto_table( face, TTAG_SVG, stream, &table_size ); + if ( error ) + goto NoSVG; + + if ( table_size < SVG_MINIMUM_SIZE ) + goto InvalidTable; + + if ( FT_FRAME_EXTRACT( table_size, table ) ) + goto NoSVG; + + /* Allocate memory for the SVG object */ + if ( FT_NEW( svg ) ) + goto NoSVG; + + p = table; + svg->version = FT_NEXT_USHORT( p ); + offsetToSVGDocumentList = FT_NEXT_ULONG( p ); + + if ( offsetToSVGDocumentList < SVG_TABLE_HEADER_SIZE || + offsetToSVGDocumentList > table_size - + SVG_DOCUMENT_LIST_MINIMUM_SIZE ) + goto InvalidTable; + + svg->svg_doc_list = (FT_Byte*)( table + offsetToSVGDocumentList ); + + p = svg->svg_doc_list; + svg->num_entries = FT_NEXT_USHORT( p ); + + FT_TRACE3(( "version: %d\n", svg->version )); + FT_TRACE3(( "number of entries: %d\n", svg->num_entries )); + + if ( offsetToSVGDocumentList + + svg->num_entries * SVG_DOCUMENT_RECORD_SIZE > table_size ) + goto InvalidTable; + + svg->table = table; + svg->table_size = table_size; + + face->svg = svg; + face->root.face_flags |= FT_FACE_FLAG_SVG; + + return FT_Err_Ok; + + InvalidTable: + error = FT_THROW( Invalid_Table ); + + NoSVG: + FT_FRAME_RELEASE( table ); + FT_FREE( svg ); + face->svg = NULL; + + return error; + } + + + FT_LOCAL_DEF( void ) + tt_face_free_svg( TT_Face face ) + { + FT_Memory memory = face->root.memory; + FT_Stream stream = face->root.stream; + + Svg* svg = (Svg*)face->svg; + + + if ( svg ) + { + FT_FRAME_RELEASE( svg->table ); + FT_FREE( svg ); + } + } + + + typedef struct Svg_doc_ + { + FT_UShort start_glyph_id; + FT_UShort end_glyph_id; + + FT_ULong offset; + FT_ULong length; + + } Svg_doc; + + + static Svg_doc + extract_svg_doc( FT_Byte* stream ) + { + Svg_doc doc; + + + doc.start_glyph_id = FT_NEXT_USHORT( stream ); + doc.end_glyph_id = FT_NEXT_USHORT( stream ); + + doc.offset = FT_NEXT_ULONG( stream ); + doc.length = FT_NEXT_ULONG( stream ); + + return doc; + } + + + static FT_Int + compare_svg_doc( Svg_doc doc, + FT_UInt glyph_index ) + { + if ( glyph_index < doc.start_glyph_id ) + return -1; + else if ( glyph_index > doc.end_glyph_id ) + return 1; + else + return 0; + } + + + static FT_Error + find_doc( FT_Byte* stream, + FT_UShort num_entries, + FT_UInt glyph_index, + FT_ULong *doc_offset, + FT_ULong *doc_length, + FT_UShort *start_glyph, + FT_UShort *end_glyph ) + { + FT_Error error; + + Svg_doc start_doc; + Svg_doc mid_doc; + Svg_doc end_doc; + + FT_Bool found = FALSE; + FT_UInt i = 0; + + FT_UInt start_index = 0; + FT_UInt end_index = num_entries - 1; + FT_Int comp_res; + + + /* search algorithm */ + if ( num_entries == 0 ) + { + error = FT_THROW( Invalid_Table ); + return error; + } + + start_doc = extract_svg_doc( stream + start_index * 12 ); + end_doc = extract_svg_doc( stream + end_index * 12 ); + + if ( ( compare_svg_doc( start_doc, glyph_index ) == -1 ) || + ( compare_svg_doc( end_doc, glyph_index ) == 1 ) ) + { + error = FT_THROW( Invalid_Glyph_Index ); + return error; + } + + while ( start_index <= end_index ) + { + i = ( start_index + end_index ) / 2; + mid_doc = extract_svg_doc( stream + i * 12 ); + comp_res = compare_svg_doc( mid_doc, glyph_index ); + + if ( comp_res == 1 ) + { + start_index = i + 1; + start_doc = extract_svg_doc( stream + start_index * 4 ); + } + else if ( comp_res == -1 ) + { + end_index = i - 1; + end_doc = extract_svg_doc( stream + end_index * 4 ); + } + else + { + found = TRUE; + break; + } + } + /* search algorithm end */ + + if ( found != TRUE ) + { + FT_TRACE5(( "SVG glyph not found\n" )); + error = FT_THROW( Invalid_Glyph_Index ); + } + else + { + *doc_offset = mid_doc.offset; + *doc_length = mid_doc.length; + + *start_glyph = mid_doc.start_glyph_id; + *end_glyph = mid_doc.end_glyph_id; + + error = FT_Err_Ok; + } + + return error; + } + + + FT_LOCAL_DEF( FT_Error ) + tt_face_load_svg_doc( FT_GlyphSlot glyph, + FT_UInt glyph_index ) + { + FT_Byte* doc_list; /* pointer to the SVG doc list */ + FT_UShort num_entries; /* total number of entries in doc list */ + FT_ULong doc_offset; + FT_ULong doc_length; + + FT_UShort start_glyph_id; + FT_UShort end_glyph_id; + + FT_Error error = FT_Err_Ok; + TT_Face face = (TT_Face)glyph->face; + FT_Memory memory = face->root.memory; + Svg* svg = (Svg*)face->svg; + + FT_SVG_Document svg_document = (FT_SVG_Document)glyph->other; + + + FT_ASSERT( !( svg == NULL ) ); + + doc_list = svg->svg_doc_list; + num_entries = FT_NEXT_USHORT( doc_list ); + + error = find_doc( doc_list, num_entries, glyph_index, + &doc_offset, &doc_length, + &start_glyph_id, &end_glyph_id ); + if ( error != FT_Err_Ok ) + goto Exit; + + doc_list = svg->svg_doc_list; /* reset, so we can use it again */ + doc_list = (FT_Byte*)( doc_list + doc_offset ); + + if ( ( doc_list[0] == 0x1F ) && ( doc_list[1] == 0x8B ) + && ( doc_list[2] == 0x08 ) ) + { +#ifdef FT_CONFIG_OPTION_USE_ZLIB + + FT_ULong uncomp_size; + FT_Byte* uncomp_buffer = NULL; + + + /* + * Get the size of the original document. This helps in allotting the + * buffer to accommodate the uncompressed version. The last 4 bytes + * of the compressed document are equal to the original size modulo + * 2^32. Since the size of SVG documents is less than 2^32 bytes we + * can use this accurately. The four bytes are stored in + * little-endian format. + */ + FT_TRACE4(( "SVG document is GZIP compressed\n" )); + uncomp_size = (FT_ULong)doc_list[doc_length - 1] << 24 | + (FT_ULong)doc_list[doc_length - 2] << 16 | + (FT_ULong)doc_list[doc_length - 3] << 8 | + (FT_ULong)doc_list[doc_length - 4]; + + if ( FT_QALLOC( uncomp_buffer, uncomp_size ) ) + goto Exit; + + error = FT_Gzip_Uncompress( memory, + uncomp_buffer, + &uncomp_size, + doc_list, + doc_length ); + if ( error ) + { + FT_FREE( uncomp_buffer ); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + glyph->internal->flags |= FT_GLYPH_OWN_GZIP_SVG; + + doc_list = uncomp_buffer; + doc_length = uncomp_size; + +#else /* !FT_CONFIG_OPTION_USE_ZLIB */ + + error = FT_THROW( Unimplemented_Feature ); + goto Exit; + +#endif /* !FT_CONFIG_OPTION_USE_ZLIB */ + } + + svg_document->svg_document = doc_list; + svg_document->svg_document_length = doc_length; + + svg_document->metrics = glyph->face->size->metrics; + svg_document->units_per_EM = glyph->face->units_per_EM; + + svg_document->start_glyph_id = start_glyph_id; + svg_document->end_glyph_id = end_glyph_id; + + svg_document->transform.xx = 0x10000; + svg_document->transform.xy = 0; + svg_document->transform.yx = 0; + svg_document->transform.yy = 0x10000; + + svg_document->delta.x = 0; + svg_document->delta.y = 0; + + FT_TRACE5(( "start_glyph_id: %d\n", start_glyph_id )); + FT_TRACE5(( "end_glyph_id: %d\n", end_glyph_id )); + FT_TRACE5(( "svg_document:\n" )); + FT_TRACE5(( " %.*s\n", (FT_UInt)doc_length, doc_list )); + + glyph->other = svg_document; + + Exit: + return error; + } + +#else /* !FT_CONFIG_OPTION_SVG */ + + /* ANSI C doesn't like empty source files */ + typedef int _tt_svg_dummy; + +#endif /* !FT_CONFIG_OPTION_SVG */ + + +/* END */ diff --git a/thirdparty/freetype/src/sfnt/ttsvg.h b/thirdparty/freetype/src/sfnt/ttsvg.h new file mode 100644 index 0000000000..7c234fd524 --- /dev/null +++ b/thirdparty/freetype/src/sfnt/ttsvg.h @@ -0,0 +1,43 @@ +/**************************************************************************** + * + * ttsvg.h + * + * OpenType SVG Color (specification). + * + * Copyright (C) 2022 by + * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + +#ifndef TTSVG_H_ +#define TTSVG_H_ + +#include <freetype/internal/ftstream.h> +#include <freetype/internal/tttypes.h> + + +FT_BEGIN_HEADER + + FT_LOCAL( FT_Error ) + tt_face_load_svg( TT_Face face, + FT_Stream stream ); + + FT_LOCAL( void ) + tt_face_free_svg( TT_Face face ); + + FT_LOCAL( FT_Error ) + tt_face_load_svg_doc( FT_GlyphSlot glyph, + FT_UInt glyph_index ); + +FT_END_HEADER + +#endif /* TTSVG_H_ */ + + +/* END */ diff --git a/thirdparty/freetype/src/sfnt/woff2tags.c b/thirdparty/freetype/src/sfnt/woff2tags.c index fe8f5cf76f..7d79fef39a 100644 --- a/thirdparty/freetype/src/sfnt/woff2tags.c +++ b/thirdparty/freetype/src/sfnt/woff2tags.c @@ -4,7 +4,7 @@ * * WOFF2 Font table tags (base). * - * Copyright (C) 2019-2021 by + * Copyright (C) 2019-2022 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/woff2tags.h b/thirdparty/freetype/src/sfnt/woff2tags.h index 4ef0a651c3..05df85aba0 100644 --- a/thirdparty/freetype/src/sfnt/woff2tags.h +++ b/thirdparty/freetype/src/sfnt/woff2tags.h @@ -4,7 +4,7 @@ * * WOFF2 Font table tags (specification). * - * Copyright (C) 2019-2021 by + * Copyright (C) 2019-2022 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/ftgrays.c b/thirdparty/freetype/src/smooth/ftgrays.c index d982c2820b..622035aa79 100644 --- a/thirdparty/freetype/src/smooth/ftgrays.c +++ b/thirdparty/freetype/src/smooth/ftgrays.c @@ -4,7 +4,7 @@ * * A new `perfect' anti-aliasing renderer (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -333,7 +333,9 @@ typedef ptrdiff_t FT_PtrDist; #define PIXEL_BITS 8 #define ONE_PIXEL ( 1 << PIXEL_BITS ) +#undef TRUNC #define TRUNC( x ) (TCoord)( (x) >> PIXEL_BITS ) +#undef FRACT #define FRACT( x ) (TCoord)( (x) & ( ONE_PIXEL - 1 ) ) #if PIXEL_BITS >= 6 diff --git a/thirdparty/freetype/src/smooth/ftgrays.h b/thirdparty/freetype/src/smooth/ftgrays.h index 3dad0498dc..13bf2baaa2 100644 --- a/thirdparty/freetype/src/smooth/ftgrays.h +++ b/thirdparty/freetype/src/smooth/ftgrays.h @@ -4,7 +4,7 @@ * * FreeType smooth renderer declaration * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/ftsmerrs.h b/thirdparty/freetype/src/smooth/ftsmerrs.h index dc2c40cc9f..7bc6077988 100644 --- a/thirdparty/freetype/src/smooth/ftsmerrs.h +++ b/thirdparty/freetype/src/smooth/ftsmerrs.h @@ -4,7 +4,7 @@ * * smooth renderer error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/ftsmooth.c b/thirdparty/freetype/src/smooth/ftsmooth.c index bea3b4a800..df227c3758 100644 --- a/thirdparty/freetype/src/smooth/ftsmooth.c +++ b/thirdparty/freetype/src/smooth/ftsmooth.c @@ -4,7 +4,7 @@ * * Anti-aliasing renderer interface (body). * - * Copyright (C) 2000-2021 by + * Copyright (C) 2000-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/ftsmooth.h b/thirdparty/freetype/src/smooth/ftsmooth.h index 2dd81e84b8..87f09faea4 100644 --- a/thirdparty/freetype/src/smooth/ftsmooth.h +++ b/thirdparty/freetype/src/smooth/ftsmooth.h @@ -4,7 +4,7 @@ * * Anti-aliasing renderer interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/smooth.c b/thirdparty/freetype/src/smooth/smooth.c index 9e25440635..f341e8f252 100644 --- a/thirdparty/freetype/src/smooth/smooth.c +++ b/thirdparty/freetype/src/smooth/smooth.c @@ -4,7 +4,7 @@ * * FreeType anti-aliasing rasterer module component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/svg/ftsvg.c b/thirdparty/freetype/src/svg/ftsvg.c new file mode 100644 index 0000000000..55c50718f3 --- /dev/null +++ b/thirdparty/freetype/src/svg/ftsvg.c @@ -0,0 +1,350 @@ +/**************************************************************************** + * + * ftsvg.c + * + * The FreeType SVG renderer interface (body). + * + * Copyright (C) 2022 by + * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + +#include <freetype/internal/ftdebug.h> +#include <freetype/internal/ftserv.h> +#include <freetype/internal/services/svprop.h> +#include <freetype/otsvg.h> +#include <freetype/internal/svginterface.h> +#include <freetype/ftbbox.h> + +#include "ftsvg.h" +#include "svgtypes.h" + + + /************************************************************************** + * + * The macro FT_COMPONENT is used in trace mode. It is an implicit + * parameter of the FT_TRACE() and FT_ERROR() macros, usued to print/log + * messages during execution. + */ +#undef FT_COMPONENT +#define FT_COMPONENT otsvg + + +#ifdef FT_CONFIG_OPTION_SVG + + /* ft_svg_init */ + static FT_Error + ft_svg_init( SVG_Renderer svg_module ) + { + FT_Error error = FT_Err_Ok; + + + svg_module->loaded = FALSE; + svg_module->hooks_set = FALSE; + + return error; + } + + + static void + ft_svg_done( SVG_Renderer svg_module ) + { + if ( svg_module->loaded == TRUE && + svg_module->hooks_set == TRUE ) + svg_module->hooks.free_svg( &svg_module->state ); + + svg_module->loaded = FALSE; + } + + + static FT_Error + ft_svg_preset_slot( FT_Module module, + FT_GlyphSlot slot, + FT_Bool cache ) + { + SVG_Renderer svg_renderer = (SVG_Renderer)module; + SVG_RendererHooks hooks = svg_renderer->hooks; + + + if ( svg_renderer->hooks_set == FALSE ) + { + FT_TRACE1(( "Hooks are NOT set. Can't render OT-SVG glyphs\n" )); + return FT_THROW( Missing_SVG_Hooks ); + } + + if ( svg_renderer->loaded == FALSE ) + { + FT_TRACE3(( "ft_svg_preset_slot: first presetting call," + " calling init hook\n" )); + hooks.init_svg( &svg_renderer->state ); + + svg_renderer->loaded = TRUE; + } + + return hooks.preset_slot( slot, cache, &svg_renderer->state ); + } + + + static FT_Error + ft_svg_render( FT_Renderer renderer, + FT_GlyphSlot slot, + FT_Render_Mode mode, + const FT_Vector* origin ) + { + SVG_Renderer svg_renderer = (SVG_Renderer)renderer; + + FT_Library library = renderer->root.library; + FT_Memory memory = library->memory; + FT_Error error; + + FT_ULong size_image_buffer; + + SVG_RendererHooks hooks = svg_renderer->hooks; + + + FT_UNUSED( mode ); + FT_UNUSED( origin ); + + if ( mode != FT_RENDER_MODE_NORMAL ) + return FT_THROW( Bad_Argument ); + + if ( svg_renderer->hooks_set == FALSE ) + { + FT_TRACE1(( "Hooks are NOT set. Can't render OT-SVG glyphs\n" )); + return FT_THROW( Missing_SVG_Hooks ); + } + + if ( svg_renderer->loaded == FALSE ) + { + FT_TRACE3(( "ft_svg_render: first rendering, calling init hook\n" )); + error = hooks.init_svg( &svg_renderer->state ); + + svg_renderer->loaded = TRUE; + } + + ft_svg_preset_slot( (FT_Module)renderer, slot, TRUE ); + + size_image_buffer = (FT_ULong)slot->bitmap.pitch * slot->bitmap.rows; + /* No `FT_QALLOC` here since we need a clean, empty canvas */ + /* to start with. */ + if ( FT_ALLOC( slot->bitmap.buffer, size_image_buffer ) ) + return error; + + error = hooks.render_svg( slot, &svg_renderer->state ); + if ( error ) + FT_FREE( slot->bitmap.buffer ); + else + slot->internal->flags |= FT_GLYPH_OWN_BITMAP; + + return error; + } + + + static const SVG_Interface svg_interface = + { + (Preset_Bitmap_Func)ft_svg_preset_slot + }; + + + static FT_Error + ft_svg_property_set( FT_Module module, + const char* property_name, + const void* value, + FT_Bool value_is_string ) + { + FT_Error error = FT_Err_Ok; + SVG_Renderer renderer = (SVG_Renderer)module; + + + if ( !ft_strcmp( property_name, "svg-hooks" ) ) + { + SVG_RendererHooks* hooks; + + + if ( value_is_string == TRUE ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + hooks = (SVG_RendererHooks*)value; + + if ( !hooks->init_svg || + !hooks->free_svg || + !hooks->render_svg || + !hooks->preset_slot ) + { + FT_TRACE0(( "ft_svg_property_set:" + " SVG rendering hooks not set because\n" )); + FT_TRACE0(( " " + " at least one function pointer is NULL\n" )); + + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + renderer->hooks = *hooks; + renderer->hooks_set = TRUE; + } + else + error = FT_THROW( Missing_Property ); + + Exit: + return error; + } + + + static FT_Error + ft_svg_property_get( FT_Module module, + const char* property_name, + const void* value ) + { + FT_Error error = FT_Err_Ok; + SVG_Renderer renderer = (SVG_Renderer)module; + + + if ( !ft_strcmp( property_name, "svg-hooks" ) ) + { + SVG_RendererHooks* hooks = (SVG_RendererHooks*)value; + + + *hooks = renderer->hooks; + } + else + error = FT_THROW( Missing_Property ); + + return error; + } + + + FT_DEFINE_SERVICE_PROPERTIESREC( + ft_svg_service_properties, + + (FT_Properties_SetFunc)ft_svg_property_set, /* set_property */ + (FT_Properties_GetFunc)ft_svg_property_get /* get_property */ + ) + + + FT_DEFINE_SERVICEDESCREC1( + ft_svg_services, + FT_SERVICE_ID_PROPERTIES, &ft_svg_service_properties ) + + + FT_CALLBACK_DEF( FT_Module_Interface ) + ft_svg_get_interface( FT_Module module, + const char* ft_svg_interface ) + { + FT_Module_Interface result; + + + FT_UNUSED( module ); + + result = ft_service_list_lookup( ft_svg_services, ft_svg_interface ); + if ( result ) + return result; + + return 0; + } + + + static FT_Error + ft_svg_transform( FT_Renderer renderer, + FT_GlyphSlot slot, + const FT_Matrix* _matrix, + const FT_Vector* _delta ) + { + FT_SVG_Document doc = (FT_SVG_Document)slot->other; + FT_Matrix* matrix = (FT_Matrix*)_matrix; + FT_Vector* delta = (FT_Vector*)_delta; + + FT_Matrix tmp_matrix; + FT_Vector tmp_delta; + + FT_Matrix a, b; + FT_Pos x, y; + + + FT_UNUSED( renderer ); + + if ( !matrix ) + { + tmp_matrix.xx = 0x10000; + tmp_matrix.xy = 0; + tmp_matrix.yx = 0; + tmp_matrix.yy = 0x10000; + + matrix = &tmp_matrix; + } + + if ( !delta ) + { + tmp_delta.x = 0; + tmp_delta.y = 0; + + delta = &tmp_delta; + } + + a = doc->transform; + b = *matrix; + FT_Matrix_Multiply( &b, &a ); + + + x = ADD_LONG( ADD_LONG( FT_MulFix( matrix->xx, doc->delta.x ), + FT_MulFix( matrix->xy, doc->delta.y ) ), + delta->x ); + y = ADD_LONG( ADD_LONG( FT_MulFix( matrix->yx, doc->delta.x ), + FT_MulFix( matrix->yy, doc->delta.y ) ), + delta->y ); + + doc->delta.x = x; + doc->delta.y = y; + doc->transform = a; + + return FT_Err_Ok; + } + +#endif /* FT_CONFIG_OPTION_SVG */ + + +#ifdef FT_CONFIG_OPTION_SVG +#define PUT_SVG_MODULE( a ) a +#define SVG_GLYPH_FORMAT FT_GLYPH_FORMAT_SVG +#else +#define PUT_SVG_MODULE( a ) NULL +#define SVG_GLYPH_FORMAT FT_GLYPH_FORMAT_NONE +#endif + + + FT_DEFINE_RENDERER( + ft_svg_renderer_class, + + FT_MODULE_RENDERER, + sizeof ( SVG_RendererRec ), + + "ot-svg", + 0x10000L, + 0x20000L, + + (const void*)PUT_SVG_MODULE( &svg_interface ), /* module specific interface */ + + (FT_Module_Constructor)PUT_SVG_MODULE( ft_svg_init ), /* module_init */ + (FT_Module_Destructor)PUT_SVG_MODULE( ft_svg_done ), /* module_done */ + PUT_SVG_MODULE( ft_svg_get_interface ), /* get_interface */ + + SVG_GLYPH_FORMAT, + + (FT_Renderer_RenderFunc) PUT_SVG_MODULE( ft_svg_render ), /* render_glyph */ + (FT_Renderer_TransformFunc)PUT_SVG_MODULE( ft_svg_transform ), /* transform_glyph */ + NULL, /* get_glyph_cbox */ + NULL, /* set_mode */ + NULL /* raster_class */ + ) + + +/* END */ diff --git a/thirdparty/freetype/src/svg/ftsvg.h b/thirdparty/freetype/src/svg/ftsvg.h new file mode 100644 index 0000000000..73514b8cf3 --- /dev/null +++ b/thirdparty/freetype/src/svg/ftsvg.h @@ -0,0 +1,35 @@ +/**************************************************************************** + * + * ftsvg.h + * + * The FreeType SVG renderer interface (specification). + * + * Copyright (C) 2022 by + * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + +#ifndef FTSVG_H_ +#define FTSVG_H_ + +#include <ft2build.h> +#include <freetype/ftrender.h> +#include <freetype/internal/ftobjs.h> + + +FT_BEGIN_HEADER + + FT_DECLARE_RENDERER( ft_svg_renderer_class ) + +FT_END_HEADER + +#endif /* FTSVG_H_ */ + + +/* END */ diff --git a/thirdparty/freetype/src/svg/svg.c b/thirdparty/freetype/src/svg/svg.c new file mode 100644 index 0000000000..b7e62a418c --- /dev/null +++ b/thirdparty/freetype/src/svg/svg.c @@ -0,0 +1,24 @@ +/**************************************************************************** + * + * svg.c + * + * FreeType SVG renderer module component (body only). + * + * Copyright (C) 2022 by + * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + +#define FT_MAKE_OPTION_SINGLE_OBJECT + +#include "svgtypes.h" +#include "ftsvg.c" + + +/* END */ diff --git a/thirdparty/freetype/src/svg/svgtypes.h b/thirdparty/freetype/src/svg/svgtypes.h new file mode 100644 index 0000000000..34fce47a34 --- /dev/null +++ b/thirdparty/freetype/src/svg/svgtypes.h @@ -0,0 +1,42 @@ +/**************************************************************************** + * + * svgtypes.h + * + * The FreeType SVG renderer internal types (specification). + * + * Copyright (C) 2022 by + * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + +#ifndef SVGTYPES_H_ +#define SVGTYPES_H_ + +#include <ft2build.h> +#include <freetype/internal/ftobjs.h> +#include <freetype/ftrender.h> +#include <freetype/otsvg.h> + + + typedef struct SVG_RendererRec_ + { + FT_RendererRec root; /* this inherits FT_RendererRec */ + FT_Bool loaded; + FT_Bool hooks_set; + SVG_RendererHooks hooks; /* this holds hooks for SVG rendering */ + FT_Pointer state; /* a place for hooks to store state, if needed */ + + } SVG_RendererRec; + + typedef struct SVG_RendererRec_* SVG_Renderer; + +#endif /* SVGTYPES_H_ */ + + +/* EOF */ diff --git a/thirdparty/freetype/src/truetype/truetype.c b/thirdparty/freetype/src/truetype/truetype.c index 4232aca6ec..41c844acbb 100644 --- a/thirdparty/freetype/src/truetype/truetype.c +++ b/thirdparty/freetype/src/truetype/truetype.c @@ -4,7 +4,7 @@ * * FreeType TrueType driver component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttdriver.c b/thirdparty/freetype/src/truetype/ttdriver.c index 6fcfdb23e4..245d97cb58 100644 --- a/thirdparty/freetype/src/truetype/ttdriver.c +++ b/thirdparty/freetype/src/truetype/ttdriver.c @@ -4,7 +4,7 @@ * * TrueType font driver implementation (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttdriver.h b/thirdparty/freetype/src/truetype/ttdriver.h index 4e6d52d22c..c477c0b1dd 100644 --- a/thirdparty/freetype/src/truetype/ttdriver.h +++ b/thirdparty/freetype/src/truetype/ttdriver.h @@ -4,7 +4,7 @@ * * High-level TrueType driver interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/tterrors.h b/thirdparty/freetype/src/truetype/tterrors.h index 0ce247e376..2c95ea17b2 100644 --- a/thirdparty/freetype/src/truetype/tterrors.h +++ b/thirdparty/freetype/src/truetype/tterrors.h @@ -4,7 +4,7 @@ * * TrueType error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttgload.c b/thirdparty/freetype/src/truetype/ttgload.c index 11968f6fdc..2ca63d65a3 100644 --- a/thirdparty/freetype/src/truetype/ttgload.c +++ b/thirdparty/freetype/src/truetype/ttgload.c @@ -4,7 +4,7 @@ * * TrueType Glyph Loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1104,8 +1104,8 @@ for ( ; vec < limit; vec++, u++ ) { - vec->x = ( FT_MulFix( u->x, x_scale ) + 32 ) >> 6; - vec->y = ( FT_MulFix( u->y, y_scale ) + 32 ) >> 6; + vec->x = ADD_LONG( FT_MulFix( u->x, x_scale ), 32 ) >> 6; + vec->y = ADD_LONG( FT_MulFix( u->y, y_scale ), 32 ) >> 6; } } else @@ -1228,8 +1228,8 @@ p1 = gloader->base.outline.points + k; p2 = gloader->base.outline.points + l; - x = p1->x - p2->x; - y = p1->y - p2->y; + x = SUB_LONG( p1->x, p2->x ); + y = SUB_LONG( p1->y, p2->y ); } else { @@ -2230,10 +2230,6 @@ FT_UInt glyph_index ) { TT_Face face = loader->face; -#if defined TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY || \ - defined TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); -#endif FT_BBox bbox; FT_Fixed y_scale; @@ -2256,53 +2252,10 @@ glyph->metrics.horiBearingX = bbox.xMin; glyph->metrics.horiBearingY = bbox.yMax; - glyph->metrics.horiAdvance = SUB_LONG(loader->pp2.x, loader->pp1.x); - - /* Adjust advance width to the value contained in the hdmx table */ - /* unless FT_LOAD_COMPUTE_METRICS is set or backward compatibility */ - /* mode of the v40 interpreter is active. See `ttinterp.h' for */ - /* details on backward compatibility mode. */ - if ( -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && - ( loader->exec && loader->exec->backward_compatibility ) ) && -#endif - !face->postscript.isFixedPitch && - IS_HINTED( loader->load_flags ) && - !( loader->load_flags & FT_LOAD_COMPUTE_METRICS ) ) - { - FT_Byte* widthp; - - - widthp = tt_face_get_device_metrics( face, - size->metrics->x_ppem, - glyph_index ); - -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY - - if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 ) - { - FT_Bool ignore_x_mode; - - - ignore_x_mode = FT_BOOL( FT_LOAD_TARGET_MODE( loader->load_flags ) != - FT_RENDER_MODE_MONO ); - - if ( widthp && - ( ( ignore_x_mode && loader->exec->compatible_widths ) || - !ignore_x_mode || - SPH_OPTION_BITMAP_WIDTHS ) ) - glyph->metrics.horiAdvance = *widthp * 64; - } - else - -#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ - - { - if ( widthp ) - glyph->metrics.horiAdvance = *widthp * 64; - } - } + if ( loader->widthp ) + glyph->metrics.horiAdvance = loader->widthp[glyph_index] * 64; + else + glyph->metrics.horiAdvance = SUB_LONG( loader->pp2.x, loader->pp1.x ); /* set glyph dimensions */ glyph->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin ); @@ -2735,12 +2688,58 @@ /* note that this flag can also be modified in a glyph's bytecode */ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 && exec->GS.instruct_control & 4 ) - exec->ignore_x_mode = 0; -#endif + exec->ignore_x_mode = FALSE; +#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ + +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + /* + * Toggle backward compatibility according to what font wants, except + * when + * + * 1) we have a `tricky' font that heavily relies on the interpreter to + * render glyphs correctly, for example DFKai-SB, or + * 2) FT_RENDER_MODE_MONO (i.e, monochome rendering) is requested. + * + * In those cases, backward compatibility needs to be turned off to get + * correct rendering. The rendering is then completely up to the + * font's programming. + * + */ + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && + subpixel_hinting_lean && + !FT_IS_TRICKY( glyph->face ) ) + exec->backward_compatibility = !( exec->GS.instruct_control & 4 ); + else + exec->backward_compatibility = FALSE; +#endif /* TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL */ exec->pedantic_hinting = FT_BOOL( load_flags & FT_LOAD_PEDANTIC ); loader->exec = exec; loader->instructions = exec->glyphIns; + + /* Use the hdmx table if any unless FT_LOAD_COMPUTE_METRICS */ + /* is set or backward compatibility mode of the v38 or v40 */ + /* interpreters is active. See `ttinterp.h' for details on */ + /* backward compatibility mode. */ + if ( IS_HINTED( loader->load_flags ) && + !( loader->load_flags & FT_LOAD_COMPUTE_METRICS ) && +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && + exec->backward_compatibility ) && +#endif +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY + !( driver->interpreter_version == TT_INTERPRETER_VERSION_38 && + !SPH_OPTION_BITMAP_WIDTHS && + FT_LOAD_TARGET_MODE( loader->load_flags ) != + FT_RENDER_MODE_MONO && + exec->compatible_widths ) && +#endif + !face->postscript.isFixedPitch ) + { + loader->widthp = size->widthp; + } + else + loader->widthp = NULL; } #endif /* TT_USE_BYTECODE_INTERPRETER */ @@ -2788,11 +2787,12 @@ * A function used to load a single glyph within a given glyph slot, * for a given size. * - * @Input: + * @InOut: * glyph :: * A handle to a target slot object where the glyph * will be loaded. * + * @Input: * size :: * A handle to the source face size at which the glyph * must be scaled/loaded. @@ -2897,8 +2897,12 @@ } else { - if ( FT_IS_SCALABLE( glyph->face ) ) + if ( FT_IS_SCALABLE( glyph->face ) || + FT_HAS_SBIX( glyph->face ) ) { + TT_Face face = (TT_Face)glyph->face; + + /* for the bbox we need the header only */ (void)tt_loader_init( &loader, size, glyph, load_flags, TRUE ); (void)load_truetype_glyph( &loader, glyph_index, 0, TRUE ); @@ -2906,6 +2910,35 @@ glyph->linearHoriAdvance = loader.linear; glyph->linearVertAdvance = loader.vadvance; + /* Bitmaps from the 'sbix' table need special treatment: */ + /* if there is a glyph contour, the bitmap origin must be */ + /* shifted to be relative to the lower left corner of the */ + /* glyph bounding box, also taking the left-side bearing */ + /* (or top bearing) into account. */ + if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX && + loader.n_contours > 0 ) + { + FT_Int bitmap_left; + FT_Int bitmap_top; + + + if ( load_flags & FT_LOAD_VERTICAL_LAYOUT ) + { + /* This is a guess, since Apple's CoreText engine doesn't */ + /* really do vertical typesetting. */ + bitmap_left = loader.bbox.xMin; + bitmap_top = loader.top_bearing; + } + else + { + bitmap_left = loader.left_bearing; + bitmap_top = loader.bbox.yMin; + } + + glyph->bitmap_left += FT_MulFix( bitmap_left, x_scale ) >> 6; + glyph->bitmap_top += FT_MulFix( bitmap_top, y_scale ) >> 6; + } + /* sanity checks: if `xxxAdvance' in the sbit metric */ /* structure isn't set, use `linearXXXAdvance' */ if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance ) @@ -2920,6 +2953,12 @@ } } + if ( load_flags & FT_LOAD_SBITS_ONLY ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */ @@ -2929,16 +2968,81 @@ goto Exit; } - if ( load_flags & FT_LOAD_SBITS_ONLY ) +#ifdef FT_CONFIG_OPTION_SVG + + /* check for OT-SVG */ + if ( ( load_flags & FT_LOAD_COLOR ) && ( (TT_Face)glyph->face )->svg ) + { + SFNT_Service sfnt; + + FT_Short leftBearing; + FT_Short topBearing; + FT_UShort advanceX; + FT_UShort advanceY; + + + FT_TRACE3(( "Trying to load SVG glyph\n" )); + sfnt = (SFNT_Service)( (TT_Face)glyph->face )->sfnt; + + error = sfnt->load_svg_doc( glyph, glyph_index ); + if ( !error ) + { + TT_Face face = (TT_Face)glyph->face; + + + FT_TRACE3(( "Successfully loaded SVG glyph\n" )); + + glyph->format = FT_GLYPH_FORMAT_SVG; + + sfnt->get_metrics( face, + FALSE, + glyph_index, + &leftBearing, + &advanceX ); + sfnt->get_metrics( face, + TRUE, + glyph_index, + &topBearing, + &advanceY ); + + advanceX = (FT_UShort)FT_MulDiv( advanceX, + glyph->face->size->metrics.x_ppem, + glyph->face->units_per_EM ); + advanceY = (FT_UShort)FT_MulDiv( advanceY, + glyph->face->size->metrics.y_ppem, + glyph->face->units_per_EM ); + + glyph->metrics.horiAdvance = advanceX << 6; + glyph->metrics.vertAdvance = advanceY << 6; + + return error; + } + + FT_TRACE3(( "Failed to load SVG glyph\n" )); + } + + /* return immediately if we only want SVG glyphs */ + if ( load_flags & FT_LOAD_SVG_ONLY ) { error = FT_THROW( Invalid_Argument ); goto Exit; } +#endif /* FT_CONFIG_OPTION_SVG */ + error = tt_loader_init( &loader, size, glyph, load_flags, FALSE ); if ( error ) goto Exit; + /* done if we are only interested in the `hdmx` advance */ + if ( load_flags & FT_LOAD_ADVANCE_ONLY && + !( load_flags & FT_LOAD_VERTICAL_LAYOUT ) && + loader.widthp ) + { + glyph->metrics.horiAdvance = loader.widthp[glyph_index] * 64; + goto Done; + } + glyph->format = FT_GLYPH_FORMAT_OUTLINE; glyph->num_subglyphs = 0; glyph->outline.flags = 0; @@ -3017,6 +3121,7 @@ glyph->outline.n_points, glyph->outline.flags )); + Done: tt_loader_done( &loader ); Exit: diff --git a/thirdparty/freetype/src/truetype/ttgload.h b/thirdparty/freetype/src/truetype/ttgload.h index 78fdeaa73d..3195351f78 100644 --- a/thirdparty/freetype/src/truetype/ttgload.h +++ b/thirdparty/freetype/src/truetype/ttgload.h @@ -4,7 +4,7 @@ * * TrueType Glyph Loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttgxvar.c b/thirdparty/freetype/src/truetype/ttgxvar.c index 7f2db0cbdc..6a0edef29b 100644 --- a/thirdparty/freetype/src/truetype/ttgxvar.c +++ b/thirdparty/freetype/src/truetype/ttgxvar.c @@ -4,7 +4,7 @@ * * TrueType GX Font Variation loader * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. * * This file is part of the FreeType project, and may only be used, @@ -151,9 +151,7 @@ FT_UInt i, j; FT_UShort first; FT_Memory memory = stream->memory; - FT_Error error = FT_Err_Ok; - - FT_UNUSED( error ); + FT_Error error; *point_cnt = 0; @@ -266,9 +264,7 @@ FT_UInt i, j; FT_UInt bytes_used; FT_Memory memory = stream->memory; - FT_Error error = FT_Err_Ok; - - FT_UNUSED( error ); + FT_Error error; if ( FT_QNEW_ARRAY( deltas, delta_cnt ) ) @@ -361,14 +357,12 @@ FT_Memory memory = stream->memory; GX_Blend blend = face->blend; GX_AVarSegment segment; - FT_Error error = FT_Err_Ok; + FT_Error error; FT_Long version; FT_Long axisCount; FT_Int i, j; FT_ULong table_len; - FT_UNUSED( error ); - FT_TRACE2(( "AVAR " )); @@ -421,7 +415,6 @@ FT_FREE( blend->avar_segment[j].correspondence ); FT_FREE( blend->avar_segment ); - blend->avar_segment = NULL; goto Exit; } @@ -2753,7 +2746,6 @@ /* The cvt table has been loaded already; every time we change the */ /* blend we may need to reload and remodify the cvt table. */ FT_FREE( face->cvt ); - face->cvt = NULL; error = tt_face_load_cvt( face, face->root.stream ); break; @@ -2772,7 +2764,6 @@ /* enforce recomputation of the PostScript name; */ FT_FREE( face->postscript_name ); - face->postscript_name = NULL; Exit: return error; @@ -3476,6 +3467,7 @@ } else { + localpoints = NULL; points = sharedpoints; point_count = spoint_count; } diff --git a/thirdparty/freetype/src/truetype/ttgxvar.h b/thirdparty/freetype/src/truetype/ttgxvar.h index ded9ea1d6d..17915f00d3 100644 --- a/thirdparty/freetype/src/truetype/ttgxvar.h +++ b/thirdparty/freetype/src/truetype/ttgxvar.h @@ -4,7 +4,7 @@ * * TrueType GX Font Variation loader (specification) * - * Copyright (C) 2004-2021 by + * Copyright (C) 2004-2022 by * David Turner, Robert Wilhelm, Werner Lemberg and George Williams. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttinterp.c b/thirdparty/freetype/src/truetype/ttinterp.c index 731095ed0c..e16565c3a5 100644 --- a/thirdparty/freetype/src/truetype/ttinterp.c +++ b/thirdparty/freetype/src/truetype/ttinterp.c @@ -4,7 +4,7 @@ * * TrueType bytecode interpreter (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -5260,16 +5260,21 @@ } } - exc->GS.instruct_control &= ~(FT_Byte)Kf; - exc->GS.instruct_control |= (FT_Byte)L; + /* INSTCTRL should only be used in the CVT program */ + if ( exc->iniRange == tt_coderange_cvt ) + { + exc->GS.instruct_control &= ~(FT_Byte)Kf; + exc->GS.instruct_control |= (FT_Byte)L; + } - if ( K == 3 ) + /* except to change the subpixel flags temporarily */ + else if ( exc->iniRange == tt_coderange_glyph && K == 3 ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY /* INSTCTRL modifying flag 3 also has an effect */ /* outside of the CVT program */ if ( SUBPIXEL_HINTING_INFINALITY ) - exc->ignore_x_mode = FT_BOOL( L == 4 ); + exc->ignore_x_mode = !FT_BOOL( L == 4 ); #endif #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL @@ -5280,6 +5285,8 @@ exc->backward_compatibility = !FT_BOOL( L == 4 ); #endif } + else if ( exc->pedantic_hinting ) + exc->error = FT_THROW( Invalid_Reference ); } @@ -7755,35 +7762,6 @@ #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY - exc->iup_called = FALSE; -#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ - -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* - * Toggle backward compatibility according to what font wants, except - * when - * - * 1) we have a `tricky' font that heavily relies on the interpreter to - * render glyphs correctly, for example DFKai-SB, or - * 2) FT_RENDER_MODE_MONO (i.e, monochome rendering) is requested. - * - * In those cases, backward compatibility needs to be turned off to get - * correct rendering. The rendering is then completely up to the - * font's programming. - * - */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->subpixel_hinting_lean && - !FT_IS_TRICKY( &exc->face->root ) ) - exc->backward_compatibility = !( exc->GS.instruct_control & 4 ); - else - exc->backward_compatibility = FALSE; - - exc->iupx_called = FALSE; - exc->iupy_called = FALSE; -#endif - /* We restrict the number of twilight points to a reasonable, */ /* heuristic value to avoid slow execution of malformed bytecode. */ num_twilight_points = FT_MAX( 30, @@ -7861,6 +7839,15 @@ Compute_Funcs( exc ); Compute_Round( exc, (FT_Byte)exc->GS.round_state ); + /* These flags cancel execution of some opcodes after IUP is called */ +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY + exc->iup_called = FALSE; +#endif +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + exc->iupx_called = FALSE; + exc->iupy_called = FALSE; +#endif + do { exc->opcode = exc->code[exc->IP]; diff --git a/thirdparty/freetype/src/truetype/ttinterp.h b/thirdparty/freetype/src/truetype/ttinterp.h index 9c01ec83cb..48f618dc9d 100644 --- a/thirdparty/freetype/src/truetype/ttinterp.h +++ b/thirdparty/freetype/src/truetype/ttinterp.h @@ -4,7 +4,7 @@ * * TrueType bytecode interpreter (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttobjs.c b/thirdparty/freetype/src/truetype/ttobjs.c index 93fc548447..f4f3c69336 100644 --- a/thirdparty/freetype/src/truetype/ttobjs.c +++ b/thirdparty/freetype/src/truetype/ttobjs.c @@ -4,7 +4,7 @@ * * Objects manager (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -727,7 +727,8 @@ if ( error ) goto Exit; - if ( FT_IS_SCALABLE( ttface ) ) + if ( FT_IS_SCALABLE( ttface ) || + FT_HAS_SBIX( ttface ) ) { #ifdef FT_CONFIG_OPTION_INCREMENTAL if ( !ttface->internal->incremental_interface ) @@ -1435,6 +1436,8 @@ size->ttmetrics.y_ratio = 0x10000L; } + size->widthp = tt_face_get_device_metrics( face, size_metrics->x_ppem, 0 ); + size->metrics = size_metrics; #ifdef TT_USE_BYTECODE_INTERPRETER diff --git a/thirdparty/freetype/src/truetype/ttobjs.h b/thirdparty/freetype/src/truetype/ttobjs.h index fd72378721..5fa239d43a 100644 --- a/thirdparty/freetype/src/truetype/ttobjs.h +++ b/thirdparty/freetype/src/truetype/ttobjs.h @@ -4,7 +4,7 @@ * * Objects manager (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -282,6 +282,8 @@ FT_BEGIN_HEADER TT_Size_Metrics ttmetrics; + FT_Byte* widthp; /* glyph widths from the hdmx table */ + FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */ #ifdef TT_USE_BYTECODE_INTERPRETER diff --git a/thirdparty/freetype/src/truetype/ttpload.c b/thirdparty/freetype/src/truetype/ttpload.c index 71db75ae1f..6982c717ab 100644 --- a/thirdparty/freetype/src/truetype/ttpload.c +++ b/thirdparty/freetype/src/truetype/ttpload.c @@ -4,7 +4,7 @@ * * TrueType-specific tables loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -498,6 +498,14 @@ } + FT_COMPARE_DEF( int ) + compare_ppem( const void* a, + const void* b ) + { + return **(FT_Byte**)a - **(FT_Byte**)b; + } + + /************************************************************************** * * @Function: @@ -574,20 +582,21 @@ goto Fail; } - if ( FT_QNEW_ARRAY( face->hdmx_record_sizes, num_records ) ) + if ( FT_QNEW_ARRAY( face->hdmx_records, num_records ) ) goto Fail; - /* XXX: We do not check if the records are sorted by ppem */ - /* and cannot use binary search later. */ for ( nn = 0; nn < num_records; nn++ ) { if ( p + record_size > limit ) break; - - face->hdmx_record_sizes[nn] = p[0]; - p += record_size; + face->hdmx_records[nn] = p; + p += record_size; } + /* The records must be already sorted by ppem but it does not */ + /* hurt to make sure so that the binary search works later. */ + ft_qsort( face->hdmx_records, nn, sizeof ( FT_Byte* ), compare_ppem ); + face->hdmx_record_count = nn; face->hdmx_table_size = table_size; face->hdmx_record_size = record_size; @@ -611,7 +620,7 @@ FT_Memory memory = stream->memory; - FT_FREE( face->hdmx_record_sizes ); + FT_FREE( face->hdmx_records ); FT_FRAME_RELEASE( face->hdmx_table ); } @@ -619,27 +628,34 @@ /************************************************************************** * * Return the advance width table for a given pixel size if it is found - * in the font's `hdmx' table (if any). + * in the font's `hdmx' table (if any). The records must be sorted for + * the binary search to work properly. */ FT_LOCAL_DEF( FT_Byte* ) tt_face_get_device_metrics( TT_Face face, FT_UInt ppem, FT_UInt gindex ) { - FT_UInt nn; - FT_Byte* result = NULL; - FT_ULong record_size = face->hdmx_record_size; - FT_Byte* record = FT_OFFSET( face->hdmx_table, 8 ); + FT_UInt min = 0; + FT_UInt max = face->hdmx_record_count; + FT_UInt mid; + FT_Byte* result = NULL; + + while ( min < max ) + { + mid = ( min + max ) >> 1; - for ( nn = 0; nn < face->hdmx_record_count; nn++ ) - if ( face->hdmx_record_sizes[nn] == ppem ) + if ( face->hdmx_records[mid][0] > ppem ) + max = mid; + else if ( face->hdmx_records[mid][0] < ppem ) + min = mid + 1; + else { - gindex += 2; - if ( gindex < record_size ) - result = record + nn * record_size + gindex; + result = face->hdmx_records[mid] + 2 + gindex; break; } + } return result; } diff --git a/thirdparty/freetype/src/truetype/ttpload.h b/thirdparty/freetype/src/truetype/ttpload.h index 84c42cdaf4..fa5d96ed35 100644 --- a/thirdparty/freetype/src/truetype/ttpload.h +++ b/thirdparty/freetype/src/truetype/ttpload.h @@ -4,7 +4,7 @@ * * TrueType-specific tables loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttsubpix.c b/thirdparty/freetype/src/truetype/ttsubpix.c index c484665b95..2438d3a2a2 100644 --- a/thirdparty/freetype/src/truetype/ttsubpix.c +++ b/thirdparty/freetype/src/truetype/ttsubpix.c @@ -4,7 +4,7 @@ * * TrueType Subpixel Hinting. * - * Copyright (C) 2010-2021 by + * Copyright (C) 2010-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttsubpix.h b/thirdparty/freetype/src/truetype/ttsubpix.h index 762b7c98a3..181f83810c 100644 --- a/thirdparty/freetype/src/truetype/ttsubpix.h +++ b/thirdparty/freetype/src/truetype/ttsubpix.h @@ -4,7 +4,7 @@ * * TrueType Subpixel Hinting. * - * Copyright (C) 2010-2021 by + * Copyright (C) 2010-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1afm.c b/thirdparty/freetype/src/type1/t1afm.c index 4c18ed1955..6009e9ee2e 100644 --- a/thirdparty/freetype/src/type1/t1afm.c +++ b/thirdparty/freetype/src/type1/t1afm.c @@ -4,7 +4,7 @@ * * AFM support for Type 1 fonts (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -203,7 +203,7 @@ kp->index1 = FT_Get_Char_Index( t1_face, p[0] ); kp->index2 = FT_Get_Char_Index( t1_face, p[1] ); - kp->x = (FT_Int)FT_PEEK_SHORT_LE(p + 2); + kp->x = (FT_Int)FT_PEEK_SHORT_LE( p + 2 ); kp->y = 0; kp++; diff --git a/thirdparty/freetype/src/type1/t1afm.h b/thirdparty/freetype/src/type1/t1afm.h index 86fe45ea3e..040ed68298 100644 --- a/thirdparty/freetype/src/type1/t1afm.h +++ b/thirdparty/freetype/src/type1/t1afm.h @@ -4,7 +4,7 @@ * * AFM support for Type 1 fonts (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1driver.c b/thirdparty/freetype/src/type1/t1driver.c index f4d7a089ae..dd31545cf6 100644 --- a/thirdparty/freetype/src/type1/t1driver.c +++ b/thirdparty/freetype/src/type1/t1driver.c @@ -4,7 +4,7 @@ * * Type 1 driver interface (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1driver.h b/thirdparty/freetype/src/type1/t1driver.h index 20a827f898..9fe1940334 100644 --- a/thirdparty/freetype/src/type1/t1driver.h +++ b/thirdparty/freetype/src/type1/t1driver.h @@ -4,7 +4,7 @@ * * High-level Type 1 driver interface (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1errors.h b/thirdparty/freetype/src/type1/t1errors.h index 18ef75452b..1b87c42f18 100644 --- a/thirdparty/freetype/src/type1/t1errors.h +++ b/thirdparty/freetype/src/type1/t1errors.h @@ -4,7 +4,7 @@ * * Type 1 error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1gload.c b/thirdparty/freetype/src/type1/t1gload.c index 86649edf3a..540231561c 100644 --- a/thirdparty/freetype/src/type1/t1gload.c +++ b/thirdparty/freetype/src/type1/t1gload.c @@ -4,7 +4,7 @@ * * Type 1 Glyph Loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1gload.h b/thirdparty/freetype/src/type1/t1gload.h index a924d551a9..fdb985264f 100644 --- a/thirdparty/freetype/src/type1/t1gload.h +++ b/thirdparty/freetype/src/type1/t1gload.h @@ -4,7 +4,7 @@ * * Type 1 Glyph Loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1load.c b/thirdparty/freetype/src/type1/t1load.c index bb62c79902..66bebd560f 100644 --- a/thirdparty/freetype/src/type1/t1load.c +++ b/thirdparty/freetype/src/type1/t1load.c @@ -4,7 +4,7 @@ * * Type 1 font loader (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1530,8 +1530,8 @@ /* we use a T1_Table to store our charnames */ loader->num_chars = encode->num_chars = array_size; - if ( FT_NEW_ARRAY( encode->char_index, array_size ) || - FT_NEW_ARRAY( encode->char_name, array_size ) || + if ( FT_QNEW_ARRAY( encode->char_index, array_size ) || + FT_QNEW_ARRAY( encode->char_name, array_size ) || FT_SET_ERROR( psaux->ps_table_funcs->init( char_table, array_size, memory ) ) ) { @@ -1772,7 +1772,7 @@ if ( !loader->subrs_hash ) { - if ( FT_NEW( loader->subrs_hash ) ) + if ( FT_QNEW( loader->subrs_hash ) ) goto Fail; error = ft_hash_num_init( loader->subrs_hash, memory ); @@ -2057,9 +2057,9 @@ name_table->elements[n][len] = '\0'; /* record index of /.notdef */ - if ( *cur == '.' && + if ( *cur == '.' && ft_strcmp( ".notdef", - (const char*)(name_table->elements[n]) ) == 0 ) + (const char*)( name_table->elements[n] ) ) == 0 ) { notdef_index = n; notdef_found = 1; @@ -2331,8 +2331,8 @@ /* in valid Type 1 fonts we don't see `RD' or `-|' directly */ /* since those tokens are handled by parse_subrs and */ /* parse_charstrings */ - else if ( *cur == 'R' && cur + 6 < limit && *(cur + 1) == 'D' && - have_integer ) + else if ( *cur == 'R' && cur + 6 < limit && *( cur + 1 ) == 'D' && + have_integer ) { FT_ULong s; FT_Byte* b; @@ -2344,8 +2344,8 @@ have_integer = 0; } - else if ( *cur == '-' && cur + 6 < limit && *(cur + 1) == '|' && - have_integer ) + else if ( *cur == '-' && cur + 6 < limit && *( cur + 1 ) == '|' && + have_integer ) { FT_ULong s; FT_Byte* b; diff --git a/thirdparty/freetype/src/type1/t1load.h b/thirdparty/freetype/src/type1/t1load.h index ba19adb147..a6d46eb1e4 100644 --- a/thirdparty/freetype/src/type1/t1load.h +++ b/thirdparty/freetype/src/type1/t1load.h @@ -4,7 +4,7 @@ * * Type 1 font loader (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1objs.c b/thirdparty/freetype/src/type1/t1objs.c index 50dad038fd..847ae0e64b 100644 --- a/thirdparty/freetype/src/type1/t1objs.c +++ b/thirdparty/freetype/src/type1/t1objs.c @@ -4,7 +4,7 @@ * * Type 1 objects manager (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1objs.h b/thirdparty/freetype/src/type1/t1objs.h index 5f103b5066..e632fb58bd 100644 --- a/thirdparty/freetype/src/type1/t1objs.h +++ b/thirdparty/freetype/src/type1/t1objs.h @@ -4,7 +4,7 @@ * * Type 1 objects manager (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1parse.c b/thirdparty/freetype/src/type1/t1parse.c index 9f226296a9..95dc97d79a 100644 --- a/thirdparty/freetype/src/type1/t1parse.c +++ b/thirdparty/freetype/src/type1/t1parse.c @@ -4,7 +4,7 @@ * * Type 1 parser (body). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1parse.h b/thirdparty/freetype/src/type1/t1parse.h index 247ff73b2c..d9c7e3b56a 100644 --- a/thirdparty/freetype/src/type1/t1parse.h +++ b/thirdparty/freetype/src/type1/t1parse.h @@ -4,7 +4,7 @@ * * Type 1 parser (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1tokens.h b/thirdparty/freetype/src/type1/t1tokens.h index 13ac8ac1c7..79080d9e4d 100644 --- a/thirdparty/freetype/src/type1/t1tokens.h +++ b/thirdparty/freetype/src/type1/t1tokens.h @@ -4,7 +4,7 @@ * * Type 1 tokenizer (specification). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/type1.c b/thirdparty/freetype/src/type1/type1.c index 003b78cb86..6f11249288 100644 --- a/thirdparty/freetype/src/type1/type1.c +++ b/thirdparty/freetype/src/type1/type1.c @@ -4,7 +4,7 @@ * * FreeType Type 1 driver component (body only). * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42drivr.c b/thirdparty/freetype/src/type42/t42drivr.c index e74ba1deba..45d8c3821b 100644 --- a/thirdparty/freetype/src/type42/t42drivr.c +++ b/thirdparty/freetype/src/type42/t42drivr.c @@ -4,7 +4,7 @@ * * High-level Type 42 driver interface (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, @@ -150,22 +150,13 @@ } - static FT_Error - t42_ps_get_font_private( FT_Face face, - PS_PrivateRec* afont_private ) - { - *afont_private = ((T42_Face)face)->type1.private_dict; - - return FT_Err_Ok; - } - - static const FT_Service_PsInfoRec t42_service_ps_info = { (PS_GetFontInfoFunc) t42_ps_get_font_info, /* ps_get_font_info */ (PS_GetFontExtraFunc) t42_ps_get_font_extra, /* ps_get_font_extra */ (PS_HasGlyphNamesFunc) t42_ps_has_glyph_names, /* ps_has_glyph_names */ - (PS_GetFontPrivateFunc)t42_ps_get_font_private, /* ps_get_font_private */ + /* Type42 fonts don't have a Private dict */ + (PS_GetFontPrivateFunc)NULL, /* ps_get_font_private */ /* not implemented */ (PS_GetFontValueFunc) NULL /* ps_get_font_value */ }; diff --git a/thirdparty/freetype/src/type42/t42drivr.h b/thirdparty/freetype/src/type42/t42drivr.h index c6d8a4409e..95e1207b68 100644 --- a/thirdparty/freetype/src/type42/t42drivr.h +++ b/thirdparty/freetype/src/type42/t42drivr.h @@ -4,7 +4,7 @@ * * High-level Type 42 driver interface (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42error.h b/thirdparty/freetype/src/type42/t42error.h index 470f5189a8..b278221006 100644 --- a/thirdparty/freetype/src/type42/t42error.h +++ b/thirdparty/freetype/src/type42/t42error.h @@ -4,7 +4,7 @@ * * Type 42 error codes (specification only). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42objs.c b/thirdparty/freetype/src/type42/t42objs.c index 03955e945b..da1e0732a0 100644 --- a/thirdparty/freetype/src/type42/t42objs.c +++ b/thirdparty/freetype/src/type42/t42objs.c @@ -4,7 +4,7 @@ * * Type 42 objects manager (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, @@ -44,14 +44,8 @@ parser = &loader.parser; - if ( FT_QALLOC( face->ttf_data, 12 ) ) - goto Exit; - - /* while parsing the font we always update `face->ttf_size' so that */ - /* even in case of buggy data (which might lead to premature end of */ - /* scanning without causing an error) the call to `FT_Open_Face' in */ - /* `T42_Face_Init' passes the correct size */ - face->ttf_size = 12; + face->ttf_data = NULL; + face->ttf_size = 0; error = t42_parser_init( parser, face->root.stream, @@ -152,6 +146,11 @@ Exit: t42_loader_done( &loader ); + if ( error ) + { + FT_FREE( face->ttf_data ); + face->ttf_size = 0; + } return error; } diff --git a/thirdparty/freetype/src/type42/t42objs.h b/thirdparty/freetype/src/type42/t42objs.h index cbd344ffbd..e677996a30 100644 --- a/thirdparty/freetype/src/type42/t42objs.h +++ b/thirdparty/freetype/src/type42/t42objs.h @@ -4,7 +4,7 @@ * * Type 42 objects manager (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42parse.c b/thirdparty/freetype/src/type42/t42parse.c index ea2c5198a9..59cc519ea6 100644 --- a/thirdparty/freetype/src/type42/t42parse.c +++ b/thirdparty/freetype/src/type42/t42parse.c @@ -4,7 +4,7 @@ * * Type 42 font parser (body). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, @@ -92,7 +92,7 @@ #undef T1CODE #define T1CODE T1_FIELD_LOCATION_BBOX - T1_FIELD_BBOX("FontBBox", xMin, 0 ) + T1_FIELD_BBOX( "FontBBox", xMin, 0 ) T1_FIELD_CALLBACK( "FontMatrix", t42_parse_font_matrix, 0 ) T1_FIELD_CALLBACK( "Encoding", t42_parse_encoding, 0 ) @@ -363,8 +363,8 @@ /* we use a T1_Table to store our charnames */ loader->num_chars = encode->num_chars = count; - if ( FT_NEW_ARRAY( encode->char_index, count ) || - FT_NEW_ARRAY( encode->char_name, count ) || + if ( FT_QNEW_ARRAY( encode->char_index, count ) || + FT_QNEW_ARRAY( encode->char_name, count ) || FT_SET_ERROR( psaux->ps_table_funcs->init( char_table, count, memory ) ) ) { @@ -538,7 +538,8 @@ FT_Byte* limit = parser->root.limit; FT_Error error; FT_Int num_tables = 0; - FT_Long count; + FT_Long ttf_count; + FT_Long ttf_reserved; FT_ULong n, string_size, old_string_size, real_size; FT_Byte* string_buf = NULL; @@ -546,6 +547,9 @@ T42_Load_Status status; + /** There should only be one sfnts array, but free any previous. */ + FT_FREE( face->ttf_data ); + face->ttf_size = 0; /* The format is */ /* */ @@ -574,7 +578,10 @@ status = BEFORE_START; string_size = 0; old_string_size = 0; - count = 0; + ttf_count = 0; + ttf_reserved = 12; + if ( FT_QALLOC( face->ttf_data, ttf_reserved ) ) + goto Fail; FT_TRACE2(( "\n" )); FT_TRACE2(( "t42_parse_sfnts:\n" )); @@ -589,6 +596,7 @@ if ( *cur == ']' ) { parser->root.cursor++; + face->ttf_size = ttf_count; goto Exit; } @@ -684,7 +692,7 @@ } FT_TRACE2(( " PS string size %5lu bytes, offset 0x%08lx (%lu)\n", - string_size, count, count )); + string_size, ttf_count, ttf_count )); /* The whole TTF is now loaded into `string_buf'. We are */ /* checking its contents while copying it to `ttf_data'. */ @@ -697,43 +705,48 @@ { case BEFORE_START: /* load offset table, 12 bytes */ - if ( count < 12 ) + if ( ttf_count < 12 ) { - face->ttf_data[count++] = string_buf[n]; + face->ttf_data[ttf_count++] = string_buf[n]; continue; } else { - num_tables = 16 * face->ttf_data[4] + face->ttf_data[5]; - status = BEFORE_TABLE_DIR; - face->ttf_size = 12 + 16 * num_tables; + FT_Long ttf_reserved_prev = ttf_reserved; + + + num_tables = 16 * face->ttf_data[4] + face->ttf_data[5]; + status = BEFORE_TABLE_DIR; + ttf_reserved = 12 + 16 * num_tables; FT_TRACE2(( " SFNT directory contains %d tables\n", num_tables )); - if ( (FT_Long)size < face->ttf_size ) + if ( (FT_Long)size < ttf_reserved ) { FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" )); error = FT_THROW( Invalid_File_Format ); goto Fail; } - if ( FT_QREALLOC( face->ttf_data, 12, face->ttf_size ) ) + if ( FT_QREALLOC( face->ttf_data, ttf_reserved_prev, + ttf_reserved ) ) goto Fail; } /* fall through */ case BEFORE_TABLE_DIR: /* the offset table is read; read the table directory */ - if ( count < face->ttf_size ) + if ( ttf_count < ttf_reserved ) { - face->ttf_data[count++] = string_buf[n]; + face->ttf_data[ttf_count++] = string_buf[n]; continue; } else { int i; FT_ULong len; + FT_Long ttf_reserved_prev = ttf_reserved; FT_TRACE2(( "\n" )); @@ -749,7 +762,7 @@ FT_TRACE2(( " %4i 0x%08lx (%lu)\n", i, len, len )); if ( len > size || - face->ttf_size > (FT_Long)( size - len ) ) + ttf_reserved > (FT_Long)( size - len ) ) { FT_ERROR(( "t42_parse_sfnts:" " invalid data in sfnts array\n" )); @@ -758,30 +771,31 @@ } /* Pad to a 4-byte boundary length */ - face->ttf_size += (FT_Long)( ( len + 3 ) & ~3U ); + ttf_reserved += (FT_Long)( ( len + 3 ) & ~3U ); } + ttf_reserved += 1; status = OTHER_TABLES; FT_TRACE2(( "\n" )); - FT_TRACE2(( " allocating %ld bytes\n", face->ttf_size + 1 )); + FT_TRACE2(( " allocating %ld bytes\n", ttf_reserved )); FT_TRACE2(( "\n" )); - if ( FT_QREALLOC( face->ttf_data, 12 + 16 * num_tables, - face->ttf_size + 1 ) ) + if ( FT_QREALLOC( face->ttf_data, ttf_reserved_prev, + ttf_reserved ) ) goto Fail; } /* fall through */ case OTHER_TABLES: /* all other tables are just copied */ - if ( count >= face->ttf_size ) + if ( ttf_count >= ttf_reserved ) { FT_ERROR(( "t42_parse_sfnts: too much binary data\n" )); error = FT_THROW( Invalid_File_Format ); goto Fail; } - face->ttf_data[count++] = string_buf[n]; + face->ttf_data[ttf_count++] = string_buf[n]; } } @@ -795,6 +809,11 @@ parser->root.error = error; Exit: + if ( parser->root.error ) + { + FT_FREE( face->ttf_data ); + face->ttf_size = 0; + } if ( allocated ) FT_FREE( string_buf ); } @@ -989,9 +1008,9 @@ name_table->elements[n][len] = '\0'; /* record index of /.notdef */ - if ( *cur == '.' && + if ( *cur == '.' && ft_strcmp( ".notdef", - (const char*)(name_table->elements[n]) ) == 0 ) + (const char*)( name_table->elements[n] ) ) == 0 ) { notdef_index = n; notdef_found = 1; diff --git a/thirdparty/freetype/src/type42/t42parse.h b/thirdparty/freetype/src/type42/t42parse.h index 0fbd2b5e0b..fa633e7f1e 100644 --- a/thirdparty/freetype/src/type42/t42parse.h +++ b/thirdparty/freetype/src/type42/t42parse.h @@ -4,7 +4,7 @@ * * Type 42 font parser (specification). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42types.h b/thirdparty/freetype/src/type42/t42types.h index ea2f03e893..985bdfda98 100644 --- a/thirdparty/freetype/src/type42/t42types.h +++ b/thirdparty/freetype/src/type42/t42types.h @@ -4,7 +4,7 @@ * * Type 42 font data types (specification only). * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/type42.c b/thirdparty/freetype/src/type42/type42.c index d8d3936bdf..ccf5d472b8 100644 --- a/thirdparty/freetype/src/type42/type42.c +++ b/thirdparty/freetype/src/type42/type42.c @@ -4,7 +4,7 @@ * * FreeType Type 42 driver component. * - * Copyright (C) 2002-2021 by + * Copyright (C) 2002-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/winfonts/fnterrs.h b/thirdparty/freetype/src/winfonts/fnterrs.h index d582a9b99c..10564e107f 100644 --- a/thirdparty/freetype/src/winfonts/fnterrs.h +++ b/thirdparty/freetype/src/winfonts/fnterrs.h @@ -4,7 +4,7 @@ * * Win FNT/FON error codes (specification only). * - * Copyright (C) 2001-2021 by + * Copyright (C) 2001-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/winfonts/winfnt.c b/thirdparty/freetype/src/winfonts/winfnt.c index b4fabad283..8afd6be6e9 100644 --- a/thirdparty/freetype/src/winfonts/winfnt.c +++ b/thirdparty/freetype/src/winfonts/winfnt.c @@ -4,7 +4,7 @@ * * FreeType font driver for Windows FNT/FON files * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * Copyright 2003 Huw D M Davies for Codeweavers * Copyright 2007 Dmitry Timoshkov for Codeweavers @@ -352,6 +352,10 @@ count = FT_GET_USHORT_LE(); + FT_TRACE2(( type_id == 0x8007U ? "RT_FONTDIR count %hu\n" : + type_id == 0x8008U ? "RT_FONT count %hu\n" : "", + count )); + if ( type_id == 0x8008U ) { font_count = count; @@ -485,7 +489,7 @@ &dir_entry1 ) ) goto Exit; - if ( !(dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ ) + if ( !( dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ ) { error = FT_THROW( Invalid_File_Format ); goto Exit; @@ -509,7 +513,7 @@ &dir_entry2 ) ) goto Exit; - if ( !(dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ ) + if ( !( dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ ) { error = FT_THROW( Invalid_File_Format ); goto Exit; diff --git a/thirdparty/freetype/src/winfonts/winfnt.h b/thirdparty/freetype/src/winfonts/winfnt.h index a7134abd9c..7e6f5915e7 100644 --- a/thirdparty/freetype/src/winfonts/winfnt.h +++ b/thirdparty/freetype/src/winfonts/winfnt.h @@ -4,7 +4,7 @@ * * FreeType font driver for Windows FNT/FON files * - * Copyright (C) 1996-2021 by + * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * Copyright 2007 Dmitry Timoshkov for Codeweavers * diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh index 2f99510925..b77c1f4d44 100644 --- a/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh +++ b/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh @@ -1038,12 +1038,12 @@ struct Chain goto skip; if (reverse) - _hb_ot_layout_reverse_graphemes (c->buffer); + c->buffer->reverse (); subtable->apply (c); if (reverse) - _hb_ot_layout_reverse_graphemes (c->buffer); + c->buffer->reverse (); (void) c->buffer->message (c->font, "end chainsubtable %d", c->lookup_index); diff --git a/thirdparty/harfbuzz/src/hb-blob.cc b/thirdparty/harfbuzz/src/hb-blob.cc index f120002d17..65e44c7f6a 100644 --- a/thirdparty/harfbuzz/src/hb-blob.cc +++ b/thirdparty/harfbuzz/src/hb-blob.cc @@ -631,7 +631,7 @@ hb_blob_create_from_file_or_fail (const char *file_name) Allison Lortie permission but changed a lot to suit our need. */ #if defined(HAVE_MMAP) && !defined(HB_NO_MMAP) hb_mapped_file_t *file = (hb_mapped_file_t *) hb_calloc (1, sizeof (hb_mapped_file_t)); - if (unlikely (!file)) return hb_blob_get_empty (); + if (unlikely (!file)) return nullptr; int fd = open (file_name, O_RDONLY | O_BINARY, 0); if (unlikely (fd == -1)) goto fail_without_close; @@ -671,7 +671,7 @@ fail_without_close: #elif defined(_WIN32) && !defined(HB_NO_MMAP) hb_mapped_file_t *file = (hb_mapped_file_t *) hb_calloc (1, sizeof (hb_mapped_file_t)); - if (unlikely (!file)) return hb_blob_get_empty (); + if (unlikely (!file)) return nullptr; HANDLE fd; unsigned int size = strlen (file_name) + 1; diff --git a/thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh b/thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh index 3faa1e53d5..56e8c5b006 100644 --- a/thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh +++ b/thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh @@ -1415,11 +1415,6 @@ static inline void apply_lookup (hb_ot_apply_context_t *c, if (idx >= count) continue; - /* Don't recurse to ourself at same position. - * Note that this test is too naive, it doesn't catch longer loops. */ - if (unlikely (idx == 0 && lookupRecord[i].lookupListIndex == c->lookup_index)) - continue; - unsigned int orig_len = buffer->backtrack_len () + buffer->lookahead_len (); /* This can happen if earlier recursed lookups deleted many entries. */ @@ -1457,11 +1452,10 @@ static inline void apply_lookup (hb_ot_apply_context_t *c, * NOT the one after it. * * - If buffer length was decreased by n, it does not necessarily - * mean that n match positions where removed, as there might - * have been marks and default-ignorables in the sequence. We - * should instead drop match positions between current-position - * and current-position + n instead. Though, am not sure which - * one is better. Both cases have valid uses. Sigh. + * mean that n match positions where removed, as there recursed-to + * lookup might had a different LookupFlag. Here's a constructed + * case of that: + * https://github.com/harfbuzz/harfbuzz/discussions/3538 * * It should be possible to construct tests for both of these cases. */ diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc index d7ec1632ea..a7d5bf574b 100644 --- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc +++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc @@ -110,7 +110,14 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) map->enable_feature (HB_TAG('l','o','c','l'), F_PER_SYLLABLE); map->enable_feature (HB_TAG('c','c','m','p'), F_PER_SYLLABLE); - for (unsigned i = 0; i < KHMER_NUM_FEATURES; i++) + unsigned int i = 0; + for (; i < KHMER_BASIC_FEATURES; i++) + map->add_feature (khmer_features[i]); + + /* https://github.com/harfbuzz/harfbuzz/issues/3531 */ + map->add_gsub_pause (nullptr); + + for (; i < KHMER_NUM_FEATURES; i++) map->add_feature (khmer_features[i]); } diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc index c7aa80a79a..13beaf4d4c 100644 --- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc +++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc @@ -105,8 +105,7 @@ setup_masks_myanmar (const hb_ot_shape_plan_t *plan HB_UNUSED, HB_BUFFER_ALLOCATE_VAR (buffer, myanmar_category); HB_BUFFER_ALLOCATE_VAR (buffer, myanmar_position); - /* We cannot setup masks here. We save information about characters - * and setup masks later on in a pause-callback. */ + /* No masks, we just save information about characters. */ unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; diff --git a/thirdparty/harfbuzz/src/hb-ot-shape.cc b/thirdparty/harfbuzz/src/hb-ot-shape.cc index 298cf47786..99aadab3f0 100644 --- a/thirdparty/harfbuzz/src/hb-ot-shape.cc +++ b/thirdparty/harfbuzz/src/hb-ot-shape.cc @@ -47,6 +47,9 @@ #include "hb-aat-layout.hh" +static inline bool +_hb_codepoint_is_regional_indicator (hb_codepoint_t u) +{ return hb_in_range<hb_codepoint_t> (u, 0x1F1E6u, 0x1F1FFu); } #ifndef HB_NO_AAT_SHAPE static inline bool @@ -504,9 +507,9 @@ hb_set_unicode_props (hb_buffer_t *buffer) } /* Regional_Indicators are hairy as hell... * https://github.com/harfbuzz/harfbuzz/issues/2265 */ - else if (unlikely (i && hb_in_range<hb_codepoint_t> (info[i].codepoint, 0x1F1E6u, 0x1F1FFu))) + else if (unlikely (i && _hb_codepoint_is_regional_indicator (info[i].codepoint))) { - if (hb_in_range<hb_codepoint_t> (info[i - 1].codepoint, 0x1F1E6u, 0x1F1FFu) && + if (_hb_codepoint_is_regional_indicator (info[i - 1].codepoint) && !_hb_glyph_info_is_continuation (&info[i - 1])) _hb_glyph_info_set_continuation (&info[i]); } @@ -598,24 +601,33 @@ hb_ensure_native_direction (hb_buffer_t *buffer) * direction, so that features like ligatures will work as intended. * * https://github.com/harfbuzz/harfbuzz/issues/501 + * + * Similar thing about Regional_Indicators; They are bidi=L, but Script=Common. + * If they are present in a run of natively-RTL text, they get assigned a script + * with natively RTL direction, which would result in wrong shaping if we + * assign such native RTL direction to them then. Detect that as well. + * + * https://github.com/harfbuzz/harfbuzz/issues/3314 */ if (unlikely (horiz_dir == HB_DIRECTION_RTL && direction == HB_DIRECTION_LTR)) { - bool found_number = false, found_letter = false; + bool found_number = false, found_letter = false, found_ri = false; const auto* info = buffer->info; const auto count = buffer->len; for (unsigned i = 0; i < count; i++) { auto gc = _hb_glyph_info_get_general_category (&info[i]); if (gc == HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER) - found_number = true; + found_number = true; else if (HB_UNICODE_GENERAL_CATEGORY_IS_LETTER (gc)) { - found_letter = true; - break; + found_letter = true; + break; } + else if (_hb_codepoint_is_regional_indicator (info[i].codepoint)) + found_ri = true; } - if (found_number && !found_letter) + if ((found_number || found_ri) && !found_letter) horiz_dir = HB_DIRECTION_LTR; } diff --git a/thirdparty/harfbuzz/src/hb-version.h b/thirdparty/harfbuzz/src/hb-version.h index 39fbde45c1..94c73e15bf 100644 --- a/thirdparty/harfbuzz/src/hb-version.h +++ b/thirdparty/harfbuzz/src/hb-version.h @@ -53,14 +53,14 @@ HB_BEGIN_DECLS * * The micro component of the library version available at compile-time. */ -#define HB_VERSION_MICRO 0 +#define HB_VERSION_MICRO 1 /** * HB_VERSION_STRING: * * A string literal containing the library version available at compile-time. */ -#define HB_VERSION_STRING "4.2.0" +#define HB_VERSION_STRING "4.2.1" /** * HB_VERSION_ATLEAST: diff --git a/thirdparty/icu4c/LICENSE b/thirdparty/icu4c/LICENSE index 970ae074cb..80b587723a 100644 --- a/thirdparty/icu4c/LICENSE +++ b/thirdparty/icu4c/LICENSE @@ -1,6 +1,19 @@ -COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE -Copyright © 1991-2020 Unicode, Inc. All rights reserved. +See Terms of Use <https://www.unicode.org/copyright.html> +for definitions of Unicode Inc.’s Data Files and Software. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2022 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in https://www.unicode.org/copyright.html. Permission is hereby granted, free of charge, to any person obtaining @@ -32,7 +45,7 @@ shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. ---------------------- +---------------------------------------------------------------------- Third-Party Software Licenses @@ -40,7 +53,9 @@ This section contains third-party software notices and/or additional terms for licensed third-party software components included within ICU libraries. -1. ICU License - ICU 1.8.1 to ICU 57.1 +---------------------------------------------------------------------- + +ICU License - ICU 1.8.1 to ICU 57.1 COPYRIGHT AND PERMISSION NOTICE @@ -75,7 +90,9 @@ of the copyright holder. All trademarks and registered trademarks mentioned herein are the property of their respective owners. -2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) +---------------------------------------------------------------------- + +Chinese/Japanese Word Break Dictionary Data (cjdict.txt) # The Google Chrome software developed by Google is licensed under # the BSD license. Other software included in this distribution is @@ -279,7 +296,9 @@ property of their respective owners. # # ---------------COPYING.ipadic-----END---------------------------------- -3. Lao Word Break Dictionary Data (laodict.txt) +---------------------------------------------------------------------- + +Lao Word Break Dictionary Data (laodict.txt) # Copyright (C) 2016 and later: Unicode, Inc. and others. # License & terms of use: http://www.unicode.org/copyright.html @@ -319,7 +338,9 @@ property of their respective owners. # OF THE POSSIBILITY OF SUCH DAMAGE. # -------------------------------------------------------------------------- -4. Burmese Word Break Dictionary Data (burmesedict.txt) +---------------------------------------------------------------------- + +Burmese Word Break Dictionary Data (burmesedict.txt) # Copyright (c) 2014 International Business Machines Corporation # and others. All Rights Reserved. @@ -359,7 +380,9 @@ property of their respective owners. # SUCH DAMAGE. # -------------------------------------------------------------------------- -5. Time Zone Database +---------------------------------------------------------------------- + +Time Zone Database ICU uses the public domain data and code derived from Time Zone Database for its time zone support. The ownership of the TZ database @@ -382,7 +405,9 @@ Database section 7. # making a contribution to the database or code waives all rights to # future claims in that contribution or in the TZ Database. -6. Google double-conversion +---------------------------------------------------------------------- + +Google double-conversion Copyright 2006-2011, the V8 project authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -410,3 +435,85 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- + +File: aclocal.m4 (only for ICU4C) +Section: pkg.m4 - Macros to locate and utilise pkg-config. + + +Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. + +As a special exception to the GNU General Public License, if you +distribute this file as part of a program that contains a +configuration script generated by Autoconf, you may include it under +the same distribution terms that you use for the rest of that +program. + + +(The condition for the exception is fulfilled because +ICU4C includes a configuration script generated by Autoconf, +namely the `configure` script.) + +---------------------------------------------------------------------- + +File: config.guess (only for ICU4C) + + +This file is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see <https://www.gnu.org/licenses/>. + +As a special exception to the GNU General Public License, if you +distribute this file as part of a program that contains a +configuration script generated by Autoconf, you may include it under +the same distribution terms that you use for the rest of that +program. This Exception is an additional permission under section 7 +of the GNU General Public License, version 3 ("GPLv3"). + + +(The condition for the exception is fulfilled because +ICU4C includes a configuration script generated by Autoconf, +namely the `configure` script.) + +---------------------------------------------------------------------- + +File: install-sh (only for ICU4C) + + +Copyright 1991 by the Massachusetts Institute of Technology + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of M.I.T. not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. M.I.T. makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. diff --git a/thirdparty/icu4c/common/brkeng.cpp b/thirdparty/icu4c/common/brkeng.cpp index 52e9c53621..dc9fb99bf1 100644 --- a/thirdparty/icu4c/common/brkeng.cpp +++ b/thirdparty/icu4c/common/brkeng.cpp @@ -79,6 +79,7 @@ UnhandledEngine::findBreaks( UText *text, int32_t /* startPos */, int32_t endPos, UVector32 &/*foundBreaks*/, + UBool /* isPhraseBreaking */, UErrorCode &status) const { if (U_FAILURE(status)) return 0; UChar32 c = utext_current32(text); diff --git a/thirdparty/icu4c/common/brkeng.h b/thirdparty/icu4c/common/brkeng.h index 6843f1cc95..127ba59e18 100644 --- a/thirdparty/icu4c/common/brkeng.h +++ b/thirdparty/icu4c/common/brkeng.h @@ -75,6 +75,7 @@ class LanguageBreakEngine : public UMemory { int32_t startPos, int32_t endPos, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode &status) const = 0; }; @@ -194,6 +195,7 @@ class UnhandledEngine : public LanguageBreakEngine { int32_t startPos, int32_t endPos, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode &status) const override; /** diff --git a/thirdparty/icu4c/common/brkiter.cpp b/thirdparty/icu4c/common/brkiter.cpp index 8b228acf2c..8a1915880e 100644 --- a/thirdparty/icu4c/common/brkiter.cpp +++ b/thirdparty/icu4c/common/brkiter.cpp @@ -30,6 +30,7 @@ #include "unicode/ures.h" #include "unicode/ustring.h" #include "unicode/filteredbrk.h" +#include "bytesinkutil.h" #include "ucln_cmn.h" #include "cstring.h" #include "umutex.h" @@ -115,7 +116,7 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st } // Create a RuleBasedBreakIterator - result = new RuleBasedBreakIterator(file, status); + result = new RuleBasedBreakIterator(file, uprv_strstr(type, "phrase") != NULL, status); // If there is a result, set the valid locale and actual locale, and the kind if (U_SUCCESS(status) && result != NULL) { @@ -408,7 +409,6 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status) if (U_FAILURE(status)) { return NULL; } - char lbType[kKeyValueLenMax]; BreakIterator *result = NULL; switch (kind) { @@ -428,18 +428,29 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status) break; case UBRK_LINE: { + char lb_lw[kKeyValueLenMax]; UTRACE_ENTRY(UTRACE_UBRK_CREATE_LINE); - uprv_strcpy(lbType, "line"); - char lbKeyValue[kKeyValueLenMax] = {0}; + uprv_strcpy(lb_lw, "line"); UErrorCode kvStatus = U_ZERO_ERROR; - int32_t kLen = loc.getKeywordValue("lb", lbKeyValue, kKeyValueLenMax, kvStatus); - if (U_SUCCESS(kvStatus) && kLen > 0 && (uprv_strcmp(lbKeyValue,"strict")==0 || uprv_strcmp(lbKeyValue,"normal")==0 || uprv_strcmp(lbKeyValue,"loose")==0)) { - uprv_strcat(lbType, "_"); - uprv_strcat(lbType, lbKeyValue); + CharString value; + CharStringByteSink valueSink(&value); + loc.getKeywordValue("lb", valueSink, kvStatus); + if (U_SUCCESS(kvStatus) && (value == "strict" || value == "normal" || value == "loose")) { + uprv_strcat(lb_lw, "_"); + uprv_strcat(lb_lw, value.data()); } - result = BreakIterator::buildInstance(loc, lbType, status); + // lw=phrase is only supported in Japanese. + if (uprv_strcmp(loc.getLanguage(), "ja") == 0) { + value.clear(); + loc.getKeywordValue("lw", valueSink, kvStatus); + if (U_SUCCESS(kvStatus) && value == "phrase") { + uprv_strcat(lb_lw, "_"); + uprv_strcat(lb_lw, value.data()); + } + } + result = BreakIterator::buildInstance(loc, lb_lw, status); - UTRACE_DATA1(UTRACE_INFO, "lb=%s", lbKeyValue); + UTRACE_DATA1(UTRACE_INFO, "lb_lw=%s", lb_lw); UTRACE_EXIT_STATUS(status); } break; diff --git a/thirdparty/icu4c/common/dictbe.cpp b/thirdparty/icu4c/common/dictbe.cpp index 4d158e3226..4fdbdf2760 100644 --- a/thirdparty/icu4c/common/dictbe.cpp +++ b/thirdparty/icu4c/common/dictbe.cpp @@ -17,7 +17,10 @@ #include "dictbe.h" #include "unicode/uniset.h" #include "unicode/chariter.h" +#include "unicode/resbund.h" #include "unicode/ubrk.h" +#include "unicode/usetiter.h" +#include "ubrkimpl.h" #include "utracimp.h" #include "uvectr32.h" #include "uvector.h" @@ -48,6 +51,7 @@ DictionaryBreakEngine::findBreaks( UText *text, int32_t startPos, int32_t endPos, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const { if (U_FAILURE(status)) return 0; (void)startPos; // TODO: remove this param? @@ -68,7 +72,7 @@ DictionaryBreakEngine::findBreaks( UText *text, } rangeStart = start; rangeEnd = current; - result = divideUpDictionaryRange(text, rangeStart, rangeEnd, foundBreaks, status); + result = divideUpDictionaryRange(text, rangeStart, rangeEnd, foundBreaks, isPhraseBreaking, status); utext_setNativeIndex(text, current); return result; @@ -199,13 +203,13 @@ ThaiBreakEngine::ThaiBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCode { UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE); UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Thai"); - fThaiWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Thai:]&[:LineBreak=SA:]]"), status); + UnicodeSet thaiWordSet(UnicodeString(u"[[:Thai:]&[:LineBreak=SA:]]"), status); if (U_SUCCESS(status)) { - setCharacters(fThaiWordSet); + setCharacters(thaiWordSet); } - fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Thai:]&[:LineBreak=SA:]&[:M:]]"), status); + fMarkSet.applyPattern(UnicodeString(u"[[:Thai:]&[:LineBreak=SA:]&[:M:]]"), status); fMarkSet.add(0x0020); - fEndWordSet = fThaiWordSet; + fEndWordSet = thaiWordSet; fEndWordSet.remove(0x0E31); // MAI HAN-AKAT fEndWordSet.remove(0x0E40, 0x0E44); // SARA E through SARA AI MAIMALAI fBeginWordSet.add(0x0E01, 0x0E2E); // KO KAI through HO NOKHUK @@ -230,6 +234,7 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text, int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool /* isPhraseBreaking */, UErrorCode& status) const { if (U_FAILURE(status)) return 0; utext_setNativeIndex(text, rangeStart); @@ -441,13 +446,13 @@ LaoBreakEngine::LaoBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCode &s { UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE); UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Laoo"); - fLaoWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Laoo:]&[:LineBreak=SA:]]"), status); + UnicodeSet laoWordSet(UnicodeString(u"[[:Laoo:]&[:LineBreak=SA:]]"), status); if (U_SUCCESS(status)) { - setCharacters(fLaoWordSet); + setCharacters(laoWordSet); } - fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Laoo:]&[:LineBreak=SA:]&[:M:]]"), status); + fMarkSet.applyPattern(UnicodeString(u"[[:Laoo:]&[:LineBreak=SA:]&[:M:]]"), status); fMarkSet.add(0x0020); - fEndWordSet = fLaoWordSet; + fEndWordSet = laoWordSet; fEndWordSet.remove(0x0EC0, 0x0EC4); // prefix vowels fBeginWordSet.add(0x0E81, 0x0EAE); // basic consonants (including holes for corresponding Thai characters) fBeginWordSet.add(0x0EDC, 0x0EDD); // digraph consonants (no Thai equivalent) @@ -469,6 +474,7 @@ LaoBreakEngine::divideUpDictionaryRange( UText *text, int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool /* isPhraseBreaking */, UErrorCode& status) const { if (U_FAILURE(status)) return 0; if ((rangeEnd - rangeStart) < LAO_MIN_WORD_SPAN) { @@ -637,14 +643,13 @@ BurmeseBreakEngine::BurmeseBreakEngine(DictionaryMatcher *adoptDictionary, UErro { UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE); UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Mymr"); - fBurmeseWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Mymr:]&[:LineBreak=SA:]]"), status); + fBeginWordSet.add(0x1000, 0x102A); // basic consonants and independent vowels + fEndWordSet.applyPattern(UnicodeString(u"[[:Mymr:]&[:LineBreak=SA:]]"), status); + fMarkSet.applyPattern(UnicodeString(u"[[:Mymr:]&[:LineBreak=SA:]&[:M:]]"), status); + fMarkSet.add(0x0020); if (U_SUCCESS(status)) { - setCharacters(fBurmeseWordSet); + setCharacters(fEndWordSet); } - fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Mymr:]&[:LineBreak=SA:]&[:M:]]"), status); - fMarkSet.add(0x0020); - fEndWordSet = fBurmeseWordSet; - fBeginWordSet.add(0x1000, 0x102A); // basic consonants and independent vowels // Compact for caching. fMarkSet.compact(); @@ -662,6 +667,7 @@ BurmeseBreakEngine::divideUpDictionaryRange( UText *text, int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool /* isPhraseBreaking */, UErrorCode& status ) const { if (U_FAILURE(status)) return 0; if ((rangeEnd - rangeStart) < BURMESE_MIN_WORD_SPAN) { @@ -830,13 +836,13 @@ KhmerBreakEngine::KhmerBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCod { UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE); UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Khmr"); - fKhmerWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:LineBreak=SA:]]"), status); + UnicodeSet khmerWordSet(UnicodeString(u"[[:Khmr:]&[:LineBreak=SA:]]"), status); if (U_SUCCESS(status)) { - setCharacters(fKhmerWordSet); + setCharacters(khmerWordSet); } - fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:LineBreak=SA:]&[:M:]]"), status); + fMarkSet.applyPattern(UnicodeString(u"[[:Khmr:]&[:LineBreak=SA:]&[:M:]]"), status); fMarkSet.add(0x0020); - fEndWordSet = fKhmerWordSet; + fEndWordSet = khmerWordSet; fBeginWordSet.add(0x1780, 0x17B3); //fBeginWordSet.add(0x17A3, 0x17A4); // deprecated vowels //fEndWordSet.remove(0x17A5, 0x17A9); // Khmer independent vowels that can't end a word @@ -867,6 +873,7 @@ KhmerBreakEngine::divideUpDictionaryRange( UText *text, int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool /* isPhraseBreaking */, UErrorCode& status ) const { if (U_FAILURE(status)) return 0; if ((rangeEnd - rangeStart) < KHMER_MIN_WORD_SPAN) { @@ -1050,25 +1057,27 @@ CjkBreakEngine::CjkBreakEngine(DictionaryMatcher *adoptDictionary, LanguageType : DictionaryBreakEngine(), fDictionary(adoptDictionary) { UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE); UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Hani"); - // Korean dictionary only includes Hangul syllables - fHangulWordSet.applyPattern(UNICODE_STRING_SIMPLE("[\\uac00-\\ud7a3]"), status); - fHanWordSet.applyPattern(UNICODE_STRING_SIMPLE("[:Han:]"), status); - fKatakanaWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Katakana:]\\uff9e\\uff9f]"), status); - fHiraganaWordSet.applyPattern(UNICODE_STRING_SIMPLE("[:Hiragana:]"), status); nfkcNorm2 = Normalizer2::getNFKCInstance(status); - - if (U_SUCCESS(status)) { - // handle Korean and Japanese/Chinese using different dictionaries - if (type == kKorean) { + // Korean dictionary only includes Hangul syllables + fHangulWordSet.applyPattern(UnicodeString(u"[\\uac00-\\ud7a3]"), status); + fHangulWordSet.compact(); + // Digits, open puncutation and Alphabetic characters. + fDigitOrOpenPunctuationOrAlphabetSet.applyPattern( + UnicodeString(u"[[:Nd:][:Pi:][:Ps:][:Alphabetic:]]"), status); + fDigitOrOpenPunctuationOrAlphabetSet.compact(); + fClosePunctuationSet.applyPattern(UnicodeString(u"[[:Pc:][:Pd:][:Pe:][:Pf:][:Po:]]"), status); + fClosePunctuationSet.compact(); + + // handle Korean and Japanese/Chinese using different dictionaries + if (type == kKorean) { + if (U_SUCCESS(status)) { setCharacters(fHangulWordSet); - } else { //Chinese and Japanese - UnicodeSet cjSet; - cjSet.addAll(fHanWordSet); - cjSet.addAll(fKatakanaWordSet); - cjSet.addAll(fHiraganaWordSet); - cjSet.add(0xFF70); // HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK - cjSet.add(0x30FC); // KATAKANA-HIRAGANA PROLONGED SOUND MARK + } + } else { //Chinese and Japanese + UnicodeSet cjSet(UnicodeString(u"[[:Han:][:Hiragana:][:Katakana:]\\u30fc\\uff70\\uff9e\\uff9f]"), status); + if (U_SUCCESS(status)) { setCharacters(cjSet); + initJapanesePhraseParameter(status); } } UTRACE_EXIT_STATUS(status); @@ -1096,14 +1105,12 @@ static inline bool isKatakana(UChar32 value) { (value >= 0xFF66 && value <= 0xFF9f); } - // Function for accessing internal utext flags. // Replicates an internal UText function. static inline int32_t utext_i32_flag(int32_t bitIndex) { return (int32_t)1 << bitIndex; } - /* * @param text A UText representing the text @@ -1117,6 +1124,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const { if (U_FAILURE(status)) return 0; if (rangeStart >= rangeEnd) { @@ -1347,6 +1355,31 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, if ((uint32_t)bestSnlp.elementAti(numCodePts) == kuint32max) { t_boundary.addElement(numCodePts, status); numBreaks++; + } else if (isPhraseBreaking) { + t_boundary.addElement(numCodePts, status); + if(U_SUCCESS(status)) { + numBreaks++; + int32_t prevIdx = numCodePts; + + int32_t codeUnitIdx = -1; + int32_t prevCodeUnitIdx = -1; + int32_t length = -1; + for (int32_t i = prev.elementAti(numCodePts); i > 0; i = prev.elementAti(i)) { + codeUnitIdx = inString.moveIndex32(0, i); + prevCodeUnitIdx = inString.moveIndex32(0, prevIdx); + // Calculate the length by using the code unit. + length = prevCodeUnitIdx - codeUnitIdx; + prevIdx = i; + // Keep the breakpoint if the pattern is not in the fSkipSet and continuous Katakana + // characters don't occur. + if (!fSkipSet.containsKey(inString.tempSubString(codeUnitIdx, length)) + && (!isKatakana(inString.char32At(inString.moveIndex32(codeUnitIdx, -1))) + || !isKatakana(inString.char32At(codeUnitIdx)))) { + t_boundary.addElement(i, status); + numBreaks++; + } + } + } } else { for (int32_t i = numCodePts; i > 0; i = prev.elementAti(i)) { t_boundary.addElement(i, status); @@ -1367,7 +1400,8 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, // while reversing t_boundary and pushing values to foundBreaks. int32_t prevCPPos = -1; int32_t prevUTextPos = -1; - for (int32_t i = numBreaks-1; i >= 0; i--) { + int32_t correctedNumBreaks = 0; + for (int32_t i = numBreaks - 1; i >= 0; i--) { int32_t cpPos = t_boundary.elementAti(i); U_ASSERT(cpPos > prevCPPos); int32_t utextPos = inputMap.isValid() ? inputMap->elementAti(cpPos) : cpPos + rangeStart; @@ -1375,7 +1409,15 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, if (utextPos > prevUTextPos) { // Boundaries are added to foundBreaks output in ascending order. U_ASSERT(foundBreaks.size() == 0 || foundBreaks.peeki() < utextPos); - foundBreaks.push(utextPos, status); + // In phrase breaking, there has to be a breakpoint between Cj character and close + // punctuation. + // E.g.ï¼»æºå¸¯é›»è©±ï¼½æ£ã—ã„é¸æŠž -> ï¼»æºå¸¯â–é›»è©±ï¼½â–æ£ã—ã„â–é¸æŠž -> breakpoint between ï¼½ and æ£ + if (utextPos != rangeStart + || (isPhraseBreaking && utextPos > 0 + && fClosePunctuationSet.contains(utext_char32At(inText, utextPos - 1)))) { + foundBreaks.push(utextPos, status); + correctedNumBreaks++; + } } else { // Normalization expanded the input text, the dictionary found a boundary // within the expansion, giving two boundaries with the same index in the @@ -1387,9 +1429,52 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, } (void)prevCPPos; // suppress compiler warnings about unused variable + UChar32 nextChar = utext_char32At(inText, rangeEnd); + if (!foundBreaks.isEmpty() && foundBreaks.peeki() == rangeEnd) { + // In phrase breaking, there has to be a breakpoint between Cj character and + // the number/open punctuation. + // E.g. ã‚‹æ–‡å—「ãã†ã ã€äº¬éƒ½ã€->ã‚‹â–æ–‡å—â–「ãã†ã ã€â–京都ã€-> breakpoint between å— and「 + // E.g. 乗車率9ï¼ï¼…程度ã ã‚ã†ã‹ -> 乗車â–率â–ï¼™ï¼ï¼…â–程度ã ã‚ã†ã‹ -> breakpoint between 率 and ï¼™ + // E.g. ã—ã‹ã‚‚ãƒã‚´ãŒï¼µï½Žï½‰ï½ƒï½ï½„ï½…ï¼ -> ã—ã‹ã‚‚â–ãƒã‚´ãŒâ–Unicï½ï½„ï½…ï¼-> breakpoint between ㌠and ï¼µ + if (isPhraseBreaking) { + if (!fDigitOrOpenPunctuationOrAlphabetSet.contains(nextChar)) { + foundBreaks.popi(); + correctedNumBreaks--; + } + } else { + foundBreaks.popi(); + correctedNumBreaks--; + } + } + // inString goes out of scope // inputMap goes out of scope - return numBreaks; + return correctedNumBreaks; +} + +void CjkBreakEngine::initJapanesePhraseParameter(UErrorCode& error) { + loadJapaneseExtensions(error); + loadHiragana(error); +} + +void CjkBreakEngine::loadJapaneseExtensions(UErrorCode& error) { + const char* tag = "extensions"; + ResourceBundle ja(U_ICUDATA_BRKITR, "ja", error); + if (U_SUCCESS(error)) { + ResourceBundle bundle = ja.get(tag, error); + while (U_SUCCESS(error) && bundle.hasNext()) { + fSkipSet.puti(bundle.getNextString(error), 1, error); + } + } +} + +void CjkBreakEngine::loadHiragana(UErrorCode& error) { + UnicodeSet hiraganaWordSet(UnicodeString(u"[:Hiragana:]"), error); + hiraganaWordSet.compact(); + UnicodeSetIterator iterator(hiraganaWordSet); + while (iterator.next()) { + fSkipSet.puti(UnicodeString(iterator.getCodepoint()), 1, error); + } } #endif diff --git a/thirdparty/icu4c/common/dictbe.h b/thirdparty/icu4c/common/dictbe.h index 4e70ed3817..ca1a3c28b7 100644 --- a/thirdparty/icu4c/common/dictbe.h +++ b/thirdparty/icu4c/common/dictbe.h @@ -15,6 +15,7 @@ #include "unicode/utext.h" #include "brkeng.h" +#include "hash.h" #include "uvectr32.h" U_NAMESPACE_BEGIN @@ -80,6 +81,7 @@ class DictionaryBreakEngine : public LanguageBreakEngine { int32_t startPos, int32_t endPos, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status ) const override; protected: @@ -105,6 +107,7 @@ class DictionaryBreakEngine : public LanguageBreakEngine { int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const = 0; }; @@ -127,7 +130,6 @@ class ThaiBreakEngine : public DictionaryBreakEngine { * @internal */ - UnicodeSet fThaiWordSet; UnicodeSet fEndWordSet; UnicodeSet fBeginWordSet; UnicodeSet fSuffixSet; @@ -164,6 +166,7 @@ class ThaiBreakEngine : public DictionaryBreakEngine { int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const override; }; @@ -186,7 +189,6 @@ class LaoBreakEngine : public DictionaryBreakEngine { * @internal */ - UnicodeSet fLaoWordSet; UnicodeSet fEndWordSet; UnicodeSet fBeginWordSet; UnicodeSet fMarkSet; @@ -222,6 +224,7 @@ class LaoBreakEngine : public DictionaryBreakEngine { int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const override; }; @@ -244,7 +247,6 @@ class BurmeseBreakEngine : public DictionaryBreakEngine { * @internal */ - UnicodeSet fBurmeseWordSet; UnicodeSet fEndWordSet; UnicodeSet fBeginWordSet; UnicodeSet fMarkSet; @@ -280,6 +282,7 @@ class BurmeseBreakEngine : public DictionaryBreakEngine { int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const override; }; @@ -302,7 +305,6 @@ class KhmerBreakEngine : public DictionaryBreakEngine { * @internal */ - UnicodeSet fKhmerWordSet; UnicodeSet fEndWordSet; UnicodeSet fBeginWordSet; UnicodeSet fMarkSet; @@ -338,6 +340,7 @@ class KhmerBreakEngine : public DictionaryBreakEngine { int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const override; }; @@ -366,13 +369,22 @@ class CjkBreakEngine : public DictionaryBreakEngine { * @internal */ UnicodeSet fHangulWordSet; - UnicodeSet fHanWordSet; - UnicodeSet fKatakanaWordSet; - UnicodeSet fHiraganaWordSet; + UnicodeSet fDigitOrOpenPunctuationOrAlphabetSet; + UnicodeSet fClosePunctuationSet; DictionaryMatcher *fDictionary; const Normalizer2 *nfkcNorm2; + private: + // Load Japanese extensions. + void loadJapaneseExtensions(UErrorCode& error); + // Load Japanese Hiragana. + void loadHiragana(UErrorCode& error); + // Initialize fSkipSet by loading Japanese Hiragana and extensions. + void initJapanesePhraseParameter(UErrorCode& error); + + Hashtable fSkipSet; + public: /** @@ -404,6 +416,7 @@ class CjkBreakEngine : public DictionaryBreakEngine { int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const override; }; diff --git a/thirdparty/icu4c/common/localematcher.cpp b/thirdparty/icu4c/common/localematcher.cpp index 3d178dfbaf..2cad708d99 100644 --- a/thirdparty/icu4c/common/localematcher.cpp +++ b/thirdparty/icu4c/common/localematcher.cpp @@ -168,12 +168,9 @@ void LocaleMatcher::Builder::clearSupportedLocales() { bool LocaleMatcher::Builder::ensureSupportedLocaleVector() { if (U_FAILURE(errorCode_)) { return false; } if (supportedLocales_ != nullptr) { return true; } - supportedLocales_ = new UVector(uprv_deleteUObject, nullptr, errorCode_); + LocalPointer<UVector> lpSupportedLocales(new UVector(uprv_deleteUObject, nullptr, errorCode_), errorCode_); if (U_FAILURE(errorCode_)) { return false; } - if (supportedLocales_ == nullptr) { - errorCode_ = U_MEMORY_ALLOCATION_ERROR; - return false; - } + supportedLocales_ = lpSupportedLocales.orphan(); return true; } @@ -187,9 +184,8 @@ LocaleMatcher::Builder &LocaleMatcher::Builder::setSupportedLocalesFromListStrin for (int32_t i = 0; i < length; ++i) { Locale *locale = list.orphanLocaleAt(i); if (locale == nullptr) { continue; } - supportedLocales_->addElementX(locale, errorCode_); + supportedLocales_->adoptElement(locale, errorCode_); if (U_FAILURE(errorCode_)) { - delete locale; break; } } @@ -197,35 +193,21 @@ LocaleMatcher::Builder &LocaleMatcher::Builder::setSupportedLocalesFromListStrin } LocaleMatcher::Builder &LocaleMatcher::Builder::setSupportedLocales(Locale::Iterator &locales) { - if (U_FAILURE(errorCode_)) { return *this; } - clearSupportedLocales(); - if (!ensureSupportedLocaleVector()) { return *this; } - while (locales.hasNext()) { - const Locale &locale = locales.next(); - Locale *clone = locale.clone(); - if (clone == nullptr) { - errorCode_ = U_MEMORY_ALLOCATION_ERROR; - break; - } - supportedLocales_->addElementX(clone, errorCode_); - if (U_FAILURE(errorCode_)) { - delete clone; - break; + if (ensureSupportedLocaleVector()) { + clearSupportedLocales(); + while (locales.hasNext() && U_SUCCESS(errorCode_)) { + const Locale &locale = locales.next(); + LocalPointer<Locale> clone (locale.clone(), errorCode_); + supportedLocales_->adoptElement(clone.orphan(), errorCode_); } } return *this; } LocaleMatcher::Builder &LocaleMatcher::Builder::addSupportedLocale(const Locale &locale) { - if (!ensureSupportedLocaleVector()) { return *this; } - Locale *clone = locale.clone(); - if (clone == nullptr) { - errorCode_ = U_MEMORY_ALLOCATION_ERROR; - return *this; - } - supportedLocales_->addElementX(clone, errorCode_); - if (U_FAILURE(errorCode_)) { - delete clone; + if (ensureSupportedLocaleVector()) { + LocalPointer<Locale> clone(locale.clone(), errorCode_); + supportedLocales_->adoptElement(clone.orphan(), errorCode_); } return *this; } diff --git a/thirdparty/icu4c/common/locid.cpp b/thirdparty/icu4c/common/locid.cpp index e8859c7048..73bb8d8aec 100644 --- a/thirdparty/icu4c/common/locid.cpp +++ b/thirdparty/icu4c/common/locid.cpp @@ -1204,14 +1204,11 @@ AliasReplacer::parseLanguageReplacement( // We have multiple field so we have to allocate and parse CharString* str = new CharString( replacement, (int32_t)uprv_strlen(replacement), status); + LocalPointer<CharString> lpStr(str, status); + toBeFreed.adoptElement(lpStr.orphan(), status); if (U_FAILURE(status)) { return; } - if (str == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; - return; - } - toBeFreed.addElementX(str, status); char* data = str->data(); replacedLanguage = (const char*) data; char* endOfField = uprv_strchr(data, '_'); @@ -1420,12 +1417,9 @@ AliasReplacer::replaceTerritory(UVector& toBeFreed, UErrorCode& status) (int32_t)(firstSpace - replacement), status), status); } if (U_FAILURE(status)) { return false; } - if (item.isNull()) { - status = U_MEMORY_ALLOCATION_ERROR; - return false; - } replacedRegion = item->data(); - toBeFreed.addElementX(item.orphan(), status); + toBeFreed.adoptElement(item.orphan(), status); + if (U_FAILURE(status)) { return false; } } U_ASSERT(!same(region, replacedRegion)); region = replacedRegion; @@ -1659,10 +1653,10 @@ AliasReplacer::replace(const Locale& locale, CharString& out, UErrorCode& status while ((end = uprv_strchr(start, SEP_CHAR)) != nullptr && U_SUCCESS(status)) { *end = NULL_CHAR; // null terminate inside variantsBuff - variants.addElementX(start, status); + variants.addElement(start, status); start = end + 1; } - variants.addElementX(start, status); + variants.addElement(start, status); } if (U_FAILURE(status)) { return false; } diff --git a/thirdparty/icu4c/common/lstmbe.cpp b/thirdparty/icu4c/common/lstmbe.cpp index 3793abceb3..f6114cdfe2 100644 --- a/thirdparty/icu4c/common/lstmbe.cpp +++ b/thirdparty/icu4c/common/lstmbe.cpp @@ -1,8 +1,8 @@ // © 2021 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html +#include <complex> #include <utility> -#include <ctgmath> #include "unicode/utypes.h" @@ -639,6 +639,7 @@ LSTMBreakEngine::divideUpDictionaryRange( UText *text, int32_t startPos, int32_t endPos, UVector32 &foundBreaks, + UBool /* isPhraseBreaking */, UErrorCode& status) const { if (U_FAILURE(status)) return 0; int32_t beginFoundBreakSize = foundBreaks.size(); diff --git a/thirdparty/icu4c/common/lstmbe.h b/thirdparty/icu4c/common/lstmbe.h index c3f7ecf815..ffdf805eca 100644 --- a/thirdparty/icu4c/common/lstmbe.h +++ b/thirdparty/icu4c/common/lstmbe.h @@ -62,6 +62,7 @@ protected: int32_t rangeStart, int32_t rangeEnd, UVector32 &foundBreaks, + UBool isPhraseBreaking, UErrorCode& status) const override; private: const LSTMData* fData; diff --git a/thirdparty/icu4c/common/normalizer2impl.cpp b/thirdparty/icu4c/common/normalizer2impl.cpp index 5bfd49e8cb..e6bd75e717 100644 --- a/thirdparty/icu4c/common/normalizer2impl.cpp +++ b/thirdparty/icu4c/common/normalizer2impl.cpp @@ -2496,15 +2496,18 @@ void CanonIterData::addToStartSet(UChar32 origin, UChar32 decompLead, UErrorCode // origin is not the first character, or it is U+0000. UnicodeSet *set; if((canonValue&CANON_HAS_SET)==0) { - set=new UnicodeSet; - if(set==NULL) { - errorCode=U_MEMORY_ALLOCATION_ERROR; + LocalPointer<UnicodeSet> lpSet(new UnicodeSet, errorCode); + set=lpSet.getAlias(); + if(U_FAILURE(errorCode)) { return; } UChar32 firstOrigin=(UChar32)(canonValue&CANON_VALUE_MASK); canonValue=(canonValue&~CANON_VALUE_MASK)|CANON_HAS_SET|(uint32_t)canonStartSets.size(); umutablecptrie_set(mutableTrie, decompLead, canonValue, &errorCode); - canonStartSets.addElementX(set, errorCode); + canonStartSets.adoptElement(lpSet.orphan(), errorCode); + if (U_FAILURE(errorCode)) { + return; + } if(firstOrigin!=0) { set->add(firstOrigin); } diff --git a/thirdparty/icu4c/common/rbbi.cpp b/thirdparty/icu4c/common/rbbi.cpp index f65177f232..cae8d154b3 100644 --- a/thirdparty/icu4c/common/rbbi.cpp +++ b/thirdparty/icu4c/common/rbbi.cpp @@ -82,6 +82,19 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode } } +//------------------------------------------------------------------------------- +// +// Constructor from a UDataMemory handle to precompiled break rules +// stored in an ICU data file. This construcotr is private API, +// only for internal use. +// +//------------------------------------------------------------------------------- +RuleBasedBreakIterator::RuleBasedBreakIterator(UDataMemory* udm, UBool isPhraseBreaking, + UErrorCode &status) : RuleBasedBreakIterator(udm, status) +{ + fIsPhraseBreaking = isPhraseBreaking; +} + // // Construct from precompiled binary rules (tables). This constructor is public API, // taking the rules as a (const uint8_t *) to match the type produced by getBinaryRules(). @@ -322,6 +335,7 @@ void RuleBasedBreakIterator::init(UErrorCode &status) { fBreakCache = nullptr; fDictionaryCache = nullptr; fLookAheadMatches = nullptr; + fIsPhraseBreaking = false; // Note: IBM xlC is unable to assign or initialize member fText from UTEXT_INITIALIZER. // fText = UTEXT_INITIALIZER; diff --git a/thirdparty/icu4c/common/rbbi_cache.cpp b/thirdparty/icu4c/common/rbbi_cache.cpp index 6bfe3feca4..26d82df781 100644 --- a/thirdparty/icu4c/common/rbbi_cache.cpp +++ b/thirdparty/icu4c/common/rbbi_cache.cpp @@ -163,7 +163,7 @@ void RuleBasedBreakIterator::DictionaryCache::populateDictionary(int32_t startPo // Ask the language object if there are any breaks. It will add them to the cache and // leave the text pointer on the other side of its range, ready to search for the next one. if (lbe != NULL) { - foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, fBreaks, status); + foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, fBreaks, fBI->fIsPhraseBreaking, status); } // Reload the loop variables for the next go-round diff --git a/thirdparty/icu4c/common/serv.cpp b/thirdparty/icu4c/common/serv.cpp index 0c54a4dce9..c26dbca1a9 100644 --- a/thirdparty/icu4c/common/serv.cpp +++ b/thirdparty/icu4c/common/serv.cpp @@ -625,10 +625,7 @@ ICUService::getVisibleIDs(UVector& result, const UnicodeString* matchID, UErrorC } } - LocalPointer<UnicodeString> idClone(new UnicodeString(*id), status); - if (U_SUCCESS(status) && idClone->isBogus()) { - status = U_MEMORY_ALLOCATION_ERROR; - } + LocalPointer<UnicodeString> idClone(id->clone(), status); result.adoptElement(idClone.orphan(), status); } delete fallbackKey; diff --git a/thirdparty/icu4c/common/servls.cpp b/thirdparty/icu4c/common/servls.cpp index 7108afd4a5..98f0a8a12b 100644 --- a/thirdparty/icu4c/common/servls.cpp +++ b/thirdparty/icu4c/common/servls.cpp @@ -179,7 +179,8 @@ private: length = other._ids.size(); for(i = 0; i < length; ++i) { - _ids.addElementX(((UnicodeString *)other._ids.elementAt(i))->clone(), status); + LocalPointer<UnicodeString> clonedId(((UnicodeString *)other._ids.elementAt(i))->clone(), status); + _ids.adoptElement(clonedId.orphan(), status); } if(U_SUCCESS(status)) { diff --git a/thirdparty/icu4c/common/servnotf.cpp b/thirdparty/icu4c/common/servnotf.cpp index 342e0d9f24..d9fb388752 100644 --- a/thirdparty/icu4c/common/servnotf.cpp +++ b/thirdparty/icu4c/common/servnotf.cpp @@ -49,7 +49,11 @@ ICUNotifier::addListener(const EventListener* l, UErrorCode& status) if (acceptsListener(*l)) { Mutex lmx(¬ifyLock); if (listeners == NULL) { - listeners = new UVector(5, status); + LocalPointer<UVector> lpListeners(new UVector(5, status), status); + if (U_FAILURE(status)) { + return; + } + listeners = lpListeners.orphan(); } else { for (int i = 0, e = listeners->size(); i < e; ++i) { const EventListener* el = (const EventListener*)(listeners->elementAt(i)); @@ -59,7 +63,7 @@ ICUNotifier::addListener(const EventListener* l, UErrorCode& status) } } - listeners->addElementX((void*)l, status); // cast away const + listeners->addElement((void*)l, status); // cast away const } #ifdef NOTIFIER_DEBUG else { @@ -102,13 +106,11 @@ ICUNotifier::removeListener(const EventListener *l, UErrorCode& status) void ICUNotifier::notifyChanged(void) { + Mutex lmx(¬ifyLock); if (listeners != NULL) { - Mutex lmx(¬ifyLock); - if (listeners != NULL) { - for (int i = 0, e = listeners->size(); i < e; ++i) { - EventListener* el = (EventListener*)listeners->elementAt(i); - notifyListener(*el); - } + for (int i = 0, e = listeners->size(); i < e; ++i) { + EventListener* el = (EventListener*)listeners->elementAt(i); + notifyListener(*el); } } } diff --git a/thirdparty/icu4c/common/ubrk.cpp b/thirdparty/icu4c/common/ubrk.cpp index bb5bdd1b50..f4e064961f 100644 --- a/thirdparty/icu4c/common/ubrk.cpp +++ b/thirdparty/icu4c/common/ubrk.cpp @@ -168,7 +168,7 @@ ubrk_safeClone( BreakIterator *newBI = ((BreakIterator *)bi)->clone(); if (newBI == NULL) { *status = U_MEMORY_ALLOCATION_ERROR; - } else { + } else if (pBufferSize != NULL) { *status = U_SAFECLONE_ALLOCATED_WARNING; } return (UBreakIterator *)newBI; @@ -176,15 +176,7 @@ ubrk_safeClone( U_CAPI UBreakIterator * U_EXPORT2 ubrk_clone(const UBreakIterator *bi, UErrorCode *status) { - if (U_FAILURE(*status)) { - return nullptr; - } - BreakIterator *newBI = ((BreakIterator *)bi)->clone(); - if (newBI == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; - return nullptr; - } - return (UBreakIterator *)newBI; + return ubrk_safeClone(bi, nullptr, nullptr, status); } diff --git a/thirdparty/icu4c/common/ucase.cpp b/thirdparty/icu4c/common/ucase.cpp index 4aa856507a..388c86b1bb 100644 --- a/thirdparty/icu4c/common/ucase.cpp +++ b/thirdparty/icu4c/common/ucase.cpp @@ -22,27 +22,14 @@ #include "unicode/utypes.h" #include "unicode/unistr.h" #include "unicode/uset.h" -#include "unicode/udata.h" /* UDataInfo */ #include "unicode/utf16.h" -#include "ucmndata.h" /* DataHeader */ -#include "udatamem.h" -#include "umutex.h" -#include "uassert.h" #include "cmemory.h" -#include "utrie2.h" +#include "uassert.h" #include "ucase.h" +#include "umutex.h" +#include "utrie2.h" -struct UCaseProps { - UDataMemory *mem; - const int32_t *indexes; - const uint16_t *exceptions; - const uint16_t *unfold; - - UTrie2 trie; - uint8_t formatVersion[4]; -}; - -/* ucase_props_data.h is machine-generated by gencase --csource */ +/* ucase_props_data.h is machine-generated by genprops/casepropsbuilder.cpp */ #define INCLUDED_FROM_UCASE_CPP #include "ucase_props_data.h" @@ -77,6 +64,13 @@ ucase_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) { /* data access primitives --------------------------------------------------- */ +U_CAPI const struct UCaseProps * U_EXPORT2 +ucase_getSingleton(int32_t *pExceptionsLength, int32_t *pUnfoldLength) { + *pExceptionsLength = UPRV_LENGTHOF(ucase_props_exceptions); + *pUnfoldLength = UPRV_LENGTHOF(ucase_props_unfold); + return &ucase_props_singleton; +} + U_CFUNC const UTrie2 * U_EXPORT2 ucase_getTrie() { return &ucase_props_singleton.trie; @@ -690,7 +684,7 @@ ucase_isCaseSensitive(UChar32 c) { * - The general category of C is * Nonspacing Mark (Mn), or Enclosing Mark (Me), or Format Control (Cf), or * Letter Modifier (Lm), or Symbol Modifier (Sk) - * - C is one of the following characters + * - C is one of the following characters * U+0027 APOSTROPHE * U+00AD SOFT HYPHEN (SHY) * U+2019 RIGHT SINGLE QUOTATION MARK @@ -1064,6 +1058,8 @@ ucase_toFullLower(UChar32 c, // The sign of the result has meaning, input must be non-negative so that it can be returned as is. U_ASSERT(c >= 0); UChar32 result=c; + // Reset the output pointer in case it was uninitialized. + *pString=nullptr; uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c); if(!UCASE_HAS_EXCEPTION(props)) { if(UCASE_IS_UPPER_OR_TITLE(props)) { @@ -1148,7 +1144,6 @@ ucase_toFullLower(UChar32 c, 0307; ; 0307; 0307; tr After_I; # COMBINING DOT ABOVE 0307; ; 0307; 0307; az After_I; # COMBINING DOT ABOVE */ - *pString=nullptr; return 0; /* remove the dot (continue without output) */ } else if(loc==UCASE_LOC_TURKISH && c==0x49 && !isFollowedByDotAbove(iter, context)) { /* @@ -1215,6 +1210,8 @@ toUpperOrTitle(UChar32 c, // The sign of the result has meaning, input must be non-negative so that it can be returned as is. U_ASSERT(c >= 0); UChar32 result=c; + // Reset the output pointer in case it was uninitialized. + *pString=nullptr; uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c); if(!UCASE_HAS_EXCEPTION(props)) { if(UCASE_GET_TYPE(props)==UCASE_LOWER) { @@ -1252,7 +1249,6 @@ toUpperOrTitle(UChar32 c, 0307; 0307; ; ; lt After_Soft_Dotted; # COMBINING DOT ABOVE */ - *pString=nullptr; return 0; /* remove the dot (continue without output) */ } else if(c==0x0587) { // See ICU-13416: @@ -1449,6 +1445,8 @@ ucase_toFullFolding(UChar32 c, // The sign of the result has meaning, input must be non-negative so that it can be returned as is. U_ASSERT(c >= 0); UChar32 result=c; + // Reset the output pointer in case it was uninitialized. + *pString=nullptr; uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c); if(!UCASE_HAS_EXCEPTION(props)) { if(UCASE_IS_UPPER_OR_TITLE(props)) { @@ -1542,7 +1540,7 @@ U_CAPI UChar32 U_EXPORT2 u_tolower(UChar32 c) { return ucase_tolower(c); } - + /* Transforms the Unicode character to its upper case equivalent.*/ U_CAPI UChar32 U_EXPORT2 u_toupper(UChar32 c) { diff --git a/thirdparty/icu4c/common/ucase.h b/thirdparty/icu4c/common/ucase.h index a018f82b81..7bf57fd370 100644 --- a/thirdparty/icu4c/common/ucase.h +++ b/thirdparty/icu4c/common/ucase.h @@ -312,6 +312,21 @@ UCaseMapFull(UChar32 c, U_CDECL_END +/* for icuexportdata -------------------------------------------------------- */ + +struct UCaseProps { + void *mem; // TODO: was unused, and type UDataMemory -- remove + const int32_t *indexes; + const uint16_t *exceptions; + const uint16_t *unfold; + + UTrie2 trie; + uint8_t formatVersion[4]; +}; + +U_CAPI const struct UCaseProps * U_EXPORT2 +ucase_getSingleton(int32_t *pExceptionsLength, int32_t *pUnfoldLength); + /* file definitions --------------------------------------------------------- */ #define UCASE_DATA_NAME "ucase" diff --git a/thirdparty/icu4c/common/ucasemap.cpp b/thirdparty/icu4c/common/ucasemap.cpp index ed72bda828..95b55d56a0 100644 --- a/thirdparty/icu4c/common/ucasemap.cpp +++ b/thirdparty/icu4c/common/ucasemap.cpp @@ -112,8 +112,7 @@ ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode) { if(length==sizeof(csm->locale)) { *pErrorCode=U_BUFFER_OVERFLOW_ERROR; } - if(U_SUCCESS(*pErrorCode)) { - csm->caseLocale=UCASE_LOC_UNKNOWN; + if(U_SUCCESS(*pErrorCode)) { csm->caseLocale = ucase_getCaseLocale(csm->locale); } else { csm->locale[0]=0; @@ -420,6 +419,97 @@ void toUpper(int32_t caseLocale, uint32_t options, #if !UCONFIG_NO_BREAK_ITERATION +namespace { + +constexpr uint8_t ACUTE_BYTE0 = u8"\u0301"[0]; + +constexpr uint8_t ACUTE_BYTE1 = u8"\u0301"[1]; + +/** + * Input: c is a letter I with or without acute accent. + * start is the index in src after c, and is less than segmentLimit. + * If a plain i/I is followed by a plain j/J, + * or an i/I with acute (precomposed or decomposed) is followed by a j/J with acute, + * then we output accordingly. + * + * @return the src index after the titlecased sequence, or the start index if no Dutch IJ + */ +int32_t maybeTitleDutchIJ(const uint8_t *src, UChar32 c, int32_t start, int32_t segmentLimit, + ByteSink &sink, uint32_t options, icu::Edits *edits, UErrorCode &errorCode) { + U_ASSERT(start < segmentLimit); + + int32_t index = start; + bool withAcute = false; + + // If the conditions are met, then the following variables tell us what to output. + int32_t unchanged1 = 0; // code units before the j, or the whole sequence (0..3) + bool doTitleJ = false; // true if the j needs to be titlecased + int32_t unchanged2 = 0; // after the j (0 or 1) + + // next character after the first letter + UChar32 c2; + c2 = src[index++]; + + // Is the first letter an i/I with accent? + if (c == u'I') { + if (c2 == ACUTE_BYTE0 && index < segmentLimit && src[index++] == ACUTE_BYTE1) { + withAcute = true; + unchanged1 = 2; // ACUTE is 2 code units in UTF-8 + if (index == segmentLimit) { return start; } + c2 = src[index++]; + } + } else { // à + withAcute = true; + } + + // Is the next character a j/J? + if (c2 == u'j') { + doTitleJ = true; + } else if (c2 == u'J') { + ++unchanged1; + } else { + return start; + } + + // A plain i/I must be followed by a plain j/J. + // An i/I with acute must be followed by a j/J with acute. + if (withAcute) { + if ((index + 1) >= segmentLimit || src[index++] != ACUTE_BYTE0 || src[index++] != ACUTE_BYTE1) { + return start; + } + if (doTitleJ) { + unchanged2 = 2; // ACUTE is 2 code units in UTF-8 + } else { + unchanged1 = unchanged1 + 2; // ACUTE is 2 code units in UTF-8 + } + } + + // There must not be another combining mark. + if (index < segmentLimit) { + int32_t cp; + int32_t i = index; + U8_NEXT(src, i, segmentLimit, cp); + uint32_t typeMask = U_GET_GC_MASK(cp); + if ((typeMask & U_GC_M_MASK) != 0) { + return start; + } + } + + // Output the rest of the Dutch IJ. + ByteSinkUtil::appendUnchanged(src + start, unchanged1, sink, options, edits, errorCode); + start += unchanged1; + if (doTitleJ) { + ByteSinkUtil::appendCodePoint(1, u'J', sink, edits); + ++start; + } + ByteSinkUtil::appendUnchanged(src + start, unchanged2, sink, options, edits, errorCode); + + U_ASSERT(start + unchanged2 == index); + return index; +} + +} // namespace + U_CFUNC void U_CALLCONV ucasemap_internalUTF8ToTitle( int32_t caseLocale, uint32_t options, BreakIterator *iter, @@ -504,19 +594,14 @@ ucasemap_internalUTF8ToTitle( } /* Special case Dutch IJ titlecasing */ - if (titleStart+1 < index && - caseLocale == UCASE_LOC_DUTCH && - (src[titleStart] == 0x0049 || src[titleStart] == 0x0069)) { - if (src[titleStart+1] == 0x006A) { - ByteSinkUtil::appendCodePoint(1, 0x004A, sink, edits); - titleLimit++; - } else if (src[titleStart+1] == 0x004A) { - // Keep the capital J from getting lowercased. - if (!ByteSinkUtil::appendUnchanged(src+titleStart+1, 1, - sink, options, edits, errorCode)) { - return; - } - titleLimit++; + if (titleLimit < index && + caseLocale == UCASE_LOC_DUTCH) { + if (c < 0) { + c = ~c; + } + + if (c == u'I' || c == u'Ã') { + titleLimit = maybeTitleDutchIJ(src, c, titleLimit, index, sink, options, edits, errorCode); } } diff --git a/thirdparty/icu4c/common/ucnv.cpp b/thirdparty/icu4c/common/ucnv.cpp index 5dcf35e043..019bcb6a79 100644 --- a/thirdparty/icu4c/common/ucnv.cpp +++ b/thirdparty/icu4c/common/ucnv.cpp @@ -252,7 +252,10 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U UTRACE_EXIT_STATUS(*status); return NULL; } - *status = U_SAFECLONE_ALLOCATED_WARNING; + // If pBufferSize was NULL as the input, pBufferSize is set to &stackBufferSize in this function. + if (pBufferSize != &stackBufferSize) { + *status = U_SAFECLONE_ALLOCATED_WARNING; + } /* record the fact that memory was allocated */ *pBufferSize = bufferSizeNeeded; @@ -317,7 +320,11 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U return localConverter; } - +U_CAPI UConverter* U_EXPORT2 +ucnv_clone(const UConverter* cnv, UErrorCode *status) +{ + return ucnv_safeClone(cnv, nullptr, nullptr, status); +} /*Decreases the reference counter in the shared immutable section of the object *and frees the mutable part*/ diff --git a/thirdparty/icu4c/common/ucurr.cpp b/thirdparty/icu4c/common/ucurr.cpp index 67aab4e8ff..6e489e0563 100644 --- a/thirdparty/icu4c/common/ucurr.cpp +++ b/thirdparty/icu4c/common/ucurr.cpp @@ -254,7 +254,7 @@ currSymbolsEquiv_cleanup(void) } /** - * Deleter for OlsonToMetaMappingEntry + * Deleter for IsoCodeEntry */ static void U_CALLCONV deleteIsoCodeEntry(void *obj) { diff --git a/thirdparty/icu4c/common/uloc.cpp b/thirdparty/icu4c/common/uloc.cpp index c8a3f1ff73..99c6a0af39 100644 --- a/thirdparty/icu4c/common/uloc.cpp +++ b/thirdparty/icu4c/common/uloc.cpp @@ -186,10 +186,10 @@ NULL }; static const char* const DEPRECATED_LANGUAGES[]={ - "in", "iw", "ji", "jw", NULL, NULL + "in", "iw", "ji", "jw", "mo", NULL, NULL }; static const char* const REPLACEMENT_LANGUAGES[]={ - "id", "he", "yi", "jv", NULL, NULL + "id", "he", "yi", "jv", "ro", NULL, NULL }; /** @@ -444,7 +444,7 @@ static const char * const COUNTRIES_3[] = { /* "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", */ "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", /* "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW", */ - "WSM", "XXK", "YEM", "MYT", "ZAF", "ZMB", "ZWE", + "WSM", "XKK", "YEM", "MYT", "ZAF", "ZMB", "ZWE", NULL, /* "AN", "BU", "CS", "FX", "RO", "SU", "TP", "YD", "YU", "ZR" */ "ANT", "BUR", "SCG", "FXX", "ROM", "SUN", "TMP", "YMD", "YUG", "ZAR", diff --git a/thirdparty/icu4c/common/unicode/localematcher.h b/thirdparty/icu4c/common/unicode/localematcher.h index 252bb7fdc2..0f7e04a3af 100644 --- a/thirdparty/icu4c/common/unicode/localematcher.h +++ b/thirdparty/icu4c/common/unicode/localematcher.h @@ -461,13 +461,13 @@ public: * Option for whether to include or ignore one-way (fallback) match data. * By default, they are included. * - * @param direction the match direction to set. + * @param matchDirection the match direction to set. * @return this Builder object * @stable ICU 67 */ - Builder &setDirection(ULocMatchDirection direction) { + Builder &setDirection(ULocMatchDirection matchDirection) { if (U_SUCCESS(errorCode_)) { - direction_ = direction; + direction_ = matchDirection; } return *this; } diff --git a/thirdparty/icu4c/common/unicode/rbbi.h b/thirdparty/icu4c/common/unicode/rbbi.h index 0ce93819f5..0bad0d3897 100644 --- a/thirdparty/icu4c/common/unicode/rbbi.h +++ b/thirdparty/icu4c/common/unicode/rbbi.h @@ -147,6 +147,11 @@ private: */ int32_t *fLookAheadMatches; + /** + * A flag to indicate if phrase based breaking is enabled. + */ + UBool fIsPhraseBreaking; + //======================================================================= // constructors //======================================================================= @@ -163,6 +168,21 @@ private: */ RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode &status); + /** + * This constructor uses the udata interface to create a BreakIterator + * whose internal tables live in a memory-mapped file. "image" is an + * ICU UDataMemory handle for the pre-compiled break iterator tables. + * @param image handle to the memory image for the break iterator data. + * Ownership of the UDataMemory handle passes to the Break Iterator, + * which will be responsible for closing it when it is no longer needed. + * @param status Information on any errors encountered. + * @param isPhraseBreaking true if phrase based breaking is required, otherwise false. + * @see udata_open + * @see #getBinaryRules + * @internal (private) + */ + RuleBasedBreakIterator(UDataMemory* image, UBool isPhraseBreaking, UErrorCode &status); + /** @internal */ friend class RBBIRuleBuilder; /** @internal */ diff --git a/thirdparty/icu4c/common/unicode/ubrk.h b/thirdparty/icu4c/common/unicode/ubrk.h index c603f7c13f..2b3dc7aa57 100644 --- a/thirdparty/icu4c/common/unicode/ubrk.h +++ b/thirdparty/icu4c/common/unicode/ubrk.h @@ -312,11 +312,12 @@ ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength, * If *pBufferSize is not enough for a stack-based safe clone, * new memory will be allocated. * @param status to indicate whether the operation went on smoothly or there were errors - * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were necessary. + * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used + * if pBufferSize != NULL and any allocations were necessary * @return pointer to the new clone * @deprecated ICU 69 Use ubrk_clone() instead. */ -U_CAPI UBreakIterator * U_EXPORT2 +U_DEPRECATED UBreakIterator * U_EXPORT2 ubrk_safeClone( const UBreakIterator *bi, void *stackBuffer, @@ -325,21 +326,17 @@ ubrk_safeClone( #endif /* U_HIDE_DEPRECATED_API */ -#ifndef U_HIDE_DRAFT_API - /** * Thread safe cloning operation. * @param bi iterator to be cloned * @param status to indicate whether the operation went on smoothly or there were errors * @return pointer to the new clone - * @draft ICU 69 + * @stable ICU 69 */ U_CAPI UBreakIterator * U_EXPORT2 ubrk_clone(const UBreakIterator *bi, UErrorCode *status); -#endif // U_HIDE_DRAFT_API - #ifndef U_HIDE_DEPRECATED_API /** diff --git a/thirdparty/icu4c/common/unicode/ucnv.h b/thirdparty/icu4c/common/unicode/ucnv.h index 2687c984d4..20c173b662 100644 --- a/thirdparty/icu4c/common/unicode/ucnv.h +++ b/thirdparty/icu4c/common/unicode/ucnv.h @@ -477,7 +477,7 @@ ucnv_openCCSID(int32_t codepage, * * <p>The name will NOT be looked up in the alias mechanism, nor will the converter be * stored in the converter cache or the alias table. The only way to open further converters - * is call this function multiple times, or use the ucnv_safeClone() function to clone a + * is call this function multiple times, or use the ucnv_clone() function to clone a * 'primary' converter.</p> * * <p>A future version of ICU may add alias table lookups and/or caching @@ -493,7 +493,7 @@ ucnv_openCCSID(int32_t codepage, * @return the created Unicode converter object, or <TT>NULL</TT> if an error occurred * @see udata_open * @see ucnv_open - * @see ucnv_safeClone + * @see ucnv_clone * @see ucnv_close * @stable ICU 2.2 */ @@ -502,6 +502,20 @@ ucnv_openPackage(const char *packageName, const char *converterName, UErrorCode /** * Thread safe converter cloning operation. + * + * You must ucnv_close() the clone. + * + * @param cnv converter to be cloned + * @param status to indicate whether the operation went on smoothly or there were errors + * @return pointer to the new clone + * @stable ICU 71 + */ +U_CAPI UConverter* U_EXPORT2 ucnv_clone(const UConverter *cnv, UErrorCode *status); + +#ifndef U_HIDE_DEPRECATED_API + +/** + * Thread safe converter cloning operation. * For most efficient operation, pass in a stackBuffer (and a *pBufferSize) * with at least U_CNV_SAFECLONE_BUFFERSIZE bytes of space. * If the buffer size is sufficient, then the clone will use the stack buffer; @@ -532,21 +546,19 @@ ucnv_openPackage(const char *packageName, const char *converterName, UErrorCode * pointer to size of allocated space. * @param status to indicate whether the operation went on smoothly or there were errors * An informational status value, U_SAFECLONE_ALLOCATED_WARNING, - * is used if any allocations were necessary. + * is used if pBufferSize != NULL and any allocations were necessary * However, it is better to check if *pBufferSize grew for checking for * allocations because warning codes can be overridden by subsequent * function calls. * @return pointer to the new clone - * @stable ICU 2.0 + * @deprecated ICU 71 Use ucnv_clone() instead. */ -U_CAPI UConverter * U_EXPORT2 +U_DEPRECATED UConverter * U_EXPORT2 ucnv_safeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status); -#ifndef U_HIDE_DEPRECATED_API - /** * \def U_CNV_SAFECLONE_BUFFERSIZE * Definition of a buffer size that is designed to be large enough for diff --git a/thirdparty/icu4c/common/unicode/uniset.h b/thirdparty/icu4c/common/unicode/uniset.h index 730337a353..310c7c8d20 100644 --- a/thirdparty/icu4c/common/unicode/uniset.h +++ b/thirdparty/icu4c/common/unicode/uniset.h @@ -1229,7 +1229,6 @@ public: */ UnicodeSet& retain(UChar32 c); -#ifndef U_HIDE_DRAFT_API /** * Retains only the specified string from this set if it is present. * Upon return this set will be empty if it did not contain s, or @@ -1238,10 +1237,9 @@ public: * * @param s the source string * @return this object, for chaining - * @draft ICU 69 + * @stable ICU 69 */ UnicodeSet& retain(const UnicodeString &s); -#endif // U_HIDE_DRAFT_API /** * Removes the specified range from this set if it is present. diff --git a/thirdparty/icu4c/common/unicode/urename.h b/thirdparty/icu4c/common/unicode/urename.h index 4605f632ea..d9f9b8f336 100644 --- a/thirdparty/icu4c/common/unicode/urename.h +++ b/thirdparty/icu4c/common/unicode/urename.h @@ -567,6 +567,7 @@ #define ucase_addStringCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addStringCaseClosure) #define ucase_fold U_ICU_ENTRY_POINT_RENAME(ucase_fold) #define ucase_getCaseLocale U_ICU_ENTRY_POINT_RENAME(ucase_getCaseLocale) +#define ucase_getSingleton U_ICU_ENTRY_POINT_RENAME(ucase_getSingleton) #define ucase_getTrie U_ICU_ENTRY_POINT_RENAME(ucase_getTrie) #define ucase_getType U_ICU_ENTRY_POINT_RENAME(ucase_getType) #define ucase_getTypeOrIgnorable U_ICU_ENTRY_POINT_RENAME(ucase_getTypeOrIgnorable) @@ -630,6 +631,7 @@ #define ucnv_cbFromUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteUChars) #define ucnv_cbToUWriteSub U_ICU_ENTRY_POINT_RENAME(ucnv_cbToUWriteSub) #define ucnv_cbToUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbToUWriteUChars) +#define ucnv_clone U_ICU_ENTRY_POINT_RENAME(ucnv_clone) #define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close) #define ucnv_compareNames U_ICU_ENTRY_POINT_RENAME(ucnv_compareNames) #define ucnv_convert U_ICU_ENTRY_POINT_RENAME(ucnv_convert) @@ -725,6 +727,7 @@ #define ucnvsel_selectForString U_ICU_ENTRY_POINT_RENAME(ucnvsel_selectForString) #define ucnvsel_selectForUTF8 U_ICU_ENTRY_POINT_RENAME(ucnvsel_selectForUTF8) #define ucnvsel_serialize U_ICU_ENTRY_POINT_RENAME(ucnvsel_serialize) +#define ucol_clone U_ICU_ENTRY_POINT_RENAME(ucol_clone) #define ucol_cloneBinary U_ICU_ENTRY_POINT_RENAME(ucol_cloneBinary) #define ucol_close U_ICU_ENTRY_POINT_RENAME(ucol_close) #define ucol_closeElements U_ICU_ENTRY_POINT_RENAME(ucol_closeElements) @@ -904,6 +907,7 @@ #define udatpg_getBestPattern U_ICU_ENTRY_POINT_RENAME(udatpg_getBestPattern) #define udatpg_getBestPatternWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg_getBestPatternWithOptions) #define udatpg_getDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_getDateTimeFormat) +#define udatpg_getDateTimeFormatForStyle U_ICU_ENTRY_POINT_RENAME(udatpg_getDateTimeFormatForStyle) #define udatpg_getDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_getDecimal) #define udatpg_getDefaultHourCycle U_ICU_ENTRY_POINT_RENAME(udatpg_getDefaultHourCycle) #define udatpg_getFieldDisplayName U_ICU_ENTRY_POINT_RENAME(udatpg_getFieldDisplayName) @@ -918,6 +922,7 @@ #define udatpg_setAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendItemFormat) #define udatpg_setAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendItemName) #define udatpg_setDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTimeFormat) +#define udatpg_setDateTimeFormatForStyle U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTimeFormatForStyle) #define udatpg_setDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_setDecimal) #define udict_swap U_ICU_ENTRY_POINT_RENAME(udict_swap) #define udtitvfmt_close U_ICU_ENTRY_POINT_RENAME(udtitvfmt_close) diff --git a/thirdparty/icu4c/common/unicode/uset.h b/thirdparty/icu4c/common/unicode/uset.h index 2ef352ef56..33332f2d36 100644 --- a/thirdparty/icu4c/common/unicode/uset.h +++ b/thirdparty/icu4c/common/unicode/uset.h @@ -628,7 +628,6 @@ uset_removeRange(USet* set, UChar32 start, UChar32 end); U_CAPI void U_EXPORT2 uset_removeString(USet* set, const UChar* str, int32_t strLen); -#ifndef U_HIDE_DRAFT_API /** * Removes EACH of the characters in this string. Note: "ch" == {"c", "h"} * A frozen set will not be modified. @@ -636,11 +635,10 @@ uset_removeString(USet* set, const UChar* str, int32_t strLen); * @param set the object to be modified * @param str the string * @param length the length of the string, or -1 if NUL-terminated - * @draft ICU 69 + * @stable ICU 69 */ U_CAPI void U_EXPORT2 uset_removeAllCodePoints(USet *set, const UChar *str, int32_t length); -#endif // U_HIDE_DRAFT_API /** * Removes from this set all of its elements that are contained in the @@ -671,7 +669,6 @@ uset_removeAll(USet* set, const USet* removeSet); U_CAPI void U_EXPORT2 uset_retain(USet* set, UChar32 start, UChar32 end); -#ifndef U_HIDE_DRAFT_API /** * Retains only the specified string from this set if it is present. * Upon return this set will be empty if it did not contain s, or @@ -681,7 +678,7 @@ uset_retain(USet* set, UChar32 start, UChar32 end); * @param set the object to be modified * @param str the string * @param length the length of the string, or -1 if NUL-terminated - * @draft ICU 69 + * @stable ICU 69 */ U_CAPI void U_EXPORT2 uset_retainString(USet *set, const UChar *str, int32_t length); @@ -693,11 +690,10 @@ uset_retainString(USet *set, const UChar *str, int32_t length); * @param set the object to be modified * @param str the string * @param length the length of the string, or -1 if NUL-terminated - * @draft ICU 69 + * @stable ICU 69 */ U_CAPI void U_EXPORT2 uset_retainAllCodePoints(USet *set, const UChar *str, int32_t length); -#endif // U_HIDE_DRAFT_API /** * Retains only the elements in this set that are contained in the @@ -741,7 +737,6 @@ uset_compact(USet* set); U_CAPI void U_EXPORT2 uset_complement(USet* set); -#ifndef U_HIDE_DRAFT_API /** * Complements the specified range in this set. Any character in * the range will be removed if it is in this set, or will be @@ -753,7 +748,7 @@ uset_complement(USet* set); * @param set the object to be modified * @param start first character, inclusive, of range * @param end last character, inclusive, of range - * @draft ICU 69 + * @stable ICU 69 */ U_CAPI void U_EXPORT2 uset_complementRange(USet *set, UChar32 start, UChar32 end); @@ -766,7 +761,7 @@ uset_complementRange(USet *set, UChar32 start, UChar32 end); * @param set the object to be modified * @param str the string * @param length the length of the string, or -1 if NUL-terminated - * @draft ICU 69 + * @stable ICU 69 */ U_CAPI void U_EXPORT2 uset_complementString(USet *set, const UChar *str, int32_t length); @@ -778,11 +773,10 @@ uset_complementString(USet *set, const UChar *str, int32_t length); * @param set the object to be modified * @param str the string * @param length the length of the string, or -1 if NUL-terminated - * @draft ICU 69 + * @stable ICU 69 */ U_CAPI void U_EXPORT2 uset_complementAllCodePoints(USet *set, const UChar *str, int32_t length); -#endif // U_HIDE_DRAFT_API /** * Complements in this set all elements contained in the specified diff --git a/thirdparty/icu4c/common/unicode/uvernum.h b/thirdparty/icu4c/common/unicode/uvernum.h index 42e8865d7e..2706e0b060 100644 --- a/thirdparty/icu4c/common/unicode/uvernum.h +++ b/thirdparty/icu4c/common/unicode/uvernum.h @@ -60,7 +60,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION_MAJOR_NUM 70 +#define U_ICU_VERSION_MAJOR_NUM 71 /** The current ICU minor version as an integer. * This value will change in the subsequent releases of ICU @@ -86,7 +86,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ -#define U_ICU_VERSION_SUFFIX _70 +#define U_ICU_VERSION_SUFFIX _71 /** * \def U_DEF2_ICU_ENTRY_POINT_RENAME @@ -139,7 +139,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION "70.1" +#define U_ICU_VERSION "71.1" /** * The current ICU library major version number as a string, for library name suffixes. @@ -152,13 +152,13 @@ * * @stable ICU 2.6 */ -#define U_ICU_VERSION_SHORT "70" +#define U_ICU_VERSION_SHORT "71" #ifndef U_HIDE_INTERNAL_API /** Data version in ICU4C. * @internal ICU 4.4 Internal Use Only **/ -#define U_ICU_DATA_VERSION "70.1" +#define U_ICU_DATA_VERSION "71.1" #endif /* U_HIDE_INTERNAL_API */ /*=========================================================================== diff --git a/thirdparty/icu4c/common/unistr.cpp b/thirdparty/icu4c/common/unistr.cpp index 077b4d6ef2..c18665928d 100644 --- a/thirdparty/icu4c/common/unistr.cpp +++ b/thirdparty/icu4c/common/unistr.cpp @@ -334,7 +334,8 @@ Replaceable::clone() const { // UnicodeString overrides clone() with a real implementation UnicodeString * UnicodeString::clone() const { - return new UnicodeString(*this); + LocalPointer<UnicodeString> clonedString(new UnicodeString(*this)); + return clonedString.isValid() && !clonedString->isBogus() ? clonedString.orphan() : nullptr; } //======================================== @@ -1976,7 +1977,12 @@ The vector deleting destructor is already a part of UObject, but defining it here makes sure that it is included with this object file. This makes sure that static library dependencies are kept to a minimum. */ +#if defined(__clang__) || U_GCC_MAJOR_MINOR >= 1100 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" static void uprv_UnicodeStringDummy(void) { delete [] (new UnicodeString[2]); } +#pragma GCC diagnostic pop +#endif #endif diff --git a/thirdparty/icu4c/common/ustrcase.cpp b/thirdparty/icu4c/common/ustrcase.cpp index 36b19e75f2..43910ea520 100644 --- a/thirdparty/icu4c/common/ustrcase.cpp +++ b/thirdparty/icu4c/common/ustrcase.cpp @@ -36,6 +36,12 @@ #include "ustr_imp.h" #include "uassert.h" +/** + * Code point for COMBINING ACUTE ACCENT + * @internal + */ +#define ACUTE u'\u0301' + U_NAMESPACE_BEGIN namespace { @@ -396,6 +402,94 @@ U_NAMESPACE_USE #if !UCONFIG_NO_BREAK_ITERATION +namespace { + +/** + * Input: c is a letter I with or without acute accent. + * start is the index in src after c, and is less than segmentLimit. + * If a plain i/I is followed by a plain j/J, + * or an i/I with acute (precomposed or decomposed) is followed by a j/J with acute, + * then we output accordingly. + * + * @return the src index after the titlecased sequence, or the start index if no Dutch IJ + */ +int32_t maybeTitleDutchIJ(const UChar *src, UChar32 c, int32_t start, int32_t segmentLimit, + UChar *dest, int32_t &destIndex, int32_t destCapacity, uint32_t options, + icu::Edits *edits) { + U_ASSERT(start < segmentLimit); + + int32_t index = start; + bool withAcute = false; + + // If the conditions are met, then the following variables tell us what to output. + int32_t unchanged1 = 0; // code units before the j, or the whole sequence (0..3) + bool doTitleJ = false; // true if the j needs to be titlecased + int32_t unchanged2 = 0; // after the j (0 or 1) + + // next character after the first letter + UChar c2 = src[index++]; + + // Is the first letter an i/I with accent? + if (c == u'I') { + if (c2 == ACUTE) { + withAcute = true; + unchanged1 = 1; + if (index == segmentLimit) { return start; } + c2 = src[index++]; + } + } else { // à + withAcute = true; + } + + // Is the next character a j/J? + if (c2 == u'j') { + doTitleJ = true; + } else if (c2 == u'J') { + ++unchanged1; + } else { + return start; + } + + // A plain i/I must be followed by a plain j/J. + // An i/I with acute must be followed by a j/J with acute. + if (withAcute) { + if (index == segmentLimit || src[index++] != ACUTE) { return start; } + if (doTitleJ) { + unchanged2 = 1; + } else { + ++unchanged1; + } + } + + // There must not be another combining mark. + if (index < segmentLimit) { + int32_t cp; + int32_t i = index; + U16_NEXT(src, i, segmentLimit, cp); + uint32_t typeMask = U_GET_GC_MASK(cp); + if ((typeMask & U_GC_M_MASK) != 0) { + return start; + } + } + + // Output the rest of the Dutch IJ. + destIndex = appendUnchanged(dest, destIndex, destCapacity, src + start, unchanged1, options, edits); + start += unchanged1; + if (doTitleJ) { + destIndex = appendUChar(dest, destIndex, destCapacity, u'J'); + if (edits != nullptr) { + edits->addReplace(1, 1); + } + ++start; + } + destIndex = appendUnchanged(dest, destIndex, destCapacity, src + start, unchanged2, options, edits); + + U_ASSERT(start + unchanged2 == index); + return index; +} + +} // namespace + U_CFUNC int32_t U_CALLCONV ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *iter, UChar *dest, int32_t destCapacity, @@ -412,14 +506,14 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it csc.limit=srcLength; int32_t destIndex=0; int32_t prev=0; - UBool isFirstIndex=TRUE; + bool isFirstIndex=true; /* titlecasing loop */ while(prev<srcLength) { /* find next index where to titlecase */ int32_t index; if(isFirstIndex) { - isFirstIndex=FALSE; + isFirstIndex=false; index=iter->first(); } else { index=iter->next(); @@ -446,7 +540,7 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it // Stop with titleStart<titleLimit<=index // if there is a character to be titlecased, // or else stop with titleStart==titleLimit==index. - UBool toCased = (options&U_TITLECASE_ADJUST_TO_CASED) != 0; + bool toCased = (options&U_TITLECASE_ADJUST_TO_CASED) != 0; while (toCased ? UCASE_NONE==ucase_getType(c) : !ustrcase_isLNS(c)) { titleStart=titleLimit; if(titleLimit==index) { @@ -479,27 +573,15 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it /* Special case Dutch IJ titlecasing */ if (titleStart+1 < index && - caseLocale == UCASE_LOC_DUTCH && - (src[titleStart] == 0x0049 || src[titleStart] == 0x0069)) { - if (src[titleStart+1] == 0x006A) { - destIndex=appendUChar(dest, destIndex, destCapacity, 0x004A); - if(destIndex<0) { - errorCode=U_INDEX_OUTOFBOUNDS_ERROR; - return 0; - } - if(edits!=NULL) { - edits->addReplace(1, 1); - } - titleLimit++; - } else if (src[titleStart+1] == 0x004A) { - // Keep the capital J from getting lowercased. - destIndex=appendUnchanged(dest, destIndex, destCapacity, - src+titleStart+1, 1, options, edits); - if(destIndex<0) { - errorCode=U_INDEX_OUTOFBOUNDS_ERROR; - return 0; - } - titleLimit++; + caseLocale == UCASE_LOC_DUTCH) { + if (c < 0) { + c = ~c; + } + + if (c == u'I' || c == u'Ã') { + titleLimit = maybeTitleDutchIJ(src, c, titleStart + 1, index, + dest, destIndex, destCapacity, options, + edits); } } diff --git a/thirdparty/icu4c/common/uvector.cpp b/thirdparty/icu4c/common/uvector.cpp index 4da8b864e1..844463921e 100644 --- a/thirdparty/icu4c/common/uvector.cpp +++ b/thirdparty/icu4c/common/uvector.cpp @@ -99,14 +99,6 @@ bool UVector::operator==(const UVector& other) const { return true; } -// TODO: delete this function once all call sites have been migrated to the -// new addElement(). -void UVector::addElementX(void* obj, UErrorCode &status) { - if (ensureCapacityX(count + 1, status)) { - elements[count++].pointer = obj; - } -} - void UVector::addElement(void* obj, UErrorCode &status) { U_ASSERT(deleter == nullptr); if (ensureCapacity(count + 1, status)) { @@ -331,38 +323,6 @@ int32_t UVector::indexOf(UElement key, int32_t startIndex, int8_t hint) const { return -1; } -UBool UVector::ensureCapacityX(int32_t minimumCapacity, UErrorCode &status) { - if (minimumCapacity < 0) { - status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; - } - if (capacity < minimumCapacity) { - if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check - status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; - } - int32_t newCap = capacity * 2; - if (newCap < minimumCapacity) { - newCap = minimumCapacity; - } - if (newCap > (int32_t)(INT32_MAX / sizeof(UElement))) { // integer overflow check - // We keep the original memory contents on bad minimumCapacity. - status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; - } - UElement* newElems = (UElement *)uprv_realloc(elements, sizeof(UElement)*newCap); - if (newElems == nullptr) { - // We keep the original contents on the memory failure on realloc or bad minimumCapacity. - status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; - } - elements = newElems; - capacity = newCap; - } - return TRUE; -} - - UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) { if (U_FAILURE(status)) { return false; @@ -370,7 +330,7 @@ UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) { if (minimumCapacity < 0) { status = U_ILLEGAL_ARGUMENT_ERROR; return false; - } + } if (capacity < minimumCapacity) { if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check status = U_ILLEGAL_ARGUMENT_ERROR; @@ -396,6 +356,7 @@ UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) { } return true; } + /** * Change the size of this vector as follows: If newSize is smaller, * then truncate the array, possibly deleting held elements for i >= diff --git a/thirdparty/icu4c/common/uvector.h b/thirdparty/icu4c/common/uvector.h index f61fcc2be6..1eb7d136e7 100644 --- a/thirdparty/icu4c/common/uvector.h +++ b/thirdparty/icu4c/common/uvector.h @@ -123,12 +123,6 @@ public: // java.util.Vector API //------------------------------------------------------------ - /* - * Old version of addElement, with non-standard error handling. - * Will be removed once all uses have been switched to the new addElement(). - */ - void addElementX(void* obj, UErrorCode &status); - /** * Add an element at the end of the vector. * For use only with vectors that do not adopt their elements, which is to say, @@ -197,12 +191,6 @@ public: inline UBool isEmpty(void) const {return count == 0;} - /* - * Old version of ensureCapacity, with non-standard error handling. - * Will be removed once all uses have been switched to the new ensureCapacity(). - */ - UBool ensureCapacityX(int32_t minimumCapacity, UErrorCode &status); - UBool ensureCapacity(int32_t minimumCapacity, UErrorCode &status); /** diff --git a/thirdparty/icu4c/common/uvectr32.cpp b/thirdparty/icu4c/common/uvectr32.cpp index a77ecb689f..2b4d0b8a75 100644 --- a/thirdparty/icu4c/common/uvectr32.cpp +++ b/thirdparty/icu4c/common/uvectr32.cpp @@ -83,7 +83,7 @@ void UVector32::assign(const UVector32& other, UErrorCode &ec) { } -bool UVector32::operator==(const UVector32& other) { +bool UVector32::operator==(const UVector32& other) const { int32_t i; if (count != other.count) return false; for (i=0; i<count; ++i) { diff --git a/thirdparty/icu4c/common/uvectr32.h b/thirdparty/icu4c/common/uvectr32.h index f08c2ade76..ecefb7af3e 100644 --- a/thirdparty/icu4c/common/uvectr32.h +++ b/thirdparty/icu4c/common/uvectr32.h @@ -86,12 +86,12 @@ public: * equal if they are of the same size and all elements are equal, * as compared using this object's comparer. */ - bool operator==(const UVector32& other); + bool operator==(const UVector32& other) const; /** * Equivalent to !operator==() */ - inline bool operator!=(const UVector32& other); + inline bool operator!=(const UVector32& other) const; //------------------------------------------------------------ // java.util.Vector API @@ -268,7 +268,7 @@ inline int32_t UVector32::lastElementi(void) const { return elementAti(count-1); } -inline bool UVector32::operator!=(const UVector32& other) { +inline bool UVector32::operator!=(const UVector32& other) const { return !operator==(other); } diff --git a/thirdparty/icu4c/icudt70l.dat b/thirdparty/icu4c/icudt71l.dat Binary files differindex 7932bc2ccd..4c2c1c4d16 100644 --- a/thirdparty/icu4c/icudt70l.dat +++ b/thirdparty/icu4c/icudt71l.dat diff --git a/thirdparty/meshoptimizer/allocator.cpp b/thirdparty/meshoptimizer/allocator.cpp index da7cc540b2..072e8e51ac 100644 --- a/thirdparty/meshoptimizer/allocator.cpp +++ b/thirdparty/meshoptimizer/allocator.cpp @@ -1,7 +1,7 @@ // This file is part of meshoptimizer library; see meshoptimizer.h for version/license details #include "meshoptimizer.h" -void meshopt_setAllocator(void* (*allocate)(size_t), void (*deallocate)(void*)) +void meshopt_setAllocator(void* (MESHOPTIMIZER_ALLOC_CALLCONV *allocate)(size_t), void (MESHOPTIMIZER_ALLOC_CALLCONV *deallocate)(void*)) { meshopt_Allocator::Storage::allocate = allocate; meshopt_Allocator::Storage::deallocate = deallocate; diff --git a/thirdparty/meshoptimizer/meshoptimizer.h b/thirdparty/meshoptimizer/meshoptimizer.h index a420eb1098..463fad29da 100644 --- a/thirdparty/meshoptimizer/meshoptimizer.h +++ b/thirdparty/meshoptimizer/meshoptimizer.h @@ -1,5 +1,5 @@ /** - * meshoptimizer - version 0.16 + * meshoptimizer - version 0.17 * * Copyright (C) 2016-2021, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) * Report bugs and download new versions at https://github.com/zeux/meshoptimizer @@ -12,13 +12,22 @@ #include <stddef.h> /* Version macro; major * 1000 + minor * 10 + patch */ -#define MESHOPTIMIZER_VERSION 160 /* 0.16 */ +#define MESHOPTIMIZER_VERSION 170 /* 0.17 */ /* If no API is defined, assume default */ #ifndef MESHOPTIMIZER_API #define MESHOPTIMIZER_API #endif +/* Set the calling-convention for alloc/dealloc function pointers */ +#ifndef MESHOPTIMIZER_ALLOC_CALLCONV +#ifdef _MSC_VER +#define MESHOPTIMIZER_ALLOC_CALLCONV __cdecl +#else +#define MESHOPTIMIZER_ALLOC_CALLCONV +#endif +#endif + /* Experimental APIs have unstable interface and might have implementation that's not fully tested or optimized */ #define MESHOPTIMIZER_EXPERIMENTAL MESHOPTIMIZER_API @@ -108,7 +117,7 @@ MESHOPTIMIZER_API void meshopt_generateShadowIndexBufferMulti(unsigned int* dest * destination must contain enough space for the resulting index buffer (index_count*2 elements) * vertex_positions should have float3 position in the first 12 bytes of each vertex - similar to glVertexPointer */ -MESHOPTIMIZER_EXPERIMENTAL void meshopt_generateAdjacencyIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); +MESHOPTIMIZER_API void meshopt_generateAdjacencyIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); /** * Generate index buffer that can be used for PN-AEN tessellation with crack-free displacement @@ -124,7 +133,7 @@ MESHOPTIMIZER_EXPERIMENTAL void meshopt_generateAdjacencyIndexBuffer(unsigned in * destination must contain enough space for the resulting index buffer (index_count*4 elements) * vertex_positions should have float3 position in the first 12 bytes of each vertex - similar to glVertexPointer */ -MESHOPTIMIZER_EXPERIMENTAL void meshopt_generateTessellationIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); +MESHOPTIMIZER_API void meshopt_generateTessellationIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); /** * Vertex transform cache optimizer @@ -201,10 +210,10 @@ MESHOPTIMIZER_API size_t meshopt_encodeIndexBuffer(unsigned char* buffer, size_t MESHOPTIMIZER_API size_t meshopt_encodeIndexBufferBound(size_t index_count, size_t vertex_count); /** - * Experimental: Set index encoder format version + * Set index encoder format version * version must specify the data format version to encode; valid values are 0 (decodable by all library versions) and 1 (decodable by 0.14+) */ -MESHOPTIMIZER_EXPERIMENTAL void meshopt_encodeIndexVersion(int version); +MESHOPTIMIZER_API void meshopt_encodeIndexVersion(int version); /** * Index buffer decoder @@ -217,15 +226,15 @@ MESHOPTIMIZER_EXPERIMENTAL void meshopt_encodeIndexVersion(int version); MESHOPTIMIZER_API int meshopt_decodeIndexBuffer(void* destination, size_t index_count, size_t index_size, const unsigned char* buffer, size_t buffer_size); /** - * Experimental: Index sequence encoder + * Index sequence encoder * Encodes index sequence into an array of bytes that is generally smaller and compresses better compared to original. * Input index sequence can represent arbitrary topology; for triangle lists meshopt_encodeIndexBuffer is likely to be better. * Returns encoded data size on success, 0 on error; the only error condition is if buffer doesn't have enough space * * buffer must contain enough space for the encoded index sequence (use meshopt_encodeIndexSequenceBound to compute worst case size) */ -MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_encodeIndexSequence(unsigned char* buffer, size_t buffer_size, const unsigned int* indices, size_t index_count); -MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_encodeIndexSequenceBound(size_t index_count, size_t vertex_count); +MESHOPTIMIZER_API size_t meshopt_encodeIndexSequence(unsigned char* buffer, size_t buffer_size, const unsigned int* indices, size_t index_count); +MESHOPTIMIZER_API size_t meshopt_encodeIndexSequenceBound(size_t index_count, size_t vertex_count); /** * Index sequence decoder @@ -235,7 +244,7 @@ MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_encodeIndexSequenceBound(size_t index_ * * destination must contain enough space for the resulting index sequence (index_count elements) */ -MESHOPTIMIZER_EXPERIMENTAL int meshopt_decodeIndexSequence(void* destination, size_t index_count, size_t index_size, const unsigned char* buffer, size_t buffer_size); +MESHOPTIMIZER_API int meshopt_decodeIndexSequence(void* destination, size_t index_count, size_t index_size, const unsigned char* buffer, size_t buffer_size); /** * Vertex buffer encoder @@ -250,10 +259,10 @@ MESHOPTIMIZER_API size_t meshopt_encodeVertexBuffer(unsigned char* buffer, size_ MESHOPTIMIZER_API size_t meshopt_encodeVertexBufferBound(size_t vertex_count, size_t vertex_size); /** - * Experimental: Set vertex encoder format version + * Set vertex encoder format version * version must specify the data format version to encode; valid values are 0 (decodable by all library versions) */ -MESHOPTIMIZER_EXPERIMENTAL void meshopt_encodeVertexVersion(int version); +MESHOPTIMIZER_API void meshopt_encodeVertexVersion(int version); /** * Vertex buffer decoder @@ -285,15 +294,15 @@ MESHOPTIMIZER_EXPERIMENTAL void meshopt_decodeFilterExp(void* buffer, size_t cou /** * Vertex buffer filter encoders * These functions can be used to encode data in a format that meshopt_decodeFilter can decode - * + * * meshopt_encodeFilterOct encodes unit vectors with K-bit (K <= 16) signed X/Y as an output. * Each component is stored as an 8-bit or 16-bit normalized integer; stride must be equal to 4 or 8. W is preserved as is. * Input data must contain 4 floats for every vector (count*4 total). - * + * * meshopt_encodeFilterQuat encodes unit quaternions with K-bit (4 <= K <= 16) component encoding. * Each component is stored as an 16-bit integer; stride must be equal to 8. * Input data must contain 4 floats for every quaternion (count*4 total). - * + * * meshopt_encodeFilterExp encodes arbitrary (finite) floating-point data with 8-bit exponent and K-bit integer mantissa (1 <= K <= 24). * Mantissa is shared between all components of a given vector as defined by stride; stride must be divisible by 4. * Input data must contain stride/4 floats for every vector (count*stride/4 total). @@ -353,7 +362,7 @@ MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_simplifyPoints(unsigned int* destinati /** * Experimental: Returns the error scaling factor used by the simplifier to convert between absolute and relative extents - * + * * Absolute error must be *divided* by the scaling factor before passing it to meshopt_simplify as target_error * Relative error returned by meshopt_simplify via result_error must be *multiplied* by the scaling factor to get absolute error. */ @@ -438,7 +447,7 @@ struct meshopt_Meshlet }; /** - * Experimental: Meshlet builder + * Meshlet builder * Splits the mesh into a set of meshlets where each meshlet has a micro index buffer indexing into meshlet vertices that refer to the original vertex buffer * The resulting data can be used to render meshes using NVidia programmable mesh shading pipeline, or in other cluster-based renderers. * When using buildMeshlets, vertex positions need to be provided to minimize the size of the resulting clusters. @@ -451,9 +460,9 @@ struct meshopt_Meshlet * max_vertices and max_triangles must not exceed implementation limits (max_vertices <= 255 - not 256!, max_triangles <= 512) * cone_weight should be set to 0 when cone culling is not used, and a value between 0 and 1 otherwise to balance between cluster size and cone culling efficiency */ -MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_buildMeshlets(struct meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t max_triangles, float cone_weight); -MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_buildMeshletsScan(struct meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const unsigned int* indices, size_t index_count, size_t vertex_count, size_t max_vertices, size_t max_triangles); -MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_buildMeshletsBound(size_t index_count, size_t max_vertices, size_t max_triangles); +MESHOPTIMIZER_API size_t meshopt_buildMeshlets(struct meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t max_triangles, float cone_weight); +MESHOPTIMIZER_API size_t meshopt_buildMeshletsScan(struct meshopt_Meshlet* meshlets, unsigned int* meshlet_vertices, unsigned char* meshlet_triangles, const unsigned int* indices, size_t index_count, size_t vertex_count, size_t max_vertices, size_t max_triangles); +MESHOPTIMIZER_API size_t meshopt_buildMeshletsBound(size_t index_count, size_t max_vertices, size_t max_triangles); struct meshopt_Bounds { @@ -472,7 +481,7 @@ struct meshopt_Bounds }; /** - * Experimental: Cluster bounds generator + * Cluster bounds generator * Creates bounding volumes that can be used for frustum, backface and occlusion culling. * * For backface culling with orthographic projection, use the following formula to reject backfacing clusters: @@ -492,8 +501,8 @@ struct meshopt_Bounds * vertex_positions should have float3 position in the first 12 bytes of each vertex - similar to glVertexPointer * index_count/3 should be less than or equal to 512 (the function assumes clusters of limited size) */ -MESHOPTIMIZER_EXPERIMENTAL struct meshopt_Bounds meshopt_computeClusterBounds(const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); -MESHOPTIMIZER_EXPERIMENTAL struct meshopt_Bounds meshopt_computeMeshletBounds(const unsigned int* meshlet_vertices, const unsigned char* meshlet_triangles, size_t triangle_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); +MESHOPTIMIZER_API struct meshopt_Bounds meshopt_computeClusterBounds(const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); +MESHOPTIMIZER_API struct meshopt_Bounds meshopt_computeMeshletBounds(const unsigned int* meshlet_vertices, const unsigned char* meshlet_triangles, size_t triangle_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride); /** * Experimental: Spatial sorter @@ -519,7 +528,7 @@ MESHOPTIMIZER_EXPERIMENTAL void meshopt_spatialSortTriangles(unsigned int* desti * Note that all algorithms only allocate memory for temporary use. * allocate/deallocate are always called in a stack-like order - last pointer to be allocated is deallocated first. */ -MESHOPTIMIZER_API void meshopt_setAllocator(void* (*allocate)(size_t), void (*deallocate)(void*)); +MESHOPTIMIZER_API void meshopt_setAllocator(void* (MESHOPTIMIZER_ALLOC_CALLCONV *allocate)(size_t), void (MESHOPTIMIZER_ALLOC_CALLCONV *deallocate)(void*)); #ifdef __cplusplus } /* extern "C" */ @@ -701,8 +710,8 @@ public: template <typename T> struct StorageT { - static void* (*allocate)(size_t); - static void (*deallocate)(void*); + static void* (MESHOPTIMIZER_ALLOC_CALLCONV *allocate)(size_t); + static void (MESHOPTIMIZER_ALLOC_CALLCONV *deallocate)(void*); }; typedef StorageT<void> Storage; @@ -733,8 +742,8 @@ private: }; // This makes sure that allocate/deallocate are lazily generated in translation units that need them and are deduplicated by the linker -template <typename T> void* (*meshopt_Allocator::StorageT<T>::allocate)(size_t) = operator new; -template <typename T> void (*meshopt_Allocator::StorageT<T>::deallocate)(void*) = operator delete; +template <typename T> void* (MESHOPTIMIZER_ALLOC_CALLCONV *meshopt_Allocator::StorageT<T>::allocate)(size_t) = operator new; +template <typename T> void (MESHOPTIMIZER_ALLOC_CALLCONV *meshopt_Allocator::StorageT<T>::deallocate)(void*) = operator delete; #endif /* Inline implementation for C++ templated wrappers */ diff --git a/thirdparty/meshoptimizer/patches/attribute-aware-simplify-distance-only-metric.patch b/thirdparty/meshoptimizer/patches/attribute-aware-simplify-distance-only-metric.patch index 54132a6c86..213f35dd69 100644 --- a/thirdparty/meshoptimizer/patches/attribute-aware-simplify-distance-only-metric.patch +++ b/thirdparty/meshoptimizer/patches/attribute-aware-simplify-distance-only-metric.patch @@ -1,5 +1,5 @@ diff --git a/thirdparty/meshoptimizer/simplifier.cpp b/thirdparty/meshoptimizer/simplifier.cpp -index 0f10ebef4b..cf5db4e119 100644 +index e384046ffe..ccc99edb1a 100644 --- a/thirdparty/meshoptimizer/simplifier.cpp +++ b/thirdparty/meshoptimizer/simplifier.cpp @@ -20,7 +20,7 @@ diff --git a/thirdparty/meshoptimizer/patches/attribute-aware-simplify.patch b/thirdparty/meshoptimizer/patches/attribute-aware-simplify.patch index cf648b0da3..51a424765e 100644 --- a/thirdparty/meshoptimizer/patches/attribute-aware-simplify.patch +++ b/thirdparty/meshoptimizer/patches/attribute-aware-simplify.patch @@ -1,8 +1,8 @@ diff --git a/thirdparty/meshoptimizer/meshoptimizer.h b/thirdparty/meshoptimizer/meshoptimizer.h -index fe8d349731..e44b99ce52 100644 +index be4b765d97..463fad29da 100644 --- a/thirdparty/meshoptimizer/meshoptimizer.h +++ b/thirdparty/meshoptimizer/meshoptimizer.h -@@ -298,6 +298,11 @@ MESHOPTIMIZER_EXPERIMENTAL void meshopt_decodeFilterExp(void* buffer, size_t ver +@@ -328,6 +328,11 @@ MESHOPTIMIZER_EXPERIMENTAL void meshopt_encodeFilterExp(void* destination, size_ */ MESHOPTIMIZER_EXPERIMENTAL size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t target_index_count, float target_error, float* result_error); @@ -13,9 +13,9 @@ index fe8d349731..e44b99ce52 100644 + /** * Experimental: Mesh simplifier (sloppy) - * Reduces the number of triangles in the mesh, sacrificing mesh apperance for simplification performance + * Reduces the number of triangles in the mesh, sacrificing mesh appearance for simplification performance diff --git a/thirdparty/meshoptimizer/simplifier.cpp b/thirdparty/meshoptimizer/simplifier.cpp -index b2cb589462..059cabb055 100644 +index bf1431269d..e384046ffe 100644 --- a/thirdparty/meshoptimizer/simplifier.cpp +++ b/thirdparty/meshoptimizer/simplifier.cpp @@ -20,6 +20,8 @@ @@ -27,7 +27,7 @@ index b2cb589462..059cabb055 100644 // This work is based on: // Michael Garland and Paul S. Heckbert. Surface simplification using quadric error metrics. 1997 // Michael Garland. Quadric-based polygonal surface simplification. 1999 -@@ -358,6 +360,10 @@ static void classifyVertices(unsigned char* result, unsigned int* loop, unsigned +@@ -363,6 +365,10 @@ static void classifyVertices(unsigned char* result, unsigned int* loop, unsigned struct Vector3 { float x, y, z; @@ -38,7 +38,7 @@ index b2cb589462..059cabb055 100644 }; static float rescalePositions(Vector3* result, const float* vertex_positions_data, size_t vertex_count, size_t vertex_positions_stride) -@@ -414,6 +420,13 @@ struct Quadric +@@ -419,6 +425,13 @@ struct Quadric float a10, a20, a21; float b0, b1, b2, c; float w; @@ -52,7 +52,7 @@ index b2cb589462..059cabb055 100644 }; struct Collapse -@@ -456,6 +469,16 @@ static void quadricAdd(Quadric& Q, const Quadric& R) +@@ -461,6 +474,16 @@ static void quadricAdd(Quadric& Q, const Quadric& R) Q.b2 += R.b2; Q.c += R.c; Q.w += R.w; @@ -69,7 +69,7 @@ index b2cb589462..059cabb055 100644 } static float quadricError(const Quadric& Q, const Vector3& v) -@@ -481,6 +504,17 @@ static float quadricError(const Quadric& Q, const Vector3& v) +@@ -486,6 +509,17 @@ static float quadricError(const Quadric& Q, const Vector3& v) r += ry * v.y; r += rz * v.z; @@ -87,7 +87,7 @@ index b2cb589462..059cabb055 100644 float s = Q.w == 0.f ? 0.f : 1.f / Q.w; return fabsf(r) * s; -@@ -504,6 +538,13 @@ static void quadricFromPlane(Quadric& Q, float a, float b, float c, float d, flo +@@ -509,6 +543,13 @@ static void quadricFromPlane(Quadric& Q, float a, float b, float c, float d, flo Q.b2 = c * dw; Q.c = d * dw; Q.w = w; @@ -101,7 +101,7 @@ index b2cb589462..059cabb055 100644 } static void quadricFromPoint(Quadric& Q, float x, float y, float z, float w) -@@ -556,6 +597,84 @@ static void quadricFromTriangleEdge(Quadric& Q, const Vector3& p0, const Vector3 +@@ -561,6 +602,84 @@ static void quadricFromTriangleEdge(Quadric& Q, const Vector3& p0, const Vector3 quadricFromPlane(Q, normal.x, normal.y, normal.z, -distance, length * weight); } @@ -186,7 +186,7 @@ index b2cb589462..059cabb055 100644 static void fillFaceQuadrics(Quadric* vertex_quadrics, const unsigned int* indices, size_t index_count, const Vector3* vertex_positions, const unsigned int* remap) { for (size_t i = 0; i < index_count; i += 3) -@@ -567,6 +686,9 @@ static void fillFaceQuadrics(Quadric* vertex_quadrics, const unsigned int* indic +@@ -572,6 +691,9 @@ static void fillFaceQuadrics(Quadric* vertex_quadrics, const unsigned int* indic Quadric Q; quadricFromTriangle(Q, vertex_positions[i0], vertex_positions[i1], vertex_positions[i2], 1.f); @@ -196,7 +196,7 @@ index b2cb589462..059cabb055 100644 quadricAdd(vertex_quadrics[remap[i0]], Q); quadricAdd(vertex_quadrics[remap[i1]], Q); quadricAdd(vertex_quadrics[remap[i2]], Q); -@@ -1259,13 +1381,19 @@ unsigned int* meshopt_simplifyDebugLoopBack = 0; +@@ -1265,13 +1387,19 @@ MESHOPTIMIZER_API unsigned int* meshopt_simplifyDebugLoopBack = 0; #endif size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, size_t index_count, const float* vertex_positions_data, size_t vertex_count, size_t vertex_positions_stride, size_t target_index_count, float target_error, float* out_result_error) @@ -218,7 +218,7 @@ index b2cb589462..059cabb055 100644 meshopt_Allocator allocator; -@@ -1279,7 +1407,7 @@ size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, +@@ -1285,7 +1413,7 @@ size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, // build position remap that maps each vertex to the one with identical position unsigned int* remap = allocator.allocate<unsigned int>(vertex_count); unsigned int* wedge = allocator.allocate<unsigned int>(vertex_count); @@ -227,7 +227,7 @@ index b2cb589462..059cabb055 100644 // classify vertices; vertex kind determines collapse rules, see kCanCollapse unsigned char* vertex_kind = allocator.allocate<unsigned char>(vertex_count); -@@ -1303,7 +1431,21 @@ size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, +@@ -1309,7 +1437,21 @@ size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, #endif Vector3* vertex_positions = allocator.allocate<Vector3>(vertex_count); @@ -250,7 +250,7 @@ index b2cb589462..059cabb055 100644 Quadric* vertex_quadrics = allocator.allocate<Quadric>(vertex_count); memset(vertex_quadrics, 0, vertex_count * sizeof(Quadric)); -@@ -1395,7 +1537,9 @@ size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, +@@ -1401,7 +1543,9 @@ size_t meshopt_simplify(unsigned int* destination, const unsigned int* indices, // result_error is quadratic; we need to remap it back to linear if (out_result_error) diff --git a/thirdparty/misc/polypartition.cpp b/thirdparty/misc/polypartition.cpp index df144c57a6..a725125ed0 100644 --- a/thirdparty/misc/polypartition.cpp +++ b/thirdparty/misc/polypartition.cpp @@ -1357,12 +1357,12 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto // Note that while set doesn't actually have to be implemented as // a tree, complexity requirements for operations are the same as // for the balanced binary search tree. - Set<ScanLineEdge> edgeTree; + RBSet<ScanLineEdge> edgeTree; // Store iterators to the edge tree elements. // This makes deleting existing edges much faster. - Set<ScanLineEdge>::Element **edgeTreeIterators, *edgeIter; - edgeTreeIterators = new Set<ScanLineEdge>::Element *[maxnumvertices]; - //Pair<Set<ScanLineEdge>::iterator, bool> edgeTreeRet; + RBSet<ScanLineEdge>::Element **edgeTreeIterators, *edgeIter; + edgeTreeIterators = new RBSet<ScanLineEdge>::Element *[maxnumvertices]; + //Pair<RBSet<ScanLineEdge>::iterator, bool> edgeTreeRet; for (i = 0; i < numvertices; i++) { edgeTreeIterators[i] = nullptr; } @@ -1569,8 +1569,8 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto // Adds a diagonal to the doubly-connected list of vertices. void TPPLPartition::AddDiagonal(MonotoneVertex *vertices, long *numvertices, long index1, long index2, - TPPLVertexType *vertextypes, Set<ScanLineEdge>::Element **edgeTreeIterators, - Set<ScanLineEdge> *edgeTree, long *helpers) { + TPPLVertexType *vertextypes, RBSet<ScanLineEdge>::Element **edgeTreeIterators, + RBSet<ScanLineEdge> *edgeTree, long *helpers) { long newindex1, newindex2; newindex1 = *numvertices; diff --git a/thirdparty/misc/polypartition.h b/thirdparty/misc/polypartition.h index b2d905a3ef..fae7909079 100644 --- a/thirdparty/misc/polypartition.h +++ b/thirdparty/misc/polypartition.h @@ -26,7 +26,7 @@ #include "core/math/vector2.h" #include "core/templates/list.h" -#include "core/templates/set.h" +#include "core/templates/rb_set.h" typedef double tppl_float; @@ -224,8 +224,8 @@ public: // Helper functions for MonotonePartition. bool Below(TPPLPoint &p1, TPPLPoint &p2); void AddDiagonal(MonotoneVertex *vertices, long *numvertices, long index1, long index2, - TPPLVertexType *vertextypes, Set<ScanLineEdge>::Element **edgeTreeIterators, - Set<ScanLineEdge> *edgeTree, long *helpers); + TPPLVertexType *vertextypes, RBSet<ScanLineEdge>::Element **edgeTreeIterators, + RBSet<ScanLineEdge> *edgeTree, long *helpers); // Triangulates a monotone polygon, used in Triangulate_MONO. int TriangulateMonotone(TPPLPoly *inPoly, TPPLPolyList *triangles); diff --git a/thirdparty/pcre2/AUTHORS b/thirdparty/pcre2/AUTHORS index bec8a1e5ad..11ef898b25 100644 --- a/thirdparty/pcre2/AUTHORS +++ b/thirdparty/pcre2/AUTHORS @@ -8,7 +8,7 @@ Email domain: gmail.com Retired from University of Cambridge Computing Service, Cambridge, England. -Copyright (c) 1997-2021 University of Cambridge +Copyright (c) 1997-2022 University of Cambridge All rights reserved @@ -19,7 +19,7 @@ Written by: Zoltan Herczeg Email local part: hzmester Emain domain: freemail.hu -Copyright(c) 2010-2021 Zoltan Herczeg +Copyright(c) 2010-2022 Zoltan Herczeg All rights reserved. @@ -30,7 +30,7 @@ Written by: Zoltan Herczeg Email local part: hzmester Emain domain: freemail.hu -Copyright(c) 2009-2021 Zoltan Herczeg +Copyright(c) 2009-2022 Zoltan Herczeg All rights reserved. #### diff --git a/thirdparty/pcre2/LICENCE b/thirdparty/pcre2/LICENCE index b1ec61be44..2f3cd5cac5 100644 --- a/thirdparty/pcre2/LICENCE +++ b/thirdparty/pcre2/LICENCE @@ -26,7 +26,7 @@ Email domain: gmail.com Retired from University of Cambridge Computing Service, Cambridge, England. -Copyright (c) 1997-2021 University of Cambridge +Copyright (c) 1997-2022 University of Cambridge All rights reserved. @@ -37,7 +37,7 @@ Written by: Zoltan Herczeg Email local part: hzmester Email domain: freemail.hu -Copyright(c) 2010-2021 Zoltan Herczeg +Copyright(c) 2010-2022 Zoltan Herczeg All rights reserved. @@ -48,7 +48,7 @@ Written by: Zoltan Herczeg Email local part: hzmester Email domain: freemail.hu -Copyright(c) 2009-2021 Zoltan Herczeg +Copyright(c) 2009-2022 Zoltan Herczeg All rights reserved. diff --git a/thirdparty/pcre2/patches/sljit-macos11-conditional.patch b/thirdparty/pcre2/patches/sljit-macos11-conditional.patch new file mode 100644 index 0000000000..def1207a3d --- /dev/null +++ b/thirdparty/pcre2/patches/sljit-macos11-conditional.patch @@ -0,0 +1,31 @@ +From de8fc816bc6698ab97316ed954e133e7e5098262 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= <carenas@gmail.com> +Date: Thu, 21 Apr 2022 21:01:12 -0700 +Subject: [PATCH] macos: somehow allow building with a target below 11.0 + +While building for macOS older than 11 in Apple Silicon makes no +sense, some build systems lack the flexibility to set a target per +architecture while aiming to support multi architecture binaries. + +Allow an option in those cases by using the slower runtime checks +if the toolchain allows it. + +Fixes: PCRE2Project/pcre2#109 +--- + sljit_src/sljitExecAllocator.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sljit_src/sljitExecAllocator.c b/sljit_src/sljitExecAllocator.c +index 92d940dd..6359848c 100644 +--- a/sljit_src/sljitExecAllocator.c ++++ b/sljit_src/sljitExecAllocator.c +@@ -152,6 +152,9 @@ static SLJIT_INLINE void apple_update_wx_flags(sljit_s32 enable_exec) + { + #if MAC_OS_X_VERSION_MIN_REQUIRED >= 110000 + pthread_jit_write_protect_np(enable_exec); ++#elif defined(__clang__) ++ if (__builtin_available(macOS 11.0, *)) ++ pthread_jit_write_protect_np(enable_exec); + #else + #error "Must target Big Sur or newer" + #endif /* BigSur */ diff --git a/thirdparty/pcre2/src/config.h b/thirdparty/pcre2/src/config.h index a13593715e..76dc5868b1 100644 --- a/thirdparty/pcre2/src/config.h +++ b/thirdparty/pcre2/src/config.h @@ -97,6 +97,9 @@ sure both macros are undefined; an emulation function will then be used. */ /* Have PTHREAD_PRIO_INHERIT. */ /* #undef HAVE_PTHREAD_PRIO_INHERIT */ +/* Define to 1 if you have the <readline.h> header file. */ +/* #undef HAVE_READLINE_H */ + /* Define to 1 if you have the <readline/history.h> header file. */ /* #undef HAVE_READLINE_HISTORY_H */ @@ -233,7 +236,7 @@ sure both macros are undefined; an emulation function will then be used. */ #define PACKAGE_NAME "PCRE2" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PCRE2 10.39" +#define PACKAGE_STRING "PCRE2 10.40" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pcre2" @@ -242,7 +245,7 @@ sure both macros are undefined; an emulation function will then be used. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "10.39" +#define PACKAGE_VERSION "10.40" /* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested parentheses (of any kind) in a pattern. This limits the amount of system @@ -435,7 +438,7 @@ sure both macros are undefined; an emulation function will then be used. */ #endif /* Version number of package */ -#define VERSION "10.39" +#define VERSION "10.40" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/thirdparty/pcre2/src/pcre2.h b/thirdparty/pcre2/src/pcre2.h index 90a97d9cb7..8adcede57c 100644 --- a/thirdparty/pcre2/src/pcre2.h +++ b/thirdparty/pcre2/src/pcre2.h @@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE. /* The current PCRE version information. */ #define PCRE2_MAJOR 10 -#define PCRE2_MINOR 39 +#define PCRE2_MINOR 40 #define PCRE2_PRERELEASE -#define PCRE2_DATE 2021-10-29 +#define PCRE2_DATE 2022-04-14 /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE2, the appropriate diff --git a/thirdparty/pcre2/src/pcre2_auto_possess.c b/thirdparty/pcre2/src/pcre2_auto_possess.c index e5e0895682..419fd49001 100644 --- a/thirdparty/pcre2/src/pcre2_auto_possess.c +++ b/thirdparty/pcre2/src/pcre2_auto_possess.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2021 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -123,18 +123,21 @@ opcode is used to select the column. The values are as follows: */ static const uint8_t propposstab[PT_TABSIZE][PT_TABSIZE] = { -/* ANY LAMP GC PC SC ALNUM SPACE PXSPACE WORD CLIST UCNC */ - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_ANY */ - { 0, 3, 0, 0, 0, 3, 1, 1, 0, 0, 0 }, /* PT_LAMP */ - { 0, 0, 2, 4, 0, 9, 10, 10, 11, 0, 0 }, /* PT_GC */ - { 0, 0, 5, 2, 0, 15, 16, 16, 17, 0, 0 }, /* PT_PC */ - { 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 }, /* PT_SC */ - { 0, 3, 6, 12, 0, 3, 1, 1, 0, 0, 0 }, /* PT_ALNUM */ - { 0, 1, 7, 13, 0, 1, 3, 3, 1, 0, 0 }, /* PT_SPACE */ - { 0, 1, 7, 13, 0, 1, 3, 3, 1, 0, 0 }, /* PT_PXSPACE */ - { 0, 0, 8, 14, 0, 0, 1, 1, 3, 0, 0 }, /* PT_WORD */ - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_CLIST */ - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 } /* PT_UCNC */ +/* ANY LAMP GC PC SC SCX ALNUM SPACE PXSPACE WORD CLIST UCNC BIDICL BOOL */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_ANY */ + { 0, 3, 0, 0, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, /* PT_LAMP */ + { 0, 0, 2, 4, 0, 0, 9, 10, 10, 11, 0, 0, 0, 0 }, /* PT_GC */ + { 0, 0, 5, 2, 0, 0, 15, 16, 16, 17, 0, 0, 0, 0 }, /* PT_PC */ + { 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_SC */ + { 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_SCX */ + { 0, 3, 6, 12, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, /* PT_ALNUM */ + { 0, 1, 7, 13, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0 }, /* PT_SPACE */ + { 0, 1, 7, 13, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0 }, /* PT_PXSPACE */ + { 0, 0, 8, 14, 0, 0, 0, 1, 1, 3, 0, 0, 0, 0 }, /* PT_WORD */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_CLIST */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 }, /* PT_UCNC */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_BIDICL */ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* PT_BOOL */ }; /* This table is used to check whether auto-possessification is possible @@ -196,6 +199,7 @@ static BOOL check_char_prop(uint32_t c, unsigned int ptype, unsigned int pdata, BOOL negated) { +BOOL ok; const uint32_t *p; const ucd_record *prop = GET_UCD(c); @@ -215,6 +219,11 @@ switch(ptype) case PT_SC: return (pdata == prop->script) == negated; + case PT_SCX: + ok = (pdata == prop->script + || MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), pdata) != 0); + return ok == negated; + /* These are specials */ case PT_ALNUM: @@ -251,6 +260,14 @@ switch(ptype) if (c == *p++) return negated; } break; /* Control never reaches here */ + + /* Haven't yet thought these through. */ + + case PT_BIDICL: + return FALSE; + + case PT_BOOL: + return FALSE; } return FALSE; diff --git a/thirdparty/pcre2/src/pcre2_compile.c b/thirdparty/pcre2/src/pcre2_compile.c index 383159be76..de259c9c40 100644 --- a/thirdparty/pcre2/src/pcre2_compile.c +++ b/thirdparty/pcre2/src/pcre2_compile.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2021 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -124,7 +124,7 @@ static unsigned int static int compile_regex(uint32_t, PCRE2_UCHAR **, uint32_t **, int *, uint32_t, - uint32_t *, int32_t *, uint32_t *, int32_t *, branch_chain *, + uint32_t *, uint32_t *, uint32_t *, uint32_t *, branch_chain *, compile_block *, PCRE2_SIZE *); static int @@ -385,13 +385,15 @@ compiler is clever with identical subexpressions. */ #define SETBIT(a,b) a[(b)/8] = (uint8_t)(a[(b)/8] | (1u << ((b)&7))) -/* Private flags added to firstcu and reqcu. */ +/* Values and flags for the unsigned xxcuflags variables that accompany xxcu +variables, which are concerned with first and required code units. A value +greater than or equal to REQ_NONE means "no code unit set"; otherwise the +matching xxcu variable is set, and the low valued bits are relevant. */ -#define REQ_CASELESS (1u << 0) /* Indicates caselessness */ -#define REQ_VARY (1u << 1) /* reqcu followed non-literal item */ -/* Negative values for the firstcu and reqcu flags */ -#define REQ_UNSET (-2) /* Not yet found anything */ -#define REQ_NONE (-1) /* Found not fixed char */ +#define REQ_UNSET 0xffffffffu /* Not yet found anything */ +#define REQ_NONE 0xfffffffeu /* Found not fixed character */ +#define REQ_CASELESS 0x00000001u /* Code unit in xxcu is caseless */ +#define REQ_VARY 0x00000002u /* Code unit is followed by non-literal */ /* These flags are used in the groupinfo vector. */ @@ -2088,7 +2090,9 @@ get_ucp(PCRE2_SPTR *ptrptr, BOOL *negptr, uint16_t *ptypeptr, PCRE2_UCHAR c; PCRE2_SIZE i, bot, top; PCRE2_SPTR ptr = *ptrptr; -PCRE2_UCHAR name[32]; +PCRE2_UCHAR name[50]; +PCRE2_UCHAR *vptr = NULL; +uint16_t ptscript = PT_NOTSCRIPT; if (ptr >= cb->end_pattern) goto ERROR_RETURN; c = *ptr++; @@ -2100,36 +2104,95 @@ negation. */ if (c == CHAR_LEFT_CURLY_BRACKET) { if (ptr >= cb->end_pattern) goto ERROR_RETURN; + if (*ptr == CHAR_CIRCUMFLEX_ACCENT) { *negptr = TRUE; ptr++; } + for (i = 0; i < (int)(sizeof(name) / sizeof(PCRE2_UCHAR)) - 1; i++) { if (ptr >= cb->end_pattern) goto ERROR_RETURN; c = *ptr++; + while (c == '_' || c == '-' || isspace(c)) + { + if (ptr >= cb->end_pattern) goto ERROR_RETURN; + c = *ptr++; + } if (c == CHAR_NUL) goto ERROR_RETURN; if (c == CHAR_RIGHT_CURLY_BRACKET) break; - name[i] = c; + name[i] = tolower(c); + if ((c == ':' || c == '=') && vptr == NULL) vptr = name + i; } + if (c != CHAR_RIGHT_CURLY_BRACKET) goto ERROR_RETURN; name[i] = 0; } -/* Otherwise there is just one following character, which must be an ASCII -letter. */ +/* If { doesn't follow \p or \P there is just one following character, which +must be an ASCII letter. */ else if (MAX_255(c) && (cb->ctypes[c] & ctype_letter) != 0) { - name[0] = c; + name[0] = tolower(c); name[1] = 0; } else goto ERROR_RETURN; *ptrptr = ptr; -/* Search for a recognized property name using binary chop. */ +/* If the property contains ':' or '=' we have class name and value separately +specified. The following are supported: + + . Bidi_Class (synonym bc), for which the property names are "bidi<name>". + . Script (synonym sc) for which the property name is the script name + . Script_Extensions (synonym scx), ditto + +As this is a small number, we currently just check the names directly. If this +grows, a sorted table and a switch will be neater. + +For both the script properties, set a PT_xxx value so that (1) they can be +distinguished and (2) invalid script names that happen to be the name of +another property can be diagnosed. */ + +if (vptr != NULL) + { + int offset = 0; + PCRE2_UCHAR sname[8]; + + *vptr = 0; /* Terminate property name */ + if (PRIV(strcmp_c8)(name, STRING_bidiclass) == 0 || + PRIV(strcmp_c8)(name, STRING_bc) == 0) + { + offset = 4; + sname[0] = CHAR_b; + sname[1] = CHAR_i; /* There is no strcpy_c8 function */ + sname[2] = CHAR_d; + sname[3] = CHAR_i; + } + + else if (PRIV(strcmp_c8)(name, STRING_script) == 0 || + PRIV(strcmp_c8)(name, STRING_sc) == 0) + ptscript = PT_SC; + + else if (PRIV(strcmp_c8)(name, STRING_scriptextensions) == 0 || + PRIV(strcmp_c8)(name, STRING_scx) == 0) + ptscript = PT_SCX; + + else + { + *errorcodeptr = ERR47; + return FALSE; + } + + /* Adjust the string in name[] as needed */ + + memmove(name + offset, vptr + 1, (name + i - vptr)*sizeof(PCRE2_UCHAR)); + if (offset != 0) memmove(name, sname, offset*sizeof(PCRE2_UCHAR)); + } + +/* Search for a recognized property using binary chop. */ bot = 0; top = PRIV(utt_size); @@ -2139,15 +2202,37 @@ while (bot < top) int r; i = (bot + top) >> 1; r = PRIV(strcmp_c8)(name, PRIV(utt_names) + PRIV(utt)[i].name_offset); + + /* When a matching property is found, some extra checking is needed when the + \p{xx:yy} syntax is used and xx is either sc or scx. */ + if (r == 0) { - *ptypeptr = PRIV(utt)[i].type; *pdataptr = PRIV(utt)[i].value; - return TRUE; + if (vptr == NULL || ptscript == PT_NOTSCRIPT) + { + *ptypeptr = PRIV(utt)[i].type; + return TRUE; + } + + switch (PRIV(utt)[i].type) + { + case PT_SC: + *ptypeptr = PT_SC; + return TRUE; + + case PT_SCX: + *ptypeptr = ptscript; + return TRUE; + } + + break; /* Non-script found */ } + if (r > 0) bot = i + 1; else top = i; } -*errorcodeptr = ERR47; /* Unrecognized name */ + +*errorcodeptr = ERR47; /* Unrecognized property */ return FALSE; ERROR_RETURN: /* Malformed \P or \p */ @@ -5285,9 +5370,9 @@ Arguments: pptrptr points to the current parsed pattern pointer errorcodeptr points to error code variable firstcuptr place to put the first required code unit - firstcuflagsptr place to put the first code unit flags, or a negative number + firstcuflagsptr place to put the first code unit flags reqcuptr place to put the last required code unit - reqcuflagsptr place to put the last required code unit flags, or a negative number + reqcuflagsptr place to put the last required code unit flags bcptr points to current branch chain cb contains pointers to tables etc. lengthptr NULL during the real compile phase @@ -5300,8 +5385,8 @@ Returns: 0 There's been an error, *errorcodeptr is non-zero static int compile_branch(uint32_t *optionsptr, PCRE2_UCHAR **codeptr, uint32_t **pptrptr, - int *errorcodeptr, uint32_t *firstcuptr, int32_t *firstcuflagsptr, - uint32_t *reqcuptr, int32_t *reqcuflagsptr, branch_chain *bcptr, + int *errorcodeptr, uint32_t *firstcuptr, uint32_t *firstcuflagsptr, + uint32_t *reqcuptr, uint32_t *reqcuflagsptr, branch_chain *bcptr, compile_block *cb, PCRE2_SIZE *lengthptr) { int bravalue = 0; @@ -5316,9 +5401,9 @@ uint32_t zeroreqcu, zerofirstcu; uint32_t escape; uint32_t *pptr = *pptrptr; uint32_t meta, meta_arg; -int32_t firstcuflags, reqcuflags; -int32_t zeroreqcuflags, zerofirstcuflags; -int32_t req_caseopt, reqvary, tempreqvary; +uint32_t firstcuflags, reqcuflags; +uint32_t zeroreqcuflags, zerofirstcuflags; +uint32_t req_caseopt, reqvary, tempreqvary; PCRE2_SIZE offset = 0; PCRE2_SIZE length_prevgroup = 0; PCRE2_UCHAR *code = *codeptr; @@ -5374,13 +5459,13 @@ item types that can be repeated set these backoff variables appropriately. */ firstcu = reqcu = zerofirstcu = zeroreqcu = 0; firstcuflags = reqcuflags = zerofirstcuflags = zeroreqcuflags = REQ_UNSET; -/* The variable req_caseopt contains either the REQ_CASELESS value or zero, +/* The variable req_caseopt contains either the REQ_CASELESS bit or zero, according to the current setting of the caseless flag. The REQ_CASELESS value leaves the lower 28 bit empty. It is added into the firstcu or reqcu variables to record the case status of the value. This is used only for ASCII characters. */ -req_caseopt = ((options & PCRE2_CASELESS) != 0)? REQ_CASELESS:0; +req_caseopt = ((options & PCRE2_CASELESS) != 0)? REQ_CASELESS : 0; /* Switch on next META item until the end of the branch */ @@ -5395,13 +5480,12 @@ for (;; pptr++) BOOL possessive_quantifier; BOOL note_group_empty; int class_has_8bitchar; - int i; uint32_t mclength; uint32_t skipunits; uint32_t subreqcu, subfirstcu; uint32_t groupnumber; uint32_t verbarglen, verbculen; - int32_t subreqcuflags, subfirstcuflags; /* Must be signed */ + uint32_t subreqcuflags, subfirstcuflags; open_capitem *oc; PCRE2_UCHAR mcbuffer[8]; @@ -5770,9 +5854,9 @@ for (;; pptr++) if (taboffset >= 0) { if (tabopt >= 0) - for (i = 0; i < 32; i++) pbits[i] |= cbits[(int)i + taboffset]; + for (int i = 0; i < 32; i++) pbits[i] |= cbits[(int)i + taboffset]; else - for (i = 0; i < 32; i++) pbits[i] &= ~cbits[(int)i + taboffset]; + for (int i = 0; i < 32; i++) pbits[i] &= ~cbits[(int)i + taboffset]; } /* Now see if we need to remove any special characters. An option @@ -5786,9 +5870,9 @@ for (;; pptr++) being built and we are done. */ if (local_negate) - for (i = 0; i < 32; i++) classbits[i] |= ~pbits[i]; + for (int i = 0; i < 32; i++) classbits[i] |= (uint8_t)(~pbits[i]); else - for (i = 0; i < 32; i++) classbits[i] |= pbits[i]; + for (int i = 0; i < 32; i++) classbits[i] |= pbits[i]; /* Every class contains at least one < 256 character. */ @@ -5827,21 +5911,23 @@ for (;; pptr++) switch(escape) { case ESC_d: - for (i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_digit]; + for (int i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_digit]; break; case ESC_D: should_flip_negation = TRUE; - for (i = 0; i < 32; i++) classbits[i] |= ~cbits[i+cbit_digit]; + for (int i = 0; i < 32; i++) + classbits[i] |= (uint8_t)(~cbits[i+cbit_digit]); break; case ESC_w: - for (i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_word]; + for (int i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_word]; break; case ESC_W: should_flip_negation = TRUE; - for (i = 0; i < 32; i++) classbits[i] |= ~cbits[i+cbit_word]; + for (int i = 0; i < 32; i++) + classbits[i] |= (uint8_t)(~cbits[i+cbit_word]); break; /* Perl 5.004 onwards omitted VT from \s, but restored it at Perl @@ -5852,12 +5938,13 @@ for (;; pptr++) longer treat \s and \S specially. */ case ESC_s: - for (i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_space]; + for (int i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_space]; break; case ESC_S: should_flip_negation = TRUE; - for (i = 0; i < 32; i++) classbits[i] |= ~cbits[i+cbit_space]; + for (int i = 0; i < 32; i++) + classbits[i] |= (uint8_t)(~cbits[i+cbit_space]); break; /* When adding the horizontal or vertical space lists to a class, or @@ -6098,7 +6185,7 @@ for (;; pptr++) if (negate_class && !xclass_has_prop) { /* Using 255 ^ instead of ~ avoids clang sanitize warning. */ - for (i = 0; i < 32; i++) classbits[i] = 255 ^ classbits[i]; + for (int i = 0; i < 32; i++) classbits[i] = 255 ^ classbits[i]; } memcpy(code, classbits, 32); code = class_uchardata + (32 / sizeof(PCRE2_UCHAR)); @@ -6124,7 +6211,7 @@ for (;; pptr++) if (negate_class) { /* Using 255 ^ instead of ~ avoids clang sanitize warning. */ - for (i = 0; i < 32; i++) classbits[i] = 255 ^ classbits[i]; + for (int i = 0; i < 32; i++) classbits[i] = 255 ^ classbits[i]; } memcpy(code, classbits, 32); } @@ -6198,7 +6285,7 @@ for (;; pptr++) verbarglen = *(++pptr); verbculen = 0; tempcode = code++; - for (i = 0; i < (int)verbarglen; i++) + for (int i = 0; i < (int)verbarglen; i++) { meta = *(++pptr); #ifdef SUPPORT_UNICODE @@ -6247,6 +6334,7 @@ for (;; pptr++) bravalue = OP_COND; { int count, index; + unsigned int i; PCRE2_SPTR name; named_group *ng = cb->named_groups; uint32_t length = *(++pptr); @@ -6286,7 +6374,7 @@ for (;; pptr++) groupnumber = 0; if (meta == META_COND_RNUMBER) { - for (i = 1; i < (int)length; i++) + for (i = 1; i < length; i++) { groupnumber = groupnumber * 10 + name[i] - CHAR_0; if (groupnumber > MAX_GROUP_NUMBER) @@ -6608,7 +6696,7 @@ for (;; pptr++) if (firstcuflags == REQ_UNSET && subfirstcuflags != REQ_UNSET) { - if (subfirstcuflags >= 0) + if (subfirstcuflags < REQ_NONE) { firstcu = subfirstcu; firstcuflags = subfirstcuflags; @@ -6622,7 +6710,7 @@ for (;; pptr++) into reqcu if there wasn't one, using the vary flag that was in existence beforehand. */ - else if (subfirstcuflags >= 0 && subreqcuflags < 0) + else if (subfirstcuflags < REQ_NONE && subreqcuflags >= REQ_NONE) { subreqcu = subfirstcu; subreqcuflags = subfirstcuflags | tempreqvary; @@ -6631,7 +6719,7 @@ for (;; pptr++) /* If the subpattern set a required code unit (or set a first code unit that isn't really the first code unit - see above), set it. */ - if (subreqcuflags >= 0) + if (subreqcuflags < REQ_NONE) { reqcu = subreqcu; reqcuflags = subreqcuflags; @@ -6650,7 +6738,7 @@ for (;; pptr++) in that example, 'X' ends up set for both. */ else if ((bravalue == OP_ASSERT || bravalue == OP_ASSERT_NA) && - subreqcuflags >= 0 && subfirstcuflags >= 0) + subreqcuflags < REQ_NONE && subfirstcuflags < REQ_NONE) { reqcu = subreqcu; reqcuflags = subreqcuflags; @@ -6680,7 +6768,7 @@ for (;; pptr++) this name is duplicated. */ groupnumber = 0; - for (i = 0; i < cb->names_found; i++, ng++) + for (unsigned int i = 0; i < cb->names_found; i++, ng++) { if (length == ng->length && PRIV(strncmp)(name, ng->name, length) == 0) @@ -6935,14 +7023,19 @@ for (;; pptr++) #endif /* MAYBE_UTF_MULTI */ /* Handle the case of a single code unit - either with no UTF support, or - with UTF disabled, or for a single-code-unit UTF character. */ + with UTF disabled, or for a single-code-unit UTF character. In the latter + case, for a repeated positive match, get the caseless flag for the + required code unit from the previous character, because a class like [Aa] + sets a caseless A but by now the req_caseopt flag has been reset. */ + { mcbuffer[0] = code[-1]; mclength = 1; if (op_previous <= OP_CHARI && repeat_min > 1) { reqcu = mcbuffer[0]; - reqcuflags = req_caseopt | cb->req_varyopt; + reqcuflags = cb->req_varyopt; + if (op_previous == OP_CHARI) reqcuflags |= REQ_CASELESS; } } goto OUTPUT_SINGLE_REPEAT; /* Code shared with single character types */ @@ -7034,7 +7127,7 @@ for (;; pptr++) *lengthptr += delta; } - else for (i = 0; i < replicate; i++) + else for (int i = 0; i < replicate; i++) { memcpy(code, previous, CU2BYTES(1 + LINK_SIZE)); previous = code; @@ -7210,12 +7303,12 @@ for (;; pptr++) else { - if (groupsetfirstcu && reqcuflags < 0) + if (groupsetfirstcu && reqcuflags >= REQ_NONE) { reqcu = firstcu; reqcuflags = firstcuflags; } - for (i = 1; (uint32_t)i < repeat_min; i++) + for (uint32_t i = 1; i < repeat_min; i++) { memcpy(code, previous, CU2BYTES(len)); code += len; @@ -7259,14 +7352,14 @@ for (;; pptr++) /* This is compiling for real */ - else for (i = repeat_max - 1; i >= 0; i--) + else for (uint32_t i = repeat_max; i >= 1; i--) { *code++ = OP_BRAZERO + repeat_type; /* All but the final copy start a new nesting, maintaining the chain of brackets outstanding. */ - if (i != 0) + if (i != 1) { int linkoffset; *code++ = OP_BRA; @@ -7985,9 +8078,9 @@ Arguments: errorcodeptr -> pointer to error code variable skipunits skip this many code units at start (for brackets and OP_COND) firstcuptr place to put the first required code unit - firstcuflagsptr place to put the first code unit flags, or a negative number + firstcuflagsptr place to put the first code unit flags reqcuptr place to put the last required code unit - reqcuflagsptr place to put the last required code unit flags, or a negative number + reqcuflagsptr place to put the last required code unit flags bcptr pointer to the chain of currently open branches cb points to the data block with tables pointers etc. lengthptr NULL during the real compile phase @@ -8001,7 +8094,7 @@ Returns: 0 There has been an error static int compile_regex(uint32_t options, PCRE2_UCHAR **codeptr, uint32_t **pptrptr, int *errorcodeptr, uint32_t skipunits, uint32_t *firstcuptr, - int32_t *firstcuflagsptr, uint32_t *reqcuptr,int32_t *reqcuflagsptr, + uint32_t *firstcuflagsptr, uint32_t *reqcuptr, uint32_t *reqcuflagsptr, branch_chain *bcptr, compile_block *cb, PCRE2_SIZE *lengthptr) { PCRE2_UCHAR *code = *codeptr; @@ -8014,9 +8107,9 @@ int okreturn = 1; uint32_t *pptr = *pptrptr; uint32_t firstcu, reqcu; uint32_t lookbehindlength; -int32_t firstcuflags, reqcuflags; +uint32_t firstcuflags, reqcuflags; uint32_t branchfirstcu, branchreqcu; -int32_t branchfirstcuflags, branchreqcuflags; +uint32_t branchfirstcuflags, branchreqcuflags; PCRE2_SIZE length; branch_chain bc; @@ -8135,9 +8228,9 @@ for (;;) if (firstcuflags != branchfirstcuflags || firstcu != branchfirstcu) { - if (firstcuflags >= 0) + if (firstcuflags < REQ_NONE) { - if (reqcuflags < 0) + if (reqcuflags >= REQ_NONE) { reqcu = firstcu; reqcuflags = firstcuflags; @@ -8149,8 +8242,8 @@ for (;;) /* If we (now or from before) have no firstcu, a firstcu from the branch becomes a reqcu if there isn't a branch reqcu. */ - if (firstcuflags < 0 && branchfirstcuflags >= 0 && - branchreqcuflags < 0) + if (firstcuflags >= REQ_NONE && branchfirstcuflags < REQ_NONE && + branchreqcuflags >= REQ_NONE) { branchreqcu = branchfirstcu; branchreqcuflags = branchfirstcuflags; @@ -8298,7 +8391,7 @@ Returns: TRUE or FALSE */ static BOOL -is_anchored(PCRE2_SPTR code, unsigned int bracket_map, compile_block *cb, +is_anchored(PCRE2_SPTR code, uint32_t bracket_map, compile_block *cb, int atomcount, BOOL inassert) { do { @@ -8321,7 +8414,7 @@ do { op == OP_SCBRA || op == OP_SCBRAPOS) { int n = GET2(scode, 1+LINK_SIZE); - int new_map = bracket_map | ((n < 32)? (1u << n) : 1); + uint32_t new_map = bracket_map | ((n < 32)? (1u << n) : 1); if (!is_anchored(scode, new_map, cb, atomcount, inassert)) return FALSE; } @@ -8681,15 +8774,15 @@ Returns: the fixed first code unit, or 0 with REQ_NONE in flags */ static uint32_t -find_firstassertedcu(PCRE2_SPTR code, int32_t *flags, uint32_t inassert) +find_firstassertedcu(PCRE2_SPTR code, uint32_t *flags, uint32_t inassert) { uint32_t c = 0; -int cflags = REQ_NONE; +uint32_t cflags = REQ_NONE; *flags = REQ_NONE; do { uint32_t d; - int dflags; + uint32_t dflags; int xl = (*code == OP_CBRA || *code == OP_SCBRA || *code == OP_CBRAPOS || *code == OP_SCBRAPOS)? IMM2_SIZE:0; PCRE2_SPTR scode = first_significant_code(code + 1+LINK_SIZE + xl, TRUE); @@ -8712,9 +8805,8 @@ do { case OP_SCRIPT_RUN: d = find_firstassertedcu(scode, &dflags, inassert + ((op == OP_ASSERT || op == OP_ASSERT_NA)?1:0)); - if (dflags < 0) - return 0; - if (cflags < 0) { c = d; cflags = dflags; } + if (dflags >= REQ_NONE) return 0; + if (cflags >= REQ_NONE) { c = d; cflags = dflags; } else if (c != d || cflags != dflags) return 0; break; @@ -8727,7 +8819,7 @@ do { case OP_MINPLUS: case OP_POSPLUS: if (inassert == 0) return 0; - if (cflags < 0) { c = scode[1]; cflags = 0; } + if (cflags >= REQ_NONE) { c = scode[1]; cflags = 0; } else if (c != scode[1]) return 0; break; @@ -8753,7 +8845,7 @@ do { #endif #endif - if (cflags < 0) { c = scode[1]; cflags = REQ_CASELESS; } + if (cflags >= REQ_NONE) { c = scode[1]; cflags = REQ_CASELESS; } else if (c != scode[1]) return 0; break; } @@ -9689,7 +9781,7 @@ PCRE2_SIZE re_blocksize; /* Size of memory block */ PCRE2_SIZE big32count = 0; /* 32-bit literals >= 0x80000000 */ PCRE2_SIZE parsed_size_needed; /* Needed for parsed pattern */ -int32_t firstcuflags, reqcuflags; /* Type of first/req code unit */ +uint32_t firstcuflags, reqcuflags; /* Type of first/req code unit */ uint32_t firstcu, reqcu; /* Value of first/req code unit */ uint32_t setflags = 0; /* NL and BSR set flags */ @@ -10369,13 +10461,13 @@ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0) (these are not saved during the compile because they can cause conflicts with actual literals that follow). */ - if (firstcuflags < 0) + if (firstcuflags >= REQ_NONE) firstcu = find_firstassertedcu(codestart, &firstcuflags, 0); /* Save the data for a first code unit. The existence of one means the minimum length must be at least 1. */ - if (firstcuflags >= 0) + if (firstcuflags < REQ_NONE) { re->first_codeunit = firstcu; re->flags |= PCRE2_FIRSTSET; @@ -10422,16 +10514,16 @@ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0) different character and not a non-starting code unit of the first character, because the minimum length count is in characters, not code units. */ - if (reqcuflags >= 0) + if (reqcuflags < REQ_NONE) { #if PCRE2_CODE_UNIT_WIDTH == 16 if ((re->overall_options & PCRE2_UTF) == 0 || /* Not UTF */ - firstcuflags < 0 || /* First not set */ + firstcuflags >= REQ_NONE || /* First not set */ (firstcu & 0xf800) != 0xd800 || /* First not surrogate */ (reqcu & 0xfc00) != 0xdc00) /* Req not low surrogate */ #elif PCRE2_CODE_UNIT_WIDTH == 8 if ((re->overall_options & PCRE2_UTF) == 0 || /* Not UTF */ - firstcuflags < 0 || /* First not set */ + firstcuflags >= REQ_NONE || /* First not set */ (firstcu & 0x80) == 0 || /* First is ASCII */ (reqcu & 0x80) == 0) /* Req is ASCII */ #endif diff --git a/thirdparty/pcre2/src/pcre2_dfa_match.c b/thirdparty/pcre2/src/pcre2_dfa_match.c index 060dc7669a..d29130f2d0 100644 --- a/thirdparty/pcre2/src/pcre2_dfa_match.c +++ b/thirdparty/pcre2/src/pcre2_dfa_match.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2021 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -1193,6 +1193,11 @@ for (;;) OK = prop->script == code[2]; break; + case PT_SCX: + OK = (prop->script == code[2] || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), code[2]) != 0); + break; + /* These are specials for combination cases. */ case PT_ALNUM: @@ -1240,6 +1245,15 @@ for (;;) c >= 0xe000; break; + case PT_BIDICL: + OK = UCD_BIDICLASS(c) == code[2]; + break; + + case PT_BOOL: + OK = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), code[2]) != 0; + break; + /* Should never occur, but keep compilers from grumbling. */ default: @@ -1451,6 +1465,11 @@ for (;;) OK = prop->script == code[3]; break; + case PT_SCX: + OK = (prop->script == code[3] || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), code[3]) != 0); + break; + /* These are specials for combination cases. */ case PT_ALNUM: @@ -1498,6 +1517,15 @@ for (;;) c >= 0xe000; break; + case PT_BIDICL: + OK = UCD_BIDICLASS(c) == code[3]; + break; + + case PT_BOOL: + OK = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), code[3]) != 0; + break; + /* Should never occur, but keep compilers from grumbling. */ default: @@ -1692,6 +1720,11 @@ for (;;) OK = prop->script == code[3]; break; + case PT_SCX: + OK = (prop->script == code[3] || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), code[3]) != 0); + break; + /* These are specials for combination cases. */ case PT_ALNUM: @@ -1739,6 +1772,15 @@ for (;;) c >= 0xe000; break; + case PT_BIDICL: + OK = UCD_BIDICLASS(c) == code[3]; + break; + + case PT_BOOL: + OK = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), code[3]) != 0; + break; + /* Should never occur, but keep compilers from grumbling. */ default: @@ -1958,6 +2000,12 @@ for (;;) OK = prop->script == code[1 + IMM2_SIZE + 2]; break; + case PT_SCX: + OK = (prop->script == code[1 + IMM2_SIZE + 2] || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), + code[1 + IMM2_SIZE + 2]) != 0); + break; + /* These are specials for combination cases. */ case PT_ALNUM: @@ -2005,6 +2053,15 @@ for (;;) c >= 0xe000; break; + case PT_BIDICL: + OK = UCD_BIDICLASS(c) == code[1 + IMM2_SIZE + 2]; + break; + + case PT_BOOL: + OK = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), code[1 + IMM2_SIZE + 2]) != 0; + break; + /* Should never occur, but keep compilers from grumbling. */ default: @@ -3285,20 +3342,22 @@ rws->next = NULL; rws->size = RWS_BASE_SIZE; rws->free = RWS_BASE_SIZE - RWS_ANCHOR_SIZE; -/* A length equal to PCRE2_ZERO_TERMINATED implies a zero-terminated -subject string. */ +/* Recognize NULL, length 0 as an empty string. */ -if (length == PCRE2_ZERO_TERMINATED) - { - length = PRIV(strlen)(subject); - was_zero_terminated = 1; - } +if (subject == NULL && length == 0) subject = (PCRE2_SPTR)""; /* Plausibility checks */ if ((options & ~PUBLIC_DFA_MATCH_OPTIONS) != 0) return PCRE2_ERROR_BADOPTION; if (re == NULL || subject == NULL || workspace == NULL || match_data == NULL) return PCRE2_ERROR_NULL; + +if (length == PCRE2_ZERO_TERMINATED) + { + length = PRIV(strlen)(subject); + was_zero_terminated = 1; + } + if (wscount < 20) return PCRE2_ERROR_DFA_WSSIZE; if (start_offset > length) return PCRE2_ERROR_BADOFFSET; diff --git a/thirdparty/pcre2/src/pcre2_error.c b/thirdparty/pcre2/src/pcre2_error.c index 3dee63d0db..09904c03e3 100644 --- a/thirdparty/pcre2/src/pcre2_error.c +++ b/thirdparty/pcre2/src/pcre2_error.c @@ -119,7 +119,7 @@ static const unsigned char compile_error_texts[] = /* 45 */ "this version of PCRE2 does not have support for \\P, \\p, or \\X\0" "malformed \\P or \\p sequence\0" - "unknown property name after \\P or \\p\0" + "unknown property after \\P or \\p\0" "subpattern name is too long (maximum " XSTRING(MAX_NAME_SIZE) " code units)\0" "too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")\0" /* 50 */ @@ -253,7 +253,7 @@ static const unsigned char match_error_texts[] = "unknown substring\0" /* 50 */ "non-unique substring name\0" - "NULL argument passed\0" + "NULL argument passed with non-zero length\0" "nested recursion at the same subject position\0" "matching depth limit exceeded\0" "requested value is not available\0" diff --git a/thirdparty/pcre2/src/pcre2_extuni.c b/thirdparty/pcre2/src/pcre2_extuni.c index 5a719e9cb4..b23946b0d1 100644 --- a/thirdparty/pcre2/src/pcre2_extuni.c +++ b/thirdparty/pcre2/src/pcre2_extuni.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2019 University of Cambridge + New API code Copyright (c) 2016-2021 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -105,7 +105,7 @@ while (eptr < end_subject) /* Not breaking between Regional Indicators is allowed only if there are an even number of preceding RIs. */ - if (lgb == ucp_gbRegionalIndicator && rgb == ucp_gbRegionalIndicator) + if (lgb == ucp_gbRegional_Indicator && rgb == ucp_gbRegional_Indicator) { int ricount = 0; PCRE2_SPTR bptr = eptr - 1; @@ -123,7 +123,7 @@ while (eptr < end_subject) } else c = *bptr; - if (UCD_GRAPHBREAK(c) != ucp_gbRegionalIndicator) break; + if (UCD_GRAPHBREAK(c) != ucp_gbRegional_Indicator) break; ricount++; } if ((ricount & 1) != 0) break; /* Grapheme break required */ diff --git a/thirdparty/pcre2/src/pcre2_internal.h b/thirdparty/pcre2/src/pcre2_internal.h index d8fad1e93b..fe7a0e005a 100644 --- a/thirdparty/pcre2/src/pcre2_internal.h +++ b/thirdparty/pcre2/src/pcre2_internal.h @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2020 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -954,6 +954,13 @@ a positive value. */ #define STRING_LIMIT_RECURSION_EQ "LIMIT_RECURSION=" #define STRING_MARK "MARK" +#define STRING_bc "bc" +#define STRING_bidiclass "bidiclass" +#define STRING_sc "sc" +#define STRING_script "script" +#define STRING_scriptextensions "scriptextensions" +#define STRING_scx "scx" + #else /* SUPPORT_UNICODE */ /* UTF-8 support is enabled; always use UTF-8 (=ASCII) character codes. This @@ -1248,26 +1255,39 @@ only. */ #define STRING_LIMIT_RECURSION_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_R STR_E STR_C STR_U STR_R STR_S STR_I STR_O STR_N STR_EQUALS_SIGN #define STRING_MARK STR_M STR_A STR_R STR_K +#define STRING_bc STR_b STR_c +#define STRING_bidiclass STR_b STR_i STR_d STR_i STR_c STR_l STR_a STR_s STR_s +#define STRING_sc STR_s STR_c +#define STRING_script STR_s STR_c STR_r STR_i STR_p STR_t +#define STRING_scriptextensions STR_s STR_c STR_r STR_i STR_p STR_t STR_e STR_x STR_t STR_e STR_n STR_s STR_i STR_o STR_n STR_s +#define STRING_scx STR_s STR_c STR_x + + #endif /* SUPPORT_UNICODE */ /* -------------------- End of character and string names -------------------*/ /* -------------------- Definitions for compiled patterns -------------------*/ -/* Codes for different types of Unicode property */ +/* Codes for different types of Unicode property. If these definitions are +changed, the autopossessifying table in pcre2_auto_possess.c must be updated to +match. */ #define PT_ANY 0 /* Any property - matches all chars */ #define PT_LAMP 1 /* L& - the union of Lu, Ll, Lt */ #define PT_GC 2 /* Specified general characteristic (e.g. L) */ #define PT_PC 3 /* Specified particular characteristic (e.g. Lu) */ -#define PT_SC 4 /* Script (e.g. Han) */ -#define PT_ALNUM 5 /* Alphanumeric - the union of L and N */ -#define PT_SPACE 6 /* Perl space - Z plus 9,10,12,13 */ -#define PT_PXSPACE 7 /* POSIX space - Z plus 9,10,11,12,13 */ -#define PT_WORD 8 /* Word - L plus N plus underscore */ -#define PT_CLIST 9 /* Pseudo-property: match character list */ -#define PT_UCNC 10 /* Universal Character nameable character */ -#define PT_TABSIZE 11 /* Size of square table for autopossessify tests */ +#define PT_SC 4 /* Script only (e.g. Han) */ +#define PT_SCX 5 /* Script extensions (includes SC) */ +#define PT_ALNUM 6 /* Alphanumeric - the union of L and N */ +#define PT_SPACE 7 /* Perl space - general category Z plus 9,10,12,13 */ +#define PT_PXSPACE 8 /* POSIX space - Z plus 9,10,11,12,13 */ +#define PT_WORD 9 /* Word - L plus N plus underscore */ +#define PT_CLIST 10 /* Pseudo-property: match character list */ +#define PT_UCNC 11 /* Universal Character nameable character */ +#define PT_BIDICL 12 /* Specified bidi class */ +#define PT_BOOL 13 /* Boolean property */ +#define PT_TABSIZE 14 /* Size of square table for autopossessify tests */ /* The following special properties are used only in XCLASS items, when POSIX classes are specified and PCRE2_UCP is set - in other words, for Unicode @@ -1275,22 +1295,27 @@ handling of these classes. They are not available via the \p or \P escapes like those in the above list, and so they do not take part in the autopossessifying table. */ -#define PT_PXGRAPH 11 /* [:graph:] - characters that mark the paper */ -#define PT_PXPRINT 12 /* [:print:] - [:graph:] plus non-control spaces */ -#define PT_PXPUNCT 13 /* [:punct:] - punctuation characters */ +#define PT_PXGRAPH 14 /* [:graph:] - characters that mark the paper */ +#define PT_PXPRINT 15 /* [:print:] - [:graph:] plus non-control spaces */ +#define PT_PXPUNCT 16 /* [:punct:] - punctuation characters */ + +/* This value is used when parsing \p and \P escapes to indicate that neither +\p{script:...} nor \p{scx:...} has been encountered. */ + +#define PT_NOTSCRIPT 255 /* Flag bits and data types for the extended class (OP_XCLASS) for classes that contain characters with values greater than 255. */ -#define XCL_NOT 0x01 /* Flag: this is a negative class */ -#define XCL_MAP 0x02 /* Flag: a 32-byte map is present */ -#define XCL_HASPROP 0x04 /* Flag: property checks are present. */ +#define XCL_NOT 0x01 /* Flag: this is a negative class */ +#define XCL_MAP 0x02 /* Flag: a 32-byte map is present */ +#define XCL_HASPROP 0x04 /* Flag: property checks are present. */ -#define XCL_END 0 /* Marks end of individual items */ -#define XCL_SINGLE 1 /* Single item (one multibyte char) follows */ -#define XCL_RANGE 2 /* A range (two multibyte chars) follows */ -#define XCL_PROP 3 /* Unicode property (2-byte property code follows) */ -#define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */ +#define XCL_END 0 /* Marks end of individual items */ +#define XCL_SINGLE 1 /* Single item (one multibyte char) follows */ +#define XCL_RANGE 2 /* A range (two multibyte chars) follows */ +#define XCL_PROP 3 /* Unicode property (2-byte property code follows) */ +#define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */ /* These are escaped items that aren't just an encoding of a particular data value such as \n. They must have non-zero values, as check_escape() returns 0 @@ -1797,8 +1822,8 @@ typedef struct { uint8_t gbprop; /* ucp_gbControl, etc. (grapheme break property) */ uint8_t caseset; /* offset to multichar other cases or zero */ int32_t other_case; /* offset to other case, or zero if none */ - int16_t scriptx; /* script extension value */ - int16_t dummy; /* spare - to round to multiple of 4 bytes */ + uint16_t scriptx_bidiclass; /* script extension (11 bit) and bidi class (5 bit) values */ + uint16_t bprops; /* binary properties offset */ } ucd_record; /* UCD access macros */ @@ -1815,13 +1840,30 @@ typedef struct { #define GET_UCD(ch) REAL_GET_UCD(ch) #endif +#define UCD_SCRIPTX_MASK 0x3ff +#define UCD_BIDICLASS_SHIFT 11 +#define UCD_BPROPS_MASK 0xfff + +#define UCD_SCRIPTX_PROP(prop) ((prop)->scriptx_bidiclass & UCD_SCRIPTX_MASK) +#define UCD_BIDICLASS_PROP(prop) ((prop)->scriptx_bidiclass >> UCD_BIDICLASS_SHIFT) +#define UCD_BPROPS_PROP(prop) ((prop)->bprops & UCD_BPROPS_MASK) + #define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype #define UCD_SCRIPT(ch) GET_UCD(ch)->script #define UCD_CATEGORY(ch) PRIV(ucp_gentype)[UCD_CHARTYPE(ch)] #define UCD_GRAPHBREAK(ch) GET_UCD(ch)->gbprop #define UCD_CASESET(ch) GET_UCD(ch)->caseset #define UCD_OTHERCASE(ch) ((uint32_t)((int)ch + (int)(GET_UCD(ch)->other_case))) -#define UCD_SCRIPTX(ch) GET_UCD(ch)->scriptx +#define UCD_SCRIPTX(ch) UCD_SCRIPTX_PROP(GET_UCD(ch)) +#define UCD_BPROPS(ch) UCD_BPROPS_PROP(GET_UCD(ch)) +#define UCD_BIDICLASS(ch) UCD_BIDICLASS_PROP(GET_UCD(ch)) + +/* The "scriptx" and bprops fields contain offsets into vectors of 32-bit words +that form a bitmap representing a list of scripts or boolean properties. These +macros test or set a bit in the map by number. */ + +#define MAPBIT(map,n) ((map)[(n)/32]&(1u<<((n)%32))) +#define MAPSET(map,n) ((map)[(n)/32]|=(1u<<((n)%32))) /* Header for serialized pcre2 codes. */ @@ -1878,6 +1920,7 @@ extern const uint8_t PRIV(utf8_table4)[]; #endif #define _pcre2_hspace_list PCRE2_SUFFIX(_pcre2_hspace_list_) #define _pcre2_vspace_list PCRE2_SUFFIX(_pcre2_vspace_list_) +#define _pcre2_ucd_boolprop_sets PCRE2_SUFFIX(_pcre2_ucd_boolprop_sets_) #define _pcre2_ucd_caseless_sets PCRE2_SUFFIX(_pcre2_ucd_caseless_sets_) #define _pcre2_ucd_digit_sets PCRE2_SUFFIX(_pcre2_ucd_digit_sets_) #define _pcre2_ucd_script_sets PCRE2_SUFFIX(_pcre2_ucd_script_sets_) @@ -1901,9 +1944,10 @@ extern const pcre2_match_context PRIV(default_match_context); extern const uint8_t PRIV(default_tables)[]; extern const uint32_t PRIV(hspace_list)[]; extern const uint32_t PRIV(vspace_list)[]; +extern const uint32_t PRIV(ucd_boolprop_sets)[]; extern const uint32_t PRIV(ucd_caseless_sets)[]; extern const uint32_t PRIV(ucd_digit_sets)[]; -extern const uint8_t PRIV(ucd_script_sets)[]; +extern const uint32_t PRIV(ucd_script_sets)[]; extern const ucd_record PRIV(ucd_records)[]; #if PCRE2_CODE_UNIT_WIDTH == 32 extern const ucd_record PRIV(dummy_ucd_record)[]; diff --git a/thirdparty/pcre2/src/pcre2_intmodedep.h b/thirdparty/pcre2/src/pcre2_intmodedep.h index ea3b3ec698..f8a3d25de6 100644 --- a/thirdparty/pcre2/src/pcre2_intmodedep.h +++ b/thirdparty/pcre2/src/pcre2_intmodedep.h @@ -519,7 +519,7 @@ it is. This is called only in UTF-32 mode - we don't put a test within the macro because almost all calls are already within a block of UTF-32 only code. -These are all no-ops since all UTF-32 characters fit into one pcre_uchar. */ +These are all no-ops since all UTF-32 characters fit into one PCRE2_UCHAR. */ #define BACKCHAR(eptr) do { } while (0) @@ -747,8 +747,8 @@ typedef struct compile_block { uint32_t class_range_start; /* Overall class range start */ uint32_t class_range_end; /* Overall class range end */ PCRE2_UCHAR nl[4]; /* Newline string when fixed length */ + uint32_t req_varyopt; /* "After variable item" flag for reqbyte */ int max_lookbehind; /* Maximum lookbehind (characters) */ - int req_varyopt; /* "After variable item" flag for reqbyte */ BOOL had_accept; /* (*ACCEPT) encountered */ BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */ BOOL had_recurse; /* Had a recursion or subroutine call */ @@ -764,7 +764,7 @@ typedef struct pcre2_real_jit_stack { } pcre2_real_jit_stack; /* Structure for items in a linked list that represents an explicit recursive -call within the pattern when running pcre_dfa_match(). */ +call within the pattern when running pcre2_dfa_match(). */ typedef struct dfa_recursion_info { struct dfa_recursion_info *prevrec; @@ -838,6 +838,17 @@ multiple of PCRE2_SIZE. See various comments above. */ typedef char check_heapframe_size[ ((sizeof(heapframe) % sizeof(PCRE2_SIZE)) == 0)? (+1):(-1)]; +/* Structure for computing the alignment of heapframe. */ + +typedef struct heapframe_align { + char unalign; /* Completely unalign the current offset */ + heapframe frame; /* Offset is its alignment */ +} heapframe_align; + +/* This define is the minimum alignment required for a heapframe, in bytes. */ + +#define HEAPFRAME_ALIGNMENT offsetof(heapframe_align, frame) + /* Structure for passing "static" information around between the functions doing traditional NFA matching (pcre2_match() and friends). */ diff --git a/thirdparty/pcre2/src/pcre2_jit_compile.c b/thirdparty/pcre2/src/pcre2_jit_compile.c index db2ce65598..d726c3ca04 100644 --- a/thirdparty/pcre2/src/pcre2_jit_compile.c +++ b/thirdparty/pcre2/src/pcre2_jit_compile.c @@ -8,7 +8,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel This module by Zoltan Herczeg Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2019 University of Cambridge + New API code Copyright (c) 2016-2021 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -413,6 +413,9 @@ typedef struct compiler_common { /* Locals used by fast fail optimization. */ sljit_s32 early_fail_start_ptr; sljit_s32 early_fail_end_ptr; + /* Variables used by recursive call generator. */ + sljit_s32 recurse_bitset_size; + uint8_t *recurse_bitset; /* Flipped and lower case tables. */ const sljit_u8 *fcc; @@ -613,6 +616,8 @@ the start pointers when the end of the capturing group has not yet reached. */ sljit_emit_op1(compiler, (op), (dst), (dstw), (src), (srcw)) #define OP2(op, dst, dstw, src1, src1w, src2, src2w) \ sljit_emit_op2(compiler, (op), (dst), (dstw), (src1), (src1w), (src2), (src2w)) +#define OP2U(op, src1, src1w, src2, src2w) \ + sljit_emit_op2u(compiler, (op), (src1), (src1w), (src2), (src2w)) #define OP_SRC(op, src, srcw) \ sljit_emit_op_src(compiler, (op), (src), (srcw)) #define LABEL() \ @@ -1621,7 +1626,7 @@ if (end[-(1 + LINK_SIZE)] != OP_KET || PRIVATE_DATA(begin) != 0) /* /(?:AB){4,6}/ is currently converted to /(?:AB){3}(?AB){1,3}/ * Skip the check of the second part. */ -if (PRIVATE_DATA(end - LINK_SIZE) == 0) +if (PRIVATE_DATA(end - LINK_SIZE) != 0) return TRUE; next = end; @@ -2315,22 +2320,47 @@ for (i = 0; i < RECURSE_TMP_REG_COUNT; i++) #undef RECURSE_TMP_REG_COUNT -static int get_recurse_data_length(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, - BOOL *needs_control_head, BOOL *has_quit, BOOL *has_accept) +static BOOL recurse_check_bit(compiler_common *common, sljit_sw bit_index) +{ +uint8_t *byte; +uint8_t mask; + +SLJIT_ASSERT((bit_index & (sizeof(sljit_sw) - 1)) == 0); + +bit_index >>= SLJIT_WORD_SHIFT; + +SLJIT_ASSERT((bit_index >> 3) < common->recurse_bitset_size); + +mask = 1 << (bit_index & 0x7); +byte = common->recurse_bitset + (bit_index >> 3); + +if (*byte & mask) + return FALSE; + +*byte |= mask; +return TRUE; +} + +enum get_recurse_flags { + recurse_flag_quit_found = (1 << 0), + recurse_flag_accept_found = (1 << 1), + recurse_flag_setsom_found = (1 << 2), + recurse_flag_setmark_found = (1 << 3), + recurse_flag_control_head_found = (1 << 4), +}; + +static int get_recurse_data_length(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, uint32_t *result_flags) { int length = 1; -int size; +int size, offset; PCRE2_SPTR alternative; -BOOL quit_found = FALSE; -BOOL accept_found = FALSE; -BOOL setsom_found = FALSE; -BOOL setmark_found = FALSE; -BOOL capture_last_found = FALSE; -BOOL control_head_found = FALSE; +uint32_t recurse_flags = 0; + +memset(common->recurse_bitset, 0, common->recurse_bitset_size); #if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD SLJIT_ASSERT(common->control_head_ptr != 0); -control_head_found = TRUE; +recurse_flags |= recurse_flag_control_head_found; #endif /* Calculate the sum of the private machine words. */ @@ -2341,24 +2371,26 @@ while (cc < ccend) { case OP_SET_SOM: SLJIT_ASSERT(common->has_set_som); - setsom_found = TRUE; + recurse_flags |= recurse_flag_setsom_found; cc += 1; break; case OP_RECURSE: if (common->has_set_som) - setsom_found = TRUE; + recurse_flags |= recurse_flag_setsom_found; if (common->mark_ptr != 0) - setmark_found = TRUE; - if (common->capture_last_ptr != 0) - capture_last_found = TRUE; + recurse_flags |= recurse_flag_setmark_found; + if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) + length++; cc += 1 + LINK_SIZE; break; case OP_KET: - if (PRIVATE_DATA(cc) != 0) + offset = PRIVATE_DATA(cc); + if (offset != 0) { - length++; + if (recurse_check_bit(common, offset)) + length++; SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0); cc += PRIVATE_DATA(cc + 1); } @@ -2377,39 +2409,55 @@ while (cc < ccend) case OP_SBRA: case OP_SBRAPOS: case OP_SCOND: - length++; SLJIT_ASSERT(PRIVATE_DATA(cc) != 0); + if (recurse_check_bit(common, PRIVATE_DATA(cc))) + length++; cc += 1 + LINK_SIZE; break; case OP_CBRA: case OP_SCBRA: - length += 2; - if (common->capture_last_ptr != 0) - capture_last_found = TRUE; - if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0) + offset = GET2(cc, 1 + LINK_SIZE); + if (recurse_check_bit(common, OVECTOR(offset << 1))) + { + SLJIT_ASSERT(recurse_check_bit(common, OVECTOR((offset << 1) + 1))); + length += 2; + } + if (common->optimized_cbracket[offset] == 0 && recurse_check_bit(common, OVECTOR_PRIV(offset))) + length++; + if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) length++; cc += 1 + LINK_SIZE + IMM2_SIZE; break; case OP_CBRAPOS: case OP_SCBRAPOS: - length += 2 + 2; - if (common->capture_last_ptr != 0) - capture_last_found = TRUE; + offset = GET2(cc, 1 + LINK_SIZE); + if (recurse_check_bit(common, OVECTOR(offset << 1))) + { + SLJIT_ASSERT(recurse_check_bit(common, OVECTOR((offset << 1) + 1))); + length += 2; + } + if (recurse_check_bit(common, OVECTOR_PRIV(offset))) + length++; + if (recurse_check_bit(common, PRIVATE_DATA(cc))) + length++; + if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) + length++; cc += 1 + LINK_SIZE + IMM2_SIZE; break; case OP_COND: /* Might be a hidden SCOND. */ alternative = cc + GET(cc, 1); - if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN) + if ((*alternative == OP_KETRMAX || *alternative == OP_KETRMIN) && recurse_check_bit(common, PRIVATE_DATA(cc))) length++; cc += 1 + LINK_SIZE; break; CASE_ITERATOR_PRIVATE_DATA_1 - if (PRIVATE_DATA(cc) != 0) + offset = PRIVATE_DATA(cc); + if (offset != 0 && recurse_check_bit(common, offset)) length++; cc += 2; #ifdef SUPPORT_UNICODE @@ -2418,8 +2466,12 @@ while (cc < ccend) break; CASE_ITERATOR_PRIVATE_DATA_2A - if (PRIVATE_DATA(cc) != 0) + offset = PRIVATE_DATA(cc); + if (offset != 0 && recurse_check_bit(common, offset)) + { + SLJIT_ASSERT(recurse_check_bit(common, offset + sizeof(sljit_sw))); length += 2; + } cc += 2; #ifdef SUPPORT_UNICODE if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); @@ -2427,8 +2479,12 @@ while (cc < ccend) break; CASE_ITERATOR_PRIVATE_DATA_2B - if (PRIVATE_DATA(cc) != 0) + offset = PRIVATE_DATA(cc); + if (offset != 0 && recurse_check_bit(common, offset)) + { + SLJIT_ASSERT(recurse_check_bit(common, offset + sizeof(sljit_sw))); length += 2; + } cc += 2 + IMM2_SIZE; #ifdef SUPPORT_UNICODE if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); @@ -2436,20 +2492,29 @@ while (cc < ccend) break; CASE_ITERATOR_TYPE_PRIVATE_DATA_1 - if (PRIVATE_DATA(cc) != 0) + offset = PRIVATE_DATA(cc); + if (offset != 0 && recurse_check_bit(common, offset)) length++; cc += 1; break; CASE_ITERATOR_TYPE_PRIVATE_DATA_2A - if (PRIVATE_DATA(cc) != 0) + offset = PRIVATE_DATA(cc); + if (offset != 0 && recurse_check_bit(common, offset)) + { + SLJIT_ASSERT(recurse_check_bit(common, offset + sizeof(sljit_sw))); length += 2; + } cc += 1; break; CASE_ITERATOR_TYPE_PRIVATE_DATA_2B - if (PRIVATE_DATA(cc) != 0) + offset = PRIVATE_DATA(cc); + if (offset != 0 && recurse_check_bit(common, offset)) + { + SLJIT_ASSERT(recurse_check_bit(common, offset + sizeof(sljit_sw))); length += 2; + } cc += 1 + IMM2_SIZE; break; @@ -2461,7 +2526,9 @@ while (cc < ccend) #else size = 1 + 32 / (int)sizeof(PCRE2_UCHAR); #endif - if (PRIVATE_DATA(cc) != 0) + + offset = PRIVATE_DATA(cc); + if (offset != 0 && recurse_check_bit(common, offset)) length += get_class_iterator_size(cc + size); cc += size; break; @@ -2471,12 +2538,11 @@ while (cc < ccend) case OP_PRUNE_ARG: case OP_THEN_ARG: SLJIT_ASSERT(common->mark_ptr != 0); - if (!setmark_found) - setmark_found = TRUE; + recurse_flags |= recurse_flag_setmark_found; if (common->control_head_ptr != 0) - control_head_found = TRUE; + recurse_flags |= recurse_flag_control_head_found; if (*cc != OP_MARK) - quit_found = TRUE; + recurse_flags |= recurse_flag_quit_found; cc += 1 + 2 + cc[1]; break; @@ -2484,26 +2550,24 @@ while (cc < ccend) case OP_PRUNE: case OP_SKIP: case OP_COMMIT: - quit_found = TRUE; + recurse_flags |= recurse_flag_quit_found; cc++; break; case OP_SKIP_ARG: - quit_found = TRUE; + recurse_flags |= recurse_flag_quit_found; cc += 1 + 2 + cc[1]; break; case OP_THEN: SLJIT_ASSERT(common->control_head_ptr != 0); - quit_found = TRUE; - if (!control_head_found) - control_head_found = TRUE; + recurse_flags |= recurse_flag_quit_found | recurse_flag_control_head_found; cc++; break; case OP_ACCEPT: case OP_ASSERT_ACCEPT: - accept_found = TRUE; + recurse_flags |= recurse_flag_accept_found; cc++; break; @@ -2515,21 +2579,17 @@ while (cc < ccend) } SLJIT_ASSERT(cc == ccend); -if (control_head_found) +if (recurse_flags & recurse_flag_control_head_found) length++; -if (capture_last_found) - length++; -if (quit_found) +if (recurse_flags & recurse_flag_quit_found) { - if (setsom_found) + if (recurse_flags & recurse_flag_setsom_found) length++; - if (setmark_found) + if (recurse_flags & recurse_flag_setmark_found) length++; } -*needs_control_head = control_head_found; -*has_quit = quit_found; -*has_accept = accept_found; +*result_flags = recurse_flags; return length; } @@ -2542,7 +2602,7 @@ enum copy_recurse_data_types { }; static void copy_recurse_data(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, - int type, int stackptr, int stacktop, BOOL has_quit) + int type, int stackptr, int stacktop, uint32_t recurse_flags) { delayed_mem_copy_status status; PCRE2_SPTR alternative; @@ -2551,14 +2611,12 @@ sljit_sw shared_srcw[3]; sljit_sw kept_shared_srcw[2]; int private_count, shared_count, kept_shared_count; int from_sp, base_reg, offset, i; -BOOL setsom_found = FALSE; -BOOL setmark_found = FALSE; -BOOL capture_last_found = FALSE; -BOOL control_head_found = FALSE; + +memset(common->recurse_bitset, 0, common->recurse_bitset_size); #if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD SLJIT_ASSERT(common->control_head_ptr != 0); -control_head_found = TRUE; +recurse_check_bit(common, common->control_head_ptr); #endif switch (type) @@ -2646,45 +2704,42 @@ while (cc < ccend) { case OP_SET_SOM: SLJIT_ASSERT(common->has_set_som); - if (has_quit && !setsom_found) + if ((recurse_flags & recurse_flag_quit_found) && recurse_check_bit(common, OVECTOR(0))) { kept_shared_srcw[0] = OVECTOR(0); kept_shared_count = 1; - setsom_found = TRUE; } cc += 1; break; case OP_RECURSE: - if (has_quit) + if (recurse_flags & recurse_flag_quit_found) { - if (common->has_set_som && !setsom_found) + if (common->has_set_som && recurse_check_bit(common, OVECTOR(0))) { kept_shared_srcw[0] = OVECTOR(0); kept_shared_count = 1; - setsom_found = TRUE; } - if (common->mark_ptr != 0 && !setmark_found) + if (common->mark_ptr != 0 && recurse_check_bit(common, common->mark_ptr)) { kept_shared_srcw[kept_shared_count] = common->mark_ptr; kept_shared_count++; - setmark_found = TRUE; } } - if (common->capture_last_ptr != 0 && !capture_last_found) + if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) { shared_srcw[0] = common->capture_last_ptr; shared_count = 1; - capture_last_found = TRUE; } cc += 1 + LINK_SIZE; break; case OP_KET: - if (PRIVATE_DATA(cc) != 0) + private_srcw[0] = PRIVATE_DATA(cc); + if (private_srcw[0] != 0) { - private_count = 1; - private_srcw[0] = PRIVATE_DATA(cc); + if (recurse_check_bit(common, private_srcw[0])) + private_count = 1; SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0); cc += PRIVATE_DATA(cc + 1); } @@ -2703,50 +2758,66 @@ while (cc < ccend) case OP_SBRA: case OP_SBRAPOS: case OP_SCOND: - private_count = 1; private_srcw[0] = PRIVATE_DATA(cc); + if (recurse_check_bit(common, private_srcw[0])) + private_count = 1; cc += 1 + LINK_SIZE; break; case OP_CBRA: case OP_SCBRA: - offset = (GET2(cc, 1 + LINK_SIZE)) << 1; - shared_srcw[0] = OVECTOR(offset); - shared_srcw[1] = OVECTOR(offset + 1); - shared_count = 2; + offset = GET2(cc, 1 + LINK_SIZE); + shared_srcw[0] = OVECTOR(offset << 1); + if (recurse_check_bit(common, shared_srcw[0])) + { + shared_srcw[1] = shared_srcw[0] + sizeof(sljit_sw); + SLJIT_ASSERT(recurse_check_bit(common, shared_srcw[1])); + shared_count = 2; + } - if (common->capture_last_ptr != 0 && !capture_last_found) + if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) { - shared_srcw[2] = common->capture_last_ptr; - shared_count = 3; - capture_last_found = TRUE; + shared_srcw[shared_count] = common->capture_last_ptr; + shared_count++; } - if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0) + if (common->optimized_cbracket[offset] == 0) { - private_count = 1; - private_srcw[0] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE)); + private_srcw[0] = OVECTOR_PRIV(offset); + if (recurse_check_bit(common, private_srcw[0])) + private_count = 1; } + cc += 1 + LINK_SIZE + IMM2_SIZE; break; case OP_CBRAPOS: case OP_SCBRAPOS: - offset = (GET2(cc, 1 + LINK_SIZE)) << 1; - shared_srcw[0] = OVECTOR(offset); - shared_srcw[1] = OVECTOR(offset + 1); - shared_count = 2; + offset = GET2(cc, 1 + LINK_SIZE); + shared_srcw[0] = OVECTOR(offset << 1); + if (recurse_check_bit(common, shared_srcw[0])) + { + shared_srcw[1] = shared_srcw[0] + sizeof(sljit_sw); + SLJIT_ASSERT(recurse_check_bit(common, shared_srcw[1])); + shared_count = 2; + } - if (common->capture_last_ptr != 0 && !capture_last_found) + if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) { - shared_srcw[2] = common->capture_last_ptr; - shared_count = 3; - capture_last_found = TRUE; + shared_srcw[shared_count] = common->capture_last_ptr; + shared_count++; } - private_count = 2; private_srcw[0] = PRIVATE_DATA(cc); - private_srcw[1] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE)); + if (recurse_check_bit(common, private_srcw[0])) + private_count = 1; + + offset = OVECTOR_PRIV(offset); + if (recurse_check_bit(common, offset)) + { + private_srcw[private_count] = offset; + private_count++; + } cc += 1 + LINK_SIZE + IMM2_SIZE; break; @@ -2755,18 +2826,17 @@ while (cc < ccend) alternative = cc + GET(cc, 1); if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN) { - private_count = 1; private_srcw[0] = PRIVATE_DATA(cc); + if (recurse_check_bit(common, private_srcw[0])) + private_count = 1; } cc += 1 + LINK_SIZE; break; CASE_ITERATOR_PRIVATE_DATA_1 - if (PRIVATE_DATA(cc)) - { + private_srcw[0] = PRIVATE_DATA(cc); + if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) private_count = 1; - private_srcw[0] = PRIVATE_DATA(cc); - } cc += 2; #ifdef SUPPORT_UNICODE if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); @@ -2774,11 +2844,12 @@ while (cc < ccend) break; CASE_ITERATOR_PRIVATE_DATA_2A - if (PRIVATE_DATA(cc)) + private_srcw[0] = PRIVATE_DATA(cc); + if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) { private_count = 2; - private_srcw[0] = PRIVATE_DATA(cc); - private_srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw); + private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); + SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); } cc += 2; #ifdef SUPPORT_UNICODE @@ -2787,11 +2858,12 @@ while (cc < ccend) break; CASE_ITERATOR_PRIVATE_DATA_2B - if (PRIVATE_DATA(cc)) + private_srcw[0] = PRIVATE_DATA(cc); + if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) { private_count = 2; - private_srcw[0] = PRIVATE_DATA(cc); - private_srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw); + private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); + SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); } cc += 2 + IMM2_SIZE; #ifdef SUPPORT_UNICODE @@ -2800,30 +2872,30 @@ while (cc < ccend) break; CASE_ITERATOR_TYPE_PRIVATE_DATA_1 - if (PRIVATE_DATA(cc)) - { + private_srcw[0] = PRIVATE_DATA(cc); + if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) private_count = 1; - private_srcw[0] = PRIVATE_DATA(cc); - } cc += 1; break; CASE_ITERATOR_TYPE_PRIVATE_DATA_2A - if (PRIVATE_DATA(cc)) + private_srcw[0] = PRIVATE_DATA(cc); + if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) { private_count = 2; - private_srcw[0] = PRIVATE_DATA(cc); private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); + SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); } cc += 1; break; CASE_ITERATOR_TYPE_PRIVATE_DATA_2B - if (PRIVATE_DATA(cc)) + private_srcw[0] = PRIVATE_DATA(cc); + if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) { private_count = 2; - private_srcw[0] = PRIVATE_DATA(cc); private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); + SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); } cc += 1 + IMM2_SIZE; break; @@ -2837,23 +2909,28 @@ while (cc < ccend) i = 1 + 32 / (int)sizeof(PCRE2_UCHAR); #endif if (PRIVATE_DATA(cc) != 0) + { + private_count = 1; + private_srcw[0] = PRIVATE_DATA(cc); switch(get_class_iterator_size(cc + i)) { case 1: - private_count = 1; - private_srcw[0] = PRIVATE_DATA(cc); break; case 2: - private_count = 2; - private_srcw[0] = PRIVATE_DATA(cc); - private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); + if (recurse_check_bit(common, private_srcw[0])) + { + private_count = 2; + private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); + SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); + } break; default: SLJIT_UNREACHABLE(); break; } + } cc += i; break; @@ -2862,28 +2939,25 @@ while (cc < ccend) case OP_PRUNE_ARG: case OP_THEN_ARG: SLJIT_ASSERT(common->mark_ptr != 0); - if (has_quit && !setmark_found) + if ((recurse_flags & recurse_flag_quit_found) && recurse_check_bit(common, common->mark_ptr)) { kept_shared_srcw[0] = common->mark_ptr; kept_shared_count = 1; - setmark_found = TRUE; } - if (common->control_head_ptr != 0 && !control_head_found) + if (common->control_head_ptr != 0 && recurse_check_bit(common, common->control_head_ptr)) { private_srcw[0] = common->control_head_ptr; private_count = 1; - control_head_found = TRUE; } cc += 1 + 2 + cc[1]; break; case OP_THEN: SLJIT_ASSERT(common->control_head_ptr != 0); - if (!control_head_found) + if (recurse_check_bit(common, common->control_head_ptr)) { private_srcw[0] = common->control_head_ptr; private_count = 1; - control_head_found = TRUE; } cc++; break; @@ -2891,7 +2965,7 @@ while (cc < ccend) default: cc = next_opcode(common, cc); SLJIT_ASSERT(cc != NULL); - break; + continue; } if (type != recurse_copy_shared_to_global && type != recurse_copy_kept_shared_to_global) @@ -3743,9 +3817,9 @@ if (common->invalid_utf) else { OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800); - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x110000); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0x110000); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800); CMOV(SLJIT_LESS, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); } } @@ -3982,7 +4056,7 @@ if (common->utf) { if (options & READ_CHAR_UPDATE_STR_PTR) OP2(SLJIT_ADD, RETURN_ADDR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x400); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP2, 0, SLJIT_IMM, 0x400); if (options & READ_CHAR_UPDATE_STR_PTR) CMOV(SLJIT_LESS, STR_PTR, RETURN_ADDR, 0); if (max >= 0xd800) @@ -4010,9 +4084,9 @@ if (common->invalid_utf) else { OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800); - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x110000); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0x110000); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP2, 0, SLJIT_IMM, 0xe000 - 0xd800); CMOV(SLJIT_LESS, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); } } @@ -4167,7 +4241,7 @@ if (common->utf && negated) if (sljit_has_cpu_feature(SLJIT_HAS_CMOV) && !HAS_VIRTUAL_REGISTERS) { OP2(SLJIT_ADD, RETURN_ADDR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x400); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP2, 0, SLJIT_IMM, 0x400); CMOV(SLJIT_LESS, STR_PTR, RETURN_ADDR, 0); } else @@ -4250,7 +4324,7 @@ if (common->utf) /* Skip low surrogate if necessary. */ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xdc00); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0xdc00); OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_EQUAL); OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT); OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP1, 0); @@ -4267,7 +4341,7 @@ if (common->invalid_utf && !must_be_valid) return; } - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x110000); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, SLJIT_IMM, 0x110000); OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_LESS); OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT); OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP1, 0); @@ -4332,7 +4406,7 @@ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f); OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0); /* Searching for the first zero. */ -OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800); +OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x800); jump = JUMP(SLJIT_NOT_ZERO); /* Two byte sequence. */ OP2(SLJIT_XOR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3000); @@ -4345,7 +4419,7 @@ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6); OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f); OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0); -OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x10000); +OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x10000); jump = JUMP(SLJIT_NOT_ZERO); /* Three byte sequence. */ OP2(SLJIT_XOR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xe0000); @@ -4373,7 +4447,7 @@ struct sljit_jump *compare; sljit_emit_fast_enter(compiler, RETURN_ADDR, 0); -OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x20); +OP2U(SLJIT_AND | SLJIT_SET_Z, TMP2, 0, SLJIT_IMM, 0x20); jump = JUMP(SLJIT_NOT_ZERO); /* Two byte sequence. */ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); @@ -4432,7 +4506,7 @@ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x80); exit_invalid[1] = CMP(SLJIT_GREATER_EQUAL, TMP2, 0, SLJIT_IMM, 0x40); -OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800); +OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x800); jump = JUMP(SLJIT_NOT_ZERO); OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2)); @@ -4447,14 +4521,14 @@ OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x80); OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x40); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, TMP2, 0, SLJIT_IMM, 0x40); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, 0x20000); exit_invalid[2] = NULL; } else exit_invalid[2] = CMP(SLJIT_GREATER_EQUAL, TMP2, 0, SLJIT_IMM, 0x40); -OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x10000); +OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x10000); jump = JUMP(SLJIT_NOT_ZERO); three_byte_entry = LABEL(); @@ -4462,7 +4536,7 @@ three_byte_entry = LABEL(); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x2d800); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, SLJIT_IMM, 0x800); CMOV(SLJIT_LESS, TMP1, SLJIT_IMM, INVALID_UTF_CHAR - 0xd800); exit_invalid[3] = NULL; } @@ -4473,7 +4547,7 @@ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, SLJIT_IMM, 0x800); CMOV(SLJIT_LESS, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); exit_invalid[4] = NULL; } @@ -4490,7 +4564,7 @@ OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x80); OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x40); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, TMP2, 0, SLJIT_IMM, 0x40); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, 0); exit_invalid[5] = NULL; } @@ -4500,7 +4574,7 @@ else OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc10000); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x100000); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0x100000); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, INVALID_UTF_CHAR - 0x10000); exit_invalid[6] = NULL; } @@ -4522,7 +4596,7 @@ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x80); exit_invalid[8] = CMP(SLJIT_GREATER_EQUAL, TMP2, 0, SLJIT_IMM, 0x40); -OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800); +OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x800); jump = JUMP(SLJIT_NOT_ZERO); OP_SRC(SLJIT_FAST_RETURN, RETURN_ADDR, 0); @@ -4537,7 +4611,7 @@ OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x80); OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x40); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, TMP2, 0, SLJIT_IMM, 0x40); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); exit_invalid[10] = NULL; } @@ -4830,7 +4904,7 @@ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xd800); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, SLJIT_IMM, 0x800); CMOV(SLJIT_LESS, TMP1, SLJIT_IMM, -0xd800); exit_invalid[2] = NULL; } @@ -4840,7 +4914,7 @@ else OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xd800); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, SLJIT_IMM, 0x800); CMOV(SLJIT_LESS, TMP1, SLJIT_IMM, INVALID_UTF_CHAR); exit_invalid[3] = NULL; } @@ -4865,7 +4939,7 @@ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); if (has_cmov) { - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x100000); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0x100000); CMOV(SLJIT_GREATER_EQUAL, TMP1, SLJIT_IMM, INVALID_UTF_CHAR - 0x10000); exit_invalid[5] = NULL; } @@ -4968,7 +5042,7 @@ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); exit_invalid[1] = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0xdc00); OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xdc00); -OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x400); +OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP2, 0, SLJIT_IMM, 0x400); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS); OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0x10000); OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCHAR_SHIFT); @@ -5239,7 +5313,7 @@ if (newlinecheck) OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); end = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, common->newline & 0xff); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, common->newline & 0xff); OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_EQUAL); #if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT); @@ -5304,12 +5378,12 @@ else if (common->utf) if (sljit_has_cpu_feature(SLJIT_HAS_CMOV)) { OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x400); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, SLJIT_IMM, 0x400); CMOV(SLJIT_LESS, STR_PTR, TMP2, 0); } else { - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x400); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, SLJIT_IMM, 0x400); OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_LESS); OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT); OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0); @@ -5860,7 +5934,7 @@ if (has_match_end) OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(offset + 1)); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_END, 0, TMP1, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, STR_END, 0, TMP1, 0); CMOV(SLJIT_GREATER, STR_END, TMP1, 0); } @@ -6063,7 +6137,7 @@ if (common->match_end_ptr != 0) OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); OP2(SLJIT_SUB | SLJIT_SET_LESS, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max)); add_jump(compiler, &common->failed_match, JUMP(SLJIT_LESS)); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_END, 0, TMP1, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, STR_END, 0, TMP1, 0); CMOV(SLJIT_GREATER, STR_END, TMP1, 0); } else @@ -6200,7 +6274,7 @@ if (common->nltype == NLTYPE_FIXED && common->newline > 255) firstchar = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0); OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, STR_PTR, 0, TMP1, 0); + OP2U(SLJIT_SUB | SLJIT_SET_Z, STR_PTR, 0, TMP1, 0); OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_NOT_EQUAL); #if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT); @@ -6228,7 +6302,7 @@ if (common->nltype == NLTYPE_FIXED && common->newline > 255) firstchar = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(2)); - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, STR_PTR, 0, TMP1, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, STR_PTR, 0, TMP1, 0); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_GREATER_EQUAL); #if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCHAR_SHIFT); @@ -6293,7 +6367,7 @@ if (JIT_HAS_FAST_FORWARD_CHAR_SIMD && (common->nltype == NLTYPE_FIXED || common- OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1)); if (common->mode != PCRE2_JIT_COMPLETE) { - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, STR_PTR, 0, STR_END, 0); CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); } } @@ -6319,7 +6393,7 @@ if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF) notfoundnl = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_NL); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, CHAR_NL); OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_EQUAL); #if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT); @@ -6355,7 +6429,7 @@ if (common->match_end_ptr != 0) OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); OP1(SLJIT_MOV, RETURN_ADDR, 0, STR_END, 0); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1)); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_END, 0, TMP1, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, STR_END, 0, TMP1, 0); CMOV(SLJIT_GREATER, STR_END, TMP1, 0); } @@ -6385,12 +6459,12 @@ if (!optimize_class(common, start_bits, (start_bits[31] & 0x80) != 0, FALSE, &ma if (!HAS_VIRTUAL_REGISTERS) { OP2(SLJIT_SHL, TMP3, 0, SLJIT_IMM, 1, TMP2, 0); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, TMP3, 0); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, TMP3, 0); } else { OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, TMP2, 0); } JUMPTO(SLJIT_ZERO, start); } @@ -6525,7 +6599,7 @@ jump = CMP(SLJIT_NOT_ZERO /* SIG_LESS */, TMP2, 0, SLJIT_IMM, 0); OP_SRC(SLJIT_FAST_RETURN, RETURN_ADDR, 0); JUMPHERE(jump); -OP1(SLJIT_NEG, TMP2, 0, TMP2, 0); +OP2(SLJIT_SUB, TMP2, 0, SLJIT_IMM, 0, TMP2, 0); OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); if (HAS_VIRTUAL_REGISTERS) { @@ -6600,10 +6674,10 @@ if (common->ucp) jump = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE); add_jump(compiler, &common->getucdtype, JUMP(SLJIT_FAST_CALL)); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Ll); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS_EQUAL); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Nd - ucp_Ll); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_LESS_EQUAL); JUMPHERE(jump); OP1(SLJIT_MOV, TMP3, 0, TMP2, 0); @@ -6646,10 +6720,10 @@ if (common->ucp) jump = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE); add_jump(compiler, &common->getucdtype, JUMP(SLJIT_FAST_CALL)); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Ll); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS_EQUAL); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Nd - ucp_Ll); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_LESS_EQUAL); JUMPHERE(jump); } @@ -6916,7 +6990,7 @@ j = 0; if (char_list[0] == 0) { i++; - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_ZERO); } else @@ -6928,7 +7002,7 @@ while (i < len) j++; else { - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, char_list[i]); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, char_list[i]); CMOV(SLJIT_ZERO, TMP2, TMP1, 0); } i++; @@ -6942,7 +7016,7 @@ if (j != 0) if ((char_list[i] & 0x100) != 0) { j--; - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, char_list[i] & 0xff); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, char_list[i] & 0xff); CMOV(SLJIT_ZERO, TMP2, TMP1, 0); } } @@ -6971,9 +7045,9 @@ DEFINE_COMPILER; sljit_emit_fast_enter(compiler, RETURN_ADDR, 0); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a); -OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a); +OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS_EQUAL); -OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a); +OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a); #if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 #if PCRE2_CODE_UNIT_WIDTH == 8 if (common->utf) @@ -6981,7 +7055,7 @@ if (common->utf) #endif OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a); #if PCRE2_CODE_UNIT_WIDTH == 8 } #endif @@ -6997,29 +7071,29 @@ DEFINE_COMPILER; sljit_emit_fast_enter(compiler, RETURN_ADDR, 0); -OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x09); +OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x09); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_EQUAL); -OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x20); +OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x20); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); -OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xa0); +OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0xa0); #if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 #if PCRE2_CODE_UNIT_WIDTH == 8 if (common->utf) { #endif OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x1680); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x1680); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x180e); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x2000); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x200A - 0x2000); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, 0x200A - 0x2000); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_LESS_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x202f - 0x2000); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x202f - 0x2000); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x205f - 0x2000); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x205f - 0x2000); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x3000 - 0x2000); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x3000 - 0x2000); #if PCRE2_CODE_UNIT_WIDTH == 8 } #endif @@ -7037,9 +7111,9 @@ DEFINE_COMPILER; sljit_emit_fast_enter(compiler, RETURN_ADDR, 0); OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a); -OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a); +OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS_EQUAL); -OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a); +OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a); #if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32 #if PCRE2_CODE_UNIT_WIDTH == 8 if (common->utf) @@ -7047,7 +7121,7 @@ if (common->utf) #endif OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a); #if PCRE2_CODE_UNIT_WIDTH == 8 } #endif @@ -7412,6 +7486,21 @@ return cc; static PCRE2_SPTR compile_char1_matchingpath(compiler_common *common, PCRE2_UCHAR type, PCRE2_SPTR cc, jump_list **backtracks, BOOL check_str_ptr); +#ifdef SUPPORT_UNICODE +#define XCLASS_SAVE_CHAR 0x001 +#define XCLASS_CHAR_SAVED 0x002 +#define XCLASS_HAS_TYPE 0x004 +#define XCLASS_HAS_SCRIPT 0x008 +#define XCLASS_HAS_SCRIPT_EXTENSION 0x010 +#define XCLASS_HAS_BOOL 0x020 +#define XCLASS_HAS_BIDICL 0x040 +#define XCLASS_NEEDS_UCD (XCLASS_HAS_TYPE | XCLASS_HAS_SCRIPT | XCLASS_HAS_SCRIPT_EXTENSION | XCLASS_HAS_BOOL | XCLASS_HAS_BIDICL) +#define XCLASS_SCRIPT_EXTENSION_NOTPROP 0x080 +#define XCLASS_SCRIPT_EXTENSION_RESTORE_RETURN_ADDR 0x100 +#define XCLASS_SCRIPT_EXTENSION_RESTORE_LOCALS0 0x200 + +#endif /* SUPPORT_UNICODE */ + static void compile_xclass_matchingpath(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks) { DEFINE_COMPILER; @@ -7426,8 +7515,7 @@ BOOL utf = common->utf; #endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == [8|16] */ #ifdef SUPPORT_UNICODE -BOOL needstype = FALSE, needsscript = FALSE, needschar = FALSE; -BOOL charsaved = FALSE; +sljit_u32 unicode_status = 0; int typereg = TMP1; const sljit_u32 *other_cases; sljit_uw typeoffset; @@ -7454,7 +7542,7 @@ while (*cc != XCL_END) if (c > max) max = c; if (c < min) min = c; #ifdef SUPPORT_UNICODE - needschar = TRUE; + unicode_status |= XCLASS_SAVE_CHAR; #endif /* SUPPORT_UNICODE */ } else if (*cc == XCL_RANGE) @@ -7465,7 +7553,7 @@ while (*cc != XCL_END) GETCHARINCTEST(c, cc); if (c > max) max = c; #ifdef SUPPORT_UNICODE - needschar = TRUE; + unicode_status |= XCLASS_SAVE_CHAR; #endif /* SUPPORT_UNICODE */ } #ifdef SUPPORT_UNICODE @@ -7473,7 +7561,7 @@ while (*cc != XCL_END) { SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); cc++; - if (*cc == PT_CLIST) + if (*cc == PT_CLIST && cc[-1] == XCL_PROP) { other_cases = PRIV(ucd_caseless_sets) + cc[1]; while (*other_cases != NOTACHAR) @@ -7506,11 +7594,21 @@ while (*cc != XCL_END) case PT_GC: case PT_PC: case PT_ALNUM: - needstype = TRUE; + unicode_status |= XCLASS_HAS_TYPE; break; + case PT_SCX: + unicode_status |= XCLASS_HAS_SCRIPT_EXTENSION; + if (cc[-1] == XCL_NOTPROP) + { + unicode_status |= XCLASS_SCRIPT_EXTENSION_NOTPROP; + break; + } + compares++; + /* Fall through */ + case PT_SC: - needsscript = TRUE; + unicode_status |= XCLASS_HAS_SCRIPT; break; case PT_SPACE: @@ -7519,13 +7617,20 @@ while (*cc != XCL_END) case PT_PXGRAPH: case PT_PXPRINT: case PT_PXPUNCT: - needstype = TRUE; - needschar = TRUE; + unicode_status |= XCLASS_SAVE_CHAR | XCLASS_HAS_TYPE; break; case PT_CLIST: case PT_UCNC: - needschar = TRUE; + unicode_status |= XCLASS_SAVE_CHAR; + break; + + case PT_BOOL: + unicode_status |= XCLASS_HAS_BOOL; + break; + + case PT_BIDICL: + unicode_status |= XCLASS_HAS_BIDICL; break; default: @@ -7545,7 +7650,7 @@ if ((cc[-1] & XCL_NOT) != 0) else { #ifdef SUPPORT_UNICODE - read_char(common, min, max, (needstype || needsscript) ? backtracks : NULL, 0); + read_char(common, min, max, (unicode_status & XCLASS_NEEDS_UCD) ? backtracks : NULL, 0); #else /* !SUPPORT_UNICODE */ read_char(common, min, max, NULL, 0); #endif /* SUPPORT_UNICODE */ @@ -7562,7 +7667,7 @@ if ((cc[-1] & XCL_HASPROP) == 0) OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3); OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc); OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, TMP2, 0); add_jump(compiler, &found, JUMP(SLJIT_NOT_ZERO)); } @@ -7581,7 +7686,7 @@ else if ((cc[-1] & XCL_MAP) != 0) { OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0); #ifdef SUPPORT_UNICODE - charsaved = TRUE; + unicode_status |= XCLASS_CHAR_SAVED; #endif /* SUPPORT_UNICODE */ if (!optimize_class(common, (const sljit_u8 *)cc, FALSE, TRUE, list)) { @@ -7595,7 +7700,7 @@ else if ((cc[-1] & XCL_MAP) != 0) OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3); OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc); OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, TMP2, 0); add_jump(compiler, list, JUMP(SLJIT_NOT_ZERO)); #if PCRE2_CODE_UNIT_WIDTH == 8 @@ -7609,9 +7714,9 @@ else if ((cc[-1] & XCL_MAP) != 0) } #ifdef SUPPORT_UNICODE -if (needstype || needsscript) +if (unicode_status & XCLASS_NEEDS_UCD) { - if (needschar && !charsaved) + if ((unicode_status & (XCLASS_SAVE_CHAR | XCLASS_CHAR_SAVED)) == XCLASS_SAVE_CHAR) OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0); #if PCRE2_CODE_UNIT_WIDTH == 32 @@ -7631,17 +7736,16 @@ if (needstype || needsscript) OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_stage2)); OP1(SLJIT_MOV_U16, TMP2, 0, SLJIT_MEM2(TMP2, TMP1), 1); + OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3); + OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2); + OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); - /* Before anything else, we deal with scripts. */ - if (needsscript) - { - OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3); - OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2); - OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); - - OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script)); + ccbegin = cc; - ccbegin = cc; + if (unicode_status & XCLASS_HAS_BIDICL) + { + OP1(SLJIT_MOV_U16, TMP1, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, scriptx_bidiclass)); + OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BIDICLASS_SHIFT); while (*cc != XCL_END) { @@ -7660,7 +7764,7 @@ if (needstype || needsscript) { SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); cc++; - if (*cc == PT_SC) + if (*cc == PT_BIDICL) { compares--; invertcmp = (compares == 0 && list != backtracks); @@ -7674,52 +7778,176 @@ if (needstype || needsscript) } cc = ccbegin; + } + + if (unicode_status & XCLASS_HAS_BOOL) + { + OP1(SLJIT_MOV_U16, TMP1, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, bprops)); + OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BPROPS_MASK); + OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 2); - if (needstype) + while (*cc != XCL_END) { - /* TMP2 has already been shifted by 2 */ - if (!needschar) + if (*cc == XCL_SINGLE) { - OP2(SLJIT_ADD, TMP1, 0, TMP2, 0, TMP2, 0); - OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); - - OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); + cc ++; + GETCHARINCTEST(c, cc); + } + else if (*cc == XCL_RANGE) + { + cc ++; + GETCHARINCTEST(c, cc); + GETCHARINCTEST(c, cc); } else { - OP2(SLJIT_ADD, TMP1, 0, TMP2, 0, TMP2, 0); - OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); + SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); + cc++; + if (*cc == PT_BOOL) + { + compares--; + invertcmp = (compares == 0 && list != backtracks); + if (cc[-1] == XCL_NOTPROP) + invertcmp ^= 0x1; - OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); - OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); - typereg = RETURN_ADDR; + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(TMP1), (sljit_sw)(PRIV(ucd_boolprop_sets) + (cc[1] >> 5)), SLJIT_IMM, (sljit_sw)1 << (cc[1] & 0x1f)); + add_jump(compiler, compares > 0 ? list : backtracks, JUMP(SLJIT_NOT_ZERO ^ invertcmp)); + } + cc += 2; } } - else if (needschar) - OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); + + cc = ccbegin; } - else if (needstype) + + if (unicode_status & XCLASS_HAS_SCRIPT) { - OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3); - OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2); + OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script)); - if (!needschar) + while (*cc != XCL_END) { - OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0); + if (*cc == XCL_SINGLE) + { + cc ++; + GETCHARINCTEST(c, cc); + } + else if (*cc == XCL_RANGE) + { + cc ++; + GETCHARINCTEST(c, cc); + GETCHARINCTEST(c, cc); + } + else + { + SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); + cc++; + switch (*cc) + { + case PT_SCX: + if (cc[-1] == XCL_NOTPROP) + break; + /* Fall through */ + + case PT_SC: + compares--; + invertcmp = (compares == 0 && list != backtracks); + if (cc[-1] == XCL_NOTPROP) + invertcmp ^= 0x1; - OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); + add_jump(compiler, compares > 0 ? list : backtracks, CMP(SLJIT_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, (int)cc[1])); + } + cc += 2; + } } - else + + cc = ccbegin; + } + + if (unicode_status & XCLASS_HAS_SCRIPT_EXTENSION) + { + OP1(SLJIT_MOV_U16, TMP1, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, scriptx_bidiclass)); + OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_SCRIPTX_MASK); + OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 2); + + if (unicode_status & XCLASS_SCRIPT_EXTENSION_NOTPROP) { - OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0); + if (unicode_status & XCLASS_HAS_TYPE) + { + if (unicode_status & XCLASS_SAVE_CHAR) + { + OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, TMP2, 0); + unicode_status |= XCLASS_SCRIPT_EXTENSION_RESTORE_LOCALS0; + } + else + { + OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP2, 0); + unicode_status |= XCLASS_SCRIPT_EXTENSION_RESTORE_RETURN_ADDR; + } + } + OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script)); + } - OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); - OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); - typereg = RETURN_ADDR; + while (*cc != XCL_END) + { + if (*cc == XCL_SINGLE) + { + cc ++; + GETCHARINCTEST(c, cc); + } + else if (*cc == XCL_RANGE) + { + cc ++; + GETCHARINCTEST(c, cc); + GETCHARINCTEST(c, cc); + } + else + { + SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); + cc++; + if (*cc == PT_SCX) + { + compares--; + invertcmp = (compares == 0 && list != backtracks); + + jump = NULL; + if (cc[-1] == XCL_NOTPROP) + { + jump = CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, (int)cc[1]); + if (invertcmp) + { + add_jump(compiler, backtracks, jump); + jump = NULL; + } + invertcmp ^= 0x1; + } + + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(TMP1), (sljit_sw)(PRIV(ucd_script_sets) + (cc[1] >> 5)), SLJIT_IMM, (sljit_sw)1 << (cc[1] & 0x1f)); + add_jump(compiler, compares > 0 ? list : backtracks, JUMP(SLJIT_NOT_ZERO ^ invertcmp)); + + if (jump != NULL) + JUMPHERE(jump); + } + cc += 2; + } } + + if (unicode_status & XCLASS_SCRIPT_EXTENSION_RESTORE_LOCALS0) + OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0); + else if (unicode_status & XCLASS_SCRIPT_EXTENSION_RESTORE_RETURN_ADDR) + OP1(SLJIT_MOV, TMP2, 0, RETURN_ADDR, 0); + cc = ccbegin; } - else if (needschar) + + if (unicode_status & XCLASS_SAVE_CHAR) OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0); + + if (unicode_status & XCLASS_HAS_TYPE) + { + if (unicode_status & XCLASS_SAVE_CHAR) + typereg = RETURN_ADDR; + + OP1(SLJIT_MOV_U8, typereg, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype)); + } } #endif /* SUPPORT_UNICODE */ @@ -7743,13 +7971,13 @@ while (*cc != XCL_END) if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE)) { - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset)); OP_FLAGS(numberofcmps == 0 ? SLJIT_MOV : SLJIT_OR, TMP2, 0, SLJIT_EQUAL); numberofcmps++; } else if (numberofcmps > 0) { - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset)); OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_EQUAL); jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp); numberofcmps = 0; @@ -7769,13 +7997,13 @@ while (*cc != XCL_END) if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE)) { - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset)); OP_FLAGS(numberofcmps == 0 ? SLJIT_MOV : SLJIT_OR, TMP2, 0, SLJIT_LESS_EQUAL); numberofcmps++; } else if (numberofcmps > 0) { - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset)); OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_LESS_EQUAL); jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp); numberofcmps = 0; @@ -7801,11 +8029,11 @@ while (*cc != XCL_END) break; case PT_LAMP: - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lu - typeoffset); + OP2U(SLJIT_SUB | SLJIT_SET_Z, typereg, 0, SLJIT_IMM, ucp_Lu - typeoffset); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ll - typeoffset); + OP2U(SLJIT_SUB | SLJIT_SET_Z, typereg, 0, SLJIT_IMM, ucp_Ll - typeoffset); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lt - typeoffset); + OP2U(SLJIT_SUB | SLJIT_SET_Z, typereg, 0, SLJIT_IMM, ucp_Lt - typeoffset); OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_EQUAL); jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp); break; @@ -7821,6 +8049,9 @@ while (*cc != XCL_END) break; case PT_SC: + case PT_SCX: + case PT_BOOL: + case PT_BIDICL: compares++; /* Do nothing. */ break; @@ -7828,32 +8059,32 @@ while (*cc != XCL_END) case PT_SPACE: case PT_PXSPACE: SET_CHAR_OFFSET(9); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd - 0x9); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, 0xd - 0x9); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x9); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x85 - 0x9); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x9); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x180e - 0x9); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); SET_TYPE_OFFSET(ucp_Zl); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Zl); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Zl); OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_LESS_EQUAL); jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp); break; case PT_WORD: - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_UNDERSCORE - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_UNDERSCORE - charoffset)); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_EQUAL); /* Fall through. */ case PT_ALNUM: SET_TYPE_OFFSET(ucp_Ll); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lu - ucp_Ll); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, typereg, 0, SLJIT_IMM, ucp_Lu - ucp_Ll); OP_FLAGS((*cc == PT_ALNUM) ? SLJIT_MOV : SLJIT_OR, TMP2, 0, SLJIT_LESS_EQUAL); SET_TYPE_OFFSET(ucp_Nd); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_No - ucp_Nd); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, typereg, 0, SLJIT_IMM, ucp_No - ucp_Nd); OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_LESS_EQUAL); jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp); break; @@ -7876,7 +8107,7 @@ while (*cc != XCL_END) OP2(SLJIT_ADD, TMP2, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)charoffset); OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]); } - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, other_cases[1]); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP2, 0, SLJIT_IMM, other_cases[1]); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_EQUAL); other_cases += 2; } @@ -7889,41 +8120,41 @@ while (*cc != XCL_END) OP2(SLJIT_ADD, TMP2, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)charoffset); OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]); } - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, other_cases[2]); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP2, 0, SLJIT_IMM, other_cases[2]); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(other_cases[0] - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(other_cases[0] - charoffset)); OP_FLAGS(SLJIT_OR | ((other_cases[3] == NOTACHAR) ? SLJIT_SET_Z : 0), TMP2, 0, SLJIT_EQUAL); other_cases += 3; } else { - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(*other_cases++ - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(*other_cases++ - charoffset)); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_EQUAL); } while (*other_cases != NOTACHAR) { - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(*other_cases++ - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(*other_cases++ - charoffset)); OP_FLAGS(SLJIT_OR | ((*other_cases == NOTACHAR) ? SLJIT_SET_Z : 0), TMP2, 0, SLJIT_EQUAL); } jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp); break; case PT_UCNC: - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_DOLLAR_SIGN - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_DOLLAR_SIGN - charoffset)); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_COMMERCIAL_AT - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_COMMERCIAL_AT - charoffset)); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_GRAVE_ACCENT - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_GRAVE_ACCENT - charoffset)); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); SET_CHAR_OFFSET(0xa0); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(0xd7ff - charoffset)); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, (sljit_sw)(0xd7ff - charoffset)); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_LESS_EQUAL); SET_CHAR_OFFSET(0); - OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xe000 - 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 0xe000 - 0); OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_GREATER_EQUAL); jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp); break; @@ -7931,20 +8162,20 @@ while (*cc != XCL_END) case PT_PXGRAPH: /* C and Z groups are the farthest two groups. */ SET_TYPE_OFFSET(ucp_Ll); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_GREATER); jump = CMP(SLJIT_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll); /* In case of ucp_Cf, we overwrite the result. */ SET_CHAR_OFFSET(0x2066); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x2066); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x180e - 0x2066); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); JUMPHERE(jump); @@ -7954,20 +8185,20 @@ while (*cc != XCL_END) case PT_PXPRINT: /* C and Z groups are the farthest two groups. */ SET_TYPE_OFFSET(ucp_Ll); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_GREATER); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Ll); + OP2U(SLJIT_SUB | SLJIT_SET_Z, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Ll); OP_FLAGS(SLJIT_AND, TMP2, 0, SLJIT_NOT_EQUAL); jump = CMP(SLJIT_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll); /* In case of ucp_Cf, we overwrite the result. */ SET_CHAR_OFFSET(0x2066); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS_EQUAL); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066); OP_FLAGS(SLJIT_OR, TMP2, 0, SLJIT_EQUAL); JUMPHERE(jump); @@ -7976,15 +8207,15 @@ while (*cc != XCL_END) case PT_PXPUNCT: SET_TYPE_OFFSET(ucp_Sc); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Sc); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, typereg, 0, SLJIT_IMM, ucp_So - ucp_Sc); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS_EQUAL); SET_CHAR_OFFSET(0); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x7f); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, TMP1, 0, SLJIT_IMM, 0x7f); OP_FLAGS(SLJIT_AND, TMP2, 0, SLJIT_LESS_EQUAL); SET_TYPE_OFFSET(ucp_Pc); - OP2(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ps - ucp_Pc); + OP2U(SLJIT_SUB | SLJIT_SET_LESS_EQUAL, typereg, 0, SLJIT_IMM, ucp_Ps - ucp_Pc); OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_LESS_EQUAL); jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp); break; @@ -8069,9 +8300,9 @@ switch(type) else { jump[1] = CMP(SLJIT_EQUAL, TMP2, 0, STR_END, 0); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP2, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP2, 0, STR_END, 0); OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_LESS); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff); OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_NOT_EQUAL); add_jump(compiler, backtracks, JUMP(SLJIT_NOT_EQUAL)); check_partial(common, TRUE); @@ -8094,7 +8325,7 @@ switch(type) OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0)); jump[1] = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR); OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2)); - OP2(SLJIT_SUB | SLJIT_SET_Z | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, TMP2, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_Z | SLJIT_SET_GREATER, TMP2, 0, STR_END, 0); jump[2] = JUMP(SLJIT_GREATER); add_jump(compiler, backtracks, JUMP(SLJIT_NOT_EQUAL) /* LESS */); /* Equal. */ @@ -8137,10 +8368,10 @@ switch(type) if (HAS_VIRTUAL_REGISTERS) { OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); } else - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO)); if (!common->endonly) @@ -8157,10 +8388,10 @@ switch(type) if (HAS_VIRTUAL_REGISTERS) { OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); } else - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL); add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO)); check_partial(common, FALSE); jump[0] = JUMP(SLJIT_JUMP); @@ -8200,14 +8431,14 @@ switch(type) OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0); OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin)); add_jump(compiler, backtracks, CMP(SLJIT_GREATER, STR_PTR, 0, TMP1, 0)); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO)); } else { OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); add_jump(compiler, backtracks, CMP(SLJIT_GREATER, STR_PTR, 0, TMP1, 0)); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO)); } return cc; @@ -8219,13 +8450,13 @@ switch(type) OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin)); jump[1] = CMP(SLJIT_GREATER, STR_PTR, 0, TMP2, 0); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); } else { OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, begin)); jump[1] = CMP(SLJIT_GREATER, STR_PTR, 0, TMP2, 0); - OP2(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_UNUSED, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); + OP2U(SLJIT_AND32 | SLJIT_SET_Z, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL); } add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO)); jump[0] = JUMP(SLJIT_JUMP); @@ -8319,7 +8550,7 @@ do /* Not breaking between Regional Indicators is allowed only if there are an even number of preceding RIs. */ - if (lgb == ucp_gbRegionalIndicator && rgb == ucp_gbRegionalIndicator) + if (lgb == ucp_gbRegional_Indicator && rgb == ucp_gbRegional_Indicator) { ricount = 0; bptr = prevcc; @@ -8331,7 +8562,7 @@ do BACKCHAR(bptr); GETCHAR(c, bptr); - if (UCD_GRAPHBREAK(c) != ucp_gbRegionalIndicator) + if (UCD_GRAPHBREAK(c) != ucp_gbRegional_Indicator) break; ricount++; @@ -8387,7 +8618,7 @@ do /* Not breaking between Regional Indicators is allowed only if there are an even number of preceding RIs. */ - if (lgb == ucp_gbRegionalIndicator && rgb == ucp_gbRegionalIndicator) + if (lgb == ucp_gbRegional_Indicator && rgb == ucp_gbRegional_Indicator) { ricount = 0; bptr = prevcc; @@ -8397,7 +8628,7 @@ do { GETCHARBACK_INVALID(c, bptr, start_subject, break); - if (UCD_GRAPHBREAK(c) != ucp_gbRegionalIndicator) + if (UCD_GRAPHBREAK(c) != ucp_gbRegional_Indicator) break; ricount++; @@ -8455,7 +8686,7 @@ while (cc < end_subject) /* Not breaking between Regional Indicators is allowed only if there are an even number of preceding RIs. */ - if (lgb == ucp_gbRegionalIndicator && rgb == ucp_gbRegionalIndicator) + if (lgb == ucp_gbRegional_Indicator && rgb == ucp_gbRegional_Indicator) { ricount = 0; bptr = cc - 1; @@ -8470,7 +8701,7 @@ while (cc < end_subject) break; #endif /* PCRE2_CODE_UNIT_WIDTH == 32 */ - if (UCD_GRAPHBREAK(c) != ucp_gbRegionalIndicator) break; + if (UCD_GRAPHBREAK(c) != ucp_gbRegional_Indicator) break; ricount++; } @@ -8520,7 +8751,7 @@ switch(type) #endif read_char8_type(common, backtracks, type == OP_NOT_DIGIT); /* Flip the starting bit in the negative case. */ - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_digit); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, ctype_digit); add_jump(compiler, backtracks, JUMP(type == OP_DIGIT ? SLJIT_ZERO : SLJIT_NOT_ZERO)); return cc; @@ -8534,7 +8765,7 @@ switch(type) else #endif read_char8_type(common, backtracks, type == OP_NOT_WHITESPACE); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_space); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, ctype_space); add_jump(compiler, backtracks, JUMP(type == OP_WHITESPACE ? SLJIT_ZERO : SLJIT_NOT_ZERO)); return cc; @@ -8548,7 +8779,7 @@ switch(type) else #endif read_char8_type(common, backtracks, type == OP_NOT_WORDCHAR); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_word); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, ctype_word); add_jump(compiler, backtracks, JUMP(type == OP_WORDCHAR ? SLJIT_ZERO : SLJIT_NOT_ZERO)); return cc; @@ -8596,7 +8827,7 @@ switch(type) #elif PCRE2_CODE_UNIT_WIDTH == 16 jump[0] = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xd800); OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00); - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, 0xd800); OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_EQUAL); OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1); OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0); @@ -8690,13 +8921,13 @@ switch(type) OP1(SLJIT_MOV, SLJIT_R0, 0, ARGUMENTS, 0); #if PCRE2_CODE_UNIT_WIDTH != 32 - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, - common->utf ? (common->invalid_utf ? SLJIT_FUNC_OFFSET(do_extuni_utf_invalid) : SLJIT_FUNC_OFFSET(do_extuni_utf)) : SLJIT_FUNC_OFFSET(do_extuni_no_utf)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS2(W, W, W), SLJIT_IMM, + common->utf ? (common->invalid_utf ? SLJIT_FUNC_ADDR(do_extuni_utf_invalid) : SLJIT_FUNC_ADDR(do_extuni_utf)) : SLJIT_FUNC_ADDR(do_extuni_no_utf)); if (common->invalid_utf) add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0)); #else - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, - common->invalid_utf ? SLJIT_FUNC_OFFSET(do_extuni_utf_invalid) : SLJIT_FUNC_OFFSET(do_extuni_no_utf)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS2(W, W, W), SLJIT_IMM, + common->invalid_utf ? SLJIT_FUNC_ADDR(do_extuni_utf_invalid) : SLJIT_FUNC_ADDR(do_extuni_no_utf)); if (!common->utf || common->invalid_utf) add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0)); #endif @@ -8758,7 +8989,7 @@ switch(type) if (sljit_has_cpu_feature(SLJIT_HAS_CMOV)) { - OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, oc); + OP2U(SLJIT_SUB | SLJIT_SET_Z, TMP1, 0, SLJIT_IMM, oc); CMOV(SLJIT_EQUAL, TMP1, SLJIT_IMM, c); add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, c)); } @@ -8878,7 +9109,7 @@ switch(type) OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3); OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc); OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP1, 0, TMP2, 0); add_jump(compiler, backtracks, JUMP(SLJIT_ZERO)); #if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8 @@ -9116,7 +9347,7 @@ if (common->utf && *cc == OP_REFI) caseless_loop = LABEL(); OP1(SLJIT_MOV_U32, TMP1, 0, SLJIT_MEM1(TMP2), 0); OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, sizeof(uint32_t)); - OP2(SLJIT_SUB | SLJIT_SET_Z | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, char1_reg, 0); + OP2U(SLJIT_SUB | SLJIT_SET_Z | SLJIT_SET_LESS, TMP1, 0, char1_reg, 0); JUMPTO(SLJIT_EQUAL, loop); JUMPTO(SLJIT_LESS, caseless_loop); @@ -9575,12 +9806,12 @@ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STR_PTR, 0); /* SLJIT_R0 = arguments */ OP1(SLJIT_MOV, SLJIT_R1, 0, STACK_TOP, 0); GET_LOCAL_BASE(SLJIT_R2, 0, OVECTOR_START); -sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(S32) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(do_callout)); +sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS3(32, W, W, W), SLJIT_IMM, SLJIT_FUNC_ADDR(do_callout)); OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0); free_stack(common, callout_arg_size); /* Check return value. */ -OP2(SLJIT_SUB32 | SLJIT_SET_Z | SLJIT_SET_SIG_GREATER, SLJIT_UNUSED, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0); +OP2U(SLJIT_SUB32 | SLJIT_SET_Z | SLJIT_SET_SIG_GREATER, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0); add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_SIG_GREATER)); if (common->abort_label == NULL) add_jump(compiler, &common->abort, JUMP(SLJIT_NOT_EQUAL) /* SIG_LESS */); @@ -10148,10 +10379,10 @@ SLJIT_ASSERT(TMP1 == SLJIT_R0 && STR_PTR == SLJIT_R1); OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr); #ifdef SUPPORT_UNICODE -sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, - common->utf ? SLJIT_FUNC_OFFSET(do_script_run_utf) : SLJIT_FUNC_OFFSET(do_script_run)); +sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS2(W, W, W), SLJIT_IMM, + common->utf ? SLJIT_FUNC_ADDR(do_script_run_utf) : SLJIT_FUNC_ADDR(do_script_run)); #else -sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(do_script_run)); +sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS2(W, W, W), SLJIT_IMM, SLJIT_FUNC_ADDR(do_script_run)); #endif OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0); @@ -11374,7 +11605,7 @@ switch(opcode) if (common->mode == PCRE2_JIT_COMPLETE) { - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, STR_PTR, 0, STR_END, 0); CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); } else @@ -11667,7 +11898,7 @@ switch(opcode) if (common->mode == PCRE2_JIT_COMPLETE) { - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, STR_PTR, 0, STR_END, 0); CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); } else @@ -11751,9 +11982,9 @@ if (HAS_VIRTUAL_REGISTERS) else OP1(SLJIT_MOV_U32, TMP2, 0, SLJIT_MEM1(ARGUMENTS), SLJIT_OFFSETOF(jit_arguments, options)); -OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY); +OP2U(SLJIT_AND | SLJIT_SET_Z, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY); add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_NOT_ZERO)); -OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY_ATSTART); +OP2U(SLJIT_AND | SLJIT_SET_Z, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY_ATSTART); if (common->accept_label == NULL) add_jump(compiler, &common->accept, JUMP(SLJIT_ZERO)); else @@ -13004,7 +13235,7 @@ if (opcode == OP_SKIP_ARG) SLJIT_ASSERT(common->control_head_ptr != 0 && TMP1 == SLJIT_R0 && STR_PTR == SLJIT_R1); OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr); OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, (sljit_sw)(current->cc + 2)); - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(do_search_mark)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS2(W, W, W), SLJIT_IMM, SLJIT_FUNC_ADDR(do_search_mark)); OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_R0, 0); add_jump(compiler, &common->reset_match, CMP(SLJIT_NOT_EQUAL, SLJIT_R0, 0, SLJIT_IMM, 0)); @@ -13248,10 +13479,8 @@ DEFINE_COMPILER; PCRE2_SPTR cc = common->start + common->currententry->start; PCRE2_SPTR ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE); PCRE2_SPTR ccend = bracketend(cc) - (1 + LINK_SIZE); -BOOL needs_control_head; -BOOL has_quit; -BOOL has_accept; -int private_data_size = get_recurse_data_length(common, ccbegin, ccend, &needs_control_head, &has_quit, &has_accept); +uint32_t recurse_flags = 0; +int private_data_size = get_recurse_data_length(common, ccbegin, ccend, &recurse_flags); int alt_count, alt_max, local_size; backtrack_common altbacktrack; jump_list *match = NULL; @@ -13285,12 +13514,12 @@ allocate_stack(common, private_data_size + local_size); /* Save return address. */ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(local_size - 1), TMP2, 0); -copy_recurse_data(common, ccbegin, ccend, recurse_copy_from_global, local_size, private_data_size + local_size, has_quit); +copy_recurse_data(common, ccbegin, ccend, recurse_copy_from_global, local_size, private_data_size + local_size, recurse_flags); /* This variable is saved and restored all time when we enter or exit from a recursive context. */ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr, STACK_TOP, 0); -if (needs_control_head) +if (recurse_flags & recurse_flag_control_head_found) OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_IMM, 0); if (alt_max > 1) @@ -13315,10 +13544,10 @@ while (1) if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) return; - allocate_stack(common, (alt_max > 1 || has_accept) ? 2 : 1); + allocate_stack(common, (alt_max > 1 || (recurse_flags & recurse_flag_accept_found)) ? 2 : 1); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr); - if (alt_max > 1 || has_accept) + if (alt_max > 1 || (recurse_flags & recurse_flag_accept_found)) { if (alt_max > 3) put_label = sljit_emit_put_label(compiler, SLJIT_MEM1(STACK_TOP), STACK(1)); @@ -13337,14 +13566,14 @@ while (1) sljit_emit_fast_enter(compiler, TMP1, 0); - if (has_accept) + if (recurse_flags & recurse_flag_accept_found) accept_exit = CMP(SLJIT_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, -1); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0)); /* Save return address. */ OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), STACK(local_size - 1), TMP1, 0); - copy_recurse_data(common, ccbegin, ccend, recurse_swap_global, local_size, private_data_size + local_size, has_quit); + copy_recurse_data(common, ccbegin, ccend, recurse_swap_global, local_size, private_data_size + local_size, recurse_flags); if (alt_max > 1) { @@ -13361,7 +13590,7 @@ while (1) next_alt = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0); } else - free_stack(common, has_accept ? 2 : 1); + free_stack(common, (recurse_flags & recurse_flag_accept_found) ? 2 : 1); } else if (alt_max > 3) { @@ -13396,7 +13625,7 @@ while (1) quit = LABEL(); -copy_recurse_data(common, ccbegin, ccend, recurse_copy_private_to_global, local_size, private_data_size + local_size, has_quit); +copy_recurse_data(common, ccbegin, ccend, recurse_copy_private_to_global, local_size, private_data_size + local_size, recurse_flags); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(local_size - 1)); free_stack(common, private_data_size + local_size); @@ -13405,15 +13634,15 @@ OP_SRC(SLJIT_FAST_RETURN, TMP2, 0); if (common->quit != NULL) { - SLJIT_ASSERT(has_quit); + SLJIT_ASSERT(recurse_flags & recurse_flag_quit_found); set_jumps(common->quit, LABEL()); OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr); - copy_recurse_data(common, ccbegin, ccend, recurse_copy_shared_to_global, local_size, private_data_size + local_size, has_quit); + copy_recurse_data(common, ccbegin, ccend, recurse_copy_shared_to_global, local_size, private_data_size + local_size, recurse_flags); JUMPTO(SLJIT_JUMP, quit); } -if (has_accept) +if (recurse_flags & recurse_flag_accept_found) { JUMPHERE(accept_exit); free_stack(common, 2); @@ -13421,7 +13650,7 @@ if (has_accept) /* Save return address. */ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(local_size - 1), TMP1, 0); - copy_recurse_data(common, ccbegin, ccend, recurse_copy_kept_shared_to_global, local_size, private_data_size + local_size, has_quit); + copy_recurse_data(common, ccbegin, ccend, recurse_copy_kept_shared_to_global, local_size, private_data_size + local_size, recurse_flags); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(local_size - 1)); free_stack(common, private_data_size + local_size); @@ -13431,7 +13660,7 @@ if (has_accept) if (common->accept != NULL) { - SLJIT_ASSERT(has_accept); + SLJIT_ASSERT(recurse_flags & recurse_flag_accept_found); set_jumps(common->accept, LABEL()); @@ -13446,7 +13675,7 @@ set_jumps(match, LABEL()); OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0); -copy_recurse_data(common, ccbegin, ccend, recurse_swap_global, local_size, private_data_size + local_size, has_quit); +copy_recurse_data(common, ccbegin, ccend, recurse_swap_global, local_size, private_data_size + local_size, recurse_flags); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), STACK(local_size - 1)); OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 1); @@ -13652,7 +13881,7 @@ SLJIT_ASSERT(!(common->req_char_ptr != 0 && common->start_used_ptr != 0)); common->cbra_ptr = OVECTOR_START + (re->top_bracket + 1) * 2 * sizeof(sljit_sw); total_length = ccend - common->start; -common->private_data_ptrs = (sljit_s32 *)SLJIT_MALLOC(total_length * (sizeof(sljit_s32) + (common->has_then ? 1 : 0)), allocator_data); +common->private_data_ptrs = (sljit_s32*)SLJIT_MALLOC(total_length * (sizeof(sljit_s32) + (common->has_then ? 1 : 0)), allocator_data); if (!common->private_data_ptrs) { SLJIT_FREE(common->optimized_cbracket, allocator_data); @@ -13692,8 +13921,9 @@ if (!compiler) } common->compiler = compiler; -/* Main pcre_jit_exec entry. */ -sljit_emit_enter(compiler, 0, SLJIT_ARG1(SW), 5, 5, 0, 0, private_data_size); +/* Main pcre2_jit_exec entry. */ +SLJIT_ASSERT((private_data_size & (sizeof(sljit_sw) - 1)) == 0); +sljit_emit_enter(compiler, 0, SLJIT_ARGS1(W, W), 5, 5, 0, 0, private_data_size); /* Register init. */ reset_ovector(common, (re->top_bracket + 1) * 2); @@ -13900,9 +14130,9 @@ if (common->might_be_empty) JUMPHERE(empty_match); OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0); OP1(SLJIT_MOV_U32, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options)); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY); JUMPTO(SLJIT_NOT_ZERO, empty_match_backtrack_label); - OP2(SLJIT_AND | SLJIT_SET_Z, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY_ATSTART); + OP2U(SLJIT_AND | SLJIT_SET_Z, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY_ATSTART); JUMPTO(SLJIT_ZERO, empty_match_found_label); OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str)); CMPTO(SLJIT_NOT_EQUAL, TMP2, 0, STR_PTR, 0, empty_match_found_label); @@ -13915,20 +14145,40 @@ common->early_fail_end_ptr = 0; common->currententry = common->entries; common->local_quit_available = TRUE; quit_label = common->quit_label; -while (common->currententry != NULL) +if (common->currententry != NULL) { - /* Might add new entries. */ - compile_recurse(common); - if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) + /* A free bit for each private data. */ + common->recurse_bitset_size = ((private_data_size / (int)sizeof(sljit_sw)) + 7) >> 3; + SLJIT_ASSERT(common->recurse_bitset_size > 0); + common->recurse_bitset = (sljit_u8*)SLJIT_MALLOC(common->recurse_bitset_size, allocator_data);; + + if (common->recurse_bitset != NULL) + { + do + { + /* Might add new entries. */ + compile_recurse(common); + if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) + break; + flush_stubs(common); + common->currententry = common->currententry->next; + } + while (common->currententry != NULL); + + SLJIT_FREE(common->recurse_bitset, allocator_data); + } + + if (common->currententry != NULL) { + /* The common->recurse_bitset has been freed. */ + SLJIT_ASSERT(sljit_get_compiler_error(compiler) || common->recurse_bitset == NULL); + sljit_free_compiler(compiler); SLJIT_FREE(common->optimized_cbracket, allocator_data); SLJIT_FREE(common->private_data_ptrs, allocator_data); PRIV(jit_free_rodata)(common->read_only_data_head, allocator_data); return PCRE2_ERROR_NOMEMORY; } - flush_stubs(common); - common->currententry = common->currententry->next; } common->local_quit_available = FALSE; common->quit_label = quit_label; @@ -13947,7 +14197,7 @@ OP2(SLJIT_SUB, SLJIT_R1, 0, STACK_LIMIT, 0, SLJIT_IMM, STACK_GROWTH_RATE); OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, stack)); OP1(SLJIT_MOV, STACK_LIMIT, 0, TMP2, 0); -sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_stack_resize)); +sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS2(W, W, W), SLJIT_IMM, SLJIT_FUNC_ADDR(sljit_stack_resize)); jump = CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0); OP1(SLJIT_MOV, TMP2, 0, STACK_LIMIT, 0); diff --git a/thirdparty/pcre2/src/pcre2_jit_match.c b/thirdparty/pcre2/src/pcre2_jit_match.c index 7e13b8cfee..1ab3af073e 100644 --- a/thirdparty/pcre2/src/pcre2_jit_match.c +++ b/thirdparty/pcre2/src/pcre2_jit_match.c @@ -120,7 +120,7 @@ else if ((options & PCRE2_PARTIAL_SOFT) != 0) if (functions == NULL || functions->executable_funcs[index] == NULL) return PCRE2_ERROR_JIT_BADOPTION; -/* Sanity checks should be handled by pcre_exec. */ +/* Sanity checks should be handled by pcre2_match. */ arguments.str = subject + start_offset; arguments.begin = subject; arguments.end = subject + length; diff --git a/thirdparty/pcre2/src/pcre2_jit_misc.c b/thirdparty/pcre2/src/pcre2_jit_misc.c index ec924e0f9b..e57afad065 100644 --- a/thirdparty/pcre2/src/pcre2_jit_misc.c +++ b/thirdparty/pcre2/src/pcre2_jit_misc.c @@ -135,7 +135,7 @@ return NULL; pcre2_jit_stack *jit_stack; -if (startsize < 1 || maxsize < 1) +if (startsize == 0 || maxsize == 0 || maxsize > SIZE_MAX - STACK_GROWTH_RATE) return NULL; if (startsize > maxsize) startsize = maxsize; diff --git a/thirdparty/pcre2/src/pcre2_jit_simd_inc.h b/thirdparty/pcre2/src/pcre2_jit_simd_inc.h index aa029cce38..d99cfc5ce4 100644 --- a/thirdparty/pcre2/src/pcre2_jit_simd_inc.h +++ b/thirdparty/pcre2/src/pcre2_jit_simd_inc.h @@ -339,7 +339,7 @@ if (common->mode != PCRE2_JIT_COMPLETE) { JUMPHERE(partial_quit[0]); JUMPHERE(partial_quit[1]); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, STR_PTR, 0, STR_END, 0); CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); } else @@ -537,7 +537,7 @@ if (common->match_end_ptr != 0) OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(offs1 + 1)); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, STR_END, 0); CMOV(SLJIT_LESS, STR_END, TMP1, 0); } @@ -883,14 +883,14 @@ if (char1 == char2) #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 if (common->utf && offset > 0) - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_utf)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_utf)); else - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs)); #else - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs)); #endif } else @@ -904,14 +904,14 @@ else #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 if (common->utf && offset > 0) - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask_utf)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_mask_utf)); else - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_mask)); #else - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_mask)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_mask)); #endif } else @@ -922,14 +922,14 @@ else #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 if (common->utf && offset > 0) - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2_utf)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_2_utf)); else - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_2)); #else - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(UW) | SLJIT_ARG3(UW) | SLJIT_ARG4(UW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcs_2)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcs_2)); #endif } } @@ -1067,7 +1067,7 @@ else OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr); OP2(SLJIT_ADD, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, IN_UCHARS(offs1 + 1)); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, STR_END, 0, SLJIT_R0, 0); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, STR_END, 0, SLJIT_R0, 0); CMOV(SLJIT_LESS, SLJIT_R0, STR_END, 0); } @@ -1084,31 +1084,31 @@ if (diff == 1) { if (char1a == char1b && char2a == char2b) { #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 if (common->utf) - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_0_utf)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_0_utf)); else #endif - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_0)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_0)); } else { #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 if (common->utf) - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_1_utf)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_1_utf)); else #endif - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_1)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_1)); } } else { #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 if (common->utf) - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_default_utf)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_default_utf)); else #endif - sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), - SLJIT_IMM, SLJIT_FUNC_OFFSET(ffcps_default)); + sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS4(W, W, W, W, W), + SLJIT_IMM, SLJIT_FUNC_ADDR(ffcps_default)); } /* Restore STR_PTR register. */ @@ -1418,7 +1418,7 @@ if (common->mode != PCRE2_JIT_COMPLETE) { JUMPHERE(partial_quit[0]); JUMPHERE(partial_quit[1]); - OP2(SLJIT_SUB | SLJIT_SET_GREATER, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_GREATER, STR_PTR, 0, STR_END, 0); CMOV(SLJIT_GREATER, STR_PTR, STR_END, 0); } else @@ -1673,7 +1673,7 @@ if (common->match_end_ptr != 0) OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(offs1 + 1)); - OP2(SLJIT_SUB | SLJIT_SET_LESS, SLJIT_UNUSED, 0, TMP1, 0, STR_END, 0); + OP2U(SLJIT_SUB | SLJIT_SET_LESS, TMP1, 0, STR_END, 0); CMOV(SLJIT_LESS, STR_END, TMP1, 0); } diff --git a/thirdparty/pcre2/src/pcre2_match.c b/thirdparty/pcre2/src/pcre2_match.c index f28cdbb47a..6354e1bb9e 100644 --- a/thirdparty/pcre2/src/pcre2_match.c +++ b/thirdparty/pcre2/src/pcre2_match.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2015-2021 University of Cambridge + New API code Copyright (c) 2015-2022 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ POSSIBILITY OF SUCH DAMAGE. /* #define DEBUG_SHOW_OPS */ /* #define DEBUG_SHOW_RMATCH */ -#ifdef DEBUG_FRAME_DISPLAY +#ifdef DEBUG_FRAMES_DISPLAY #include <stdarg.h> #endif @@ -159,7 +159,8 @@ enum { RM100=100, RM101 }; #ifdef SUPPORT_UNICODE enum { RM200=200, RM201, RM202, RM203, RM204, RM205, RM206, RM207, RM208, RM209, RM210, RM211, RM212, RM213, RM214, RM215, - RM216, RM217, RM218, RM219, RM220, RM221, RM222 }; + RM216, RM217, RM218, RM219, RM220, RM221, RM222, RM223, + RM224, RM225 }; #endif /* Define short names for general fields in the current backtrack frame, which @@ -2421,40 +2422,49 @@ fprintf(stderr, "++ op=%d\n", *Fecode); { const uint32_t *cp; const ucd_record *prop = GET_UCD(fc); + BOOL notmatch = Fop == OP_NOTPROP; switch(Fecode[1]) { case PT_ANY: - if (Fop == OP_NOTPROP) RRETURN(MATCH_NOMATCH); + if (notmatch) RRETURN(MATCH_NOMATCH); break; case PT_LAMP: if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || - prop->chartype == ucp_Lt) == (Fop == OP_NOTPROP)) + prop->chartype == ucp_Lt) == notmatch) RRETURN(MATCH_NOMATCH); break; case PT_GC: - if ((Fecode[2] != PRIV(ucp_gentype)[prop->chartype]) == (Fop == OP_PROP)) + if ((Fecode[2] == PRIV(ucp_gentype)[prop->chartype]) == notmatch) RRETURN(MATCH_NOMATCH); break; case PT_PC: - if ((Fecode[2] != prop->chartype) == (Fop == OP_PROP)) + if ((Fecode[2] == prop->chartype) == notmatch) RRETURN(MATCH_NOMATCH); break; case PT_SC: - if ((Fecode[2] != prop->script) == (Fop == OP_PROP)) + if ((Fecode[2] == prop->script) == notmatch) RRETURN(MATCH_NOMATCH); break; + case PT_SCX: + { + BOOL ok = (Fecode[2] == prop->script || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), Fecode[2]) != 0); + if (ok == notmatch) RRETURN(MATCH_NOMATCH); + } + break; + /* These are specials */ case PT_ALNUM: if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || - PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (Fop == OP_NOTPROP)) + PRIV(ucp_gentype)[prop->chartype] == ucp_N) == notmatch) RRETURN(MATCH_NOMATCH); break; @@ -2468,12 +2478,12 @@ fprintf(stderr, "++ op=%d\n", *Fecode); { HSPACE_CASES: VSPACE_CASES: - if (Fop == OP_NOTPROP) RRETURN(MATCH_NOMATCH); + if (notmatch) RRETURN(MATCH_NOMATCH); break; default: - if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == - (Fop == OP_NOTPROP)) RRETURN(MATCH_NOMATCH); + if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == notmatch) + RRETURN(MATCH_NOMATCH); break; } break; @@ -2481,7 +2491,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); case PT_WORD: if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || PRIV(ucp_gentype)[prop->chartype] == ucp_N || - fc == CHAR_UNDERSCORE) == (Fop == OP_NOTPROP)) + fc == CHAR_UNDERSCORE) == notmatch) RRETURN(MATCH_NOMATCH); break; @@ -2490,19 +2500,32 @@ fprintf(stderr, "++ op=%d\n", *Fecode); for (;;) { if (fc < *cp) - { if (Fop == OP_PROP) { RRETURN(MATCH_NOMATCH); } else break; } + { if (notmatch) break; else { RRETURN(MATCH_NOMATCH); } } if (fc == *cp++) - { if (Fop == OP_PROP) break; else { RRETURN(MATCH_NOMATCH); } } + { if (notmatch) { RRETURN(MATCH_NOMATCH); } else break; } } break; case PT_UCNC: if ((fc == CHAR_DOLLAR_SIGN || fc == CHAR_COMMERCIAL_AT || fc == CHAR_GRAVE_ACCENT || (fc >= 0xa0 && fc <= 0xd7ff) || - fc >= 0xe000) == (Fop == OP_NOTPROP)) + fc >= 0xe000) == notmatch) RRETURN(MATCH_NOMATCH); break; + case PT_BIDICL: + if ((UCD_BIDICLASS_PROP(prop) == Fecode[2]) == notmatch) + RRETURN(MATCH_NOMATCH); + break; + + case PT_BOOL: + { + BOOL ok = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), Fecode[2]) != 0; + if (ok == notmatch) RRETURN(MATCH_NOMATCH); + } + break; + /* This should never occur */ default: @@ -2616,18 +2639,20 @@ fprintf(stderr, "++ op=%d\n", *Fecode); /* First, ensure the minimum number of matches are present. Use inline code for maximizing the speed, and do the type test once at the start - (i.e. keep it out of the loop). The code for UTF mode is separated out for - tidiness, except for Unicode property tests. */ + (i.e. keep it out of the loops). As there are no calls to RMATCH in the + loops, we can use an ordinary variable for "notmatch". The code for UTF + mode is separated out for tidiness, except for Unicode property tests. */ if (Lmin > 0) { #ifdef SUPPORT_UNICODE if (proptype >= 0) /* Property tests in all modes */ { + BOOL notmatch = Lctype == OP_NOTPROP; switch(proptype) { case PT_ANY: - if (Lctype == OP_NOTPROP) RRETURN(MATCH_NOMATCH); + if (notmatch) RRETURN(MATCH_NOMATCH); for (i = 1; i <= Lmin; i++) { if (Feptr >= mb->end_subject) @@ -2652,7 +2677,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); chartype = UCD_CHARTYPE(fc); if ((chartype == ucp_Lu || chartype == ucp_Ll || - chartype == ucp_Lt) == (Lctype == OP_NOTPROP)) + chartype == ucp_Lt) == notmatch) RRETURN(MATCH_NOMATCH); } break; @@ -2666,7 +2691,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); RRETURN(MATCH_NOMATCH); } GETCHARINCTEST(fc, Feptr); - if ((UCD_CATEGORY(fc) == Lpropvalue) == (Lctype == OP_NOTPROP)) + if ((UCD_CATEGORY(fc) == Lpropvalue) == notmatch) RRETURN(MATCH_NOMATCH); } break; @@ -2680,7 +2705,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); RRETURN(MATCH_NOMATCH); } GETCHARINCTEST(fc, Feptr); - if ((UCD_CHARTYPE(fc) == Lpropvalue) == (Lctype == OP_NOTPROP)) + if ((UCD_CHARTYPE(fc) == Lpropvalue) == notmatch) RRETURN(MATCH_NOMATCH); } break; @@ -2694,7 +2719,26 @@ fprintf(stderr, "++ op=%d\n", *Fecode); RRETURN(MATCH_NOMATCH); } GETCHARINCTEST(fc, Feptr); - if ((UCD_SCRIPT(fc) == Lpropvalue) == (Lctype == OP_NOTPROP)) + if ((UCD_SCRIPT(fc) == Lpropvalue) == notmatch) + RRETURN(MATCH_NOMATCH); + } + break; + + case PT_SCX: + for (i = 1; i <= Lmin; i++) + { + BOOL ok; + const ucd_record *prop; + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); + RRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(fc, Feptr); + prop = GET_UCD(fc); + ok = (prop->script == Lpropvalue || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), Lpropvalue) != 0); + if (ok == notmatch) RRETURN(MATCH_NOMATCH); } break; @@ -2710,7 +2754,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); } GETCHARINCTEST(fc, Feptr); category = UCD_CATEGORY(fc); - if ((category == ucp_L || category == ucp_N) == (Lctype == OP_NOTPROP)) + if ((category == ucp_L || category == ucp_N) == notmatch) RRETURN(MATCH_NOMATCH); } break; @@ -2733,11 +2777,11 @@ fprintf(stderr, "++ op=%d\n", *Fecode); { HSPACE_CASES: VSPACE_CASES: - if (Lctype == OP_NOTPROP) RRETURN(MATCH_NOMATCH); + if (notmatch) RRETURN(MATCH_NOMATCH); break; default: - if ((UCD_CATEGORY(fc) == ucp_Z) == (Lctype == OP_NOTPROP)) + if ((UCD_CATEGORY(fc) == ucp_Z) == notmatch) RRETURN(MATCH_NOMATCH); break; } @@ -2756,7 +2800,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); GETCHARINCTEST(fc, Feptr); category = UCD_CATEGORY(fc); if ((category == ucp_L || category == ucp_N || - fc == CHAR_UNDERSCORE) == (Lctype == OP_NOTPROP)) + fc == CHAR_UNDERSCORE) == notmatch) RRETURN(MATCH_NOMATCH); } break; @@ -2776,12 +2820,12 @@ fprintf(stderr, "++ op=%d\n", *Fecode); { if (fc < *cp) { - if (Lctype == OP_NOTPROP) break; + if (notmatch) break; RRETURN(MATCH_NOMATCH); } if (fc == *cp++) { - if (Lctype == OP_NOTPROP) RRETURN(MATCH_NOMATCH); + if (notmatch) RRETURN(MATCH_NOMATCH); break; } } @@ -2799,7 +2843,40 @@ fprintf(stderr, "++ op=%d\n", *Fecode); GETCHARINCTEST(fc, Feptr); if ((fc == CHAR_DOLLAR_SIGN || fc == CHAR_COMMERCIAL_AT || fc == CHAR_GRAVE_ACCENT || (fc >= 0xa0 && fc <= 0xd7ff) || - fc >= 0xe000) == (Lctype == OP_NOTPROP)) + fc >= 0xe000) == notmatch) + RRETURN(MATCH_NOMATCH); + } + break; + + case PT_BIDICL: + for (i = 1; i <= Lmin; i++) + { + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); + RRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(fc, Feptr); + if ((UCD_BIDICLASS(fc) == Lpropvalue) == notmatch) + RRETURN(MATCH_NOMATCH); + } + break; + + case PT_BOOL: + for (i = 1; i <= Lmin; i++) + { + BOOL ok; + const ucd_record *prop; + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); + RRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(fc, Feptr); + prop = GET_UCD(fc); + ok = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), Lpropvalue) != 0; + if (ok == notmatch) RRETURN(MATCH_NOMATCH); } break; @@ -3343,7 +3420,9 @@ fprintf(stderr, "++ op=%d\n", *Fecode); if (Lmin == Lmax) continue; /* If minimizing, we have to test the rest of the pattern before each - subsequent match. */ + subsequent match. This means we cannot use a local "notmatch" variable as + in the other cases. As all 4 temporary 32-bit values in the frame are + already in use, just test the type each time. */ if (reptype == REPTYPE_MIN) { @@ -3440,6 +3519,28 @@ fprintf(stderr, "++ op=%d\n", *Fecode); } /* Control never gets here */ + case PT_SCX: + for (;;) + { + BOOL ok; + const ucd_record *prop; + RMATCH(Fecode, RM225); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (Lmin++ >= Lmax) RRETURN(MATCH_NOMATCH); + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); + RRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(fc, Feptr); + prop = GET_UCD(fc); + ok = (prop->script == Lpropvalue + || MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), Lpropvalue) != 0); + if (ok == (Lctype == OP_NOTPROP)) + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + case PT_ALNUM: for (;;) { @@ -3454,8 +3555,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); } GETCHARINCTEST(fc, Feptr); category = UCD_CATEGORY(fc); - if ((category == ucp_L || category == ucp_N) == - (Lctype == OP_NOTPROP)) + if ((category == ucp_L || category == ucp_N) == (Lctype == OP_NOTPROP)) RRETURN(MATCH_NOMATCH); } /* Control never gets here */ @@ -3562,6 +3662,45 @@ fprintf(stderr, "++ op=%d\n", *Fecode); } /* Control never gets here */ + case PT_BIDICL: + for (;;) + { + RMATCH(Fecode, RM224); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (Lmin++ >= Lmax) RRETURN(MATCH_NOMATCH); + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); + RRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(fc, Feptr); + if ((UCD_BIDICLASS(fc) == Lpropvalue) == (Lctype == OP_NOTPROP)) + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + + case PT_BOOL: + for (;;) + { + BOOL ok; + const ucd_record *prop; + RMATCH(Fecode, RM223); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (Lmin++ >= Lmax) RRETURN(MATCH_NOMATCH); + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); + RRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(fc, Feptr); + prop = GET_UCD(fc); + ok = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), Lpropvalue) != 0; + if (ok == (Lctype == OP_NOTPROP)) + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + /* This should never occur */ default: return PCRE2_ERROR_INTERNAL; @@ -3870,7 +4009,9 @@ fprintf(stderr, "++ op=%d\n", *Fecode); } /* If maximizing, it is worth using inline code for speed, doing the type - test once at the start (i.e. keep it out of the loop). */ + test once at the start (i.e. keep it out of the loops). Once again, + "notmatch" can be an ordinary local variable because the loops do not call + RMATCH. */ else { @@ -3879,6 +4020,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); #ifdef SUPPORT_UNICODE if (proptype >= 0) { + BOOL notmatch = Lctype == OP_NOTPROP; switch(proptype) { case PT_ANY: @@ -3891,7 +4033,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); break; } GETCHARLENTEST(fc, Feptr, len); - if (Lctype == OP_NOTPROP) break; + if (notmatch) break; Feptr+= len; } break; @@ -3910,7 +4052,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); chartype = UCD_CHARTYPE(fc); if ((chartype == ucp_Lu || chartype == ucp_Ll || - chartype == ucp_Lt) == (Lctype == OP_NOTPROP)) + chartype == ucp_Lt) == notmatch) break; Feptr+= len; } @@ -3926,8 +4068,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); break; } GETCHARLENTEST(fc, Feptr, len); - if ((UCD_CATEGORY(fc) == Lpropvalue) == (Lctype == OP_NOTPROP)) - break; + if ((UCD_CATEGORY(fc) == Lpropvalue) == notmatch) break; Feptr+= len; } break; @@ -3942,8 +4083,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); break; } GETCHARLENTEST(fc, Feptr, len); - if ((UCD_CHARTYPE(fc) == Lpropvalue) == (Lctype == OP_NOTPROP)) - break; + if ((UCD_CHARTYPE(fc) == Lpropvalue) == notmatch) break; Feptr+= len; } break; @@ -3958,8 +4098,27 @@ fprintf(stderr, "++ op=%d\n", *Fecode); break; } GETCHARLENTEST(fc, Feptr, len); - if ((UCD_SCRIPT(fc) == Lpropvalue) == (Lctype == OP_NOTPROP)) + if ((UCD_SCRIPT(fc) == Lpropvalue) == notmatch) break; + Feptr+= len; + } + break; + + case PT_SCX: + for (i = Lmin; i < Lmax; i++) + { + BOOL ok; + const ucd_record *prop; + int len = 1; + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); break; + } + GETCHARLENTEST(fc, Feptr, len); + prop = GET_UCD(fc); + ok = (prop->script == Lpropvalue || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), Lpropvalue) != 0); + if (ok == notmatch) break; Feptr+= len; } break; @@ -3976,8 +4135,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); } GETCHARLENTEST(fc, Feptr, len); category = UCD_CATEGORY(fc); - if ((category == ucp_L || category == ucp_N) == - (Lctype == OP_NOTPROP)) + if ((category == ucp_L || category == ucp_N) == notmatch) break; Feptr+= len; } @@ -4002,11 +4160,11 @@ fprintf(stderr, "++ op=%d\n", *Fecode); { HSPACE_CASES: VSPACE_CASES: - if (Lctype == OP_NOTPROP) goto ENDLOOP99; /* Break the loop */ + if (notmatch) goto ENDLOOP99; /* Break the loop */ break; default: - if ((UCD_CATEGORY(fc) == ucp_Z) == (Lctype == OP_NOTPROP)) + if ((UCD_CATEGORY(fc) == ucp_Z) == notmatch) goto ENDLOOP99; /* Break the loop */ break; } @@ -4028,7 +4186,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode); GETCHARLENTEST(fc, Feptr, len); category = UCD_CATEGORY(fc); if ((category == ucp_L || category == ucp_N || - fc == CHAR_UNDERSCORE) == (Lctype == OP_NOTPROP)) + fc == CHAR_UNDERSCORE) == notmatch) break; Feptr+= len; } @@ -4049,9 +4207,9 @@ fprintf(stderr, "++ op=%d\n", *Fecode); for (;;) { if (fc < *cp) - { if (Lctype == OP_NOTPROP) break; else goto GOT_MAX; } + { if (notmatch) break; else goto GOT_MAX; } if (fc == *cp++) - { if (Lctype == OP_NOTPROP) goto GOT_MAX; else break; } + { if (notmatch) goto GOT_MAX; else break; } } Feptr += len; } @@ -4070,12 +4228,47 @@ fprintf(stderr, "++ op=%d\n", *Fecode); GETCHARLENTEST(fc, Feptr, len); if ((fc == CHAR_DOLLAR_SIGN || fc == CHAR_COMMERCIAL_AT || fc == CHAR_GRAVE_ACCENT || (fc >= 0xa0 && fc <= 0xd7ff) || - fc >= 0xe000) == (Lctype == OP_NOTPROP)) + fc >= 0xe000) == notmatch) break; Feptr += len; } break; + case PT_BIDICL: + for (i = Lmin; i < Lmax; i++) + { + int len = 1; + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); + break; + } + GETCHARLENTEST(fc, Feptr, len); + if ((UCD_BIDICLASS(fc) == Lpropvalue) == notmatch) break; + Feptr+= len; + } + break; + + case PT_BOOL: + for (i = Lmin; i < Lmax; i++) + { + BOOL ok; + const ucd_record *prop; + int len = 1; + if (Feptr >= mb->end_subject) + { + SCHECK_PARTIAL(); + break; + } + GETCHARLENTEST(fc, Feptr, len); + prop = GET_UCD(fc); + ok = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), Lpropvalue) != 0; + if (ok == notmatch) break; + Feptr+= len; + } + break; + default: return PCRE2_ERROR_INTERNAL; } @@ -6066,7 +6259,7 @@ switch (Freturn_id) LBL(200) LBL(201) LBL(202) LBL(203) LBL(204) LBL(205) LBL(206) LBL(207) LBL(208) LBL(209) LBL(210) LBL(211) LBL(212) LBL(213) LBL(214) LBL(215) LBL(216) LBL(217) LBL(218) LBL(219) LBL(220) - LBL(221) LBL(222) + LBL(221) LBL(222) LBL(223) LBL(224) LBL(225) #endif default: @@ -6129,8 +6322,8 @@ PCRE2_UCHAR req_cu2 = 0; PCRE2_SPTR bumpalong_limit; PCRE2_SPTR end_subject; PCRE2_SPTR true_end_subject; -PCRE2_SPTR start_match = subject + start_offset; -PCRE2_SPTR req_cu_ptr = start_match - 1; +PCRE2_SPTR start_match; +PCRE2_SPTR req_cu_ptr; PCRE2_SPTR start_partial; PCRE2_SPTR match_partial; @@ -6170,9 +6363,18 @@ PCRE2_SPTR stack_frames_vector[START_FRAMES_SIZE/sizeof(PCRE2_SPTR)] PCRE2_KEEP_UNINITIALIZED; mb->stack_frames = (heapframe *)stack_frames_vector; -/* A length equal to PCRE2_ZERO_TERMINATED implies a zero-terminated -subject string. */ +/* Recognize NULL, length 0 as an empty string. */ + +if (subject == NULL && length == 0) subject = (PCRE2_SPTR)""; + +/* Plausibility checks */ + +if ((options & ~PUBLIC_MATCH_OPTIONS) != 0) return PCRE2_ERROR_BADOPTION; +if (code == NULL || subject == NULL || match_data == NULL) + return PCRE2_ERROR_NULL; +start_match = subject + start_offset; +req_cu_ptr = start_match - 1; if (length == PCRE2_ZERO_TERMINATED) { length = PRIV(strlen)(subject); @@ -6180,11 +6382,6 @@ if (length == PCRE2_ZERO_TERMINATED) } true_end_subject = end_subject = subject + length; -/* Plausibility checks */ - -if ((options & ~PUBLIC_MATCH_OPTIONS) != 0) return PCRE2_ERROR_BADOPTION; -if (code == NULL || subject == NULL || match_data == NULL) - return PCRE2_ERROR_NULL; if (start_offset > length) return PCRE2_ERROR_BADOFFSET; /* Check that the first field in the block is the magic number. */ @@ -6482,7 +6679,7 @@ if (utf && /* If the end precedes start_match, it means there is invalid UTF in the extra code units we reversed over because of a lookbehind. Advance past the first bad code unit, and then skip invalid character starting code units in - 8-bit and 16-bit modes, and try again. */ + 8-bit and 16-bit modes, and try again with the original end point. */ if (end_subject < start_match) { @@ -6491,6 +6688,7 @@ if (utf && while (mb->check_subject < start_match && NOT_FIRSTCU(*mb->check_subject)) mb->check_subject++; #endif + end_subject = true_end_subject; } /* Otherwise, set the not end of line option, and do the match. */ @@ -6601,10 +6799,16 @@ the pattern. It is not used at all if there are no capturing parentheses. The last of these is changed within the match() function if the frame vector has to be expanded. We therefore put it into the match block so that it is -correct when calling match() more than once for non-anchored patterns. */ +correct when calling match() more than once for non-anchored patterns. + +We must also pad frame_size for alignment to ensure subsequent frames are as +aligned as heapframe. Whilst ovector is word-aligned due to being a PCRE2_SIZE +array, that does not guarantee it is suitably aligned for pointers, as some +architectures have pointers that are larger than a size_t. */ -frame_size = offsetof(heapframe, ovector) + - re->top_bracket * 2 * sizeof(PCRE2_SIZE); +frame_size = (offsetof(heapframe, ovector) + + re->top_bracket * 2 * sizeof(PCRE2_SIZE) + HEAPFRAME_ALIGNMENT - 1) & + ~(HEAPFRAME_ALIGNMENT - 1); /* Limits set in the pattern override the match context only if they are smaller. */ @@ -6648,7 +6852,7 @@ mb->match_frames_top = to avoid uninitialized memory read errors when it is copied to a new frame. */ memset((char *)(mb->match_frames) + offsetof(heapframe, ovector), 0xff, - re->top_bracket * 2 * sizeof(PCRE2_SIZE)); + frame_size - offsetof(heapframe, ovector)); /* Pointers to the individual character tables */ diff --git a/thirdparty/pcre2/src/pcre2_script_run.c b/thirdparty/pcre2/src/pcre2_script_run.c index 91a4833028..4926fa63bb 100644 --- a/thirdparty/pcre2/src/pcre2_script_run.c +++ b/thirdparty/pcre2/src/pcre2_script_run.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2018 University of Cambridge + New API code Copyright (c) 2016-2021 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -68,26 +68,26 @@ Arguments: Returns: TRUE if this is a valid script run */ -/* These dummy values must be less than the negation of the largest offset in -the PRIV(ucd_script_sets) vector, which is held in a 16-bit field in UCD -records (and is only likely to be a few hundred). */ +/* These are states in the checking process. */ -#define SCRIPT_UNSET (-99999) -#define SCRIPT_HANPENDING (-99998) -#define SCRIPT_HANHIRAKATA (-99997) -#define SCRIPT_HANBOPOMOFO (-99996) -#define SCRIPT_HANHANGUL (-99995) -#define SCRIPT_LIST (-99994) +enum { SCRIPT_UNSET, /* Requirement as yet unknown */ + SCRIPT_MAP, /* Bitmap contains acceptable scripts */ + SCRIPT_HANPENDING, /* Have had only Han characters */ + SCRIPT_HANHIRAKATA, /* Expect Han or Hirikata */ + SCRIPT_HANBOPOMOFO, /* Expect Han or Bopomofo */ + SCRIPT_HANHANGUL /* Expect Han or Hangul */ + }; -#define INTERSECTION_LIST_SIZE 50 +#define UCD_MAPSIZE (ucp_Unknown/32 + 1) +#define FULL_MAPSIZE (ucp_Script_Count/32 + 1) BOOL PRIV(script_run)(PCRE2_SPTR ptr, PCRE2_SPTR endptr, BOOL utf) { #ifdef SUPPORT_UNICODE -int require_script = SCRIPT_UNSET; -uint8_t intersection_list[INTERSECTION_LIST_SIZE]; -const uint8_t *require_list = NULL; +uint32_t require_state = SCRIPT_UNSET; +uint32_t require_map[FULL_MAPSIZE]; +uint32_t map[FULL_MAPSIZE]; uint32_t require_digitset = 0; uint32_t c; @@ -101,11 +101,17 @@ if (ptr >= endptr) return TRUE; GETCHARINCTEST(c, ptr); if (ptr >= endptr) return TRUE; +/* Initialize the require map. This is a full-size bitmap that has a bit for +every script, as opposed to the maps in ucd_script_sets, which only have bits +for scripts less than ucp_Unknown - those that appear in script extension +lists. */ + +for (int i = 0; i < FULL_MAPSIZE; i++) require_map[i] = 0; + /* Scan strings of two or more characters, checking the Unicode characteristics -of each code point. We make use of the Script Extensions property. There is -special code for scripts that can be combined with characters from the Han -Chinese script. This may be used in conjunction with four other scripts in -these combinations: +of each code point. There is special code for scripts that can be combined with +characters from the Han Chinese script. This may be used in conjunction with +four other scripts in these combinations: . Han with Hiragana and Katakana is allowed (for Japanese). . Han with Bopomofo is allowed (for Taiwanese Mandarin). @@ -119,310 +125,207 @@ Hence the SCRIPT_HANPENDING state. */ for (;;) { const ucd_record *ucd = GET_UCD(c); - int32_t scriptx = ucd->scriptx; + uint32_t script = ucd->script; - /* If the script extension is Unknown, the string is not a valid script run. - Such characters can only form script runs of length one. */ + /* If the script is Unknown, the string is not a valid script run. Such + characters can only form script runs of length one (see test above). */ - if (scriptx == ucp_Unknown) return FALSE; + if (script == ucp_Unknown) return FALSE; - /* A character whose script extension is Inherited is always accepted with - any script, and plays no further part in this testing. A character whose - script is Common is always accepted, but must still be tested for a digit - below. The scriptx value at this point is non-zero, because zero is - ucp_Unknown, tested for above. */ + /* A character without any script extensions whose script is Inherited or + Common is always accepted with any script. If there are extensions, the + following processing happens for all scripts. */ - if (scriptx != ucp_Inherited) + if (UCD_SCRIPTX_PROP(ucd) != 0 || (script != ucp_Inherited && script != ucp_Common)) { - if (scriptx != ucp_Common) + BOOL OK; + + /* Set up a full-sized map for this character that can include bits for all + scripts. Copy the scriptx map for this character (which covers those + scripts that appear in script extension lists), set the remaining values to + zero, and then, except for Common or Inherited, add this script's bit to + the map. */ + + memcpy(map, PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(ucd), UCD_MAPSIZE * sizeof(uint32_t)); + memset(map + UCD_MAPSIZE, 0, (FULL_MAPSIZE - UCD_MAPSIZE) * sizeof(uint32_t)); + if (script != ucp_Common && script != ucp_Inherited) MAPSET(map, script); + + /* Handle the different checking states */ + + switch(require_state) { - /* If the script extension value is positive, the character is not a mark - that can be used with many scripts. In the simple case we either set or - compare with the required script. However, handling the scripts that can - combine with Han are more complicated, as is the case when the previous - characters have been man-script marks. */ + /* First significant character - it might follow Common or Inherited + characters that do not have any script extensions. */ - if (scriptx > 0) + case SCRIPT_UNSET: + switch(script) { - switch(require_script) - { - /* Either the first significant character (require_script unset) or - after only Han characters. */ - - case SCRIPT_UNSET: - case SCRIPT_HANPENDING: - switch(scriptx) - { - case ucp_Han: - require_script = SCRIPT_HANPENDING; - break; - - case ucp_Hiragana: - case ucp_Katakana: - require_script = SCRIPT_HANHIRAKATA; - break; - - case ucp_Bopomofo: - require_script = SCRIPT_HANBOPOMOFO; - break; - - case ucp_Hangul: - require_script = SCRIPT_HANHANGUL; - break; - - /* Not a Han-related script. If expecting one, fail. Otherise set - the requirement to this script. */ - - default: - if (require_script == SCRIPT_HANPENDING) return FALSE; - require_script = scriptx; - break; - } - break; + case ucp_Han: + require_state = SCRIPT_HANPENDING; + break; + + case ucp_Hiragana: + case ucp_Katakana: + require_state = SCRIPT_HANHIRAKATA; + break; + + case ucp_Bopomofo: + require_state = SCRIPT_HANBOPOMOFO; + break; + + case ucp_Hangul: + require_state = SCRIPT_HANHANGUL; + break; + + default: + memcpy(require_map, map, FULL_MAPSIZE * sizeof(uint32_t)); + require_state = SCRIPT_MAP; + break; + } + break; - /* Previously encountered one of the "with Han" scripts. Check that - this character is appropriate. */ + /* The first significant character was Han. An inspection of the Unicode + 11.0.0 files shows that there are the following types of Script Extension + list that involve the Han, Bopomofo, Hiragana, Katakana, and Hangul + scripts: - case SCRIPT_HANHIRAKATA: - if (scriptx != ucp_Han && scriptx != ucp_Hiragana && - scriptx != ucp_Katakana) - return FALSE; - break; + . Bopomofo + Han + . Han + Hiragana + Katakana + . Hiragana + Katakana + . Bopopmofo + Hangul + Han + Hiragana + Katakana - case SCRIPT_HANBOPOMOFO: - if (scriptx != ucp_Han && scriptx != ucp_Bopomofo) return FALSE; - break; + The following code tries to make sense of this. */ - case SCRIPT_HANHANGUL: - if (scriptx != ucp_Han && scriptx != ucp_Hangul) return FALSE; - break; +#define FOUND_BOPOMOFO 1 +#define FOUND_HIRAGANA 2 +#define FOUND_KATAKANA 4 +#define FOUND_HANGUL 8 - /* We have a list of scripts to check that is derived from one or - more previous characters. This is either one of the lists in - ucd_script_sets[] (for one previous character) or the intersection of - several lists for multiple characters. */ - - case SCRIPT_LIST: - { - const uint8_t *list; - for (list = require_list; *list != 0; list++) - { - if (*list == scriptx) break; - } - if (*list == 0) return FALSE; - } - - /* The rest of the string must be in this script, but we have to - allow for the Han complications. */ - - switch(scriptx) - { - case ucp_Han: - require_script = SCRIPT_HANPENDING; - break; - - case ucp_Hiragana: - case ucp_Katakana: - require_script = SCRIPT_HANHIRAKATA; - break; - - case ucp_Bopomofo: - require_script = SCRIPT_HANBOPOMOFO; - break; - - case ucp_Hangul: - require_script = SCRIPT_HANHANGUL; - break; - - default: - require_script = scriptx; - break; - } - break; + case SCRIPT_HANPENDING: + if (script != ucp_Han) /* Another Han does nothing */ + { + uint32_t chspecial = 0; - /* This is the easy case when a single script is required. */ + if (MAPBIT(map, ucp_Bopomofo) != 0) chspecial |= FOUND_BOPOMOFO; + if (MAPBIT(map, ucp_Hiragana) != 0) chspecial |= FOUND_HIRAGANA; + if (MAPBIT(map, ucp_Katakana) != 0) chspecial |= FOUND_KATAKANA; + if (MAPBIT(map, ucp_Hangul) != 0) chspecial |= FOUND_HANGUL; - default: - if (scriptx != require_script) return FALSE; - break; - } - } /* End of handing positive scriptx */ + if (chspecial == 0) return FALSE; /* Not allowed with Han */ - /* If scriptx is negative, this character is a mark-type character that - has a list of permitted scripts. */ + if (chspecial == FOUND_BOPOMOFO) + require_state = SCRIPT_HANBOPOMOFO; + else if (chspecial == (FOUND_HIRAGANA|FOUND_KATAKANA)) + require_state = SCRIPT_HANHIRAKATA; - else - { - uint32_t chspecial; - const uint8_t *clist, *rlist; - const uint8_t *list = PRIV(ucd_script_sets) - scriptx; - - switch(require_script) - { - case SCRIPT_UNSET: - require_list = PRIV(ucd_script_sets) - scriptx; - require_script = SCRIPT_LIST; - break; + /* Otherwise this character must be allowed with all of them, so remain + in the pending state. */ + } + break; - /* An inspection of the Unicode 11.0.0 files shows that there are the - following types of Script Extension list that involve the Han, - Bopomofo, Hiragana, Katakana, and Hangul scripts: + /* Previously encountered one of the "with Han" scripts. Check that + this character is appropriate. */ - . Bopomofo + Han - . Han + Hiragana + Katakana - . Hiragana + Katakana - . Bopopmofo + Hangul + Han + Hiragana + Katakana + case SCRIPT_HANHIRAKATA: + if (MAPBIT(map, ucp_Han) + MAPBIT(map, ucp_Hiragana) + + MAPBIT(map, ucp_Katakana) == 0) return FALSE; + break; - The following code tries to make sense of this. */ + case SCRIPT_HANBOPOMOFO: + if (MAPBIT(map, ucp_Han) + MAPBIT(map, ucp_Bopomofo) == 0) return FALSE; + break; -#define FOUND_BOPOMOFO 1 -#define FOUND_HIRAGANA 2 -#define FOUND_KATAKANA 4 -#define FOUND_HANGUL 8 + case SCRIPT_HANHANGUL: + if (MAPBIT(map, ucp_Han) + MAPBIT(map, ucp_Hangul) == 0) return FALSE; + break; - case SCRIPT_HANPENDING: - chspecial = 0; - for (; *list != 0; list++) - { - switch (*list) - { - case ucp_Bopomofo: chspecial |= FOUND_BOPOMOFO; break; - case ucp_Hiragana: chspecial |= FOUND_HIRAGANA; break; - case ucp_Katakana: chspecial |= FOUND_KATAKANA; break; - case ucp_Hangul: chspecial |= FOUND_HANGUL; break; - default: break; - } - } - - if (chspecial == 0) return FALSE; - - if (chspecial == FOUND_BOPOMOFO) - { - require_script = SCRIPT_HANBOPOMOFO; - } - else if (chspecial == (FOUND_HIRAGANA|FOUND_KATAKANA)) - { - require_script = SCRIPT_HANHIRAKATA; - } - - /* Otherwise it must be allowed with all of them, so remain in - the pending state. */ + /* Previously encountered one or more characters that are allowed with a + list of scripts. */ - break; + case SCRIPT_MAP: + OK = FALSE; - case SCRIPT_HANHIRAKATA: - for (; *list != 0; list++) - { - if (*list == ucp_Hiragana || *list == ucp_Katakana) break; - } - if (*list == 0) return FALSE; + for (int i = 0; i < FULL_MAPSIZE; i++) + { + if ((require_map[i] & map[i]) != 0) + { + OK = TRUE; break; + } + } - case SCRIPT_HANBOPOMOFO: - for (; *list != 0; list++) - { - if (*list == ucp_Bopomofo) break; - } - if (*list == 0) return FALSE; - break; + if (!OK) return FALSE; - case SCRIPT_HANHANGUL: - for (; *list != 0; list++) - { - if (*list == ucp_Hangul) break; - } - if (*list == 0) return FALSE; - break; + /* The rest of the string must be in this script, but we have to + allow for the Han complications. */ - /* Previously encountered one or more characters that are allowed - with a list of scripts. Build the intersection of the required list - with this character's list in intersection_list[]. This code is - written so that it still works OK if the required list is already in - that vector. */ - - case SCRIPT_LIST: - { - int i = 0; - for (rlist = require_list; *rlist != 0; rlist++) - { - for (clist = list; *clist != 0; clist++) - { - if (*rlist == *clist) - { - intersection_list[i++] = *rlist; - break; - } - } - } - if (i == 0) return FALSE; /* No scripts in common */ - - /* If there's just one script in common, we can set it as the - unique required script. Otherwise, terminate the intersection list - and make it the required list. */ - - if (i == 1) - { - require_script = intersection_list[0]; - } - else - { - intersection_list[i] = 0; - require_list = intersection_list; - } - } - break; + switch(script) + { + case ucp_Han: + require_state = SCRIPT_HANPENDING; + break; - /* The previously set required script is a single script, not - Han-related. Check that it is in this character's list. */ + case ucp_Hiragana: + case ucp_Katakana: + require_state = SCRIPT_HANHIRAKATA; + break; - default: - for (; *list != 0; list++) - { - if (*list == require_script) break; - } - if (*list == 0) return FALSE; - break; - } - } /* End of handling negative scriptx */ - } /* End of checking non-Common character */ - - /* The character is in an acceptable script. We must now ensure that all - decimal digits in the string come from the same set. Some scripts (e.g. - Common, Arabic) have more than one set of decimal digits. This code does - not allow mixing sets, even within the same script. The vector called - PRIV(ucd_digit_sets)[] contains, in its first element, the number of - following elements, and then, in ascending order, the code points of the - '9' characters in every set of 10 digits. Each set is identified by the - offset in the vector of its '9' character. An initial check of the first - value picks up ASCII digits quickly. Otherwise, a binary chop is used. */ - - if (ucd->chartype == ucp_Nd) - { - uint32_t digitset; + case ucp_Bopomofo: + require_state = SCRIPT_HANBOPOMOFO; + break; + + case ucp_Hangul: + require_state = SCRIPT_HANHANGUL; + break; + + /* Compute the intersection of the required list of scripts and the + allowed scripts for this character. */ - if (c <= PRIV(ucd_digit_sets)[1]) digitset = 1; else + default: + for (int i = 0; i < FULL_MAPSIZE; i++) require_map[i] &= map[i]; + break; + } + + break; + } + } /* End checking character's script and extensions. */ + + /* The character is in an acceptable script. We must now ensure that all + decimal digits in the string come from the same set. Some scripts (e.g. + Common, Arabic) have more than one set of decimal digits. This code does + not allow mixing sets, even within the same script. The vector called + PRIV(ucd_digit_sets)[] contains, in its first element, the number of + following elements, and then, in ascending order, the code points of the + '9' characters in every set of 10 digits. Each set is identified by the + offset in the vector of its '9' character. An initial check of the first + value picks up ASCII digits quickly. Otherwise, a binary chop is used. */ + + if (ucd->chartype == ucp_Nd) + { + uint32_t digitset; + + if (c <= PRIV(ucd_digit_sets)[1]) digitset = 1; else + { + int mid; + int bot = 1; + int top = PRIV(ucd_digit_sets)[0]; + for (;;) { - int mid; - int bot = 1; - int top = PRIV(ucd_digit_sets)[0]; - for (;;) + if (top <= bot + 1) /* <= rather than == is paranoia */ { - if (top <= bot + 1) /* <= rather than == is paranoia */ - { - digitset = top; - break; - } - mid = (top + bot) / 2; - if (c <= PRIV(ucd_digit_sets)[mid]) top = mid; else bot = mid; + digitset = top; + break; } + mid = (top + bot) / 2; + if (c <= PRIV(ucd_digit_sets)[mid]) top = mid; else bot = mid; } + } - /* A required value of 0 means "unset". */ + /* A required value of 0 means "unset". */ - if (require_digitset == 0) require_digitset = digitset; - else if (digitset != require_digitset) return FALSE; - } /* End digit handling */ - } /* End checking non-Inherited character */ + if (require_digitset == 0) require_digitset = digitset; + else if (digitset != require_digitset) return FALSE; + } /* End digit handling */ /* If we haven't yet got to the end, pick up the next character. */ diff --git a/thirdparty/pcre2/src/pcre2_string_utils.c b/thirdparty/pcre2/src/pcre2_string_utils.c index d6be01acf5..ebfa9434e3 100644 --- a/thirdparty/pcre2/src/pcre2_string_utils.c +++ b/thirdparty/pcre2/src/pcre2_string_utils.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2018 University of Cambridge + New API code Copyright (c) 2018-2021 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without diff --git a/thirdparty/pcre2/src/pcre2_study.c b/thirdparty/pcre2/src/pcre2_study.c index 9bbb37570f..4db3ad1184 100644 --- a/thirdparty/pcre2/src/pcre2_study.c +++ b/thirdparty/pcre2/src/pcre2_study.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2020 University of Cambridge + New API code Copyright (c) 2016-2021 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -908,7 +908,7 @@ set_nottype_bits(pcre2_real_code *re, int cbit_type, unsigned int table_limit) { uint32_t c; for (c = 0; c < table_limit; c++) - re->start_bitmap[c] |= ~(re->tables[c+cbits_offset+cbit_type]); + re->start_bitmap[c] |= (uint8_t)(~(re->tables[c+cbits_offset+cbit_type])); #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8 if (table_limit != 32) for (c = 24; c < 32; c++) re->start_bitmap[c] = 0xff; #endif diff --git a/thirdparty/pcre2/src/pcre2_substitute.c b/thirdparty/pcre2/src/pcre2_substitute.c index 981a106a9f..8b2c369ccc 100644 --- a/thirdparty/pcre2/src/pcre2_substitute.c +++ b/thirdparty/pcre2/src/pcre2_substitute.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2020 University of Cambridge + New API code Copyright (c) 2016-2021 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -259,6 +259,18 @@ PCRE2_UNSET, so as not to imply an offset in the replacement. */ if ((options & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) != 0) return PCRE2_ERROR_BADOPTION; + +/* Validate length and find the end of the replacement. A NULL replacement of +zero length is interpreted as an empty string. */ + +if (replacement == NULL) + { + if (rlength != 0) return PCRE2_ERROR_NULL; + replacement = (PCRE2_SPTR)""; + } + +if (rlength == PCRE2_ZERO_TERMINATED) rlength = PRIV(strlen)(replacement); +repend = replacement + rlength; /* Check for using a match that has already happened. Note that the subject pointer in the match data may be NULL after a no-match. */ @@ -312,11 +324,18 @@ scb.input = subject; scb.output = (PCRE2_SPTR)buffer; scb.ovector = ovector; -/* Find lengths of zero-terminated strings and the end of the replacement. */ +/* A NULL subject of zero length is treated as an empty string. */ -if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject); -if (rlength == PCRE2_ZERO_TERMINATED) rlength = PRIV(strlen)(replacement); -repend = replacement + rlength; +if (subject == NULL) + { + if (length != 0) return PCRE2_ERROR_NULL; + subject = (PCRE2_SPTR)""; + } + +/* Find length of zero-terminated subject */ + +if (length == PCRE2_ZERO_TERMINATED) + length = subject? PRIV(strlen)(subject) : 0; /* Check UTF replacement string if necessary. */ diff --git a/thirdparty/pcre2/src/pcre2_tables.c b/thirdparty/pcre2/src/pcre2_tables.c index c164e976e0..e00252f1eb 100644 --- a/thirdparty/pcre2/src/pcre2_tables.c +++ b/thirdparty/pcre2/src/pcre2_tables.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2019 University of Cambridge + New API code Copyright (c) 2016-2021 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -51,10 +51,10 @@ defined. */ #include "pcre2_internal.h" #endif /* PCRE2_PCRE2TEST */ - /* Table of sizes for the fixed-length opcodes. It's defined in a macro so that the definition is next to the definition of the opcodes in pcre2_internal.h. -This is mode-dependent, so is skipped when this file is included by pcre2test. */ +This is mode-dependent, so it is skipped when this file is included by +pcre2test. */ #ifndef PCRE2_PCRE2TEST const uint8_t PRIV(OP_lengths)[] = { OP_LENGTHS }; @@ -119,6 +119,9 @@ const uint8_t PRIV(utf8_table4)[] = { #endif /* UTF-8 support needed */ +/* Tables concerned with Unicode properties are relevant only when Unicode +support is enabled. See also the pcre2_ucptables.c file, which is generated by +a Python script from Unicode data files. */ #ifdef SUPPORT_UNICODE @@ -190,7 +193,7 @@ const uint32_t PRIV(ucp_gbtable)[] = { ESZ|(1u<<ucp_gbPrepend)| /* 4 Prepend */ (1u<<ucp_gbL)|(1u<<ucp_gbV)|(1u<<ucp_gbT)| (1u<<ucp_gbLV)|(1u<<ucp_gbLVT)|(1u<<ucp_gbOther)| - (1u<<ucp_gbRegionalIndicator), + (1u<<ucp_gbRegional_Indicator), ESZ, /* 5 SpacingMark */ ESZ|(1u<<ucp_gbL)|(1u<<ucp_gbV)|(1u<<ucp_gbLV)| /* 6 L */ (1u<<ucp_gbLVT), @@ -198,7 +201,7 @@ const uint32_t PRIV(ucp_gbtable)[] = { ESZ|(1u<<ucp_gbT), /* 8 T */ ESZ|(1u<<ucp_gbV)|(1u<<ucp_gbT), /* 9 LV */ ESZ|(1u<<ucp_gbT), /* 10 LVT */ - (1u<<ucp_gbRegionalIndicator), /* 11 RegionalIndicator */ + (1u<<ucp_gbRegional_Indicator), /* 11 Regional Indicator */ ESZ, /* 12 Other */ ESZ, /* 13 ZWJ */ ESZ|(1u<<ucp_gbExtended_Pictographic) /* 14 Extended Pictographic */ @@ -221,648 +224,10 @@ const int PRIV(ucp_typerange)[] = { }; #endif /* SUPPORT_JIT */ -/* The PRIV(utt)[] table below translates Unicode property names into type and -code values. It is searched by binary chop, so must be in collating sequence of -name. Originally, the table contained pointers to the name strings in the first -field of each entry. However, that leads to a large number of relocations when -a shared library is dynamically loaded. A significant reduction is made by -putting all the names into a single, large string and then using offsets in the -table itself. Maintenance is more error-prone, but frequent changes to this -data are unlikely. - -July 2008: There is now a script called maint/GenerateUtt.py that can be used -to generate this data automatically instead of maintaining it by hand. - -The script was updated in March 2009 to generate a new EBCDIC-compliant -version. Like all other character and string literals that are compared against -the regular expression pattern, we must use STR_ macros instead of literal -strings to make sure that UTF-8 support works on EBCDIC platforms. */ - -#define STRING_Adlam0 STR_A STR_d STR_l STR_a STR_m "\0" -#define STRING_Ahom0 STR_A STR_h STR_o STR_m "\0" -#define STRING_Anatolian_Hieroglyphs0 STR_A STR_n STR_a STR_t STR_o STR_l STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" -#define STRING_Any0 STR_A STR_n STR_y "\0" -#define STRING_Arabic0 STR_A STR_r STR_a STR_b STR_i STR_c "\0" -#define STRING_Armenian0 STR_A STR_r STR_m STR_e STR_n STR_i STR_a STR_n "\0" -#define STRING_Avestan0 STR_A STR_v STR_e STR_s STR_t STR_a STR_n "\0" -#define STRING_Balinese0 STR_B STR_a STR_l STR_i STR_n STR_e STR_s STR_e "\0" -#define STRING_Bamum0 STR_B STR_a STR_m STR_u STR_m "\0" -#define STRING_Bassa_Vah0 STR_B STR_a STR_s STR_s STR_a STR_UNDERSCORE STR_V STR_a STR_h "\0" -#define STRING_Batak0 STR_B STR_a STR_t STR_a STR_k "\0" -#define STRING_Bengali0 STR_B STR_e STR_n STR_g STR_a STR_l STR_i "\0" -#define STRING_Bhaiksuki0 STR_B STR_h STR_a STR_i STR_k STR_s STR_u STR_k STR_i "\0" -#define STRING_Bopomofo0 STR_B STR_o STR_p STR_o STR_m STR_o STR_f STR_o "\0" -#define STRING_Brahmi0 STR_B STR_r STR_a STR_h STR_m STR_i "\0" -#define STRING_Braille0 STR_B STR_r STR_a STR_i STR_l STR_l STR_e "\0" -#define STRING_Buginese0 STR_B STR_u STR_g STR_i STR_n STR_e STR_s STR_e "\0" -#define STRING_Buhid0 STR_B STR_u STR_h STR_i STR_d "\0" -#define STRING_C0 STR_C "\0" -#define STRING_Canadian_Aboriginal0 STR_C STR_a STR_n STR_a STR_d STR_i STR_a STR_n STR_UNDERSCORE STR_A STR_b STR_o STR_r STR_i STR_g STR_i STR_n STR_a STR_l "\0" -#define STRING_Carian0 STR_C STR_a STR_r STR_i STR_a STR_n "\0" -#define STRING_Caucasian_Albanian0 STR_C STR_a STR_u STR_c STR_a STR_s STR_i STR_a STR_n STR_UNDERSCORE STR_A STR_l STR_b STR_a STR_n STR_i STR_a STR_n "\0" -#define STRING_Cc0 STR_C STR_c "\0" -#define STRING_Cf0 STR_C STR_f "\0" -#define STRING_Chakma0 STR_C STR_h STR_a STR_k STR_m STR_a "\0" -#define STRING_Cham0 STR_C STR_h STR_a STR_m "\0" -#define STRING_Cherokee0 STR_C STR_h STR_e STR_r STR_o STR_k STR_e STR_e "\0" -#define STRING_Chorasmian0 STR_C STR_h STR_o STR_r STR_a STR_s STR_m STR_i STR_a STR_n "\0" -#define STRING_Cn0 STR_C STR_n "\0" -#define STRING_Co0 STR_C STR_o "\0" -#define STRING_Common0 STR_C STR_o STR_m STR_m STR_o STR_n "\0" -#define STRING_Coptic0 STR_C STR_o STR_p STR_t STR_i STR_c "\0" -#define STRING_Cs0 STR_C STR_s "\0" -#define STRING_Cuneiform0 STR_C STR_u STR_n STR_e STR_i STR_f STR_o STR_r STR_m "\0" -#define STRING_Cypriot0 STR_C STR_y STR_p STR_r STR_i STR_o STR_t "\0" -#define STRING_Cypro_Minoan0 STR_C STR_y STR_p STR_r STR_o STR_UNDERSCORE STR_M STR_i STR_n STR_o STR_a STR_n "\0" -#define STRING_Cyrillic0 STR_C STR_y STR_r STR_i STR_l STR_l STR_i STR_c "\0" -#define STRING_Deseret0 STR_D STR_e STR_s STR_e STR_r STR_e STR_t "\0" -#define STRING_Devanagari0 STR_D STR_e STR_v STR_a STR_n STR_a STR_g STR_a STR_r STR_i "\0" -#define STRING_Dives_Akuru0 STR_D STR_i STR_v STR_e STR_s STR_UNDERSCORE STR_A STR_k STR_u STR_r STR_u "\0" -#define STRING_Dogra0 STR_D STR_o STR_g STR_r STR_a "\0" -#define STRING_Duployan0 STR_D STR_u STR_p STR_l STR_o STR_y STR_a STR_n "\0" -#define STRING_Egyptian_Hieroglyphs0 STR_E STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" -#define STRING_Elbasan0 STR_E STR_l STR_b STR_a STR_s STR_a STR_n "\0" -#define STRING_Elymaic0 STR_E STR_l STR_y STR_m STR_a STR_i STR_c "\0" -#define STRING_Ethiopic0 STR_E STR_t STR_h STR_i STR_o STR_p STR_i STR_c "\0" -#define STRING_Georgian0 STR_G STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0" -#define STRING_Glagolitic0 STR_G STR_l STR_a STR_g STR_o STR_l STR_i STR_t STR_i STR_c "\0" -#define STRING_Gothic0 STR_G STR_o STR_t STR_h STR_i STR_c "\0" -#define STRING_Grantha0 STR_G STR_r STR_a STR_n STR_t STR_h STR_a "\0" -#define STRING_Greek0 STR_G STR_r STR_e STR_e STR_k "\0" -#define STRING_Gujarati0 STR_G STR_u STR_j STR_a STR_r STR_a STR_t STR_i "\0" -#define STRING_Gunjala_Gondi0 STR_G STR_u STR_n STR_j STR_a STR_l STR_a STR_UNDERSCORE STR_G STR_o STR_n STR_d STR_i "\0" -#define STRING_Gurmukhi0 STR_G STR_u STR_r STR_m STR_u STR_k STR_h STR_i "\0" -#define STRING_Han0 STR_H STR_a STR_n "\0" -#define STRING_Hangul0 STR_H STR_a STR_n STR_g STR_u STR_l "\0" -#define STRING_Hanifi_Rohingya0 STR_H STR_a STR_n STR_i STR_f STR_i STR_UNDERSCORE STR_R STR_o STR_h STR_i STR_n STR_g STR_y STR_a "\0" -#define STRING_Hanunoo0 STR_H STR_a STR_n STR_u STR_n STR_o STR_o "\0" -#define STRING_Hatran0 STR_H STR_a STR_t STR_r STR_a STR_n "\0" -#define STRING_Hebrew0 STR_H STR_e STR_b STR_r STR_e STR_w "\0" -#define STRING_Hiragana0 STR_H STR_i STR_r STR_a STR_g STR_a STR_n STR_a "\0" -#define STRING_Imperial_Aramaic0 STR_I STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_UNDERSCORE STR_A STR_r STR_a STR_m STR_a STR_i STR_c "\0" -#define STRING_Inherited0 STR_I STR_n STR_h STR_e STR_r STR_i STR_t STR_e STR_d "\0" -#define STRING_Inscriptional_Pahlavi0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_h STR_l STR_a STR_v STR_i "\0" -#define STRING_Inscriptional_Parthian0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_r STR_t STR_h STR_i STR_a STR_n "\0" -#define STRING_Javanese0 STR_J STR_a STR_v STR_a STR_n STR_e STR_s STR_e "\0" -#define STRING_Kaithi0 STR_K STR_a STR_i STR_t STR_h STR_i "\0" -#define STRING_Kannada0 STR_K STR_a STR_n STR_n STR_a STR_d STR_a "\0" -#define STRING_Katakana0 STR_K STR_a STR_t STR_a STR_k STR_a STR_n STR_a "\0" -#define STRING_Kayah_Li0 STR_K STR_a STR_y STR_a STR_h STR_UNDERSCORE STR_L STR_i "\0" -#define STRING_Kharoshthi0 STR_K STR_h STR_a STR_r STR_o STR_s STR_h STR_t STR_h STR_i "\0" -#define STRING_Khitan_Small_Script0 STR_K STR_h STR_i STR_t STR_a STR_n STR_UNDERSCORE STR_S STR_m STR_a STR_l STR_l STR_UNDERSCORE STR_S STR_c STR_r STR_i STR_p STR_t "\0" -#define STRING_Khmer0 STR_K STR_h STR_m STR_e STR_r "\0" -#define STRING_Khojki0 STR_K STR_h STR_o STR_j STR_k STR_i "\0" -#define STRING_Khudawadi0 STR_K STR_h STR_u STR_d STR_a STR_w STR_a STR_d STR_i "\0" -#define STRING_L0 STR_L "\0" -#define STRING_L_AMPERSAND0 STR_L STR_AMPERSAND "\0" -#define STRING_Lao0 STR_L STR_a STR_o "\0" -#define STRING_Latin0 STR_L STR_a STR_t STR_i STR_n "\0" -#define STRING_Lepcha0 STR_L STR_e STR_p STR_c STR_h STR_a "\0" -#define STRING_Limbu0 STR_L STR_i STR_m STR_b STR_u "\0" -#define STRING_Linear_A0 STR_L STR_i STR_n STR_e STR_a STR_r STR_UNDERSCORE STR_A "\0" -#define STRING_Linear_B0 STR_L STR_i STR_n STR_e STR_a STR_r STR_UNDERSCORE STR_B "\0" -#define STRING_Lisu0 STR_L STR_i STR_s STR_u "\0" -#define STRING_Ll0 STR_L STR_l "\0" -#define STRING_Lm0 STR_L STR_m "\0" -#define STRING_Lo0 STR_L STR_o "\0" -#define STRING_Lt0 STR_L STR_t "\0" -#define STRING_Lu0 STR_L STR_u "\0" -#define STRING_Lycian0 STR_L STR_y STR_c STR_i STR_a STR_n "\0" -#define STRING_Lydian0 STR_L STR_y STR_d STR_i STR_a STR_n "\0" -#define STRING_M0 STR_M "\0" -#define STRING_Mahajani0 STR_M STR_a STR_h STR_a STR_j STR_a STR_n STR_i "\0" -#define STRING_Makasar0 STR_M STR_a STR_k STR_a STR_s STR_a STR_r "\0" -#define STRING_Malayalam0 STR_M STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0" -#define STRING_Mandaic0 STR_M STR_a STR_n STR_d STR_a STR_i STR_c "\0" -#define STRING_Manichaean0 STR_M STR_a STR_n STR_i STR_c STR_h STR_a STR_e STR_a STR_n "\0" -#define STRING_Marchen0 STR_M STR_a STR_r STR_c STR_h STR_e STR_n "\0" -#define STRING_Masaram_Gondi0 STR_M STR_a STR_s STR_a STR_r STR_a STR_m STR_UNDERSCORE STR_G STR_o STR_n STR_d STR_i "\0" -#define STRING_Mc0 STR_M STR_c "\0" -#define STRING_Me0 STR_M STR_e "\0" -#define STRING_Medefaidrin0 STR_M STR_e STR_d STR_e STR_f STR_a STR_i STR_d STR_r STR_i STR_n "\0" -#define STRING_Meetei_Mayek0 STR_M STR_e STR_e STR_t STR_e STR_i STR_UNDERSCORE STR_M STR_a STR_y STR_e STR_k "\0" -#define STRING_Mende_Kikakui0 STR_M STR_e STR_n STR_d STR_e STR_UNDERSCORE STR_K STR_i STR_k STR_a STR_k STR_u STR_i "\0" -#define STRING_Meroitic_Cursive0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_C STR_u STR_r STR_s STR_i STR_v STR_e "\0" -#define STRING_Meroitic_Hieroglyphs0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" -#define STRING_Miao0 STR_M STR_i STR_a STR_o "\0" -#define STRING_Mn0 STR_M STR_n "\0" -#define STRING_Modi0 STR_M STR_o STR_d STR_i "\0" -#define STRING_Mongolian0 STR_M STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0" -#define STRING_Mro0 STR_M STR_r STR_o "\0" -#define STRING_Multani0 STR_M STR_u STR_l STR_t STR_a STR_n STR_i "\0" -#define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0" -#define STRING_N0 STR_N "\0" -#define STRING_Nabataean0 STR_N STR_a STR_b STR_a STR_t STR_a STR_e STR_a STR_n "\0" -#define STRING_Nandinagari0 STR_N STR_a STR_n STR_d STR_i STR_n STR_a STR_g STR_a STR_r STR_i "\0" -#define STRING_Nd0 STR_N STR_d "\0" -#define STRING_New_Tai_Lue0 STR_N STR_e STR_w STR_UNDERSCORE STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_u STR_e "\0" -#define STRING_Newa0 STR_N STR_e STR_w STR_a "\0" -#define STRING_Nko0 STR_N STR_k STR_o "\0" -#define STRING_Nl0 STR_N STR_l "\0" -#define STRING_No0 STR_N STR_o "\0" -#define STRING_Nushu0 STR_N STR_u STR_s STR_h STR_u "\0" -#define STRING_Nyiakeng_Puachue_Hmong0 STR_N STR_y STR_i STR_a STR_k STR_e STR_n STR_g STR_UNDERSCORE STR_P STR_u STR_a STR_c STR_h STR_u STR_e STR_UNDERSCORE STR_H STR_m STR_o STR_n STR_g "\0" -#define STRING_Ogham0 STR_O STR_g STR_h STR_a STR_m "\0" -#define STRING_Ol_Chiki0 STR_O STR_l STR_UNDERSCORE STR_C STR_h STR_i STR_k STR_i "\0" -#define STRING_Old_Hungarian0 STR_O STR_l STR_d STR_UNDERSCORE STR_H STR_u STR_n STR_g STR_a STR_r STR_i STR_a STR_n "\0" -#define STRING_Old_Italic0 STR_O STR_l STR_d STR_UNDERSCORE STR_I STR_t STR_a STR_l STR_i STR_c "\0" -#define STRING_Old_North_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_N STR_o STR_r STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0" -#define STRING_Old_Permic0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_m STR_i STR_c "\0" -#define STRING_Old_Persian0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_s STR_i STR_a STR_n "\0" -#define STRING_Old_Sogdian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_g STR_d STR_i STR_a STR_n "\0" -#define STRING_Old_South_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_u STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0" -#define STRING_Old_Turkic0 STR_O STR_l STR_d STR_UNDERSCORE STR_T STR_u STR_r STR_k STR_i STR_c "\0" -#define STRING_Old_Uyghur0 STR_O STR_l STR_d STR_UNDERSCORE STR_U STR_y STR_g STR_h STR_u STR_r "\0" -#define STRING_Oriya0 STR_O STR_r STR_i STR_y STR_a "\0" -#define STRING_Osage0 STR_O STR_s STR_a STR_g STR_e "\0" -#define STRING_Osmanya0 STR_O STR_s STR_m STR_a STR_n STR_y STR_a "\0" -#define STRING_P0 STR_P "\0" -#define STRING_Pahawh_Hmong0 STR_P STR_a STR_h STR_a STR_w STR_h STR_UNDERSCORE STR_H STR_m STR_o STR_n STR_g "\0" -#define STRING_Palmyrene0 STR_P STR_a STR_l STR_m STR_y STR_r STR_e STR_n STR_e "\0" -#define STRING_Pau_Cin_Hau0 STR_P STR_a STR_u STR_UNDERSCORE STR_C STR_i STR_n STR_UNDERSCORE STR_H STR_a STR_u "\0" -#define STRING_Pc0 STR_P STR_c "\0" -#define STRING_Pd0 STR_P STR_d "\0" -#define STRING_Pe0 STR_P STR_e "\0" -#define STRING_Pf0 STR_P STR_f "\0" -#define STRING_Phags_Pa0 STR_P STR_h STR_a STR_g STR_s STR_UNDERSCORE STR_P STR_a "\0" -#define STRING_Phoenician0 STR_P STR_h STR_o STR_e STR_n STR_i STR_c STR_i STR_a STR_n "\0" -#define STRING_Pi0 STR_P STR_i "\0" -#define STRING_Po0 STR_P STR_o "\0" -#define STRING_Ps0 STR_P STR_s "\0" -#define STRING_Psalter_Pahlavi0 STR_P STR_s STR_a STR_l STR_t STR_e STR_r STR_UNDERSCORE STR_P STR_a STR_h STR_l STR_a STR_v STR_i "\0" -#define STRING_Rejang0 STR_R STR_e STR_j STR_a STR_n STR_g "\0" -#define STRING_Runic0 STR_R STR_u STR_n STR_i STR_c "\0" -#define STRING_S0 STR_S "\0" -#define STRING_Samaritan0 STR_S STR_a STR_m STR_a STR_r STR_i STR_t STR_a STR_n "\0" -#define STRING_Saurashtra0 STR_S STR_a STR_u STR_r STR_a STR_s STR_h STR_t STR_r STR_a "\0" -#define STRING_Sc0 STR_S STR_c "\0" -#define STRING_Sharada0 STR_S STR_h STR_a STR_r STR_a STR_d STR_a "\0" -#define STRING_Shavian0 STR_S STR_h STR_a STR_v STR_i STR_a STR_n "\0" -#define STRING_Siddham0 STR_S STR_i STR_d STR_d STR_h STR_a STR_m "\0" -#define STRING_SignWriting0 STR_S STR_i STR_g STR_n STR_W STR_r STR_i STR_t STR_i STR_n STR_g "\0" -#define STRING_Sinhala0 STR_S STR_i STR_n STR_h STR_a STR_l STR_a "\0" -#define STRING_Sk0 STR_S STR_k "\0" -#define STRING_Sm0 STR_S STR_m "\0" -#define STRING_So0 STR_S STR_o "\0" -#define STRING_Sogdian0 STR_S STR_o STR_g STR_d STR_i STR_a STR_n "\0" -#define STRING_Sora_Sompeng0 STR_S STR_o STR_r STR_a STR_UNDERSCORE STR_S STR_o STR_m STR_p STR_e STR_n STR_g "\0" -#define STRING_Soyombo0 STR_S STR_o STR_y STR_o STR_m STR_b STR_o "\0" -#define STRING_Sundanese0 STR_S STR_u STR_n STR_d STR_a STR_n STR_e STR_s STR_e "\0" -#define STRING_Syloti_Nagri0 STR_S STR_y STR_l STR_o STR_t STR_i STR_UNDERSCORE STR_N STR_a STR_g STR_r STR_i "\0" -#define STRING_Syriac0 STR_S STR_y STR_r STR_i STR_a STR_c "\0" -#define STRING_Tagalog0 STR_T STR_a STR_g STR_a STR_l STR_o STR_g "\0" -#define STRING_Tagbanwa0 STR_T STR_a STR_g STR_b STR_a STR_n STR_w STR_a "\0" -#define STRING_Tai_Le0 STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_e "\0" -#define STRING_Tai_Tham0 STR_T STR_a STR_i STR_UNDERSCORE STR_T STR_h STR_a STR_m "\0" -#define STRING_Tai_Viet0 STR_T STR_a STR_i STR_UNDERSCORE STR_V STR_i STR_e STR_t "\0" -#define STRING_Takri0 STR_T STR_a STR_k STR_r STR_i "\0" -#define STRING_Tamil0 STR_T STR_a STR_m STR_i STR_l "\0" -#define STRING_Tangsa0 STR_T STR_a STR_n STR_g STR_s STR_a "\0" -#define STRING_Tangut0 STR_T STR_a STR_n STR_g STR_u STR_t "\0" -#define STRING_Telugu0 STR_T STR_e STR_l STR_u STR_g STR_u "\0" -#define STRING_Thaana0 STR_T STR_h STR_a STR_a STR_n STR_a "\0" -#define STRING_Thai0 STR_T STR_h STR_a STR_i "\0" -#define STRING_Tibetan0 STR_T STR_i STR_b STR_e STR_t STR_a STR_n "\0" -#define STRING_Tifinagh0 STR_T STR_i STR_f STR_i STR_n STR_a STR_g STR_h "\0" -#define STRING_Tirhuta0 STR_T STR_i STR_r STR_h STR_u STR_t STR_a "\0" -#define STRING_Toto0 STR_T STR_o STR_t STR_o "\0" -#define STRING_Ugaritic0 STR_U STR_g STR_a STR_r STR_i STR_t STR_i STR_c "\0" -#define STRING_Unknown0 STR_U STR_n STR_k STR_n STR_o STR_w STR_n "\0" -#define STRING_Vai0 STR_V STR_a STR_i "\0" -#define STRING_Vithkuqi0 STR_V STR_i STR_t STR_h STR_k STR_u STR_q STR_i "\0" -#define STRING_Wancho0 STR_W STR_a STR_n STR_c STR_h STR_o "\0" -#define STRING_Warang_Citi0 STR_W STR_a STR_r STR_a STR_n STR_g STR_UNDERSCORE STR_C STR_i STR_t STR_i "\0" -#define STRING_Xan0 STR_X STR_a STR_n "\0" -#define STRING_Xps0 STR_X STR_p STR_s "\0" -#define STRING_Xsp0 STR_X STR_s STR_p "\0" -#define STRING_Xuc0 STR_X STR_u STR_c "\0" -#define STRING_Xwd0 STR_X STR_w STR_d "\0" -#define STRING_Yezidi0 STR_Y STR_e STR_z STR_i STR_d STR_i "\0" -#define STRING_Yi0 STR_Y STR_i "\0" -#define STRING_Z0 STR_Z "\0" -#define STRING_Zanabazar_Square0 STR_Z STR_a STR_n STR_a STR_b STR_a STR_z STR_a STR_r STR_UNDERSCORE STR_S STR_q STR_u STR_a STR_r STR_e "\0" -#define STRING_Zl0 STR_Z STR_l "\0" -#define STRING_Zp0 STR_Z STR_p "\0" -#define STRING_Zs0 STR_Z STR_s "\0" - -const char PRIV(utt_names)[] = - STRING_Adlam0 - STRING_Ahom0 - STRING_Anatolian_Hieroglyphs0 - STRING_Any0 - STRING_Arabic0 - STRING_Armenian0 - STRING_Avestan0 - STRING_Balinese0 - STRING_Bamum0 - STRING_Bassa_Vah0 - STRING_Batak0 - STRING_Bengali0 - STRING_Bhaiksuki0 - STRING_Bopomofo0 - STRING_Brahmi0 - STRING_Braille0 - STRING_Buginese0 - STRING_Buhid0 - STRING_C0 - STRING_Canadian_Aboriginal0 - STRING_Carian0 - STRING_Caucasian_Albanian0 - STRING_Cc0 - STRING_Cf0 - STRING_Chakma0 - STRING_Cham0 - STRING_Cherokee0 - STRING_Chorasmian0 - STRING_Cn0 - STRING_Co0 - STRING_Common0 - STRING_Coptic0 - STRING_Cs0 - STRING_Cuneiform0 - STRING_Cypriot0 - STRING_Cypro_Minoan0 - STRING_Cyrillic0 - STRING_Deseret0 - STRING_Devanagari0 - STRING_Dives_Akuru0 - STRING_Dogra0 - STRING_Duployan0 - STRING_Egyptian_Hieroglyphs0 - STRING_Elbasan0 - STRING_Elymaic0 - STRING_Ethiopic0 - STRING_Georgian0 - STRING_Glagolitic0 - STRING_Gothic0 - STRING_Grantha0 - STRING_Greek0 - STRING_Gujarati0 - STRING_Gunjala_Gondi0 - STRING_Gurmukhi0 - STRING_Han0 - STRING_Hangul0 - STRING_Hanifi_Rohingya0 - STRING_Hanunoo0 - STRING_Hatran0 - STRING_Hebrew0 - STRING_Hiragana0 - STRING_Imperial_Aramaic0 - STRING_Inherited0 - STRING_Inscriptional_Pahlavi0 - STRING_Inscriptional_Parthian0 - STRING_Javanese0 - STRING_Kaithi0 - STRING_Kannada0 - STRING_Katakana0 - STRING_Kayah_Li0 - STRING_Kharoshthi0 - STRING_Khitan_Small_Script0 - STRING_Khmer0 - STRING_Khojki0 - STRING_Khudawadi0 - STRING_L0 - STRING_L_AMPERSAND0 - STRING_Lao0 - STRING_Latin0 - STRING_Lepcha0 - STRING_Limbu0 - STRING_Linear_A0 - STRING_Linear_B0 - STRING_Lisu0 - STRING_Ll0 - STRING_Lm0 - STRING_Lo0 - STRING_Lt0 - STRING_Lu0 - STRING_Lycian0 - STRING_Lydian0 - STRING_M0 - STRING_Mahajani0 - STRING_Makasar0 - STRING_Malayalam0 - STRING_Mandaic0 - STRING_Manichaean0 - STRING_Marchen0 - STRING_Masaram_Gondi0 - STRING_Mc0 - STRING_Me0 - STRING_Medefaidrin0 - STRING_Meetei_Mayek0 - STRING_Mende_Kikakui0 - STRING_Meroitic_Cursive0 - STRING_Meroitic_Hieroglyphs0 - STRING_Miao0 - STRING_Mn0 - STRING_Modi0 - STRING_Mongolian0 - STRING_Mro0 - STRING_Multani0 - STRING_Myanmar0 - STRING_N0 - STRING_Nabataean0 - STRING_Nandinagari0 - STRING_Nd0 - STRING_New_Tai_Lue0 - STRING_Newa0 - STRING_Nko0 - STRING_Nl0 - STRING_No0 - STRING_Nushu0 - STRING_Nyiakeng_Puachue_Hmong0 - STRING_Ogham0 - STRING_Ol_Chiki0 - STRING_Old_Hungarian0 - STRING_Old_Italic0 - STRING_Old_North_Arabian0 - STRING_Old_Permic0 - STRING_Old_Persian0 - STRING_Old_Sogdian0 - STRING_Old_South_Arabian0 - STRING_Old_Turkic0 - STRING_Old_Uyghur0 - STRING_Oriya0 - STRING_Osage0 - STRING_Osmanya0 - STRING_P0 - STRING_Pahawh_Hmong0 - STRING_Palmyrene0 - STRING_Pau_Cin_Hau0 - STRING_Pc0 - STRING_Pd0 - STRING_Pe0 - STRING_Pf0 - STRING_Phags_Pa0 - STRING_Phoenician0 - STRING_Pi0 - STRING_Po0 - STRING_Ps0 - STRING_Psalter_Pahlavi0 - STRING_Rejang0 - STRING_Runic0 - STRING_S0 - STRING_Samaritan0 - STRING_Saurashtra0 - STRING_Sc0 - STRING_Sharada0 - STRING_Shavian0 - STRING_Siddham0 - STRING_SignWriting0 - STRING_Sinhala0 - STRING_Sk0 - STRING_Sm0 - STRING_So0 - STRING_Sogdian0 - STRING_Sora_Sompeng0 - STRING_Soyombo0 - STRING_Sundanese0 - STRING_Syloti_Nagri0 - STRING_Syriac0 - STRING_Tagalog0 - STRING_Tagbanwa0 - STRING_Tai_Le0 - STRING_Tai_Tham0 - STRING_Tai_Viet0 - STRING_Takri0 - STRING_Tamil0 - STRING_Tangsa0 - STRING_Tangut0 - STRING_Telugu0 - STRING_Thaana0 - STRING_Thai0 - STRING_Tibetan0 - STRING_Tifinagh0 - STRING_Tirhuta0 - STRING_Toto0 - STRING_Ugaritic0 - STRING_Unknown0 - STRING_Vai0 - STRING_Vithkuqi0 - STRING_Wancho0 - STRING_Warang_Citi0 - STRING_Xan0 - STRING_Xps0 - STRING_Xsp0 - STRING_Xuc0 - STRING_Xwd0 - STRING_Yezidi0 - STRING_Yi0 - STRING_Z0 - STRING_Zanabazar_Square0 - STRING_Zl0 - STRING_Zp0 - STRING_Zs0; - -const ucp_type_table PRIV(utt)[] = { - { 0, PT_SC, ucp_Adlam }, - { 6, PT_SC, ucp_Ahom }, - { 11, PT_SC, ucp_Anatolian_Hieroglyphs }, - { 33, PT_ANY, 0 }, - { 37, PT_SC, ucp_Arabic }, - { 44, PT_SC, ucp_Armenian }, - { 53, PT_SC, ucp_Avestan }, - { 61, PT_SC, ucp_Balinese }, - { 70, PT_SC, ucp_Bamum }, - { 76, PT_SC, ucp_Bassa_Vah }, - { 86, PT_SC, ucp_Batak }, - { 92, PT_SC, ucp_Bengali }, - { 100, PT_SC, ucp_Bhaiksuki }, - { 110, PT_SC, ucp_Bopomofo }, - { 119, PT_SC, ucp_Brahmi }, - { 126, PT_SC, ucp_Braille }, - { 134, PT_SC, ucp_Buginese }, - { 143, PT_SC, ucp_Buhid }, - { 149, PT_GC, ucp_C }, - { 151, PT_SC, ucp_Canadian_Aboriginal }, - { 171, PT_SC, ucp_Carian }, - { 178, PT_SC, ucp_Caucasian_Albanian }, - { 197, PT_PC, ucp_Cc }, - { 200, PT_PC, ucp_Cf }, - { 203, PT_SC, ucp_Chakma }, - { 210, PT_SC, ucp_Cham }, - { 215, PT_SC, ucp_Cherokee }, - { 224, PT_SC, ucp_Chorasmian }, - { 235, PT_PC, ucp_Cn }, - { 238, PT_PC, ucp_Co }, - { 241, PT_SC, ucp_Common }, - { 248, PT_SC, ucp_Coptic }, - { 255, PT_PC, ucp_Cs }, - { 258, PT_SC, ucp_Cuneiform }, - { 268, PT_SC, ucp_Cypriot }, - { 276, PT_SC, ucp_Cypro_Minoan }, - { 289, PT_SC, ucp_Cyrillic }, - { 298, PT_SC, ucp_Deseret }, - { 306, PT_SC, ucp_Devanagari }, - { 317, PT_SC, ucp_Dives_Akuru }, - { 329, PT_SC, ucp_Dogra }, - { 335, PT_SC, ucp_Duployan }, - { 344, PT_SC, ucp_Egyptian_Hieroglyphs }, - { 365, PT_SC, ucp_Elbasan }, - { 373, PT_SC, ucp_Elymaic }, - { 381, PT_SC, ucp_Ethiopic }, - { 390, PT_SC, ucp_Georgian }, - { 399, PT_SC, ucp_Glagolitic }, - { 410, PT_SC, ucp_Gothic }, - { 417, PT_SC, ucp_Grantha }, - { 425, PT_SC, ucp_Greek }, - { 431, PT_SC, ucp_Gujarati }, - { 440, PT_SC, ucp_Gunjala_Gondi }, - { 454, PT_SC, ucp_Gurmukhi }, - { 463, PT_SC, ucp_Han }, - { 467, PT_SC, ucp_Hangul }, - { 474, PT_SC, ucp_Hanifi_Rohingya }, - { 490, PT_SC, ucp_Hanunoo }, - { 498, PT_SC, ucp_Hatran }, - { 505, PT_SC, ucp_Hebrew }, - { 512, PT_SC, ucp_Hiragana }, - { 521, PT_SC, ucp_Imperial_Aramaic }, - { 538, PT_SC, ucp_Inherited }, - { 548, PT_SC, ucp_Inscriptional_Pahlavi }, - { 570, PT_SC, ucp_Inscriptional_Parthian }, - { 593, PT_SC, ucp_Javanese }, - { 602, PT_SC, ucp_Kaithi }, - { 609, PT_SC, ucp_Kannada }, - { 617, PT_SC, ucp_Katakana }, - { 626, PT_SC, ucp_Kayah_Li }, - { 635, PT_SC, ucp_Kharoshthi }, - { 646, PT_SC, ucp_Khitan_Small_Script }, - { 666, PT_SC, ucp_Khmer }, - { 672, PT_SC, ucp_Khojki }, - { 679, PT_SC, ucp_Khudawadi }, - { 689, PT_GC, ucp_L }, - { 691, PT_LAMP, 0 }, - { 694, PT_SC, ucp_Lao }, - { 698, PT_SC, ucp_Latin }, - { 704, PT_SC, ucp_Lepcha }, - { 711, PT_SC, ucp_Limbu }, - { 717, PT_SC, ucp_Linear_A }, - { 726, PT_SC, ucp_Linear_B }, - { 735, PT_SC, ucp_Lisu }, - { 740, PT_PC, ucp_Ll }, - { 743, PT_PC, ucp_Lm }, - { 746, PT_PC, ucp_Lo }, - { 749, PT_PC, ucp_Lt }, - { 752, PT_PC, ucp_Lu }, - { 755, PT_SC, ucp_Lycian }, - { 762, PT_SC, ucp_Lydian }, - { 769, PT_GC, ucp_M }, - { 771, PT_SC, ucp_Mahajani }, - { 780, PT_SC, ucp_Makasar }, - { 788, PT_SC, ucp_Malayalam }, - { 798, PT_SC, ucp_Mandaic }, - { 806, PT_SC, ucp_Manichaean }, - { 817, PT_SC, ucp_Marchen }, - { 825, PT_SC, ucp_Masaram_Gondi }, - { 839, PT_PC, ucp_Mc }, - { 842, PT_PC, ucp_Me }, - { 845, PT_SC, ucp_Medefaidrin }, - { 857, PT_SC, ucp_Meetei_Mayek }, - { 870, PT_SC, ucp_Mende_Kikakui }, - { 884, PT_SC, ucp_Meroitic_Cursive }, - { 901, PT_SC, ucp_Meroitic_Hieroglyphs }, - { 922, PT_SC, ucp_Miao }, - { 927, PT_PC, ucp_Mn }, - { 930, PT_SC, ucp_Modi }, - { 935, PT_SC, ucp_Mongolian }, - { 945, PT_SC, ucp_Mro }, - { 949, PT_SC, ucp_Multani }, - { 957, PT_SC, ucp_Myanmar }, - { 965, PT_GC, ucp_N }, - { 967, PT_SC, ucp_Nabataean }, - { 977, PT_SC, ucp_Nandinagari }, - { 989, PT_PC, ucp_Nd }, - { 992, PT_SC, ucp_New_Tai_Lue }, - { 1004, PT_SC, ucp_Newa }, - { 1009, PT_SC, ucp_Nko }, - { 1013, PT_PC, ucp_Nl }, - { 1016, PT_PC, ucp_No }, - { 1019, PT_SC, ucp_Nushu }, - { 1025, PT_SC, ucp_Nyiakeng_Puachue_Hmong }, - { 1048, PT_SC, ucp_Ogham }, - { 1054, PT_SC, ucp_Ol_Chiki }, - { 1063, PT_SC, ucp_Old_Hungarian }, - { 1077, PT_SC, ucp_Old_Italic }, - { 1088, PT_SC, ucp_Old_North_Arabian }, - { 1106, PT_SC, ucp_Old_Permic }, - { 1117, PT_SC, ucp_Old_Persian }, - { 1129, PT_SC, ucp_Old_Sogdian }, - { 1141, PT_SC, ucp_Old_South_Arabian }, - { 1159, PT_SC, ucp_Old_Turkic }, - { 1170, PT_SC, ucp_Old_Uyghur }, - { 1181, PT_SC, ucp_Oriya }, - { 1187, PT_SC, ucp_Osage }, - { 1193, PT_SC, ucp_Osmanya }, - { 1201, PT_GC, ucp_P }, - { 1203, PT_SC, ucp_Pahawh_Hmong }, - { 1216, PT_SC, ucp_Palmyrene }, - { 1226, PT_SC, ucp_Pau_Cin_Hau }, - { 1238, PT_PC, ucp_Pc }, - { 1241, PT_PC, ucp_Pd }, - { 1244, PT_PC, ucp_Pe }, - { 1247, PT_PC, ucp_Pf }, - { 1250, PT_SC, ucp_Phags_Pa }, - { 1259, PT_SC, ucp_Phoenician }, - { 1270, PT_PC, ucp_Pi }, - { 1273, PT_PC, ucp_Po }, - { 1276, PT_PC, ucp_Ps }, - { 1279, PT_SC, ucp_Psalter_Pahlavi }, - { 1295, PT_SC, ucp_Rejang }, - { 1302, PT_SC, ucp_Runic }, - { 1308, PT_GC, ucp_S }, - { 1310, PT_SC, ucp_Samaritan }, - { 1320, PT_SC, ucp_Saurashtra }, - { 1331, PT_PC, ucp_Sc }, - { 1334, PT_SC, ucp_Sharada }, - { 1342, PT_SC, ucp_Shavian }, - { 1350, PT_SC, ucp_Siddham }, - { 1358, PT_SC, ucp_SignWriting }, - { 1370, PT_SC, ucp_Sinhala }, - { 1378, PT_PC, ucp_Sk }, - { 1381, PT_PC, ucp_Sm }, - { 1384, PT_PC, ucp_So }, - { 1387, PT_SC, ucp_Sogdian }, - { 1395, PT_SC, ucp_Sora_Sompeng }, - { 1408, PT_SC, ucp_Soyombo }, - { 1416, PT_SC, ucp_Sundanese }, - { 1426, PT_SC, ucp_Syloti_Nagri }, - { 1439, PT_SC, ucp_Syriac }, - { 1446, PT_SC, ucp_Tagalog }, - { 1454, PT_SC, ucp_Tagbanwa }, - { 1463, PT_SC, ucp_Tai_Le }, - { 1470, PT_SC, ucp_Tai_Tham }, - { 1479, PT_SC, ucp_Tai_Viet }, - { 1488, PT_SC, ucp_Takri }, - { 1494, PT_SC, ucp_Tamil }, - { 1500, PT_SC, ucp_Tangsa }, - { 1507, PT_SC, ucp_Tangut }, - { 1514, PT_SC, ucp_Telugu }, - { 1521, PT_SC, ucp_Thaana }, - { 1528, PT_SC, ucp_Thai }, - { 1533, PT_SC, ucp_Tibetan }, - { 1541, PT_SC, ucp_Tifinagh }, - { 1550, PT_SC, ucp_Tirhuta }, - { 1558, PT_SC, ucp_Toto }, - { 1563, PT_SC, ucp_Ugaritic }, - { 1572, PT_SC, ucp_Unknown }, - { 1580, PT_SC, ucp_Vai }, - { 1584, PT_SC, ucp_Vithkuqi }, - { 1593, PT_SC, ucp_Wancho }, - { 1600, PT_SC, ucp_Warang_Citi }, - { 1612, PT_ALNUM, 0 }, - { 1616, PT_PXSPACE, 0 }, - { 1620, PT_SPACE, 0 }, - { 1624, PT_UCNC, 0 }, - { 1628, PT_WORD, 0 }, - { 1632, PT_SC, ucp_Yezidi }, - { 1639, PT_SC, ucp_Yi }, - { 1642, PT_GC, ucp_Z }, - { 1644, PT_SC, ucp_Zanabazar_Square }, - { 1661, PT_PC, ucp_Zl }, - { 1664, PT_PC, ucp_Zp }, - { 1667, PT_PC, ucp_Zs } -}; +/* Finally, include the tables that are auto-generated from the Unicode data +files. */ -const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table); +#include "pcre2_ucptables.c" #endif /* SUPPORT_UNICODE */ diff --git a/thirdparty/pcre2/src/pcre2_ucd.c b/thirdparty/pcre2/src/pcre2_ucd.c index 0b8ac75bd4..5e0fc37c35 100644 --- a/thirdparty/pcre2/src/pcre2_ucd.c +++ b/thirdparty/pcre2/src/pcre2_ucd.c @@ -1,36 +1,71 @@ -/* This module is generated by the maint/MultiStage2.py script. -Do not modify it by hand. Instead modify the script and run it -to regenerate this code. +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Original API code Copyright (c) 1997-2012 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge + +This module is auto-generated from Unicode data files. DO NOT EDIT MANUALLY! +Instead, modify the maint/GenerateUcd.py script and run it to generate +a new version of this code. + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ -As well as being part of the PCRE2 library, this module is #included -by the pcre2test program, which redefines the PRIV macro to change -table names from _pcre2_xxx to xxxx, thereby avoiding name clashes -with the library. At present, just one of these tables is actually -needed. */ +/* This file contains tables of Unicode properties that are extracted from +Unicode data files. See the comments at the start of maint/GenerateUcd.py for +details. -#ifndef PCRE2_PCRE2TEST +As well as being part of the PCRE2 library, this file is #included by the +pcre2test program, which redefines the PRIV macro to change table names from +_pcre2_xxx to xxxx, thereby avoiding name clashes with the library. At present, +just one of these tables is actually needed. When compiling the library, some +headers are needed. */ +#ifndef PCRE2_PCRE2TEST #ifdef HAVE_CONFIG_H #include "config.h" #endif - #include "pcre2_internal.h" - #endif /* PCRE2_PCRE2TEST */ -/* Unicode character database. */ -/* This file was autogenerated by the MultiStage2.py script. */ -/* Total size: 102844 bytes, block size: 128. */ - -/* The tables herein are needed only when UCP support is built, -and in PCRE2 that happens automatically with UTF support. -This module should not be referenced otherwise, so -it should not matter whether it is compiled or not. However -a comment was received about space saving - maybe the guy linked -all the modules rather than using a library - so we include a -condition to cut out the tables when not needed. But don't leave -a totally empty module because some compilers barf at that. -Instead, just supply some small dummy tables. */ +/* The tables herein are needed only when UCP support is built, and in PCRE2 +that happens automatically with UTF support. This module should not be +referenced otherwise, so it should not matter whether it is compiled or not. +However a comment was received about space saving - maybe the guy linked all +the modules rather than using a library - so we include a condition to cut out +the tables when not needed. But don't leave a totally empty module because some +compilers barf at that. Instead, just supply some small dummy tables. */ #ifndef SUPPORT_UNICODE const ucd_record PRIV(ucd_records)[] = {{0,0,0,0,0,0,0 }}; @@ -39,11 +74,27 @@ const uint16_t PRIV(ucd_stage2)[] = {0}; const uint32_t PRIV(ucd_caseless_sets)[] = {0}; #else +/* Total size: 111116 bytes, block size: 128. */ + const char *PRIV(unicode_version) = "14.0.0"; -/* If the 32-bit library is run in non-32-bit mode, character values -greater than 0x10ffff may be encountered. For these we set up a -special record. */ +/* When recompiling tables with a new Unicode version, please check the types +in this structure definition with those in pcre2_internal.h (the actual field +names will be different). + +typedef struct { +uint8_t property_0; +uint8_t property_1; +uint8_t property_2; +uint8_t property_3; +int32_t property_4; +uint16_t property_5; +uint16_t property_6; +} ucd_record; +*/ + +/* If the 32-bit library is run in non-32-bit mode, character values greater +than 0x10ffff may be encountered. For these we set up a special record. */ #if PCRE2_CODE_UNIT_WIDTH == 32 const ucd_record PRIV(dummy_ucd_record)[] = {{ @@ -52,68 +103,53 @@ const ucd_record PRIV(dummy_ucd_record)[] = {{ ucp_gbOther, /* grapheme break property */ 0, /* case set */ 0, /* other case */ - ucp_Unknown, /* script extension */ - 0, /* dummy filler */ + 0 | (ucp_bidiL << UCD_BIDICLASS_SHIFT), /* script extension and bidi class */ + 0, /* bool properties offset */ }}; #endif -/* When recompiling tables with a new Unicode version, please check the -types in this structure definition from pcre2_internal.h (the actual -field names will be different): - -typedef struct { -uint8_t property_0; -uint8_t property_1; -uint8_t property_2; -uint8_t property_3; -pcre_int32 property_4; -pcre_int16 property_5; -uint16_t property_6; -} ucd_record; -*/ - /* This table contains lists of characters that are caseless sets of more than one character. Each list is terminated by NOTACHAR. */ const uint32_t PRIV(ucd_caseless_sets)[] = { NOTACHAR, - 0x0053, 0x0073, 0x017f, NOTACHAR, - 0x01c4, 0x01c5, 0x01c6, NOTACHAR, - 0x01c7, 0x01c8, 0x01c9, NOTACHAR, - 0x01ca, 0x01cb, 0x01cc, NOTACHAR, - 0x01f1, 0x01f2, 0x01f3, NOTACHAR, - 0x0345, 0x0399, 0x03b9, 0x1fbe, NOTACHAR, - 0x00b5, 0x039c, 0x03bc, NOTACHAR, - 0x03a3, 0x03c2, 0x03c3, NOTACHAR, - 0x0392, 0x03b2, 0x03d0, NOTACHAR, - 0x0398, 0x03b8, 0x03d1, 0x03f4, NOTACHAR, - 0x03a6, 0x03c6, 0x03d5, NOTACHAR, - 0x03a0, 0x03c0, 0x03d6, NOTACHAR, - 0x039a, 0x03ba, 0x03f0, NOTACHAR, - 0x03a1, 0x03c1, 0x03f1, NOTACHAR, - 0x0395, 0x03b5, 0x03f5, NOTACHAR, - 0x0412, 0x0432, 0x1c80, NOTACHAR, - 0x0414, 0x0434, 0x1c81, NOTACHAR, - 0x041e, 0x043e, 0x1c82, NOTACHAR, - 0x0421, 0x0441, 0x1c83, NOTACHAR, - 0x0422, 0x0442, 0x1c84, 0x1c85, NOTACHAR, - 0x042a, 0x044a, 0x1c86, NOTACHAR, - 0x0462, 0x0463, 0x1c87, NOTACHAR, - 0x1e60, 0x1e61, 0x1e9b, NOTACHAR, - 0x03a9, 0x03c9, 0x2126, NOTACHAR, - 0x004b, 0x006b, 0x212a, NOTACHAR, - 0x00c5, 0x00e5, 0x212b, NOTACHAR, - 0x1c88, 0xa64a, 0xa64b, NOTACHAR, + 0x0053, 0x0073, 0x017f, NOTACHAR, + 0x01c4, 0x01c5, 0x01c6, NOTACHAR, + 0x01c7, 0x01c8, 0x01c9, NOTACHAR, + 0x01ca, 0x01cb, 0x01cc, NOTACHAR, + 0x01f1, 0x01f2, 0x01f3, NOTACHAR, + 0x0345, 0x0399, 0x03b9, 0x1fbe, NOTACHAR, + 0x00b5, 0x039c, 0x03bc, NOTACHAR, + 0x03a3, 0x03c2, 0x03c3, NOTACHAR, + 0x0392, 0x03b2, 0x03d0, NOTACHAR, + 0x0398, 0x03b8, 0x03d1, 0x03f4, NOTACHAR, + 0x03a6, 0x03c6, 0x03d5, NOTACHAR, + 0x03a0, 0x03c0, 0x03d6, NOTACHAR, + 0x039a, 0x03ba, 0x03f0, NOTACHAR, + 0x03a1, 0x03c1, 0x03f1, NOTACHAR, + 0x0395, 0x03b5, 0x03f5, NOTACHAR, + 0x0412, 0x0432, 0x1c80, NOTACHAR, + 0x0414, 0x0434, 0x1c81, NOTACHAR, + 0x041e, 0x043e, 0x1c82, NOTACHAR, + 0x0421, 0x0441, 0x1c83, NOTACHAR, + 0x0422, 0x0442, 0x1c84, 0x1c85, NOTACHAR, + 0x042a, 0x044a, 0x1c86, NOTACHAR, + 0x0462, 0x0463, 0x1c87, NOTACHAR, + 0x1e60, 0x1e61, 0x1e9b, NOTACHAR, + 0x03a9, 0x03c9, 0x2126, NOTACHAR, + 0x004b, 0x006b, 0x212a, NOTACHAR, + 0x00c5, 0x00e5, 0x212b, NOTACHAR, + 0x1c88, 0xa64a, 0xa64b, NOTACHAR, }; -/* When #included in pcre2test, we don't need the table of digit -sets, nor the the large main UCD tables. */ +/* When #included in pcre2test, we don't need the table of digit sets, nor the +the large main UCD tables. */ #ifndef PCRE2_PCRE2TEST -/* This table lists the code points for the '9' characters in each -set of decimal digits. It is used to ensure that all the digits in -a script run come from the same set. */ +/* This table lists the code points for the '9' characters in each set of +decimal digits. It is used to ensure that all the digits in a script run come +from the same set. */ const uint32_t PRIV(ucd_digit_sets)[] = { 66, /* Number of subsequent values */ @@ -128,1072 +164,1676 @@ const uint32_t PRIV(ucd_digit_sets)[] = { 0x1e959, 0x1fbf9, }; -/* This vector is a list of lists of scripts for the Script Extension -property. Each sublist is zero-terminated. */ - -const uint8_t PRIV(ucd_script_sets)[] = { - /* 0 */ 0, - /* 1 */ 1, 11, 0, - /* 4 */ 1, 144, 0, - /* 7 */ 1, 64, 0, - /* 10 */ 1, 50, 0, - /* 13 */ 1, 56, 0, - /* 16 */ 3, 15, 0, - /* 19 */ 4, 23, 0, - /* 22 */ 6, 84, 0, - /* 25 */ 12, 36, 0, - /* 28 */ 13, 18, 0, - /* 31 */ 13, 34, 0, - /* 34 */ 13, 118, 0, - /* 37 */ 13, 50, 0, - /* 40 */ 15, 107, 0, - /* 43 */ 15, 150, 0, - /* 46 */ 15, 100, 0, - /* 49 */ 15, 54, 0, - /* 52 */ 17, 34, 0, - /* 55 */ 107, 54, 0, - /* 58 */ 21, 108, 0, - /* 61 */ 22, 129, 0, - /* 64 */ 23, 34, 0, - /* 67 */ 27, 30, 0, - /* 70 */ 29, 150, 0, - /* 73 */ 34, 38, 0, - /* 76 */ 112, 158, 0, - /* 79 */ 38, 65, 0, - /* 82 */ 1, 50, 56, 0, - /* 86 */ 1, 56, 156, 0, - /* 90 */ 3, 96, 49, 0, - /* 94 */ 96, 39, 53, 0, - /* 98 */ 157, 12, 36, 0, - /* 102 */ 12, 110, 36, 0, - /* 106 */ 15, 107, 29, 0, - /* 110 */ 15, 107, 34, 0, - /* 114 */ 23, 27, 30, 0, - /* 118 */ 69, 34, 39, 0, - /* 122 */ 3, 15, 107, 29, 0, - /* 127 */ 7, 25, 52, 51, 0, - /* 132 */ 15, 142, 85, 111, 0, - /* 137 */ 4, 24, 23, 27, 30, 0, - /* 143 */ 1, 64, 144, 50, 56, 156, 0, - /* 150 */ 4, 24, 23, 27, 30, 61, 0, - /* 157 */ 15, 29, 37, 44, 54, 55, 0, - /* 164 */ 132, 1, 64, 144, 50, 56, 156, 0, - /* 172 */ 3, 15, 107, 29, 150, 44, 55, 124, 0, - /* 181 */ 132, 1, 95, 112, 158, 121, 144, 148, 50, 0, - /* 191 */ 15, 142, 21, 22, 108, 85, 111, 114, 109, 102, 124, 0, - /* 203 */ 3, 15, 107, 21, 22, 29, 34, 37, 44, 54, 55, 124, 0, - /* 216 */ 3, 15, 107, 21, 22, 29, 34, 37, 44, 100, 54, 55, 124, 0, - /* 230 */ 15, 142, 21, 22, 108, 29, 85, 111, 114, 150, 109, 102, 124, 0, - /* 244 */ 15, 142, 21, 22, 108, 29, 85, 111, 37, 114, 150, 109, 102, 124, 0, - /* 259 */ 3, 15, 142, 143, 138, 107, 21, 22, 29, 111, 37, 150, 44, 109, 48, 49, 102, 54, 55, 124, 0, - /* 280 */ 3, 15, 142, 143, 138, 107, 21, 22, 29, 35, 111, 37, 150, 44, 109, 48, 49, 102, 54, 55, 124, 0, - /* 302 */ +/* This vector is a list of script bitsets for the Script Extension property. +The number of 32-bit words in each bitset is #defined in pcre2_ucp.h as +ucd_script_sets_item_size. */ + +const uint32_t PRIV(ucd_script_sets)[] = { + 0x00000000u, 0x00000000u, 0x00000000u, + 0x00000080u, 0x00000000u, 0x00000000u, + 0x00000040u, 0x00000000u, 0x00000000u, + 0x00000000u, 0x00004000u, 0x00000000u, + 0x00000002u, 0x00000000u, 0x00000000u, + 0x00800000u, 0x00000000u, 0x00000000u, + 0x00000001u, 0x00000000u, 0x00000000u, + 0x00000000u, 0x00000000u, 0x00000001u, + 0x00000010u, 0x00000000u, 0x00000000u, + 0x00000008u, 0x00000004u, 0x00000000u, + 0x00000008u, 0x40000000u, 0x00000000u, + 0x00000008u, 0x00000040u, 0x00000000u, + 0x00000018u, 0x00000000u, 0x00000000u, + 0x00000028u, 0x00000000u, 0x00000000u, + 0x000000c0u, 0x00000000u, 0x00000000u, + 0x00c00000u, 0x00000000u, 0x00000000u, + 0x00000000u, 0x00000102u, 0x00000000u, + 0x80000000u, 0x00000001u, 0x00000000u, + 0x00000004u, 0x00000008u, 0x00000000u, + 0x00000005u, 0x00000000u, 0x00000000u, + 0x00000004u, 0x00200000u, 0x00000000u, + 0x00000014u, 0x00000000u, 0x00000000u, + 0x00000040u, 0x00008000u, 0x00000000u, + 0x00000040u, 0x00000000u, 0x00000001u, + 0x00000040u, 0x00001000u, 0x00000000u, + 0x00000840u, 0x00000000u, 0x00000000u, + 0x00020001u, 0x00000000u, 0x00000000u, + 0x00000800u, 0x00008000u, 0x00000000u, + 0x00000200u, 0x00010000u, 0x00000000u, + 0x00000100u, 0x02000000u, 0x00000000u, + 0x00800001u, 0x00000000u, 0x00000000u, + 0x00300000u, 0x00000000u, 0x00000000u, + 0x00002000u, 0x00000000u, 0x00000001u, + 0x00080001u, 0x00000000u, 0x00000000u, + 0x00000000u, 0x00080000u, 0x00000008u, + 0x00080000u, 0x00000020u, 0x00000000u, + 0x00000038u, 0x00000000u, 0x00000000u, + 0x00000028u, 0x00000000u, 0x00000002u, + 0x00000080u, 0x00000810u, 0x00000000u, + 0x40010000u, 0x00000800u, 0x00000000u, + 0x80000000u, 0x00000001u, 0x00000004u, + 0x80000000u, 0x00020001u, 0x00000000u, + 0x00002040u, 0x00008000u, 0x00000000u, + 0x00000041u, 0x00008000u, 0x00000000u, + 0x00b00000u, 0x00000000u, 0x00000000u, + 0x00010001u, 0x00000080u, 0x00000000u, + 0x000020c0u, 0x00008000u, 0x00000000u, + 0x1e000000u, 0x00000000u, 0x00000000u, + 0x00000040u, 0x10040200u, 0x00000000u, + 0x00f40000u, 0x00000000u, 0x00000000u, + 0x00000038u, 0x40000040u, 0x00000002u, + 0x01f40000u, 0x00000000u, 0x00000000u, + 0x00007c40u, 0x00000000u, 0x00000000u, + 0x00000038u, 0x44000040u, 0x00000002u, + 0x000034c0u, 0x01008000u, 0x00000001u, + 0x00000018u, 0xc4480400u, 0x00000008u, + 0x00000340u, 0x11952200u, 0x00000000u, + 0x00007fc1u, 0x01008000u, 0x00000000u, + 0x00007fc1u, 0x01009000u, 0x00000000u, + 0x00002340u, 0x11952200u, 0x00000001u, + 0x00006340u, 0x11952200u, 0x00000001u, + 0x0000ffc0u, 0x3984a010u, 0x00000001u, + 0x2000ffc0u, 0x3984a010u, 0x00000001u, +}; + +/* This vector is a list of bitsets for Boolean properties. The number of +32_bit words in each bitset is #defined as ucd_boolprop_sets_item_size in +pcre2_ucp.h. */ + +const uint32_t PRIV(ucd_boolprop_sets)[] = { + 0x00000000u, 0x00000000u, + 0x00000001u, 0x00000000u, + 0x00000001u, 0x00020040u, + 0x00800001u, 0x00020040u, + 0x00800001u, 0x00002820u, + 0x00800001u, 0x00000120u, + 0x00830001u, 0x00000020u, + 0x00800001u, 0x00000020u, + 0x00800021u, 0x00000120u, + 0x00800011u, 0x00000020u, + 0x00800001u, 0x00000028u, + 0x00800001u, 0x00002020u, + 0x00801001u, 0x00000020u, + 0x00800021u, 0x00002820u, + 0x24830003u, 0x00040000u, + 0x00800021u, 0x00002020u, + 0x00800011u, 0x00000028u, + 0x648003c7u, 0x000c8000u, + 0x608003c5u, 0x000c8000u, + 0x00808021u, 0x00000028u, + 0x20800001u, 0x00040000u, + 0x00808021u, 0x00000020u, + 0x64800d47u, 0x000c0004u, + 0x60800d45u, 0x000c0004u, + 0x60800d45u, 0x000c1004u, + 0x00000000u, 0x00020040u, + 0x00800000u, 0x00020000u, + 0x00800000u, 0x00000020u, + 0x00808020u, 0x00000000u, + 0x00a10000u, 0x00000020u, + 0x60800044u, 0x000c0004u, + 0x00800010u, 0x00000120u, + 0x00800000u, 0x00000028u, + 0x00002020u, 0x00000000u, + 0x00800000u, 0x00000000u, + 0x60800dc4u, 0x000c0004u, + 0x20c08020u, 0x00040000u, + 0x608003c4u, 0x000c8000u, + 0x60800d44u, 0x000c0004u, + 0x60800d44u, 0x000c1004u, + 0x60804dc4u, 0x000c0004u, + 0x60800004u, 0x000c0000u, + 0x608007c4u, 0x000c8000u, + 0x60800bc4u, 0x000c0000u, + 0x60808064u, 0x000c0004u, + 0x60808064u, 0x000c1004u, + 0x60808024u, 0x000c0000u, + 0x60c08024u, 0x000c0000u, + 0x21008020u, 0x00040000u, + 0x21008de4u, 0x00040004u, + 0x21002020u, 0x00040000u, + 0x21000020u, 0x00040000u, + 0x60808064u, 0x00000004u, + 0x00800000u, 0x00002000u, + 0x20800020u, 0x00042000u, + 0x60800dc4u, 0x000c000cu, + 0x60800044u, 0x000c8008u, + 0x60800044u, 0x000c8000u, + 0x608003c4u, 0x000c8008u, + 0x00800000u, 0x00000008u, + 0x01000020u, 0x00000000u, + 0x00800020u, 0x00000000u, + 0x00800000u, 0x00002800u, + 0x00801000u, 0x00000000u, + 0x21008024u, 0x00040000u, + 0x21000024u, 0x00040000u, + 0x00000020u, 0x00000080u, + 0x00002028u, 0x00000000u, + 0x60c00024u, 0x000c0000u, + 0x20800000u, 0x00040000u, + 0x60804004u, 0x000c0000u, + 0x60800024u, 0x000c0000u, + 0x20800004u, 0x00040000u, + 0x23008020u, 0x00040000u, + 0x21000004u, 0x00040000u, + 0x21408020u, 0x00040000u, + 0x60800004u, 0x00040000u, + 0x23000024u, 0x00040000u, + 0x60800004u, 0x000c0002u, + 0x00800010u, 0x00000000u, + 0x20808000u, 0x00040000u, + 0x21004024u, 0x00040000u, + 0x20808004u, 0x00040000u, + 0x60800944u, 0x000c0004u, + 0x60802004u, 0x000c0000u, + 0x60800344u, 0x000c8000u, + 0x22808000u, 0x00040000u, + 0x22800000u, 0x00040000u, + 0x00c00000u, 0x00000000u, + 0x21002020u, 0x00050000u, + 0x61000024u, 0x000c0000u, + 0x23000020u, 0x00040000u, + 0x01008020u, 0x00000000u, + 0x21408024u, 0x00040000u, + 0x00808000u, 0x00000000u, + 0x60800064u, 0x000c0004u, + 0x60800044u, 0x000c1004u, + 0x60800064u, 0x000c1004u, + 0x01002020u, 0x00000001u, + 0x00022020u, 0x00000001u, + 0x00002028u, 0x00000040u, + 0x00801000u, 0x00000020u, + 0x00800020u, 0x00000120u, + 0x00800000u, 0x00000120u, + 0x00800020u, 0x00000020u, + 0x00a10000u, 0x00002820u, + 0x00800000u, 0x00002820u, + 0x20800000u, 0x00040008u, + 0x00800010u, 0x00000020u, + 0x00002020u, 0x00000008u, + 0x00002000u, 0x00000000u, + 0x00006020u, 0x00000000u, + 0x00801000u, 0x00000008u, + 0x00800010u, 0x00000008u, + 0x21000020u, 0x00040008u, + 0x01020020u, 0x00000000u, + 0x60800044u, 0x000c000cu, + 0x60800000u, 0x000c0008u, + 0x00a10000u, 0x00000000u, + 0x60800000u, 0x000c0000u, + 0x60800004u, 0x000c0008u, + 0x60a10044u, 0x000c0004u, + 0x60800044u, 0x000c100cu, + 0x00a10000u, 0x00000028u, + 0x00800010u, 0x00000028u, + 0x00801000u, 0x00000028u, + 0x00b10000u, 0x00000020u, + 0x00804010u, 0x00000020u, + 0x00a00000u, 0x00000020u, + 0x00000000u, 0x00000020u, + 0x008003c4u, 0x00008000u, + 0x00a103c4u, 0x00008000u, + 0x00800d44u, 0x00000004u, + 0x00b10000u, 0x00000028u, + 0x00a00000u, 0x00000028u, + 0x00a90000u, 0x00000020u, + 0x00b90000u, 0x00000020u, + 0x00808024u, 0x00000020u, + 0x00800000u, 0x00002020u, + 0x00800000u, 0x00000200u, + 0x08800000u, 0x00000000u, + 0x10800000u, 0x00000000u, + 0xe0800004u, 0x000c0000u, + 0x21008000u, 0x00040000u, + 0x00a11000u, 0x00000020u, + 0x60808020u, 0x00000000u, + 0xe0800004u, 0x000c4000u, + 0x60808004u, 0x000c0000u, + 0x60800004u, 0x00000000u, + 0x00000000u, 0x00000010u, + 0x21022020u, 0x00050000u, + 0x00800000u, 0x00000100u, + 0x00800020u, 0x00002800u, + 0x00800020u, 0x00002000u, + 0x00800020u, 0x00000100u, + 0x24800000u, 0x00040000u, + 0x648003c4u, 0x000c8000u, + 0x00808020u, 0x00000008u, + 0x64800d44u, 0x000c0004u, + 0x00800010u, 0x00000100u, + 0x61008024u, 0x00040000u, + 0x00000020u, 0x00000000u, + 0x60c00004u, 0x000c0000u, + 0x21400020u, 0x00040000u, + 0xa1000020u, 0x00040000u, + 0x21000000u, 0x00040000u, + 0x00a00000u, 0x00000000u, + 0x00b10000u, 0x00000000u, + 0x00200000u, 0x00000000u, + 0x00800044u, 0x00008000u, + 0x00a10044u, 0x00008000u, + 0x00930000u, 0x00000400u, + 0x00b90000u, 0x00000000u, + 0x00a90000u, 0x00000000u, + 0x00970020u, 0x00000000u, + 0x00b30000u, 0x00000000u, + 0x01022020u, 0x00000000u, }; /* These are the main two-stage UCD tables. The fields in each record are: script (8 bits), character type (8 bits), grapheme break property (8 bits), -offset to multichar other cases or zero (8 bits), offset to other case -or zero (32 bits, signed), script extension (16 bits, signed), and a dummy -16-bit field to make the whole thing a multiple of 4 bytes. */ - -const ucd_record PRIV(ucd_records)[] = { /* 11964 bytes, record size 12 */ - { 10, 0, 2, 0, 0, 10, 256, }, /* 0 */ - { 10, 0, 2, 0, 0, 10, 0, }, /* 1 */ - { 10, 0, 1, 0, 0, 10, 0, }, /* 2 */ - { 10, 0, 0, 0, 0, 10, 0, }, /* 3 */ - { 10, 29, 12, 0, 0, 10, 0, }, /* 4 */ - { 10, 21, 12, 0, 0, 10, 0, }, /* 5 */ - { 10, 23, 12, 0, 0, 10, 0, }, /* 6 */ - { 10, 22, 12, 0, 0, 10, 0, }, /* 7 */ - { 10, 18, 12, 0, 0, 10, 0, }, /* 8 */ - { 10, 25, 12, 0, 0, 10, 0, }, /* 9 */ - { 10, 17, 12, 0, 0, 10, 0, }, /* 10 */ - { 10, 13, 12, 0, 0, 10, 0, }, /* 11 */ - { 34, 9, 12, 0, 32, 34, 0, }, /* 12 */ - { 34, 9, 12, 100, 32, 34, 0, }, /* 13 */ - { 34, 9, 12, 1, 32, 34, 0, }, /* 14 */ - { 10, 24, 12, 0, 0, 10, 0, }, /* 15 */ - { 10, 16, 12, 0, 0, 10, 0, }, /* 16 */ - { 34, 5, 12, 0, -32, 34, 0, }, /* 17 */ - { 34, 5, 12, 100, -32, 34, 0, }, /* 18 */ - { 34, 5, 12, 1, -32, 34, 0, }, /* 19 */ - { 10, 26, 12, 0, 0, 10, 0, }, /* 20 */ - { 10, 26, 14, 0, 0, 10, 0, }, /* 21 */ - { 34, 7, 12, 0, 0, 34, 0, }, /* 22 */ - { 10, 20, 12, 0, 0, 10, 0, }, /* 23 */ - { 10, 1, 2, 0, 0, 10, 0, }, /* 24 */ - { 10, 15, 12, 0, 0, 10, 0, }, /* 25 */ - { 10, 5, 12, 26, 775, 10, 0, }, /* 26 */ - { 10, 19, 12, 0, 0, 10, 0, }, /* 27 */ - { 34, 9, 12, 104, 32, 34, 0, }, /* 28 */ - { 34, 5, 12, 0, 7615, 34, 0, }, /* 29 */ - { 34, 5, 12, 104, -32, 34, 0, }, /* 30 */ - { 34, 5, 12, 0, 121, 34, 0, }, /* 31 */ - { 34, 9, 12, 0, 1, 34, 0, }, /* 32 */ - { 34, 5, 12, 0, -1, 34, 0, }, /* 33 */ - { 34, 9, 12, 0, 0, 34, 0, }, /* 34 */ - { 34, 5, 12, 0, 0, 34, 0, }, /* 35 */ - { 34, 9, 12, 0, -121, 34, 0, }, /* 36 */ - { 34, 5, 12, 1, -268, 34, 0, }, /* 37 */ - { 34, 5, 12, 0, 195, 34, 0, }, /* 38 */ - { 34, 9, 12, 0, 210, 34, 0, }, /* 39 */ - { 34, 9, 12, 0, 206, 34, 0, }, /* 40 */ - { 34, 9, 12, 0, 205, 34, 0, }, /* 41 */ - { 34, 9, 12, 0, 79, 34, 0, }, /* 42 */ - { 34, 9, 12, 0, 202, 34, 0, }, /* 43 */ - { 34, 9, 12, 0, 203, 34, 0, }, /* 44 */ - { 34, 9, 12, 0, 207, 34, 0, }, /* 45 */ - { 34, 5, 12, 0, 97, 34, 0, }, /* 46 */ - { 34, 9, 12, 0, 211, 34, 0, }, /* 47 */ - { 34, 9, 12, 0, 209, 34, 0, }, /* 48 */ - { 34, 5, 12, 0, 163, 34, 0, }, /* 49 */ - { 34, 9, 12, 0, 213, 34, 0, }, /* 50 */ - { 34, 5, 12, 0, 130, 34, 0, }, /* 51 */ - { 34, 9, 12, 0, 214, 34, 0, }, /* 52 */ - { 34, 9, 12, 0, 218, 34, 0, }, /* 53 */ - { 34, 9, 12, 0, 217, 34, 0, }, /* 54 */ - { 34, 9, 12, 0, 219, 34, 0, }, /* 55 */ - { 34, 5, 12, 0, 56, 34, 0, }, /* 56 */ - { 34, 9, 12, 5, 2, 34, 0, }, /* 57 */ - { 34, 8, 12, 5, 1, 34, 0, }, /* 58 */ - { 34, 5, 12, 5, -2, 34, 0, }, /* 59 */ - { 34, 9, 12, 9, 2, 34, 0, }, /* 60 */ - { 34, 8, 12, 9, 1, 34, 0, }, /* 61 */ - { 34, 5, 12, 9, -2, 34, 0, }, /* 62 */ - { 34, 9, 12, 13, 2, 34, 0, }, /* 63 */ - { 34, 8, 12, 13, 1, 34, 0, }, /* 64 */ - { 34, 5, 12, 13, -2, 34, 0, }, /* 65 */ - { 34, 5, 12, 0, -79, 34, 0, }, /* 66 */ - { 34, 9, 12, 17, 2, 34, 0, }, /* 67 */ - { 34, 8, 12, 17, 1, 34, 0, }, /* 68 */ - { 34, 5, 12, 17, -2, 34, 0, }, /* 69 */ - { 34, 9, 12, 0, -97, 34, 0, }, /* 70 */ - { 34, 9, 12, 0, -56, 34, 0, }, /* 71 */ - { 34, 9, 12, 0, -130, 34, 0, }, /* 72 */ - { 34, 9, 12, 0, 10795, 34, 0, }, /* 73 */ - { 34, 9, 12, 0, -163, 34, 0, }, /* 74 */ - { 34, 9, 12, 0, 10792, 34, 0, }, /* 75 */ - { 34, 5, 12, 0, 10815, 34, 0, }, /* 76 */ - { 34, 9, 12, 0, -195, 34, 0, }, /* 77 */ - { 34, 9, 12, 0, 69, 34, 0, }, /* 78 */ - { 34, 9, 12, 0, 71, 34, 0, }, /* 79 */ - { 34, 5, 12, 0, 10783, 34, 0, }, /* 80 */ - { 34, 5, 12, 0, 10780, 34, 0, }, /* 81 */ - { 34, 5, 12, 0, 10782, 34, 0, }, /* 82 */ - { 34, 5, 12, 0, -210, 34, 0, }, /* 83 */ - { 34, 5, 12, 0, -206, 34, 0, }, /* 84 */ - { 34, 5, 12, 0, -205, 34, 0, }, /* 85 */ - { 34, 5, 12, 0, -202, 34, 0, }, /* 86 */ - { 34, 5, 12, 0, -203, 34, 0, }, /* 87 */ - { 34, 5, 12, 0, 42319, 34, 0, }, /* 88 */ - { 34, 5, 12, 0, 42315, 34, 0, }, /* 89 */ - { 34, 5, 12, 0, -207, 34, 0, }, /* 90 */ - { 34, 5, 12, 0, 42280, 34, 0, }, /* 91 */ - { 34, 5, 12, 0, 42308, 34, 0, }, /* 92 */ - { 34, 5, 12, 0, -209, 34, 0, }, /* 93 */ - { 34, 5, 12, 0, -211, 34, 0, }, /* 94 */ - { 34, 5, 12, 0, 10743, 34, 0, }, /* 95 */ - { 34, 5, 12, 0, 42305, 34, 0, }, /* 96 */ - { 34, 5, 12, 0, 10749, 34, 0, }, /* 97 */ - { 34, 5, 12, 0, -213, 34, 0, }, /* 98 */ - { 34, 5, 12, 0, -214, 34, 0, }, /* 99 */ - { 34, 5, 12, 0, 10727, 34, 0, }, /* 100 */ - { 34, 5, 12, 0, -218, 34, 0, }, /* 101 */ - { 34, 5, 12, 0, 42307, 34, 0, }, /* 102 */ - { 34, 5, 12, 0, 42282, 34, 0, }, /* 103 */ - { 34, 5, 12, 0, -69, 34, 0, }, /* 104 */ - { 34, 5, 12, 0, -217, 34, 0, }, /* 105 */ - { 34, 5, 12, 0, -71, 34, 0, }, /* 106 */ - { 34, 5, 12, 0, -219, 34, 0, }, /* 107 */ - { 34, 5, 12, 0, 42261, 34, 0, }, /* 108 */ - { 34, 5, 12, 0, 42258, 34, 0, }, /* 109 */ - { 34, 6, 12, 0, 0, 34, 0, }, /* 110 */ - { 10, 6, 12, 0, 0, 10, 0, }, /* 111 */ - { 4, 24, 12, 0, 0, 4, 0, }, /* 112 */ - { 28, 12, 3, 0, 0, 28, 0, }, /* 113 */ - { 28, 12, 3, 0, 0, 20, 0, }, /* 114 */ - { 28, 12, 3, 21, 116, 20, 0, }, /* 115 */ - { 28, 12, 3, 0, 0, 34, 0, }, /* 116 */ - { 20, 9, 12, 0, 1, 20, 0, }, /* 117 */ - { 20, 5, 12, 0, -1, 20, 0, }, /* 118 */ - { 20, 24, 12, 0, 0, 20, 0, }, /* 119 */ - { 0, 2, 12, 0, 0, 0, 0, }, /* 120 */ - { 20, 6, 12, 0, 0, 20, 0, }, /* 121 */ - { 20, 5, 12, 0, 130, 20, 0, }, /* 122 */ - { 20, 9, 12, 0, 116, 20, 0, }, /* 123 */ - { 20, 9, 12, 0, 38, 20, 0, }, /* 124 */ - { 20, 9, 12, 0, 37, 20, 0, }, /* 125 */ - { 20, 9, 12, 0, 64, 20, 0, }, /* 126 */ - { 20, 9, 12, 0, 63, 20, 0, }, /* 127 */ - { 20, 5, 12, 0, 0, 20, 0, }, /* 128 */ - { 20, 9, 12, 0, 32, 20, 0, }, /* 129 */ - { 20, 9, 12, 34, 32, 20, 0, }, /* 130 */ - { 20, 9, 12, 59, 32, 20, 0, }, /* 131 */ - { 20, 9, 12, 38, 32, 20, 0, }, /* 132 */ - { 20, 9, 12, 21, 32, 20, 0, }, /* 133 */ - { 20, 9, 12, 51, 32, 20, 0, }, /* 134 */ - { 20, 9, 12, 26, 32, 20, 0, }, /* 135 */ - { 20, 9, 12, 47, 32, 20, 0, }, /* 136 */ - { 20, 9, 12, 55, 32, 20, 0, }, /* 137 */ - { 20, 9, 12, 30, 32, 20, 0, }, /* 138 */ - { 20, 9, 12, 43, 32, 20, 0, }, /* 139 */ - { 20, 9, 12, 96, 32, 20, 0, }, /* 140 */ - { 20, 5, 12, 0, -38, 20, 0, }, /* 141 */ - { 20, 5, 12, 0, -37, 20, 0, }, /* 142 */ - { 20, 5, 12, 0, -32, 20, 0, }, /* 143 */ - { 20, 5, 12, 34, -32, 20, 0, }, /* 144 */ - { 20, 5, 12, 59, -32, 20, 0, }, /* 145 */ - { 20, 5, 12, 38, -32, 20, 0, }, /* 146 */ - { 20, 5, 12, 21, -116, 20, 0, }, /* 147 */ - { 20, 5, 12, 51, -32, 20, 0, }, /* 148 */ - { 20, 5, 12, 26, -775, 20, 0, }, /* 149 */ - { 20, 5, 12, 47, -32, 20, 0, }, /* 150 */ - { 20, 5, 12, 55, -32, 20, 0, }, /* 151 */ - { 20, 5, 12, 30, 1, 20, 0, }, /* 152 */ - { 20, 5, 12, 30, -32, 20, 0, }, /* 153 */ - { 20, 5, 12, 43, -32, 20, 0, }, /* 154 */ - { 20, 5, 12, 96, -32, 20, 0, }, /* 155 */ - { 20, 5, 12, 0, -64, 20, 0, }, /* 156 */ - { 20, 5, 12, 0, -63, 20, 0, }, /* 157 */ - { 20, 9, 12, 0, 8, 20, 0, }, /* 158 */ - { 20, 5, 12, 34, -30, 20, 0, }, /* 159 */ - { 20, 5, 12, 38, -25, 20, 0, }, /* 160 */ - { 20, 9, 12, 0, 0, 20, 0, }, /* 161 */ - { 20, 5, 12, 43, -15, 20, 0, }, /* 162 */ - { 20, 5, 12, 47, -22, 20, 0, }, /* 163 */ - { 20, 5, 12, 0, -8, 20, 0, }, /* 164 */ - { 11, 9, 12, 0, 1, 11, 0, }, /* 165 */ - { 11, 5, 12, 0, -1, 11, 0, }, /* 166 */ - { 20, 5, 12, 51, -54, 20, 0, }, /* 167 */ - { 20, 5, 12, 55, -48, 20, 0, }, /* 168 */ - { 20, 5, 12, 0, 7, 20, 0, }, /* 169 */ - { 20, 5, 12, 0, -116, 20, 0, }, /* 170 */ - { 20, 9, 12, 38, -60, 20, 0, }, /* 171 */ - { 20, 5, 12, 59, -64, 20, 0, }, /* 172 */ - { 20, 25, 12, 0, 0, 20, 0, }, /* 173 */ - { 20, 9, 12, 0, -7, 20, 0, }, /* 174 */ - { 20, 9, 12, 0, -130, 20, 0, }, /* 175 */ - { 13, 9, 12, 0, 80, 13, 0, }, /* 176 */ - { 13, 9, 12, 0, 32, 13, 0, }, /* 177 */ - { 13, 9, 12, 63, 32, 13, 0, }, /* 178 */ - { 13, 9, 12, 67, 32, 13, 0, }, /* 179 */ - { 13, 9, 12, 71, 32, 13, 0, }, /* 180 */ - { 13, 9, 12, 75, 32, 13, 0, }, /* 181 */ - { 13, 9, 12, 79, 32, 13, 0, }, /* 182 */ - { 13, 9, 12, 84, 32, 13, 0, }, /* 183 */ - { 13, 5, 12, 0, -32, 13, 0, }, /* 184 */ - { 13, 5, 12, 63, -32, 13, 0, }, /* 185 */ - { 13, 5, 12, 67, -32, 13, 0, }, /* 186 */ - { 13, 5, 12, 71, -32, 13, 0, }, /* 187 */ - { 13, 5, 12, 75, -32, 13, 0, }, /* 188 */ - { 13, 5, 12, 79, -32, 13, 0, }, /* 189 */ - { 13, 5, 12, 84, -32, 13, 0, }, /* 190 */ - { 13, 5, 12, 0, -80, 13, 0, }, /* 191 */ - { 13, 9, 12, 0, 1, 13, 0, }, /* 192 */ - { 13, 5, 12, 0, -1, 13, 0, }, /* 193 */ - { 13, 9, 12, 88, 1, 13, 0, }, /* 194 */ - { 13, 5, 12, 88, -1, 13, 0, }, /* 195 */ - { 13, 26, 12, 0, 0, 13, 0, }, /* 196 */ - { 13, 12, 3, 0, 0, -34, 0, }, /* 197 */ - { 13, 12, 3, 0, 0, -28, 0, }, /* 198 */ - { 28, 12, 3, 0, 0, -31, 0, }, /* 199 */ - { 13, 11, 3, 0, 0, 13, 0, }, /* 200 */ - { 13, 9, 12, 0, 15, 13, 0, }, /* 201 */ - { 13, 5, 12, 0, -15, 13, 0, }, /* 202 */ - { 2, 9, 12, 0, 48, 2, 0, }, /* 203 */ - { 2, 6, 12, 0, 0, 2, 0, }, /* 204 */ - { 2, 21, 12, 0, 0, 2, 0, }, /* 205 */ - { 2, 5, 12, 0, 0, 2, 0, }, /* 206 */ - { 2, 5, 12, 0, -48, 2, 0, }, /* 207 */ - { 2, 17, 12, 0, 0, 2, 0, }, /* 208 */ - { 2, 26, 12, 0, 0, 2, 0, }, /* 209 */ - { 2, 23, 12, 0, 0, 2, 0, }, /* 210 */ - { 26, 12, 3, 0, 0, 26, 0, }, /* 211 */ - { 26, 17, 12, 0, 0, 26, 0, }, /* 212 */ - { 26, 21, 12, 0, 0, 26, 0, }, /* 213 */ - { 26, 7, 12, 0, 0, 26, 0, }, /* 214 */ - { 1, 1, 4, 0, 0, 1, 0, }, /* 215 */ - { 10, 1, 4, 0, 0, 10, 0, }, /* 216 */ - { 1, 25, 12, 0, 0, 1, 0, }, /* 217 */ - { 1, 21, 12, 0, 0, 1, 0, }, /* 218 */ - { 1, 23, 12, 0, 0, 1, 0, }, /* 219 */ - { 10, 21, 12, 0, 0, -143, 0, }, /* 220 */ - { 1, 26, 12, 0, 0, 1, 0, }, /* 221 */ - { 1, 12, 3, 0, 0, 1, 0, }, /* 222 */ - { 1, 1, 2, 0, 0, -82, 0, }, /* 223 */ - { 10, 21, 12, 0, 0, -164, 0, }, /* 224 */ - { 1, 7, 12, 0, 0, 1, 0, }, /* 225 */ - { 10, 6, 12, 0, 0, -181, 0, }, /* 226 */ - { 28, 12, 3, 0, 0, -10, 0, }, /* 227 */ - { 1, 13, 12, 0, 0, -86, 0, }, /* 228 */ - { 1, 21, 12, 0, 0, -4, 0, }, /* 229 */ - { 1, 6, 12, 0, 0, 1, 0, }, /* 230 */ - { 1, 13, 12, 0, 0, 1, 0, }, /* 231 */ - { 50, 21, 12, 0, 0, 50, 0, }, /* 232 */ - { 50, 1, 4, 0, 0, 50, 0, }, /* 233 */ - { 50, 7, 12, 0, 0, 50, 0, }, /* 234 */ - { 50, 12, 3, 0, 0, 50, 0, }, /* 235 */ - { 56, 7, 12, 0, 0, 56, 0, }, /* 236 */ - { 56, 12, 3, 0, 0, 56, 0, }, /* 237 */ - { 64, 13, 12, 0, 0, 64, 0, }, /* 238 */ - { 64, 7, 12, 0, 0, 64, 0, }, /* 239 */ - { 64, 12, 3, 0, 0, 64, 0, }, /* 240 */ - { 64, 6, 12, 0, 0, 64, 0, }, /* 241 */ - { 64, 26, 12, 0, 0, 64, 0, }, /* 242 */ - { 64, 21, 12, 0, 0, 64, 0, }, /* 243 */ - { 64, 23, 12, 0, 0, 64, 0, }, /* 244 */ - { 90, 7, 12, 0, 0, 90, 0, }, /* 245 */ - { 90, 12, 3, 0, 0, 90, 0, }, /* 246 */ - { 90, 6, 12, 0, 0, 90, 0, }, /* 247 */ - { 90, 21, 12, 0, 0, 90, 0, }, /* 248 */ - { 95, 7, 12, 0, 0, 95, 0, }, /* 249 */ - { 95, 12, 3, 0, 0, 95, 0, }, /* 250 */ - { 95, 21, 12, 0, 0, 95, 0, }, /* 251 */ - { 1, 24, 12, 0, 0, 1, 0, }, /* 252 */ - { 15, 12, 3, 0, 0, 15, 0, }, /* 253 */ - { 15, 10, 5, 0, 0, 15, 0, }, /* 254 */ - { 15, 7, 12, 0, 0, 15, 0, }, /* 255 */ - { 28, 12, 3, 0, 0, -216, 0, }, /* 256 */ - { 28, 12, 3, 0, 0, -203, 0, }, /* 257 */ - { 10, 21, 12, 0, 0, -259, 0, }, /* 258 */ - { 10, 21, 12, 0, 0, -280, 0, }, /* 259 */ - { 15, 13, 12, 0, 0, -132, 0, }, /* 260 */ - { 15, 21, 12, 0, 0, 15, 0, }, /* 261 */ - { 15, 6, 12, 0, 0, 15, 0, }, /* 262 */ - { 3, 7, 12, 0, 0, 3, 0, }, /* 263 */ - { 3, 12, 3, 0, 0, 3, 0, }, /* 264 */ - { 3, 10, 5, 0, 0, 3, 0, }, /* 265 */ - { 3, 10, 3, 0, 0, 3, 0, }, /* 266 */ - { 3, 13, 12, 0, 0, -90, 0, }, /* 267 */ - { 3, 23, 12, 0, 0, 3, 0, }, /* 268 */ - { 3, 15, 12, 0, 0, 3, 0, }, /* 269 */ - { 3, 26, 12, 0, 0, 3, 0, }, /* 270 */ - { 3, 21, 12, 0, 0, 3, 0, }, /* 271 */ - { 22, 12, 3, 0, 0, 22, 0, }, /* 272 */ - { 22, 10, 5, 0, 0, 22, 0, }, /* 273 */ - { 22, 7, 12, 0, 0, 22, 0, }, /* 274 */ - { 22, 13, 12, 0, 0, -61, 0, }, /* 275 */ - { 22, 21, 12, 0, 0, 22, 0, }, /* 276 */ - { 21, 12, 3, 0, 0, 21, 0, }, /* 277 */ - { 21, 10, 5, 0, 0, 21, 0, }, /* 278 */ - { 21, 7, 12, 0, 0, 21, 0, }, /* 279 */ - { 21, 13, 12, 0, 0, -58, 0, }, /* 280 */ - { 21, 21, 12, 0, 0, 21, 0, }, /* 281 */ - { 21, 23, 12, 0, 0, 21, 0, }, /* 282 */ - { 44, 12, 3, 0, 0, 44, 0, }, /* 283 */ - { 44, 10, 5, 0, 0, 44, 0, }, /* 284 */ - { 44, 7, 12, 0, 0, 44, 0, }, /* 285 */ - { 44, 10, 3, 0, 0, 44, 0, }, /* 286 */ - { 44, 13, 12, 0, 0, 44, 0, }, /* 287 */ - { 44, 26, 12, 0, 0, 44, 0, }, /* 288 */ - { 44, 15, 12, 0, 0, 44, 0, }, /* 289 */ - { 54, 12, 3, 0, 0, 54, 0, }, /* 290 */ - { 54, 7, 12, 0, 0, 54, 0, }, /* 291 */ - { 54, 10, 3, 0, 0, 54, 0, }, /* 292 */ - { 54, 10, 5, 0, 0, 54, 0, }, /* 293 */ - { 54, 13, 12, 0, 0, -55, 0, }, /* 294 */ - { 54, 15, 12, 0, 0, -55, 0, }, /* 295 */ - { 54, 26, 12, 0, 0, -55, 0, }, /* 296 */ - { 54, 26, 12, 0, 0, 54, 0, }, /* 297 */ - { 54, 23, 12, 0, 0, 54, 0, }, /* 298 */ - { 55, 12, 3, 0, 0, 55, 0, }, /* 299 */ - { 55, 10, 5, 0, 0, 55, 0, }, /* 300 */ - { 55, 7, 12, 0, 0, 55, 0, }, /* 301 */ - { 55, 13, 12, 0, 0, 55, 0, }, /* 302 */ - { 55, 21, 12, 0, 0, 55, 0, }, /* 303 */ - { 55, 15, 12, 0, 0, 55, 0, }, /* 304 */ - { 55, 26, 12, 0, 0, 55, 0, }, /* 305 */ - { 29, 7, 12, 0, 0, 29, 0, }, /* 306 */ - { 29, 12, 3, 0, 0, 29, 0, }, /* 307 */ - { 29, 10, 5, 0, 0, 29, 0, }, /* 308 */ - { 29, 21, 12, 0, 0, 29, 0, }, /* 309 */ - { 29, 10, 3, 0, 0, 29, 0, }, /* 310 */ - { 29, 13, 12, 0, 0, -70, 0, }, /* 311 */ - { 37, 12, 3, 0, 0, 37, 0, }, /* 312 */ - { 37, 10, 5, 0, 0, 37, 0, }, /* 313 */ - { 37, 7, 12, 0, 0, 37, 0, }, /* 314 */ - { 37, 10, 3, 0, 0, 37, 0, }, /* 315 */ - { 37, 7, 4, 0, 0, 37, 0, }, /* 316 */ - { 37, 26, 12, 0, 0, 37, 0, }, /* 317 */ - { 37, 15, 12, 0, 0, 37, 0, }, /* 318 */ - { 37, 13, 12, 0, 0, 37, 0, }, /* 319 */ - { 48, 12, 3, 0, 0, 48, 0, }, /* 320 */ - { 48, 10, 5, 0, 0, 48, 0, }, /* 321 */ - { 48, 7, 12, 0, 0, 48, 0, }, /* 322 */ - { 48, 10, 3, 0, 0, 48, 0, }, /* 323 */ - { 48, 13, 12, 0, 0, 48, 0, }, /* 324 */ - { 48, 21, 12, 0, 0, 48, 0, }, /* 325 */ - { 57, 7, 12, 0, 0, 57, 0, }, /* 326 */ - { 57, 12, 3, 0, 0, 57, 0, }, /* 327 */ - { 57, 7, 5, 0, 0, 57, 0, }, /* 328 */ - { 57, 6, 12, 0, 0, 57, 0, }, /* 329 */ - { 57, 21, 12, 0, 0, 57, 0, }, /* 330 */ - { 57, 13, 12, 0, 0, 57, 0, }, /* 331 */ - { 33, 7, 12, 0, 0, 33, 0, }, /* 332 */ - { 33, 12, 3, 0, 0, 33, 0, }, /* 333 */ - { 33, 7, 5, 0, 0, 33, 0, }, /* 334 */ - { 33, 6, 12, 0, 0, 33, 0, }, /* 335 */ - { 33, 13, 12, 0, 0, 33, 0, }, /* 336 */ - { 58, 7, 12, 0, 0, 58, 0, }, /* 337 */ - { 58, 26, 12, 0, 0, 58, 0, }, /* 338 */ - { 58, 21, 12, 0, 0, 58, 0, }, /* 339 */ - { 58, 12, 3, 0, 0, 58, 0, }, /* 340 */ - { 58, 13, 12, 0, 0, 58, 0, }, /* 341 */ - { 58, 15, 12, 0, 0, 58, 0, }, /* 342 */ - { 58, 22, 12, 0, 0, 58, 0, }, /* 343 */ - { 58, 18, 12, 0, 0, 58, 0, }, /* 344 */ - { 58, 10, 5, 0, 0, 58, 0, }, /* 345 */ - { 39, 7, 12, 0, 0, 39, 0, }, /* 346 */ - { 39, 10, 12, 0, 0, 39, 0, }, /* 347 */ - { 39, 12, 3, 0, 0, 39, 0, }, /* 348 */ - { 39, 10, 5, 0, 0, 39, 0, }, /* 349 */ - { 39, 13, 12, 0, 0, -94, 0, }, /* 350 */ - { 39, 21, 12, 0, 0, 39, 0, }, /* 351 */ - { 39, 13, 12, 0, 0, 39, 0, }, /* 352 */ - { 39, 26, 12, 0, 0, 39, 0, }, /* 353 */ - { 17, 9, 12, 0, 7264, 17, 0, }, /* 354 */ - { 17, 5, 12, 0, 3008, 17, 0, }, /* 355 */ - { 10, 21, 12, 0, 0, -52, 0, }, /* 356 */ - { 17, 6, 12, 0, 0, 17, 0, }, /* 357 */ - { 24, 7, 6, 0, 0, 24, 0, }, /* 358 */ - { 24, 7, 7, 0, 0, 24, 0, }, /* 359 */ - { 24, 7, 8, 0, 0, 24, 0, }, /* 360 */ - { 16, 7, 12, 0, 0, 16, 0, }, /* 361 */ - { 16, 12, 3, 0, 0, 16, 0, }, /* 362 */ - { 16, 21, 12, 0, 0, 16, 0, }, /* 363 */ - { 16, 15, 12, 0, 0, 16, 0, }, /* 364 */ - { 16, 26, 12, 0, 0, 16, 0, }, /* 365 */ - { 9, 9, 12, 0, 38864, 9, 0, }, /* 366 */ - { 9, 9, 12, 0, 8, 9, 0, }, /* 367 */ - { 9, 5, 12, 0, -8, 9, 0, }, /* 368 */ - { 8, 17, 12, 0, 0, 8, 0, }, /* 369 */ - { 8, 7, 12, 0, 0, 8, 0, }, /* 370 */ - { 8, 26, 12, 0, 0, 8, 0, }, /* 371 */ - { 8, 21, 12, 0, 0, 8, 0, }, /* 372 */ - { 41, 29, 12, 0, 0, 41, 0, }, /* 373 */ - { 41, 7, 12, 0, 0, 41, 0, }, /* 374 */ - { 41, 22, 12, 0, 0, 41, 0, }, /* 375 */ - { 41, 18, 12, 0, 0, 41, 0, }, /* 376 */ - { 46, 7, 12, 0, 0, 46, 0, }, /* 377 */ - { 46, 14, 12, 0, 0, 46, 0, }, /* 378 */ - { 51, 7, 12, 0, 0, 51, 0, }, /* 379 */ - { 51, 12, 3, 0, 0, 51, 0, }, /* 380 */ - { 51, 10, 5, 0, 0, 51, 0, }, /* 381 */ - { 25, 7, 12, 0, 0, 25, 0, }, /* 382 */ - { 25, 12, 3, 0, 0, 25, 0, }, /* 383 */ - { 25, 10, 5, 0, 0, 25, 0, }, /* 384 */ - { 10, 21, 12, 0, 0, -127, 0, }, /* 385 */ - { 7, 7, 12, 0, 0, 7, 0, }, /* 386 */ - { 7, 12, 3, 0, 0, 7, 0, }, /* 387 */ - { 52, 7, 12, 0, 0, 52, 0, }, /* 388 */ - { 52, 12, 3, 0, 0, 52, 0, }, /* 389 */ - { 32, 7, 12, 0, 0, 32, 0, }, /* 390 */ - { 32, 12, 3, 0, 0, 32, 0, }, /* 391 */ - { 32, 10, 5, 0, 0, 32, 0, }, /* 392 */ - { 32, 21, 12, 0, 0, 32, 0, }, /* 393 */ - { 32, 6, 12, 0, 0, 32, 0, }, /* 394 */ - { 32, 23, 12, 0, 0, 32, 0, }, /* 395 */ - { 32, 13, 12, 0, 0, 32, 0, }, /* 396 */ - { 32, 15, 12, 0, 0, 32, 0, }, /* 397 */ - { 38, 21, 12, 0, 0, 38, 0, }, /* 398 */ - { 10, 21, 12, 0, 0, -79, 0, }, /* 399 */ - { 38, 17, 12, 0, 0, 38, 0, }, /* 400 */ - { 38, 12, 3, 0, 0, 38, 0, }, /* 401 */ - { 38, 1, 2, 0, 0, 38, 0, }, /* 402 */ - { 38, 13, 12, 0, 0, 38, 0, }, /* 403 */ - { 38, 7, 12, 0, 0, 38, 0, }, /* 404 */ - { 38, 6, 12, 0, 0, 38, 0, }, /* 405 */ - { 35, 7, 12, 0, 0, 35, 0, }, /* 406 */ - { 35, 12, 3, 0, 0, 35, 0, }, /* 407 */ - { 35, 10, 5, 0, 0, 35, 0, }, /* 408 */ - { 35, 26, 12, 0, 0, 35, 0, }, /* 409 */ - { 35, 21, 12, 0, 0, 35, 0, }, /* 410 */ - { 35, 13, 12, 0, 0, 35, 0, }, /* 411 */ - { 53, 7, 12, 0, 0, 53, 0, }, /* 412 */ - { 40, 7, 12, 0, 0, 40, 0, }, /* 413 */ - { 40, 13, 12, 0, 0, 40, 0, }, /* 414 */ - { 40, 15, 12, 0, 0, 40, 0, }, /* 415 */ - { 40, 26, 12, 0, 0, 40, 0, }, /* 416 */ - { 32, 26, 12, 0, 0, 32, 0, }, /* 417 */ - { 6, 7, 12, 0, 0, 6, 0, }, /* 418 */ - { 6, 12, 3, 0, 0, 6, 0, }, /* 419 */ - { 6, 10, 5, 0, 0, 6, 0, }, /* 420 */ - { 6, 21, 12, 0, 0, 6, 0, }, /* 421 */ - { 91, 7, 12, 0, 0, 91, 0, }, /* 422 */ - { 91, 10, 5, 0, 0, 91, 0, }, /* 423 */ - { 91, 12, 3, 0, 0, 91, 0, }, /* 424 */ - { 91, 10, 12, 0, 0, 91, 0, }, /* 425 */ - { 91, 13, 12, 0, 0, 91, 0, }, /* 426 */ - { 91, 21, 12, 0, 0, 91, 0, }, /* 427 */ - { 91, 6, 12, 0, 0, 91, 0, }, /* 428 */ - { 28, 11, 3, 0, 0, 28, 0, }, /* 429 */ - { 62, 12, 3, 0, 0, 62, 0, }, /* 430 */ - { 62, 10, 5, 0, 0, 62, 0, }, /* 431 */ - { 62, 7, 12, 0, 0, 62, 0, }, /* 432 */ - { 62, 10, 3, 0, 0, 62, 0, }, /* 433 */ - { 62, 13, 12, 0, 0, 62, 0, }, /* 434 */ - { 62, 21, 12, 0, 0, 62, 0, }, /* 435 */ - { 62, 26, 12, 0, 0, 62, 0, }, /* 436 */ - { 76, 12, 3, 0, 0, 76, 0, }, /* 437 */ - { 76, 10, 5, 0, 0, 76, 0, }, /* 438 */ - { 76, 7, 12, 0, 0, 76, 0, }, /* 439 */ - { 76, 13, 12, 0, 0, 76, 0, }, /* 440 */ - { 93, 7, 12, 0, 0, 93, 0, }, /* 441 */ - { 93, 12, 3, 0, 0, 93, 0, }, /* 442 */ - { 93, 10, 5, 0, 0, 93, 0, }, /* 443 */ - { 93, 21, 12, 0, 0, 93, 0, }, /* 444 */ - { 70, 7, 12, 0, 0, 70, 0, }, /* 445 */ - { 70, 10, 5, 0, 0, 70, 0, }, /* 446 */ - { 70, 12, 3, 0, 0, 70, 0, }, /* 447 */ - { 70, 21, 12, 0, 0, 70, 0, }, /* 448 */ - { 70, 13, 12, 0, 0, 70, 0, }, /* 449 */ - { 73, 13, 12, 0, 0, 73, 0, }, /* 450 */ - { 73, 7, 12, 0, 0, 73, 0, }, /* 451 */ - { 73, 6, 12, 0, 0, 73, 0, }, /* 452 */ - { 73, 21, 12, 0, 0, 73, 0, }, /* 453 */ - { 13, 5, 12, 63, -6222, 13, 0, }, /* 454 */ - { 13, 5, 12, 67, -6221, 13, 0, }, /* 455 */ - { 13, 5, 12, 71, -6212, 13, 0, }, /* 456 */ - { 13, 5, 12, 75, -6210, 13, 0, }, /* 457 */ - { 13, 5, 12, 79, -6210, 13, 0, }, /* 458 */ - { 13, 5, 12, 79, -6211, 13, 0, }, /* 459 */ - { 13, 5, 12, 84, -6204, 13, 0, }, /* 460 */ - { 13, 5, 12, 88, -6180, 13, 0, }, /* 461 */ - { 13, 5, 12, 108, 35267, 13, 0, }, /* 462 */ - { 17, 9, 12, 0, -3008, 17, 0, }, /* 463 */ - { 76, 21, 12, 0, 0, 76, 0, }, /* 464 */ - { 28, 12, 3, 0, 0, -122, 0, }, /* 465 */ - { 28, 12, 3, 0, 0, 15, 0, }, /* 466 */ - { 10, 21, 12, 0, 0, -40, 0, }, /* 467 */ - { 28, 12, 3, 0, 0, -16, 0, }, /* 468 */ - { 28, 12, 3, 0, 0, -46, 0, }, /* 469 */ - { 28, 12, 3, 0, 0, -157, 0, }, /* 470 */ - { 10, 10, 5, 0, 0, -16, 0, }, /* 471 */ - { 10, 7, 12, 0, 0, -43, 0, }, /* 472 */ - { 10, 7, 12, 0, 0, -16, 0, }, /* 473 */ - { 10, 7, 12, 0, 0, 15, 0, }, /* 474 */ - { 10, 7, 12, 0, 0, -172, 0, }, /* 475 */ - { 10, 7, 12, 0, 0, -40, 0, }, /* 476 */ - { 28, 12, 3, 0, 0, -106, 0, }, /* 477 */ - { 10, 10, 5, 0, 0, 3, 0, }, /* 478 */ - { 28, 12, 3, 0, 0, -40, 0, }, /* 479 */ - { 10, 7, 12, 0, 0, 150, 0, }, /* 480 */ - { 13, 5, 12, 0, 0, 13, 0, }, /* 481 */ - { 13, 6, 12, 0, 0, 13, 0, }, /* 482 */ - { 34, 5, 12, 0, 35332, 34, 0, }, /* 483 */ - { 34, 5, 12, 0, 3814, 34, 0, }, /* 484 */ - { 34, 5, 12, 0, 35384, 34, 0, }, /* 485 */ - { 28, 12, 3, 0, 0, -37, 0, }, /* 486 */ - { 28, 12, 3, 0, 0, 50, 0, }, /* 487 */ - { 34, 9, 12, 92, 1, 34, 0, }, /* 488 */ - { 34, 5, 12, 92, -1, 34, 0, }, /* 489 */ - { 34, 5, 12, 92, -58, 34, 0, }, /* 490 */ - { 34, 9, 12, 0, -7615, 34, 0, }, /* 491 */ - { 20, 5, 12, 0, 8, 20, 0, }, /* 492 */ - { 20, 9, 12, 0, -8, 20, 0, }, /* 493 */ - { 20, 5, 12, 0, 74, 20, 0, }, /* 494 */ - { 20, 5, 12, 0, 86, 20, 0, }, /* 495 */ - { 20, 5, 12, 0, 100, 20, 0, }, /* 496 */ - { 20, 5, 12, 0, 128, 20, 0, }, /* 497 */ - { 20, 5, 12, 0, 112, 20, 0, }, /* 498 */ - { 20, 5, 12, 0, 126, 20, 0, }, /* 499 */ - { 20, 8, 12, 0, -8, 20, 0, }, /* 500 */ - { 20, 5, 12, 0, 9, 20, 0, }, /* 501 */ - { 20, 9, 12, 0, -74, 20, 0, }, /* 502 */ - { 20, 8, 12, 0, -9, 20, 0, }, /* 503 */ - { 20, 5, 12, 21, -7173, 20, 0, }, /* 504 */ - { 20, 9, 12, 0, -86, 20, 0, }, /* 505 */ - { 20, 9, 12, 0, -100, 20, 0, }, /* 506 */ - { 20, 9, 12, 0, -112, 20, 0, }, /* 507 */ - { 20, 9, 12, 0, -128, 20, 0, }, /* 508 */ - { 20, 9, 12, 0, -126, 20, 0, }, /* 509 */ - { 28, 1, 3, 0, 0, 28, 0, }, /* 510 */ - { 28, 1, 13, 0, 0, 28, 0, }, /* 511 */ - { 10, 27, 2, 0, 0, 10, 0, }, /* 512 */ - { 10, 28, 2, 0, 0, 10, 0, }, /* 513 */ - { 10, 29, 12, 0, 0, -73, 0, }, /* 514 */ - { 10, 21, 14, 0, 0, 10, 0, }, /* 515 */ - { 0, 2, 2, 0, 0, 0, 0, }, /* 516 */ - { 28, 12, 3, 0, 0, -110, 0, }, /* 517 */ - { 10, 9, 12, 0, 0, 10, 0, }, /* 518 */ - { 10, 5, 12, 0, 0, 10, 0, }, /* 519 */ - { 20, 9, 12, 96, -7517, 20, 0, }, /* 520 */ - { 34, 9, 12, 100, -8383, 34, 0, }, /* 521 */ - { 34, 9, 12, 104, -8262, 34, 0, }, /* 522 */ - { 34, 9, 12, 0, 28, 34, 0, }, /* 523 */ - { 10, 7, 12, 0, 0, 10, 0, }, /* 524 */ - { 10, 5, 14, 0, 0, 10, 0, }, /* 525 */ - { 34, 5, 12, 0, -28, 34, 0, }, /* 526 */ - { 34, 14, 12, 0, 16, 34, 0, }, /* 527 */ - { 34, 14, 12, 0, -16, 34, 0, }, /* 528 */ - { 34, 14, 12, 0, 0, 34, 0, }, /* 529 */ - { 10, 25, 14, 0, 0, 10, 0, }, /* 530 */ - { 10, 26, 12, 0, 26, 10, 0, }, /* 531 */ - { 10, 26, 14, 0, 26, 10, 0, }, /* 532 */ - { 10, 26, 12, 0, -26, 10, 0, }, /* 533 */ - { 5, 26, 12, 0, 0, 5, 0, }, /* 534 */ - { 18, 9, 12, 0, 48, 18, 0, }, /* 535 */ - { 18, 5, 12, 0, -48, 18, 0, }, /* 536 */ - { 34, 9, 12, 0, -10743, 34, 0, }, /* 537 */ - { 34, 9, 12, 0, -3814, 34, 0, }, /* 538 */ - { 34, 9, 12, 0, -10727, 34, 0, }, /* 539 */ - { 34, 5, 12, 0, -10795, 34, 0, }, /* 540 */ - { 34, 5, 12, 0, -10792, 34, 0, }, /* 541 */ - { 34, 9, 12, 0, -10780, 34, 0, }, /* 542 */ - { 34, 9, 12, 0, -10749, 34, 0, }, /* 543 */ - { 34, 9, 12, 0, -10783, 34, 0, }, /* 544 */ - { 34, 9, 12, 0, -10782, 34, 0, }, /* 545 */ - { 34, 9, 12, 0, -10815, 34, 0, }, /* 546 */ - { 11, 5, 12, 0, 0, 11, 0, }, /* 547 */ - { 11, 26, 12, 0, 0, 11, 0, }, /* 548 */ - { 11, 12, 3, 0, 0, 11, 0, }, /* 549 */ - { 11, 21, 12, 0, 0, 11, 0, }, /* 550 */ - { 11, 15, 12, 0, 0, 11, 0, }, /* 551 */ - { 17, 5, 12, 0, -7264, 17, 0, }, /* 552 */ - { 59, 7, 12, 0, 0, 59, 0, }, /* 553 */ - { 59, 6, 12, 0, 0, 59, 0, }, /* 554 */ - { 59, 21, 12, 0, 0, 59, 0, }, /* 555 */ - { 59, 12, 3, 0, 0, 59, 0, }, /* 556 */ - { 13, 12, 3, 0, 0, 13, 0, }, /* 557 */ - { 10, 21, 12, 0, 0, -28, 0, }, /* 558 */ - { 23, 26, 12, 0, 0, 23, 0, }, /* 559 */ - { 10, 21, 12, 0, 0, -150, 0, }, /* 560 */ - { 10, 21, 12, 0, 0, -137, 0, }, /* 561 */ - { 23, 6, 12, 0, 0, 23, 0, }, /* 562 */ - { 10, 7, 12, 0, 0, 23, 0, }, /* 563 */ - { 23, 14, 12, 0, 0, 23, 0, }, /* 564 */ - { 10, 22, 12, 0, 0, -150, 0, }, /* 565 */ - { 10, 18, 12, 0, 0, -150, 0, }, /* 566 */ - { 10, 26, 12, 0, 0, -137, 0, }, /* 567 */ - { 10, 17, 12, 0, 0, -137, 0, }, /* 568 */ - { 10, 22, 12, 0, 0, -137, 0, }, /* 569 */ - { 10, 18, 12, 0, 0, -137, 0, }, /* 570 */ - { 28, 12, 3, 0, 0, -19, 0, }, /* 571 */ - { 24, 10, 3, 0, 0, 24, 0, }, /* 572 */ - { 10, 17, 14, 0, 0, -137, 0, }, /* 573 */ - { 10, 6, 12, 0, 0, -67, 0, }, /* 574 */ - { 10, 7, 12, 0, 0, -114, 0, }, /* 575 */ - { 10, 21, 14, 0, 0, -114, 0, }, /* 576 */ - { 10, 26, 12, 0, 0, 23, 0, }, /* 577 */ - { 27, 7, 12, 0, 0, 27, 0, }, /* 578 */ - { 28, 12, 3, 0, 0, -67, 0, }, /* 579 */ - { 10, 24, 12, 0, 0, -67, 0, }, /* 580 */ - { 27, 6, 12, 0, 0, 27, 0, }, /* 581 */ - { 10, 17, 12, 0, 0, -67, 0, }, /* 582 */ - { 30, 7, 12, 0, 0, 30, 0, }, /* 583 */ - { 30, 6, 12, 0, 0, 30, 0, }, /* 584 */ - { 4, 7, 12, 0, 0, 4, 0, }, /* 585 */ - { 24, 7, 12, 0, 0, 24, 0, }, /* 586 */ - { 10, 15, 12, 0, 0, 23, 0, }, /* 587 */ - { 24, 26, 12, 0, 0, 24, 0, }, /* 588 */ - { 10, 26, 14, 0, 0, 23, 0, }, /* 589 */ - { 30, 26, 12, 0, 0, 30, 0, }, /* 590 */ - { 23, 7, 12, 0, 0, 23, 0, }, /* 591 */ - { 61, 7, 12, 0, 0, 61, 0, }, /* 592 */ - { 61, 6, 12, 0, 0, 61, 0, }, /* 593 */ - { 61, 26, 12, 0, 0, 61, 0, }, /* 594 */ - { 86, 7, 12, 0, 0, 86, 0, }, /* 595 */ - { 86, 6, 12, 0, 0, 86, 0, }, /* 596 */ - { 86, 21, 12, 0, 0, 86, 0, }, /* 597 */ - { 77, 7, 12, 0, 0, 77, 0, }, /* 598 */ - { 77, 6, 12, 0, 0, 77, 0, }, /* 599 */ - { 77, 21, 12, 0, 0, 77, 0, }, /* 600 */ - { 77, 13, 12, 0, 0, 77, 0, }, /* 601 */ - { 13, 9, 12, 108, 1, 13, 0, }, /* 602 */ - { 13, 5, 12, 108, -35267, 13, 0, }, /* 603 */ - { 13, 7, 12, 0, 0, 13, 0, }, /* 604 */ - { 13, 21, 12, 0, 0, 13, 0, }, /* 605 */ - { 79, 7, 12, 0, 0, 79, 0, }, /* 606 */ - { 79, 14, 12, 0, 0, 79, 0, }, /* 607 */ - { 79, 12, 3, 0, 0, 79, 0, }, /* 608 */ - { 79, 21, 12, 0, 0, 79, 0, }, /* 609 */ - { 10, 24, 12, 0, 0, -64, 0, }, /* 610 */ - { 34, 9, 12, 0, -35332, 34, 0, }, /* 611 */ - { 34, 9, 12, 0, -42280, 34, 0, }, /* 612 */ - { 34, 5, 12, 0, 48, 34, 0, }, /* 613 */ - { 34, 9, 12, 0, -42308, 34, 0, }, /* 614 */ - { 34, 9, 12, 0, -42319, 34, 0, }, /* 615 */ - { 34, 9, 12, 0, -42315, 34, 0, }, /* 616 */ - { 34, 9, 12, 0, -42305, 34, 0, }, /* 617 */ - { 34, 9, 12, 0, -42258, 34, 0, }, /* 618 */ - { 34, 9, 12, 0, -42282, 34, 0, }, /* 619 */ - { 34, 9, 12, 0, -42261, 34, 0, }, /* 620 */ - { 34, 9, 12, 0, 928, 34, 0, }, /* 621 */ - { 34, 9, 12, 0, -48, 34, 0, }, /* 622 */ - { 34, 9, 12, 0, -42307, 34, 0, }, /* 623 */ - { 34, 9, 12, 0, -35384, 34, 0, }, /* 624 */ - { 49, 7, 12, 0, 0, 49, 0, }, /* 625 */ - { 49, 12, 3, 0, 0, 49, 0, }, /* 626 */ - { 49, 10, 5, 0, 0, 49, 0, }, /* 627 */ - { 49, 26, 12, 0, 0, 49, 0, }, /* 628 */ - { 10, 15, 12, 0, 0, -244, 0, }, /* 629 */ - { 10, 15, 12, 0, 0, -230, 0, }, /* 630 */ - { 10, 26, 12, 0, 0, -191, 0, }, /* 631 */ - { 10, 23, 12, 0, 0, -191, 0, }, /* 632 */ - { 65, 7, 12, 0, 0, 65, 0, }, /* 633 */ - { 65, 21, 12, 0, 0, 65, 0, }, /* 634 */ - { 75, 10, 5, 0, 0, 75, 0, }, /* 635 */ - { 75, 7, 12, 0, 0, 75, 0, }, /* 636 */ - { 75, 12, 3, 0, 0, 75, 0, }, /* 637 */ - { 75, 21, 12, 0, 0, 75, 0, }, /* 638 */ - { 75, 13, 12, 0, 0, 75, 0, }, /* 639 */ - { 15, 12, 3, 0, 0, -16, 0, }, /* 640 */ - { 15, 7, 12, 0, 0, -49, 0, }, /* 641 */ - { 69, 13, 12, 0, 0, 69, 0, }, /* 642 */ - { 69, 7, 12, 0, 0, 69, 0, }, /* 643 */ - { 69, 12, 3, 0, 0, 69, 0, }, /* 644 */ - { 10, 21, 12, 0, 0, -118, 0, }, /* 645 */ - { 69, 21, 12, 0, 0, 69, 0, }, /* 646 */ - { 74, 7, 12, 0, 0, 74, 0, }, /* 647 */ - { 74, 12, 3, 0, 0, 74, 0, }, /* 648 */ - { 74, 10, 5, 0, 0, 74, 0, }, /* 649 */ - { 74, 21, 12, 0, 0, 74, 0, }, /* 650 */ - { 84, 12, 3, 0, 0, 84, 0, }, /* 651 */ - { 84, 10, 5, 0, 0, 84, 0, }, /* 652 */ - { 84, 7, 12, 0, 0, 84, 0, }, /* 653 */ - { 84, 21, 12, 0, 0, 84, 0, }, /* 654 */ - { 10, 6, 12, 0, 0, -22, 0, }, /* 655 */ - { 84, 13, 12, 0, 0, 84, 0, }, /* 656 */ - { 39, 6, 12, 0, 0, 39, 0, }, /* 657 */ - { 68, 7, 12, 0, 0, 68, 0, }, /* 658 */ - { 68, 12, 3, 0, 0, 68, 0, }, /* 659 */ - { 68, 10, 5, 0, 0, 68, 0, }, /* 660 */ - { 68, 13, 12, 0, 0, 68, 0, }, /* 661 */ - { 68, 21, 12, 0, 0, 68, 0, }, /* 662 */ - { 92, 7, 12, 0, 0, 92, 0, }, /* 663 */ - { 92, 12, 3, 0, 0, 92, 0, }, /* 664 */ - { 92, 6, 12, 0, 0, 92, 0, }, /* 665 */ - { 92, 21, 12, 0, 0, 92, 0, }, /* 666 */ - { 87, 7, 12, 0, 0, 87, 0, }, /* 667 */ - { 87, 10, 5, 0, 0, 87, 0, }, /* 668 */ - { 87, 12, 3, 0, 0, 87, 0, }, /* 669 */ - { 87, 21, 12, 0, 0, 87, 0, }, /* 670 */ - { 87, 6, 12, 0, 0, 87, 0, }, /* 671 */ - { 34, 5, 12, 0, -928, 34, 0, }, /* 672 */ - { 9, 5, 12, 0, -38864, 9, 0, }, /* 673 */ - { 87, 13, 12, 0, 0, 87, 0, }, /* 674 */ - { 24, 7, 9, 0, 0, 24, 0, }, /* 675 */ - { 24, 7, 10, 0, 0, 24, 0, }, /* 676 */ - { 0, 4, 12, 0, 0, 0, 0, }, /* 677 */ - { 0, 3, 12, 0, 0, 0, 0, }, /* 678 */ - { 26, 25, 12, 0, 0, 26, 0, }, /* 679 */ - { 10, 18, 12, 0, 0, -7, 0, }, /* 680 */ - { 10, 22, 12, 0, 0, -7, 0, }, /* 681 */ - { 1, 7, 12, 0, 0, -13, 0, }, /* 682 */ - { 1, 26, 12, 0, 0, -13, 0, }, /* 683 */ - { 10, 6, 3, 0, 0, -67, 0, }, /* 684 */ - { 36, 7, 12, 0, 0, 36, 0, }, /* 685 */ - { 10, 21, 12, 0, 0, -98, 0, }, /* 686 */ - { 10, 21, 12, 0, 0, -25, 0, }, /* 687 */ - { 10, 15, 12, 0, 0, -102, 0, }, /* 688 */ - { 10, 26, 12, 0, 0, -25, 0, }, /* 689 */ - { 20, 14, 12, 0, 0, 20, 0, }, /* 690 */ - { 20, 15, 12, 0, 0, 20, 0, }, /* 691 */ - { 20, 26, 12, 0, 0, 20, 0, }, /* 692 */ - { 71, 7, 12, 0, 0, 71, 0, }, /* 693 */ - { 67, 7, 12, 0, 0, 67, 0, }, /* 694 */ - { 28, 12, 3, 0, 0, -1, 0, }, /* 695 */ - { 10, 15, 12, 0, 0, -1, 0, }, /* 696 */ - { 42, 7, 12, 0, 0, 42, 0, }, /* 697 */ - { 42, 15, 12, 0, 0, 42, 0, }, /* 698 */ - { 19, 7, 12, 0, 0, 19, 0, }, /* 699 */ - { 19, 14, 12, 0, 0, 19, 0, }, /* 700 */ - { 118, 7, 12, 0, 0, 118, 0, }, /* 701 */ - { 118, 12, 3, 0, 0, 118, 0, }, /* 702 */ - { 60, 7, 12, 0, 0, 60, 0, }, /* 703 */ - { 60, 21, 12, 0, 0, 60, 0, }, /* 704 */ - { 43, 7, 12, 0, 0, 43, 0, }, /* 705 */ - { 43, 21, 12, 0, 0, 43, 0, }, /* 706 */ - { 43, 14, 12, 0, 0, 43, 0, }, /* 707 */ - { 14, 9, 12, 0, 40, 14, 0, }, /* 708 */ - { 14, 5, 12, 0, -40, 14, 0, }, /* 709 */ - { 47, 7, 12, 0, 0, 47, 0, }, /* 710 */ - { 45, 7, 12, 0, 0, 45, 0, }, /* 711 */ - { 45, 13, 12, 0, 0, 45, 0, }, /* 712 */ - { 136, 9, 12, 0, 40, 136, 0, }, /* 713 */ - { 136, 5, 12, 0, -40, 136, 0, }, /* 714 */ - { 106, 7, 12, 0, 0, 106, 0, }, /* 715 */ - { 104, 7, 12, 0, 0, 104, 0, }, /* 716 */ - { 104, 21, 12, 0, 0, 104, 0, }, /* 717 */ - { 161, 9, 12, 0, 39, 161, 0, }, /* 718 */ - { 161, 5, 12, 0, -39, 161, 0, }, /* 719 */ - { 110, 7, 12, 0, 0, 110, 0, }, /* 720 */ - { 12, 7, 12, 0, 0, 12, 0, }, /* 721 */ - { 81, 7, 12, 0, 0, 81, 0, }, /* 722 */ - { 81, 21, 12, 0, 0, 81, 0, }, /* 723 */ - { 81, 15, 12, 0, 0, 81, 0, }, /* 724 */ - { 120, 7, 12, 0, 0, 120, 0, }, /* 725 */ - { 120, 26, 12, 0, 0, 120, 0, }, /* 726 */ - { 120, 15, 12, 0, 0, 120, 0, }, /* 727 */ - { 116, 7, 12, 0, 0, 116, 0, }, /* 728 */ - { 116, 15, 12, 0, 0, 116, 0, }, /* 729 */ - { 128, 7, 12, 0, 0, 128, 0, }, /* 730 */ - { 128, 15, 12, 0, 0, 128, 0, }, /* 731 */ - { 66, 7, 12, 0, 0, 66, 0, }, /* 732 */ - { 66, 15, 12, 0, 0, 66, 0, }, /* 733 */ - { 66, 21, 12, 0, 0, 66, 0, }, /* 734 */ - { 72, 7, 12, 0, 0, 72, 0, }, /* 735 */ - { 72, 21, 12, 0, 0, 72, 0, }, /* 736 */ - { 98, 7, 12, 0, 0, 98, 0, }, /* 737 */ - { 97, 7, 12, 0, 0, 97, 0, }, /* 738 */ - { 97, 15, 12, 0, 0, 97, 0, }, /* 739 */ - { 31, 7, 12, 0, 0, 31, 0, }, /* 740 */ - { 31, 12, 3, 0, 0, 31, 0, }, /* 741 */ - { 31, 15, 12, 0, 0, 31, 0, }, /* 742 */ - { 31, 21, 12, 0, 0, 31, 0, }, /* 743 */ - { 88, 7, 12, 0, 0, 88, 0, }, /* 744 */ - { 88, 15, 12, 0, 0, 88, 0, }, /* 745 */ - { 88, 21, 12, 0, 0, 88, 0, }, /* 746 */ - { 117, 7, 12, 0, 0, 117, 0, }, /* 747 */ - { 117, 15, 12, 0, 0, 117, 0, }, /* 748 */ - { 112, 7, 12, 0, 0, 112, 0, }, /* 749 */ - { 112, 26, 12, 0, 0, 112, 0, }, /* 750 */ - { 112, 12, 3, 0, 0, 112, 0, }, /* 751 */ - { 112, 15, 12, 0, 0, 112, 0, }, /* 752 */ - { 112, 21, 12, 0, 0, 112, 0, }, /* 753 */ - { 112, 21, 12, 0, 0, -76, 0, }, /* 754 */ - { 78, 7, 12, 0, 0, 78, 0, }, /* 755 */ - { 78, 21, 12, 0, 0, 78, 0, }, /* 756 */ - { 83, 7, 12, 0, 0, 83, 0, }, /* 757 */ - { 83, 15, 12, 0, 0, 83, 0, }, /* 758 */ - { 82, 7, 12, 0, 0, 82, 0, }, /* 759 */ - { 82, 15, 12, 0, 0, 82, 0, }, /* 760 */ - { 121, 7, 12, 0, 0, 121, 0, }, /* 761 */ - { 121, 21, 12, 0, 0, 121, 0, }, /* 762 */ - { 121, 15, 12, 0, 0, 121, 0, }, /* 763 */ - { 89, 7, 12, 0, 0, 89, 0, }, /* 764 */ - { 130, 9, 12, 0, 64, 130, 0, }, /* 765 */ - { 130, 5, 12, 0, -64, 130, 0, }, /* 766 */ - { 130, 15, 12, 0, 0, 130, 0, }, /* 767 */ - { 144, 7, 12, 0, 0, 144, 0, }, /* 768 */ - { 144, 12, 3, 0, 0, 144, 0, }, /* 769 */ - { 144, 13, 12, 0, 0, 144, 0, }, /* 770 */ - { 1, 15, 12, 0, 0, 1, 0, }, /* 771 */ - { 156, 7, 12, 0, 0, 156, 0, }, /* 772 */ - { 156, 12, 3, 0, 0, 156, 0, }, /* 773 */ - { 156, 17, 12, 0, 0, 156, 0, }, /* 774 */ - { 147, 7, 12, 0, 0, 147, 0, }, /* 775 */ - { 147, 15, 12, 0, 0, 147, 0, }, /* 776 */ - { 148, 7, 12, 0, 0, 148, 0, }, /* 777 */ - { 148, 12, 3, 0, 0, 148, 0, }, /* 778 */ - { 148, 15, 12, 0, 0, 148, 0, }, /* 779 */ - { 148, 21, 12, 0, 0, 148, 0, }, /* 780 */ - { 158, 7, 12, 0, 0, 158, 0, }, /* 781 */ - { 158, 12, 3, 0, 0, 158, 0, }, /* 782 */ - { 158, 21, 12, 0, 0, 158, 0, }, /* 783 */ - { 153, 7, 12, 0, 0, 153, 0, }, /* 784 */ - { 153, 15, 12, 0, 0, 153, 0, }, /* 785 */ - { 149, 7, 12, 0, 0, 149, 0, }, /* 786 */ - { 94, 10, 5, 0, 0, 94, 0, }, /* 787 */ - { 94, 12, 3, 0, 0, 94, 0, }, /* 788 */ - { 94, 7, 12, 0, 0, 94, 0, }, /* 789 */ - { 94, 21, 12, 0, 0, 94, 0, }, /* 790 */ - { 94, 15, 12, 0, 0, 94, 0, }, /* 791 */ - { 94, 13, 12, 0, 0, 94, 0, }, /* 792 */ - { 85, 12, 3, 0, 0, 85, 0, }, /* 793 */ - { 85, 10, 5, 0, 0, 85, 0, }, /* 794 */ - { 85, 7, 12, 0, 0, 85, 0, }, /* 795 */ - { 85, 21, 12, 0, 0, 85, 0, }, /* 796 */ - { 85, 1, 4, 0, 0, 85, 0, }, /* 797 */ - { 101, 7, 12, 0, 0, 101, 0, }, /* 798 */ - { 101, 13, 12, 0, 0, 101, 0, }, /* 799 */ - { 96, 12, 3, 0, 0, 96, 0, }, /* 800 */ - { 96, 7, 12, 0, 0, 96, 0, }, /* 801 */ - { 96, 10, 5, 0, 0, 96, 0, }, /* 802 */ - { 96, 13, 12, 0, 0, 96, 0, }, /* 803 */ - { 96, 21, 12, 0, 0, 96, 0, }, /* 804 */ - { 111, 7, 12, 0, 0, 111, 0, }, /* 805 */ - { 111, 12, 3, 0, 0, 111, 0, }, /* 806 */ - { 111, 21, 12, 0, 0, 111, 0, }, /* 807 */ - { 100, 12, 3, 0, 0, 100, 0, }, /* 808 */ - { 100, 10, 5, 0, 0, 100, 0, }, /* 809 */ - { 100, 7, 12, 0, 0, 100, 0, }, /* 810 */ - { 100, 7, 4, 0, 0, 100, 0, }, /* 811 */ - { 100, 21, 12, 0, 0, 100, 0, }, /* 812 */ - { 100, 13, 12, 0, 0, 100, 0, }, /* 813 */ - { 48, 15, 12, 0, 0, 48, 0, }, /* 814 */ - { 108, 7, 12, 0, 0, 108, 0, }, /* 815 */ - { 108, 10, 5, 0, 0, 108, 0, }, /* 816 */ - { 108, 12, 3, 0, 0, 108, 0, }, /* 817 */ - { 108, 21, 12, 0, 0, 108, 0, }, /* 818 */ - { 129, 7, 12, 0, 0, 129, 0, }, /* 819 */ - { 129, 21, 12, 0, 0, 129, 0, }, /* 820 */ - { 109, 7, 12, 0, 0, 109, 0, }, /* 821 */ - { 109, 12, 3, 0, 0, 109, 0, }, /* 822 */ - { 109, 10, 5, 0, 0, 109, 0, }, /* 823 */ - { 109, 13, 12, 0, 0, 109, 0, }, /* 824 */ - { 107, 12, 3, 0, 0, 107, 0, }, /* 825 */ - { 107, 12, 3, 0, 0, -55, 0, }, /* 826 */ - { 107, 10, 5, 0, 0, 107, 0, }, /* 827 */ - { 107, 10, 5, 0, 0, -55, 0, }, /* 828 */ - { 107, 7, 12, 0, 0, 107, 0, }, /* 829 */ - { 28, 12, 3, 0, 0, -55, 0, }, /* 830 */ - { 107, 10, 3, 0, 0, 107, 0, }, /* 831 */ - { 135, 7, 12, 0, 0, 135, 0, }, /* 832 */ - { 135, 10, 5, 0, 0, 135, 0, }, /* 833 */ - { 135, 12, 3, 0, 0, 135, 0, }, /* 834 */ - { 135, 21, 12, 0, 0, 135, 0, }, /* 835 */ - { 135, 13, 12, 0, 0, 135, 0, }, /* 836 */ - { 124, 7, 12, 0, 0, 124, 0, }, /* 837 */ - { 124, 10, 3, 0, 0, 124, 0, }, /* 838 */ - { 124, 10, 5, 0, 0, 124, 0, }, /* 839 */ - { 124, 12, 3, 0, 0, 124, 0, }, /* 840 */ - { 124, 21, 12, 0, 0, 124, 0, }, /* 841 */ - { 124, 13, 12, 0, 0, 124, 0, }, /* 842 */ - { 123, 7, 12, 0, 0, 123, 0, }, /* 843 */ - { 123, 10, 3, 0, 0, 123, 0, }, /* 844 */ - { 123, 10, 5, 0, 0, 123, 0, }, /* 845 */ - { 123, 12, 3, 0, 0, 123, 0, }, /* 846 */ - { 123, 21, 12, 0, 0, 123, 0, }, /* 847 */ - { 114, 7, 12, 0, 0, 114, 0, }, /* 848 */ - { 114, 10, 5, 0, 0, 114, 0, }, /* 849 */ - { 114, 12, 3, 0, 0, 114, 0, }, /* 850 */ - { 114, 21, 12, 0, 0, 114, 0, }, /* 851 */ - { 114, 13, 12, 0, 0, 114, 0, }, /* 852 */ - { 102, 7, 12, 0, 0, 102, 0, }, /* 853 */ - { 102, 12, 3, 0, 0, 102, 0, }, /* 854 */ - { 102, 10, 5, 0, 0, 102, 0, }, /* 855 */ - { 102, 21, 12, 0, 0, 102, 0, }, /* 856 */ - { 102, 13, 12, 0, 0, 102, 0, }, /* 857 */ - { 126, 7, 12, 0, 0, 126, 0, }, /* 858 */ - { 126, 12, 3, 0, 0, 126, 0, }, /* 859 */ - { 126, 10, 12, 0, 0, 126, 0, }, /* 860 */ - { 126, 10, 5, 0, 0, 126, 0, }, /* 861 */ - { 126, 13, 12, 0, 0, 126, 0, }, /* 862 */ - { 126, 15, 12, 0, 0, 126, 0, }, /* 863 */ - { 126, 21, 12, 0, 0, 126, 0, }, /* 864 */ - { 126, 26, 12, 0, 0, 126, 0, }, /* 865 */ - { 142, 7, 12, 0, 0, 142, 0, }, /* 866 */ - { 142, 10, 5, 0, 0, 142, 0, }, /* 867 */ - { 142, 12, 3, 0, 0, 142, 0, }, /* 868 */ - { 142, 21, 12, 0, 0, 142, 0, }, /* 869 */ - { 125, 9, 12, 0, 32, 125, 0, }, /* 870 */ - { 125, 5, 12, 0, -32, 125, 0, }, /* 871 */ - { 125, 13, 12, 0, 0, 125, 0, }, /* 872 */ - { 125, 15, 12, 0, 0, 125, 0, }, /* 873 */ - { 125, 7, 12, 0, 0, 125, 0, }, /* 874 */ - { 154, 7, 12, 0, 0, 154, 0, }, /* 875 */ - { 154, 10, 3, 0, 0, 154, 0, }, /* 876 */ - { 154, 10, 5, 0, 0, 154, 0, }, /* 877 */ - { 154, 12, 3, 0, 0, 154, 0, }, /* 878 */ - { 154, 7, 4, 0, 0, 154, 0, }, /* 879 */ - { 154, 21, 12, 0, 0, 154, 0, }, /* 880 */ - { 154, 13, 12, 0, 0, 154, 0, }, /* 881 */ - { 150, 7, 12, 0, 0, 150, 0, }, /* 882 */ - { 150, 10, 5, 0, 0, 150, 0, }, /* 883 */ - { 150, 12, 3, 0, 0, 150, 0, }, /* 884 */ - { 150, 21, 12, 0, 0, 150, 0, }, /* 885 */ - { 141, 7, 12, 0, 0, 141, 0, }, /* 886 */ - { 141, 12, 3, 0, 0, 141, 0, }, /* 887 */ - { 141, 10, 5, 0, 0, 141, 0, }, /* 888 */ - { 141, 7, 4, 0, 0, 141, 0, }, /* 889 */ - { 141, 21, 12, 0, 0, 141, 0, }, /* 890 */ - { 140, 7, 12, 0, 0, 140, 0, }, /* 891 */ - { 140, 12, 3, 0, 0, 140, 0, }, /* 892 */ - { 140, 10, 5, 0, 0, 140, 0, }, /* 893 */ - { 140, 7, 4, 0, 0, 140, 0, }, /* 894 */ - { 140, 21, 12, 0, 0, 140, 0, }, /* 895 */ - { 122, 7, 12, 0, 0, 122, 0, }, /* 896 */ - { 133, 7, 12, 0, 0, 133, 0, }, /* 897 */ - { 133, 10, 5, 0, 0, 133, 0, }, /* 898 */ - { 133, 12, 3, 0, 0, 133, 0, }, /* 899 */ - { 133, 21, 12, 0, 0, 133, 0, }, /* 900 */ - { 133, 13, 12, 0, 0, 133, 0, }, /* 901 */ - { 133, 15, 12, 0, 0, 133, 0, }, /* 902 */ - { 134, 21, 12, 0, 0, 134, 0, }, /* 903 */ - { 134, 7, 12, 0, 0, 134, 0, }, /* 904 */ - { 134, 12, 3, 0, 0, 134, 0, }, /* 905 */ - { 134, 10, 5, 0, 0, 134, 0, }, /* 906 */ - { 138, 7, 12, 0, 0, 138, 0, }, /* 907 */ - { 138, 12, 3, 0, 0, 138, 0, }, /* 908 */ - { 138, 7, 4, 0, 0, 138, 0, }, /* 909 */ - { 138, 13, 12, 0, 0, 138, 0, }, /* 910 */ - { 143, 7, 12, 0, 0, 143, 0, }, /* 911 */ - { 143, 10, 5, 0, 0, 143, 0, }, /* 912 */ - { 143, 12, 3, 0, 0, 143, 0, }, /* 913 */ - { 143, 13, 12, 0, 0, 143, 0, }, /* 914 */ - { 145, 7, 12, 0, 0, 145, 0, }, /* 915 */ - { 145, 12, 3, 0, 0, 145, 0, }, /* 916 */ - { 145, 10, 5, 0, 0, 145, 0, }, /* 917 */ - { 145, 21, 12, 0, 0, 145, 0, }, /* 918 */ - { 54, 15, 12, 0, 0, 54, 0, }, /* 919 */ - { 54, 21, 12, 0, 0, 54, 0, }, /* 920 */ - { 63, 7, 12, 0, 0, 63, 0, }, /* 921 */ - { 63, 14, 12, 0, 0, 63, 0, }, /* 922 */ - { 63, 21, 12, 0, 0, 63, 0, }, /* 923 */ - { 157, 7, 12, 0, 0, 157, 0, }, /* 924 */ - { 157, 21, 12, 0, 0, 157, 0, }, /* 925 */ - { 80, 7, 12, 0, 0, 80, 0, }, /* 926 */ - { 80, 1, 2, 0, 0, 80, 0, }, /* 927 */ - { 127, 7, 12, 0, 0, 127, 0, }, /* 928 */ - { 115, 7, 12, 0, 0, 115, 0, }, /* 929 */ - { 115, 13, 12, 0, 0, 115, 0, }, /* 930 */ - { 115, 21, 12, 0, 0, 115, 0, }, /* 931 */ - { 159, 7, 12, 0, 0, 159, 0, }, /* 932 */ - { 159, 13, 12, 0, 0, 159, 0, }, /* 933 */ - { 103, 7, 12, 0, 0, 103, 0, }, /* 934 */ - { 103, 12, 3, 0, 0, 103, 0, }, /* 935 */ - { 103, 21, 12, 0, 0, 103, 0, }, /* 936 */ - { 119, 7, 12, 0, 0, 119, 0, }, /* 937 */ - { 119, 12, 3, 0, 0, 119, 0, }, /* 938 */ - { 119, 21, 12, 0, 0, 119, 0, }, /* 939 */ - { 119, 26, 12, 0, 0, 119, 0, }, /* 940 */ - { 119, 6, 12, 0, 0, 119, 0, }, /* 941 */ - { 119, 13, 12, 0, 0, 119, 0, }, /* 942 */ - { 119, 15, 12, 0, 0, 119, 0, }, /* 943 */ - { 146, 9, 12, 0, 32, 146, 0, }, /* 944 */ - { 146, 5, 12, 0, -32, 146, 0, }, /* 945 */ - { 146, 15, 12, 0, 0, 146, 0, }, /* 946 */ - { 146, 21, 12, 0, 0, 146, 0, }, /* 947 */ - { 99, 7, 12, 0, 0, 99, 0, }, /* 948 */ - { 99, 12, 3, 0, 0, 99, 0, }, /* 949 */ - { 99, 10, 5, 0, 0, 99, 0, }, /* 950 */ - { 99, 6, 12, 0, 0, 99, 0, }, /* 951 */ - { 137, 6, 12, 0, 0, 137, 0, }, /* 952 */ - { 139, 6, 12, 0, 0, 139, 0, }, /* 953 */ - { 23, 21, 12, 0, 0, 23, 0, }, /* 954 */ - { 155, 12, 3, 0, 0, 155, 0, }, /* 955 */ - { 23, 10, 5, 0, 0, 23, 0, }, /* 956 */ - { 137, 7, 12, 0, 0, 137, 0, }, /* 957 */ - { 155, 7, 12, 0, 0, 155, 0, }, /* 958 */ - { 139, 7, 12, 0, 0, 139, 0, }, /* 959 */ - { 105, 7, 12, 0, 0, 105, 0, }, /* 960 */ - { 105, 26, 12, 0, 0, 105, 0, }, /* 961 */ - { 105, 12, 3, 0, 0, 105, 0, }, /* 962 */ - { 105, 21, 12, 0, 0, 105, 0, }, /* 963 */ - { 10, 1, 2, 0, 0, 105, 0, }, /* 964 */ - { 10, 10, 3, 0, 0, 10, 0, }, /* 965 */ - { 10, 10, 5, 0, 0, 10, 0, }, /* 966 */ - { 20, 12, 3, 0, 0, 20, 0, }, /* 967 */ - { 131, 26, 12, 0, 0, 131, 0, }, /* 968 */ - { 131, 12, 3, 0, 0, 131, 0, }, /* 969 */ - { 131, 21, 12, 0, 0, 131, 0, }, /* 970 */ - { 18, 12, 3, 0, 0, 18, 0, }, /* 971 */ - { 151, 7, 12, 0, 0, 151, 0, }, /* 972 */ - { 151, 12, 3, 0, 0, 151, 0, }, /* 973 */ - { 151, 6, 12, 0, 0, 151, 0, }, /* 974 */ - { 151, 13, 12, 0, 0, 151, 0, }, /* 975 */ - { 151, 26, 12, 0, 0, 151, 0, }, /* 976 */ - { 160, 7, 12, 0, 0, 160, 0, }, /* 977 */ - { 160, 12, 3, 0, 0, 160, 0, }, /* 978 */ - { 152, 7, 12, 0, 0, 152, 0, }, /* 979 */ - { 152, 12, 3, 0, 0, 152, 0, }, /* 980 */ - { 152, 13, 12, 0, 0, 152, 0, }, /* 981 */ - { 152, 23, 12, 0, 0, 152, 0, }, /* 982 */ - { 113, 7, 12, 0, 0, 113, 0, }, /* 983 */ - { 113, 15, 12, 0, 0, 113, 0, }, /* 984 */ - { 113, 12, 3, 0, 0, 113, 0, }, /* 985 */ - { 132, 9, 12, 0, 34, 132, 0, }, /* 986 */ - { 132, 5, 12, 0, -34, 132, 0, }, /* 987 */ - { 132, 12, 3, 0, 0, 132, 0, }, /* 988 */ - { 132, 6, 12, 0, 0, 132, 0, }, /* 989 */ - { 132, 13, 12, 0, 0, 132, 0, }, /* 990 */ - { 132, 21, 12, 0, 0, 132, 0, }, /* 991 */ - { 0, 2, 14, 0, 0, 0, 0, }, /* 992 */ - { 10, 26, 11, 0, 0, 10, 0, }, /* 993 */ - { 27, 26, 12, 0, 0, 27, 0, }, /* 994 */ - { 10, 24, 3, 0, 0, 10, 0, }, /* 995 */ - { 10, 1, 3, 0, 0, 10, 0, }, /* 996 */ +offset to multichar other cases or zero (8 bits), offset to other case or zero +(32 bits, signed), bidi class (5 bits) and script extension (11 bits) packed +into a 16-bit field, and offset in binary properties table (16 bits). */ + +const ucd_record PRIV(ucd_records)[] = { /* 16908 bytes, record size 12 */ + { 69, 0, 2, 0, 0, 6144, 2, }, /* 0 */ + { 69, 0, 2, 0, 0, 43008, 4, }, /* 1 */ + { 69, 0, 1, 0, 0, 4096, 4, }, /* 2 */ + { 69, 0, 2, 0, 0, 45056, 4, }, /* 3 */ + { 69, 0, 0, 0, 0, 4096, 4, }, /* 4 */ + { 69, 0, 2, 0, 0, 4096, 2, }, /* 5 */ + { 69, 0, 2, 0, 0, 43008, 2, }, /* 6 */ + { 69, 29, 12, 0, 0, 45056, 6, }, /* 7 */ + { 69, 21, 12, 0, 0, 28672, 8, }, /* 8 */ + { 69, 21, 12, 0, 0, 28672, 10, }, /* 9 */ + { 69, 21, 12, 0, 0, 14336, 12, }, /* 10 */ + { 69, 23, 12, 0, 0, 14336, 14, }, /* 11 */ + { 69, 21, 12, 0, 0, 14336, 14, }, /* 12 */ + { 69, 21, 12, 0, 0, 28672, 14, }, /* 13 */ + { 69, 21, 12, 0, 0, 28672, 16, }, /* 14 */ + { 69, 22, 12, 0, 0, 28672, 18, }, /* 15 */ + { 69, 18, 12, 0, 0, 28672, 18, }, /* 16 */ + { 69, 21, 12, 0, 0, 28672, 12, }, /* 17 */ + { 69, 25, 12, 0, 0, 12288, 20, }, /* 18 */ + { 69, 21, 12, 0, 0, 8192, 22, }, /* 19 */ + { 69, 17, 12, 0, 0, 12288, 24, }, /* 20 */ + { 69, 21, 12, 0, 0, 8192, 26, }, /* 21 */ + { 69, 21, 12, 0, 0, 8192, 14, }, /* 22 */ + { 69, 13, 12, 0, 0, 10240, 28, }, /* 23 */ + { 69, 21, 12, 0, 0, 8192, 30, }, /* 24 */ + { 69, 21, 12, 0, 0, 28672, 22, }, /* 25 */ + { 69, 25, 12, 0, 0, 28672, 32, }, /* 26 */ + { 69, 25, 12, 0, 0, 28672, 20, }, /* 27 */ + { 0, 9, 12, 0, 32, 18432, 34, }, /* 28 */ + { 0, 9, 12, 0, 32, 18432, 36, }, /* 29 */ + { 0, 9, 12, 100, 32, 18432, 36, }, /* 30 */ + { 0, 9, 12, 1, 32, 18432, 36, }, /* 31 */ + { 69, 24, 12, 0, 0, 28672, 38, }, /* 32 */ + { 69, 16, 12, 0, 0, 28672, 40, }, /* 33 */ + { 69, 24, 12, 0, 0, 28672, 42, }, /* 34 */ + { 0, 5, 12, 0, -32, 18432, 44, }, /* 35 */ + { 0, 5, 12, 0, -32, 18432, 46, }, /* 36 */ + { 0, 5, 12, 0, -32, 18432, 48, }, /* 37 */ + { 0, 5, 12, 100, -32, 18432, 46, }, /* 38 */ + { 0, 5, 12, 1, -32, 18432, 46, }, /* 39 */ + { 69, 0, 2, 0, 0, 6144, 0, }, /* 40 */ + { 69, 0, 2, 0, 0, 4096, 50, }, /* 41 */ + { 69, 29, 12, 0, 0, 8192, 52, }, /* 42 */ + { 69, 21, 12, 0, 0, 28672, 54, }, /* 43 */ + { 69, 23, 12, 0, 0, 14336, 54, }, /* 44 */ + { 69, 26, 12, 0, 0, 28672, 54, }, /* 45 */ + { 69, 24, 12, 0, 0, 28672, 56, }, /* 46 */ + { 69, 26, 14, 0, 0, 28672, 58, }, /* 47 */ + { 0, 7, 12, 0, 0, 18432, 60, }, /* 48 */ + { 69, 20, 12, 0, 0, 28672, 62, }, /* 49 */ + { 69, 25, 12, 0, 0, 28672, 64, }, /* 50 */ + { 69, 1, 2, 0, 0, 6144, 66, }, /* 51 */ + { 69, 26, 12, 0, 0, 14336, 54, }, /* 52 */ + { 69, 25, 12, 0, 0, 14336, 64, }, /* 53 */ + { 69, 15, 12, 0, 0, 10240, 68, }, /* 54 */ + { 69, 5, 12, 26, 775, 18432, 70, }, /* 55 */ + { 69, 21, 12, 0, 0, 28672, 72, }, /* 56 */ + { 69, 19, 12, 0, 0, 28672, 62, }, /* 57 */ + { 69, 15, 12, 0, 0, 28672, 68, }, /* 58 */ + { 0, 9, 12, 0, 32, 18432, 74, }, /* 59 */ + { 0, 9, 12, 104, 32, 18432, 74, }, /* 60 */ + { 0, 5, 12, 0, 7615, 18432, 70, }, /* 61 */ + { 0, 5, 12, 0, -32, 18432, 76, }, /* 62 */ + { 0, 5, 12, 104, -32, 18432, 76, }, /* 63 */ + { 0, 5, 12, 0, 121, 18432, 76, }, /* 64 */ + { 0, 9, 12, 0, 1, 18432, 74, }, /* 65 */ + { 0, 5, 12, 0, -1, 18432, 76, }, /* 66 */ + { 0, 5, 12, 0, -1, 18432, 78, }, /* 67 */ + { 0, 9, 12, 0, 0, 18432, 74, }, /* 68 */ + { 0, 5, 12, 0, 0, 18432, 76, }, /* 69 */ + { 0, 5, 12, 0, 0, 18432, 60, }, /* 70 */ + { 0, 5, 12, 0, 0, 18432, 80, }, /* 71 */ + { 0, 9, 12, 0, -121, 18432, 74, }, /* 72 */ + { 0, 5, 12, 1, -268, 18432, 70, }, /* 73 */ + { 0, 5, 12, 0, 195, 18432, 76, }, /* 74 */ + { 0, 9, 12, 0, 210, 18432, 74, }, /* 75 */ + { 0, 9, 12, 0, 206, 18432, 74, }, /* 76 */ + { 0, 9, 12, 0, 205, 18432, 74, }, /* 77 */ + { 0, 9, 12, 0, 79, 18432, 74, }, /* 78 */ + { 0, 9, 12, 0, 202, 18432, 74, }, /* 79 */ + { 0, 9, 12, 0, 203, 18432, 74, }, /* 80 */ + { 0, 9, 12, 0, 207, 18432, 74, }, /* 81 */ + { 0, 5, 12, 0, 97, 18432, 76, }, /* 82 */ + { 0, 9, 12, 0, 211, 18432, 74, }, /* 83 */ + { 0, 9, 12, 0, 209, 18432, 74, }, /* 84 */ + { 0, 5, 12, 0, 163, 18432, 76, }, /* 85 */ + { 0, 9, 12, 0, 213, 18432, 74, }, /* 86 */ + { 0, 5, 12, 0, 130, 18432, 76, }, /* 87 */ + { 0, 9, 12, 0, 214, 18432, 74, }, /* 88 */ + { 0, 9, 12, 0, 218, 18432, 74, }, /* 89 */ + { 0, 9, 12, 0, 217, 18432, 74, }, /* 90 */ + { 0, 9, 12, 0, 219, 18432, 74, }, /* 91 */ + { 0, 7, 12, 0, 0, 18432, 82, }, /* 92 */ + { 0, 5, 12, 0, 56, 18432, 76, }, /* 93 */ + { 0, 9, 12, 5, 2, 18432, 84, }, /* 94 */ + { 0, 8, 12, 5, 1, 18432, 86, }, /* 95 */ + { 0, 5, 12, 5, -2, 18432, 76, }, /* 96 */ + { 0, 9, 12, 9, 2, 18432, 84, }, /* 97 */ + { 0, 8, 12, 9, 1, 18432, 86, }, /* 98 */ + { 0, 5, 12, 9, -2, 18432, 76, }, /* 99 */ + { 0, 9, 12, 13, 2, 18432, 84, }, /* 100 */ + { 0, 8, 12, 13, 1, 18432, 86, }, /* 101 */ + { 0, 5, 12, 13, -2, 18432, 76, }, /* 102 */ + { 0, 5, 12, 0, -79, 18432, 76, }, /* 103 */ + { 0, 9, 12, 17, 2, 18432, 84, }, /* 104 */ + { 0, 8, 12, 17, 1, 18432, 86, }, /* 105 */ + { 0, 5, 12, 17, -2, 18432, 76, }, /* 106 */ + { 0, 9, 12, 0, -97, 18432, 74, }, /* 107 */ + { 0, 9, 12, 0, -56, 18432, 74, }, /* 108 */ + { 0, 9, 12, 0, -130, 18432, 74, }, /* 109 */ + { 0, 9, 12, 0, 10795, 18432, 74, }, /* 110 */ + { 0, 9, 12, 0, -163, 18432, 74, }, /* 111 */ + { 0, 9, 12, 0, 10792, 18432, 74, }, /* 112 */ + { 0, 5, 12, 0, 10815, 18432, 76, }, /* 113 */ + { 0, 9, 12, 0, -195, 18432, 74, }, /* 114 */ + { 0, 9, 12, 0, 69, 18432, 74, }, /* 115 */ + { 0, 9, 12, 0, 71, 18432, 74, }, /* 116 */ + { 0, 5, 12, 0, 10783, 18432, 76, }, /* 117 */ + { 0, 5, 12, 0, 10780, 18432, 76, }, /* 118 */ + { 0, 5, 12, 0, 10782, 18432, 76, }, /* 119 */ + { 0, 5, 12, 0, -210, 18432, 76, }, /* 120 */ + { 0, 5, 12, 0, -206, 18432, 76, }, /* 121 */ + { 0, 5, 12, 0, -205, 18432, 76, }, /* 122 */ + { 0, 5, 12, 0, -202, 18432, 76, }, /* 123 */ + { 0, 5, 12, 0, -203, 18432, 76, }, /* 124 */ + { 0, 5, 12, 0, 42319, 18432, 76, }, /* 125 */ + { 0, 5, 12, 0, 42315, 18432, 76, }, /* 126 */ + { 0, 5, 12, 0, -207, 18432, 76, }, /* 127 */ + { 0, 5, 12, 0, 42280, 18432, 76, }, /* 128 */ + { 0, 5, 12, 0, 42308, 18432, 76, }, /* 129 */ + { 0, 5, 12, 0, -209, 18432, 78, }, /* 130 */ + { 0, 5, 12, 0, -211, 18432, 76, }, /* 131 */ + { 0, 5, 12, 0, 10743, 18432, 76, }, /* 132 */ + { 0, 5, 12, 0, 42305, 18432, 76, }, /* 133 */ + { 0, 5, 12, 0, 10749, 18432, 76, }, /* 134 */ + { 0, 5, 12, 0, -213, 18432, 76, }, /* 135 */ + { 0, 5, 12, 0, -214, 18432, 76, }, /* 136 */ + { 0, 5, 12, 0, 10727, 18432, 76, }, /* 137 */ + { 0, 5, 12, 0, -218, 18432, 76, }, /* 138 */ + { 0, 5, 12, 0, 42307, 18432, 76, }, /* 139 */ + { 0, 5, 12, 0, 42282, 18432, 76, }, /* 140 */ + { 0, 5, 12, 0, -69, 18432, 76, }, /* 141 */ + { 0, 5, 12, 0, -217, 18432, 76, }, /* 142 */ + { 0, 5, 12, 0, -71, 18432, 76, }, /* 143 */ + { 0, 5, 12, 0, -219, 18432, 76, }, /* 144 */ + { 0, 5, 12, 0, 42261, 18432, 78, }, /* 145 */ + { 0, 5, 12, 0, 42258, 18432, 76, }, /* 146 */ + { 0, 6, 12, 0, 0, 18432, 88, }, /* 147 */ + { 0, 6, 12, 0, 0, 18432, 90, }, /* 148 */ + { 69, 6, 12, 0, 0, 28672, 92, }, /* 149 */ + { 69, 6, 12, 0, 0, 18432, 92, }, /* 150 */ + { 69, 6, 12, 0, 0, 18432, 88, }, /* 151 */ + { 69, 6, 12, 0, 0, 18432, 94, }, /* 152 */ + { 22, 24, 12, 0, 0, 28672, 56, }, /* 153 */ + { 84, 12, 3, 0, 0, 26624, 96, }, /* 154 */ + { 84, 12, 3, 0, 0, 26636, 96, }, /* 155 */ + { 84, 12, 3, 21, 116, 26636, 98, }, /* 156 */ + { 84, 12, 3, 0, 0, 26624, 100, }, /* 157 */ + { 84, 12, 3, 0, 0, 26624, 102, }, /* 158 */ + { 84, 12, 3, 0, 0, 26642, 102, }, /* 159 */ + { 1, 9, 12, 0, 1, 18432, 74, }, /* 160 */ + { 1, 5, 12, 0, -1, 18432, 76, }, /* 161 */ + { 1, 24, 12, 0, 0, 28672, 56, }, /* 162 */ + { 68, 2, 12, 0, 0, 18432, 0, }, /* 163 */ + { 1, 6, 12, 0, 0, 18432, 104, }, /* 164 */ + { 1, 5, 12, 0, 130, 18432, 76, }, /* 165 */ + { 69, 21, 12, 0, 0, 28672, 106, }, /* 166 */ + { 1, 9, 12, 0, 116, 18432, 74, }, /* 167 */ + { 1, 9, 12, 0, 38, 18432, 74, }, /* 168 */ + { 69, 21, 12, 0, 0, 28672, 108, }, /* 169 */ + { 1, 9, 12, 0, 37, 18432, 74, }, /* 170 */ + { 1, 9, 12, 0, 64, 18432, 74, }, /* 171 */ + { 1, 9, 12, 0, 63, 18432, 74, }, /* 172 */ + { 1, 5, 12, 0, 0, 18432, 76, }, /* 173 */ + { 1, 9, 12, 0, 32, 18432, 74, }, /* 174 */ + { 1, 9, 12, 34, 32, 18432, 74, }, /* 175 */ + { 1, 9, 12, 59, 32, 18432, 74, }, /* 176 */ + { 1, 9, 12, 38, 32, 18432, 74, }, /* 177 */ + { 1, 9, 12, 21, 32, 18432, 74, }, /* 178 */ + { 1, 9, 12, 51, 32, 18432, 74, }, /* 179 */ + { 1, 9, 12, 26, 32, 18432, 74, }, /* 180 */ + { 1, 9, 12, 47, 32, 18432, 74, }, /* 181 */ + { 1, 9, 12, 55, 32, 18432, 74, }, /* 182 */ + { 1, 9, 12, 30, 32, 18432, 74, }, /* 183 */ + { 1, 9, 12, 43, 32, 18432, 74, }, /* 184 */ + { 1, 9, 12, 96, 32, 18432, 74, }, /* 185 */ + { 1, 5, 12, 0, -38, 18432, 76, }, /* 186 */ + { 1, 5, 12, 0, -37, 18432, 76, }, /* 187 */ + { 1, 5, 12, 0, -32, 18432, 76, }, /* 188 */ + { 1, 5, 12, 34, -32, 18432, 76, }, /* 189 */ + { 1, 5, 12, 59, -32, 18432, 76, }, /* 190 */ + { 1, 5, 12, 38, -32, 18432, 76, }, /* 191 */ + { 1, 5, 12, 21, -116, 18432, 76, }, /* 192 */ + { 1, 5, 12, 51, -32, 18432, 76, }, /* 193 */ + { 1, 5, 12, 26, -775, 18432, 76, }, /* 194 */ + { 1, 5, 12, 47, -32, 18432, 76, }, /* 195 */ + { 1, 5, 12, 55, -32, 18432, 76, }, /* 196 */ + { 1, 5, 12, 30, 1, 18432, 70, }, /* 197 */ + { 1, 5, 12, 30, -32, 18432, 76, }, /* 198 */ + { 1, 5, 12, 43, -32, 18432, 76, }, /* 199 */ + { 1, 5, 12, 96, -32, 18432, 76, }, /* 200 */ + { 1, 5, 12, 0, -64, 18432, 76, }, /* 201 */ + { 1, 5, 12, 0, -63, 18432, 76, }, /* 202 */ + { 1, 9, 12, 0, 8, 18432, 74, }, /* 203 */ + { 1, 5, 12, 34, -30, 18432, 110, }, /* 204 */ + { 1, 5, 12, 38, -25, 18432, 110, }, /* 205 */ + { 1, 9, 12, 0, 0, 18432, 112, }, /* 206 */ + { 1, 9, 12, 0, 0, 18432, 114, }, /* 207 */ + { 1, 5, 12, 43, -15, 18432, 110, }, /* 208 */ + { 1, 5, 12, 47, -22, 18432, 70, }, /* 209 */ + { 1, 5, 12, 0, -8, 18432, 76, }, /* 210 */ + { 34, 9, 12, 0, 1, 18432, 74, }, /* 211 */ + { 34, 5, 12, 0, -1, 18432, 76, }, /* 212 */ + { 1, 5, 12, 51, -54, 18432, 110, }, /* 213 */ + { 1, 5, 12, 55, -48, 18432, 110, }, /* 214 */ + { 1, 5, 12, 0, 7, 18432, 76, }, /* 215 */ + { 1, 5, 12, 0, -116, 18432, 78, }, /* 216 */ + { 1, 9, 12, 38, -60, 18432, 116, }, /* 217 */ + { 1, 5, 12, 59, -64, 18432, 110, }, /* 218 */ + { 1, 25, 12, 0, 0, 28672, 118, }, /* 219 */ + { 1, 9, 12, 0, -7, 18432, 74, }, /* 220 */ + { 1, 5, 12, 0, 0, 18432, 60, }, /* 221 */ + { 1, 9, 12, 0, -130, 18432, 74, }, /* 222 */ + { 2, 9, 12, 0, 80, 18432, 74, }, /* 223 */ + { 2, 9, 12, 0, 32, 18432, 74, }, /* 224 */ + { 2, 9, 12, 63, 32, 18432, 74, }, /* 225 */ + { 2, 9, 12, 67, 32, 18432, 74, }, /* 226 */ + { 2, 9, 12, 71, 32, 18432, 74, }, /* 227 */ + { 2, 9, 12, 75, 32, 18432, 74, }, /* 228 */ + { 2, 9, 12, 79, 32, 18432, 74, }, /* 229 */ + { 2, 9, 12, 84, 32, 18432, 74, }, /* 230 */ + { 2, 5, 12, 0, -32, 18432, 76, }, /* 231 */ + { 2, 5, 12, 63, -32, 18432, 76, }, /* 232 */ + { 2, 5, 12, 67, -32, 18432, 76, }, /* 233 */ + { 2, 5, 12, 71, -32, 18432, 76, }, /* 234 */ + { 2, 5, 12, 75, -32, 18432, 76, }, /* 235 */ + { 2, 5, 12, 79, -32, 18432, 76, }, /* 236 */ + { 2, 5, 12, 84, -32, 18432, 76, }, /* 237 */ + { 2, 5, 12, 0, -80, 18432, 76, }, /* 238 */ + { 2, 5, 12, 0, -80, 18432, 78, }, /* 239 */ + { 2, 9, 12, 0, 1, 18432, 74, }, /* 240 */ + { 2, 5, 12, 0, -1, 18432, 76, }, /* 241 */ + { 2, 9, 12, 88, 1, 18432, 74, }, /* 242 */ + { 2, 5, 12, 88, -1, 18432, 76, }, /* 243 */ + { 2, 26, 12, 0, 0, 18432, 68, }, /* 244 */ + { 2, 12, 3, 0, 0, 26684, 96, }, /* 245 */ + { 2, 12, 3, 0, 0, 26678, 96, }, /* 246 */ + { 84, 12, 3, 0, 0, 26681, 96, }, /* 247 */ + { 2, 11, 3, 0, 0, 26624, 120, }, /* 248 */ + { 2, 9, 12, 0, 15, 18432, 74, }, /* 249 */ + { 2, 5, 12, 0, -15, 18432, 76, }, /* 250 */ + { 70, 9, 12, 0, 48, 18432, 74, }, /* 251 */ + { 70, 6, 12, 0, 0, 18432, 92, }, /* 252 */ + { 70, 21, 12, 0, 0, 18432, 68, }, /* 253 */ + { 70, 21, 12, 0, 0, 18432, 122, }, /* 254 */ + { 70, 5, 12, 0, 0, 18432, 60, }, /* 255 */ + { 70, 5, 12, 0, -48, 18432, 76, }, /* 256 */ + { 70, 5, 12, 0, 0, 18432, 70, }, /* 257 */ + { 70, 21, 12, 0, 0, 18432, 124, }, /* 258 */ + { 70, 17, 12, 0, 0, 28672, 126, }, /* 259 */ + { 70, 26, 12, 0, 0, 28672, 68, }, /* 260 */ + { 70, 23, 12, 0, 0, 14336, 68, }, /* 261 */ + { 68, 2, 12, 0, 0, 34816, 0, }, /* 262 */ + { 71, 12, 3, 0, 0, 26624, 96, }, /* 263 */ + { 71, 12, 3, 0, 0, 26624, 102, }, /* 264 */ + { 71, 12, 3, 0, 0, 26624, 128, }, /* 265 */ + { 71, 17, 12, 0, 0, 34816, 126, }, /* 266 */ + { 71, 21, 12, 0, 0, 34816, 68, }, /* 267 */ + { 71, 21, 12, 0, 0, 34816, 106, }, /* 268 */ + { 71, 12, 3, 0, 0, 26624, 130, }, /* 269 */ + { 71, 7, 12, 0, 0, 34816, 82, }, /* 270 */ + { 71, 21, 12, 0, 0, 34816, 122, }, /* 271 */ + { 3, 1, 4, 0, 0, 2048, 132, }, /* 272 */ + { 69, 1, 4, 0, 0, 2048, 132, }, /* 273 */ + { 3, 25, 12, 0, 0, 28672, 118, }, /* 274 */ + { 3, 25, 12, 0, 0, 0, 118, }, /* 275 */ + { 3, 21, 12, 0, 0, 14336, 68, }, /* 276 */ + { 3, 23, 12, 0, 0, 0, 68, }, /* 277 */ + { 69, 21, 12, 0, 0, 8342, 106, }, /* 278 */ + { 3, 21, 12, 0, 0, 0, 68, }, /* 279 */ + { 3, 26, 12, 0, 0, 28672, 68, }, /* 280 */ + { 3, 12, 3, 0, 0, 26624, 130, }, /* 281 */ + { 69, 21, 12, 0, 0, 150, 106, }, /* 282 */ + { 3, 1, 2, 0, 0, 108, 134, }, /* 283 */ + { 3, 21, 12, 0, 0, 0, 124, }, /* 284 */ + { 69, 21, 12, 0, 0, 159, 124, }, /* 285 */ + { 3, 7, 12, 0, 0, 0, 82, }, /* 286 */ + { 69, 6, 12, 0, 0, 165, 136, }, /* 287 */ + { 84, 12, 3, 0, 0, 26660, 128, }, /* 288 */ + { 84, 12, 3, 0, 0, 26660, 130, }, /* 289 */ + { 3, 12, 3, 0, 0, 26624, 128, }, /* 290 */ + { 3, 12, 3, 0, 0, 26624, 96, }, /* 291 */ + { 3, 13, 12, 0, 0, 2159, 138, }, /* 292 */ + { 3, 21, 12, 0, 0, 2048, 68, }, /* 293 */ + { 3, 7, 12, 0, 0, 0, 140, }, /* 294 */ + { 3, 21, 12, 0, 0, 30, 124, }, /* 295 */ + { 3, 6, 12, 0, 0, 0, 92, }, /* 296 */ + { 3, 13, 12, 0, 0, 10240, 138, }, /* 297 */ + { 3, 26, 12, 0, 0, 0, 68, }, /* 298 */ + { 4, 21, 12, 0, 0, 0, 124, }, /* 299 */ + { 4, 21, 12, 0, 0, 0, 106, }, /* 300 */ + { 4, 21, 12, 0, 0, 0, 68, }, /* 301 */ + { 68, 2, 12, 0, 0, 0, 0, }, /* 302 */ + { 4, 1, 4, 0, 0, 0, 132, }, /* 303 */ + { 4, 7, 12, 0, 0, 0, 82, }, /* 304 */ + { 4, 12, 3, 0, 0, 26624, 130, }, /* 305 */ + { 4, 12, 3, 0, 0, 26624, 128, }, /* 306 */ + { 4, 12, 3, 0, 0, 26624, 96, }, /* 307 */ + { 5, 7, 12, 0, 0, 0, 82, }, /* 308 */ + { 5, 12, 3, 0, 0, 26624, 128, }, /* 309 */ + { 38, 13, 12, 0, 0, 34816, 138, }, /* 310 */ + { 38, 7, 12, 0, 0, 34816, 82, }, /* 311 */ + { 38, 12, 3, 0, 0, 26624, 96, }, /* 312 */ + { 38, 6, 12, 0, 0, 34816, 92, }, /* 313 */ + { 38, 26, 12, 0, 0, 28672, 68, }, /* 314 */ + { 38, 21, 12, 0, 0, 28672, 68, }, /* 315 */ + { 38, 21, 12, 0, 0, 28672, 106, }, /* 316 */ + { 38, 21, 12, 0, 0, 28672, 124, }, /* 317 */ + { 38, 6, 12, 0, 0, 34816, 136, }, /* 318 */ + { 38, 12, 3, 0, 0, 26624, 102, }, /* 319 */ + { 38, 23, 12, 0, 0, 34816, 68, }, /* 320 */ + { 110, 7, 12, 0, 0, 34816, 82, }, /* 321 */ + { 110, 12, 3, 0, 0, 26624, 130, }, /* 322 */ + { 110, 12, 3, 0, 0, 26624, 96, }, /* 323 */ + { 110, 6, 12, 0, 0, 34816, 142, }, /* 324 */ + { 110, 12, 3, 0, 0, 26624, 102, }, /* 325 */ + { 110, 21, 12, 0, 0, 34816, 106, }, /* 326 */ + { 110, 21, 12, 0, 0, 34816, 124, }, /* 327 */ + { 42, 7, 12, 0, 0, 34816, 82, }, /* 328 */ + { 42, 12, 3, 0, 0, 26624, 102, }, /* 329 */ + { 42, 21, 12, 0, 0, 34816, 106, }, /* 330 */ + { 3, 24, 12, 0, 0, 0, 122, }, /* 331 */ + { 3, 12, 3, 0, 0, 26624, 102, }, /* 332 */ + { 6, 12, 3, 0, 0, 26624, 130, }, /* 333 */ + { 6, 10, 5, 0, 0, 18432, 144, }, /* 334 */ + { 6, 7, 12, 0, 0, 18432, 82, }, /* 335 */ + { 6, 12, 3, 0, 0, 26624, 96, }, /* 336 */ + { 6, 12, 3, 0, 0, 26624, 146, }, /* 337 */ + { 84, 12, 3, 0, 0, 26798, 96, }, /* 338 */ + { 84, 12, 3, 0, 0, 26795, 96, }, /* 339 */ + { 69, 21, 12, 0, 0, 18615, 124, }, /* 340 */ + { 69, 21, 12, 0, 0, 18618, 124, }, /* 341 */ + { 6, 13, 12, 0, 0, 18576, 138, }, /* 342 */ + { 6, 21, 12, 0, 0, 18432, 68, }, /* 343 */ + { 6, 6, 12, 0, 0, 18432, 92, }, /* 344 */ + { 7, 7, 12, 0, 0, 18432, 82, }, /* 345 */ + { 7, 12, 3, 0, 0, 26624, 130, }, /* 346 */ + { 7, 10, 5, 0, 0, 18432, 144, }, /* 347 */ + { 7, 12, 3, 0, 0, 26624, 96, }, /* 348 */ + { 7, 10, 3, 0, 0, 18432, 148, }, /* 349 */ + { 7, 12, 3, 0, 0, 26624, 146, }, /* 350 */ + { 7, 13, 12, 0, 0, 18546, 138, }, /* 351 */ + { 7, 23, 12, 0, 0, 14336, 68, }, /* 352 */ + { 7, 15, 12, 0, 0, 18432, 68, }, /* 353 */ + { 7, 26, 12, 0, 0, 18432, 68, }, /* 354 */ + { 7, 21, 12, 0, 0, 18432, 68, }, /* 355 */ + { 7, 12, 3, 0, 0, 26624, 102, }, /* 356 */ + { 8, 12, 3, 0, 0, 26624, 130, }, /* 357 */ + { 8, 10, 5, 0, 0, 18432, 144, }, /* 358 */ + { 8, 7, 12, 0, 0, 18432, 82, }, /* 359 */ + { 8, 12, 3, 0, 0, 26624, 96, }, /* 360 */ + { 8, 12, 3, 0, 0, 26624, 146, }, /* 361 */ + { 8, 13, 12, 0, 0, 18519, 138, }, /* 362 */ + { 8, 21, 12, 0, 0, 18432, 68, }, /* 363 */ + { 9, 12, 3, 0, 0, 26624, 130, }, /* 364 */ + { 9, 10, 5, 0, 0, 18432, 144, }, /* 365 */ + { 9, 7, 12, 0, 0, 18432, 82, }, /* 366 */ + { 9, 12, 3, 0, 0, 26624, 96, }, /* 367 */ + { 9, 12, 3, 0, 0, 26624, 146, }, /* 368 */ + { 9, 13, 12, 0, 0, 18516, 138, }, /* 369 */ + { 9, 21, 12, 0, 0, 18432, 68, }, /* 370 */ + { 9, 23, 12, 0, 0, 14336, 68, }, /* 371 */ + { 10, 12, 3, 0, 0, 26624, 130, }, /* 372 */ + { 10, 10, 5, 0, 0, 18432, 144, }, /* 373 */ + { 10, 7, 12, 0, 0, 18432, 82, }, /* 374 */ + { 10, 12, 3, 0, 0, 26624, 96, }, /* 375 */ + { 10, 10, 3, 0, 0, 18432, 148, }, /* 376 */ + { 10, 12, 3, 0, 0, 26624, 146, }, /* 377 */ + { 10, 12, 3, 0, 0, 26624, 150, }, /* 378 */ + { 10, 13, 12, 0, 0, 18432, 138, }, /* 379 */ + { 10, 26, 12, 0, 0, 18432, 68, }, /* 380 */ + { 10, 15, 12, 0, 0, 18432, 68, }, /* 381 */ + { 11, 12, 3, 0, 0, 26624, 130, }, /* 382 */ + { 11, 7, 12, 0, 0, 18432, 82, }, /* 383 */ + { 11, 10, 3, 0, 0, 18432, 148, }, /* 384 */ + { 11, 10, 5, 0, 0, 18432, 144, }, /* 385 */ + { 11, 12, 3, 0, 0, 26624, 146, }, /* 386 */ + { 11, 13, 12, 0, 0, 18513, 138, }, /* 387 */ + { 11, 15, 12, 0, 0, 18513, 68, }, /* 388 */ + { 11, 26, 12, 0, 0, 28753, 68, }, /* 389 */ + { 11, 26, 12, 0, 0, 28672, 68, }, /* 390 */ + { 11, 23, 12, 0, 0, 14336, 68, }, /* 391 */ + { 12, 12, 3, 0, 0, 26624, 130, }, /* 392 */ + { 12, 10, 5, 0, 0, 18432, 144, }, /* 393 */ + { 12, 12, 3, 0, 0, 26624, 102, }, /* 394 */ + { 12, 7, 12, 0, 0, 18432, 82, }, /* 395 */ + { 12, 12, 3, 0, 0, 26624, 96, }, /* 396 */ + { 12, 12, 3, 0, 0, 26624, 146, }, /* 397 */ + { 12, 13, 12, 0, 0, 18432, 138, }, /* 398 */ + { 12, 21, 12, 0, 0, 18432, 68, }, /* 399 */ + { 12, 15, 12, 0, 0, 28672, 68, }, /* 400 */ + { 12, 26, 12, 0, 0, 18432, 68, }, /* 401 */ + { 13, 7, 12, 0, 0, 18432, 82, }, /* 402 */ + { 13, 12, 3, 0, 0, 26624, 130, }, /* 403 */ + { 13, 10, 5, 0, 0, 18432, 144, }, /* 404 */ + { 13, 21, 12, 0, 0, 18432, 68, }, /* 405 */ + { 13, 12, 3, 0, 0, 26624, 96, }, /* 406 */ + { 13, 12, 3, 0, 0, 18432, 130, }, /* 407 */ + { 13, 10, 3, 0, 0, 18432, 148, }, /* 408 */ + { 13, 12, 3, 0, 0, 26624, 146, }, /* 409 */ + { 13, 13, 12, 0, 0, 18528, 138, }, /* 410 */ + { 14, 12, 3, 0, 0, 26624, 130, }, /* 411 */ + { 14, 10, 5, 0, 0, 18432, 144, }, /* 412 */ + { 14, 7, 12, 0, 0, 18432, 82, }, /* 413 */ + { 14, 12, 3, 0, 0, 26624, 146, }, /* 414 */ + { 14, 10, 3, 0, 0, 18432, 148, }, /* 415 */ + { 14, 7, 4, 0, 0, 18432, 82, }, /* 416 */ + { 14, 26, 12, 0, 0, 18432, 68, }, /* 417 */ + { 14, 15, 12, 0, 0, 18432, 68, }, /* 418 */ + { 14, 13, 12, 0, 0, 18432, 138, }, /* 419 */ + { 15, 12, 3, 0, 0, 26624, 130, }, /* 420 */ + { 15, 10, 5, 0, 0, 18432, 144, }, /* 421 */ + { 15, 7, 12, 0, 0, 18432, 82, }, /* 422 */ + { 15, 12, 3, 0, 0, 26624, 146, }, /* 423 */ + { 15, 10, 3, 0, 0, 18432, 148, }, /* 424 */ + { 15, 13, 12, 0, 0, 18432, 138, }, /* 425 */ + { 15, 21, 12, 0, 0, 18432, 68, }, /* 426 */ + { 72, 7, 12, 0, 0, 18432, 82, }, /* 427 */ + { 72, 12, 3, 0, 0, 26624, 130, }, /* 428 */ + { 72, 7, 5, 0, 0, 18432, 152, }, /* 429 */ + { 72, 12, 3, 0, 0, 26624, 154, }, /* 430 */ + { 69, 23, 12, 0, 0, 14336, 68, }, /* 431 */ + { 72, 7, 12, 0, 0, 18432, 156, }, /* 432 */ + { 72, 6, 12, 0, 0, 18432, 136, }, /* 433 */ + { 72, 12, 3, 0, 0, 26624, 96, }, /* 434 */ + { 72, 21, 12, 0, 0, 18432, 68, }, /* 435 */ + { 72, 13, 12, 0, 0, 18432, 138, }, /* 436 */ + { 72, 21, 12, 0, 0, 18432, 106, }, /* 437 */ + { 73, 7, 12, 0, 0, 18432, 82, }, /* 438 */ + { 73, 12, 3, 0, 0, 26624, 130, }, /* 439 */ + { 73, 7, 5, 0, 0, 18432, 152, }, /* 440 */ + { 73, 12, 3, 0, 0, 26624, 146, }, /* 441 */ + { 73, 7, 12, 0, 0, 18432, 156, }, /* 442 */ + { 73, 6, 12, 0, 0, 18432, 136, }, /* 443 */ + { 73, 12, 3, 0, 0, 26624, 96, }, /* 444 */ + { 73, 13, 12, 0, 0, 18432, 138, }, /* 445 */ + { 74, 7, 12, 0, 0, 18432, 82, }, /* 446 */ + { 74, 26, 12, 0, 0, 18432, 68, }, /* 447 */ + { 74, 21, 12, 0, 0, 18432, 68, }, /* 448 */ + { 74, 21, 12, 0, 0, 18432, 106, }, /* 449 */ + { 74, 12, 3, 0, 0, 26624, 96, }, /* 450 */ + { 74, 13, 12, 0, 0, 18432, 138, }, /* 451 */ + { 74, 15, 12, 0, 0, 18432, 68, }, /* 452 */ + { 74, 22, 12, 0, 0, 28672, 158, }, /* 453 */ + { 74, 18, 12, 0, 0, 28672, 158, }, /* 454 */ + { 74, 10, 5, 0, 0, 18432, 160, }, /* 455 */ + { 74, 12, 3, 0, 0, 26624, 130, }, /* 456 */ + { 74, 12, 3, 0, 0, 26624, 162, }, /* 457 */ + { 74, 10, 5, 0, 0, 18432, 144, }, /* 458 */ + { 74, 12, 3, 0, 0, 26624, 146, }, /* 459 */ + { 69, 26, 12, 0, 0, 18432, 68, }, /* 460 */ + { 16, 7, 12, 0, 0, 18432, 82, }, /* 461 */ + { 16, 10, 12, 0, 0, 18432, 144, }, /* 462 */ + { 16, 12, 3, 0, 0, 26624, 130, }, /* 463 */ + { 16, 10, 5, 0, 0, 18432, 144, }, /* 464 */ + { 16, 12, 3, 0, 0, 26624, 96, }, /* 465 */ + { 16, 12, 3, 0, 0, 26624, 146, }, /* 466 */ + { 16, 13, 12, 0, 0, 18549, 138, }, /* 467 */ + { 16, 21, 12, 0, 0, 18432, 124, }, /* 468 */ + { 16, 21, 12, 0, 0, 18432, 68, }, /* 469 */ + { 16, 10, 12, 0, 0, 18432, 164, }, /* 470 */ + { 16, 12, 3, 0, 0, 26624, 128, }, /* 471 */ + { 16, 13, 12, 0, 0, 18432, 138, }, /* 472 */ + { 16, 26, 12, 0, 0, 18432, 68, }, /* 473 */ + { 17, 9, 12, 0, 7264, 18432, 74, }, /* 474 */ + { 17, 5, 12, 0, 3008, 18432, 166, }, /* 475 */ + { 69, 21, 12, 0, 0, 18510, 68, }, /* 476 */ + { 17, 6, 12, 0, 0, 18432, 142, }, /* 477 */ + { 18, 7, 6, 0, 0, 18432, 82, }, /* 478 */ + { 18, 7, 6, 0, 0, 18432, 168, }, /* 479 */ + { 18, 7, 7, 0, 0, 18432, 168, }, /* 480 */ + { 18, 7, 7, 0, 0, 18432, 82, }, /* 481 */ + { 18, 7, 8, 0, 0, 18432, 82, }, /* 482 */ + { 75, 7, 12, 0, 0, 18432, 82, }, /* 483 */ + { 75, 12, 3, 0, 0, 26624, 96, }, /* 484 */ + { 75, 21, 12, 0, 0, 18432, 68, }, /* 485 */ + { 75, 21, 12, 0, 0, 18432, 106, }, /* 486 */ + { 75, 21, 12, 0, 0, 18432, 124, }, /* 487 */ + { 75, 15, 12, 0, 0, 18432, 138, }, /* 488 */ + { 75, 15, 12, 0, 0, 18432, 68, }, /* 489 */ + { 75, 26, 12, 0, 0, 28672, 68, }, /* 490 */ + { 76, 9, 12, 0, 38864, 18432, 170, }, /* 491 */ + { 76, 9, 12, 0, 8, 18432, 170, }, /* 492 */ + { 76, 5, 12, 0, -8, 18432, 70, }, /* 493 */ + { 77, 17, 12, 0, 0, 28672, 126, }, /* 494 */ + { 77, 7, 12, 0, 0, 18432, 82, }, /* 495 */ + { 77, 26, 12, 0, 0, 18432, 68, }, /* 496 */ + { 77, 21, 12, 0, 0, 18432, 124, }, /* 497 */ + { 78, 29, 12, 0, 0, 45056, 52, }, /* 498 */ + { 78, 7, 12, 0, 0, 18432, 82, }, /* 499 */ + { 78, 22, 12, 0, 0, 28672, 158, }, /* 500 */ + { 78, 18, 12, 0, 0, 28672, 158, }, /* 501 */ + { 79, 7, 12, 0, 0, 18432, 82, }, /* 502 */ + { 69, 21, 12, 0, 0, 18432, 106, }, /* 503 */ + { 79, 14, 12, 0, 0, 18432, 82, }, /* 504 */ + { 25, 7, 12, 0, 0, 18432, 82, }, /* 505 */ + { 25, 12, 3, 0, 0, 26624, 130, }, /* 506 */ + { 25, 12, 3, 0, 0, 26624, 146, }, /* 507 */ + { 25, 10, 5, 0, 0, 18432, 172, }, /* 508 */ + { 26, 7, 12, 0, 0, 18432, 82, }, /* 509 */ + { 26, 12, 3, 0, 0, 26624, 130, }, /* 510 */ + { 26, 10, 5, 0, 0, 18432, 174, }, /* 511 */ + { 69, 21, 12, 0, 0, 18573, 124, }, /* 512 */ + { 27, 7, 12, 0, 0, 18432, 82, }, /* 513 */ + { 27, 12, 3, 0, 0, 26624, 130, }, /* 514 */ + { 28, 7, 12, 0, 0, 18432, 82, }, /* 515 */ + { 28, 12, 3, 0, 0, 26624, 130, }, /* 516 */ + { 80, 7, 12, 0, 0, 18432, 82, }, /* 517 */ + { 80, 7, 12, 0, 0, 18432, 140, }, /* 518 */ + { 80, 12, 3, 0, 0, 26624, 100, }, /* 519 */ + { 80, 10, 5, 0, 0, 18432, 144, }, /* 520 */ + { 80, 12, 3, 0, 0, 26624, 130, }, /* 521 */ + { 80, 12, 3, 0, 0, 26624, 96, }, /* 522 */ + { 80, 12, 3, 0, 0, 26624, 146, }, /* 523 */ + { 80, 21, 12, 0, 0, 18432, 106, }, /* 524 */ + { 80, 6, 12, 0, 0, 18432, 142, }, /* 525 */ + { 80, 21, 12, 0, 0, 18432, 68, }, /* 526 */ + { 80, 23, 12, 0, 0, 14336, 68, }, /* 527 */ + { 80, 13, 12, 0, 0, 18432, 138, }, /* 528 */ + { 80, 15, 12, 0, 0, 28672, 68, }, /* 529 */ + { 19, 21, 12, 0, 0, 28672, 68, }, /* 530 */ + { 69, 21, 12, 0, 0, 28777, 106, }, /* 531 */ + { 69, 21, 12, 0, 0, 28777, 124, }, /* 532 */ + { 19, 21, 12, 0, 0, 28672, 106, }, /* 533 */ + { 19, 17, 12, 0, 0, 28672, 126, }, /* 534 */ + { 19, 21, 12, 0, 0, 28672, 124, }, /* 535 */ + { 19, 21, 12, 0, 0, 28672, 176, }, /* 536 */ + { 19, 12, 3, 0, 0, 26624, 178, }, /* 537 */ + { 19, 1, 2, 0, 0, 6144, 66, }, /* 538 */ + { 19, 13, 12, 0, 0, 18432, 138, }, /* 539 */ + { 19, 7, 12, 0, 0, 18432, 82, }, /* 540 */ + { 19, 6, 12, 0, 0, 18432, 136, }, /* 541 */ + { 19, 12, 3, 0, 0, 26624, 180, }, /* 542 */ + { 19, 12, 3, 0, 0, 26624, 130, }, /* 543 */ + { 29, 7, 12, 0, 0, 18432, 82, }, /* 544 */ + { 29, 12, 3, 0, 0, 26624, 130, }, /* 545 */ + { 29, 10, 5, 0, 0, 18432, 144, }, /* 546 */ + { 29, 12, 3, 0, 0, 26624, 96, }, /* 547 */ + { 29, 26, 12, 0, 0, 28672, 68, }, /* 548 */ + { 29, 21, 12, 0, 0, 28672, 124, }, /* 549 */ + { 29, 13, 12, 0, 0, 18432, 138, }, /* 550 */ + { 30, 7, 12, 0, 0, 18432, 82, }, /* 551 */ + { 89, 7, 12, 0, 0, 18432, 82, }, /* 552 */ + { 89, 7, 12, 0, 0, 18432, 156, }, /* 553 */ + { 89, 13, 12, 0, 0, 18432, 138, }, /* 554 */ + { 89, 15, 12, 0, 0, 18432, 138, }, /* 555 */ + { 89, 26, 12, 0, 0, 28672, 68, }, /* 556 */ + { 80, 26, 12, 0, 0, 28672, 68, }, /* 557 */ + { 33, 7, 12, 0, 0, 18432, 82, }, /* 558 */ + { 33, 12, 3, 0, 0, 26624, 130, }, /* 559 */ + { 33, 10, 5, 0, 0, 18432, 144, }, /* 560 */ + { 33, 21, 12, 0, 0, 18432, 68, }, /* 561 */ + { 106, 7, 12, 0, 0, 18432, 82, }, /* 562 */ + { 106, 10, 5, 0, 0, 18432, 144, }, /* 563 */ + { 106, 12, 3, 0, 0, 26624, 130, }, /* 564 */ + { 106, 12, 3, 0, 0, 26624, 182, }, /* 565 */ + { 106, 10, 12, 0, 0, 18432, 144, }, /* 566 */ + { 106, 12, 3, 0, 0, 26624, 96, }, /* 567 */ + { 106, 13, 12, 0, 0, 18432, 138, }, /* 568 */ + { 106, 21, 12, 0, 0, 18432, 68, }, /* 569 */ + { 106, 6, 12, 0, 0, 18432, 136, }, /* 570 */ + { 106, 21, 12, 0, 0, 18432, 124, }, /* 571 */ + { 84, 11, 3, 0, 0, 26624, 184, }, /* 572 */ + { 84, 12, 3, 0, 0, 26624, 130, }, /* 573 */ + { 93, 12, 3, 0, 0, 26624, 130, }, /* 574 */ + { 93, 10, 5, 0, 0, 18432, 144, }, /* 575 */ + { 93, 7, 12, 0, 0, 18432, 82, }, /* 576 */ + { 93, 12, 3, 0, 0, 26624, 96, }, /* 577 */ + { 93, 10, 3, 0, 0, 18432, 148, }, /* 578 */ + { 93, 10, 5, 0, 0, 18432, 172, }, /* 579 */ + { 93, 13, 12, 0, 0, 18432, 138, }, /* 580 */ + { 93, 21, 12, 0, 0, 18432, 124, }, /* 581 */ + { 93, 21, 12, 0, 0, 18432, 68, }, /* 582 */ + { 93, 21, 12, 0, 0, 18432, 106, }, /* 583 */ + { 93, 26, 12, 0, 0, 18432, 68, }, /* 584 */ + { 96, 12, 3, 0, 0, 26624, 130, }, /* 585 */ + { 96, 10, 5, 0, 0, 18432, 144, }, /* 586 */ + { 96, 7, 12, 0, 0, 18432, 82, }, /* 587 */ + { 96, 10, 5, 0, 0, 18432, 172, }, /* 588 */ + { 96, 12, 3, 0, 0, 26624, 146, }, /* 589 */ + { 96, 13, 12, 0, 0, 18432, 138, }, /* 590 */ + { 119, 7, 12, 0, 0, 18432, 82, }, /* 591 */ + { 119, 12, 3, 0, 0, 26624, 102, }, /* 592 */ + { 119, 10, 5, 0, 0, 18432, 144, }, /* 593 */ + { 119, 12, 3, 0, 0, 26624, 130, }, /* 594 */ + { 119, 10, 5, 0, 0, 18432, 174, }, /* 595 */ + { 119, 21, 12, 0, 0, 18432, 68, }, /* 596 */ + { 97, 7, 12, 0, 0, 18432, 82, }, /* 597 */ + { 97, 10, 5, 0, 0, 18432, 144, }, /* 598 */ + { 97, 12, 3, 0, 0, 26624, 130, }, /* 599 */ + { 97, 12, 3, 0, 0, 26624, 186, }, /* 600 */ + { 97, 12, 3, 0, 0, 26624, 96, }, /* 601 */ + { 97, 21, 12, 0, 0, 18432, 124, }, /* 602 */ + { 97, 21, 12, 0, 0, 18432, 106, }, /* 603 */ + { 97, 13, 12, 0, 0, 18432, 138, }, /* 604 */ + { 98, 13, 12, 0, 0, 18432, 138, }, /* 605 */ + { 98, 7, 12, 0, 0, 18432, 82, }, /* 606 */ + { 98, 6, 12, 0, 0, 18432, 92, }, /* 607 */ + { 98, 6, 12, 0, 0, 18432, 94, }, /* 608 */ + { 98, 21, 12, 0, 0, 18432, 124, }, /* 609 */ + { 2, 5, 12, 63, -6222, 18432, 70, }, /* 610 */ + { 2, 5, 12, 67, -6221, 18432, 70, }, /* 611 */ + { 2, 5, 12, 71, -6212, 18432, 70, }, /* 612 */ + { 2, 5, 12, 75, -6210, 18432, 70, }, /* 613 */ + { 2, 5, 12, 79, -6210, 18432, 70, }, /* 614 */ + { 2, 5, 12, 79, -6211, 18432, 70, }, /* 615 */ + { 2, 5, 12, 84, -6204, 18432, 70, }, /* 616 */ + { 2, 5, 12, 88, -6180, 18432, 70, }, /* 617 */ + { 2, 5, 12, 108, 35267, 18432, 70, }, /* 618 */ + { 17, 9, 12, 0, -3008, 18432, 74, }, /* 619 */ + { 96, 21, 12, 0, 0, 18432, 68, }, /* 620 */ + { 84, 12, 3, 0, 0, 26762, 96, }, /* 621 */ + { 84, 12, 3, 0, 0, 26630, 96, }, /* 622 */ + { 69, 21, 12, 0, 0, 18498, 188, }, /* 623 */ + { 84, 12, 3, 0, 0, 26666, 96, }, /* 624 */ + { 84, 12, 3, 0, 0, 26696, 96, }, /* 625 */ + { 84, 12, 3, 0, 0, 26780, 96, }, /* 626 */ + { 69, 10, 5, 0, 0, 18474, 160, }, /* 627 */ + { 69, 7, 12, 0, 0, 18501, 82, }, /* 628 */ + { 69, 7, 12, 0, 0, 18474, 82, }, /* 629 */ + { 69, 7, 12, 0, 0, 18438, 82, }, /* 630 */ + { 69, 7, 12, 0, 0, 18594, 82, }, /* 631 */ + { 69, 7, 12, 0, 0, 18498, 82, }, /* 632 */ + { 84, 12, 3, 0, 0, 26750, 96, }, /* 633 */ + { 69, 10, 5, 0, 0, 18435, 160, }, /* 634 */ + { 84, 12, 3, 0, 0, 26690, 96, }, /* 635 */ + { 69, 7, 12, 0, 0, 18453, 82, }, /* 636 */ + { 2, 5, 12, 0, 0, 18432, 60, }, /* 637 */ + { 1, 6, 12, 0, 0, 18432, 88, }, /* 638 */ + { 2, 6, 12, 0, 0, 18432, 190, }, /* 639 */ + { 0, 5, 12, 0, 35332, 18432, 76, }, /* 640 */ + { 0, 5, 12, 0, 3814, 18432, 76, }, /* 641 */ + { 0, 5, 12, 0, 35384, 18432, 76, }, /* 642 */ + { 0, 5, 12, 0, 0, 18432, 192, }, /* 643 */ + { 0, 6, 12, 0, 0, 18432, 190, }, /* 644 */ + { 0, 6, 12, 0, 0, 18432, 194, }, /* 645 */ + { 1, 6, 12, 0, 0, 18432, 190, }, /* 646 */ + { 84, 12, 3, 0, 0, 26636, 102, }, /* 647 */ + { 84, 12, 3, 0, 0, 26687, 96, }, /* 648 */ + { 84, 12, 3, 0, 0, 26648, 96, }, /* 649 */ + { 0, 9, 12, 92, 1, 18432, 74, }, /* 650 */ + { 0, 5, 12, 92, -1, 18432, 76, }, /* 651 */ + { 0, 5, 12, 0, 0, 18432, 70, }, /* 652 */ + { 0, 5, 12, 92, -58, 18432, 70, }, /* 653 */ + { 0, 9, 12, 0, -7615, 18432, 74, }, /* 654 */ + { 1, 5, 12, 0, 8, 18432, 76, }, /* 655 */ + { 1, 9, 12, 0, -8, 18432, 74, }, /* 656 */ + { 1, 5, 12, 0, 74, 18432, 76, }, /* 657 */ + { 1, 5, 12, 0, 86, 18432, 76, }, /* 658 */ + { 1, 5, 12, 0, 100, 18432, 76, }, /* 659 */ + { 1, 5, 12, 0, 128, 18432, 76, }, /* 660 */ + { 1, 5, 12, 0, 112, 18432, 76, }, /* 661 */ + { 1, 5, 12, 0, 126, 18432, 76, }, /* 662 */ + { 1, 5, 12, 0, 8, 18432, 70, }, /* 663 */ + { 1, 8, 12, 0, -8, 18432, 86, }, /* 664 */ + { 1, 5, 12, 0, 0, 18432, 70, }, /* 665 */ + { 1, 5, 12, 0, 9, 18432, 70, }, /* 666 */ + { 1, 9, 12, 0, -74, 18432, 74, }, /* 667 */ + { 1, 8, 12, 0, -9, 18432, 86, }, /* 668 */ + { 1, 5, 12, 21, -7173, 18432, 76, }, /* 669 */ + { 1, 9, 12, 0, -86, 18432, 74, }, /* 670 */ + { 1, 9, 12, 0, -100, 18432, 74, }, /* 671 */ + { 1, 9, 12, 0, -112, 18432, 74, }, /* 672 */ + { 1, 9, 12, 0, -128, 18432, 74, }, /* 673 */ + { 1, 9, 12, 0, -126, 18432, 74, }, /* 674 */ + { 69, 29, 12, 0, 0, 45056, 52, }, /* 675 */ + { 84, 1, 3, 0, 0, 6144, 196, }, /* 676 */ + { 84, 1, 13, 0, 0, 6144, 198, }, /* 677 */ + { 69, 1, 2, 0, 0, 18432, 200, }, /* 678 */ + { 69, 1, 2, 0, 0, 34816, 200, }, /* 679 */ + { 69, 17, 12, 0, 0, 28672, 202, }, /* 680 */ + { 69, 21, 12, 0, 0, 28672, 64, }, /* 681 */ + { 69, 20, 12, 0, 0, 28672, 204, }, /* 682 */ + { 69, 19, 12, 0, 0, 28672, 204, }, /* 683 */ + { 69, 22, 12, 0, 0, 28672, 206, }, /* 684 */ + { 69, 20, 12, 0, 0, 28672, 206, }, /* 685 */ + { 69, 19, 12, 0, 0, 28672, 206, }, /* 686 */ + { 69, 21, 12, 0, 0, 28672, 208, }, /* 687 */ + { 69, 27, 2, 0, 0, 45056, 50, }, /* 688 */ + { 69, 28, 2, 0, 0, 4096, 50, }, /* 689 */ + { 69, 1, 2, 0, 0, 20480, 134, }, /* 690 */ + { 69, 1, 2, 0, 0, 36864, 134, }, /* 691 */ + { 69, 1, 2, 0, 0, 30720, 134, }, /* 692 */ + { 69, 1, 2, 0, 0, 24576, 134, }, /* 693 */ + { 69, 1, 2, 0, 0, 40960, 134, }, /* 694 */ + { 69, 29, 12, 0, 0, 8291, 52, }, /* 695 */ + { 69, 21, 12, 0, 0, 14336, 54, }, /* 696 */ + { 69, 21, 12, 0, 0, 14336, 64, }, /* 697 */ + { 69, 21, 14, 0, 0, 28672, 210, }, /* 698 */ + { 69, 21, 12, 0, 0, 28672, 212, }, /* 699 */ + { 69, 16, 12, 0, 0, 28672, 138, }, /* 700 */ + { 69, 16, 12, 0, 0, 28672, 214, }, /* 701 */ + { 69, 25, 12, 0, 0, 8192, 64, }, /* 702 */ + { 69, 22, 12, 0, 0, 28672, 216, }, /* 703 */ + { 69, 18, 12, 0, 0, 28672, 216, }, /* 704 */ + { 69, 21, 12, 0, 0, 28672, 202, }, /* 705 */ + { 69, 1, 2, 0, 0, 6144, 218, }, /* 706 */ + { 68, 2, 2, 0, 0, 6144, 220, }, /* 707 */ + { 69, 1, 2, 0, 0, 22528, 134, }, /* 708 */ + { 69, 1, 2, 0, 0, 38912, 134, }, /* 709 */ + { 69, 1, 2, 0, 0, 16384, 134, }, /* 710 */ + { 69, 1, 2, 0, 0, 32768, 134, }, /* 711 */ + { 69, 1, 2, 0, 0, 6144, 222, }, /* 712 */ + { 69, 25, 12, 0, 0, 12288, 118, }, /* 713 */ + { 69, 25, 12, 0, 0, 12288, 224, }, /* 714 */ + { 69, 25, 12, 0, 0, 28672, 118, }, /* 715 */ + { 69, 22, 12, 0, 0, 28672, 226, }, /* 716 */ + { 69, 18, 12, 0, 0, 28672, 226, }, /* 717 */ + { 68, 2, 12, 0, 0, 14336, 0, }, /* 718 */ + { 84, 12, 3, 0, 0, 26624, 228, }, /* 719 */ + { 84, 11, 3, 0, 0, 26624, 120, }, /* 720 */ + { 84, 11, 3, 0, 0, 26624, 230, }, /* 721 */ + { 84, 12, 3, 0, 0, 26753, 102, }, /* 722 */ + { 69, 26, 12, 0, 0, 28672, 68, }, /* 723 */ + { 69, 9, 12, 0, 0, 18432, 112, }, /* 724 */ + { 69, 5, 12, 0, 0, 18432, 232, }, /* 725 */ + { 69, 25, 12, 0, 0, 28672, 234, }, /* 726 */ + { 69, 26, 14, 0, 0, 28672, 236, }, /* 727 */ + { 1, 9, 12, 96, -7517, 18432, 74, }, /* 728 */ + { 69, 26, 12, 0, 0, 28672, 118, }, /* 729 */ + { 0, 9, 12, 100, -8383, 18432, 74, }, /* 730 */ + { 0, 9, 12, 104, -8262, 18432, 74, }, /* 731 */ + { 69, 26, 12, 0, 0, 14336, 238, }, /* 732 */ + { 0, 9, 12, 0, 28, 18432, 74, }, /* 733 */ + { 69, 7, 12, 0, 0, 18432, 240, }, /* 734 */ + { 69, 5, 14, 0, 0, 18432, 242, }, /* 735 */ + { 69, 5, 12, 0, 0, 18432, 244, }, /* 736 */ + { 0, 5, 12, 0, -28, 18432, 76, }, /* 737 */ + { 0, 14, 12, 0, 16, 18432, 74, }, /* 738 */ + { 0, 14, 12, 0, -16, 18432, 76, }, /* 739 */ + { 0, 14, 12, 0, 0, 18432, 82, }, /* 740 */ + { 69, 25, 14, 0, 0, 28672, 246, }, /* 741 */ + { 69, 26, 14, 0, 0, 28672, 246, }, /* 742 */ + { 69, 26, 12, 0, 0, 28672, 64, }, /* 743 */ + { 69, 25, 12, 0, 0, 28672, 248, }, /* 744 */ + { 69, 25, 12, 0, 0, 12288, 250, }, /* 745 */ + { 69, 22, 12, 0, 0, 28672, 248, }, /* 746 */ + { 69, 18, 12, 0, 0, 28672, 248, }, /* 747 */ + { 69, 26, 14, 0, 0, 28672, 252, }, /* 748 */ + { 69, 22, 12, 0, 0, 28672, 254, }, /* 749 */ + { 69, 18, 12, 0, 0, 28672, 254, }, /* 750 */ + { 69, 26, 12, 0, 0, 18432, 54, }, /* 751 */ + { 69, 26, 14, 0, 0, 28672, 256, }, /* 752 */ + { 68, 2, 12, 0, 0, 18432, 258, }, /* 753 */ + { 69, 26, 12, 0, 26, 18432, 260, }, /* 754 */ + { 69, 26, 14, 0, 26, 18432, 262, }, /* 755 */ + { 69, 26, 12, 0, -26, 18432, 264, }, /* 756 */ + { 69, 25, 14, 0, 0, 28672, 266, }, /* 757 */ + { 69, 26, 14, 0, 0, 28672, 268, }, /* 758 */ + { 69, 26, 14, 0, 0, 28672, 270, }, /* 759 */ + { 69, 25, 14, 0, 0, 28672, 268, }, /* 760 */ + { 69, 26, 14, 0, 0, 18432, 256, }, /* 761 */ + { 69, 26, 14, 0, 0, 28672, 272, }, /* 762 */ + { 88, 26, 12, 0, 0, 18432, 54, }, /* 763 */ + { 69, 26, 12, 0, 0, 28672, 216, }, /* 764 */ + { 35, 9, 12, 0, 48, 18432, 74, }, /* 765 */ + { 35, 5, 12, 0, -48, 18432, 76, }, /* 766 */ + { 0, 9, 12, 0, -10743, 18432, 74, }, /* 767 */ + { 0, 9, 12, 0, -3814, 18432, 74, }, /* 768 */ + { 0, 9, 12, 0, -10727, 18432, 74, }, /* 769 */ + { 0, 5, 12, 0, -10795, 18432, 76, }, /* 770 */ + { 0, 5, 12, 0, -10792, 18432, 76, }, /* 771 */ + { 0, 9, 12, 0, -10780, 18432, 74, }, /* 772 */ + { 0, 9, 12, 0, -10749, 18432, 74, }, /* 773 */ + { 0, 9, 12, 0, -10783, 18432, 74, }, /* 774 */ + { 0, 9, 12, 0, -10782, 18432, 74, }, /* 775 */ + { 0, 9, 12, 0, -10815, 18432, 74, }, /* 776 */ + { 34, 5, 12, 0, 0, 18432, 60, }, /* 777 */ + { 34, 26, 12, 0, 0, 28672, 68, }, /* 778 */ + { 34, 12, 3, 0, 0, 26624, 96, }, /* 779 */ + { 34, 21, 12, 0, 0, 28672, 68, }, /* 780 */ + { 34, 15, 12, 0, 0, 28672, 68, }, /* 781 */ + { 17, 5, 12, 0, -7264, 18432, 76, }, /* 782 */ + { 90, 7, 12, 0, 0, 18432, 82, }, /* 783 */ + { 90, 6, 12, 0, 0, 18432, 142, }, /* 784 */ + { 90, 21, 12, 0, 0, 18432, 68, }, /* 785 */ + { 90, 12, 3, 0, 0, 26624, 182, }, /* 786 */ + { 2, 12, 3, 0, 0, 26624, 130, }, /* 787 */ + { 69, 20, 12, 0, 0, 28672, 216, }, /* 788 */ + { 69, 19, 12, 0, 0, 28672, 216, }, /* 789 */ + { 69, 6, 12, 0, 0, 28672, 274, }, /* 790 */ + { 69, 21, 12, 0, 0, 28672, 276, }, /* 791 */ + { 69, 21, 12, 0, 0, 28726, 54, }, /* 792 */ + { 23, 26, 12, 0, 0, 28672, 278, }, /* 793 */ + { 69, 26, 12, 0, 0, 28672, 280, }, /* 794 */ + { 69, 26, 12, 0, 0, 28672, 282, }, /* 795 */ + { 69, 21, 12, 0, 0, 28825, 276, }, /* 796 */ + { 69, 21, 12, 0, 0, 28825, 212, }, /* 797 */ + { 69, 21, 12, 0, 0, 28819, 54, }, /* 798 */ + { 23, 6, 12, 0, 0, 18432, 136, }, /* 799 */ + { 69, 7, 12, 0, 0, 18447, 284, }, /* 800 */ + { 23, 14, 12, 0, 0, 18432, 284, }, /* 801 */ + { 69, 22, 12, 0, 0, 28825, 216, }, /* 802 */ + { 69, 18, 12, 0, 0, 28825, 216, }, /* 803 */ + { 69, 22, 12, 0, 0, 28825, 62, }, /* 804 */ + { 69, 18, 12, 0, 0, 28825, 62, }, /* 805 */ + { 69, 26, 12, 0, 0, 28819, 54, }, /* 806 */ + { 69, 17, 12, 0, 0, 28819, 202, }, /* 807 */ + { 69, 22, 12, 0, 0, 28819, 206, }, /* 808 */ + { 69, 18, 12, 0, 0, 28819, 206, }, /* 809 */ + { 84, 12, 3, 0, 0, 26669, 96, }, /* 810 */ + { 18, 10, 3, 0, 0, 18432, 286, }, /* 811 */ + { 69, 17, 14, 0, 0, 28819, 288, }, /* 812 */ + { 69, 6, 12, 0, 0, 18525, 136, }, /* 813 */ + { 69, 26, 12, 0, 0, 28819, 68, }, /* 814 */ + { 23, 6, 12, 0, 0, 18432, 142, }, /* 815 */ + { 69, 7, 12, 0, 0, 18564, 82, }, /* 816 */ + { 69, 21, 14, 0, 0, 28804, 236, }, /* 817 */ + { 69, 26, 12, 0, 0, 28687, 68, }, /* 818 */ + { 20, 7, 12, 0, 0, 18432, 82, }, /* 819 */ + { 84, 12, 3, 0, 0, 26717, 96, }, /* 820 */ + { 69, 24, 12, 0, 0, 28765, 290, }, /* 821 */ + { 20, 6, 12, 0, 0, 18432, 136, }, /* 822 */ + { 69, 17, 12, 0, 0, 28765, 126, }, /* 823 */ + { 21, 7, 12, 0, 0, 18432, 82, }, /* 824 */ + { 69, 21, 12, 0, 0, 28825, 68, }, /* 825 */ + { 69, 6, 12, 0, 0, 18525, 94, }, /* 826 */ + { 21, 6, 12, 0, 0, 18432, 136, }, /* 827 */ + { 22, 7, 12, 0, 0, 18432, 82, }, /* 828 */ + { 18, 7, 12, 0, 0, 18432, 82, }, /* 829 */ + { 18, 7, 12, 0, 0, 18432, 168, }, /* 830 */ + { 69, 26, 12, 0, 0, 18447, 68, }, /* 831 */ + { 69, 15, 12, 0, 0, 18447, 68, }, /* 832 */ + { 18, 26, 12, 0, 0, 18432, 68, }, /* 833 */ + { 18, 26, 12, 0, 0, 28672, 68, }, /* 834 */ + { 69, 15, 12, 0, 0, 18432, 68, }, /* 835 */ + { 69, 26, 14, 0, 0, 18447, 236, }, /* 836 */ + { 21, 26, 12, 0, 0, 18432, 68, }, /* 837 */ + { 23, 7, 12, 0, 0, 18432, 292, }, /* 838 */ + { 24, 7, 12, 0, 0, 18432, 82, }, /* 839 */ + { 24, 6, 12, 0, 0, 18432, 136, }, /* 840 */ + { 24, 26, 12, 0, 0, 28672, 68, }, /* 841 */ + { 111, 7, 12, 0, 0, 18432, 82, }, /* 842 */ + { 111, 6, 12, 0, 0, 18432, 142, }, /* 843 */ + { 111, 21, 12, 0, 0, 18432, 106, }, /* 844 */ + { 111, 21, 12, 0, 0, 18432, 124, }, /* 845 */ + { 99, 7, 12, 0, 0, 18432, 82, }, /* 846 */ + { 99, 6, 12, 0, 0, 18432, 136, }, /* 847 */ + { 99, 21, 12, 0, 0, 28672, 106, }, /* 848 */ + { 99, 21, 12, 0, 0, 28672, 124, }, /* 849 */ + { 99, 13, 12, 0, 0, 18432, 138, }, /* 850 */ + { 2, 9, 12, 108, 1, 18432, 74, }, /* 851 */ + { 2, 5, 12, 108, -35267, 18432, 76, }, /* 852 */ + { 2, 7, 12, 0, 0, 18432, 82, }, /* 853 */ + { 2, 21, 12, 0, 0, 28672, 68, }, /* 854 */ + { 2, 12, 3, 0, 0, 26624, 96, }, /* 855 */ + { 2, 6, 12, 0, 0, 28672, 92, }, /* 856 */ + { 2, 6, 12, 0, 0, 18432, 88, }, /* 857 */ + { 112, 7, 12, 0, 0, 18432, 82, }, /* 858 */ + { 112, 14, 12, 0, 0, 18432, 82, }, /* 859 */ + { 112, 12, 3, 0, 0, 26624, 96, }, /* 860 */ + { 112, 21, 12, 0, 0, 18432, 68, }, /* 861 */ + { 112, 21, 12, 0, 0, 18432, 124, }, /* 862 */ + { 112, 21, 12, 0, 0, 18432, 106, }, /* 863 */ + { 69, 24, 12, 0, 0, 28762, 56, }, /* 864 */ + { 0, 9, 12, 0, -35332, 18432, 74, }, /* 865 */ + { 69, 24, 12, 0, 0, 18432, 56, }, /* 866 */ + { 0, 9, 12, 0, -42280, 18432, 74, }, /* 867 */ + { 0, 5, 12, 0, 48, 18432, 76, }, /* 868 */ + { 0, 9, 12, 0, -42308, 18432, 74, }, /* 869 */ + { 0, 9, 12, 0, -42319, 18432, 74, }, /* 870 */ + { 0, 9, 12, 0, -42315, 18432, 74, }, /* 871 */ + { 0, 9, 12, 0, -42305, 18432, 74, }, /* 872 */ + { 0, 9, 12, 0, -42258, 18432, 74, }, /* 873 */ + { 0, 9, 12, 0, -42282, 18432, 74, }, /* 874 */ + { 0, 9, 12, 0, -42261, 18432, 74, }, /* 875 */ + { 0, 9, 12, 0, 928, 18432, 74, }, /* 876 */ + { 0, 9, 12, 0, -48, 18432, 74, }, /* 877 */ + { 0, 9, 12, 0, -42307, 18432, 74, }, /* 878 */ + { 0, 9, 12, 0, -35384, 18432, 74, }, /* 879 */ + { 0, 6, 12, 0, 0, 18432, 142, }, /* 880 */ + { 36, 7, 12, 0, 0, 18432, 82, }, /* 881 */ + { 36, 12, 3, 0, 0, 26624, 130, }, /* 882 */ + { 36, 12, 3, 0, 0, 26624, 182, }, /* 883 */ + { 36, 10, 5, 0, 0, 18432, 144, }, /* 884 */ + { 36, 26, 12, 0, 0, 28672, 68, }, /* 885 */ + { 69, 15, 12, 0, 0, 18612, 68, }, /* 886 */ + { 69, 15, 12, 0, 0, 18609, 68, }, /* 887 */ + { 69, 26, 12, 0, 0, 18600, 68, }, /* 888 */ + { 69, 23, 12, 0, 0, 14504, 68, }, /* 889 */ + { 69, 26, 12, 0, 0, 14504, 68, }, /* 890 */ + { 37, 7, 12, 0, 0, 18432, 82, }, /* 891 */ + { 37, 21, 12, 0, 0, 28672, 68, }, /* 892 */ + { 37, 21, 12, 0, 0, 28672, 124, }, /* 893 */ + { 100, 10, 5, 0, 0, 18432, 144, }, /* 894 */ + { 100, 7, 12, 0, 0, 18432, 82, }, /* 895 */ + { 100, 12, 3, 0, 0, 26624, 146, }, /* 896 */ + { 100, 12, 3, 0, 0, 26624, 130, }, /* 897 */ + { 100, 21, 12, 0, 0, 18432, 124, }, /* 898 */ + { 100, 13, 12, 0, 0, 18432, 138, }, /* 899 */ + { 6, 12, 3, 0, 0, 26666, 96, }, /* 900 */ + { 6, 7, 12, 0, 0, 18507, 82, }, /* 901 */ + { 39, 13, 12, 0, 0, 18432, 138, }, /* 902 */ + { 39, 7, 12, 0, 0, 18432, 82, }, /* 903 */ + { 39, 12, 3, 0, 0, 26624, 130, }, /* 904 */ + { 39, 12, 3, 0, 0, 26624, 96, }, /* 905 */ + { 69, 21, 12, 0, 0, 18567, 188, }, /* 906 */ + { 39, 21, 12, 0, 0, 18432, 124, }, /* 907 */ + { 101, 7, 12, 0, 0, 18432, 82, }, /* 908 */ + { 101, 12, 3, 0, 0, 26624, 130, }, /* 909 */ + { 101, 10, 5, 0, 0, 18432, 144, }, /* 910 */ + { 101, 10, 5, 0, 0, 18432, 172, }, /* 911 */ + { 101, 21, 12, 0, 0, 18432, 68, }, /* 912 */ + { 40, 12, 3, 0, 0, 26624, 130, }, /* 913 */ + { 40, 10, 5, 0, 0, 18432, 144, }, /* 914 */ + { 40, 7, 12, 0, 0, 18432, 82, }, /* 915 */ + { 40, 12, 3, 0, 0, 26624, 96, }, /* 916 */ + { 40, 10, 5, 0, 0, 18432, 172, }, /* 917 */ + { 40, 21, 12, 0, 0, 18432, 68, }, /* 918 */ + { 40, 21, 12, 0, 0, 18432, 106, }, /* 919 */ + { 40, 21, 12, 0, 0, 18432, 124, }, /* 920 */ + { 69, 6, 12, 0, 0, 18480, 136, }, /* 921 */ + { 40, 13, 12, 0, 0, 18432, 138, }, /* 922 */ + { 16, 6, 12, 0, 0, 18432, 136, }, /* 923 */ + { 105, 7, 12, 0, 0, 18432, 82, }, /* 924 */ + { 105, 12, 3, 0, 0, 26624, 130, }, /* 925 */ + { 105, 10, 5, 0, 0, 18432, 144, }, /* 926 */ + { 105, 13, 12, 0, 0, 18432, 138, }, /* 927 */ + { 105, 21, 12, 0, 0, 18432, 68, }, /* 928 */ + { 105, 21, 12, 0, 0, 18432, 124, }, /* 929 */ + { 107, 7, 12, 0, 0, 18432, 82, }, /* 930 */ + { 107, 12, 3, 0, 0, 26624, 130, }, /* 931 */ + { 107, 7, 12, 0, 0, 18432, 156, }, /* 932 */ + { 107, 12, 3, 0, 0, 26624, 96, }, /* 933 */ + { 107, 7, 12, 0, 0, 18432, 294, }, /* 934 */ + { 107, 6, 12, 0, 0, 18432, 136, }, /* 935 */ + { 107, 21, 12, 0, 0, 18432, 68, }, /* 936 */ + { 107, 21, 12, 0, 0, 18432, 106, }, /* 937 */ + { 113, 7, 12, 0, 0, 18432, 82, }, /* 938 */ + { 113, 10, 5, 0, 0, 18432, 144, }, /* 939 */ + { 113, 12, 3, 0, 0, 26624, 130, }, /* 940 */ + { 113, 21, 12, 0, 0, 18432, 124, }, /* 941 */ + { 113, 6, 12, 0, 0, 18432, 136, }, /* 942 */ + { 113, 12, 3, 0, 0, 26624, 146, }, /* 943 */ + { 0, 5, 12, 0, -928, 18432, 76, }, /* 944 */ + { 0, 6, 12, 0, 0, 18432, 92, }, /* 945 */ + { 76, 5, 12, 0, -38864, 18432, 70, }, /* 946 */ + { 113, 10, 5, 0, 0, 18432, 160, }, /* 947 */ + { 113, 13, 12, 0, 0, 18432, 138, }, /* 948 */ + { 18, 7, 9, 0, 0, 18432, 82, }, /* 949 */ + { 18, 7, 10, 0, 0, 18432, 82, }, /* 950 */ + { 68, 4, 12, 0, 0, 18432, 0, }, /* 951 */ + { 68, 3, 12, 0, 0, 18432, 0, }, /* 952 */ + { 23, 7, 12, 0, 0, 18432, 284, }, /* 953 */ + { 71, 25, 12, 0, 0, 12288, 118, }, /* 954 */ + { 3, 7, 12, 0, 0, 0, 296, }, /* 955 */ + { 69, 18, 12, 0, 0, 28705, 54, }, /* 956 */ + { 69, 22, 12, 0, 0, 28705, 54, }, /* 957 */ + { 68, 2, 12, 0, 0, 6144, 298, }, /* 958 */ + { 3, 7, 12, 0, 0, 39, 82, }, /* 959 */ + { 3, 26, 12, 0, 0, 28711, 68, }, /* 960 */ + { 84, 12, 3, 0, 0, 26624, 178, }, /* 961 */ + { 84, 12, 3, 0, 0, 26624, 300, }, /* 962 */ + { 69, 21, 12, 0, 0, 28672, 68, }, /* 963 */ + { 69, 21, 12, 0, 0, 28672, 122, }, /* 964 */ + { 69, 22, 12, 0, 0, 28672, 68, }, /* 965 */ + { 69, 18, 12, 0, 0, 28672, 68, }, /* 966 */ + { 69, 17, 12, 0, 0, 28672, 126, }, /* 967 */ + { 69, 22, 12, 0, 0, 28672, 302, }, /* 968 */ + { 69, 18, 12, 0, 0, 28672, 302, }, /* 969 */ + { 69, 21, 12, 0, 0, 8192, 106, }, /* 970 */ + { 69, 21, 12, 0, 0, 8192, 304, }, /* 971 */ + { 69, 21, 12, 0, 0, 8192, 306, }, /* 972 */ + { 69, 21, 12, 0, 0, 28672, 124, }, /* 973 */ + { 69, 22, 12, 0, 0, 28672, 158, }, /* 974 */ + { 69, 18, 12, 0, 0, 28672, 158, }, /* 975 */ + { 69, 21, 12, 0, 0, 14336, 68, }, /* 976 */ + { 69, 21, 12, 0, 0, 28672, 118, }, /* 977 */ + { 69, 17, 12, 0, 0, 12288, 224, }, /* 978 */ + { 69, 25, 12, 0, 0, 28672, 226, }, /* 979 */ + { 69, 21, 12, 0, 0, 28672, 302, }, /* 980 */ + { 69, 21, 12, 0, 0, 28672, 308, }, /* 981 */ + { 69, 17, 12, 0, 0, 12288, 126, }, /* 982 */ + { 69, 21, 12, 0, 0, 8192, 68, }, /* 983 */ + { 69, 13, 12, 0, 0, 10240, 310, }, /* 984 */ + { 0, 9, 12, 0, 32, 18432, 312, }, /* 985 */ + { 69, 24, 12, 0, 0, 28672, 314, }, /* 986 */ + { 0, 5, 12, 0, -32, 18432, 316, }, /* 987 */ + { 69, 21, 12, 0, 0, 28825, 124, }, /* 988 */ + { 69, 22, 12, 0, 0, 28825, 318, }, /* 989 */ + { 69, 18, 12, 0, 0, 28825, 318, }, /* 990 */ + { 69, 21, 12, 0, 0, 28825, 106, }, /* 991 */ + { 69, 6, 3, 0, 0, 18525, 320, }, /* 992 */ + { 69, 1, 2, 0, 0, 28672, 322, }, /* 993 */ + { 31, 7, 12, 0, 0, 18432, 82, }, /* 994 */ + { 69, 21, 12, 0, 0, 18552, 68, }, /* 995 */ + { 69, 21, 12, 0, 0, 28792, 68, }, /* 996 */ + { 69, 21, 12, 0, 0, 18483, 68, }, /* 997 */ + { 69, 15, 12, 0, 0, 18555, 68, }, /* 998 */ + { 69, 26, 12, 0, 0, 18483, 68, }, /* 999 */ + { 1, 14, 12, 0, 0, 28672, 82, }, /* 1000 */ + { 1, 15, 12, 0, 0, 28672, 68, }, /* 1001 */ + { 1, 26, 12, 0, 0, 28672, 68, }, /* 1002 */ + { 1, 26, 12, 0, 0, 18432, 68, }, /* 1003 */ + { 102, 7, 12, 0, 0, 18432, 82, }, /* 1004 */ + { 103, 7, 12, 0, 0, 18432, 82, }, /* 1005 */ + { 84, 12, 3, 0, 0, 26651, 96, }, /* 1006 */ + { 69, 15, 12, 0, 0, 10267, 68, }, /* 1007 */ + { 81, 7, 12, 0, 0, 18432, 82, }, /* 1008 */ + { 81, 15, 12, 0, 0, 18432, 68, }, /* 1009 */ + { 82, 7, 12, 0, 0, 18432, 82, }, /* 1010 */ + { 82, 14, 12, 0, 0, 18432, 82, }, /* 1011 */ + { 53, 7, 12, 0, 0, 18432, 82, }, /* 1012 */ + { 53, 12, 3, 0, 0, 26624, 130, }, /* 1013 */ + { 85, 7, 12, 0, 0, 18432, 82, }, /* 1014 */ + { 85, 21, 12, 0, 0, 18432, 106, }, /* 1015 */ + { 91, 7, 12, 0, 0, 18432, 82, }, /* 1016 */ + { 91, 21, 12, 0, 0, 18432, 106, }, /* 1017 */ + { 91, 14, 12, 0, 0, 18432, 82, }, /* 1018 */ + { 83, 9, 12, 0, 40, 18432, 74, }, /* 1019 */ + { 83, 5, 12, 0, -40, 18432, 76, }, /* 1020 */ + { 86, 7, 12, 0, 0, 18432, 82, }, /* 1021 */ + { 87, 7, 12, 0, 0, 18432, 82, }, /* 1022 */ + { 87, 13, 12, 0, 0, 18432, 138, }, /* 1023 */ + { 145, 9, 12, 0, 40, 18432, 74, }, /* 1024 */ + { 145, 5, 12, 0, -40, 18432, 76, }, /* 1025 */ + { 127, 7, 12, 0, 0, 18432, 82, }, /* 1026 */ + { 125, 7, 12, 0, 0, 18432, 82, }, /* 1027 */ + { 125, 21, 12, 0, 0, 18432, 68, }, /* 1028 */ + { 161, 9, 12, 0, 39, 18432, 74, }, /* 1029 */ + { 161, 5, 12, 0, -39, 18432, 76, }, /* 1030 */ + { 49, 7, 12, 0, 0, 18432, 82, }, /* 1031 */ + { 0, 6, 12, 0, 0, 18432, 94, }, /* 1032 */ + { 32, 7, 12, 0, 0, 34816, 82, }, /* 1033 */ + { 114, 7, 12, 0, 0, 34816, 82, }, /* 1034 */ + { 114, 21, 12, 0, 0, 34816, 106, }, /* 1035 */ + { 114, 15, 12, 0, 0, 34816, 68, }, /* 1036 */ + { 133, 7, 12, 0, 0, 34816, 82, }, /* 1037 */ + { 133, 26, 12, 0, 0, 34816, 68, }, /* 1038 */ + { 133, 15, 12, 0, 0, 34816, 68, }, /* 1039 */ + { 132, 7, 12, 0, 0, 34816, 82, }, /* 1040 */ + { 132, 15, 12, 0, 0, 34816, 68, }, /* 1041 */ + { 139, 7, 12, 0, 0, 34816, 82, }, /* 1042 */ + { 139, 15, 12, 0, 0, 34816, 68, }, /* 1043 */ + { 95, 7, 12, 0, 0, 34816, 82, }, /* 1044 */ + { 95, 15, 12, 0, 0, 34816, 68, }, /* 1045 */ + { 95, 21, 12, 0, 0, 28672, 106, }, /* 1046 */ + { 104, 7, 12, 0, 0, 34816, 82, }, /* 1047 */ + { 104, 21, 12, 0, 0, 34816, 68, }, /* 1048 */ + { 122, 7, 12, 0, 0, 34816, 82, }, /* 1049 */ + { 121, 7, 12, 0, 0, 34816, 82, }, /* 1050 */ + { 121, 15, 12, 0, 0, 34816, 68, }, /* 1051 */ + { 92, 7, 12, 0, 0, 34816, 82, }, /* 1052 */ + { 92, 12, 3, 0, 0, 26624, 130, }, /* 1053 */ + { 92, 12, 3, 0, 0, 26624, 102, }, /* 1054 */ + { 92, 12, 3, 0, 0, 26624, 182, }, /* 1055 */ + { 92, 15, 12, 0, 0, 34816, 68, }, /* 1056 */ + { 92, 21, 12, 0, 0, 34816, 68, }, /* 1057 */ + { 92, 21, 12, 0, 0, 34816, 124, }, /* 1058 */ + { 115, 7, 12, 0, 0, 34816, 82, }, /* 1059 */ + { 115, 15, 12, 0, 0, 34816, 68, }, /* 1060 */ + { 115, 21, 12, 0, 0, 34816, 68, }, /* 1061 */ + { 131, 7, 12, 0, 0, 34816, 82, }, /* 1062 */ + { 131, 15, 12, 0, 0, 34816, 68, }, /* 1063 */ + { 51, 7, 12, 0, 0, 34816, 82, }, /* 1064 */ + { 51, 26, 12, 0, 0, 34816, 68, }, /* 1065 */ + { 51, 12, 3, 0, 0, 26624, 96, }, /* 1066 */ + { 51, 15, 12, 0, 0, 34816, 68, }, /* 1067 */ + { 51, 21, 12, 0, 0, 34816, 106, }, /* 1068 */ + { 51, 21, 12, 0, 0, 34918, 106, }, /* 1069 */ + { 51, 21, 12, 0, 0, 34816, 68, }, /* 1070 */ + { 108, 7, 12, 0, 0, 34816, 82, }, /* 1071 */ + { 108, 21, 12, 0, 0, 28672, 68, }, /* 1072 */ + { 108, 21, 12, 0, 0, 28672, 106, }, /* 1073 */ + { 116, 7, 12, 0, 0, 34816, 82, }, /* 1074 */ + { 116, 15, 12, 0, 0, 34816, 68, }, /* 1075 */ + { 117, 7, 12, 0, 0, 34816, 82, }, /* 1076 */ + { 117, 15, 12, 0, 0, 34816, 68, }, /* 1077 */ + { 54, 7, 12, 0, 0, 34816, 82, }, /* 1078 */ + { 54, 21, 12, 0, 0, 34816, 106, }, /* 1079 */ + { 54, 15, 12, 0, 0, 34816, 68, }, /* 1080 */ + { 118, 7, 12, 0, 0, 34816, 82, }, /* 1081 */ + { 140, 9, 12, 0, 64, 34816, 74, }, /* 1082 */ + { 140, 5, 12, 0, -64, 34816, 76, }, /* 1083 */ + { 140, 15, 12, 0, 0, 34816, 68, }, /* 1084 */ + { 62, 7, 12, 0, 0, 0, 82, }, /* 1085 */ + { 62, 7, 12, 0, 0, 0, 294, }, /* 1086 */ + { 62, 12, 3, 0, 0, 26624, 128, }, /* 1087 */ + { 62, 13, 12, 0, 0, 2048, 138, }, /* 1088 */ + { 3, 15, 12, 0, 0, 2048, 68, }, /* 1089 */ + { 65, 7, 12, 0, 0, 34816, 82, }, /* 1090 */ + { 65, 12, 3, 0, 0, 26624, 130, }, /* 1091 */ + { 65, 17, 12, 0, 0, 34816, 126, }, /* 1092 */ + { 152, 7, 12, 0, 0, 34816, 82, }, /* 1093 */ + { 152, 15, 12, 0, 0, 34816, 68, }, /* 1094 */ + { 63, 7, 12, 0, 0, 0, 82, }, /* 1095 */ + { 63, 12, 3, 0, 0, 26624, 96, }, /* 1096 */ + { 63, 15, 12, 0, 0, 0, 68, }, /* 1097 */ + { 63, 21, 12, 0, 0, 0, 124, }, /* 1098 */ + { 67, 7, 12, 0, 0, 34816, 82, }, /* 1099 */ + { 67, 12, 3, 0, 0, 26624, 96, }, /* 1100 */ + { 67, 21, 12, 0, 0, 34816, 124, }, /* 1101 */ + { 156, 7, 12, 0, 0, 34816, 82, }, /* 1102 */ + { 156, 15, 12, 0, 0, 34816, 68, }, /* 1103 */ + { 153, 7, 12, 0, 0, 34816, 82, }, /* 1104 */ + { 120, 10, 5, 0, 0, 18432, 144, }, /* 1105 */ + { 120, 12, 3, 0, 0, 26624, 130, }, /* 1106 */ + { 120, 7, 12, 0, 0, 18432, 82, }, /* 1107 */ + { 120, 12, 3, 0, 0, 26624, 146, }, /* 1108 */ + { 120, 21, 12, 0, 0, 18432, 124, }, /* 1109 */ + { 120, 21, 12, 0, 0, 18432, 106, }, /* 1110 */ + { 120, 15, 12, 0, 0, 28672, 68, }, /* 1111 */ + { 120, 13, 12, 0, 0, 18432, 138, }, /* 1112 */ + { 120, 12, 3, 0, 0, 26624, 182, }, /* 1113 */ + { 41, 12, 3, 0, 0, 26624, 102, }, /* 1114 */ + { 41, 10, 5, 0, 0, 18432, 144, }, /* 1115 */ + { 41, 7, 12, 0, 0, 18432, 82, }, /* 1116 */ + { 41, 12, 3, 0, 0, 26624, 130, }, /* 1117 */ + { 41, 12, 3, 0, 0, 26624, 146, }, /* 1118 */ + { 41, 12, 3, 0, 0, 26624, 96, }, /* 1119 */ + { 41, 21, 12, 0, 0, 18432, 68, }, /* 1120 */ + { 41, 1, 4, 0, 0, 18432, 132, }, /* 1121 */ + { 41, 21, 12, 0, 0, 18432, 124, }, /* 1122 */ + { 124, 7, 12, 0, 0, 18432, 82, }, /* 1123 */ + { 124, 13, 12, 0, 0, 18432, 138, }, /* 1124 */ + { 43, 12, 3, 0, 0, 26624, 130, }, /* 1125 */ + { 43, 7, 12, 0, 0, 18432, 82, }, /* 1126 */ + { 43, 10, 5, 0, 0, 18432, 144, }, /* 1127 */ + { 43, 12, 3, 0, 0, 26624, 146, }, /* 1128 */ + { 43, 13, 12, 0, 0, 18432, 138, }, /* 1129 */ + { 43, 21, 12, 0, 0, 18432, 68, }, /* 1130 */ + { 43, 21, 12, 0, 0, 18432, 124, }, /* 1131 */ + { 50, 7, 12, 0, 0, 18432, 82, }, /* 1132 */ + { 50, 12, 3, 0, 0, 26624, 96, }, /* 1133 */ + { 50, 21, 12, 0, 0, 18432, 68, }, /* 1134 */ + { 44, 12, 3, 0, 0, 26624, 130, }, /* 1135 */ + { 44, 10, 5, 0, 0, 18432, 144, }, /* 1136 */ + { 44, 7, 12, 0, 0, 18432, 82, }, /* 1137 */ + { 44, 10, 5, 0, 0, 18432, 172, }, /* 1138 */ + { 44, 7, 4, 0, 0, 18432, 82, }, /* 1139 */ + { 44, 21, 12, 0, 0, 18432, 124, }, /* 1140 */ + { 44, 21, 12, 0, 0, 18432, 68, }, /* 1141 */ + { 44, 12, 3, 0, 0, 26624, 102, }, /* 1142 */ + { 44, 12, 3, 0, 0, 26624, 96, }, /* 1143 */ + { 44, 13, 12, 0, 0, 18432, 138, }, /* 1144 */ + { 15, 15, 12, 0, 0, 18432, 68, }, /* 1145 */ + { 48, 7, 12, 0, 0, 18432, 82, }, /* 1146 */ + { 48, 10, 5, 0, 0, 18432, 144, }, /* 1147 */ + { 48, 12, 3, 0, 0, 26624, 130, }, /* 1148 */ + { 48, 10, 5, 0, 0, 18432, 172, }, /* 1149 */ + { 48, 12, 3, 0, 0, 26624, 96, }, /* 1150 */ + { 48, 21, 12, 0, 0, 18432, 124, }, /* 1151 */ + { 48, 21, 12, 0, 0, 18432, 106, }, /* 1152 */ + { 48, 21, 12, 0, 0, 18432, 68, }, /* 1153 */ + { 57, 7, 12, 0, 0, 18432, 82, }, /* 1154 */ + { 57, 21, 12, 0, 0, 18432, 124, }, /* 1155 */ + { 55, 7, 12, 0, 0, 18432, 82, }, /* 1156 */ + { 55, 12, 3, 0, 0, 26624, 130, }, /* 1157 */ + { 55, 10, 5, 0, 0, 18432, 144, }, /* 1158 */ + { 55, 12, 3, 0, 0, 26624, 96, }, /* 1159 */ + { 55, 12, 3, 0, 0, 26624, 146, }, /* 1160 */ + { 55, 13, 12, 0, 0, 18432, 138, }, /* 1161 */ + { 47, 12, 3, 0, 0, 26624, 130, }, /* 1162 */ + { 47, 12, 3, 0, 0, 26705, 130, }, /* 1163 */ + { 47, 10, 5, 0, 0, 18432, 144, }, /* 1164 */ + { 47, 10, 5, 0, 0, 18513, 144, }, /* 1165 */ + { 47, 7, 12, 0, 0, 18432, 82, }, /* 1166 */ + { 84, 12, 3, 0, 0, 26705, 102, }, /* 1167 */ + { 47, 12, 3, 0, 0, 26705, 96, }, /* 1168 */ + { 47, 10, 3, 0, 0, 18432, 148, }, /* 1169 */ + { 47, 10, 5, 0, 0, 18432, 172, }, /* 1170 */ + { 47, 7, 12, 0, 0, 18432, 324, }, /* 1171 */ + { 47, 12, 3, 0, 0, 26624, 96, }, /* 1172 */ + { 144, 7, 12, 0, 0, 18432, 82, }, /* 1173 */ + { 144, 10, 5, 0, 0, 18432, 144, }, /* 1174 */ + { 144, 12, 3, 0, 0, 26624, 130, }, /* 1175 */ + { 144, 12, 3, 0, 0, 26624, 146, }, /* 1176 */ + { 144, 12, 3, 0, 0, 26624, 96, }, /* 1177 */ + { 144, 21, 12, 0, 0, 18432, 124, }, /* 1178 */ + { 144, 21, 12, 0, 0, 18432, 106, }, /* 1179 */ + { 144, 21, 12, 0, 0, 18432, 68, }, /* 1180 */ + { 144, 13, 12, 0, 0, 18432, 138, }, /* 1181 */ + { 144, 12, 3, 0, 0, 26624, 102, }, /* 1182 */ + { 56, 7, 12, 0, 0, 18432, 82, }, /* 1183 */ + { 56, 10, 3, 0, 0, 18432, 148, }, /* 1184 */ + { 56, 10, 5, 0, 0, 18432, 144, }, /* 1185 */ + { 56, 12, 3, 0, 0, 26624, 130, }, /* 1186 */ + { 56, 12, 3, 0, 0, 26624, 146, }, /* 1187 */ + { 56, 12, 3, 0, 0, 26624, 96, }, /* 1188 */ + { 56, 21, 12, 0, 0, 18432, 68, }, /* 1189 */ + { 56, 13, 12, 0, 0, 18432, 138, }, /* 1190 */ + { 135, 7, 12, 0, 0, 18432, 82, }, /* 1191 */ + { 135, 10, 3, 0, 0, 18432, 148, }, /* 1192 */ + { 135, 10, 5, 0, 0, 18432, 144, }, /* 1193 */ + { 135, 12, 3, 0, 0, 26624, 130, }, /* 1194 */ + { 135, 12, 3, 0, 0, 26624, 146, }, /* 1195 */ + { 135, 12, 3, 0, 0, 26624, 96, }, /* 1196 */ + { 135, 21, 12, 0, 0, 18432, 68, }, /* 1197 */ + { 135, 21, 12, 0, 0, 18432, 124, }, /* 1198 */ + { 135, 21, 12, 0, 0, 18432, 106, }, /* 1199 */ + { 135, 21, 12, 0, 0, 18432, 176, }, /* 1200 */ + { 52, 7, 12, 0, 0, 18432, 82, }, /* 1201 */ + { 52, 10, 5, 0, 0, 18432, 144, }, /* 1202 */ + { 52, 12, 3, 0, 0, 26624, 130, }, /* 1203 */ + { 52, 12, 3, 0, 0, 26624, 146, }, /* 1204 */ + { 52, 21, 12, 0, 0, 18432, 124, }, /* 1205 */ + { 52, 21, 12, 0, 0, 18432, 68, }, /* 1206 */ + { 52, 13, 12, 0, 0, 18432, 138, }, /* 1207 */ + { 45, 7, 12, 0, 0, 18432, 82, }, /* 1208 */ + { 45, 12, 3, 0, 0, 26624, 130, }, /* 1209 */ + { 45, 10, 5, 0, 0, 18432, 144, }, /* 1210 */ + { 45, 10, 5, 0, 0, 18432, 172, }, /* 1211 */ + { 45, 12, 3, 0, 0, 26624, 96, }, /* 1212 */ + { 45, 21, 12, 0, 0, 18432, 68, }, /* 1213 */ + { 45, 13, 12, 0, 0, 18432, 138, }, /* 1214 */ + { 137, 7, 12, 0, 0, 18432, 82, }, /* 1215 */ + { 137, 12, 3, 0, 0, 26624, 130, }, /* 1216 */ + { 137, 10, 12, 0, 0, 18432, 144, }, /* 1217 */ + { 137, 10, 5, 0, 0, 18432, 144, }, /* 1218 */ + { 137, 12, 3, 0, 0, 26624, 146, }, /* 1219 */ + { 137, 13, 12, 0, 0, 18432, 138, }, /* 1220 */ + { 137, 15, 12, 0, 0, 18432, 68, }, /* 1221 */ + { 137, 21, 12, 0, 0, 18432, 124, }, /* 1222 */ + { 137, 26, 12, 0, 0, 18432, 68, }, /* 1223 */ + { 60, 7, 12, 0, 0, 18432, 82, }, /* 1224 */ + { 60, 10, 5, 0, 0, 18432, 144, }, /* 1225 */ + { 60, 12, 3, 0, 0, 26624, 130, }, /* 1226 */ + { 60, 12, 3, 0, 0, 26624, 146, }, /* 1227 */ + { 60, 12, 3, 0, 0, 26624, 96, }, /* 1228 */ + { 60, 21, 12, 0, 0, 18432, 68, }, /* 1229 */ + { 136, 9, 12, 0, 32, 18432, 74, }, /* 1230 */ + { 136, 5, 12, 0, -32, 18432, 76, }, /* 1231 */ + { 136, 13, 12, 0, 0, 18432, 138, }, /* 1232 */ + { 136, 15, 12, 0, 0, 18432, 68, }, /* 1233 */ + { 136, 7, 12, 0, 0, 18432, 82, }, /* 1234 */ + { 157, 7, 12, 0, 0, 18432, 82, }, /* 1235 */ + { 157, 10, 3, 0, 0, 18432, 148, }, /* 1236 */ + { 157, 10, 5, 0, 0, 18432, 144, }, /* 1237 */ + { 157, 12, 3, 0, 0, 26624, 130, }, /* 1238 */ + { 157, 10, 5, 0, 0, 18432, 172, }, /* 1239 */ + { 157, 12, 3, 0, 0, 26624, 146, }, /* 1240 */ + { 157, 7, 4, 0, 0, 18432, 82, }, /* 1241 */ + { 157, 12, 3, 0, 0, 26624, 96, }, /* 1242 */ + { 157, 21, 12, 0, 0, 18432, 124, }, /* 1243 */ + { 157, 21, 12, 0, 0, 18432, 68, }, /* 1244 */ + { 157, 13, 12, 0, 0, 18432, 138, }, /* 1245 */ + { 64, 7, 12, 0, 0, 18432, 82, }, /* 1246 */ + { 64, 10, 5, 0, 0, 18432, 144, }, /* 1247 */ + { 64, 12, 3, 0, 0, 26624, 130, }, /* 1248 */ + { 64, 12, 3, 0, 0, 26624, 146, }, /* 1249 */ + { 64, 21, 12, 0, 0, 18432, 68, }, /* 1250 */ + { 149, 7, 12, 0, 0, 18432, 82, }, /* 1251 */ + { 149, 12, 3, 0, 0, 26624, 130, }, /* 1252 */ + { 149, 12, 3, 0, 0, 18432, 130, }, /* 1253 */ + { 149, 12, 3, 0, 0, 26624, 102, }, /* 1254 */ + { 149, 12, 3, 0, 0, 26624, 146, }, /* 1255 */ + { 149, 10, 5, 0, 0, 18432, 144, }, /* 1256 */ + { 149, 7, 4, 0, 0, 18432, 82, }, /* 1257 */ + { 149, 21, 12, 0, 0, 18432, 68, }, /* 1258 */ + { 149, 21, 12, 0, 0, 18432, 124, }, /* 1259 */ + { 148, 7, 12, 0, 0, 18432, 82, }, /* 1260 */ + { 148, 12, 3, 0, 0, 26624, 130, }, /* 1261 */ + { 148, 10, 5, 0, 0, 18432, 144, }, /* 1262 */ + { 148, 7, 4, 0, 0, 18432, 82, }, /* 1263 */ + { 148, 12, 3, 0, 0, 26624, 326, }, /* 1264 */ + { 148, 12, 3, 0, 0, 26624, 146, }, /* 1265 */ + { 148, 21, 12, 0, 0, 18432, 68, }, /* 1266 */ + { 148, 21, 12, 0, 0, 18432, 124, }, /* 1267 */ + { 148, 21, 12, 0, 0, 18432, 106, }, /* 1268 */ + { 134, 7, 12, 0, 0, 18432, 82, }, /* 1269 */ + { 142, 7, 12, 0, 0, 18432, 82, }, /* 1270 */ + { 142, 10, 5, 0, 0, 18432, 144, }, /* 1271 */ + { 142, 12, 3, 0, 0, 26624, 130, }, /* 1272 */ + { 142, 12, 3, 0, 0, 18432, 146, }, /* 1273 */ + { 142, 21, 12, 0, 0, 18432, 124, }, /* 1274 */ + { 142, 21, 12, 0, 0, 18432, 106, }, /* 1275 */ + { 142, 21, 12, 0, 0, 18432, 68, }, /* 1276 */ + { 142, 13, 12, 0, 0, 18432, 138, }, /* 1277 */ + { 142, 15, 12, 0, 0, 18432, 68, }, /* 1278 */ + { 143, 21, 12, 0, 0, 18432, 68, }, /* 1279 */ + { 143, 21, 12, 0, 0, 18432, 106, }, /* 1280 */ + { 143, 7, 12, 0, 0, 18432, 82, }, /* 1281 */ + { 143, 12, 3, 0, 0, 26624, 130, }, /* 1282 */ + { 143, 10, 5, 0, 0, 18432, 144, }, /* 1283 */ + { 59, 7, 12, 0, 0, 18432, 82, }, /* 1284 */ + { 59, 12, 3, 0, 0, 26624, 130, }, /* 1285 */ + { 59, 12, 3, 0, 0, 26624, 96, }, /* 1286 */ + { 59, 12, 3, 0, 0, 26624, 146, }, /* 1287 */ + { 59, 7, 4, 0, 0, 18432, 82, }, /* 1288 */ + { 59, 13, 12, 0, 0, 18432, 138, }, /* 1289 */ + { 61, 7, 12, 0, 0, 18432, 82, }, /* 1290 */ + { 61, 10, 5, 0, 0, 18432, 144, }, /* 1291 */ + { 61, 12, 3, 0, 0, 26624, 130, }, /* 1292 */ + { 61, 12, 3, 0, 0, 26624, 146, }, /* 1293 */ + { 61, 13, 12, 0, 0, 18432, 138, }, /* 1294 */ + { 150, 7, 12, 0, 0, 18432, 82, }, /* 1295 */ + { 150, 12, 3, 0, 0, 26624, 130, }, /* 1296 */ + { 150, 10, 5, 0, 0, 18432, 144, }, /* 1297 */ + { 150, 21, 12, 0, 0, 18432, 124, }, /* 1298 */ + { 11, 15, 12, 0, 0, 18432, 68, }, /* 1299 */ + { 11, 21, 12, 0, 0, 18432, 68, }, /* 1300 */ + { 94, 7, 12, 0, 0, 18432, 82, }, /* 1301 */ + { 94, 14, 12, 0, 0, 18432, 82, }, /* 1302 */ + { 94, 21, 12, 0, 0, 18432, 106, }, /* 1303 */ + { 66, 7, 12, 0, 0, 18432, 82, }, /* 1304 */ + { 66, 21, 12, 0, 0, 18432, 68, }, /* 1305 */ + { 109, 7, 12, 0, 0, 18432, 82, }, /* 1306 */ + { 109, 1, 2, 0, 0, 18432, 322, }, /* 1307 */ + { 138, 7, 12, 0, 0, 18432, 82, }, /* 1308 */ + { 130, 7, 12, 0, 0, 18432, 82, }, /* 1309 */ + { 130, 13, 12, 0, 0, 18432, 138, }, /* 1310 */ + { 130, 21, 12, 0, 0, 18432, 124, }, /* 1311 */ + { 159, 7, 12, 0, 0, 18432, 82, }, /* 1312 */ + { 159, 13, 12, 0, 0, 18432, 138, }, /* 1313 */ + { 126, 7, 12, 0, 0, 18432, 82, }, /* 1314 */ + { 126, 12, 3, 0, 0, 26624, 96, }, /* 1315 */ + { 126, 21, 12, 0, 0, 18432, 124, }, /* 1316 */ + { 128, 7, 12, 0, 0, 18432, 82, }, /* 1317 */ + { 128, 12, 3, 0, 0, 26624, 96, }, /* 1318 */ + { 128, 21, 12, 0, 0, 18432, 124, }, /* 1319 */ + { 128, 21, 12, 0, 0, 18432, 106, }, /* 1320 */ + { 128, 21, 12, 0, 0, 18432, 68, }, /* 1321 */ + { 128, 26, 12, 0, 0, 18432, 68, }, /* 1322 */ + { 128, 6, 12, 0, 0, 18432, 142, }, /* 1323 */ + { 128, 6, 12, 0, 0, 18432, 136, }, /* 1324 */ + { 128, 13, 12, 0, 0, 18432, 138, }, /* 1325 */ + { 128, 15, 12, 0, 0, 18432, 68, }, /* 1326 */ + { 151, 9, 12, 0, 32, 18432, 74, }, /* 1327 */ + { 151, 5, 12, 0, -32, 18432, 76, }, /* 1328 */ + { 151, 15, 12, 0, 0, 18432, 68, }, /* 1329 */ + { 151, 21, 12, 0, 0, 18432, 106, }, /* 1330 */ + { 151, 21, 12, 0, 0, 18432, 124, }, /* 1331 */ + { 151, 21, 12, 0, 0, 18432, 68, }, /* 1332 */ + { 123, 7, 12, 0, 0, 18432, 82, }, /* 1333 */ + { 123, 12, 3, 0, 0, 26624, 130, }, /* 1334 */ + { 123, 10, 5, 0, 0, 18432, 144, }, /* 1335 */ + { 123, 12, 3, 0, 0, 26624, 128, }, /* 1336 */ + { 123, 6, 12, 0, 0, 18432, 92, }, /* 1337 */ + { 146, 6, 12, 0, 0, 18432, 136, }, /* 1338 */ + { 147, 6, 12, 0, 0, 18432, 136, }, /* 1339 */ + { 23, 21, 12, 0, 0, 28672, 68, }, /* 1340 */ + { 158, 12, 3, 0, 0, 26624, 328, }, /* 1341 */ + { 23, 10, 5, 0, 0, 18432, 164, }, /* 1342 */ + { 146, 7, 12, 0, 0, 18432, 284, }, /* 1343 */ + { 158, 7, 12, 0, 0, 18432, 284, }, /* 1344 */ + { 21, 6, 12, 0, 0, 18432, 92, }, /* 1345 */ + { 147, 7, 12, 0, 0, 18432, 284, }, /* 1346 */ + { 46, 7, 12, 0, 0, 18432, 82, }, /* 1347 */ + { 46, 26, 12, 0, 0, 18432, 68, }, /* 1348 */ + { 46, 12, 3, 0, 0, 26624, 102, }, /* 1349 */ + { 46, 12, 3, 0, 0, 26624, 130, }, /* 1350 */ + { 46, 21, 12, 0, 0, 18432, 124, }, /* 1351 */ + { 69, 1, 2, 0, 0, 6153, 66, }, /* 1352 */ + { 69, 10, 3, 0, 0, 18432, 330, }, /* 1353 */ + { 69, 10, 5, 0, 0, 18432, 138, }, /* 1354 */ + { 69, 10, 5, 0, 0, 18432, 160, }, /* 1355 */ + { 69, 10, 3, 0, 0, 18432, 286, }, /* 1356 */ + { 1, 12, 3, 0, 0, 26624, 102, }, /* 1357 */ + { 69, 25, 12, 0, 0, 18432, 118, }, /* 1358 */ + { 69, 13, 12, 0, 0, 10240, 214, }, /* 1359 */ + { 141, 26, 12, 0, 0, 18432, 68, }, /* 1360 */ + { 141, 12, 3, 0, 0, 26624, 102, }, /* 1361 */ + { 141, 21, 12, 0, 0, 18432, 106, }, /* 1362 */ + { 141, 21, 12, 0, 0, 18432, 124, }, /* 1363 */ + { 141, 21, 12, 0, 0, 18432, 68, }, /* 1364 */ + { 35, 12, 3, 0, 0, 26624, 130, }, /* 1365 */ + { 154, 7, 12, 0, 0, 18432, 82, }, /* 1366 */ + { 154, 12, 3, 0, 0, 26624, 96, }, /* 1367 */ + { 154, 6, 12, 0, 0, 18432, 142, }, /* 1368 */ + { 154, 6, 12, 0, 0, 18432, 136, }, /* 1369 */ + { 154, 13, 12, 0, 0, 18432, 138, }, /* 1370 */ + { 154, 26, 12, 0, 0, 18432, 68, }, /* 1371 */ + { 160, 7, 12, 0, 0, 18432, 82, }, /* 1372 */ + { 160, 12, 3, 0, 0, 26624, 96, }, /* 1373 */ + { 155, 7, 12, 0, 0, 18432, 82, }, /* 1374 */ + { 155, 12, 3, 0, 0, 26624, 96, }, /* 1375 */ + { 155, 13, 12, 0, 0, 18432, 138, }, /* 1376 */ + { 155, 23, 12, 0, 0, 14336, 68, }, /* 1377 */ + { 129, 7, 12, 0, 0, 34816, 82, }, /* 1378 */ + { 129, 15, 12, 0, 0, 34816, 68, }, /* 1379 */ + { 129, 12, 3, 0, 0, 26624, 96, }, /* 1380 */ + { 58, 9, 12, 0, 34, 34816, 74, }, /* 1381 */ + { 58, 5, 12, 0, -34, 34816, 76, }, /* 1382 */ + { 58, 12, 3, 0, 0, 26624, 150, }, /* 1383 */ + { 58, 12, 3, 0, 0, 26624, 130, }, /* 1384 */ + { 58, 12, 3, 0, 0, 26624, 96, }, /* 1385 */ + { 58, 6, 12, 0, 0, 34816, 142, }, /* 1386 */ + { 58, 13, 12, 0, 0, 34816, 138, }, /* 1387 */ + { 58, 21, 12, 0, 0, 34816, 68, }, /* 1388 */ + { 69, 15, 12, 0, 0, 0, 68, }, /* 1389 */ + { 69, 26, 12, 0, 0, 0, 68, }, /* 1390 */ + { 69, 23, 12, 0, 0, 0, 68, }, /* 1391 */ + { 3, 7, 12, 0, 0, 0, 240, }, /* 1392 */ + { 69, 26, 14, 0, 0, 28672, 332, }, /* 1393 */ + { 69, 26, 14, 0, 0, 28672, 334, }, /* 1394 */ + { 68, 2, 14, 0, 0, 18432, 336, }, /* 1395 */ + { 69, 26, 12, 0, 0, 18432, 338, }, /* 1396 */ + { 69, 26, 14, 0, 0, 18432, 340, }, /* 1397 */ + { 69, 26, 14, 0, 0, 18432, 334, }, /* 1398 */ + { 69, 26, 11, 0, 0, 18432, 342, }, /* 1399 */ + { 20, 26, 12, 0, 0, 18432, 68, }, /* 1400 */ + { 69, 26, 14, 0, 0, 18432, 236, }, /* 1401 */ + { 69, 26, 14, 0, 0, 18447, 334, }, /* 1402 */ + { 69, 26, 14, 0, 0, 28672, 344, }, /* 1403 */ + { 69, 26, 14, 0, 0, 28672, 346, }, /* 1404 */ + { 69, 24, 3, 0, 0, 28672, 348, }, /* 1405 */ + { 69, 26, 14, 0, 0, 28672, 350, }, /* 1406 */ + { 69, 13, 12, 0, 0, 10240, 138, }, /* 1407 */ + { 69, 1, 3, 0, 0, 6144, 352, }, /* 1408 */ }; const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */ @@ -1201,3419 +1841,3549 @@ const uint16_t PRIV(ucd_stage1)[] = { /* 17408 bytes */ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* U+0800 */ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 41, 42, 43, 44, 45, /* U+1000 */ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, /* U+1800 */ - 62, 63, 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, /* U+2000 */ - 77, 77, 78, 79, 66, 66, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, /* U+2800 */ - 90, 91, 92, 93, 94, 95, 96, 97, 98, 98, 98, 98, 98, 98, 98, 98, /* U+3000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+3800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+4000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 99, 98, 98, 98, 98, /* U+4800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+5000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+5800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+6000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+6800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+7000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+7800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+8000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+8800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+9000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+9800 */ -100,101,101,101,101,101,101,101,101,102,103,103,104,105,106,107, /* U+A000 */ -108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,116, /* U+A800 */ -117,118,119,120,121,122,116,117,118,119,120,121,122,116,117,118, /* U+B000 */ -119,120,121,122,116,117,118,119,120,121,122,116,117,118,119,120, /* U+B800 */ -121,122,116,117,118,119,120,121,122,116,117,118,119,120,121,122, /* U+C000 */ -116,117,118,119,120,121,122,116,117,118,119,120,121,122,116,117, /* U+C800 */ -118,119,120,121,122,116,117,118,119,120,121,122,116,117,118,123, /* U+D000 */ -124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, /* U+D800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+E000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+E800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F000 */ -125,125, 98, 98,126,127,128,129,130,130,131,132,133,134,135,136, /* U+F800 */ -137,138,139,140,141,142,143,144,145,146,147,148,149,149,150,151, /* U+10000 */ -152,153,154,155,156,157,158,159,160,161,162,141,163,164,165,166, /* U+10800 */ -167,168,169,170,171,172,173,141,174,175,141,176,177,178,179,141, /* U+11000 */ -180,181,182,183,184,185,141,141,186,187,188,189,141,190,141,191, /* U+11800 */ -192,192,192,192,192,192,192,193,194,192,195,141,141,141,141,141, /* U+12000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,196, /* U+12800 */ -197,197,197,197,197,197,197,197,198,141,141,141,141,141,141,141, /* U+13000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+13800 */ -141,141,141,141,141,141,141,141,199,199,199,199,200,141,141,141, /* U+14000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+14800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+15000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+15800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+16000 */ -201,201,201,201,202,203,204,205,141,141,141,141,206,207,208,209, /* U+16800 */ -210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210, /* U+17000 */ -210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210, /* U+17800 */ -210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,211, /* U+18000 */ -210,210,210,210,210,210,212,212,212,213,214,141,141,141,141,141, /* U+18800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+19000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+19800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+1A000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,215, /* U+1A800 */ -216,217,218,219,219,220,141,141,141,141,141,141,141,141,141,141, /* U+1B000 */ -141,141,141,141,141,141,141,141,221,222,141,141,141,141,141,141, /* U+1B800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+1C000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,223,224, /* U+1C800 */ - 71,225,226,227,228,229,230,141,231,232,233,234,235,236,237,238, /* U+1D000 */ -239,239,239,239,240,241,141,141,141,141,141,141,141,141,242,141, /* U+1D800 */ -243,141,244,141,141,245,141,141,141,141,141,141,141,141,141,246, /* U+1E000 */ -247,248,249,141,141,141,141,141,250,251,252,141,253,254,141,141, /* U+1E800 */ -255,256,257,258,259,260,261,262,261,261,263,261,264,265,266,267, /* U+1F000 */ -268,269,270,261,271,272, 71,273,260,260,260,260,260,260,260,274, /* U+1F800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+20000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+20800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+21000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+21800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+22000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+22800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+23000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+23800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+24000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+24800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+25000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+25800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+26000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+26800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+27000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+27800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+28000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+28800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+29000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+29800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,275, 98, 98, /* U+2A000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2A800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,276, 98, /* U+2B000 */ -277, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2B800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2C000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,278, 98, 98, /* U+2C800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2D000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2D800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+2E000 */ - 98, 98, 98, 98, 98, 98, 98,279,141,141,141,141,141,141,141,141, /* U+2E800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+2F000 */ - 98, 98, 98, 98,280,141,141,141,141,141,141,141,141,141,141,141, /* U+2F800 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+30000 */ - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, /* U+30800 */ - 98, 98, 98, 98, 98, 98,281,141,141,141,141,141,141,141,141,141, /* U+31000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+31800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+32000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+32800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+33000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+33800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+34000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+34800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+35000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+35800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+36000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+36800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+37000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+37800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+38000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+38800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+39000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+39800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3A000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3A800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3B000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3B800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3C000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3C800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3D000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3D800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3E000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3E800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3F000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+3F800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+40000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+40800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+41000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+41800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+42000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+42800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+43000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+43800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+44000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+44800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+45000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+45800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+46000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+46800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+47000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+47800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+48000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+48800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+49000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+49800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4A000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4A800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4B000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4B800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4C000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4C800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4D000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4D800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4E000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4E800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4F000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+4F800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+50000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+50800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+51000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+51800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+52000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+52800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+53000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+53800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+54000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+54800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+55000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+55800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+56000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+56800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+57000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+57800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+58000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+58800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+59000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+59800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5A000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5A800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5B000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5B800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5C000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5C800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5D000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5D800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5E000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5E800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5F000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+5F800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+60000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+60800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+61000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+61800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+62000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+62800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+63000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+63800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+64000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+64800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+65000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+65800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+66000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+66800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+67000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+67800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+68000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+68800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+69000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+69800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6A000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6A800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6B000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6B800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6C000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6C800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6D000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6D800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6E000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6E800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6F000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+6F800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+70000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+70800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+71000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+71800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+72000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+72800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+73000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+73800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+74000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+74800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+75000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+75800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+76000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+76800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+77000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+77800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+78000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+78800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+79000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+79800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7A000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7A800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7B000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7B800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7C000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7C800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7D000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7D800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7E000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7E800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7F000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+7F800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+80000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+80800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+81000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+81800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+82000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+82800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+83000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+83800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+84000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+84800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+85000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+85800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+86000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+86800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+87000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+87800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+88000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+88800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+89000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+89800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8A000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8A800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8B000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8B800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8C000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8C800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8D000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8D800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8E000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8E800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8F000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+8F800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+90000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+90800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+91000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+91800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+92000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+92800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+93000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+93800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+94000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+94800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+95000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+95800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+96000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+96800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+97000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+97800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+98000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+98800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+99000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+99800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9A000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9A800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9B000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9B800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9C000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9C800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9D000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9D800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9E000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9E800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9F000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+9F800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A0000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A0800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A1000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A1800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A2000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A2800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A3000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A3800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A4000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A4800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A5000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A5800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A6000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A6800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A7000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A7800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A8000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A8800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A9000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+A9800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AA000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AA800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AB000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AB800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AC000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AC800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AD000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AD800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AE000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AE800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AF000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+AF800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B0000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B0800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B1000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B1800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B2000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B2800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B3000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B3800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B4000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B4800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B5000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B5800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B6000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B6800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B7000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B7800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B8000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B8800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B9000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+B9800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BA000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BA800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BB000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BB800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BC000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BC800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BD000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BD800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BE000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BE800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BF000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+BF800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C0000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C0800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C1000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C1800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C2000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C2800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C3000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C3800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C4000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C4800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C5000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C5800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C6000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C6800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C7000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C7800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C8000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C8800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C9000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+C9800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CA000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CA800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CB000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CB800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CC000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CC800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CD000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CD800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CE000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CE800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CF000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+CF800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D0000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D0800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D1000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D1800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D2000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D2800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D3000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D3800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D4000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D4800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D5000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D5800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D6000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D6800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D7000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D7800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D8000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D8800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D9000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+D9800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DA000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DA800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DB000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DB800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DC000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DC800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DD000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DD800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DE000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DE800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DF000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+DF800 */ -282,283,284,285,283,283,283,283,283,283,283,283,283,283,283,283, /* U+E0000 */ -283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, /* U+E0800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E1000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E1800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E2000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E2800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E3000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E3800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E4000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E4800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E5000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E5800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E6000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E6800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E7000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E7800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E8000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E8800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E9000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+E9800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EA000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EA800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EB000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EB800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EC000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EC800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+ED000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+ED800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EE000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EE800 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EF000 */ -141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, /* U+EF800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F0000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F0800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F1000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F1800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F2000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F2800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F3000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F3800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F4000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F4800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F5000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F5800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F6000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F6800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F7000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F7800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F8000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F8800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F9000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+F9800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FA000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FA800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FB000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FB800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FC000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FC800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FD000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FD800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FE000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FE800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+FF000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,286, /* U+FF800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+100000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+100800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+101000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+101800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+102000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+102800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+103000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+103800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+104000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+104800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+105000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+105800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+106000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+106800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+107000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+107800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+108000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+108800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+109000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+109800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10A000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10A800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10B000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10B800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10C000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10C800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10D000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10D800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10E000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10E800 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125, /* U+10F000 */ -125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,286, /* U+10F800 */ + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, /* U+2000 */ + 78, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, /* U+2800 */ + 93, 94, 95, 96, 97, 98, 99,100,101,101,101,101,101,101,101,101, /* U+3000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+3800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+4000 */ +101,101,101,101,101,101,101,101,101,101,101,102,101,101,101,101, /* U+4800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+5000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+5800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+6000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+6800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+7000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+7800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+8000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+8800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+9000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+9800 */ +103,104,104,104,104,104,104,104,104,105,106,106,107,108,109,110, /* U+A000 */ +111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,119, /* U+A800 */ +120,121,122,123,124,125,119,120,121,122,123,124,125,119,120,121, /* U+B000 */ +122,123,124,125,119,120,121,122,123,124,125,119,120,121,122,123, /* U+B800 */ +124,125,119,120,121,122,123,124,125,119,120,121,122,123,124,125, /* U+C000 */ +119,120,121,122,123,124,125,119,120,121,122,123,124,125,119,120, /* U+C800 */ +121,122,123,124,125,119,120,121,122,123,124,125,119,120,121,126, /* U+D000 */ +127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127, /* U+D800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+E000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+E800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F000 */ +128,128,129,129,130,131,132,133,134,135,136,137,138,139,140,141, /* U+F800 */ +142,143,144,145,146,147,148,149,150,151,152,153,154,154,155,156, /* U+10000 */ +157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172, /* U+10800 */ +173,174,175,176,177,178,179,146,180,181,146,182,183,184,185,146, /* U+11000 */ +186,187,188,189,190,191,146,146,192,193,194,195,146,196,146,197, /* U+11800 */ +198,198,198,198,198,198,198,199,200,198,201,146,146,146,146,146, /* U+12000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,202, /* U+12800 */ +203,203,203,203,203,203,203,203,204,146,146,146,146,146,146,146, /* U+13000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+13800 */ +146,146,146,146,146,146,146,146,205,205,205,205,206,146,146,146, /* U+14000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+14800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+15000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+15800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+16000 */ +207,207,207,207,208,209,210,211,146,146,146,146,212,213,214,215, /* U+16800 */ +216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216, /* U+17000 */ +216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216, /* U+17800 */ +216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,217, /* U+18000 */ +216,216,216,216,216,216,218,218,218,219,220,146,146,146,146,146, /* U+18800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+19000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+19800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+1A000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,221, /* U+1A800 */ +222,223,224,225,225,226,146,146,146,146,146,146,146,146,146,146, /* U+1B000 */ +146,146,146,146,146,146,146,146,227,228,146,146,146,146,146,146, /* U+1B800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+1C000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,229,230, /* U+1C800 */ +231,232,233,234,235,236,237,146,238,239,240,241,242,243,244,245, /* U+1D000 */ +246,246,246,246,247,248,146,146,146,146,146,146,146,146,249,146, /* U+1D800 */ +250,146,251,146,146,252,146,146,146,146,146,146,146,146,146,253, /* U+1E000 */ +254,255,256,168,168,168,168,168,257,258,259,168,260,261,168,168, /* U+1E800 */ +262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277, /* U+1F000 */ +278,279,280,281,282,283,284,285,267,267,267,267,267,267,267,286, /* U+1F800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+20000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+20800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+21000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+21800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+22000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+22800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+23000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+23800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+24000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+24800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+25000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+25800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+26000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+26800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+27000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+27800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+28000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+28800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+29000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+29800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,287,101,101, /* U+2A000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+2A800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,288,101, /* U+2B000 */ +289,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+2B800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+2C000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,290,101,101, /* U+2C800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+2D000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+2D800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+2E000 */ +101,101,101,101,101,101,101,291,146,146,146,146,146,146,146,146, /* U+2E800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+2F000 */ +129,129,129,129,292,146,146,146,146,146,146,146,146,146,146,293, /* U+2F800 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+30000 */ +101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, /* U+30800 */ +101,101,101,101,101,101,294,146,146,146,146,146,146,146,146,146, /* U+31000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+31800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+32000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+32800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+33000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+33800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+34000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+34800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+35000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+35800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+36000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+36800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+37000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+37800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+38000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+38800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+39000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+39800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3A000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3A800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3B000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3B800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3C000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3C800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3D000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3D800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3E000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3E800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+3F000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+3F800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+40000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+40800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+41000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+41800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+42000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+42800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+43000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+43800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+44000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+44800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+45000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+45800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+46000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+46800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+47000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+47800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+48000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+48800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+49000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+49800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4A000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4A800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4B000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4B800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4C000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4C800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4D000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4D800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4E000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4E800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+4F000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+4F800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+50000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+50800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+51000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+51800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+52000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+52800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+53000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+53800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+54000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+54800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+55000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+55800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+56000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+56800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+57000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+57800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+58000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+58800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+59000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+59800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5A000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5A800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5B000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5B800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5C000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5C800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5D000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5D800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5E000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5E800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+5F000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+5F800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+60000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+60800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+61000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+61800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+62000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+62800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+63000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+63800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+64000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+64800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+65000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+65800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+66000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+66800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+67000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+67800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+68000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+68800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+69000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+69800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6A000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6A800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6B000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6B800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6C000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6C800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6D000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6D800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6E000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6E800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+6F000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+6F800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+70000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+70800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+71000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+71800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+72000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+72800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+73000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+73800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+74000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+74800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+75000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+75800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+76000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+76800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+77000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+77800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+78000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+78800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+79000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+79800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7A000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7A800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7B000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7B800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7C000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7C800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7D000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7D800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7E000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7E800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+7F000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+7F800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+80000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+80800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+81000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+81800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+82000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+82800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+83000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+83800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+84000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+84800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+85000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+85800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+86000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+86800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+87000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+87800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+88000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+88800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+89000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+89800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8A000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8A800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8B000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8B800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8C000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8C800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8D000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8D800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8E000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8E800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+8F000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+8F800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+90000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+90800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+91000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+91800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+92000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+92800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+93000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+93800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+94000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+94800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+95000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+95800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+96000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+96800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+97000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+97800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+98000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+98800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+99000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+99800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9A000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9A800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9B000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9B800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9C000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9C800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9D000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9D800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9E000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9E800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+9F000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+9F800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A0000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A0800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A1000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A1800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A2000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A2800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A3000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A3800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A4000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A4800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A5000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A5800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A6000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A6800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A7000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A7800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A8000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A8800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A9000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+A9800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AA000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AA800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AB000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AB800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AC000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AC800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AD000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AD800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AE000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AE800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+AF000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+AF800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B0000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B0800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B1000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B1800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B2000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B2800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B3000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B3800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B4000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B4800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B5000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B5800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B6000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B6800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B7000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B7800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B8000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B8800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B9000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+B9800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BA000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BA800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BB000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BB800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BC000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BC800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BD000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BD800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BE000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BE800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+BF000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+BF800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C0000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C0800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C1000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C1800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C2000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C2800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C3000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C3800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C4000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C4800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C5000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C5800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C6000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C6800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C7000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C7800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C8000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C8800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C9000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+C9800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CA000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CA800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CB000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CB800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CC000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CC800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CD000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CD800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CE000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CE800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+CF000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+CF800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D0000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D0800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D1000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D1800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D2000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D2800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D3000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D3800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D4000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D4800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D5000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D5800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D6000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D6800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D7000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D7800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D8000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D8800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D9000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+D9800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DA000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DA800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DB000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DB800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DC000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DC800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DD000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DD800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DE000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DE800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+DF000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+DF800 */ +295,296,297,298,296,296,296,296,296,296,296,296,296,296,296,296, /* U+E0000 */ +296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296, /* U+E0800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E1000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E1800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E2000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E2800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E3000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E3800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E4000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E4800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E5000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E5800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E6000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E6800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E7000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E7800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E8000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E8800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E9000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+E9800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EA000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EA800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EB000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EB800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EC000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EC800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+ED000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+ED800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EE000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EE800 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146, /* U+EF000 */ +146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,293, /* U+EF800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F0000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F0800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F1000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F1800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F2000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F2800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F3000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F3800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F4000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F4800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F5000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F5800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F6000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F6800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F7000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F7800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F8000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F8800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F9000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+F9800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FA000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FA800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FB000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FB800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FC000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FC800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FD000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FD800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FE000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FE800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+FF000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,299, /* U+FF800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+100000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+100800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+101000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+101800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+102000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+102800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+103000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+103800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+104000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+104800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+105000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+105800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+106000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+106800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+107000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+107800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+108000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+108800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+109000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+109800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10A000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10A800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10B000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10B800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10C000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10C800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10D000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10D800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10E000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10E800 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* U+10F000 */ +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,299, /* U+10F800 */ }; -const uint16_t PRIV(ucd_stage2)[] = { /* 73472 bytes, block = 128 */ +const uint16_t PRIV(ucd_stage2)[] = { /* 76800 bytes, block = 128 */ + /* block 0 */ - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 4, 5, 5, 5, 6, 5, 5, 5, 7, 8, 5, 9, 5, 10, 5, 5, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 5, 5, 9, 9, 9, 5, - 5, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 12, 12, 12, 12, - 12, 12, 12, 14, 12, 12, 12, 12, 12, 12, 12, 7, 5, 8, 15, 16, - 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 17, 17, 17, 17, - 17, 17, 17, 19, 17, 17, 17, 17, 17, 17, 17, 7, 9, 8, 9, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 3, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 25, 26, 27, 26, 8, + 13, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 30, 29, 29, 29, 29, + 29, 29, 29, 31, 29, 29, 29, 29, 29, 29, 29, 15, 13, 16, 32, 33, + 34, 35, 35, 35, 35, 35, 35, 36, 36, 37, 37, 38, 36, 36, 36, 36, + 36, 36, 36, 39, 36, 36, 36, 36, 36, 36, 36, 15, 27, 16, 27, 0, /* block 1 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 4, 5, 6, 6, 6, 6, 20, 5, 15, 21, 22, 23, 9, 24, 21, 15, - 20, 9, 25, 25, 15, 26, 5, 5, 15, 25, 22, 27, 25, 25, 25, 5, - 12, 12, 12, 12, 12, 28, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 9, 12, 12, 12, 12, 12, 12, 12, 29, - 17, 17, 17, 17, 17, 30, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 9, 17, 17, 17, 17, 17, 17, 17, 31, + 40, 40, 40, 40, 40, 41, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 42, 43, 44, 44, 44, 44, 45, 43, 46, 47, 48, 49, 50, 51, 47, 46, + 52, 53, 54, 54, 46, 55, 43, 56, 46, 54, 48, 57, 58, 58, 58, 43, + 59, 59, 59, 59, 59, 60, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 50, 59, 59, 59, 59, 59, 59, 59, 61, + 62, 62, 62, 62, 62, 63, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 50, 62, 62, 62, 62, 62, 62, 62, 64, /* block 2 */ - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 34, 35, 32, 33, 32, 33, 32, 33, 35, 32, 33, 32, 33, 32, 33, 32, - 33, 32, 33, 32, 33, 32, 33, 32, 33, 35, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 36, 32, 33, 32, 33, 32, 33, 37, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 67, + 68, 69, 65, 66, 65, 66, 65, 66, 70, 65, 66, 65, 66, 65, 66, 65, + 66, 65, 66, 65, 66, 65, 66, 65, 66, 71, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 72, 65, 66, 65, 66, 65, 66, 73, /* block 3 */ - 38, 39, 32, 33, 32, 33, 40, 32, 33, 41, 41, 32, 33, 35, 42, 43, - 44, 32, 33, 41, 45, 46, 47, 48, 32, 33, 49, 35, 47, 50, 51, 52, - 32, 33, 32, 33, 32, 33, 53, 32, 33, 53, 35, 35, 32, 33, 53, 32, - 33, 54, 54, 32, 33, 32, 33, 55, 32, 33, 35, 22, 32, 33, 35, 56, - 22, 22, 22, 22, 57, 58, 59, 60, 61, 62, 63, 64, 65, 32, 33, 32, - 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 66, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 35, 67, 68, 69, 32, 33, 70, 71, 32, 33, 32, 33, 32, 33, 32, 33, + 74, 75, 65, 66, 65, 66, 76, 65, 66, 77, 77, 65, 66, 70, 78, 79, + 80, 65, 66, 77, 81, 82, 83, 84, 65, 66, 85, 70, 83, 86, 87, 88, + 65, 66, 65, 66, 65, 66, 89, 65, 66, 89, 70, 70, 65, 66, 89, 65, + 66, 90, 90, 65, 66, 65, 66, 91, 65, 66, 70, 92, 65, 66, 70, 93, + 92, 92, 92, 92, 94, 95, 96, 97, 98, 99,100,101,102, 65, 66, 65, + 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66,103, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 69,104,105,106, 65, 66,107,108, 65, 66, 65, 66, 65, 66, 65, 66, /* block 4 */ - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 72, 35, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 35, 35, 35, 35, 35, 35, 73, 32, 33, 74, 75, 76, - 76, 32, 33, 77, 78, 79, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 80, 81, 82, 83, 84, 35, 85, 85, 35, 86, 35, 87, 88, 35, 35, 35, - 85, 89, 35, 90, 35, 91, 92, 35, 93, 94, 92, 95, 96, 35, 35, 94, - 35, 97, 98, 35, 35, 99, 35, 35, 35, 35, 35, 35, 35,100, 35, 35, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, +109, 70, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 70, 70, 70, 70, 70, 70,110, 65, 66,111,112,113, +113, 65, 66,114,115,116, 65, 66, 65, 67, 65, 66, 65, 66, 65, 66, +117,118,119,120,121, 70,122,122, 70,123, 70,124,125, 70, 70, 70, +122,126, 70,127, 70,128,129, 70,130,131,129,132,133, 70, 70,131, + 70,134,135, 70, 70,136, 70, 70, 70, 70, 70, 70, 70,137, 70, 70, /* block 5 */ -101, 35,102,101, 35, 35, 35,103,101,104,105,105,106, 35, 35, 35, - 35, 35,107, 35, 22, 35, 35, 35, 35, 35, 35, 35, 35,108,109, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, -110,110,110,110,110,110,110,110,110,111,111,111,111,111,111,111, -111,111, 15, 15, 15, 15,111,111,111,111,111,111,111,111,111,111, -111,111, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -110,110,110,110,110, 15, 15, 15, 15, 15,112,112,111, 15,111, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +138, 70,139,138, 70, 70, 70,140,138,141,142,142,143, 70, 70, 70, + 70, 70,144, 70, 92, 70, 70, 70, 70, 70, 70, 70, 70,145,146, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, +147,147,148,147,147,147,147,147,147,149,149,150,150,150,150,150, +151,151, 46, 46, 46, 46,149,149,149,149,149,149,149,149,149,149, +152,152, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, +147,147,147,147,147, 46, 46, 46, 46, 46,153,153,149, 46,150, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, /* block 6 */ -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,114,113,113,115,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,116,116,116,116,116,116,116,116,116,116,116,116,116, -117,118,117,118,111,119,117,118,120,120,121,122,122,122, 5,123, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, +154,154,155,154,154,156,154,154,154,154,154,154,154,154,154,157, +154,154,154,154,154,154,154,154,158,158,158,158,158,154,154,154, +154,154,154,159,159,159,159,159,159,159,159,159,159,159,159,159, +160,161,160,161,149,162,160,161,163,163,164,165,165,165,166,167, /* block 7 */ -120,120,120,120,119, 15,124, 5,125,125,125,120,126,120,127,127, -128,129,130,129,129,131,129,129,132,133,134,129,135,129,129,129, -136,137,120,138,129,129,139,129,129,140,129,129,141,142,142,142, -128,143,144,143,143,145,143,143,146,147,148,143,149,143,143,143, -150,151,152,153,143,143,154,143,143,155,143,143,156,157,157,158, -159,160,161,161,161,162,163,164,117,118,117,118,117,118,117,118, -117,118,165,166,165,166,165,166,165,166,165,166,165,166,165,166, -167,168,169,170,171,172,173,117,118,174,117,118,128,175,175,175, +163,163,163,163,162, 46,168,169,170,170,170,163,171,163,172,172, +173,174,175,174,174,176,174,174,177,178,179,174,180,174,174,174, +181,182,163,183,174,174,184,174,174,185,174,174,186,187,187,187, +173,188,189,188,188,190,188,188,191,192,193,188,194,188,188,188, +195,196,197,198,188,188,199,188,188,200,188,188,201,202,202,203, +204,205,206,207,207,208,209,210,160,161,160,161,160,161,160,161, +160,161,211,212,211,212,211,212,211,212,211,212,211,212,211,212, +213,214,215,216,217,218,219,160,161,220,160,161,221,222,222,222, /* block 8 */ -176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176, -177,177,178,177,179,177,177,177,177,177,177,177,177,177,180,177, -177,181,182,177,177,177,177,177,177,177,183,177,177,177,177,177, -184,184,185,184,186,184,184,184,184,184,184,184,184,184,187,184, -184,188,189,184,184,184,184,184,184,184,190,184,184,184,184,184, -191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191, -192,193,194,195,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223, +224,224,225,224,226,224,224,224,224,224,224,224,224,224,227,224, +224,228,229,224,224,224,224,224,224,224,230,224,224,224,224,224, +231,231,232,231,233,231,231,231,231,231,231,231,231,231,234,231, +231,235,236,231,231,231,231,231,231,231,237,231,231,231,231,231, +238,238,238,238,238,238,239,238,239,238,238,238,238,238,238,238, +240,241,242,243,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, /* block 9 */ -192,193,196,197,198,199,199,198,200,200,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -201,192,193,192,193,192,193,192,193,192,193,192,193,192,193,202, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, +240,241,244,245,246,247,247,246,248,248,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +249,240,241,240,241,240,241,240,241,240,241,240,241,240,241,250, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, /* block 10 */ -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -120,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203, -203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203, -203,203,203,203,203,203,203,120,120,204,205,205,205,205,205,205, -206,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207, -207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +163,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251, +251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251, +251,251,251,251,251,251,251,163,163,252,253,253,253,253,253,254, +255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256, +256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256, /* block 11 */ -207,207,207,207,207,207,207,206,206,205,208,120,120,209,209,210, -120,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211, -211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211, -211,211,211,211,211,211,211,211,211,211,211,211,211,211,212,211, -213,211,211,213,211,211,213,211,120,120,120,120,120,120,120,120, -214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214, -214,214,214,214,214,214,214,214,214,214,214,120,120,120,120,214, -214,214,214,213,213,120,120,120,120,120,120,120,120,120,120,120, +256,256,256,256,256,256,256,257,255,258,259,163,163,260,260,261, +262,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263, +263,263,264,263,263,263,263,263,263,263,263,263,263,263,263,263, +265,265,265,265,265,265,265,265,265,265,265,265,265,265,266,265, +267,265,265,268,265,269,267,269,262,262,262,262,262,262,262,262, +270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270, +270,270,270,270,270,270,270,270,270,270,270,262,262,262,262,270, +270,270,270,267,271,262,262,262,262,262,262,262,262,262,262,262, /* block 12 */ -215,215,215,215,215,216,217,217,217,218,218,219,220,218,221,221, -222,222,222,222,222,222,222,222,222,222,222,220,223,218,218,224, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -226,225,225,225,225,225,225,225,225,225,225,227,227,227,227,227, -227,227,227,227,227,227,222,222,222,222,222,222,222,222,222,222, -228,228,228,228,228,228,228,228,228,228,218,218,218,218,225,225, -227,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +272,272,272,272,272,273,274,274,275,276,276,277,278,279,280,280, +281,281,281,281,281,281,281,281,281,281,281,282,283,284,284,285, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +287,286,286,286,286,286,286,286,286,286,286,288,288,288,288,288, +288,288,288,289,289,289,281,290,291,281,281,281,281,281,281,281, +292,292,292,292,292,292,292,292,292,292,276,293,293,279,286,286, +289,286,286,294,286,286,286,286,286,286,286,286,286,286,286,286, /* block 13 */ -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,229,225,222,222,222,222,222,222,222,216,221,222, -222,222,222,222,222,230,230,222,222,221,222,222,222,222,225,225, -231,231,231,231,231,231,231,231,231,231,225,225,225,221,221,225, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,295,286,281,281,281,281,281,281,281,273,280,291, +291,281,281,281,281,296,296,281,281,280,291,291,291,281,286,286, +297,297,297,297,297,297,297,297,297,297,286,286,286,298,298,286, /* block 14 */ -232,232,232,232,232,232,232,232,232,232,232,232,232,232,120,233, -234,235,234,234,234,234,234,234,234,234,234,234,234,234,234,234, -234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, -235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235, -235,235,235,235,235,235,235,235,235,235,235,120,120,234,234,234, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +299,299,299,300,300,300,300,300,300,300,300,301,300,301,302,303, +304,305,304,304,304,304,304,304,304,304,304,304,304,304,304,304, +304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304, +306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306, +307,307,307,307,307,307,307,307,307,307,307,302,302,304,304,304, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, /* block 15 */ -236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236, -236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236, -236,236,236,236,236,236,237,237,237,237,237,237,237,237,237,237, -237,236,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -238,238,238,238,238,238,238,238,238,238,239,239,239,239,239,239, -239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239, -239,239,239,239,239,239,239,239,239,239,239,240,240,240,240,240, -240,240,240,240,241,241,242,243,243,243,241,120,120,240,244,244, +308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308, +308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308, +308,308,308,308,308,308,309,309,309,309,309,309,309,309,309,309, +309,308,302,302,302,302,302,302,302,302,302,302,302,302,302,302, +310,310,310,310,310,310,310,310,310,310,311,311,311,311,311,311, +311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311, +311,311,311,311,311,311,311,311,311,311,311,312,312,312,312,312, +312,312,312,312,313,313,314,315,316,317,318,262,262,319,320,320, /* block 16 */ -245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, -245,245,245,245,245,245,246,246,246,246,247,246,246,246,246,246, -246,246,246,246,247,246,246,246,247,246,246,246,246,246,120,120, -248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,120, -249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249, -249,249,249,249,249,249,249,249,249,250,250,250,120,120,251,120, -234,234,234,234,234,234,234,234,234,234,234,120,120,120,120,120, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321, +321,321,321,321,321,321,322,322,323,323,324,322,322,322,322,322, +322,322,322,322,324,322,322,322,324,322,322,322,322,325,262,262, +326,326,326,326,326,326,326,327,326,327,326,326,326,327,327,262, +328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328, +328,328,328,328,328,328,328,328,328,329,329,329,262,262,330,262, +304,304,304,304,304,304,304,304,304,304,304,302,302,302,302,302, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, /* block 17 */ -225,225,225,225,225,225,225,225,252,225,225,225,225,225,225,120, -215,215,120,120,120,120,120,120,222,222,222,222,222,222,222,222, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,230,222,222,222,222,222,222, -222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222, -222,222,216,222,222,222,222,222,222,222,222,222,222,222,222,222, -222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222, +286,286,286,286,286,286,286,286,331,286,286,286,286,286,286,302, +272,272,302,302,302,302,302,302,291,291,291,291,291,291,291,291, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,296,291,291,291,291,291,291, +291,291,291,332,281,281,281,281,281,281,281,281,281,281,281,281, +332,332,273,290,290,290,290,290,290,290,291,291,291,291,291,291, +290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,281, /* block 18 */ -253,253,253,254,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,253,254,253,255,254,254, -254,253,253,253,253,253,253,253,253,254,254,254,254,253,254,254, -255,256,257,113,113,253,253,253,255,255,255,255,255,255,255,255, -255,255,253,253,258,259,260,260,260,260,260,260,260,260,260,260, -261,262,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +333,333,333,334,335,335,335,335,335,335,335,335,335,335,335,335, +335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335, +335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335, +335,335,335,335,335,335,335,335,335,335,333,334,336,335,334,334, +334,333,333,333,333,333,333,333,333,334,334,334,334,337,334,334, +335,338,339,154,154,333,333,333,335,335,335,335,335,335,335,335, +335,335,333,333,340,341,342,342,342,342,342,342,342,342,342,342, +343,344,335,335,335,335,335,335,335,335,335,335,335,335,335,335, /* block 19 */ -263,264,265,265,120,263,263,263,263,263,263,263,263,120,120,263, -263,120,120,263,263,263,263,263,263,263,263,263,263,263,263,263, -263,263,263,263,263,263,263,263,263,120,263,263,263,263,263,263, -263,120,263,120,120,120,263,263,263,263,120,120,264,263,266,265, -265,264,264,264,264,120,120,265,265,120,120,265,265,264,263,120, -120,120,120,120,120,120,120,266,120,120,120,120,263,263,120,263, -263,263,264,264,120,120,267,267,267,267,267,267,267,267,267,267, -263,263,268,268,269,269,269,269,269,269,270,268,263,271,264,120, +345,346,347,347,163,345,345,345,345,345,345,345,345,163,163,345, +345,163,163,345,345,345,345,345,345,345,345,345,345,345,345,345, +345,345,345,345,345,345,345,345,345,163,345,345,345,345,345,345, +345,163,345,163,163,163,345,345,345,345,163,163,348,345,349,347, +347,346,346,346,346,163,163,347,347,163,163,347,347,350,345,163, +163,163,163,163,163,163,163,349,163,163,163,163,345,345,163,345, +345,345,346,346,163,163,351,351,351,351,351,351,351,351,351,351, +345,345,352,352,353,353,353,353,353,353,354,352,345,355,356,163, /* block 20 */ -120,272,272,273,120,274,274,274,274,274,274,120,120,120,120,274, -274,120,120,274,274,274,274,274,274,274,274,274,274,274,274,274, -274,274,274,274,274,274,274,274,274,120,274,274,274,274,274,274, -274,120,274,274,120,274,274,120,274,274,120,120,272,120,273,273, -273,272,272,120,120,120,120,272,272,120,120,272,272,272,120,120, -120,272,120,120,120,120,120,120,120,274,274,274,274,120,274,120, -120,120,120,120,120,120,275,275,275,275,275,275,275,275,275,275, -272,272,274,274,274,272,276,120,120,120,120,120,120,120,120,120, +163,357,357,358,163,359,359,359,359,359,359,163,163,163,163,359, +359,163,163,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,163,359,359,359,359,359,359, +359,163,359,359,163,359,359,163,359,359,163,163,360,163,358,358, +358,357,357,163,163,163,163,357,357,163,163,357,357,361,163,163, +163,357,163,163,163,163,163,163,163,359,359,359,359,163,359,163, +163,163,163,163,163,163,362,362,362,362,362,362,362,362,362,362, +357,357,359,359,359,357,363,163,163,163,163,163,163,163,163,163, /* block 21 */ -120,277,277,278,120,279,279,279,279,279,279,279,279,279,120,279, -279,279,120,279,279,279,279,279,279,279,279,279,279,279,279,279, -279,279,279,279,279,279,279,279,279,120,279,279,279,279,279,279, -279,120,279,279,120,279,279,279,279,279,120,120,277,279,278,278, -278,277,277,277,277,277,120,277,277,278,120,278,278,277,120,120, -279,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -279,279,277,277,120,120,280,280,280,280,280,280,280,280,280,280, -281,282,120,120,120,120,120,120,120,279,277,277,277,277,277,277, +163,364,364,365,163,366,366,366,366,366,366,366,366,366,163,366, +366,366,163,366,366,366,366,366,366,366,366,366,366,366,366,366, +366,366,366,366,366,366,366,366,366,163,366,366,366,366,366,366, +366,163,366,366,163,366,366,366,366,366,163,163,367,366,365,365, +365,364,364,364,364,364,163,364,364,365,163,365,365,368,163,163, +366,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +366,366,364,364,163,163,369,369,369,369,369,369,369,369,369,369, +370,371,163,163,163,163,163,163,163,366,364,364,364,367,367,367, /* block 22 */ -120,283,284,284,120,285,285,285,285,285,285,285,285,120,120,285, -285,120,120,285,285,285,285,285,285,285,285,285,285,285,285,285, -285,285,285,285,285,285,285,285,285,120,285,285,285,285,285,285, -285,120,285,285,120,285,285,285,285,285,120,120,283,285,286,283, -284,283,283,283,283,120,120,284,284,120,120,284,284,283,120,120, -120,120,120,120,120,283,283,286,120,120,120,120,285,285,120,285, -285,285,283,283,120,120,287,287,287,287,287,287,287,287,287,287, -288,285,289,289,289,289,289,289,120,120,120,120,120,120,120,120, +163,372,373,373,163,374,374,374,374,374,374,374,374,163,163,374, +374,163,163,374,374,374,374,374,374,374,374,374,374,374,374,374, +374,374,374,374,374,374,374,374,374,163,374,374,374,374,374,374, +374,163,374,374,163,374,374,374,374,374,163,163,375,374,376,372, +373,372,372,372,372,163,163,373,373,163,163,373,373,377,163,163, +163,163,163,163,163,378,372,376,163,163,163,163,374,374,163,374, +374,374,372,372,163,163,379,379,379,379,379,379,379,379,379,379, +380,374,381,381,381,381,381,381,163,163,163,163,163,163,163,163, /* block 23 */ -120,120,290,291,120,291,291,291,291,291,291,120,120,120,291,291, -291,120,291,291,291,291,120,120,120,291,291,120,291,120,291,291, -120,120,120,291,291,120,120,120,291,291,291,120,120,120,291,291, -291,291,291,291,291,291,291,291,291,291,120,120,120,120,292,293, -290,293,293,120,120,120,293,293,293,120,293,293,293,290,120,120, -291,120,120,120,120,120,120,292,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,294,294,294,294,294,294,294,294,294,294, -295,295,295,296,297,297,297,297,297,298,297,120,120,120,120,120, +163,163,382,383,163,383,383,383,383,383,383,163,163,163,383,383, +383,163,383,383,383,383,163,163,163,383,383,163,383,163,383,383, +163,163,163,383,383,163,163,163,383,383,383,163,163,163,383,383, +383,383,383,383,383,383,383,383,383,383,163,163,163,163,384,385, +382,385,385,163,163,163,385,385,385,163,385,385,385,386,163,163, +383,163,163,163,163,163,163,384,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,387,387,387,387,387,387,387,387,387,387, +388,388,388,389,390,390,390,390,390,391,390,163,163,163,163,163, /* block 24 */ -299,300,300,300,299,301,301,301,301,301,301,301,301,120,301,301, -301,120,301,301,301,301,301,301,301,301,301,301,301,301,301,301, -301,301,301,301,301,301,301,301,301,120,301,301,301,301,301,301, -301,301,301,301,301,301,301,301,301,301,120,120,299,301,299,299, -299,300,300,300,300,120,299,299,299,120,299,299,299,299,120,120, -120,120,120,120,120,299,299,120,301,301,301,120,120,301,120,120, -301,301,299,299,120,120,302,302,302,302,302,302,302,302,302,302, -120,120,120,120,120,120,120,303,304,304,304,304,304,304,304,305, +392,393,393,393,394,395,395,395,395,395,395,395,395,163,395,395, +395,163,395,395,395,395,395,395,395,395,395,395,395,395,395,395, +395,395,395,395,395,395,395,395,395,163,395,395,395,395,395,395, +395,395,395,395,395,395,395,395,395,395,163,163,396,395,392,392, +392,393,393,393,393,163,392,392,392,163,392,392,392,397,163,163, +163,163,163,163,163,392,392,163,395,395,395,163,163,395,163,163, +395,395,392,392,163,163,398,398,398,398,398,398,398,398,398,398, +163,163,163,163,163,163,163,399,400,400,400,400,400,400,400,401, /* block 25 */ -306,307,308,308,309,306,306,306,306,306,306,306,306,120,306,306, -306,120,306,306,306,306,306,306,306,306,306,306,306,306,306,306, -306,306,306,306,306,306,306,306,306,120,306,306,306,306,306,306, -306,306,306,306,120,306,306,306,306,306,120,120,307,306,308,307, -308,308,310,308,308,120,307,308,308,120,308,308,307,307,120,120, -120,120,120,120,120,310,310,120,120,120,120,120,120,306,306,120, -306,306,307,307,120,120,311,311,311,311,311,311,311,311,311,311, -120,306,306,120,120,120,120,120,120,120,120,120,120,120,120,120, +402,403,404,404,405,402,402,402,402,402,402,402,402,163,402,402, +402,163,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,163,402,402,402,402,402,402, +402,402,402,402,163,402,402,402,402,402,163,163,406,402,404,407, +404,404,408,404,404,163,407,404,404,163,404,404,403,409,163,163, +163,163,163,163,163,408,408,163,163,163,163,163,163,402,402,163, +402,402,403,403,163,163,410,410,410,410,410,410,410,410,410,410, +163,402,402,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 26 */ -312,312,313,313,314,314,314,314,314,314,314,314,314,120,314,314, -314,120,314,314,314,314,314,314,314,314,314,314,314,314,314,314, -314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314, -314,314,314,314,314,314,314,314,314,314,314,312,312,314,315,313, -313,312,312,312,312,120,313,313,313,120,313,313,313,312,316,317, -120,120,120,120,314,314,314,315,318,318,318,318,318,318,318,314, -314,314,312,312,120,120,319,319,319,319,319,319,319,319,319,319, -318,318,318,318,318,318,318,318,318,317,314,314,314,314,314,314, +411,411,412,412,413,413,413,413,413,413,413,413,413,163,413,413, +413,163,413,413,413,413,413,413,413,413,413,413,413,413,413,413, +413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413, +413,413,413,413,413,413,413,413,413,413,413,414,414,413,415,412, +412,411,411,411,411,163,412,412,412,163,412,412,412,414,416,417, +163,163,163,163,413,413,413,415,418,418,418,418,418,418,418,413, +413,413,411,411,163,163,419,419,419,419,419,419,419,419,419,419, +418,418,418,418,418,418,418,418,418,417,413,413,413,413,413,413, /* block 27 */ -120,320,321,321,120,322,322,322,322,322,322,322,322,322,322,322, -322,322,322,322,322,322,322,120,120,120,322,322,322,322,322,322, -322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322, -322,322,120,322,322,322,322,322,322,322,322,322,120,322,120,120, -322,322,322,322,322,322,322,120,120,120,320,120,120,120,120,323, -321,321,320,320,320,120,320,120,321,321,321,321,321,321,321,323, -120,120,120,120,120,120,324,324,324,324,324,324,324,324,324,324, -120,120,321,321,325,120,120,120,120,120,120,120,120,120,120,120, +163,420,421,421,163,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,163,163,163,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,163,422,422,422,422,422,422,422,422,422,163,422,163,163, +422,422,422,422,422,422,422,163,163,163,423,163,163,163,163,424, +421,421,420,420,420,163,420,163,421,421,421,421,421,421,421,424, +163,163,163,163,163,163,425,425,425,425,425,425,425,425,425,425, +163,163,421,421,426,163,163,163,163,163,163,163,163,163,163,163, /* block 28 */ -120,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326, -326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326, -326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326, -326,327,326,328,327,327,327,327,327,327,327,120,120,120,120, 6, -326,326,326,326,326,326,329,327,327,327,327,327,327,327,327,330, -331,331,331,331,331,331,331,331,331,331,330,330,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +163,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, +427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, +427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, +427,428,427,429,428,428,428,428,428,428,430,163,163,163,163,431, +432,432,432,432,432,427,433,434,434,434,434,434,434,428,434,435, +436,436,436,436,436,436,436,436,436,436,437,437,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 29 */ -120,332,332,120,332,120,332,332,332,332,332,120,332,332,332,332, -332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332, -332,332,332,332,120,332,120,332,332,332,332,332,332,332,332,332, -332,333,332,334,333,333,333,333,333,333,333,333,333,332,120,120, -332,332,332,332,332,120,335,120,333,333,333,333,333,333,120,120, -336,336,336,336,336,336,336,336,336,336,120,120,332,332,332,332, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +163,438,438,163,438,163,438,438,438,438,438,163,438,438,438,438, +438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438, +438,438,438,438,163,438,163,438,438,438,438,438,438,438,438,438, +438,439,438,440,439,439,439,439,439,439,441,439,439,438,163,163, +442,442,442,442,442,163,443,163,444,444,444,444,444,439,163,163, +445,445,445,445,445,445,445,445,445,445,163,163,438,438,438,438, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 30 */ -337,338,338,338,339,339,339,339,339,339,339,339,339,339,339,339, -339,339,339,338,339,338,338,338,340,340,338,338,338,338,338,338, -341,341,341,341,341,341,341,341,341,341,342,342,342,342,342,342, -342,342,342,342,338,340,338,340,338,340,343,344,343,344,345,345, -337,337,337,337,337,337,337,337,120,337,337,337,337,337,337,337, -337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337, -337,337,337,337,337,337,337,337,337,337,337,337,337,120,120,120, -120,340,340,340,340,340,340,340,340,340,340,340,340,340,340,345, +446,447,447,447,448,448,448,448,449,448,448,448,448,449,449,449, +449,449,449,447,448,447,447,447,450,450,447,447,447,447,447,447, +451,451,451,451,451,451,451,451,451,451,452,452,452,452,452,452, +452,452,452,452,447,450,447,450,447,450,453,454,453,454,455,455, +446,446,446,446,446,446,446,446,163,446,446,446,446,446,446,446, +446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446, +446,446,446,446,446,446,446,446,446,446,446,446,446,163,163,163, +163,456,456,456,456,456,456,457,456,457,456,456,456,456,456,458, /* block 31 */ -340,340,340,340,340,339,340,340,337,337,337,337,337,340,340,340, -340,340,340,340,340,340,340,340,120,340,340,340,340,340,340,340, -340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340, -340,340,340,340,340,340,340,340,340,340,340,340,340,120,338,338, -338,338,338,338,338,338,340,338,338,338,338,338,338,120,338,338, -339,339,339,339,339, 20, 20, 20, 20,339,339,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +456,456,450,450,459,448,450,450,446,446,446,446,446,456,456,456, +456,456,456,456,456,456,456,456,163,456,456,456,456,456,456,456, +456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456, +456,456,456,456,456,456,456,456,456,456,456,456,456,163,447,447, +447,447,447,447,447,447,450,447,447,447,447,447,447,163,447,447, +448,448,448,448,448,460,460,460,460,448,448,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 32 */ -346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346, -346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346, -346,346,346,346,346,346,346,346,346,346,346,347,347,348,348,348, -348,349,348,348,348,348,348,348,347,348,348,349,349,348,348,346, -350,350,350,350,350,350,350,350,350,350,351,351,351,351,351,351, -346,346,346,346,346,346,349,349,348,348,346,346,346,346,348,348, -348,346,347,347,347,346,346,347,347,347,347,347,347,347,346,346, -346,348,348,348,348,346,346,346,346,346,346,346,346,346,346,346, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,462,462,463,463,463, +463,464,463,463,463,463,463,465,462,466,466,464,464,463,463,461, +467,467,467,467,467,467,467,467,467,467,468,468,469,469,469,469, +461,461,461,461,461,461,464,464,463,463,461,461,461,461,463,463, +463,461,462,470,470,461,461,462,462,470,470,470,470,470,461,461, +461,463,463,463,463,461,461,461,461,461,461,461,461,461,461,461, /* block 33 */ -346,346,348,347,349,348,348,347,347,347,347,347,347,348,346,347, -352,352,352,352,352,352,352,352,352,352,347,347,347,348,353,353, -354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354, -354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354, -354,354,354,354,354,354,120,354,120,120,120,120,120,354,120,120, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355,355,356,357,355,355,355, +461,461,463,462,464,463,463,470,470,470,470,470,470,471,461,470, +472,472,472,472,472,472,472,472,472,472,470,470,462,463,473,473, +474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474, +474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474, +474,474,474,474,474,474,163,474,163,163,163,163,163,474,163,163, +475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475, +475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475, +475,475,475,475,475,475,475,475,475,475,475,476,477,475,475,475, /* block 34 */ -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, -359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,479, +480,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481, +481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481, /* block 35 */ -359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, -359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, -359,359,359,359,359,359,359,359,360,360,360,360,360,360,360,360, -360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, -360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, -360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, -360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, -360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, +481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481, +481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481, +481,481,481,481,481,481,481,481,482,482,482,482,482,482,482,482, +482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482, +482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482, +482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482, +482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482, +482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482, /* block 36 */ -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,120,361,361,361,361,120,120, -361,361,361,361,361,361,361,120,361,120,361,361,361,361,120,120, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,163,483,483,483,483,163,163, +483,483,483,483,483,483,483,163,483,163,483,483,483,483,163,163, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, /* block 37 */ -361,361,361,361,361,361,361,361,361,120,361,361,361,361,120,120, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,120,361,361,361,361,120,120,361,361,361,361,361,361,361,120, -361,120,361,361,361,361,120,120,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,120,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, +483,483,483,483,483,483,483,483,483,163,483,483,483,483,163,163, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,163,483,483,483,483,163,163,483,483,483,483,483,483,483,163, +483,163,483,483,483,483,163,163,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,163,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, /* block 38 */ -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,120,361,361,361,361,120,120,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,361,361,361,361,120,120,362,362,362, -363,363,363,363,363,363,363,363,363,364,364,364,364,364,364,364, -364,364,364,364,364,364,364,364,364,364,364,364,364,120,120,120, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,163,483,483,483,483,163,163,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,163,163,484,484,484, +485,486,487,486,486,486,486,487,487,488,488,488,488,488,488,488, +488,488,489,489,489,489,489,489,489,489,489,489,489,163,163,163, /* block 39 */ -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -365,365,365,365,365,365,365,365,365,365,120,120,120,120,120,120, -366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366, -366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366, -366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366, -366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366, -366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366, -367,367,367,367,367,367,120,120,368,368,368,368,368,368,120,120, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +490,490,490,490,490,490,490,490,490,490,163,163,163,163,163,163, +491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491, +491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491, +491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491, +491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491, +491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491, +492,492,492,492,492,492,163,163,493,493,493,493,493,493,163,163, /* block 40 */ -369,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +494,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, /* block 41 */ -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, /* block 42 */ -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,371,372,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,496,497,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, /* block 43 */ -373,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,375,376,120,120,120, -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,377,377,377,377,377,377,377,377,377, 5, 5, 5,378,378, -378,377,377,377,377,377,377,377,377,120,120,120,120,120,120,120, +498,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499, +499,499,499,499,499,499,499,499,499,499,499,500,501,163,163,163, +502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, +502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, +502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, +502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502, +502,502,502,502,502,502,502,502,502,502,502,503,503,503,504,504, +504,502,502,502,502,502,502,502,502,163,163,163,163,163,163,163, /* block 44 */ -379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, -379,379,380,380,380,381,120,120,120,120,120,120,120,120,120,379, -382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, -382,382,383,383,384,385,385,120,120,120,120,120,120,120,120,120, -386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386, -386,386,387,387,120,120,120,120,120,120,120,120,120,120,120,120, -388,388,388,388,388,388,388,388,388,388,388,388,388,120,388,388, -388,120,389,389,120,120,120,120,120,120,120,120,120,120,120,120, +505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, +505,505,506,506,507,508,163,163,163,163,163,163,163,163,163,505, +509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509, +509,509,510,510,511,512,512,163,163,163,163,163,163,163,163,163, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,514,514,163,163,163,163,163,163,163,163,163,163,163,163, +515,515,515,515,515,515,515,515,515,515,515,515,515,163,515,515, +515,163,516,516,163,163,163,163,163,163,163,163,163,163,163,163, /* block 45 */ -390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390, -390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390, -390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390, -390,390,390,390,391,391,392,391,391,391,391,391,391,391,392,392, -392,392,392,392,392,392,391,392,392,391,391,391,391,391,391,391, -391,391,391,391,393,393,393,394,393,393,393,395,390,391,120,120, -396,396,396,396,396,396,396,396,396,396,120,120,120,120,120,120, -397,397,397,397,397,397,397,397,397,397,120,120,120,120,120,120, +517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517, +517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517, +517,517,517,518,518,517,517,517,517,517,517,517,517,517,517,517, +517,517,517,517,519,519,520,521,521,521,521,521,521,521,520,520, +520,520,520,520,520,520,521,520,520,522,522,522,522,522,522,522, +522,522,523,522,524,524,524,525,526,526,524,527,517,522,163,163, +528,528,528,528,528,528,528,528,528,528,163,163,163,163,163,163, +529,529,529,529,529,529,529,529,529,529,163,163,163,163,163,163, /* block 46 */ -398,398,399,399,398,399,400,398,398,398,398,401,401,401,402,401, -403,403,403,403,403,403,403,403,403,403,120,120,120,120,120,120, -404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, -404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, -404,404,404,405,404,404,404,404,404,404,404,404,404,404,404,404, -404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, -404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, -404,404,404,404,404,404,404,404,404,120,120,120,120,120,120,120, +530,530,531,532,533,531,534,530,533,535,536,537,537,537,538,537, +539,539,539,539,539,539,539,539,539,539,163,163,163,163,163,163, +540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540, +540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540, +540,540,540,541,540,540,540,540,540,540,540,540,540,540,540,540, +540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540, +540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540, +540,540,540,540,540,540,540,540,540,163,163,163,163,163,163,163, /* block 47 */ -404,404,404,404,404,401,401,404,404,404,404,404,404,404,404,404, -404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, -404,404,404,404,404,404,404,404,404,401,404,120,120,120,120,120, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -370,370,370,370,370,370,120,120,120,120,120,120,120,120,120,120, +540,540,540,540,540,542,542,540,540,540,540,540,540,540,540,540, +540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540, +540,540,540,540,540,540,540,540,540,543,540,163,163,163,163,163, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +495,495,495,495,495,495,163,163,163,163,163,163,163,163,163,163, /* block 48 */ -406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406, -406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,120, -407,407,407,408,408,408,408,407,407,408,408,408,120,120,120,120, -408,408,407,408,408,408,408,408,408,407,407,407,120,120,120,120, -409,120,120,120,410,410,411,411,411,411,411,411,411,411,411,411, -412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412, -412,412,412,412,412,412,412,412,412,412,412,412,412,412,120,120, -412,412,412,412,412,120,120,120,120,120,120,120,120,120,120,120, +544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544, +544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,163, +545,545,545,546,546,546,546,545,545,546,546,546,163,163,163,163, +546,546,545,546,546,546,546,546,546,547,547,547,163,163,163,163, +548,163,163,163,549,549,550,550,550,550,550,550,550,550,550,550, +551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551, +551,551,551,551,551,551,551,551,551,551,551,551,551,551,163,163, +551,551,551,551,551,163,163,163,163,163,163,163,163,163,163,163, /* block 49 */ -413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413, -413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413, -413,413,413,413,413,413,413,413,413,413,413,413,120,120,120,120, -413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413, -413,413,413,413,413,413,413,413,413,413,120,120,120,120,120,120, -414,414,414,414,414,414,414,414,414,414,415,120,120,120,416,416, -417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417, -417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417, +552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552, +552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552, +552,552,552,552,552,552,552,552,552,552,552,552,163,163,163,163, +552,552,552,552,552,553,553,553,552,552,553,552,552,552,552,552, +552,552,552,552,552,552,552,552,552,552,163,163,163,163,163,163, +554,554,554,554,554,554,554,554,554,554,555,163,163,163,556,556, +557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557, +557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557, /* block 50 */ -418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418, -418,418,418,418,418,418,418,419,419,420,420,419,120,120,421,421, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,423,424,423,424,424,424,424,424,424,424,120, -424,425,424,425,425,424,424,424,424,424,424,424,424,423,423,423, -423,423,423,424,424,424,424,424,424,424,424,424,424,120,120,424, +558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558, +558,558,558,558,558,558,558,559,559,560,560,559,163,163,561,561, +562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562, +562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562, +562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562, +562,562,562,562,562,563,564,563,564,564,564,564,564,564,564,163, +565,566,564,566,566,564,564,564,564,564,564,564,564,563,563,563, +563,563,563,564,564,567,567,567,567,567,567,567,567,163,163,567, /* block 51 */ -426,426,426,426,426,426,426,426,426,426,120,120,120,120,120,120, -426,426,426,426,426,426,426,426,426,426,120,120,120,120,120,120, -427,427,427,427,427,427,427,428,427,427,427,427,427,427,120,120, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,429,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +568,568,568,568,568,568,568,568,568,568,163,163,163,163,163,163, +568,568,568,568,568,568,568,568,568,568,163,163,163,163,163,163, +569,569,569,569,569,569,569,570,571,571,571,571,569,569,163,163, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,572,573, +573,154,154,154,154,154,154,154,154,154,154,154,573,573,573,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 52 */ -430,430,430,430,431,432,432,432,432,432,432,432,432,432,432,432, -432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432, -432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432, -432,432,432,432,430,433,430,430,430,430,430,431,430,431,431,431, -431,431,430,431,431,432,432,432,432,432,432,432,432,120,120,120, -434,434,434,434,434,434,434,434,434,434,435,435,435,435,435,435, -435,436,436,436,436,436,436,436,436,436,436,430,430,430,430,430, -430,430,430,430,436,436,436,436,436,436,436,436,436,435,435,120, +574,574,574,574,575,576,576,576,576,576,576,576,576,576,576,576, +576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, +576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576, +576,576,576,576,577,578,574,574,574,574,574,575,574,575,575,575, +575,575,574,575,579,576,576,576,576,576,576,576,576,163,163,163, +580,580,580,580,580,580,580,580,580,580,581,581,582,583,581,581, +582,584,584,584,584,584,584,584,584,584,584,577,577,577,577,577, +577,577,577,577,584,584,584,584,584,584,584,584,584,581,581,163, /* block 53 */ -437,437,438,439,439,439,439,439,439,439,439,439,439,439,439,439, -439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439, -439,438,437,437,437,437,438,438,437,437,438,437,437,437,439,439, -440,440,440,440,440,440,440,440,440,440,439,439,439,439,439,439, -441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441, -441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441, -441,441,441,441,441,441,442,443,442,442,443,443,443,442,443,442, -442,442,443,443,120,120,120,120,120,120,120,120,444,444,444,444, +585,585,586,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, +587,586,585,585,585,585,586,586,585,585,588,589,585,585,587,587, +590,590,590,590,590,590,590,590,590,590,587,587,587,587,587,587, +591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, +591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, +591,591,591,591,591,591,592,593,594,594,593,593,593,594,593,594, +594,594,595,595,163,163,163,163,163,163,163,163,596,596,596,596, /* block 54 */ -445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445, -445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445, -445,445,445,445,446,446,446,446,446,446,446,446,447,447,447,447, -447,447,447,447,446,446,447,447,120,120,120,448,448,448,448,448, -449,449,449,449,449,449,449,449,449,449,120,120,120,445,445,445, -450,450,450,450,450,450,450,450,450,450,451,451,451,451,451,451, -451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451, -451,451,451,451,451,451,451,451,452,452,452,452,452,452,453,453, +597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597, +597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597, +597,597,597,597,598,598,598,598,598,598,598,598,599,599,599,599, +599,599,599,599,598,598,600,601,163,163,163,602,602,603,603,603, +604,604,604,604,604,604,604,604,604,604,163,163,163,597,597,597, +605,605,605,605,605,605,605,605,605,605,606,606,606,606,606,606, +606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, +606,606,606,606,606,606,606,606,607,607,607,608,607,607,609,609, /* block 55 */ -454,455,456,457,458,459,460,461,462,120,120,120,120,120,120,120, -463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, -463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, -463,463,463,463,463,463,463,463,463,463,463,120,120,463,463,463, -464,464,464,464,464,464,464,464,120,120,120,120,120,120,120,120, -465,466,465,467,466,468,468,469,468,469,470,466,469,469,466,466, -469,471,466,466,466,466,466,466,466,472,473,474,474,468,474,474, -474,474,475,476,477,473,473,478,479,479,480,120,120,120,120,120, +610,611,612,613,614,615,616,617,618,163,163,163,163,163,163,163, +619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, +619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619, +619,619,619,619,619,619,619,619,619,619,619,163,163,619,619,619, +620,620,620,620,620,620,620,620,163,163,163,163,163,163,163,163, +621,622,621,623,622,624,624,625,624,625,626,622,625,625,622,622, +625,627,622,622,622,622,622,622,622,628,629,630,630,624,630,630, +630,630,631,632,633,629,629,634,635,635,636,163,163,163,163,163, /* block 56 */ - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35,128,128,128,128,128,481,110,110,110,110, -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, -110,110,110,110,110,110,110,110,110,110,110,110,110,121,121,121, -121,121,110,110,110,110,121,121,121,121,121, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35,482,483, 35, 35, 35,484, 35, 35, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70,221,221,221,221,221,637,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,638,638,638, +638,638,148,147,147,147,638,638,638,638,638, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70,639,640, 70, 70, 70,641, 70, 70, /* block 57 */ - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,485, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,110,110,110,110,110, -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,121, -114,114,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,486,113,487,113,113,113,113,113, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,642, 70, + 70, 70, 70, 70, 70, 70,643, 70, 70, 70, 70,644,644,644,644,644, +644,644,644,644,645,644,644,644,645,644,644,644,644,644,644,644, +644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,646, +647,647,158,158,154,154,154,154,154,154,154,154,154,154,154,154, +158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158, +158,158,158,158,158,158,158,573,573,573,573,573,573,573,573,573, +573,573,573,573,573,154,154,154,648,154,649,154,154,154,154,154, /* block 58 */ - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, -488,489, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 67, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, +650,651, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, /* block 59 */ - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 35, 35, 35, 35, 35,490, 35, 35,491, 35, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 69, 69, 69, 69,652,653, 70, 70,654, 70, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 67, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, /* block 60 */ -492,492,492,492,492,492,492,492,493,493,493,493,493,493,493,493, -492,492,492,492,492,492,120,120,493,493,493,493,493,493,120,120, -492,492,492,492,492,492,492,492,493,493,493,493,493,493,493,493, -492,492,492,492,492,492,492,492,493,493,493,493,493,493,493,493, -492,492,492,492,492,492,120,120,493,493,493,493,493,493,120,120, -128,492,128,492,128,492,128,492,120,493,120,493,120,493,120,493, -492,492,492,492,492,492,492,492,493,493,493,493,493,493,493,493, -494,494,495,495,495,495,496,496,497,497,498,498,499,499,120,120, +655,655,655,655,655,655,655,655,656,656,656,656,656,656,656,656, +655,655,655,655,655,655,163,163,656,656,656,656,656,656,163,163, +655,655,655,655,655,655,655,655,656,656,656,656,656,656,656,656, +655,655,655,655,655,655,655,655,656,656,656,656,656,656,656,656, +655,655,655,655,655,655,163,163,656,656,656,656,656,656,163,163, +173,655,173,655,173,655,173,655,163,656,163,656,163,656,163,656, +655,655,655,655,655,655,655,655,656,656,656,656,656,656,656,656, +657,657,658,658,658,658,659,659,660,660,661,661,662,662,163,163, /* block 61 */ -492,492,492,492,492,492,492,492,500,500,500,500,500,500,500,500, -492,492,492,492,492,492,492,492,500,500,500,500,500,500,500,500, -492,492,492,492,492,492,492,492,500,500,500,500,500,500,500,500, -492,492,128,501,128,120,128,128,493,493,502,502,503,119,504,119, -119,119,128,501,128,120,128,128,505,505,505,505,503,119,119,119, -492,492,128,128,120,120,128,128,493,493,506,506,120,119,119,119, -492,492,128,128,128,169,128,128,493,493,507,507,174,119,119,119, -120,120,128,501,128,120,128,128,508,508,509,509,503,119,119,120, +663,663,663,663,663,663,663,663,664,664,664,664,664,664,664,664, +663,663,663,663,663,663,663,663,664,664,664,664,664,664,664,664, +663,663,663,663,663,663,663,663,664,664,664,664,664,664,664,664, +655,655,665,666,665,163,173,665,656,656,667,667,668,162,669,162, +162,162,665,666,665,163,173,665,670,670,670,670,668,162,162,162, +655,655,173,173,163,163,173,173,656,656,671,671,163,162,162,162, +655,655,173,173,173,215,173,173,656,656,672,672,220,162,162,162, +163,163,665,666,665,163,173,665,673,673,674,674,668,162,162,163, /* block 62 */ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 24,510,511, 24, 24, - 10, 10, 10, 10, 10, 10, 5, 5, 23, 27, 7, 23, 23, 27, 7, 23, - 5, 5, 5, 5, 5, 5, 5, 5,512,513, 24, 24, 24, 24, 24,514, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 23, 27, 5,515, 5, 5, 16, - 16, 5, 5, 5, 9, 7, 8, 5, 5,515, 5, 5, 5, 5, 5, 5, - 5, 5, 9, 5, 16, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, - 24, 24, 24, 24, 24,516, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 25,110,120,120, 25, 25, 25, 25, 25, 25, 9, 9, 9, 7, 8,110, +675,675,675,675,675,675,675,675,675,675,675, 51,676,677,678,679, +680,680,680,680,680,680,681, 43,682,683,684,685,685,686,684,685, + 43, 43, 43, 43,687, 43, 43,687,688,689,690,691,692,693,694,695, +696,696,697,697,697, 43, 43, 43, 43, 49, 57, 43,698,699, 43,700, +701, 43, 43, 43,702,703,704,699,699,698, 43, 43, 43, 43, 43, 43, + 43, 43, 50,705,700, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,675, + 51,706,706,706,706,707,708,709,710,711,712,712,712,712,712,712, + 54,645,163,163, 54, 54, 54, 54, 54, 54,713,714,715,716,717,644, /* block 63 */ - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 9, 9, 9, 7, 8,120, -110,110,110,110,110,110,110,110,110,110,110,110,110,120,120,120, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -113,113,113,113,113,113,113,113,113,113,113,113,113,429,429,429, -429,113,429,429,429,113,113,113,113,113,113,113,113,113,113,113, -517,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,713,714,715,716,717,163, +644,644,644,644,644,644,644,644,644,644,644,644,644,163,163,163, +431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431, +431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431, +431,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718, +719,719,719,719,719,719,719,719,719,719,719,719,719,720,720,720, +720,719,720,721,720,719,719,158,158,158,158,719,719,719,719,719, +722,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 64 */ - 20, 20,518, 20, 20, 20, 20,518, 20, 20,519,518,518,518,519,519, -518,518,518,519, 20,518, 20, 20, 9,518,518,518,518,518, 20, 20, - 20, 20, 21, 20,518, 20,520, 20,518, 20,521,522,518,518, 20,519, -518,518,523,518,519,524,524,524,524,525, 20, 20,519,519,518,518, - 9, 9, 9, 9, 9,518,519,519,519,519, 20, 9, 20, 20,526, 20, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527, -528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528, +723,723,724,723,723,723,723,724,723,723,725,724,724,724,725,725, +724,724,724,725,723,724,723,723,726,724,724,724,724,724,723,723, +723,723,727,723,724,723,728,723,724,729,730,731,724,724,732,725, +724,724,733,724,725,734,734,734,734,735,723,723,725,725,724,724, +715,715,715,715,715,724,725,725,736,736,723,715,723,723,737,460, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, +738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738, +739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739, /* block 65 */ -529,529,529, 32, 33,529,529,529,529, 25, 20, 20,120,120,120,120, - 9, 9, 9, 9,530, 21, 21, 21, 21, 21, 9, 9, 20, 20, 20, 20, - 9, 20, 20, 9, 20, 20, 9, 20, 20, 21, 21, 20, 20, 20, 9, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 9, 9, - 20, 20, 9, 20, 9, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, +740,740,740, 65, 66,740,740,740,740, 58,723,723,163,163,163,163, + 50, 50, 50, 50,741,742,742,742,742,742, 50, 50,743,743,743,743, + 50,743,743, 50,743,743, 50,743, 45,742,742,743,743,743, 50, 45, +743,743, 45, 45, 45, 45,743,743, 45, 45, 45, 45,743,743,743,743, +743,743,743,743,743,743,743,743,743,743,743,743,743,743, 50, 50, +743,743, 50,743, 50,743,743,743,743,743,743,743, 45,743, 45, 45, + 45, 45, 45, 45,743,743, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, /* block 66 */ - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 50, 50, 50, 50, 50, 50, 50, 50,744,744,744,744,744,744, 50, 50, + 50, 50,745, 53, 50,744, 50, 50, 50, 50, 50, 50, 50, 50, 50,744, +744,744,744, 50,744, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,744,744, 50, 50, + 50, 50, 50,744, 50,744, 50, 50, 50, 50, 50, 50,744, 50, 50, 50, + 50, 50,744,744,744,744, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50,744,744,744,744,744,744,744,744, 50, 50,744,744, +744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, /* block 67 */ - 20, 20, 20, 20, 20, 20, 20, 20, 7, 8, 7, 8, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 20, 20, 20, 20, - 9, 9, 20, 20, 20, 20, 20, 20, 21, 7, 8, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 9, 20, 20, 20, +744,744,744,744,744,744,744,744,744,744,744,744, 50, 50, 50,744, +744,744,744, 50, 50, 50, 50, 50,744, 50, 50, 50, 50, 50, 50, 50, + 50, 50,744,744, 50, 50,744, 50,744,744, 50,744, 50, 50, 50, 50, +744,744,744,744,744,744,744,744,744, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50,744,744,744,744,744, 50, 50, +744,744, 50, 50, 50, 50,744,744,744,744,744,744,744,744,744,744, +744,744,744,744,744,744,744,744,744,744,744,744,744,744, 50, 50, +744,744,744,744,744, 50,744,744, 50, 50,744,744,744,744,744, 50, /* block 68 */ - 20, 20, 20, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 9, 9, 9, 9, - 9, 9, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 20, 20, 20, 20, 21, 21, 21, 20, 20, 20, 20, 20, + 45, 45, 45, 45, 45, 45, 45, 45,746,747,746,747, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,748,748, 45, 45, 45, 45, + 50, 50, 45, 45, 45, 45, 45, 45, 47,749,750, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45,751,751,751,751,751,751,751,751,751,751, +751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751, +751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751, +751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751, +751,751,751,751,751,751,751,751,751,751,751, 45, 50, 45, 45, 45, /* block 69 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 45, 45, 45, 45, 45, 45, 45, 45,752, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45,751, 45, 45, 45, 45, 45, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50,743,743, 45,743, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 47, +743, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 50, 50, 50, 50, + 50, 50,743, 45, 45, 45, 45, 45, 45,748,748,748,748, 47, 47, 47, +748, 47, 47,748, 45, 45, 45, 45, 47, 47, 47, 45, 45, 45, 45, 45, /* block 70 */ - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20,531,531,531,531,531,531,531,531,531,531, -531,531,532,531,531,531,531,531,531,531,531,531,531,531,531,531, -533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533, -533,533,533,533,533,533,533,533,533,533, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45,753,753,753,753,753,753,753,753,753, +753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,753,753,753,753,753, +753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, /* block 71 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 58, 58, 58, 58, 58, 58, 58, 58, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,754,754,754,754,754,754,754,754,754,754, +754,754,755,754,754,754,754,754,754,754,754,754,754,754,754,754, +756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756, +756,756,756,756,756,756,756,756,756,756, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, /* block 72 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 21, 9, 20, 20, 20, 20, 20, 20, 20, 20, - 21, 9, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 9, 9, 9,530,530,530,530, 9, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, /* block 73 */ - 21, 21, 21, 21, 21, 21, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,530, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, +743,743, 45, 45, 45, 45, 45, 45, 45, 45, 47, 47, 45, 45,743,743, +743,743,743,743,743,743,742, 50, 45, 45, 45, 45,743,743,743,743, +742, 50, 45, 45, 45, 45,743,743, 45, 45,743,743, 45, 45, 45,743, +743,743,743,743, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45,743, 45,743, 45, 45,743,743,743,743,743,743, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 50, 50, 50,741,741,757,757, 50, /* block 74 */ - 21, 21, 21, 21, 21, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 47, 47, 47, 47, 47,758,743,752,752,752,752,752,752,752, 47,752, +752, 47,752, 45,748,748,752,752, 47,752,752,752,752,759,752,752, + 47,752, 47, 47,752,752, 47,752,752,752, 47,752,752,752, 47, 47, +752,752,752,752,752,752,752,752, 47, 47, 47,752,752,752,752,752, +742,752,742,752,752,752,752,752,748,748,748,748,748,748,748,748, +748,748,748,748,752,752,752,752,752,752,752,752,752,752,752, 47, +742,758,758,742,752, 47, 47,752, 47,752,752,752,752,758,758,760, +752,752,752,752,752,752,752,752,752,752,752, 47,752,752, 47,748, /* block 75 */ - 21, 21, 21, 21, 21, 21, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 20, 21, 20, 21, 20, 20, 20, 20, 20, 20, 21, 20, 20, - 20, 21, 20, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 21, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 21, 20, 20, 21, 20, 20, 20, 20, 21, 20, 21, 20, - 20, 20, 20, 21, 21, 21, 20, 21, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 21, 21, 21, 21, 21, 7, 8, 7, 8, 7, 8, 7, 8, - 7, 8, 7, 8, 7, 8, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +752,752,752,752,752,752, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, +752,752, 47,748, 47, 47, 47, 47,752, 47,752, 47, 47,752,752,752, + 47,748,752,752,752,752,752, 47,752,752,748,748,761,752,752,752, + 47, 47,752,752,752,752,752,752,752,752,752,752,752,748,748,752, +752,752,752,752,748,748,752,752, 47,752,752,752,752,752,748, 47, +752, 47,752, 47,748,752,752,752,752,752,752,752,752,752,752,752, +752,752,752,752,752,752,752,752,752, 47,748,752,752,752,752,752, + 47, 47,748,748, 47,748,752, 47, 47,759,748,752,752,748,752,752, /* block 76 */ - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 20, 21, 21, 21, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, - 9, 9, 9, 9, 9, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, +752,752, 47,752,752,748, 45, 45, 47, 47,762,762,759,759,752, 47, +752,752, 47, 45, 47, 45, 47, 45, 45, 45, 45, 45, 45, 47, 45, 45, + 45, 47, 45, 45, 45, 45, 45, 45,748, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 47, 47, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 47, 45, 45, 47, 45, 45, 45, 45,748, 45,748, 45, + 45, 45, 45,748,748,748, 45,748, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 47, 47,752,752,752,703,704,703,704,703,704,703,704, +703,704,703,704,703,704, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, /* block 77 */ -534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534, -534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534, -534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534, -534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534, -534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534, -534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534, -534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534, -534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 45,748,748,748, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 47, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, +748, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,748, + 50, 50, 50,744,744,746,747, 50,744,744, 50,744, 50,744, 50, 50, + 50, 50, 50, 50, 50,744,744, 50, 50, 50, 50, 50,744,744,744, 50, + 50, 50,744,744,744,744,746,747,746,747,746,747,746,747,746,747, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, /* block 78 */ - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9,530,530, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, +763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763, /* block 79 */ - 9, 9, 9, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, - 8, 7, 8, 7, 8, 7, 8, 7, 8, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 7, 8, 7, 8, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 8, 9, 9, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50,741,741, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, /* block 80 */ - 20, 20, 20, 20, 20, 21, 21, 21, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 20, 20, 9, 9, 9, 9, 9, 9, 20, 20, 20, - 21, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20,120,120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 50, 50, 50,746,747,746,747,746,747,746,747,746,747,746,747,746, +747,746,747,746,747,746,747,746,747, 50, 50,744, 50, 50, 50, 50, +744, 50, 50,744,744,744, 50, 50,744,744,744,744,744,744,744,744, + 50, 50, 50, 50, 50, 50, 50, 50,744, 50, 50, 50, 50, 50, 50, 50, +744,744, 50, 50,744,744, 50, 50, 50, 50, 50, 50, 50, 50, 50,744, +744,744,744, 50,744,744, 50, 50,746,747,746,747, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50,744,744, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50,744, 50, 50,744,744, 50, 50,746,747, 50, 50, /* block 81 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20,120, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,744,744,744,744, 50, + 50, 50, 50, 50,744,744, 50, 50, 50, 50, 50, 50,744,744, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50,744,744, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50,744,744,744,744,744,744,744, /* block 82 */ -535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535, -535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535, -535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535, -536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, -536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, -536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536, - 32, 33,537,538,539,540,541, 32, 33, 32, 33, 32, 33,542,543,544, -545, 35, 32, 33, 35, 32, 33, 35, 35, 35, 35, 35,110,110,546,546, +744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, +744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, +744,744,744, 50, 50, 50,744,744,744,744,744,744,744,744, 50,744, +744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, +744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, +744,744,744,744,744,744,744, 50, 50, 50, 50, 50, 50, 50,744, 50, + 50, 50, 50,744,744,744, 50, 50, 50, 50, 50, 50,744,744,744, 50, + 50, 50, 50, 50, 50, 50, 50,744,744,744,744, 50, 50, 50, 50, 50, /* block 83 */ -165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, -165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, -165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, -165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, -165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, -165,166,165,166,165,166,165,166,165,166,165,166,165,166,165,166, -165,166,165,166,547,548,548,548,548,548,548,165,166,165,166,549, -549,549,165,166,120,120,120,120,120,550,550,550,550,551,550,550, + 45, 45, 45, 45, 45, 47, 47, 47, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,748,748, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 45, 45, 50, 50, 50, 50, 50, 50, 45, 45, 45, +748, 45, 45, 45, 45,748, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45,753,753, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, /* block 84 */ -552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552, -552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552, -552,552,552,552,552,552,120,552,120,120,120,120,120,552,120,120, -553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553, -553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553, -553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553, -553,553,553,553,553,553,553,553,120,120,120,120,120,120,120,554, -555,120,120,120,120,120,120,120,120,120,120,120,120,120,120,556, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45,753, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,764, 45, /* block 85 */ -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361, -361,361,361,361,361,361,361,120,120,120,120,120,120,120,120,120, -361,361,361,361,361,361,361,120,361,361,361,361,361,361,361,120, -361,361,361,361,361,361,361,120,361,361,361,361,361,361,361,120, -361,361,361,361,361,361,361,120,361,361,361,361,361,361,361,120, -361,361,361,361,361,361,361,120,361,361,361,361,361,361,361,120, -557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557, -557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557, +765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765, +765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765, +765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765, +766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766, +766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766, +766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766, + 65, 66,767,768,769,770,771, 65, 66, 65, 66, 65, 66,772,773,774, +775, 70, 65, 66, 70, 65, 66, 70, 70, 70, 70, 70,645,644,776,776, /* block 86 */ - 5, 5, 23, 27, 23, 27, 5, 5, 5, 23, 27, 5, 23, 27, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 10, 5, 23, 27, 5, 5, - 23, 27, 7, 8, 7, 8, 7, 8, 7, 8, 5, 5, 5, 5, 5,111, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 5, 5, 5, 5, - 10, 5, 7,558, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 20, 20, 5, 5, 5, 7, 8, 7, 8, 7, 8, 7, 8, 10,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212, +211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212, +211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212, +211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212, +211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212, +211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212, +211,212,211,212,777,778,778,778,778,778,778,211,212,211,212,779, +779,779,211,212,163,163,163,163,163,780,780,780,780,781,780,780, /* block 87 */ -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,120,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,120,120,120,120,120,120,120,120,120,120,120,120, +782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782, +782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782, +782,782,782,782,782,782,163,782,163,163,163,163,163,782,163,163, +783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783, +783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783, +783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783, +783,783,783,783,783,783,783,783,163,163,163,163,163,163,163,784, +785,163,163,163,163,163,163,163,163,163,163,163,163,163,163,786, /* block 88 */ -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,163,163,163,163,163,163,163,163,163, +483,483,483,483,483,483,483,163,483,483,483,483,483,483,483,163, +483,483,483,483,483,483,483,163,483,483,483,483,483,483,483,163, +483,483,483,483,483,483,483,163,483,483,483,483,483,483,483,163, +483,483,483,483,483,483,483,163,483,483,483,483,483,483,483,163, +787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787, +787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787, /* block 89 */ -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559, -559,559,559,559,559,559,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120,120, + 43, 43,788,789,788,789, 43, 43, 43,788,789, 43,788,789, 43, 43, + 43, 43, 43, 43, 43, 43, 43,680, 43, 43,680, 43,788,789, 43, 43, +788,789,703,704,703,704,703,704,703,704, 43, 43, 43, 43,699,790, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,680,680,699, 43, 43, 43, +680,791,684,792, 43, 43, 43, 43, 43, 43, 43, 43,791, 43,791,791, + 45, 45, 43,699,699,703,704,703,704,703,704,703,704,680,753,753, +753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753, +753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753, /* block 90 */ - 4,560,560,561, 20,562,563,564,565,566,565,566,565,566,565,566, -565,566, 20,567,565,566,565,566,565,566,565,566,568,569,570,570, - 20,564,564,564,564,564,564,564,564,564,571,571,571,571,572,572, -573,574,574,574,574,574, 20,567,564,564,564,562,575,576,577,577, -120,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,163,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,163,163,163,163,163,163,163,163,163,163,163,163, /* block 91 */ -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,120,120,579,579,580,580,581,581,578, -582,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, -583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, -583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, -583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, -583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, -583,583,583,583,583,583,583,583,583,583,583,560,574,584,584,583, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, /* block 92 */ -120,120,120,120,120,585,585,585,585,585,585,585,585,585,585,585, -585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, -585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, -120,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, -586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, -586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, -586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, -586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793, +793,793,793,793,793,793,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +794,794,795,795,794,794,794,794,794,794,794,794,163,163,163,163, /* block 93 */ -586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,120, -577,577,587,587,587,587,577,577,577,577,577,577,577,577,577,577, -585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, -585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,120,120,120,120,120,120,120,120,120,120,120,120, -583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, +675,796,797,798,723,799,800,801,802,803,802,803,804,805,804,805, +802,803, 45,806,802,803,802,803,802,803,802,803,807,808,809,809, + 45,801,801,801,801,801,801,801,801,801,810,810,810,810,811,811, +812,813,813,813,813,813,723,814,801,801,801,815,816,817,818,818, +163,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, /* block 94 */ -588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588, -588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,120, -587,587,587,587,587,587,587,587,587,587,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577, 25, 25, 25, 25, 25, 25, 25, 25, - 20, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588, -588,588,588,588,588,588,588,588,588,588,588,588,588,588,588, 20, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,163,163,820,820,821,821,822,822,819, +823,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, +824,824,824,824,824,824,824,824,824,824,824,825,826,827,827,824, /* block 95 */ -587,587,587,587,587,587,587,587,587,587,577,577,577,577,577,577, -577,577,577,577,577,577,577,589,577,589,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -577,577,577,577,577,577,577,577,577,577,577,577, 20, 20, 20, 20, -590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, -590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, -590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,577, +163,163,163,163,163,828,828,828,828,828,828,828,828,828,828,828, +828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828, +828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828, +163,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829, +829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829, +829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829, +829,829,829,829,830,829,829,829,829,829,829,829,829,829,829,829, +829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829, /* block 96 */ -590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, -590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, -590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, -590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, -590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590, -590,590,590,590,590,590,590,590,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,577,577,577,577,577, +829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,163, +831,831,832,832,832,832,831,831,831,831,831,831,831,831,831,831, +828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828, +828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828, +818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818, +818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818, +818,818,818,818,163,163,163,163,163,163,163,163,163,163,163,163, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, /* block 97 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, -577,577,577,577,577,577,577,577,577,577,577,577,577,577,577, 20, +833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833, +833,833,833,833,833,833,833,833,833,833,833,833,833,834,834,163, +832,832,832,832,832,832,832,832,832,832,831,831,831,831,831,831, +831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831, +831,831,831,831,831,831,831,831,835,835,835,835,835,835,835,835, +723, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, +833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833, +833,833,833,833,833,833,833,833,833,833,833,833,834,834,834,460, /* block 98 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, +832,832,832,832,832,832,832,832,832,832,831,831,831,831,831,831, +831,831,831,831,831,831,831,836,831,836,831,831,831,831,831,831, +831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831, +831, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, +831,831,831,831,831,831,831,831,831,831,831,831,723,723,723,723, +837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, +837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, +837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,831, /* block 99 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, +837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, +837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, +837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, +837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, +837,837,837,837,837,837,837,837,831,831,831,831,831,831,831,831, +831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831, +831,460,460,460,460,460,460,723,723,723,723,831,831,831,831,831, /* block 100 */ -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,593,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,723,723, +831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831, +831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,723, /* block 101 */ -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, -592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, /* block 102 */ -592,592,592,592,592,592,592,592,592,592,592,592,592,120,120,120, -594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594, -594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594, -594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594, -594,594,594,594,594,594,594,120,120,120,120,120,120,120,120,120, -595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595, -595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595, -595,595,595,595,595,595,595,595,596,596,596,596,596,596,597,597, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, /* block 103 */ -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,840,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, /* block 104 */ -598,598,598,598,598,598,598,598,598,598,598,598,599,600,600,600, -598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598, -601,601,601,601,601,601,601,601,601,601,598,598,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -192,193,192,193,192,193,192,193,192,193,602,603,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,192,193,604,198, -200,200,200,605,557,557,557,557,557,557,557,557,557,557,605,482, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, +839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839, /* block 105 */ -192,193,192,193,192,193,192,193,192,193,192,193,192,193,192,193, -192,193,192,193,192,193,192,193,192,193,192,193,482,482,557,557, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,607,607,607,607,607,607,607,607,607,607, -608,608,609,609,609,609,609,609,120,120,120,120,120,120,120,120, +839,839,839,839,839,839,839,839,839,839,839,839,839,163,163,163, +841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841, +841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841, +841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841, +841,841,841,841,841,841,841,163,163,163,163,163,163,163,163,163, +842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842, +842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842, +842,842,842,842,842,842,842,842,843,843,843,843,843,843,844,845, /* block 106 */ -610,610,610,610,610,610,610,610, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15,111,111,111,111,111,111,111,111,111, - 15, 15, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 35, 35, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, -110, 35, 35, 35, 35, 35, 35, 35, 35, 32, 33, 32, 33,611, 32, 33, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, /* block 107 */ - 32, 33, 32, 33, 32, 33, 32, 33,111, 15, 15, 32, 33,612, 35, 22, - 32, 33, 32, 33,613, 35, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33, 32, 33, 32, 33, 32, 33,614,615,616,617,614, 35, -618,619,620,621, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, 32, 33, - 32, 33, 32, 33,622,623,624, 32, 33, 32, 33,120,120,120,120,120, - 32, 33,120, 35,120, 35, 32, 33, 32, 33,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,110,110,110, 32, 33, 22,110,110, 35, 22, 22, 22, 22, 22, +846,846,846,846,846,846,846,846,846,846,846,846,847,848,849,849, +846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846, +850,850,850,850,850,850,850,850,850,850,846,846,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +240,241,240,241,240,241,240,241,240,241,851,852,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,853,246, +248,248,248,854,787,787,787,787,787,787,787,787,855,855,854,856, /* block 108 */ -625,625,626,625,625,625,626,625,625,625,625,626,625,625,625,625, -625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625, -625,625,625,627,627,626,626,627,628,628,628,628,626,120,120,120, -629,629,629,630,630,630,631,631,632,631,120,120,120,120,120,120, -633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633, -633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633, -633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633, -633,633,633,633,634,634,634,634,120,120,120,120,120,120,120,120, +240,241,240,241,240,241,240,241,240,241,240,241,240,241,240,241, +240,241,240,241,240,241,240,241,240,241,240,241,857,857,787,787, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,859,859,859,859,859,859,859,859,859,859, +860,860,861,862,863,863,863,862,163,163,163,163,163,163,163,163, /* block 109 */ -635,635,636,636,636,636,636,636,636,636,636,636,636,636,636,636, -636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636, -636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636, -636,636,636,636,635,635,635,635,635,635,635,635,635,635,635,635, -635,635,635,635,637,637,120,120,120,120,120,120,120,120,638,638, -639,639,639,639,639,639,639,639,639,639,120,120,120,120,120,120, -253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, -253,640,255,641,255,255,255,255,261,261,261,255,261,255,255,253, +864,864,864,864,864,864,864,864, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46,149,149,149,149,149,149,149,149,149, + 46, 46, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 70, 70, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, +644, 70, 70, 70, 70, 70, 70, 70, 70, 65, 66, 65, 66,865, 65, 66, /* block 110 */ -642,642,642,642,642,642,642,642,642,642,643,643,643,643,643,643, -643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643, -643,643,643,643,643,643,644,644,644,644,644,644,644,644,645,646, -647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647, -647,647,647,647,647,647,647,648,648,648,648,648,648,648,648,648, -648,648,649,649,120,120,120,120,120,120,120,120,120,120,120,650, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,120,120,120, + 65, 66, 65, 66, 65, 66, 65, 66,149,866,866, 65, 66,867, 70, 92, + 65, 66, 65, 66,868, 70, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66, 65, 66, 65, 66, 65, 66,869,870,871,872,869, 70, +873,874,875,876, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, 65, 66, + 65, 66, 65, 66,877,878,879, 65, 66, 65, 66,163,163,163,163,163, + 65, 66,163, 70,163, 70, 65, 66, 65, 66,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,880,880,880, 65, 66, 92,147,147, 70, 92, 92, 92, 92, 92, /* block 111 */ -651,651,651,652,653,653,653,653,653,653,653,653,653,653,653,653, -653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653, -653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653, -653,653,653,651,652,652,651,651,651,651,652,652,651,651,652,652, -652,654,654,654,654,654,654,654,654,654,654,654,654,654,120,655, -656,656,656,656,656,656,656,656,656,656,120,120,120,120,654,654, -346,346,346,346,346,348,657,346,346,346,346,346,346,346,346,346, -352,352,352,352,352,352,352,352,352,352,346,346,346,346,346,120, +881,881,882,881,881,881,883,881,881,881,881,882,881,881,881,881, +881,881,881,881,881,881,881,881,881,881,881,881,881,881,881,881, +881,881,881,884,884,882,882,884,885,885,885,885,883,163,163,163, +886,886,886,887,887,887,888,888,889,890,163,163,163,163,163,163, +891,891,891,891,891,891,891,891,891,891,891,891,891,891,891,891, +891,891,891,891,891,891,891,891,891,891,891,891,891,891,891,891, +891,891,891,891,891,891,891,891,891,891,891,891,891,891,891,891, +891,891,891,891,892,892,893,893,163,163,163,163,163,163,163,163, /* block 112 */ -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658, -658,658,658,658,658,658,658,658,658,659,659,659,659,659,659,660, -660,659,659,660,660,659,659,120,120,120,120,120,120,120,120,120, -658,658,658,659,658,658,658,658,658,658,658,658,659,660,120,120, -661,661,661,661,661,661,661,661,661,661,120,120,662,662,662,662, -346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346, -657,346,346,346,346,346,346,353,353,353,346,347,348,347,346,346, +894,894,895,895,895,895,895,895,895,895,895,895,895,895,895,895, +895,895,895,895,895,895,895,895,895,895,895,895,895,895,895,895, +895,895,895,895,895,895,895,895,895,895,895,895,895,895,895,895, +895,895,895,895,894,894,894,894,894,894,894,894,894,894,894,894, +894,894,894,894,896,897,163,163,163,163,163,163,163,163,898,898, +899,899,899,899,899,899,899,899,899,899,163,163,163,163,163,163, +336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336, +336,900,335,901,335,335,335,335,343,343,343,335,343,335,335,333, /* block 113 */ -663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663, -663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663, -663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663, -664,663,664,664,664,663,663,664,664,663,663,663,663,663,664,664, -663,664,663,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,663,663,665,666,666, -667,667,667,667,667,667,667,667,667,667,667,668,669,669,668,668, -670,670,667,671,671,668,669,120,120,120,120,120,120,120,120,120, +902,902,902,902,902,902,902,902,902,902,903,903,903,903,903,903, +903,903,903,903,903,903,903,903,903,903,903,903,903,903,903,903, +903,903,903,903,903,903,904,904,904,904,904,905,905,905,906,907, +908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908, +908,908,908,908,908,908,908,909,909,909,909,909,909,909,909,909, +909,909,910,911,163,163,163,163,163,163,163,163,163,163,163,912, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478, +478,478,478,478,478,478,478,478,478,478,478,478,478,163,163,163, /* block 114 */ -120,361,361,361,361,361,361,120,120,361,361,361,361,361,361,120, -120,361,361,361,361,361,361,120,120,120,120,120,120,120,120,120, -361,361,361,361,361,361,361,120,361,361,361,361,361,361,361,120, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35,672, 35, 35, 35, 35, 35, 35, 35, 15,110,110,110,110, - 35, 35, 35, 35, 35,128, 35, 35, 35,110, 15, 15,120,120,120,120, -673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673, +913,913,913,914,915,915,915,915,915,915,915,915,915,915,915,915, +915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, +915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, +915,915,915,916,914,914,913,913,913,913,914,914,913,913,914,914, +917,918,918,918,918,918,918,919,920,920,918,918,918,918,163,921, +922,922,922,922,922,922,922,922,922,922,163,163,163,163,918,918, +461,461,461,461,461,471,923,461,461,461,461,461,461,461,461,461, +472,472,472,472,472,472,472,472,472,472,461,461,461,461,461,163, /* block 115 */ -673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673, -673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673, -673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673, -673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673, -667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, -667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667, -667,667,667,668,668,669,668,668,669,668,668,670,668,669,120,120, -674,674,674,674,674,674,674,674,674,674,120,120,120,120,120,120, +924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, +924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, +924,924,924,924,924,924,924,924,924,925,925,925,925,925,925,926, +926,925,925,926,926,925,925,163,163,163,163,163,163,163,163,163, +924,924,924,925,924,924,924,924,924,924,924,924,925,926,163,163, +927,927,927,927,927,927,927,927,927,927,163,163,928,929,929,929, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +923,461,461,461,461,461,461,473,473,473,461,470,471,470,461,461, /* block 116 */ -675,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,675,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,675,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -675,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, +930,930,930,930,930,930,930,930,930,930,930,930,930,930,930,930, +930,930,930,930,930,930,930,930,930,930,930,930,930,930,930,930, +930,930,930,930,930,930,930,930,930,930,930,930,930,930,930,930, +931,930,931,931,931,932,932,931,931,932,930,932,932,930,931,933, +934,933,934,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,930,930,935,936,937, +938,938,938,938,938,938,938,938,938,938,938,939,940,940,939,939, +941,941,938,942,942,939,943,163,163,163,163,163,163,163,163,163, /* block 117 */ -676,676,676,676,676,676,676,676,676,676,676,676,675,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,675,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -675,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,675,676,676,676, +163,483,483,483,483,483,483,163,163,483,483,483,483,483,483,163, +163,483,483,483,483,483,483,163,163,163,163,163,163,163,163,163, +483,483,483,483,483,483,483,163,483,483,483,483,483,483,483,163, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70,944, 70, 70, 70, 70, 70, 70, 70,866,147,147,147,147, + 70, 70, 70, 70, 70,221, 70, 70, 70,945, 46, 46,163,163,163,163, +946,946,946,946,946,946,946,946,946,946,946,946,946,946,946,946, /* block 118 */ -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,675,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -675,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,675,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, +946,946,946,946,946,946,946,946,946,946,946,946,946,946,946,946, +946,946,946,946,946,946,946,946,946,946,946,946,946,946,946,946, +946,946,946,946,946,946,946,946,946,946,946,946,946,946,946,946, +946,946,946,946,946,946,946,946,946,946,946,946,946,946,946,946, +938,938,938,938,938,938,938,938,938,938,938,938,938,938,938,938, +938,938,938,938,938,938,938,938,938,938,938,938,938,938,938,938, +938,938,938,939,939,940,939,939,940,939,939,941,947,943,163,163, +948,948,948,948,948,948,948,948,948,948,163,163,163,163,163,163, /* block 119 */ -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,675,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -675,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,675,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, +949,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,949,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,949,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +949,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, /* block 120 */ -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,675,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -675,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,675,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, +950,950,950,950,950,950,950,950,950,950,950,950,949,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,949,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +949,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,949,950,950,950, /* block 121 */ -676,676,676,676,675,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -675,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,675,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,675,676,676,676,676,676,676,676,676,676,676,676, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,949,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +949,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,949,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, /* block 122 */ -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -675,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,675,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,675,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,949,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +949,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,949,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, /* block 123 */ -676,676,676,676,676,676,676,676,675,676,676,676,676,676,676,676, -676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676, -676,676,676,676,120,120,120,120,120,120,120,120,120,120,120,120, -359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, -359,359,359,359,359,359,359,120,120,120,120,360,360,360,360,360, -360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, -360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360, -360,360,360,360,360,360,360,360,360,360,360,360,120,120,120,120, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,949,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +949,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,949,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, /* block 124 */ -677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677, -677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677, -677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677, -677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677, -677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677, -677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677, -677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677, -677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677, +950,950,950,950,949,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +949,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,949,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,949,950,950,950,950,950,950,950,950,950,950,950, /* block 125 */ -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +949,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,949,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,949,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, /* block 126 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,120,120, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, +950,950,950,950,950,950,950,950,949,950,950,950,950,950,950,950, +950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +950,950,950,950,163,163,163,163,163,163,163,163,163,163,163,163, +481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481, +481,481,481,481,481,481,481,163,163,163,163,482,482,482,482,482, +482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482, +482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482, +482,482,482,482,482,482,482,482,482,482,482,482,163,163,163,163, /* block 127 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +951,951,951,951,951,951,951,951,951,951,951,951,951,951,951,951, +951,951,951,951,951,951,951,951,951,951,951,951,951,951,951,951, +951,951,951,951,951,951,951,951,951,951,951,951,951,951,951,951, +951,951,951,951,951,951,951,951,951,951,951,951,951,951,951,951, +951,951,951,951,951,951,951,951,951,951,951,951,951,951,951,951, +951,951,951,951,951,951,951,951,951,951,951,951,951,951,951,951, +951,951,951,951,951,951,951,951,951,951,951,951,951,951,951,951, +951,951,951,951,951,951,951,951,951,951,951,951,951,951,951,951, /* block 128 */ - 35, 35, 35, 35, 35, 35, 35,120,120,120,120,120,120,120,120,120, -120,120,120,206,206,206,206,206,120,120,120,120,120,214,211,214, -214,214,214,214,214,214,214,214,214,679,214,214,214,214,214,214, -214,214,214,214,214,214,214,120,214,214,214,214,214,120,214,120, -214,214,120,214,214,120,214,214,214,214,214,214,214,214,214,214, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, /* block 129 */ -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,252,252,252,252,252,252,252,252,252,252,252,252,252,252, -252,252,252,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, /* block 130 */ -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,838,838, +953,838,953,838,838,953,953,953,953,953,953,953,953,953,953,838, +953,838,953,838,838,953,953,838,838,838,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,163,163, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, /* block 131 */ -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,680,681, -221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 132 */ -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -120,120,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,120,120,120,120,120,120,120,221, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -225,225,682,225,225,225,225,225,225,225,225,225,219,683,221,221, +652,652,652,652,652,652,652,163,163,163,163,163,163,163,163,163, +163,163,163,257,257,257,257,257,163,163,163,163,163,270,265,270, +270,270,270,270,270,270,270,270,270,954,270,270,270,270,270,270, +270,270,270,270,270,270,270,262,270,270,270,270,270,262,270,262, +270,270,262,270,270,262,270,270,270,270,270,270,270,270,270,270, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, /* block 133 */ -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, - 5, 5, 5, 5, 5, 5, 5, 7, 8, 5,120,120,120,120,120,120, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,557,557, - 5, 10, 10, 16, 16, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, - 8, 7, 8, 7, 8,561,561, 7, 8, 5, 5, 5, 5, 16, 16, 16, - 5, 5, 5,120, 5, 5, 5, 5, 10, 7, 8, 7, 8, 7, 8, 5, - 5, 5, 9, 10, 9, 9, 9,120, 5, 6, 5, 5,120,120,120,120, -225,225,225,225,225,120,225,225,225,225,225,225,225,225,225,225, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,331,331,331,331,331,331,331,331,331,331,331,331,331,331, +331,331,331,302,302,302,302,302,302,302,302,302,302,302,302,302, +302,302,302,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, /* block 134 */ -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,120,120, 24, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,955,955, +955,955,955,955,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, /* block 135 */ -120, 5, 5, 5, 6, 5, 5, 5, 7, 8, 5, 9, 5, 10, 5, 5, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 5, 5, 9, 9, 9, 5, - 5, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 7, 5, 8, 15, 16, - 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 7, 9, 8, 9, 7, - 8,560,565,566,560,560,583,583,583,583,583,583,583,583,583,583, -574,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, /* block 136 */ -583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583, -583,583,583,583,583,583,583,583,583,583,583,583,583,583,684,684, -586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586, -586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,120, -120,120,586,586,586,586,586,586,120,120,586,586,586,586,586,586, -120,120,586,586,586,586,586,586,120,120,586,586,586,120,120,120, - 6, 6, 9, 15, 20, 6, 6,120, 20, 9, 9, 9, 9, 20, 20,120, -516,516,516,516,516,516,516,516,516, 24, 24, 24, 20, 20,120,120, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,956,957, +280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, /* block 137 */ -685,685,685,685,685,685,685,685,685,685,685,685,120,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,120,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,120,685,685,120,685, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,120,120, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +302,302,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,302,302,302,302,302,302,302,280, +958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, +958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, +286,286,959,286,286,286,286,286,286,286,955,955,277,960,280,280, /* block 138 */ -685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685, -685,685,685,685,685,685,685,685,685,685,685,120,120,120,120,120, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,962, +963,963,963,964,963,963,963,965,966,963,163,163,163,163,163,163, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,855,855, +963,967,967,700,700,965,966,965,966,965,966,965,966,965,966,965, +966,968,969,968,969,798,798,965,966,963,963,963,963,700,700,700, +970,166,971,163,166,972,973,973,967,974,975,974,975,974,975,976, +963,977,713,978,979,979,715,163,977,431,976,963,163,163,163,163, +955,286,955,286,955,302,955,286,955,286,955,286,955,286,955,286, /* block 139 */ -686,686,687,120,120,120,120,688,688,688,688,688,688,688,688,688, -688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688, -688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688, -688,688,688,688,120,120,120,689,689,689,689,689,689,689,689,689, -690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690, -690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690, -690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690, -690,690,690,690,690,691,691,691,691,692,692,692,692,692,692,692, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,302,302, 51, /* block 140 */ -692,692,692,692,692,692,692,692,692,692,691,691,692,692,692,120, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120, -692,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,113,120,120, +163,973,980,976,431,976,963,981,974,975,963,713,970,982,971,983, +984,984,984,984,984,984,984,984,984,984,972,166,979,715,979,973, +963,985,985,985,985,985,985, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,974,977,975,986,700, + 46,987,987,987,987,987,987, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,974,715,975,715,974, +975,988,989,990,991,825,824,824,824,824,824,824,824,824,824,824, +826,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, /* block 141 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824, +824,824,824,824,824,824,824,824,824,824,824,824,824,824,992,992, +830,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829, +829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,163, +163,163,829,829,829,829,829,829,163,163,829,829,829,829,829,829, +163,163,829,829,829,829,829,829,163,163,829,829,829,163,163,163, +431,431,715, 46,723,431,431,163,723,715,715,715,715,723,723,163, +707,707,707,707,707,707,707,707,707,993,993,993,723,723,958,958, /* block 142 */ -693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693, -693,693,693,693,693,693,693,693,693,693,693,693,693,120,120,120, -694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694, -694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694, -694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694, -694,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -695,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696, -696,696,696,696,696,696,696,696,696,696,696,696,120,120,120,120, +994,994,994,994,994,994,994,994,994,994,994,994,163,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,163,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,163,994,994,163,994, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,163,163, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 143 */ -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697, -698,698,698,698,120,120,120,120,120,120,120,120,120,697,697,697, -699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699, -699,700,699,699,699,699,699,699,699,699,700,120,120,120,120,120, -701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701, -701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701, -701,701,701,701,701,701,702,702,702,702,702,120,120,120,120,120, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,994,994,994,994,994, +994,994,994,994,994,994,994,994,994,994,994,163,163,163,163,163, /* block 144 */ -703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703, -703,703,703,703,703,703,703,703,703,703,703,703,703,703,120,704, -705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705, -705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705, -705,705,705,705,120,120,120,120,705,705,705,705,705,705,705,705, -706,707,707,707,707,707,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +995,996,997,163,163,163,163,998,998,998,998,998,998,998,998,998, +998,998,998,998,998,998,998,998,998,998,998,998,998,998,998,998, +998,998,998,998,998,998,998,998,998,998,998,998,998,998,998,998, +998,998,998,998,163,163,163,999,999,999,999,999,999,999,999,999, +1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000, +1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000, +1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000, +1000,1000,1000,1000,1000,1001,1001,1001,1001,1002,1002,1002,1002,1002,1002,1002, /* block 145 */ -708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708, -708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708, -708,708,708,708,708,708,708,708,709,709,709,709,709,709,709,709, -709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709, -709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709, -710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, -710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, -710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710, +1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1001,1001,1002,1003,1003,163, +723,723,723,723,723,723,723,723,723,723,723,723,723,163,163,163, +1002,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,158,163,163, /* block 146 */ -711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711, -711,711,711,711,711,711,711,711,711,711,711,711,711,711,120,120, -712,712,712,712,712,712,712,712,712,712,120,120,120,120,120,120, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,120,120,120,120,714,714,714,714,714,714,714,714, -714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714, -714,714,714,714,714,714,714,714,714,714,714,714,120,120,120,120, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 147 */ -715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715, -715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715, -715,715,715,715,715,715,715,715,120,120,120,120,120,120,120,120, -716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716, -716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716, -716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716, -716,716,716,716,120,120,120,120,120,120,120,120,120,120,120,717, -718,718,718,718,718,718,718,718,718,718,718,120,718,718,718,718, +1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004, +1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,1004,163,163,163, +1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005, +1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005, +1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005,1005, +1005,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1006,1007,1007,1007,1007,1007,1007,1007,1007,1007,1007,1007,1007,1007,1007,1007, +1007,1007,1007,1007,1007,1007,1007,1007,1007,1007,1007,1007,163,163,163,163, /* block 148 */ -718,718,718,718,718,718,718,718,718,718,718,120,718,718,718,718, -718,718,718,120,718,718,120,719,719,719,719,719,719,719,719,719, -719,719,120,719,719,719,719,719,719,719,719,719,719,719,719,719, -719,719,120,719,719,719,719,719,719,719,120,719,719,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008, +1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008,1008, +1009,1009,1009,1009,163,163,163,163,163,163,163,163,163,1008,1008,1008, +1010,1010,1010,1010,1010,1010,1010,1010,1010,1010,1010,1010,1010,1010,1010,1010, +1010,1011,1010,1010,1010,1010,1010,1010,1010,1010,1011,163,163,163,163,163, +1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012, +1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012,1012, +1012,1012,1012,1012,1012,1012,1013,1013,1013,1013,1013,163,163,163,163,163, /* block 149 */ -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, +1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014, +1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,1014,163,1015, +1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016, +1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016,1016, +1016,1016,1016,1016,163,163,163,163,1016,1016,1016,1016,1016,1016,1016,1016, +1017,1018,1018,1018,1018,1018,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 150 */ -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,720,120,120,120,120,120,120,120,120,120, -720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720, -720,720,720,720,720,720,120,120,120,120,120,120,120,120,120,120, -720,720,720,720,720,720,720,720,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019, +1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019,1019, +1019,1019,1019,1019,1019,1019,1019,1019,1020,1020,1020,1020,1020,1020,1020,1020, +1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020, +1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020,1020, +1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021, +1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021, +1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021,1021, /* block 151 */ -110,110,110,110,110,110,120,110,110,110,110,110,110,110,110,110, -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, -110,120,110,110,110,110,110,110,110,110,110,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022, +1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,1022,163,163, +1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,163,163,163,163,163,163, +1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024, +1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024, +1024,1024,1024,1024,163,163,163,163,1025,1025,1025,1025,1025,1025,1025,1025, +1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025, +1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,163,163,163,163, /* block 152 */ -721,721,721,721,721,721,120,120,721,120,721,721,721,721,721,721, -721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721, -721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721, -721,721,721,721,721,721,120,721,721,120,120,120,721,120,120,721, -722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722, -722,722,722,722,722,722,120,723,724,724,724,724,724,724,724,724, -725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725, -725,725,725,725,725,725,725,726,726,727,727,727,727,727,727,727, +1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026, +1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026,1026, +1026,1026,1026,1026,1026,1026,1026,1026,163,163,163,163,163,163,163,163, +1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027, +1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027, +1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027,1027, +1027,1027,1027,1027,163,163,163,163,163,163,163,163,163,163,163,1028, +1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,163,1029,1029,1029,1029, /* block 153 */ -728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728, -728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,120, -120,120,120,120,120,120,120,729,729,729,729,729,729,729,729,729, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730, -730,730,730,120,730,730,120,120,120,120,120,731,731,731,731,731, +1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,1029,163,1029,1029,1029,1029, +1029,1029,1029,163,1029,1029,163,1030,1030,1030,1030,1030,1030,1030,1030,1030, +1030,1030,163,1030,1030,1030,1030,1030,1030,1030,1030,1030,1030,1030,1030,1030, +1030,1030,163,1030,1030,1030,1030,1030,1030,1030,163,1030,1030,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 154 */ -732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732, -732,732,732,732,732,732,733,733,733,733,733,733,120,120,120,734, -735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735, -735,735,735,735,735,735,735,735,735,735,120,120,120,120,120,736, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, /* block 155 */ -737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737, -737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737, -738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738, -738,738,738,738,738,738,738,738,120,120,120,120,739,739,738,738, -739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739, -120,120,739,739,739,739,739,739,739,739,739,739,739,739,739,739, -739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739, -739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,1031,163,163,163,163,163,163,163,163,163, +1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031, +1031,1031,1031,1031,1031,1031,163,163,163,163,163,163,163,163,163,163, +1031,1031,1031,1031,1031,1031,1031,1031,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 156 */ -740,741,741,741,120,741,741,120,120,120,120,120,741,741,741,741, -740,740,740,740,120,740,740,740,120,740,740,740,740,740,740,740, -740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, -740,740,740,740,740,740,120,120,741,741,741,120,120,120,120,741, -742,742,742,742,742,742,742,742,742,120,120,120,120,120,120,120, -743,743,743,743,743,743,743,743,743,120,120,120,120,120,120,120, -744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,744,744,744,744,744,744,744,744,745,745,746, +147,1032,1032,147,147,147,163,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,163,147,147,147,147,147,147,147,147,147,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 157 */ -747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747, -747,747,747,747,747,747,747,747,747,747,747,747,747,748,748,748, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -749,749,749,749,749,749,749,749,750,749,749,749,749,749,749,749, -749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749, -749,749,749,749,749,751,751,120,120,120,120,752,752,752,752,752, -753,753,754,753,753,753,753,120,120,120,120,120,120,120,120,120, +1033,1033,1033,1033,1033,1033,262,262,1033,262,1033,1033,1033,1033,1033,1033, +1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033, +1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033,1033, +1033,1033,1033,1033,1033,1033,262,1033,1033,262,262,262,1033,262,262,1033, +1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034,1034, +1034,1034,1034,1034,1034,1034,262,1035,1036,1036,1036,1036,1036,1036,1036,1036, +1037,1037,1037,1037,1037,1037,1037,1037,1037,1037,1037,1037,1037,1037,1037,1037, +1037,1037,1037,1037,1037,1037,1037,1038,1038,1039,1039,1039,1039,1039,1039,1039, /* block 158 */ -755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755, -755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755, -755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755, -755,755,755,755,755,755,120,120,120,756,756,756,756,756,756,756, -757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757, -757,757,757,757,757,757,120,120,758,758,758,758,758,758,758,758, -759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759, -759,759,759,120,120,120,120,120,760,760,760,760,760,760,760,760, +1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040, +1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,1040,262, +262,262,262,262,262,262,262,1041,1041,1041,1041,1041,1041,1041,1041,1041, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042, +1042,1042,1042,262,1042,1042,262,262,262,262,262,1043,1043,1043,1043,1043, /* block 159 */ -761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761, -761,761,120,120,120,120,120,120,120,762,762,762,762,120,120,120, -120,120,120,120,120,120,120,120,120,763,763,763,763,763,763,763, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044, +1044,1044,1044,1044,1044,1044,1045,1045,1045,1045,1045,1045,262,262,262,1046, +1047,1047,1047,1047,1047,1047,1047,1047,1047,1047,1047,1047,1047,1047,1047,1047, +1047,1047,1047,1047,1047,1047,1047,1047,1047,1047,262,262,262,262,262,1048, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 160 */ -764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764, -764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764, -764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764, -764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764, -764,764,764,764,764,764,764,764,764,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049, +1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049,1049, +1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050,1050, +1050,1050,1050,1050,1050,1050,1050,1050,262,262,262,262,1051,1051,1050,1050, +1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051, +262,262,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051, +1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051, +1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051,1051, /* block 161 */ -765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765, -765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765, -765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765, -765,765,765,120,120,120,120,120,120,120,120,120,120,120,120,120, -766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766, -766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766, -766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766, -766,766,766,120,120,120,120,120,120,120,767,767,767,767,767,767, +1052,1053,1053,1053,262,1053,1053,262,262,262,262,262,1053,1053,1053,1053, +1052,1052,1052,1052,262,1052,1052,1052,262,1052,1052,1052,1052,1052,1052,1052, +1052,1052,1052,1052,1052,1052,1052,1052,1052,1052,1052,1052,1052,1052,1052,1052, +1052,1052,1052,1052,1052,1052,262,262,1054,1054,1054,262,262,262,262,1055, +1056,1056,1056,1056,1056,1056,1056,1056,1056,262,262,262,262,262,262,262, +1057,1057,1057,1057,1057,1057,1058,1058,1057,262,262,262,262,262,262,262, +1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059, +1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1059,1060,1060,1061, /* block 162 */ -768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768, -768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768, -768,768,768,768,769,769,769,769,120,120,120,120,120,120,120,120, -770,770,770,770,770,770,770,770,770,770,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062, +1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1062,1063,1063,1063, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +1064,1064,1064,1064,1064,1064,1064,1064,1065,1064,1064,1064,1064,1064,1064,1064, +1064,1064,1064,1064,1064,1064,1064,1064,1064,1064,1064,1064,1064,1064,1064,1064, +1064,1064,1064,1064,1064,1066,1066,262,262,262,262,1067,1067,1067,1067,1067, +1068,1068,1069,1068,1068,1068,1070,262,262,262,262,262,262,262,262,262, /* block 163 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771, -771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,120, +1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071, +1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071, +1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071,1071, +1071,1071,1071,1071,1071,1071,262,262,262,1072,1073,1073,1073,1073,1073,1073, +1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074, +1074,1074,1074,1074,1074,1074,262,262,1075,1075,1075,1075,1075,1075,1075,1075, +1076,1076,1076,1076,1076,1076,1076,1076,1076,1076,1076,1076,1076,1076,1076,1076, +1076,1076,1076,262,262,262,262,262,1077,1077,1077,1077,1077,1077,1077,1077, /* block 164 */ -772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772, -772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772, -772,772,772,772,772,772,772,772,772,772,120,773,773,774,120,120, -772,772,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1078,1078,1078,1078,1078,1078,1078,1078,1078,1078,1078,1078,1078,1078,1078,1078, +1078,1078,262,262,262,262,262,262,262,1079,1079,1079,1079,262,262,262, +262,262,262,262,262,262,262,262,262,1080,1080,1080,1080,1080,1080,1080, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 165 */ -775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775, -775,775,775,775,775,775,775,775,775,775,775,775,775,776,776,776, -776,776,776,776,776,776,776,775,120,120,120,120,120,120,120,120, -777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777, -777,777,777,777,777,777,778,778,778,778,778,778,778,778,778,778, -778,779,779,779,779,780,780,780,780,780,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781, +1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081, +1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081, +1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081, +1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081,1081, +1081,1081,1081,1081,1081,1081,1081,1081,1081,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 166 */ -781,781,782,782,782,782,783,783,783,783,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784, -784,784,784,784,784,785,785,785,785,785,785,785,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786, -786,786,786,786,786,786,786,120,120,120,120,120,120,120,120,120, +1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082, +1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082, +1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082,1082, +1082,1082,1082,262,262,262,262,262,262,262,262,262,262,262,262,262, +1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083, +1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083, +1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083,1083, +1083,1083,1083,262,262,262,262,262,262,262,1084,1084,1084,1084,1084,1084, /* block 167 */ -787,788,787,789,789,789,789,789,789,789,789,789,789,789,789,789, -789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789, -789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789, -789,789,789,789,789,789,789,789,788,788,788,788,788,788,788,788, -788,788,788,788,788,788,788,790,790,790,790,790,790,790,120,120, -120,120,791,791,791,791,791,791,791,791,791,791,791,791,791,791, -791,791,791,791,791,791,792,792,792,792,792,792,792,792,792,792, -788,789,789,788,788,789,120,120,120,120,120,120,120,120,120,788, +1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085, +1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085,1085, +1085,1085,1086,1086,1087,1087,1087,1087,302,302,302,302,302,302,302,302, +1088,1088,1088,1088,1088,1088,1088,1088,1088,1088,302,302,302,302,302,302, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 168 */ -793,793,794,795,795,795,795,795,795,795,795,795,795,795,795,795, -795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795, -795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795, -794,794,794,793,793,793,793,794,794,793,793,796,796,797,796,796, -796,796,793,120,120,120,120,120,120,120,120,120,120,797,120,120, -798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798, -798,798,798,798,798,798,798,798,798,120,120,120,120,120,120,120, -799,799,799,799,799,799,799,799,799,799,120,120,120,120,120,120, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 169 */ -800,800,800,801,801,801,801,801,801,801,801,801,801,801,801,801, -801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801, -801,801,801,801,801,801,801,800,800,800,800,800,802,800,800,800, -800,800,800,800,800,120,803,803,803,803,803,803,803,803,803,803, -804,804,804,804,801,802,802,801,120,120,120,120,120,120,120,120, -805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805, -805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805, -805,805,805,806,807,807,805,120,120,120,120,120,120,120,120,120, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089, +1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,1089,262, /* block 170 */ -808,808,809,810,810,810,810,810,810,810,810,810,810,810,810,810, -810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810, -810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810, -810,810,810,809,809,809,808,808,808,808,808,808,808,808,808,809, -809,810,811,811,810,812,812,812,812,808,808,808,808,812,809,808, -813,813,813,813,813,813,813,813,813,813,810,812,810,812,812,812, -120,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814, -814,814,814,814,814,120,120,120,120,120,120,120,120,120,120,120, +1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090, +1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,1090, +1090,1090,1090,1090,1090,1090,1090,1090,1090,1090,262,1091,1091,1092,262,262, +1090,1090,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 171 */ -815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815, -815,815,120,815,815,815,815,815,815,815,815,815,815,815,815,815, -815,815,815,815,815,815,815,815,815,815,815,815,816,816,816,817, -817,817,816,816,817,816,817,817,818,818,818,818,818,818,817,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093, +1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1093,1094,1094,1094, +1094,1094,1094,1094,1094,1094,1094,1093,262,262,262,262,262,262,262,262, +1095,1095,1095,1095,1095,1095,1095,1095,1095,1095,1095,1095,1095,1095,1095,1095, +1095,1095,1095,1095,1095,1095,1096,1096,1096,1096,1096,1096,1096,1096,1096,1096, +1096,1097,1097,1097,1097,1098,1098,1098,1098,1098,302,302,302,302,302,302, +302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302, +1099,1099,1099,1099,1099,1099,1099,1099,1099,1099,1099,1099,1099,1099,1099,1099, /* block 172 */ -819,819,819,819,819,819,819,120,819,120,819,819,819,819,120,819, -819,819,819,819,819,819,819,819,819,819,819,819,819,819,120,819, -819,819,819,819,819,819,819,819,819,820,120,120,120,120,120,120, -821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821, -821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821, -821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,822, -823,823,823,822,822,822,822,822,822,822,822,120,120,120,120,120, -824,824,824,824,824,824,824,824,824,824,120,120,120,120,120,120, +1099,1099,1100,1100,1100,1100,1101,1101,1101,1101,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +1102,1102,1102,1102,1102,1102,1102,1102,1102,1102,1102,1102,1102,1102,1102,1102, +1102,1102,1102,1102,1102,1103,1103,1103,1103,1103,1103,1103,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +1104,1104,1104,1104,1104,1104,1104,1104,1104,1104,1104,1104,1104,1104,1104,1104, +1104,1104,1104,1104,1104,1104,1104,262,262,262,262,262,262,262,262,262, /* block 173 */ -825,826,827,828,120,829,829,829,829,829,829,829,829,120,120,829, -829,120,120,829,829,829,829,829,829,829,829,829,829,829,829,829, -829,829,829,829,829,829,829,829,829,120,829,829,829,829,829,829, -829,120,829,829,120,829,829,829,829,829,120,830,826,829,831,827, -825,827,827,827,827,120,120,827,827,120,120,827,827,827,120,120, -829,120,120,120,120,120,120,831,120,120,120,120,120,829,829,829, -829,829,827,827,120,120,825,825,825,825,825,825,825,120,120,120, -825,825,825,825,825,120,120,120,120,120,120,120,120,120,120,120, +1105,1106,1105,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107, +1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107, +1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107,1107, +1107,1107,1107,1107,1107,1107,1107,1107,1106,1106,1106,1106,1106,1106,1106,1106, +1106,1106,1106,1106,1106,1106,1108,1109,1109,1110,1110,1110,1110,1110,163,163, +163,163,1111,1111,1111,1111,1111,1111,1111,1111,1111,1111,1111,1111,1111,1111, +1111,1111,1111,1111,1111,1111,1112,1112,1112,1112,1112,1112,1112,1112,1112,1112, +1108,1107,1107,1106,1106,1107,163,163,163,163,163,163,163,163,163,1113, /* block 174 */ -832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832, -832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832, -832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832, -832,832,832,832,832,833,833,833,834,834,834,834,834,834,834,834, -833,833,834,834,834,833,834,832,832,832,832,835,835,835,835,835, -836,836,836,836,836,836,836,836,836,836,835,835,120,835,834,832, -832,832,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1114,1114,1115,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116, +1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116, +1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116,1116, +1115,1115,1115,1117,1117,1117,1117,1115,1115,1118,1119,1120,1120,1121,1122,1122, +1122,1122,1117,163,163,163,163,163,163,163,163,163,163,1121,163,163, +1123,1123,1123,1123,1123,1123,1123,1123,1123,1123,1123,1123,1123,1123,1123,1123, +1123,1123,1123,1123,1123,1123,1123,1123,1123,163,163,163,163,163,163,163, +1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,163,163,163,163,163,163, /* block 175 */ -837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, -837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, -837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837, -838,839,839,840,840,840,840,840,840,839,840,839,839,838,839,840, -840,839,840,840,837,837,841,837,120,120,120,120,120,120,120,120, -842,842,842,842,842,842,842,842,842,842,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1125,1125,1125,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126, +1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126,1126, +1126,1126,1126,1126,1126,1126,1126,1125,1125,1125,1125,1125,1127,1125,1125,1125, +1125,1125,1125,1128,1128,163,1129,1129,1129,1129,1129,1129,1129,1129,1129,1129, +1130,1131,1131,1131,1126,1127,1127,1126,163,163,163,163,163,163,163,163, +1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132, +1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132,1132, +1132,1132,1132,1133,1134,1134,1132,163,163,163,163,163,163,163,163,163, /* block 176 */ -843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843, -843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843, -843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,844, -845,845,846,846,846,846,120,120,845,845,845,845,846,846,845,846, -846,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847, -847,847,847,847,847,847,847,847,843,843,843,843,846,846,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1135,1135,1136,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137, +1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137, +1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137,1137, +1137,1137,1137,1136,1136,1136,1135,1135,1135,1135,1135,1135,1135,1135,1135,1136, +1138,1137,1139,1139,1137,1140,1140,1141,1141,1142,1143,1143,1143,1140,1136,1135, +1144,1144,1144,1144,1144,1144,1144,1144,1144,1144,1137,1141,1137,1141,1140,1140, +163,1145,1145,1145,1145,1145,1145,1145,1145,1145,1145,1145,1145,1145,1145,1145, +1145,1145,1145,1145,1145,163,163,163,163,163,163,163,163,163,163,163, /* block 177 */ -848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848, -848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848, -848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848, -849,849,849,850,850,850,850,850,850,850,850,849,849,850,849,850, -850,851,851,851,848,120,120,120,120,120,120,120,120,120,120,120, -852,852,852,852,852,852,852,852,852,852,120,120,120,120,120,120, -398,398,398,398,398,398,398,398,398,398,398,398,398,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146, +1146,1146,163,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146, +1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1146,1147,1147,1147,1148, +1148,1148,1147,1147,1148,1149,1150,1148,1151,1151,1152,1151,1151,1153,1148,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 178 */ -853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853, -853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853, -853,853,853,853,853,853,853,853,853,853,853,854,855,854,855,855, -854,854,854,854,854,854,855,854,853,856,120,120,120,120,120,120, -857,857,857,857,857,857,857,857,857,857,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1154,1154,1154,1154,1154,1154,1154,163,1154,163,1154,1154,1154,1154,163,1154, +1154,1154,1154,1154,1154,1154,1154,1154,1154,1154,1154,1154,1154,1154,163,1154, +1154,1154,1154,1154,1154,1154,1154,1154,1154,1155,163,163,163,163,163,163, +1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156, +1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156, +1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1156,1157, +1158,1158,1158,1157,1157,1157,1157,1157,1157,1159,1160,163,163,163,163,163, +1161,1161,1161,1161,1161,1161,1161,1161,1161,1161,163,163,163,163,163,163, /* block 179 */ -858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, -858,858,858,858,858,858,858,858,858,858,858,120,120,859,859,859, -860,860,859,859,859,859,861,859,859,859,859,859,120,120,120,120, -862,862,862,862,862,862,862,862,862,862,863,863,864,864,864,865, -858,858,858,858,858,858,858,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1162,1163,1164,1165,163,1166,1166,1166,1166,1166,1166,1166,1166,163,163,1166, +1166,163,163,1166,1166,1166,1166,1166,1166,1166,1166,1166,1166,1166,1166,1166, +1166,1166,1166,1166,1166,1166,1166,1166,1166,163,1166,1166,1166,1166,1166,1166, +1166,163,1166,1166,163,1166,1166,1166,1166,1166,163,1167,1168,1166,1169,1164, +1162,1164,1164,1164,1164,163,163,1164,1164,163,163,1164,1164,1170,163,163, +1166,163,163,163,163,163,163,1169,163,163,163,163,163,1171,1166,1166, +1166,1166,1164,1164,163,163,1172,1172,1172,1172,1172,1172,1172,163,163,163, +1172,1172,1172,1172,1172,163,163,163,163,163,163,163,163,163,163,163, /* block 180 */ -866,866,866,866,866,866,866,866,866,866,866,866,866,866,866,866, -866,866,866,866,866,866,866,866,866,866,866,866,866,866,866,866, -866,866,866,866,866,866,866,866,866,866,866,866,867,867,867,868, -868,868,868,868,868,868,868,868,867,868,868,869,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173, +1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173, +1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173,1173, +1173,1173,1173,1173,1173,1174,1174,1174,1175,1175,1175,1175,1175,1175,1175,1175, +1174,1174,1176,1175,1175,1174,1177,1173,1173,1173,1173,1178,1178,1179,1180,1180, +1181,1181,1181,1181,1181,1181,1181,1181,1181,1181,1179,1179,163,1180,1182,1173, +1173,1173,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 181 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -870,870,870,870,870,870,870,870,870,870,870,870,870,870,870,870, -870,870,870,870,870,870,870,870,870,870,870,870,870,870,870,870, -871,871,871,871,871,871,871,871,871,871,871,871,871,871,871,871, -871,871,871,871,871,871,871,871,871,871,871,871,871,871,871,871, -872,872,872,872,872,872,872,872,872,872,873,873,873,873,873,873, -873,873,873,120,120,120,120,120,120,120,120,120,120,120,120,874, +1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183, +1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183, +1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183,1183, +1184,1185,1185,1186,1186,1186,1186,1186,1186,1185,1186,1185,1185,1184,1185,1186, +1186,1185,1187,1188,1183,1183,1189,1183,163,163,163,163,163,163,163,163, +1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 182 */ -875,875,875,875,875,875,875,120,120,875,120,120,875,875,875,875, -875,875,875,875,120,875,875,120,875,875,875,875,875,875,875,875, -875,875,875,875,875,875,875,875,875,875,875,875,875,875,875,875, -876,877,877,877,877,877,120,877,877,120,120,878,878,877,878,879, -877,879,877,878,880,880,880,120,120,120,120,120,120,120,120,120, -881,881,881,881,881,881,881,881,881,881,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191, +1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191, +1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1191,1192, +1193,1193,1194,1194,1194,1194,163,163,1193,1193,1193,1193,1194,1194,1193,1195, +1196,1197,1198,1198,1199,1199,1200,1200,1200,1198,1198,1198,1198,1198,1198,1198, +1198,1198,1198,1198,1198,1198,1198,1198,1191,1191,1191,1191,1194,1194,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 183 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -882,882,882,882,882,882,882,882,120,120,882,882,882,882,882,882, -882,882,882,882,882,882,882,882,882,882,882,882,882,882,882,882, -882,882,882,882,882,882,882,882,882,882,882,882,882,882,882,882, -882,883,883,883,884,884,884,884,120,120,884,884,883,883,883,883, -884,882,885,882,883,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201, +1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201, +1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201,1201, +1202,1202,1202,1203,1203,1203,1203,1203,1203,1203,1203,1202,1202,1203,1202,1204, +1203,1205,1205,1206,1201,163,163,163,163,163,163,163,163,163,163,163, +1207,1207,1207,1207,1207,1207,1207,1207,1207,1207,163,163,163,163,163,163, +530,530,530,530,530,530,530,530,530,530,530,530,530,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 184 */ -886,887,887,887,887,887,887,887,887,887,887,886,886,886,886,886, -886,886,886,886,886,886,886,886,886,886,886,886,886,886,886,886, -886,886,886,886,886,886,886,886,886,886,886,886,886,886,886,886, -886,886,886,887,887,887,887,887,887,888,889,887,887,887,887,890, -890,890,890,890,890,890,890,887,120,120,120,120,120,120,120,120, -891,892,892,892,892,892,892,893,893,892,892,892,891,891,891,891, -891,891,891,891,891,891,891,891,891,891,891,891,891,891,891,891, -891,891,891,891,891,891,891,891,891,891,891,891,891,891,891,891, +1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208, +1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208, +1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1208,1209,1210,1209,1210,1210, +1209,1209,1209,1209,1209,1209,1211,1212,1208,1213,163,163,163,163,163,163, +1214,1214,1214,1214,1214,1214,1214,1214,1214,1214,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 185 */ -891,891,891,891,894,894,894,894,894,894,892,892,892,892,892,892, -892,892,892,892,892,892,892,893,892,892,895,895,895,891,895,895, -895,895,895,120,120,120,120,120,120,120,120,120,120,120,120,120, -370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, -896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, -896,896,896,896,896,896,896,896,896,896,896,896,896,896,896,896, -896,896,896,896,896,896,896,896,896,120,120,120,120,120,120,120, +1215,1215,1215,1215,1215,1215,1215,1215,1215,1215,1215,1215,1215,1215,1215,1215, +1215,1215,1215,1215,1215,1215,1215,1215,1215,1215,1215,163,163,1216,1216,1216, +1217,1217,1216,1216,1216,1216,1218,1216,1216,1216,1216,1219,163,163,163,163, +1220,1220,1220,1220,1220,1220,1220,1220,1220,1220,1221,1221,1222,1222,1222,1223, +1215,1215,1215,1215,1215,1215,1215,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 186 */ -897,897,897,897,897,897,897,897,897,120,897,897,897,897,897,897, -897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,897, -897,897,897,897,897,897,897,897,897,897,897,897,897,897,897,898, -899,899,899,899,899,899,899,120,899,899,899,899,899,899,898,899, -897,900,900,900,900,900,120,120,120,120,120,120,120,120,120,120, -901,901,901,901,901,901,901,901,901,901,902,902,902,902,902,902, -902,902,902,902,902,902,902,902,902,902,902,902,902,120,120,120, -903,903,904,904,904,904,904,904,904,904,904,904,904,904,904,904, +1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224, +1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224, +1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1224,1225,1225,1225,1226, +1226,1226,1226,1226,1226,1226,1226,1226,1225,1227,1228,1229,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 187 */ -904,904,904,904,904,904,904,904,904,904,904,904,904,904,904,904, -120,120,905,905,905,905,905,905,905,905,905,905,905,905,905,905, -905,905,905,905,905,905,905,905,120,906,905,905,905,905,905,905, -905,906,905,905,906,905,905,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230, +1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230,1230, +1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231, +1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231,1231, +1232,1232,1232,1232,1232,1232,1232,1232,1232,1232,1233,1233,1233,1233,1233,1233, +1233,1233,1233,163,163,163,163,163,163,163,163,163,163,163,163,1234, /* block 188 */ -907,907,907,907,907,907,907,120,907,907,120,907,907,907,907,907, -907,907,907,907,907,907,907,907,907,907,907,907,907,907,907,907, -907,907,907,907,907,907,907,907,907,907,907,907,907,907,907,907, -907,908,908,908,908,908,908,120,120,120,908,120,908,908,120,908, -908,908,908,908,908,908,909,908,120,120,120,120,120,120,120,120, -910,910,910,910,910,910,910,910,910,910,120,120,120,120,120,120, -911,911,911,911,911,911,120,911,911,120,911,911,911,911,911,911, -911,911,911,911,911,911,911,911,911,911,911,911,911,911,911,911, +1235,1235,1235,1235,1235,1235,1235,163,163,1235,163,163,1235,1235,1235,1235, +1235,1235,1235,1235,163,1235,1235,163,1235,1235,1235,1235,1235,1235,1235,1235, +1235,1235,1235,1235,1235,1235,1235,1235,1235,1235,1235,1235,1235,1235,1235,1235, +1236,1237,1237,1237,1237,1237,163,1237,1237,163,163,1238,1238,1239,1240,1241, +1237,1241,1237,1242,1243,1244,1243,163,163,163,163,163,163,163,163,163, +1245,1245,1245,1245,1245,1245,1245,1245,1245,1245,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 189 */ -911,911,911,911,911,911,911,911,911,911,912,912,912,912,912,120, -913,913,120,912,912,913,912,913,911,120,120,120,120,120,120,120, -914,914,914,914,914,914,914,914,914,914,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1246,1246,1246,1246,1246,1246,1246,1246,163,163,1246,1246,1246,1246,1246,1246, +1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246, +1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246,1246, +1246,1247,1247,1247,1248,1248,1248,1248,163,163,1248,1248,1247,1247,1247,1247, +1249,1246,1250,1246,1247,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 190 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915, -915,915,915,916,916,917,917,918,918,120,120,120,120,120,120,120, +1251,1252,1252,1252,1252,1252,1252,1253,1253,1252,1252,1251,1251,1251,1251,1251, +1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251, +1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251,1251, +1251,1251,1251,1254,1255,1252,1252,1252,1252,1256,1257,1252,1252,1252,1252,1258, +1258,1258,1259,1259,1258,1258,1258,1255,163,163,163,163,163,163,163,163, +1260,1261,1261,1261,1261,1261,1261,1262,1262,1261,1261,1261,1260,1260,1260,1260, +1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260, +1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260,1260, /* block 191 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -595,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -919,919,919,919,919,919,919,919,919,919,919,919,919,919,919,919, -295,295,919,295,919,297,297,297,297,297,297,297,297,298,298,298, -298,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297, -297,297,120,120,120,120,120,120,120,120,120,120,120,120,120,920, +1260,1260,1260,1260,1263,1263,1263,1263,1263,1263,1261,1261,1261,1261,1261,1261, +1261,1261,1261,1261,1261,1261,1261,1262,1264,1265,1266,1267,1267,1260,1266,1266, +1266,1268,1268,163,163,163,163,163,163,163,163,163,163,163,163,163, +495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, +1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269, +1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269, +1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269,1269, +1269,1269,1269,1269,1269,1269,1269,1269,1269,163,163,163,163,163,163,163, /* block 192 */ -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, +1270,1270,1270,1270,1270,1270,1270,1270,1270,163,1270,1270,1270,1270,1270,1270, +1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270, +1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1270,1271, +1272,1272,1272,1272,1272,1272,1272,163,1272,1272,1272,1272,1272,1272,1271,1273, +1270,1274,1274,1275,1276,1276,163,163,163,163,163,163,163,163,163,163, +1277,1277,1277,1277,1277,1277,1277,1277,1277,1277,1278,1278,1278,1278,1278,1278, +1278,1278,1278,1278,1278,1278,1278,1278,1278,1278,1278,1278,1278,163,163,163, +1279,1280,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281, /* block 193 */ -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281,1281, +163,163,1282,1282,1282,1282,1282,1282,1282,1282,1282,1282,1282,1282,1282,1282, +1282,1282,1282,1282,1282,1282,1282,1282,163,1283,1282,1282,1282,1282,1282,1282, +1282,1283,1282,1282,1283,1282,1282,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 194 */ -922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, -922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, -922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, -922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, -922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, -922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,922, -922,922,922,922,922,922,922,922,922,922,922,922,922,922,922,120, -923,923,923,923,923,120,120,120,120,120,120,120,120,120,120,120, +1284,1284,1284,1284,1284,1284,1284,163,1284,1284,163,1284,1284,1284,1284,1284, +1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284, +1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284,1284, +1284,1285,1285,1285,1285,1285,1285,163,163,163,1285,163,1285,1285,163,1285, +1285,1285,1286,1285,1287,1287,1288,1285,163,163,163,163,163,163,163,163, +1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,163,163,163,163,163,163, +1290,1290,1290,1290,1290,1290,163,1290,1290,163,1290,1290,1290,1290,1290,1290, +1290,1290,1290,1290,1290,1290,1290,1290,1290,1290,1290,1290,1290,1290,1290,1290, /* block 195 */ -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,921,921,921,921,921,921,921,921,921,921,921,921, -921,921,921,921,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1290,1290,1290,1290,1290,1290,1290,1290,1290,1290,1291,1291,1291,1291,1291,163, +1292,1292,163,1291,1291,1292,1291,1293,1290,163,163,163,163,163,163,163, +1294,1294,1294,1294,1294,1294,1294,1294,1294,1294,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 196 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, -924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, -924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, -924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, -924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, -924,924,924,924,924,924,924,924,924,924,924,924,924,924,924,924, -924,925,925,120,120,120,120,120,120,120,120,120,120,120,120,120, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1295,1295,1295,1295,1295,1295,1295,1295,1295,1295,1295,1295,1295,1295,1295,1295, +1295,1295,1295,1296,1296,1297,1297,1298,1298,163,163,163,163,163,163,163, /* block 197 */ -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +842,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1299,1299,1299,1299,1299,1299,1299,1299,1299,1299,1299,1299,1299,1299,1299,1299, +388,388,1299,388,1299,390,390,390,390,390,390,390,390,391,391,391, +391,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390, +390,390,163,163,163,163,163,163,163,163,163,163,163,163,163,1300, /* block 198 */ -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,926, -926,926,926,926,926,926,926,926,926,926,926,926,926,926,926,120, -927,927,927,927,927,927,927,927,927,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, /* block 199 */ -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 200 */ -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,928,928,928,928,928,928,928,928,928, -928,928,928,928,928,928,928,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302, +1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302, +1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302, +1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302, +1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302, +1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302, +1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,1302,163, +1303,1303,1303,1303,1303,163,163,163,163,163,163,163,163,163,163,163, /* block 201 */ -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301,1301, +1301,1301,1301,1301,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 202 */ -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606, -606,606,606,606,606,606,606,606,606,120,120,120,120,120,120,120, -929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,929, -929,929,929,929,929,929,929,929,929,929,929,929,929,929,929,120, -930,930,930,930,930,930,930,930,930,930,120,120,120,120,931,931, -932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304, +1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304, +1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304, +1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304, +1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304, +1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304,1304, +1304,1305,1305,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 203 */ -932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, -932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, -932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,932, -932,932,932,932,932,932,932,932,932,932,932,932,932,932,932,120, -933,933,933,933,933,933,933,933,933,933,120,120,120,120,120,120, -934,934,934,934,934,934,934,934,934,934,934,934,934,934,934,934, -934,934,934,934,934,934,934,934,934,934,934,934,934,934,120,120, -935,935,935,935,935,936,120,120,120,120,120,120,120,120,120,120, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, /* block 204 */ -937,937,937,937,937,937,937,937,937,937,937,937,937,937,937,937, -937,937,937,937,937,937,937,937,937,937,937,937,937,937,937,937, -937,937,937,937,937,937,937,937,937,937,937,937,937,937,937,937, -938,938,938,938,938,938,938,939,939,939,939,939,940,940,940,940, -941,941,941,941,939,940,120,120,120,120,120,120,120,120,120,120, -942,942,942,942,942,942,942,942,942,942,120,943,943,943,943,943, -943,943,120,937,937,937,937,937,937,937,937,937,937,937,937,937, -937,937,937,937,937,937,937,937,120,120,120,120,120,937,937,937, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306, +1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,1306,163, +1307,1307,1307,1307,1307,1307,1307,1307,1307,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 205 */ -937,937,937,937,937,937,937,937,937,937,937,937,937,937,937,937, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, /* block 206 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -944,944,944,944,944,944,944,944,944,944,944,944,944,944,944,944, -944,944,944,944,944,944,944,944,944,944,944,944,944,944,944,944, -945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, -945,945,945,945,945,945,945,945,945,945,945,945,945,945,945,945, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308,1308, +1308,1308,1308,1308,1308,1308,1308,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 207 */ -946,946,946,946,946,946,946,946,946,946,946,946,946,946,946,946, -946,946,946,946,946,946,946,947,947,947,947,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, /* block 208 */ -948,948,948,948,948,948,948,948,948,948,948,948,948,948,948,948, -948,948,948,948,948,948,948,948,948,948,948,948,948,948,948,948, -948,948,948,948,948,948,948,948,948,948,948,948,948,948,948,948, -948,948,948,948,948,948,948,948,948,948,948,948,948,948,948,948, -948,948,948,948,948,948,948,948,948,948,948,120,120,120,120,949, -948,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, -950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, -950,950,950,950,950,950,950,950,950,950,950,950,950,950,950,950, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858, +858,858,858,858,858,858,858,858,858,163,163,163,163,163,163,163, +1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309, +1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,1309,163, +1310,1310,1310,1310,1310,1310,1310,1310,1310,1310,163,163,163,163,1311,1311, +1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312, /* block 209 */ -950,950,950,950,950,950,950,950,120,120,120,120,120,120,120,949, -949,949,949,951,951,951,951,951,951,951,951,951,951,951,951,951, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -952,953,954,562,955,120,120,120,120,120,120,120,120,120,120,120, -956,956,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312, +1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312, +1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312, +1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,1312,163, +1313,1313,1313,1313,1313,1313,1313,1313,1313,1313,163,163,163,163,163,163, +1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314, +1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,1314,163,163, +1315,1315,1315,1315,1315,1316,163,163,163,163,163,163,163,163,163,163, /* block 210 */ -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, +1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317, +1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317, +1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317, +1318,1318,1318,1318,1318,1318,1318,1319,1319,1320,1321,1321,1322,1322,1322,1322, +1323,1323,1324,1324,1319,1322,163,163,163,163,163,163,163,163,163,163, +1325,1325,1325,1325,1325,1325,1325,1325,1325,1325,163,1326,1326,1326,1326,1326, +1326,1326,163,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317, +1317,1317,1317,1317,1317,1317,1317,1317,163,163,163,163,163,1317,1317,1317, /* block 211 */ -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,957,957,957,957,957,957,957,957, -957,957,957,957,957,957,957,957,120,120,120,120,120,120,120,120, +1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317,1317, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 212 */ -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327, +1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327,1327, +1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328, +1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328, /* block 213 */ -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,958,958,958,958,958,958,958,958,958,958, -958,958,958,958,958,958,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1329,1329,1329,1329,1329,1329,1329,1329,1329,1329,1329,1329,1329,1329,1329,1329, +1329,1329,1329,1329,1329,1329,1329,1330,1331,1332,1332,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 214 */ -957,957,957,957,957,957,957,957,957,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333, +1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333, +1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333, +1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333, +1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,1333,163,163,163,163,1334, +1333,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335, +1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335, +1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335,1335, /* block 215 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -584,584,584,584,120,584,584,584,584,584,584,584,120,584,584,120, +1335,1335,1335,1335,1335,1335,1335,1335,163,163,163,163,163,163,163,1336, +1336,1336,1336,1337,1337,1337,1337,1337,1337,1337,1337,1337,1337,1337,1337,1337, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1338,1339,1340,799,1341,163,163,163,163,163,163,163,163,163,163,163, +1342,1342,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 216 */ -583,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, /* block 217 */ -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343,1343, +1343,1343,1343,1343,1343,1343,1343,1343,163,163,163,163,163,163,163,163, /* block 218 */ -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578, -583,583,583,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -578,578,578,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,583,583,583,583,120,120,120,120,120,120,120,120, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, /* block 219 */ -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344,1344, +1344,1344,1344,1344,1344,1344,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 220 */ -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,959,959,959,959, -959,959,959,959,959,959,959,959,959,959,959,959,120,120,120,120, +1343,1343,1343,1343,1343,1343,1343,1343,1343,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 221 */ -960,960,960,960,960,960,960,960,960,960,960,960,960,960,960,960, -960,960,960,960,960,960,960,960,960,960,960,960,960,960,960,960, -960,960,960,960,960,960,960,960,960,960,960,960,960,960,960,960, -960,960,960,960,960,960,960,960,960,960,960,960,960,960,960,960, -960,960,960,960,960,960,960,960,960,960,960,960,960,960,960,960, -960,960,960,960,960,960,960,960,960,960,960,960,960,960,960,960, -960,960,960,960,960,960,960,960,960,960,960,120,120,120,120,120, -960,960,960,960,960,960,960,960,960,960,960,960,960,120,120,120, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1345,1345,1345,1345,163,1345,1345,1345,1345,1345,1345,1345,163,1345,1345,163, /* block 222 */ -960,960,960,960,960,960,960,960,960,120,120,120,120,120,120,120, -960,960,960,960,960,960,960,960,960,960,120,120,961,962,962,963, -964,964,964,964,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +824,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, /* block 223 */ -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,120,120, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,120,120,120,120,120,120,120,120,120, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, /* block 224 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819, +824,824,824,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +819,819,819,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,824,824,824,824,163,163,163,163,163,163,163,163, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, /* block 225 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20,120,120,120,120,120,120,120,120,120,120, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, /* block 226 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20,120,120, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20,965,966,113,113,113, 20, 20, 20,966,965,965, -965,965,965, 24, 24, 24, 24, 24, 24, 24, 24,113,113,113,113,113, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346, +1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,1346,163,163,163,163, /* block 227 */ -113,113,113, 20, 20,113,113,113,113,113,113,113, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,113,113,113,113, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,163,163,163,163,163, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,163,163,163, /* block 228 */ -692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692, -692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692, -692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692, -692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692, -692,692,967,967,967,692,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1347,1347,1347,1347,1347,1347,1347,1347,1347,163,163,163,163,163,163,163, +1347,1347,1347,1347,1347,1347,1347,1347,1347,1347,163,163,1348,1349,1350,1351, +1352,1352,1352,1352,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 229 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25,120,120,120,120,120,120,120,120,120,120,120,120, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,163,163, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, +154,154,154,154,154,154,154,163,163,163,163,163,163,163,163,163, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, /* block 230 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120,120,120,120,120, -587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587, -587,587, 25, 25, 25, 25, 25, 25, 25,120,120,120,120,120,120,120, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 231 */ -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,519,519, -519,519,519,519,519,120,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, /* block 232 */ -518,518,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,518,120,518,518, -120,120,518,120,120,518,518,120,120,518,518,518,518,120,518,518, -518,518,518,518,518,518,519,519,519,519,120,519,120,519,519,519, -519,519,519,519,120,519,519,519,519,519,519,519,519,519,519,519, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,163,163,163,163,163,163,163,163,163,163, /* block 233 */ -519,519,519,519,518,518,120,518,518,518,518,120,120,518,518,518, -518,518,518,518,518,120,518,518,518,518,518,518,518,120,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,518,518,120,518,518,518,518,120, -518,518,518,518,518,120,518,120,120,120,518,518,518,518,518,518, -518,120,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,163,163,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,1353,1354,154,154,154,460,460,460,1355,1356,1356, +1356,1356,1356, 51, 51, 51, 51, 51, 51, 51, 51,154,154,154,154,154, /* block 234 */ -518,518,518,518,518,518,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, +154,154,154,460,460,154,154,154,154,154,154,154,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,154,154,154,154,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,723,723,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 235 */ -519,519,519,519,519,519,519,519,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, +1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002, +1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002, +1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002, +1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002,1002, +1002,1002,1357,1357,1357,1002,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 236 */ -518,518,518,518,518,518,518,518,518,518,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,120,120,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518, 9,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519, 9,519,519,519,519, -519,519,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518, 9,519,519,519,519, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835, +835,835,835,835,163,163,163,163,163,163,163,163,163,163,163,163, /* block 237 */ -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519, 9,519,519,519,519,519,519,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518, 9,519,519,519,519,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, 9, -519,519,519,519,519,519,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, 9, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,163,163,163,163,163,163,163,163,163, +832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832, +832,832,835,835,835,835,835,835,835,163,163,163,163,163,163,163, /* block 238 */ -519,519,519,519,519,519,519,519,519, 9,519,519,519,519,519,519, -518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518, -518,518,518,518,518,518,518,518,518, 9,519,519,519,519,519,519, -519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519, -519,519,519, 9,519,519,519,519,519,519,518,519,120,120, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,725,725,725,725,725,725, +725,725,736,736,725,725,725,725,725,725,725,725,725,725,725,725, +725,725,725,725,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,725,725, +725,725,725,725,725,163,736,736,725,725,725,725,725,725,725,725, +725,725,725,725,725,725,725,725,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, /* block 239 */ -968,968,968,968,968,968,968,968,968,968,968,968,968,968,968,968, -968,968,968,968,968,968,968,968,968,968,968,968,968,968,968,968, -968,968,968,968,968,968,968,968,968,968,968,968,968,968,968,968, -968,968,968,968,968,968,968,968,968,968,968,968,968,968,968,968, -968,968,968,968,968,968,968,968,968,968,968,968,968,968,968,968, -968,968,968,968,968,968,968,968,968,968,968,968,968,968,968,968, -968,968,968,968,968,968,968,968,968,968,968,968,968,968,968,968, -968,968,968,968,968,968,968,968,968,968,968,968,968,968,968,968, +724,724,725,725,725,725,725,725,725,725,736,736,725,725,725,725, +725,725,725,725,725,725,725,725,725,725,725,725,724,163,724,724, +163,163,724,163,163,724,724,163,163,724,724,724,724,163,724,724, +724,724,724,724,724,724,725,725,725,725,163,725,163,725,736,736, +725,725,725,725,163,725,725,725,725,725,725,725,725,725,725,725, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,725,725,725,725,725,725, +725,725,736,736,725,725,725,725,725,725,725,725,725,725,725,725, /* block 240 */ -969,969,969,969,969,969,969,969,969,969,969,969,969,969,969,969, -969,969,969,969,969,969,969,969,969,969,969,969,969,969,969,969, -969,969,969,969,969,969,969,969,969,969,969,969,969,969,969,969, -969,969,969,969,969,969,969,968,968,968,968,969,969,969,969,969, -969,969,969,969,969,969,969,969,969,969,969,969,969,969,969,969, -969,969,969,969,969,969,969,969,969,969,969,969,969,969,969,969, -969,969,969,969,969,969,969,969,969,969,969,969,969,968,968,968, -968,968,968,968,968,969,968,968,968,968,968,968,968,968,968,968, +725,725,725,725,724,724,163,724,724,724,724,163,163,724,724,724, +724,724,724,724,724,163,724,724,724,724,724,724,724,163,725,725, +725,725,725,725,725,725,736,736,725,725,725,725,725,725,725,725, +725,725,725,725,725,725,725,725,724,724,163,724,724,724,724,163, +724,724,724,724,724,163,724,163,163,163,724,724,724,724,724,724, +724,163,725,725,725,725,725,725,725,725,736,736,725,725,725,725, +725,725,725,725,725,725,725,725,725,725,725,725,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, /* block 241 */ -968,968,968,968,969,968,968,970,970,970,970,970,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,969,969,969,969,969, -120,969,969,969,969,969,969,969,969,969,969,969,969,969,969,969, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +724,724,724,724,724,724,725,725,725,725,725,725,725,725,736,736, +725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,725,725,725,725,725,725, +725,725,736,736,725,725,725,725,725,725,725,725,725,725,725,725, +725,725,725,725,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,725,725, +725,725,725,725,725,725,736,736,725,725,725,725,725,725,725,725, /* block 242 */ - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 22, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +725,725,725,725,725,725,725,725,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,725,725,725,725,725,725,725,725,736,736,725,725,725,725, +725,725,725,725,725,725,725,725,725,725,725,725,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,725,725,725,725,725,725,725,725,736,736, +725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, /* block 243 */ -971,971,971,971,971,971,971,120,971,971,971,971,971,971,971,971, -971,971,971,971,971,971,971,971,971,120,120,971,971,971,971,971, -971,971,120,971,971,120,971,971,971,971,971,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +724,724,724,724,724,724,724,724,724,724,725,725,725,725,725,725, +725,725,736,736,725,725,725,725,725,725,725,725,725,725,725,725, +725,725,725,725,725,725,163,163,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,1358,725,725,725,725,725,725,725,725,725,725,725,725,725,725, +725,725,725,725,725,725,725,725,725,725,725,715,725,725,725,725, +725,725,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,1358,725,725,725,725, /* block 244 */ -972,972,972,972,972,972,972,972,972,972,972,972,972,972,972,972, -972,972,972,972,972,972,972,972,972,972,972,972,972,972,972,972, -972,972,972,972,972,972,972,972,972,972,972,972,972,120,120,120, -973,973,973,973,973,973,973,974,974,974,974,974,974,974,120,120, -975,975,975,975,975,975,975,975,975,975,120,120,120,120,972,976, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725, +725,725,725,725,725,715,725,725,725,725,725,725,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,1358,725,725,725,725,725,725,725,725,725,725, +725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,715, +725,725,725,725,725,725,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,1358, +725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725, /* block 245 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -977,977,977,977,977,977,977,977,977,977,977,977,977,977,977,977, -977,977,977,977,977,977,977,977,977,977,977,977,977,977,978,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -979,979,979,979,979,979,979,979,979,979,979,979,979,979,979,979, -979,979,979,979,979,979,979,979,979,979,979,979,979,979,979,979, -979,979,979,979,979,979,979,979,979,979,979,979,980,980,980,980, -981,981,981,981,981,981,981,981,981,981,120,120,120,120,120,982, +725,725,725,725,725,725,725,725,725,715,725,725,725,725,725,725, +724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724, +724,724,724,724,724,724,724,724,724,1358,725,725,725,725,725,725, +725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725, +725,725,725,715,725,725,725,725,725,725,724,725,163,163,1359,1359, +1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359, +1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359, +1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359,1359, /* block 246 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -361,361,361,361,361,361,361,120,361,361,361,361,120,361,361,120, -361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,120, +1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, +1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, +1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, +1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, +1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, +1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, +1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, +1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, /* block 247 */ -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, +1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361, +1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361, +1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361, +1361,1361,1361,1361,1361,1361,1361,1360,1360,1360,1360,1361,1361,1361,1361,1361, +1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361, +1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361, +1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1360,1360,1360, +1360,1360,1360,1360,1360,1361,1360,1360,1360,1360,1360,1360,1360,1360,1360,1360, /* block 248 */ -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,983,983,983,983,983,983,983,983,983,983,983, -983,983,983,983,983,120,120,984,984,984,984,984,984,984,984,984, -985,985,985,985,985,985,985,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1360,1360,1360,1360,1361,1360,1360,1362,1363,1362,1362,1364,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,1361,1361,1361,1361,1361, +163,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361,1361, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 249 */ -986,986,986,986,986,986,986,986,986,986,986,986,986,986,986,986, -986,986,986,986,986,986,986,986,986,986,986,986,986,986,986,986, -986,986,987,987,987,987,987,987,987,987,987,987,987,987,987,987, -987,987,987,987,987,987,987,987,987,987,987,987,987,987,987,987, -987,987,987,987,988,988,988,988,988,988,988,989,120,120,120,120, -990,990,990,990,990,990,990,990,990,990,120,120,120,120,991,991, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 92, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,643, 70, 70, 70, 70,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 250 */ -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +1365,1365,1365,1365,1365,1365,1365,163,1365,1365,1365,1365,1365,1365,1365,1365, +1365,1365,1365,1365,1365,1365,1365,1365,1365,163,163,1365,1365,1365,1365,1365, +1365,1365,163,1365,1365,163,1365,1365,1365,1365,1365,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 251 */ - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 20, 25, 25, 25, - 6, 25, 25, 25, 25,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366, +1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366, +1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,1366,163,163,163, +1367,1367,1367,1367,1367,1367,1367,1368,1368,1368,1368,1368,1369,1369,163,163, +1370,1370,1370,1370,1370,1370,1370,1370,1370,1370,163,163,163,163,1366,1371, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, /* block 252 */ -120, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 20, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372, +1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1372,1373,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374, +1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374, +1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1374,1375,1375,1375,1375, +1376,1376,1376,1376,1376,1376,1376,1376,1376,1376,163,163,163,163,163,1377, /* block 253 */ -225,225,225,225,120,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225, -120,225,225,120,225,120,120,225,120,225,225,225,225,225,225,225, -225,225,225,120,225,225,225,225,120,225,120,225,120,120,120,120, -120,120,225,120,120,120,120,225,120,225,120,225,120,225,225,225, -120,225,225,120,225,120,120,225,120,225,120,225,120,225,120,225, -120,225,225,120,225,120,120,225,225,225,225,120,225,225,225,225, -225,225,225,120,225,225,225,225,120,225,225,225,225,120,225,120, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +483,483,483,483,483,483,483,163,483,483,483,483,163,483,483,163, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,163, /* block 254 */ -225,225,225,225,225,225,225,225,225,225,120,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,120,120,120,120, -120,225,225,225,120,225,225,225,225,225,120,225,225,225,225,225, -225,225,225,225,225,225,225,225,225,225,225,225,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -217,217,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, /* block 255 */ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378,1378, +1378,1378,1378,1378,1378,262,262,1379,1379,1379,1379,1379,1379,1379,1379,1379, +1380,1380,1380,1380,1380,1380,1380,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 256 */ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21,992,992,992,992,992,992,992,992,992,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992, -992, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, -992, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, -992, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21,992,992,992,992,992,992,992,992,992,992, +1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381, +1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381,1381, +1381,1381,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382, +1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382,1382, +1382,1382,1382,1382,1383,1383,1383,1384,1385,1385,1385,1386,262,262,262,262, +1387,1387,1387,1387,1387,1387,1387,1387,1387,1387,262,262,262,262,1388,1388, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 257 */ - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 21, 21, 21, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, - 21, 21, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +302,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389, /* block 258 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 20, - 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,993,993,993,993,993,993,993,993,993,993, -993,993,993,993,993,993,993,993,993,993,993,993,993,993,993,993, +1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389, +1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389, +1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1390,1389,1389,1389, +1391,1389,1389,1389,1389,302,302,302,302,302,302,302,302,302,302,302, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 259 */ -994, 21, 21,992,992,992,992,992,992,992,992,992,992,992,992,992, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, - 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20,992,992,992,992, - 20, 20, 20, 20, 20, 20, 20, 20, 20,992,992,992,992,992,992,992, -589,589,992,992,992,992,992,992,992,992,992,992,992,992,992,992, - 21, 21, 21, 21, 21, 21,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, +302,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389, +1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389, +1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1390,1389, +1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,1389,302,302, +302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, +262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, /* block 260 */ -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, +1392,1392,1392,1392,302,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392, +1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392, +302,1392,1392,302,1392,302,302,1392,302,1392,1392,1392,1392,1392,1392,1392, +1392,1392,1392,302,1392,1392,1392,1392,302,1392,302,1392,302,302,302,302, +302,302,1392,302,302,302,302,1392,302,1392,302,1392,302,1392,1392,1392, +302,1392,1392,302,1392,302,302,1392,302,1392,302,1392,302,1392,302,1392, +302,1392,1392,302,1392,302,302,1392,1392,1392,1392,302,1392,1392,1392,1392, +1392,1392,1392,302,1392,1392,1392,1392,302,1392,1392,1392,1392,302,1392,302, /* block 261 */ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,302,1392,1392,1392,1392,1392, +1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,302,302,302,302, +302,1392,1392,1392,302,1392,1392,1392,1392,1392,302,1392,1392,1392,1392,1392, +1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,1392,302,302,302,302, +302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302, +302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302, +302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302, +274,274,302,302,302,302,302,302,302,302,302,302,302,302,302,302, /* block 262 */ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,995,995,995,995,995, +1393,1393,1393,1393,1394,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1395,1395,1395,1395, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, /* block 263 */ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 20, - 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1395, +1395,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1395,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1394, +1395,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, /* block 264 */ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 58, 58,1393,1393,1393, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,1393, +1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396, +1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,460,460,460,460,460,460, +1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396, +1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,723,723,1393,1393,1393,1393, +1397,1397,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,1397,1397, /* block 265 */ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21,992,992,992,992,992, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992,992,992, +1396,1396,1396,1396,1396,1396,1396,1396,1396,1396,460,460,460,460,1398,460, +460,1398,1398,1398,1398,1398,1398,1398,1398,1398,1398,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,1393,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1399,1399,1399,1399,1399,1399,1399,1399,1399,1399, +1399,1399,1399,1399,1399,1399,1399,1399,1399,1399,1399,1399,1399,1399,1399,1399, /* block 266 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20,992,992,992,992,992,992,992,992,992,992,992,992, +1400,1398,1401,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +460,460,460,460,460,460,460,460,460,460,1398,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,1398, +460,460,1398,1398,1398,1398,1398,1401,1398,1398,1398,460,1395,1395,1395,1395, +460,460,460,460,460,460,460,460,460,1395,1395,1395,1395,1395,1395,1395, +1402,1402,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1393,1393,1393,1393,1393,1393,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, /* block 267 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 21, 21, 21, 21,992,992,992,992,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992,992,992,992, - 21,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, /* block 268 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,992,992,992,992, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20,992,992,992,992,992,992,992,992, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,992,992,992,992,992,992, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,727,1393,1393,727,727,727,727,727,727,727,727,727,1394,1394,1394, +1394,1394,1394,1394,1394,1394,727,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,727,1394,1394, /* block 269 */ - 20, 20, 20, 20, 20, 20, 20, 20,992,992,992,992,992,992,992,992, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,992,992, - 21, 21,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, +1394,1394,1394,1394,1394,1403,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1393,1393,727,727,1393,727,727,727,1393,1393,727,727, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1403,1403,1403,1394,1394,1403,1394,1394,1403,1404,1404,727,727,1394, +1394,1394,1394,1394,727,727,727,727,727,727,727,727,727,727,727,727, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1393,1393,727,1394,727,1393,727,1394,1394,1394,1405,1405,1405,1405,1405, /* block 270 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,727, +1394,727,1403,1403,1394,1394,1403,1403,1403,1403,1403,1403,1403,1403,1403,1403, +1403,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1403,1403,1403,1403,1403,1403,1403,1403,1403,1403, +1403,1403,1403,1403,1403,1403,1403,1403,1403,1394,1394,1394,1403,1394,1394,1394, /* block 271 */ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21,992,992,992,992,992,992,992,992,992,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992,992, - 21, 21, 21, 21, 21,992,992,992, 21, 21, 21, 21, 21,992,992,992, +1394,1403,1403,1403,1394,1403,1403,1403,1394,1394,1394,1394,1394,1394,1394,1403, +1394,1403,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1403,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,727,1393,1394, /* block 272 */ - 21, 21, 21, 21, 21, 21, 21,992,992,992,992,992,992,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992,992,992,992,992, - 21, 21, 21, 21, 21, 21,992,992,992,992,992,992,992,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,992,992,992,992,992,992, - 21, 21, 21, 21, 21, 21, 21, 21,992,992,992,992,992,992,992,992, - 21, 21, 21, 21, 21, 21, 21,992,992,992,992,992,992,992,992,992, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,723,723, +723,723,723,723,723,723,1393,1393,1393,727,727,1394,1394,1394,1394,1393, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1393,1393,1393,1393,1393,1393,1393,727, +727,1393,1393,727,1404,1404,727,727,727,727,1403,1393,1393,1393,1393,1393, /* block 273 */ - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20,120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,120,120,120,120,120,120, +1393,1393,1393,1393,1393,1393,1393,727,1393,1393,727,727,727,727,1393,1393, +1404,1393,1393,1393,1393,1403,1403,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1394,727,1393,1393,727,1393,1393,1393,1393,1393,1393,1393, +1393,727,727,1393,1393,1393,1393,1393,1393,1393,1393,1393,727,1393,1393,1393, +1393,1393,727,727,727,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,727,727,727,1393,1393,1393,1393,1393,1393,1393,1393,727,727,727,1393, +1393,727,1393,727,1393,1393,1393,1393,727,1393,1393,1393,1393,1393,1393,727, +1393,1393,1393,727,1393,1393,1393,1393,1393,1393,727,1394,1394,1394,1394,1394, /* block 274 */ -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,992,992, -992,992,992,992,992,992,992,992,992,992,992,992,992,992,120,120, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1403,1403,1403,1394,1394,1394,1403,1403,1403,1403,1403, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, /* block 275 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1403,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1403,1403,1403,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1403,1394,1394,1394,1394,1394,1393,1393,1393,1393,1393,727,1403,727,727,727, +1394,1394,1394,1393,1393,1394,1394,1394,1395,1395,1395,1395,1395,1394,1394,1394, +727,727,727,727,727,727,1393,1393,1393,727,1393,1394,1394,1395,1395,1395, +727,1393,1393,727,1394,1394,1394,1394,1394,1394,1394,1394,1394,1395,1395,1395, /* block 276 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,120,120,120,120,120,120,120, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, /* block 277 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,120,120, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,1393,1393,1393,1393,1395,1395,1395,1395,1395,1395,1395, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1395,1395,1395,1395, +1394,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, /* block 278 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, +723,723,723,723,723,723,723,723,723,723,723,723,1395,1395,1395,1395, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,1395,1395,1395,1395,1395,1395,1395,1395, +723,723,723,723,723,723,723,723,723,723,1395,1395,1395,1395,1395,1395, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, /* block 279 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +723,723,723,723,723,723,723,723,1395,1395,1395,1395,1395,1395,1395,1395, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,1395,1395, +1393,1393,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, /* block 280 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +723,723,723,723,723,723,723,723,723,723,723,723,1403,1394,1394,1403, +1394,1394,1394,1394,1394,1394,1394,1394,1403,1403,1403,1403,1403,1403,1403,1403, +1394,1394,1394,1394,1394,1394,1403,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1403,1403,1403,1403,1403,1403,1403,1403,1403,1403,1394,723,1403,1403,1403,1394, +1394,1394,1394,1394,1394,1394,723,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1403,1394,1394,1394,1394,1394,1394,1394,1394, /* block 281 */ -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591, -591,591,591,591,591,591,591,591,591,591,591,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1406,1406,1406,1406,1394,1403,1403,1394,1403,1403,1394,1403,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1403,1403,1403, +1394,1403,1403,1403,1403,1403,1403,1403,1403,1403,1403,1403,1403,1403,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, /* block 282 */ -516, 24,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -996,996,996,996,996,996,996,996,996,996,996,996,996,996,996,996, -996,996,996,996,996,996,996,996,996,996,996,996,996,996,996,996, -996,996,996,996,996,996,996,996,996,996,996,996,996,996,996,996, -996,996,996,996,996,996,996,996,996,996,996,996,996,996,996,996, -996,996,996,996,996,996,996,996,996,996,996,996,996,996,996,996, -996,996,996,996,996,996,996,996,996,996,996,996,996,996,996,996, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393, +1393,1393,1393,1393,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1393,1395,1395, +1394,1394,1394,1394,1394,1395,1395,1395,1394,1394,1394,1394,1394,1395,1395,1395, /* block 283 */ -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, +1394,1394,1394,1394,1394,1394,1394,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1395,1395,1395, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1395,1395,1395,1395,1395, +1394,1394,1394,1403,1403,1403,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1395,1395,1395,1395,1395,1395, +1394,1394,1394,1394,1394,1394,1394,1394,1395,1395,1395,1395,1395,1395,1395,1395, +1403,1403,1403,1403,1403,1403,1403,1395,1395,1395,1395,1395,1395,1395,1395,1395, /* block 284 */ -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, /* block 285 */ -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, -516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,163,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723, +723,723,723,723,723,723,723,723,723,723,723,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +1407,1407,1407,1407,1407,1407,1407,1407,1407,1407,163,163,163,163,163,163, /* block 286 */ -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678, -678,678,678,678,678,678,678,678,678,678,678,678,678,678,120,120, - +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395, +1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,1395,958,958, + +/* block 287 */ +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, + +/* block 288 */ +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,163,163,163,163,163,163,163, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, + +/* block 289 */ +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,163,163, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, + +/* block 290 */ +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, + +/* block 291 */ +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, + +/* block 292 */ +953,953,953,953,953,953,953,953,953,953,953,953,953,953,953,953, +953,953,953,953,953,953,953,953,953,953,953,953,953,953,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, + +/* block 293 */ +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,958,958, + +/* block 294 */ +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838, +838,838,838,838,838,838,838,838,838,838,838,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, + +/* block 295 */ +707,712,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408, +1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408, +1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408, +1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408, +1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408, +1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408,1408, + +/* block 296 */ +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, + +/* block 297 */ +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, + +/* block 298 */ +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +961,961,961,961,961,961,961,961,961,961,961,961,961,961,961,961, +707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707, + +/* block 299 */ +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,952,952, +952,952,952,952,952,952,952,952,952,952,952,952,952,952,958,958, }; #if UCD_BLOCK_SIZE != 128 @@ -4622,3 +5392,5 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 73472 bytes, block = 128 */ #endif /* SUPPORT_UNICODE */ #endif /* PCRE2_PCRE2TEST */ + +/* End of pcre2_ucd.c */ diff --git a/thirdparty/pcre2/src/pcre2_ucp.h b/thirdparty/pcre2/src/pcre2_ucp.h index d84f269e87..282238982d 100644 --- a/thirdparty/pcre2/src/pcre2_ucp.h +++ b/thirdparty/pcre2/src/pcre2_ucp.h @@ -7,7 +7,11 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2018 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge + +This module is auto-generated from Unicode data files. DO NOT EDIT MANUALLY! +Instead, modify the maint/GenerateUcpHeader.py script and run it to generate +a new version of this code. ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -38,31 +42,27 @@ POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ - #ifndef PCRE2_UCP_H_IDEMPOTENT_GUARD #define PCRE2_UCP_H_IDEMPOTENT_GUARD -/* This file contains definitions of the property values that are returned by -the UCD access macros. New values that are added for new releases of Unicode -should always be at the end of each enum, for backwards compatibility. +/* This file contains definitions of the Unicode property values that are +returned by the UCD access macros and used throughout PCRE2. -IMPORTANT: Note also that the specific numeric values of the enums have to be -the same as the values that are generated by the maint/MultiStage2.py script, -where the equivalent property descriptive names are listed in vectors. - -ALSO: The specific values of the first two enums are assumed for the table -called catposstab in pcre2_compile.c. */ +IMPORTANT: The specific values of the first two enums (general and particular +character categories) are assumed by the table called catposstab in the file +pcre2_auto_possess.c. They are unlikely to change, but should be checked after +an update. */ /* These are the general character categories. */ enum { - ucp_C, /* Other */ - ucp_L, /* Letter */ - ucp_M, /* Mark */ - ucp_N, /* Number */ - ucp_P, /* Punctuation */ - ucp_S, /* Symbol */ - ucp_Z /* Separator */ + ucp_C, + ucp_L, + ucp_M, + ucp_N, + ucp_P, + ucp_S, + ucp_Z, }; /* These are the particular character categories. */ @@ -97,7 +97,98 @@ enum { ucp_So, /* Other symbol */ ucp_Zl, /* Line separator */ ucp_Zp, /* Paragraph separator */ - ucp_Zs /* Space separator */ + ucp_Zs, /* Space separator */ +}; + +/* These are Boolean properties. */ + +enum { + ucp_ASCII, + ucp_ASCII_Hex_Digit, + ucp_Alphabetic, + ucp_Bidi_Control, + ucp_Bidi_Mirrored, + ucp_Case_Ignorable, + ucp_Cased, + ucp_Changes_When_Casefolded, + ucp_Changes_When_Casemapped, + ucp_Changes_When_Lowercased, + ucp_Changes_When_Titlecased, + ucp_Changes_When_Uppercased, + ucp_Dash, + ucp_Default_Ignorable_Code_Point, + ucp_Deprecated, + ucp_Diacritic, + ucp_Emoji, + ucp_Emoji_Component, + ucp_Emoji_Modifier, + ucp_Emoji_Modifier_Base, + ucp_Emoji_Presentation, + ucp_Extended_Pictographic, + ucp_Extender, + ucp_Grapheme_Base, + ucp_Grapheme_Extend, + ucp_Grapheme_Link, + ucp_Hex_Digit, + ucp_IDS_Binary_Operator, + ucp_IDS_Trinary_Operator, + ucp_ID_Continue, + ucp_ID_Start, + ucp_Ideographic, + ucp_Join_Control, + ucp_Logical_Order_Exception, + ucp_Lowercase, + ucp_Math, + ucp_Noncharacter_Code_Point, + ucp_Pattern_Syntax, + ucp_Pattern_White_Space, + ucp_Prepended_Concatenation_Mark, + ucp_Quotation_Mark, + ucp_Radical, + ucp_Regional_Indicator, + ucp_Sentence_Terminal, + ucp_Soft_Dotted, + ucp_Terminal_Punctuation, + ucp_Unified_Ideograph, + ucp_Uppercase, + ucp_Variation_Selector, + ucp_White_Space, + ucp_XID_Continue, + ucp_XID_Start, + /* This must be last */ + ucp_Bprop_Count +}; + +/* Size of entries in ucd_boolprop_sets[] */ + +#define ucd_boolprop_sets_item_size 2 + +/* These are the bidi class values. */ + +enum { + ucp_bidiAL, /* Arabic letter */ + ucp_bidiAN, /* Arabic number */ + ucp_bidiB, /* Paragraph separator */ + ucp_bidiBN, /* Boundary neutral */ + ucp_bidiCS, /* Common separator */ + ucp_bidiEN, /* European number */ + ucp_bidiES, /* European separator */ + ucp_bidiET, /* European terminator */ + ucp_bidiFSI, /* First strong isolate */ + ucp_bidiL, /* Left to right */ + ucp_bidiLRE, /* Left to right embedding */ + ucp_bidiLRI, /* Left to right isolate */ + ucp_bidiLRO, /* Left to right override */ + ucp_bidiNSM, /* Non-spacing mark */ + ucp_bidiON, /* Other neutral */ + ucp_bidiPDF, /* Pop directional format */ + ucp_bidiPDI, /* Pop directional isolate */ + ucp_bidiR, /* Right to left */ + ucp_bidiRLE, /* Right to left embedding */ + ucp_bidiRLI, /* Right to left isolate */ + ucp_bidiRLO, /* Right to left override */ + ucp_bidiS, /* Segment separator */ + ucp_bidiWS, /* White space */ }; /* These are grapheme break properties. The Extended Pictographic property @@ -115,191 +206,189 @@ enum { ucp_gbT, /* 8 Hangul syllable type T */ ucp_gbLV, /* 9 Hangul syllable type LV */ ucp_gbLVT, /* 10 Hangul syllable type LVT */ - ucp_gbRegionalIndicator, /* 11 */ + ucp_gbRegional_Indicator, /* 11 */ ucp_gbOther, /* 12 */ ucp_gbZWJ, /* 13 */ - ucp_gbExtended_Pictographic /* 14 */ + ucp_gbExtended_Pictographic, /* 14 */ }; /* These are the script identifications. */ enum { - ucp_Unknown, - ucp_Arabic, - ucp_Armenian, - ucp_Bengali, - ucp_Bopomofo, - ucp_Braille, - ucp_Buginese, - ucp_Buhid, - ucp_Canadian_Aboriginal, - ucp_Cherokee, - ucp_Common, - ucp_Coptic, - ucp_Cypriot, + /* Scripts which has characters in other scripts. */ + ucp_Latin, + ucp_Greek, ucp_Cyrillic, - ucp_Deseret, + ucp_Arabic, + ucp_Syriac, + ucp_Thaana, ucp_Devanagari, - ucp_Ethiopic, - ucp_Georgian, - ucp_Glagolitic, - ucp_Gothic, - ucp_Greek, - ucp_Gujarati, + ucp_Bengali, ucp_Gurmukhi, - ucp_Han, - ucp_Hangul, - ucp_Hanunoo, - ucp_Hebrew, - ucp_Hiragana, - ucp_Inherited, + ucp_Gujarati, + ucp_Oriya, + ucp_Tamil, + ucp_Telugu, ucp_Kannada, - ucp_Katakana, - ucp_Kharoshthi, - ucp_Khmer, - ucp_Lao, - ucp_Latin, - ucp_Limbu, - ucp_Linear_B, ucp_Malayalam, - ucp_Mongolian, - ucp_Myanmar, - ucp_New_Tai_Lue, - ucp_Ogham, - ucp_Old_Italic, - ucp_Old_Persian, - ucp_Oriya, - ucp_Osmanya, - ucp_Runic, - ucp_Shavian, ucp_Sinhala, - ucp_Syloti_Nagri, - ucp_Syriac, + ucp_Myanmar, + ucp_Georgian, + ucp_Hangul, + ucp_Mongolian, + ucp_Hiragana, + ucp_Katakana, + ucp_Bopomofo, + ucp_Han, + ucp_Yi, ucp_Tagalog, + ucp_Hanunoo, + ucp_Buhid, ucp_Tagbanwa, + ucp_Limbu, ucp_Tai_Le, - ucp_Tamil, - ucp_Telugu, - ucp_Thaana, + ucp_Linear_B, + ucp_Cypriot, + ucp_Buginese, + ucp_Coptic, + ucp_Glagolitic, + ucp_Syloti_Nagri, + ucp_Phags_Pa, + ucp_Nko, + ucp_Kayah_Li, + ucp_Javanese, + ucp_Kaithi, + ucp_Mandaic, + ucp_Chakma, + ucp_Sharada, + ucp_Takri, + ucp_Duployan, + ucp_Grantha, + ucp_Khojki, + ucp_Linear_A, + ucp_Mahajani, + ucp_Manichaean, + ucp_Modi, + ucp_Old_Permic, + ucp_Psalter_Pahlavi, + ucp_Khudawadi, + ucp_Tirhuta, + ucp_Multani, + ucp_Adlam, + ucp_Masaram_Gondi, + ucp_Dogra, + ucp_Gunjala_Gondi, + ucp_Hanifi_Rohingya, + ucp_Sogdian, + ucp_Nandinagari, + ucp_Yezidi, + ucp_Cypro_Minoan, + ucp_Old_Uyghur, + + /* Scripts which has no characters in other scripts. */ + ucp_Unknown, + ucp_Common, + ucp_Armenian, + ucp_Hebrew, ucp_Thai, + ucp_Lao, ucp_Tibetan, - ucp_Tifinagh, + ucp_Ethiopic, + ucp_Cherokee, + ucp_Canadian_Aboriginal, + ucp_Ogham, + ucp_Runic, + ucp_Khmer, + ucp_Old_Italic, + ucp_Gothic, + ucp_Deseret, + ucp_Inherited, ucp_Ugaritic, - ucp_Yi, - /* New for Unicode 5.0 */ + ucp_Shavian, + ucp_Osmanya, + ucp_Braille, + ucp_New_Tai_Lue, + ucp_Tifinagh, + ucp_Old_Persian, + ucp_Kharoshthi, ucp_Balinese, ucp_Cuneiform, - ucp_Nko, - ucp_Phags_Pa, ucp_Phoenician, - /* New for Unicode 5.1 */ - ucp_Carian, - ucp_Cham, - ucp_Kayah_Li, + ucp_Sundanese, ucp_Lepcha, - ucp_Lycian, - ucp_Lydian, ucp_Ol_Chiki, - ucp_Rejang, - ucp_Saurashtra, - ucp_Sundanese, ucp_Vai, - /* New for Unicode 5.2 */ + ucp_Saurashtra, + ucp_Rejang, + ucp_Lycian, + ucp_Carian, + ucp_Lydian, + ucp_Cham, + ucp_Tai_Tham, + ucp_Tai_Viet, ucp_Avestan, - ucp_Bamum, ucp_Egyptian_Hieroglyphs, - ucp_Imperial_Aramaic, - ucp_Inscriptional_Pahlavi, - ucp_Inscriptional_Parthian, - ucp_Javanese, - ucp_Kaithi, + ucp_Samaritan, ucp_Lisu, + ucp_Bamum, ucp_Meetei_Mayek, + ucp_Imperial_Aramaic, ucp_Old_South_Arabian, + ucp_Inscriptional_Parthian, + ucp_Inscriptional_Pahlavi, ucp_Old_Turkic, - ucp_Samaritan, - ucp_Tai_Tham, - ucp_Tai_Viet, - /* New for Unicode 6.0.0 */ ucp_Batak, ucp_Brahmi, - ucp_Mandaic, - /* New for Unicode 6.1.0 */ - ucp_Chakma, ucp_Meroitic_Cursive, ucp_Meroitic_Hieroglyphs, ucp_Miao, - ucp_Sharada, ucp_Sora_Sompeng, - ucp_Takri, - /* New for Unicode 7.0.0 */ - ucp_Bassa_Vah, ucp_Caucasian_Albanian, - ucp_Duployan, + ucp_Bassa_Vah, ucp_Elbasan, - ucp_Grantha, - ucp_Khojki, - ucp_Khudawadi, - ucp_Linear_A, - ucp_Mahajani, - ucp_Manichaean, + ucp_Pahawh_Hmong, ucp_Mende_Kikakui, - ucp_Modi, ucp_Mro, - ucp_Nabataean, ucp_Old_North_Arabian, - ucp_Old_Permic, - ucp_Pahawh_Hmong, + ucp_Nabataean, ucp_Palmyrene, - ucp_Psalter_Pahlavi, ucp_Pau_Cin_Hau, ucp_Siddham, - ucp_Tirhuta, ucp_Warang_Citi, - /* New for Unicode 8.0.0 */ ucp_Ahom, ucp_Anatolian_Hieroglyphs, ucp_Hatran, - ucp_Multani, ucp_Old_Hungarian, ucp_SignWriting, - /* New for Unicode 10.0.0 (no update since 8.0.0) */ - ucp_Adlam, ucp_Bhaiksuki, ucp_Marchen, ucp_Newa, ucp_Osage, ucp_Tangut, - ucp_Masaram_Gondi, ucp_Nushu, ucp_Soyombo, ucp_Zanabazar_Square, - /* New for Unicode 11.0.0 */ - ucp_Dogra, - ucp_Gunjala_Gondi, - ucp_Hanifi_Rohingya, ucp_Makasar, ucp_Medefaidrin, ucp_Old_Sogdian, - ucp_Sogdian, - /* New for Unicode 12.0.0 */ ucp_Elymaic, - ucp_Nandinagari, ucp_Nyiakeng_Puachue_Hmong, ucp_Wancho, - /* New for Unicode 13.0.0 */ ucp_Chorasmian, ucp_Dives_Akuru, ucp_Khitan_Small_Script, - ucp_Yezidi, - /* New for Unicode 14.0.0 */ - ucp_Cypro_Minoan, - ucp_Old_Uyghur, ucp_Tangsa, ucp_Toto, - ucp_Vithkuqi + ucp_Vithkuqi, + + /* This must be last */ + ucp_Script_Count }; +/* Size of entries in ucd_script_sets[] */ + +#define ucd_script_sets_item_size 3 + #endif /* PCRE2_UCP_H_IDEMPOTENT_GUARD */ /* End of pcre2_ucp.h */ diff --git a/thirdparty/pcre2/src/pcre2_ucptables.c b/thirdparty/pcre2/src/pcre2_ucptables.c new file mode 100644 index 0000000000..bd1b67a9f1 --- /dev/null +++ b/thirdparty/pcre2/src/pcre2_ucptables.c @@ -0,0 +1,1524 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Original API code Copyright (c) 1997-2012 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge + +This module is auto-generated from Unicode data files. DO NOT EDIT MANUALLY! +Instead, modify the maint/GenerateUcpTables.py script and run it to generate +a new version of this code. + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +#ifdef SUPPORT_UNICODE + +/* The PRIV(utt)[] table below translates Unicode property names into type and +code values. It is searched by binary chop, so must be in collating sequence of +name. Originally, the table contained pointers to the name strings in the first +field of each entry. However, that leads to a large number of relocations when +a shared library is dynamically loaded. A significant reduction is made by +putting all the names into a single, large string and using offsets instead. +All letters are lower cased, and underscores are removed, in accordance with +the "loose matching" rules that Unicode advises and Perl uses. */ + +#define STRING_adlam0 STR_a STR_d STR_l STR_a STR_m "\0" +#define STRING_adlm0 STR_a STR_d STR_l STR_m "\0" +#define STRING_aghb0 STR_a STR_g STR_h STR_b "\0" +#define STRING_ahex0 STR_a STR_h STR_e STR_x "\0" +#define STRING_ahom0 STR_a STR_h STR_o STR_m "\0" +#define STRING_alpha0 STR_a STR_l STR_p STR_h STR_a "\0" +#define STRING_alphabetic0 STR_a STR_l STR_p STR_h STR_a STR_b STR_e STR_t STR_i STR_c "\0" +#define STRING_anatolianhieroglyphs0 STR_a STR_n STR_a STR_t STR_o STR_l STR_i STR_a STR_n STR_h STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" +#define STRING_any0 STR_a STR_n STR_y "\0" +#define STRING_arab0 STR_a STR_r STR_a STR_b "\0" +#define STRING_arabic0 STR_a STR_r STR_a STR_b STR_i STR_c "\0" +#define STRING_armenian0 STR_a STR_r STR_m STR_e STR_n STR_i STR_a STR_n "\0" +#define STRING_armi0 STR_a STR_r STR_m STR_i "\0" +#define STRING_armn0 STR_a STR_r STR_m STR_n "\0" +#define STRING_ascii0 STR_a STR_s STR_c STR_i STR_i "\0" +#define STRING_asciihexdigit0 STR_a STR_s STR_c STR_i STR_i STR_h STR_e STR_x STR_d STR_i STR_g STR_i STR_t "\0" +#define STRING_avestan0 STR_a STR_v STR_e STR_s STR_t STR_a STR_n "\0" +#define STRING_avst0 STR_a STR_v STR_s STR_t "\0" +#define STRING_bali0 STR_b STR_a STR_l STR_i "\0" +#define STRING_balinese0 STR_b STR_a STR_l STR_i STR_n STR_e STR_s STR_e "\0" +#define STRING_bamu0 STR_b STR_a STR_m STR_u "\0" +#define STRING_bamum0 STR_b STR_a STR_m STR_u STR_m "\0" +#define STRING_bass0 STR_b STR_a STR_s STR_s "\0" +#define STRING_bassavah0 STR_b STR_a STR_s STR_s STR_a STR_v STR_a STR_h "\0" +#define STRING_batak0 STR_b STR_a STR_t STR_a STR_k "\0" +#define STRING_batk0 STR_b STR_a STR_t STR_k "\0" +#define STRING_beng0 STR_b STR_e STR_n STR_g "\0" +#define STRING_bengali0 STR_b STR_e STR_n STR_g STR_a STR_l STR_i "\0" +#define STRING_bhaiksuki0 STR_b STR_h STR_a STR_i STR_k STR_s STR_u STR_k STR_i "\0" +#define STRING_bhks0 STR_b STR_h STR_k STR_s "\0" +#define STRING_bidial0 STR_b STR_i STR_d STR_i STR_a STR_l "\0" +#define STRING_bidian0 STR_b STR_i STR_d STR_i STR_a STR_n "\0" +#define STRING_bidib0 STR_b STR_i STR_d STR_i STR_b "\0" +#define STRING_bidibn0 STR_b STR_i STR_d STR_i STR_b STR_n "\0" +#define STRING_bidic0 STR_b STR_i STR_d STR_i STR_c "\0" +#define STRING_bidicontrol0 STR_b STR_i STR_d STR_i STR_c STR_o STR_n STR_t STR_r STR_o STR_l "\0" +#define STRING_bidics0 STR_b STR_i STR_d STR_i STR_c STR_s "\0" +#define STRING_bidien0 STR_b STR_i STR_d STR_i STR_e STR_n "\0" +#define STRING_bidies0 STR_b STR_i STR_d STR_i STR_e STR_s "\0" +#define STRING_bidiet0 STR_b STR_i STR_d STR_i STR_e STR_t "\0" +#define STRING_bidifsi0 STR_b STR_i STR_d STR_i STR_f STR_s STR_i "\0" +#define STRING_bidil0 STR_b STR_i STR_d STR_i STR_l "\0" +#define STRING_bidilre0 STR_b STR_i STR_d STR_i STR_l STR_r STR_e "\0" +#define STRING_bidilri0 STR_b STR_i STR_d STR_i STR_l STR_r STR_i "\0" +#define STRING_bidilro0 STR_b STR_i STR_d STR_i STR_l STR_r STR_o "\0" +#define STRING_bidim0 STR_b STR_i STR_d STR_i STR_m "\0" +#define STRING_bidimirrored0 STR_b STR_i STR_d STR_i STR_m STR_i STR_r STR_r STR_o STR_r STR_e STR_d "\0" +#define STRING_bidinsm0 STR_b STR_i STR_d STR_i STR_n STR_s STR_m "\0" +#define STRING_bidion0 STR_b STR_i STR_d STR_i STR_o STR_n "\0" +#define STRING_bidipdf0 STR_b STR_i STR_d STR_i STR_p STR_d STR_f "\0" +#define STRING_bidipdi0 STR_b STR_i STR_d STR_i STR_p STR_d STR_i "\0" +#define STRING_bidir0 STR_b STR_i STR_d STR_i STR_r "\0" +#define STRING_bidirle0 STR_b STR_i STR_d STR_i STR_r STR_l STR_e "\0" +#define STRING_bidirli0 STR_b STR_i STR_d STR_i STR_r STR_l STR_i "\0" +#define STRING_bidirlo0 STR_b STR_i STR_d STR_i STR_r STR_l STR_o "\0" +#define STRING_bidis0 STR_b STR_i STR_d STR_i STR_s "\0" +#define STRING_bidiws0 STR_b STR_i STR_d STR_i STR_w STR_s "\0" +#define STRING_bopo0 STR_b STR_o STR_p STR_o "\0" +#define STRING_bopomofo0 STR_b STR_o STR_p STR_o STR_m STR_o STR_f STR_o "\0" +#define STRING_brah0 STR_b STR_r STR_a STR_h "\0" +#define STRING_brahmi0 STR_b STR_r STR_a STR_h STR_m STR_i "\0" +#define STRING_brai0 STR_b STR_r STR_a STR_i "\0" +#define STRING_braille0 STR_b STR_r STR_a STR_i STR_l STR_l STR_e "\0" +#define STRING_bugi0 STR_b STR_u STR_g STR_i "\0" +#define STRING_buginese0 STR_b STR_u STR_g STR_i STR_n STR_e STR_s STR_e "\0" +#define STRING_buhd0 STR_b STR_u STR_h STR_d "\0" +#define STRING_buhid0 STR_b STR_u STR_h STR_i STR_d "\0" +#define STRING_c0 STR_c "\0" +#define STRING_cakm0 STR_c STR_a STR_k STR_m "\0" +#define STRING_canadianaboriginal0 STR_c STR_a STR_n STR_a STR_d STR_i STR_a STR_n STR_a STR_b STR_o STR_r STR_i STR_g STR_i STR_n STR_a STR_l "\0" +#define STRING_cans0 STR_c STR_a STR_n STR_s "\0" +#define STRING_cari0 STR_c STR_a STR_r STR_i "\0" +#define STRING_carian0 STR_c STR_a STR_r STR_i STR_a STR_n "\0" +#define STRING_cased0 STR_c STR_a STR_s STR_e STR_d "\0" +#define STRING_caseignorable0 STR_c STR_a STR_s STR_e STR_i STR_g STR_n STR_o STR_r STR_a STR_b STR_l STR_e "\0" +#define STRING_caucasianalbanian0 STR_c STR_a STR_u STR_c STR_a STR_s STR_i STR_a STR_n STR_a STR_l STR_b STR_a STR_n STR_i STR_a STR_n "\0" +#define STRING_cc0 STR_c STR_c "\0" +#define STRING_cf0 STR_c STR_f "\0" +#define STRING_chakma0 STR_c STR_h STR_a STR_k STR_m STR_a "\0" +#define STRING_cham0 STR_c STR_h STR_a STR_m "\0" +#define STRING_changeswhencasefolded0 STR_c STR_h STR_a STR_n STR_g STR_e STR_s STR_w STR_h STR_e STR_n STR_c STR_a STR_s STR_e STR_f STR_o STR_l STR_d STR_e STR_d "\0" +#define STRING_changeswhencasemapped0 STR_c STR_h STR_a STR_n STR_g STR_e STR_s STR_w STR_h STR_e STR_n STR_c STR_a STR_s STR_e STR_m STR_a STR_p STR_p STR_e STR_d "\0" +#define STRING_changeswhenlowercased0 STR_c STR_h STR_a STR_n STR_g STR_e STR_s STR_w STR_h STR_e STR_n STR_l STR_o STR_w STR_e STR_r STR_c STR_a STR_s STR_e STR_d "\0" +#define STRING_changeswhentitlecased0 STR_c STR_h STR_a STR_n STR_g STR_e STR_s STR_w STR_h STR_e STR_n STR_t STR_i STR_t STR_l STR_e STR_c STR_a STR_s STR_e STR_d "\0" +#define STRING_changeswhenuppercased0 STR_c STR_h STR_a STR_n STR_g STR_e STR_s STR_w STR_h STR_e STR_n STR_u STR_p STR_p STR_e STR_r STR_c STR_a STR_s STR_e STR_d "\0" +#define STRING_cher0 STR_c STR_h STR_e STR_r "\0" +#define STRING_cherokee0 STR_c STR_h STR_e STR_r STR_o STR_k STR_e STR_e "\0" +#define STRING_chorasmian0 STR_c STR_h STR_o STR_r STR_a STR_s STR_m STR_i STR_a STR_n "\0" +#define STRING_chrs0 STR_c STR_h STR_r STR_s "\0" +#define STRING_ci0 STR_c STR_i "\0" +#define STRING_cn0 STR_c STR_n "\0" +#define STRING_co0 STR_c STR_o "\0" +#define STRING_common0 STR_c STR_o STR_m STR_m STR_o STR_n "\0" +#define STRING_copt0 STR_c STR_o STR_p STR_t "\0" +#define STRING_coptic0 STR_c STR_o STR_p STR_t STR_i STR_c "\0" +#define STRING_cpmn0 STR_c STR_p STR_m STR_n "\0" +#define STRING_cprt0 STR_c STR_p STR_r STR_t "\0" +#define STRING_cs0 STR_c STR_s "\0" +#define STRING_cuneiform0 STR_c STR_u STR_n STR_e STR_i STR_f STR_o STR_r STR_m "\0" +#define STRING_cwcf0 STR_c STR_w STR_c STR_f "\0" +#define STRING_cwcm0 STR_c STR_w STR_c STR_m "\0" +#define STRING_cwl0 STR_c STR_w STR_l "\0" +#define STRING_cwt0 STR_c STR_w STR_t "\0" +#define STRING_cwu0 STR_c STR_w STR_u "\0" +#define STRING_cypriot0 STR_c STR_y STR_p STR_r STR_i STR_o STR_t "\0" +#define STRING_cyprominoan0 STR_c STR_y STR_p STR_r STR_o STR_m STR_i STR_n STR_o STR_a STR_n "\0" +#define STRING_cyrillic0 STR_c STR_y STR_r STR_i STR_l STR_l STR_i STR_c "\0" +#define STRING_cyrl0 STR_c STR_y STR_r STR_l "\0" +#define STRING_dash0 STR_d STR_a STR_s STR_h "\0" +#define STRING_defaultignorablecodepoint0 STR_d STR_e STR_f STR_a STR_u STR_l STR_t STR_i STR_g STR_n STR_o STR_r STR_a STR_b STR_l STR_e STR_c STR_o STR_d STR_e STR_p STR_o STR_i STR_n STR_t "\0" +#define STRING_dep0 STR_d STR_e STR_p "\0" +#define STRING_deprecated0 STR_d STR_e STR_p STR_r STR_e STR_c STR_a STR_t STR_e STR_d "\0" +#define STRING_deseret0 STR_d STR_e STR_s STR_e STR_r STR_e STR_t "\0" +#define STRING_deva0 STR_d STR_e STR_v STR_a "\0" +#define STRING_devanagari0 STR_d STR_e STR_v STR_a STR_n STR_a STR_g STR_a STR_r STR_i "\0" +#define STRING_di0 STR_d STR_i "\0" +#define STRING_dia0 STR_d STR_i STR_a "\0" +#define STRING_diacritic0 STR_d STR_i STR_a STR_c STR_r STR_i STR_t STR_i STR_c "\0" +#define STRING_diak0 STR_d STR_i STR_a STR_k "\0" +#define STRING_divesakuru0 STR_d STR_i STR_v STR_e STR_s STR_a STR_k STR_u STR_r STR_u "\0" +#define STRING_dogr0 STR_d STR_o STR_g STR_r "\0" +#define STRING_dogra0 STR_d STR_o STR_g STR_r STR_a "\0" +#define STRING_dsrt0 STR_d STR_s STR_r STR_t "\0" +#define STRING_dupl0 STR_d STR_u STR_p STR_l "\0" +#define STRING_duployan0 STR_d STR_u STR_p STR_l STR_o STR_y STR_a STR_n "\0" +#define STRING_ebase0 STR_e STR_b STR_a STR_s STR_e "\0" +#define STRING_ecomp0 STR_e STR_c STR_o STR_m STR_p "\0" +#define STRING_egyp0 STR_e STR_g STR_y STR_p "\0" +#define STRING_egyptianhieroglyphs0 STR_e STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_h STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" +#define STRING_elba0 STR_e STR_l STR_b STR_a "\0" +#define STRING_elbasan0 STR_e STR_l STR_b STR_a STR_s STR_a STR_n "\0" +#define STRING_elym0 STR_e STR_l STR_y STR_m "\0" +#define STRING_elymaic0 STR_e STR_l STR_y STR_m STR_a STR_i STR_c "\0" +#define STRING_emod0 STR_e STR_m STR_o STR_d "\0" +#define STRING_emoji0 STR_e STR_m STR_o STR_j STR_i "\0" +#define STRING_emojicomponent0 STR_e STR_m STR_o STR_j STR_i STR_c STR_o STR_m STR_p STR_o STR_n STR_e STR_n STR_t "\0" +#define STRING_emojimodifier0 STR_e STR_m STR_o STR_j STR_i STR_m STR_o STR_d STR_i STR_f STR_i STR_e STR_r "\0" +#define STRING_emojimodifierbase0 STR_e STR_m STR_o STR_j STR_i STR_m STR_o STR_d STR_i STR_f STR_i STR_e STR_r STR_b STR_a STR_s STR_e "\0" +#define STRING_emojipresentation0 STR_e STR_m STR_o STR_j STR_i STR_p STR_r STR_e STR_s STR_e STR_n STR_t STR_a STR_t STR_i STR_o STR_n "\0" +#define STRING_epres0 STR_e STR_p STR_r STR_e STR_s "\0" +#define STRING_ethi0 STR_e STR_t STR_h STR_i "\0" +#define STRING_ethiopic0 STR_e STR_t STR_h STR_i STR_o STR_p STR_i STR_c "\0" +#define STRING_ext0 STR_e STR_x STR_t "\0" +#define STRING_extendedpictographic0 STR_e STR_x STR_t STR_e STR_n STR_d STR_e STR_d STR_p STR_i STR_c STR_t STR_o STR_g STR_r STR_a STR_p STR_h STR_i STR_c "\0" +#define STRING_extender0 STR_e STR_x STR_t STR_e STR_n STR_d STR_e STR_r "\0" +#define STRING_extpict0 STR_e STR_x STR_t STR_p STR_i STR_c STR_t "\0" +#define STRING_geor0 STR_g STR_e STR_o STR_r "\0" +#define STRING_georgian0 STR_g STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0" +#define STRING_glag0 STR_g STR_l STR_a STR_g "\0" +#define STRING_glagolitic0 STR_g STR_l STR_a STR_g STR_o STR_l STR_i STR_t STR_i STR_c "\0" +#define STRING_gong0 STR_g STR_o STR_n STR_g "\0" +#define STRING_gonm0 STR_g STR_o STR_n STR_m "\0" +#define STRING_goth0 STR_g STR_o STR_t STR_h "\0" +#define STRING_gothic0 STR_g STR_o STR_t STR_h STR_i STR_c "\0" +#define STRING_gran0 STR_g STR_r STR_a STR_n "\0" +#define STRING_grantha0 STR_g STR_r STR_a STR_n STR_t STR_h STR_a "\0" +#define STRING_graphemebase0 STR_g STR_r STR_a STR_p STR_h STR_e STR_m STR_e STR_b STR_a STR_s STR_e "\0" +#define STRING_graphemeextend0 STR_g STR_r STR_a STR_p STR_h STR_e STR_m STR_e STR_e STR_x STR_t STR_e STR_n STR_d "\0" +#define STRING_graphemelink0 STR_g STR_r STR_a STR_p STR_h STR_e STR_m STR_e STR_l STR_i STR_n STR_k "\0" +#define STRING_grbase0 STR_g STR_r STR_b STR_a STR_s STR_e "\0" +#define STRING_greek0 STR_g STR_r STR_e STR_e STR_k "\0" +#define STRING_grek0 STR_g STR_r STR_e STR_k "\0" +#define STRING_grext0 STR_g STR_r STR_e STR_x STR_t "\0" +#define STRING_grlink0 STR_g STR_r STR_l STR_i STR_n STR_k "\0" +#define STRING_gujarati0 STR_g STR_u STR_j STR_a STR_r STR_a STR_t STR_i "\0" +#define STRING_gujr0 STR_g STR_u STR_j STR_r "\0" +#define STRING_gunjalagondi0 STR_g STR_u STR_n STR_j STR_a STR_l STR_a STR_g STR_o STR_n STR_d STR_i "\0" +#define STRING_gurmukhi0 STR_g STR_u STR_r STR_m STR_u STR_k STR_h STR_i "\0" +#define STRING_guru0 STR_g STR_u STR_r STR_u "\0" +#define STRING_han0 STR_h STR_a STR_n "\0" +#define STRING_hang0 STR_h STR_a STR_n STR_g "\0" +#define STRING_hangul0 STR_h STR_a STR_n STR_g STR_u STR_l "\0" +#define STRING_hani0 STR_h STR_a STR_n STR_i "\0" +#define STRING_hanifirohingya0 STR_h STR_a STR_n STR_i STR_f STR_i STR_r STR_o STR_h STR_i STR_n STR_g STR_y STR_a "\0" +#define STRING_hano0 STR_h STR_a STR_n STR_o "\0" +#define STRING_hanunoo0 STR_h STR_a STR_n STR_u STR_n STR_o STR_o "\0" +#define STRING_hatr0 STR_h STR_a STR_t STR_r "\0" +#define STRING_hatran0 STR_h STR_a STR_t STR_r STR_a STR_n "\0" +#define STRING_hebr0 STR_h STR_e STR_b STR_r "\0" +#define STRING_hebrew0 STR_h STR_e STR_b STR_r STR_e STR_w "\0" +#define STRING_hex0 STR_h STR_e STR_x "\0" +#define STRING_hexdigit0 STR_h STR_e STR_x STR_d STR_i STR_g STR_i STR_t "\0" +#define STRING_hira0 STR_h STR_i STR_r STR_a "\0" +#define STRING_hiragana0 STR_h STR_i STR_r STR_a STR_g STR_a STR_n STR_a "\0" +#define STRING_hluw0 STR_h STR_l STR_u STR_w "\0" +#define STRING_hmng0 STR_h STR_m STR_n STR_g "\0" +#define STRING_hmnp0 STR_h STR_m STR_n STR_p "\0" +#define STRING_hung0 STR_h STR_u STR_n STR_g "\0" +#define STRING_idc0 STR_i STR_d STR_c "\0" +#define STRING_idcontinue0 STR_i STR_d STR_c STR_o STR_n STR_t STR_i STR_n STR_u STR_e "\0" +#define STRING_ideo0 STR_i STR_d STR_e STR_o "\0" +#define STRING_ideographic0 STR_i STR_d STR_e STR_o STR_g STR_r STR_a STR_p STR_h STR_i STR_c "\0" +#define STRING_ids0 STR_i STR_d STR_s "\0" +#define STRING_idsb0 STR_i STR_d STR_s STR_b "\0" +#define STRING_idsbinaryoperator0 STR_i STR_d STR_s STR_b STR_i STR_n STR_a STR_r STR_y STR_o STR_p STR_e STR_r STR_a STR_t STR_o STR_r "\0" +#define STRING_idst0 STR_i STR_d STR_s STR_t "\0" +#define STRING_idstart0 STR_i STR_d STR_s STR_t STR_a STR_r STR_t "\0" +#define STRING_idstrinaryoperator0 STR_i STR_d STR_s STR_t STR_r STR_i STR_n STR_a STR_r STR_y STR_o STR_p STR_e STR_r STR_a STR_t STR_o STR_r "\0" +#define STRING_imperialaramaic0 STR_i STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_a STR_r STR_a STR_m STR_a STR_i STR_c "\0" +#define STRING_inherited0 STR_i STR_n STR_h STR_e STR_r STR_i STR_t STR_e STR_d "\0" +#define STRING_inscriptionalpahlavi0 STR_i STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_p STR_a STR_h STR_l STR_a STR_v STR_i "\0" +#define STRING_inscriptionalparthian0 STR_i STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_p STR_a STR_r STR_t STR_h STR_i STR_a STR_n "\0" +#define STRING_ital0 STR_i STR_t STR_a STR_l "\0" +#define STRING_java0 STR_j STR_a STR_v STR_a "\0" +#define STRING_javanese0 STR_j STR_a STR_v STR_a STR_n STR_e STR_s STR_e "\0" +#define STRING_joinc0 STR_j STR_o STR_i STR_n STR_c "\0" +#define STRING_joincontrol0 STR_j STR_o STR_i STR_n STR_c STR_o STR_n STR_t STR_r STR_o STR_l "\0" +#define STRING_kaithi0 STR_k STR_a STR_i STR_t STR_h STR_i "\0" +#define STRING_kali0 STR_k STR_a STR_l STR_i "\0" +#define STRING_kana0 STR_k STR_a STR_n STR_a "\0" +#define STRING_kannada0 STR_k STR_a STR_n STR_n STR_a STR_d STR_a "\0" +#define STRING_katakana0 STR_k STR_a STR_t STR_a STR_k STR_a STR_n STR_a "\0" +#define STRING_kayahli0 STR_k STR_a STR_y STR_a STR_h STR_l STR_i "\0" +#define STRING_khar0 STR_k STR_h STR_a STR_r "\0" +#define STRING_kharoshthi0 STR_k STR_h STR_a STR_r STR_o STR_s STR_h STR_t STR_h STR_i "\0" +#define STRING_khitansmallscript0 STR_k STR_h STR_i STR_t STR_a STR_n STR_s STR_m STR_a STR_l STR_l STR_s STR_c STR_r STR_i STR_p STR_t "\0" +#define STRING_khmer0 STR_k STR_h STR_m STR_e STR_r "\0" +#define STRING_khmr0 STR_k STR_h STR_m STR_r "\0" +#define STRING_khoj0 STR_k STR_h STR_o STR_j "\0" +#define STRING_khojki0 STR_k STR_h STR_o STR_j STR_k STR_i "\0" +#define STRING_khudawadi0 STR_k STR_h STR_u STR_d STR_a STR_w STR_a STR_d STR_i "\0" +#define STRING_kits0 STR_k STR_i STR_t STR_s "\0" +#define STRING_knda0 STR_k STR_n STR_d STR_a "\0" +#define STRING_kthi0 STR_k STR_t STR_h STR_i "\0" +#define STRING_l0 STR_l "\0" +#define STRING_l_AMPERSAND0 STR_l STR_AMPERSAND "\0" +#define STRING_lana0 STR_l STR_a STR_n STR_a "\0" +#define STRING_lao0 STR_l STR_a STR_o "\0" +#define STRING_laoo0 STR_l STR_a STR_o STR_o "\0" +#define STRING_latin0 STR_l STR_a STR_t STR_i STR_n "\0" +#define STRING_latn0 STR_l STR_a STR_t STR_n "\0" +#define STRING_lc0 STR_l STR_c "\0" +#define STRING_lepc0 STR_l STR_e STR_p STR_c "\0" +#define STRING_lepcha0 STR_l STR_e STR_p STR_c STR_h STR_a "\0" +#define STRING_limb0 STR_l STR_i STR_m STR_b "\0" +#define STRING_limbu0 STR_l STR_i STR_m STR_b STR_u "\0" +#define STRING_lina0 STR_l STR_i STR_n STR_a "\0" +#define STRING_linb0 STR_l STR_i STR_n STR_b "\0" +#define STRING_lineara0 STR_l STR_i STR_n STR_e STR_a STR_r STR_a "\0" +#define STRING_linearb0 STR_l STR_i STR_n STR_e STR_a STR_r STR_b "\0" +#define STRING_lisu0 STR_l STR_i STR_s STR_u "\0" +#define STRING_ll0 STR_l STR_l "\0" +#define STRING_lm0 STR_l STR_m "\0" +#define STRING_lo0 STR_l STR_o "\0" +#define STRING_loe0 STR_l STR_o STR_e "\0" +#define STRING_logicalorderexception0 STR_l STR_o STR_g STR_i STR_c STR_a STR_l STR_o STR_r STR_d STR_e STR_r STR_e STR_x STR_c STR_e STR_p STR_t STR_i STR_o STR_n "\0" +#define STRING_lower0 STR_l STR_o STR_w STR_e STR_r "\0" +#define STRING_lowercase0 STR_l STR_o STR_w STR_e STR_r STR_c STR_a STR_s STR_e "\0" +#define STRING_lt0 STR_l STR_t "\0" +#define STRING_lu0 STR_l STR_u "\0" +#define STRING_lyci0 STR_l STR_y STR_c STR_i "\0" +#define STRING_lycian0 STR_l STR_y STR_c STR_i STR_a STR_n "\0" +#define STRING_lydi0 STR_l STR_y STR_d STR_i "\0" +#define STRING_lydian0 STR_l STR_y STR_d STR_i STR_a STR_n "\0" +#define STRING_m0 STR_m "\0" +#define STRING_mahajani0 STR_m STR_a STR_h STR_a STR_j STR_a STR_n STR_i "\0" +#define STRING_mahj0 STR_m STR_a STR_h STR_j "\0" +#define STRING_maka0 STR_m STR_a STR_k STR_a "\0" +#define STRING_makasar0 STR_m STR_a STR_k STR_a STR_s STR_a STR_r "\0" +#define STRING_malayalam0 STR_m STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0" +#define STRING_mand0 STR_m STR_a STR_n STR_d "\0" +#define STRING_mandaic0 STR_m STR_a STR_n STR_d STR_a STR_i STR_c "\0" +#define STRING_mani0 STR_m STR_a STR_n STR_i "\0" +#define STRING_manichaean0 STR_m STR_a STR_n STR_i STR_c STR_h STR_a STR_e STR_a STR_n "\0" +#define STRING_marc0 STR_m STR_a STR_r STR_c "\0" +#define STRING_marchen0 STR_m STR_a STR_r STR_c STR_h STR_e STR_n "\0" +#define STRING_masaramgondi0 STR_m STR_a STR_s STR_a STR_r STR_a STR_m STR_g STR_o STR_n STR_d STR_i "\0" +#define STRING_math0 STR_m STR_a STR_t STR_h "\0" +#define STRING_mc0 STR_m STR_c "\0" +#define STRING_me0 STR_m STR_e "\0" +#define STRING_medefaidrin0 STR_m STR_e STR_d STR_e STR_f STR_a STR_i STR_d STR_r STR_i STR_n "\0" +#define STRING_medf0 STR_m STR_e STR_d STR_f "\0" +#define STRING_meeteimayek0 STR_m STR_e STR_e STR_t STR_e STR_i STR_m STR_a STR_y STR_e STR_k "\0" +#define STRING_mend0 STR_m STR_e STR_n STR_d "\0" +#define STRING_mendekikakui0 STR_m STR_e STR_n STR_d STR_e STR_k STR_i STR_k STR_a STR_k STR_u STR_i "\0" +#define STRING_merc0 STR_m STR_e STR_r STR_c "\0" +#define STRING_mero0 STR_m STR_e STR_r STR_o "\0" +#define STRING_meroiticcursive0 STR_m STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_c STR_u STR_r STR_s STR_i STR_v STR_e "\0" +#define STRING_meroitichieroglyphs0 STR_m STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_h STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" +#define STRING_miao0 STR_m STR_i STR_a STR_o "\0" +#define STRING_mlym0 STR_m STR_l STR_y STR_m "\0" +#define STRING_mn0 STR_m STR_n "\0" +#define STRING_modi0 STR_m STR_o STR_d STR_i "\0" +#define STRING_mong0 STR_m STR_o STR_n STR_g "\0" +#define STRING_mongolian0 STR_m STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0" +#define STRING_mro0 STR_m STR_r STR_o "\0" +#define STRING_mroo0 STR_m STR_r STR_o STR_o "\0" +#define STRING_mtei0 STR_m STR_t STR_e STR_i "\0" +#define STRING_mult0 STR_m STR_u STR_l STR_t "\0" +#define STRING_multani0 STR_m STR_u STR_l STR_t STR_a STR_n STR_i "\0" +#define STRING_myanmar0 STR_m STR_y STR_a STR_n STR_m STR_a STR_r "\0" +#define STRING_mymr0 STR_m STR_y STR_m STR_r "\0" +#define STRING_n0 STR_n "\0" +#define STRING_nabataean0 STR_n STR_a STR_b STR_a STR_t STR_a STR_e STR_a STR_n "\0" +#define STRING_nand0 STR_n STR_a STR_n STR_d "\0" +#define STRING_nandinagari0 STR_n STR_a STR_n STR_d STR_i STR_n STR_a STR_g STR_a STR_r STR_i "\0" +#define STRING_narb0 STR_n STR_a STR_r STR_b "\0" +#define STRING_nbat0 STR_n STR_b STR_a STR_t "\0" +#define STRING_nchar0 STR_n STR_c STR_h STR_a STR_r "\0" +#define STRING_nd0 STR_n STR_d "\0" +#define STRING_newa0 STR_n STR_e STR_w STR_a "\0" +#define STRING_newtailue0 STR_n STR_e STR_w STR_t STR_a STR_i STR_l STR_u STR_e "\0" +#define STRING_nko0 STR_n STR_k STR_o "\0" +#define STRING_nkoo0 STR_n STR_k STR_o STR_o "\0" +#define STRING_nl0 STR_n STR_l "\0" +#define STRING_no0 STR_n STR_o "\0" +#define STRING_noncharactercodepoint0 STR_n STR_o STR_n STR_c STR_h STR_a STR_r STR_a STR_c STR_t STR_e STR_r STR_c STR_o STR_d STR_e STR_p STR_o STR_i STR_n STR_t "\0" +#define STRING_nshu0 STR_n STR_s STR_h STR_u "\0" +#define STRING_nushu0 STR_n STR_u STR_s STR_h STR_u "\0" +#define STRING_nyiakengpuachuehmong0 STR_n STR_y STR_i STR_a STR_k STR_e STR_n STR_g STR_p STR_u STR_a STR_c STR_h STR_u STR_e STR_h STR_m STR_o STR_n STR_g "\0" +#define STRING_ogam0 STR_o STR_g STR_a STR_m "\0" +#define STRING_ogham0 STR_o STR_g STR_h STR_a STR_m "\0" +#define STRING_olchiki0 STR_o STR_l STR_c STR_h STR_i STR_k STR_i "\0" +#define STRING_olck0 STR_o STR_l STR_c STR_k "\0" +#define STRING_oldhungarian0 STR_o STR_l STR_d STR_h STR_u STR_n STR_g STR_a STR_r STR_i STR_a STR_n "\0" +#define STRING_olditalic0 STR_o STR_l STR_d STR_i STR_t STR_a STR_l STR_i STR_c "\0" +#define STRING_oldnortharabian0 STR_o STR_l STR_d STR_n STR_o STR_r STR_t STR_h STR_a STR_r STR_a STR_b STR_i STR_a STR_n "\0" +#define STRING_oldpermic0 STR_o STR_l STR_d STR_p STR_e STR_r STR_m STR_i STR_c "\0" +#define STRING_oldpersian0 STR_o STR_l STR_d STR_p STR_e STR_r STR_s STR_i STR_a STR_n "\0" +#define STRING_oldsogdian0 STR_o STR_l STR_d STR_s STR_o STR_g STR_d STR_i STR_a STR_n "\0" +#define STRING_oldsoutharabian0 STR_o STR_l STR_d STR_s STR_o STR_u STR_t STR_h STR_a STR_r STR_a STR_b STR_i STR_a STR_n "\0" +#define STRING_oldturkic0 STR_o STR_l STR_d STR_t STR_u STR_r STR_k STR_i STR_c "\0" +#define STRING_olduyghur0 STR_o STR_l STR_d STR_u STR_y STR_g STR_h STR_u STR_r "\0" +#define STRING_oriya0 STR_o STR_r STR_i STR_y STR_a "\0" +#define STRING_orkh0 STR_o STR_r STR_k STR_h "\0" +#define STRING_orya0 STR_o STR_r STR_y STR_a "\0" +#define STRING_osage0 STR_o STR_s STR_a STR_g STR_e "\0" +#define STRING_osge0 STR_o STR_s STR_g STR_e "\0" +#define STRING_osma0 STR_o STR_s STR_m STR_a "\0" +#define STRING_osmanya0 STR_o STR_s STR_m STR_a STR_n STR_y STR_a "\0" +#define STRING_ougr0 STR_o STR_u STR_g STR_r "\0" +#define STRING_p0 STR_p "\0" +#define STRING_pahawhhmong0 STR_p STR_a STR_h STR_a STR_w STR_h STR_h STR_m STR_o STR_n STR_g "\0" +#define STRING_palm0 STR_p STR_a STR_l STR_m "\0" +#define STRING_palmyrene0 STR_p STR_a STR_l STR_m STR_y STR_r STR_e STR_n STR_e "\0" +#define STRING_patsyn0 STR_p STR_a STR_t STR_s STR_y STR_n "\0" +#define STRING_patternsyntax0 STR_p STR_a STR_t STR_t STR_e STR_r STR_n STR_s STR_y STR_n STR_t STR_a STR_x "\0" +#define STRING_patternwhitespace0 STR_p STR_a STR_t STR_t STR_e STR_r STR_n STR_w STR_h STR_i STR_t STR_e STR_s STR_p STR_a STR_c STR_e "\0" +#define STRING_patws0 STR_p STR_a STR_t STR_w STR_s "\0" +#define STRING_pauc0 STR_p STR_a STR_u STR_c "\0" +#define STRING_paucinhau0 STR_p STR_a STR_u STR_c STR_i STR_n STR_h STR_a STR_u "\0" +#define STRING_pc0 STR_p STR_c "\0" +#define STRING_pcm0 STR_p STR_c STR_m "\0" +#define STRING_pd0 STR_p STR_d "\0" +#define STRING_pe0 STR_p STR_e "\0" +#define STRING_perm0 STR_p STR_e STR_r STR_m "\0" +#define STRING_pf0 STR_p STR_f "\0" +#define STRING_phag0 STR_p STR_h STR_a STR_g "\0" +#define STRING_phagspa0 STR_p STR_h STR_a STR_g STR_s STR_p STR_a "\0" +#define STRING_phli0 STR_p STR_h STR_l STR_i "\0" +#define STRING_phlp0 STR_p STR_h STR_l STR_p "\0" +#define STRING_phnx0 STR_p STR_h STR_n STR_x "\0" +#define STRING_phoenician0 STR_p STR_h STR_o STR_e STR_n STR_i STR_c STR_i STR_a STR_n "\0" +#define STRING_pi0 STR_p STR_i "\0" +#define STRING_plrd0 STR_p STR_l STR_r STR_d "\0" +#define STRING_po0 STR_p STR_o "\0" +#define STRING_prependedconcatenationmark0 STR_p STR_r STR_e STR_p STR_e STR_n STR_d STR_e STR_d STR_c STR_o STR_n STR_c STR_a STR_t STR_e STR_n STR_a STR_t STR_i STR_o STR_n STR_m STR_a STR_r STR_k "\0" +#define STRING_prti0 STR_p STR_r STR_t STR_i "\0" +#define STRING_ps0 STR_p STR_s "\0" +#define STRING_psalterpahlavi0 STR_p STR_s STR_a STR_l STR_t STR_e STR_r STR_p STR_a STR_h STR_l STR_a STR_v STR_i "\0" +#define STRING_qaac0 STR_q STR_a STR_a STR_c "\0" +#define STRING_qaai0 STR_q STR_a STR_a STR_i "\0" +#define STRING_qmark0 STR_q STR_m STR_a STR_r STR_k "\0" +#define STRING_quotationmark0 STR_q STR_u STR_o STR_t STR_a STR_t STR_i STR_o STR_n STR_m STR_a STR_r STR_k "\0" +#define STRING_radical0 STR_r STR_a STR_d STR_i STR_c STR_a STR_l "\0" +#define STRING_regionalindicator0 STR_r STR_e STR_g STR_i STR_o STR_n STR_a STR_l STR_i STR_n STR_d STR_i STR_c STR_a STR_t STR_o STR_r "\0" +#define STRING_rejang0 STR_r STR_e STR_j STR_a STR_n STR_g "\0" +#define STRING_ri0 STR_r STR_i "\0" +#define STRING_rjng0 STR_r STR_j STR_n STR_g "\0" +#define STRING_rohg0 STR_r STR_o STR_h STR_g "\0" +#define STRING_runic0 STR_r STR_u STR_n STR_i STR_c "\0" +#define STRING_runr0 STR_r STR_u STR_n STR_r "\0" +#define STRING_s0 STR_s "\0" +#define STRING_samaritan0 STR_s STR_a STR_m STR_a STR_r STR_i STR_t STR_a STR_n "\0" +#define STRING_samr0 STR_s STR_a STR_m STR_r "\0" +#define STRING_sarb0 STR_s STR_a STR_r STR_b "\0" +#define STRING_saur0 STR_s STR_a STR_u STR_r "\0" +#define STRING_saurashtra0 STR_s STR_a STR_u STR_r STR_a STR_s STR_h STR_t STR_r STR_a "\0" +#define STRING_sc0 STR_s STR_c "\0" +#define STRING_sd0 STR_s STR_d "\0" +#define STRING_sentenceterminal0 STR_s STR_e STR_n STR_t STR_e STR_n STR_c STR_e STR_t STR_e STR_r STR_m STR_i STR_n STR_a STR_l "\0" +#define STRING_sgnw0 STR_s STR_g STR_n STR_w "\0" +#define STRING_sharada0 STR_s STR_h STR_a STR_r STR_a STR_d STR_a "\0" +#define STRING_shavian0 STR_s STR_h STR_a STR_v STR_i STR_a STR_n "\0" +#define STRING_shaw0 STR_s STR_h STR_a STR_w "\0" +#define STRING_shrd0 STR_s STR_h STR_r STR_d "\0" +#define STRING_sidd0 STR_s STR_i STR_d STR_d "\0" +#define STRING_siddham0 STR_s STR_i STR_d STR_d STR_h STR_a STR_m "\0" +#define STRING_signwriting0 STR_s STR_i STR_g STR_n STR_w STR_r STR_i STR_t STR_i STR_n STR_g "\0" +#define STRING_sind0 STR_s STR_i STR_n STR_d "\0" +#define STRING_sinh0 STR_s STR_i STR_n STR_h "\0" +#define STRING_sinhala0 STR_s STR_i STR_n STR_h STR_a STR_l STR_a "\0" +#define STRING_sk0 STR_s STR_k "\0" +#define STRING_sm0 STR_s STR_m "\0" +#define STRING_so0 STR_s STR_o "\0" +#define STRING_softdotted0 STR_s STR_o STR_f STR_t STR_d STR_o STR_t STR_t STR_e STR_d "\0" +#define STRING_sogd0 STR_s STR_o STR_g STR_d "\0" +#define STRING_sogdian0 STR_s STR_o STR_g STR_d STR_i STR_a STR_n "\0" +#define STRING_sogo0 STR_s STR_o STR_g STR_o "\0" +#define STRING_sora0 STR_s STR_o STR_r STR_a "\0" +#define STRING_sorasompeng0 STR_s STR_o STR_r STR_a STR_s STR_o STR_m STR_p STR_e STR_n STR_g "\0" +#define STRING_soyo0 STR_s STR_o STR_y STR_o "\0" +#define STRING_soyombo0 STR_s STR_o STR_y STR_o STR_m STR_b STR_o "\0" +#define STRING_space0 STR_s STR_p STR_a STR_c STR_e "\0" +#define STRING_sterm0 STR_s STR_t STR_e STR_r STR_m "\0" +#define STRING_sund0 STR_s STR_u STR_n STR_d "\0" +#define STRING_sundanese0 STR_s STR_u STR_n STR_d STR_a STR_n STR_e STR_s STR_e "\0" +#define STRING_sylo0 STR_s STR_y STR_l STR_o "\0" +#define STRING_sylotinagri0 STR_s STR_y STR_l STR_o STR_t STR_i STR_n STR_a STR_g STR_r STR_i "\0" +#define STRING_syrc0 STR_s STR_y STR_r STR_c "\0" +#define STRING_syriac0 STR_s STR_y STR_r STR_i STR_a STR_c "\0" +#define STRING_tagalog0 STR_t STR_a STR_g STR_a STR_l STR_o STR_g "\0" +#define STRING_tagb0 STR_t STR_a STR_g STR_b "\0" +#define STRING_tagbanwa0 STR_t STR_a STR_g STR_b STR_a STR_n STR_w STR_a "\0" +#define STRING_taile0 STR_t STR_a STR_i STR_l STR_e "\0" +#define STRING_taitham0 STR_t STR_a STR_i STR_t STR_h STR_a STR_m "\0" +#define STRING_taiviet0 STR_t STR_a STR_i STR_v STR_i STR_e STR_t "\0" +#define STRING_takr0 STR_t STR_a STR_k STR_r "\0" +#define STRING_takri0 STR_t STR_a STR_k STR_r STR_i "\0" +#define STRING_tale0 STR_t STR_a STR_l STR_e "\0" +#define STRING_talu0 STR_t STR_a STR_l STR_u "\0" +#define STRING_tamil0 STR_t STR_a STR_m STR_i STR_l "\0" +#define STRING_taml0 STR_t STR_a STR_m STR_l "\0" +#define STRING_tang0 STR_t STR_a STR_n STR_g "\0" +#define STRING_tangsa0 STR_t STR_a STR_n STR_g STR_s STR_a "\0" +#define STRING_tangut0 STR_t STR_a STR_n STR_g STR_u STR_t "\0" +#define STRING_tavt0 STR_t STR_a STR_v STR_t "\0" +#define STRING_telu0 STR_t STR_e STR_l STR_u "\0" +#define STRING_telugu0 STR_t STR_e STR_l STR_u STR_g STR_u "\0" +#define STRING_term0 STR_t STR_e STR_r STR_m "\0" +#define STRING_terminalpunctuation0 STR_t STR_e STR_r STR_m STR_i STR_n STR_a STR_l STR_p STR_u STR_n STR_c STR_t STR_u STR_a STR_t STR_i STR_o STR_n "\0" +#define STRING_tfng0 STR_t STR_f STR_n STR_g "\0" +#define STRING_tglg0 STR_t STR_g STR_l STR_g "\0" +#define STRING_thaa0 STR_t STR_h STR_a STR_a "\0" +#define STRING_thaana0 STR_t STR_h STR_a STR_a STR_n STR_a "\0" +#define STRING_thai0 STR_t STR_h STR_a STR_i "\0" +#define STRING_tibetan0 STR_t STR_i STR_b STR_e STR_t STR_a STR_n "\0" +#define STRING_tibt0 STR_t STR_i STR_b STR_t "\0" +#define STRING_tifinagh0 STR_t STR_i STR_f STR_i STR_n STR_a STR_g STR_h "\0" +#define STRING_tirh0 STR_t STR_i STR_r STR_h "\0" +#define STRING_tirhuta0 STR_t STR_i STR_r STR_h STR_u STR_t STR_a "\0" +#define STRING_tnsa0 STR_t STR_n STR_s STR_a "\0" +#define STRING_toto0 STR_t STR_o STR_t STR_o "\0" +#define STRING_ugar0 STR_u STR_g STR_a STR_r "\0" +#define STRING_ugaritic0 STR_u STR_g STR_a STR_r STR_i STR_t STR_i STR_c "\0" +#define STRING_uideo0 STR_u STR_i STR_d STR_e STR_o "\0" +#define STRING_unifiedideograph0 STR_u STR_n STR_i STR_f STR_i STR_e STR_d STR_i STR_d STR_e STR_o STR_g STR_r STR_a STR_p STR_h "\0" +#define STRING_unknown0 STR_u STR_n STR_k STR_n STR_o STR_w STR_n "\0" +#define STRING_upper0 STR_u STR_p STR_p STR_e STR_r "\0" +#define STRING_uppercase0 STR_u STR_p STR_p STR_e STR_r STR_c STR_a STR_s STR_e "\0" +#define STRING_vai0 STR_v STR_a STR_i "\0" +#define STRING_vaii0 STR_v STR_a STR_i STR_i "\0" +#define STRING_variationselector0 STR_v STR_a STR_r STR_i STR_a STR_t STR_i STR_o STR_n STR_s STR_e STR_l STR_e STR_c STR_t STR_o STR_r "\0" +#define STRING_vith0 STR_v STR_i STR_t STR_h "\0" +#define STRING_vithkuqi0 STR_v STR_i STR_t STR_h STR_k STR_u STR_q STR_i "\0" +#define STRING_vs0 STR_v STR_s "\0" +#define STRING_wancho0 STR_w STR_a STR_n STR_c STR_h STR_o "\0" +#define STRING_wara0 STR_w STR_a STR_r STR_a "\0" +#define STRING_warangciti0 STR_w STR_a STR_r STR_a STR_n STR_g STR_c STR_i STR_t STR_i "\0" +#define STRING_wcho0 STR_w STR_c STR_h STR_o "\0" +#define STRING_whitespace0 STR_w STR_h STR_i STR_t STR_e STR_s STR_p STR_a STR_c STR_e "\0" +#define STRING_wspace0 STR_w STR_s STR_p STR_a STR_c STR_e "\0" +#define STRING_xan0 STR_x STR_a STR_n "\0" +#define STRING_xidc0 STR_x STR_i STR_d STR_c "\0" +#define STRING_xidcontinue0 STR_x STR_i STR_d STR_c STR_o STR_n STR_t STR_i STR_n STR_u STR_e "\0" +#define STRING_xids0 STR_x STR_i STR_d STR_s "\0" +#define STRING_xidstart0 STR_x STR_i STR_d STR_s STR_t STR_a STR_r STR_t "\0" +#define STRING_xpeo0 STR_x STR_p STR_e STR_o "\0" +#define STRING_xps0 STR_x STR_p STR_s "\0" +#define STRING_xsp0 STR_x STR_s STR_p "\0" +#define STRING_xsux0 STR_x STR_s STR_u STR_x "\0" +#define STRING_xuc0 STR_x STR_u STR_c "\0" +#define STRING_xwd0 STR_x STR_w STR_d "\0" +#define STRING_yezi0 STR_y STR_e STR_z STR_i "\0" +#define STRING_yezidi0 STR_y STR_e STR_z STR_i STR_d STR_i "\0" +#define STRING_yi0 STR_y STR_i "\0" +#define STRING_yiii0 STR_y STR_i STR_i STR_i "\0" +#define STRING_z0 STR_z "\0" +#define STRING_zanabazarsquare0 STR_z STR_a STR_n STR_a STR_b STR_a STR_z STR_a STR_r STR_s STR_q STR_u STR_a STR_r STR_e "\0" +#define STRING_zanb0 STR_z STR_a STR_n STR_b "\0" +#define STRING_zinh0 STR_z STR_i STR_n STR_h "\0" +#define STRING_zl0 STR_z STR_l "\0" +#define STRING_zp0 STR_z STR_p "\0" +#define STRING_zs0 STR_z STR_s "\0" +#define STRING_zyyy0 STR_z STR_y STR_y STR_y "\0" +#define STRING_zzzz0 STR_z STR_z STR_z STR_z "\0" + +const char PRIV(utt_names)[] = + STRING_adlam0 + STRING_adlm0 + STRING_aghb0 + STRING_ahex0 + STRING_ahom0 + STRING_alpha0 + STRING_alphabetic0 + STRING_anatolianhieroglyphs0 + STRING_any0 + STRING_arab0 + STRING_arabic0 + STRING_armenian0 + STRING_armi0 + STRING_armn0 + STRING_ascii0 + STRING_asciihexdigit0 + STRING_avestan0 + STRING_avst0 + STRING_bali0 + STRING_balinese0 + STRING_bamu0 + STRING_bamum0 + STRING_bass0 + STRING_bassavah0 + STRING_batak0 + STRING_batk0 + STRING_beng0 + STRING_bengali0 + STRING_bhaiksuki0 + STRING_bhks0 + STRING_bidial0 + STRING_bidian0 + STRING_bidib0 + STRING_bidibn0 + STRING_bidic0 + STRING_bidicontrol0 + STRING_bidics0 + STRING_bidien0 + STRING_bidies0 + STRING_bidiet0 + STRING_bidifsi0 + STRING_bidil0 + STRING_bidilre0 + STRING_bidilri0 + STRING_bidilro0 + STRING_bidim0 + STRING_bidimirrored0 + STRING_bidinsm0 + STRING_bidion0 + STRING_bidipdf0 + STRING_bidipdi0 + STRING_bidir0 + STRING_bidirle0 + STRING_bidirli0 + STRING_bidirlo0 + STRING_bidis0 + STRING_bidiws0 + STRING_bopo0 + STRING_bopomofo0 + STRING_brah0 + STRING_brahmi0 + STRING_brai0 + STRING_braille0 + STRING_bugi0 + STRING_buginese0 + STRING_buhd0 + STRING_buhid0 + STRING_c0 + STRING_cakm0 + STRING_canadianaboriginal0 + STRING_cans0 + STRING_cari0 + STRING_carian0 + STRING_cased0 + STRING_caseignorable0 + STRING_caucasianalbanian0 + STRING_cc0 + STRING_cf0 + STRING_chakma0 + STRING_cham0 + STRING_changeswhencasefolded0 + STRING_changeswhencasemapped0 + STRING_changeswhenlowercased0 + STRING_changeswhentitlecased0 + STRING_changeswhenuppercased0 + STRING_cher0 + STRING_cherokee0 + STRING_chorasmian0 + STRING_chrs0 + STRING_ci0 + STRING_cn0 + STRING_co0 + STRING_common0 + STRING_copt0 + STRING_coptic0 + STRING_cpmn0 + STRING_cprt0 + STRING_cs0 + STRING_cuneiform0 + STRING_cwcf0 + STRING_cwcm0 + STRING_cwl0 + STRING_cwt0 + STRING_cwu0 + STRING_cypriot0 + STRING_cyprominoan0 + STRING_cyrillic0 + STRING_cyrl0 + STRING_dash0 + STRING_defaultignorablecodepoint0 + STRING_dep0 + STRING_deprecated0 + STRING_deseret0 + STRING_deva0 + STRING_devanagari0 + STRING_di0 + STRING_dia0 + STRING_diacritic0 + STRING_diak0 + STRING_divesakuru0 + STRING_dogr0 + STRING_dogra0 + STRING_dsrt0 + STRING_dupl0 + STRING_duployan0 + STRING_ebase0 + STRING_ecomp0 + STRING_egyp0 + STRING_egyptianhieroglyphs0 + STRING_elba0 + STRING_elbasan0 + STRING_elym0 + STRING_elymaic0 + STRING_emod0 + STRING_emoji0 + STRING_emojicomponent0 + STRING_emojimodifier0 + STRING_emojimodifierbase0 + STRING_emojipresentation0 + STRING_epres0 + STRING_ethi0 + STRING_ethiopic0 + STRING_ext0 + STRING_extendedpictographic0 + STRING_extender0 + STRING_extpict0 + STRING_geor0 + STRING_georgian0 + STRING_glag0 + STRING_glagolitic0 + STRING_gong0 + STRING_gonm0 + STRING_goth0 + STRING_gothic0 + STRING_gran0 + STRING_grantha0 + STRING_graphemebase0 + STRING_graphemeextend0 + STRING_graphemelink0 + STRING_grbase0 + STRING_greek0 + STRING_grek0 + STRING_grext0 + STRING_grlink0 + STRING_gujarati0 + STRING_gujr0 + STRING_gunjalagondi0 + STRING_gurmukhi0 + STRING_guru0 + STRING_han0 + STRING_hang0 + STRING_hangul0 + STRING_hani0 + STRING_hanifirohingya0 + STRING_hano0 + STRING_hanunoo0 + STRING_hatr0 + STRING_hatran0 + STRING_hebr0 + STRING_hebrew0 + STRING_hex0 + STRING_hexdigit0 + STRING_hira0 + STRING_hiragana0 + STRING_hluw0 + STRING_hmng0 + STRING_hmnp0 + STRING_hung0 + STRING_idc0 + STRING_idcontinue0 + STRING_ideo0 + STRING_ideographic0 + STRING_ids0 + STRING_idsb0 + STRING_idsbinaryoperator0 + STRING_idst0 + STRING_idstart0 + STRING_idstrinaryoperator0 + STRING_imperialaramaic0 + STRING_inherited0 + STRING_inscriptionalpahlavi0 + STRING_inscriptionalparthian0 + STRING_ital0 + STRING_java0 + STRING_javanese0 + STRING_joinc0 + STRING_joincontrol0 + STRING_kaithi0 + STRING_kali0 + STRING_kana0 + STRING_kannada0 + STRING_katakana0 + STRING_kayahli0 + STRING_khar0 + STRING_kharoshthi0 + STRING_khitansmallscript0 + STRING_khmer0 + STRING_khmr0 + STRING_khoj0 + STRING_khojki0 + STRING_khudawadi0 + STRING_kits0 + STRING_knda0 + STRING_kthi0 + STRING_l0 + STRING_l_AMPERSAND0 + STRING_lana0 + STRING_lao0 + STRING_laoo0 + STRING_latin0 + STRING_latn0 + STRING_lc0 + STRING_lepc0 + STRING_lepcha0 + STRING_limb0 + STRING_limbu0 + STRING_lina0 + STRING_linb0 + STRING_lineara0 + STRING_linearb0 + STRING_lisu0 + STRING_ll0 + STRING_lm0 + STRING_lo0 + STRING_loe0 + STRING_logicalorderexception0 + STRING_lower0 + STRING_lowercase0 + STRING_lt0 + STRING_lu0 + STRING_lyci0 + STRING_lycian0 + STRING_lydi0 + STRING_lydian0 + STRING_m0 + STRING_mahajani0 + STRING_mahj0 + STRING_maka0 + STRING_makasar0 + STRING_malayalam0 + STRING_mand0 + STRING_mandaic0 + STRING_mani0 + STRING_manichaean0 + STRING_marc0 + STRING_marchen0 + STRING_masaramgondi0 + STRING_math0 + STRING_mc0 + STRING_me0 + STRING_medefaidrin0 + STRING_medf0 + STRING_meeteimayek0 + STRING_mend0 + STRING_mendekikakui0 + STRING_merc0 + STRING_mero0 + STRING_meroiticcursive0 + STRING_meroitichieroglyphs0 + STRING_miao0 + STRING_mlym0 + STRING_mn0 + STRING_modi0 + STRING_mong0 + STRING_mongolian0 + STRING_mro0 + STRING_mroo0 + STRING_mtei0 + STRING_mult0 + STRING_multani0 + STRING_myanmar0 + STRING_mymr0 + STRING_n0 + STRING_nabataean0 + STRING_nand0 + STRING_nandinagari0 + STRING_narb0 + STRING_nbat0 + STRING_nchar0 + STRING_nd0 + STRING_newa0 + STRING_newtailue0 + STRING_nko0 + STRING_nkoo0 + STRING_nl0 + STRING_no0 + STRING_noncharactercodepoint0 + STRING_nshu0 + STRING_nushu0 + STRING_nyiakengpuachuehmong0 + STRING_ogam0 + STRING_ogham0 + STRING_olchiki0 + STRING_olck0 + STRING_oldhungarian0 + STRING_olditalic0 + STRING_oldnortharabian0 + STRING_oldpermic0 + STRING_oldpersian0 + STRING_oldsogdian0 + STRING_oldsoutharabian0 + STRING_oldturkic0 + STRING_olduyghur0 + STRING_oriya0 + STRING_orkh0 + STRING_orya0 + STRING_osage0 + STRING_osge0 + STRING_osma0 + STRING_osmanya0 + STRING_ougr0 + STRING_p0 + STRING_pahawhhmong0 + STRING_palm0 + STRING_palmyrene0 + STRING_patsyn0 + STRING_patternsyntax0 + STRING_patternwhitespace0 + STRING_patws0 + STRING_pauc0 + STRING_paucinhau0 + STRING_pc0 + STRING_pcm0 + STRING_pd0 + STRING_pe0 + STRING_perm0 + STRING_pf0 + STRING_phag0 + STRING_phagspa0 + STRING_phli0 + STRING_phlp0 + STRING_phnx0 + STRING_phoenician0 + STRING_pi0 + STRING_plrd0 + STRING_po0 + STRING_prependedconcatenationmark0 + STRING_prti0 + STRING_ps0 + STRING_psalterpahlavi0 + STRING_qaac0 + STRING_qaai0 + STRING_qmark0 + STRING_quotationmark0 + STRING_radical0 + STRING_regionalindicator0 + STRING_rejang0 + STRING_ri0 + STRING_rjng0 + STRING_rohg0 + STRING_runic0 + STRING_runr0 + STRING_s0 + STRING_samaritan0 + STRING_samr0 + STRING_sarb0 + STRING_saur0 + STRING_saurashtra0 + STRING_sc0 + STRING_sd0 + STRING_sentenceterminal0 + STRING_sgnw0 + STRING_sharada0 + STRING_shavian0 + STRING_shaw0 + STRING_shrd0 + STRING_sidd0 + STRING_siddham0 + STRING_signwriting0 + STRING_sind0 + STRING_sinh0 + STRING_sinhala0 + STRING_sk0 + STRING_sm0 + STRING_so0 + STRING_softdotted0 + STRING_sogd0 + STRING_sogdian0 + STRING_sogo0 + STRING_sora0 + STRING_sorasompeng0 + STRING_soyo0 + STRING_soyombo0 + STRING_space0 + STRING_sterm0 + STRING_sund0 + STRING_sundanese0 + STRING_sylo0 + STRING_sylotinagri0 + STRING_syrc0 + STRING_syriac0 + STRING_tagalog0 + STRING_tagb0 + STRING_tagbanwa0 + STRING_taile0 + STRING_taitham0 + STRING_taiviet0 + STRING_takr0 + STRING_takri0 + STRING_tale0 + STRING_talu0 + STRING_tamil0 + STRING_taml0 + STRING_tang0 + STRING_tangsa0 + STRING_tangut0 + STRING_tavt0 + STRING_telu0 + STRING_telugu0 + STRING_term0 + STRING_terminalpunctuation0 + STRING_tfng0 + STRING_tglg0 + STRING_thaa0 + STRING_thaana0 + STRING_thai0 + STRING_tibetan0 + STRING_tibt0 + STRING_tifinagh0 + STRING_tirh0 + STRING_tirhuta0 + STRING_tnsa0 + STRING_toto0 + STRING_ugar0 + STRING_ugaritic0 + STRING_uideo0 + STRING_unifiedideograph0 + STRING_unknown0 + STRING_upper0 + STRING_uppercase0 + STRING_vai0 + STRING_vaii0 + STRING_variationselector0 + STRING_vith0 + STRING_vithkuqi0 + STRING_vs0 + STRING_wancho0 + STRING_wara0 + STRING_warangciti0 + STRING_wcho0 + STRING_whitespace0 + STRING_wspace0 + STRING_xan0 + STRING_xidc0 + STRING_xidcontinue0 + STRING_xids0 + STRING_xidstart0 + STRING_xpeo0 + STRING_xps0 + STRING_xsp0 + STRING_xsux0 + STRING_xuc0 + STRING_xwd0 + STRING_yezi0 + STRING_yezidi0 + STRING_yi0 + STRING_yiii0 + STRING_z0 + STRING_zanabazarsquare0 + STRING_zanb0 + STRING_zinh0 + STRING_zl0 + STRING_zp0 + STRING_zs0 + STRING_zyyy0 + STRING_zzzz0; + +const ucp_type_table PRIV(utt)[] = { + { 0, PT_SCX, ucp_Adlam }, + { 6, PT_SCX, ucp_Adlam }, + { 11, PT_SC, ucp_Caucasian_Albanian }, + { 16, PT_BOOL, ucp_ASCII_Hex_Digit }, + { 21, PT_SC, ucp_Ahom }, + { 26, PT_BOOL, ucp_Alphabetic }, + { 32, PT_BOOL, ucp_Alphabetic }, + { 43, PT_SC, ucp_Anatolian_Hieroglyphs }, + { 64, PT_ANY, 0 }, + { 68, PT_SCX, ucp_Arabic }, + { 73, PT_SCX, ucp_Arabic }, + { 80, PT_SC, ucp_Armenian }, + { 89, PT_SC, ucp_Imperial_Aramaic }, + { 94, PT_SC, ucp_Armenian }, + { 99, PT_BOOL, ucp_ASCII }, + { 105, PT_BOOL, ucp_ASCII_Hex_Digit }, + { 119, PT_SC, ucp_Avestan }, + { 127, PT_SC, ucp_Avestan }, + { 132, PT_SC, ucp_Balinese }, + { 137, PT_SC, ucp_Balinese }, + { 146, PT_SC, ucp_Bamum }, + { 151, PT_SC, ucp_Bamum }, + { 157, PT_SC, ucp_Bassa_Vah }, + { 162, PT_SC, ucp_Bassa_Vah }, + { 171, PT_SC, ucp_Batak }, + { 177, PT_SC, ucp_Batak }, + { 182, PT_SCX, ucp_Bengali }, + { 187, PT_SCX, ucp_Bengali }, + { 195, PT_SC, ucp_Bhaiksuki }, + { 205, PT_SC, ucp_Bhaiksuki }, + { 210, PT_BIDICL, ucp_bidiAL }, + { 217, PT_BIDICL, ucp_bidiAN }, + { 224, PT_BIDICL, ucp_bidiB }, + { 230, PT_BIDICL, ucp_bidiBN }, + { 237, PT_BOOL, ucp_Bidi_Control }, + { 243, PT_BOOL, ucp_Bidi_Control }, + { 255, PT_BIDICL, ucp_bidiCS }, + { 262, PT_BIDICL, ucp_bidiEN }, + { 269, PT_BIDICL, ucp_bidiES }, + { 276, PT_BIDICL, ucp_bidiET }, + { 283, PT_BIDICL, ucp_bidiFSI }, + { 291, PT_BIDICL, ucp_bidiL }, + { 297, PT_BIDICL, ucp_bidiLRE }, + { 305, PT_BIDICL, ucp_bidiLRI }, + { 313, PT_BIDICL, ucp_bidiLRO }, + { 321, PT_BOOL, ucp_Bidi_Mirrored }, + { 327, PT_BOOL, ucp_Bidi_Mirrored }, + { 340, PT_BIDICL, ucp_bidiNSM }, + { 348, PT_BIDICL, ucp_bidiON }, + { 355, PT_BIDICL, ucp_bidiPDF }, + { 363, PT_BIDICL, ucp_bidiPDI }, + { 371, PT_BIDICL, ucp_bidiR }, + { 377, PT_BIDICL, ucp_bidiRLE }, + { 385, PT_BIDICL, ucp_bidiRLI }, + { 393, PT_BIDICL, ucp_bidiRLO }, + { 401, PT_BIDICL, ucp_bidiS }, + { 407, PT_BIDICL, ucp_bidiWS }, + { 414, PT_SCX, ucp_Bopomofo }, + { 419, PT_SCX, ucp_Bopomofo }, + { 428, PT_SC, ucp_Brahmi }, + { 433, PT_SC, ucp_Brahmi }, + { 440, PT_SC, ucp_Braille }, + { 445, PT_SC, ucp_Braille }, + { 453, PT_SCX, ucp_Buginese }, + { 458, PT_SCX, ucp_Buginese }, + { 467, PT_SCX, ucp_Buhid }, + { 472, PT_SCX, ucp_Buhid }, + { 478, PT_GC, ucp_C }, + { 480, PT_SCX, ucp_Chakma }, + { 485, PT_SC, ucp_Canadian_Aboriginal }, + { 504, PT_SC, ucp_Canadian_Aboriginal }, + { 509, PT_SC, ucp_Carian }, + { 514, PT_SC, ucp_Carian }, + { 521, PT_BOOL, ucp_Cased }, + { 527, PT_BOOL, ucp_Case_Ignorable }, + { 541, PT_SC, ucp_Caucasian_Albanian }, + { 559, PT_PC, ucp_Cc }, + { 562, PT_PC, ucp_Cf }, + { 565, PT_SCX, ucp_Chakma }, + { 572, PT_SC, ucp_Cham }, + { 577, PT_BOOL, ucp_Changes_When_Casefolded }, + { 599, PT_BOOL, ucp_Changes_When_Casemapped }, + { 621, PT_BOOL, ucp_Changes_When_Lowercased }, + { 643, PT_BOOL, ucp_Changes_When_Titlecased }, + { 665, PT_BOOL, ucp_Changes_When_Uppercased }, + { 687, PT_SC, ucp_Cherokee }, + { 692, PT_SC, ucp_Cherokee }, + { 701, PT_SC, ucp_Chorasmian }, + { 712, PT_SC, ucp_Chorasmian }, + { 717, PT_BOOL, ucp_Case_Ignorable }, + { 720, PT_PC, ucp_Cn }, + { 723, PT_PC, ucp_Co }, + { 726, PT_SC, ucp_Common }, + { 733, PT_SCX, ucp_Coptic }, + { 738, PT_SCX, ucp_Coptic }, + { 745, PT_SCX, ucp_Cypro_Minoan }, + { 750, PT_SCX, ucp_Cypriot }, + { 755, PT_PC, ucp_Cs }, + { 758, PT_SC, ucp_Cuneiform }, + { 768, PT_BOOL, ucp_Changes_When_Casefolded }, + { 773, PT_BOOL, ucp_Changes_When_Casemapped }, + { 778, PT_BOOL, ucp_Changes_When_Lowercased }, + { 782, PT_BOOL, ucp_Changes_When_Titlecased }, + { 786, PT_BOOL, ucp_Changes_When_Uppercased }, + { 790, PT_SCX, ucp_Cypriot }, + { 798, PT_SCX, ucp_Cypro_Minoan }, + { 810, PT_SCX, ucp_Cyrillic }, + { 819, PT_SCX, ucp_Cyrillic }, + { 824, PT_BOOL, ucp_Dash }, + { 829, PT_BOOL, ucp_Default_Ignorable_Code_Point }, + { 855, PT_BOOL, ucp_Deprecated }, + { 859, PT_BOOL, ucp_Deprecated }, + { 870, PT_SC, ucp_Deseret }, + { 878, PT_SCX, ucp_Devanagari }, + { 883, PT_SCX, ucp_Devanagari }, + { 894, PT_BOOL, ucp_Default_Ignorable_Code_Point }, + { 897, PT_BOOL, ucp_Diacritic }, + { 901, PT_BOOL, ucp_Diacritic }, + { 911, PT_SC, ucp_Dives_Akuru }, + { 916, PT_SC, ucp_Dives_Akuru }, + { 927, PT_SCX, ucp_Dogra }, + { 932, PT_SCX, ucp_Dogra }, + { 938, PT_SC, ucp_Deseret }, + { 943, PT_SCX, ucp_Duployan }, + { 948, PT_SCX, ucp_Duployan }, + { 957, PT_BOOL, ucp_Emoji_Modifier_Base }, + { 963, PT_BOOL, ucp_Emoji_Component }, + { 969, PT_SC, ucp_Egyptian_Hieroglyphs }, + { 974, PT_SC, ucp_Egyptian_Hieroglyphs }, + { 994, PT_SC, ucp_Elbasan }, + { 999, PT_SC, ucp_Elbasan }, + { 1007, PT_SC, ucp_Elymaic }, + { 1012, PT_SC, ucp_Elymaic }, + { 1020, PT_BOOL, ucp_Emoji_Modifier }, + { 1025, PT_BOOL, ucp_Emoji }, + { 1031, PT_BOOL, ucp_Emoji_Component }, + { 1046, PT_BOOL, ucp_Emoji_Modifier }, + { 1060, PT_BOOL, ucp_Emoji_Modifier_Base }, + { 1078, PT_BOOL, ucp_Emoji_Presentation }, + { 1096, PT_BOOL, ucp_Emoji_Presentation }, + { 1102, PT_SC, ucp_Ethiopic }, + { 1107, PT_SC, ucp_Ethiopic }, + { 1116, PT_BOOL, ucp_Extender }, + { 1120, PT_BOOL, ucp_Extended_Pictographic }, + { 1141, PT_BOOL, ucp_Extender }, + { 1150, PT_BOOL, ucp_Extended_Pictographic }, + { 1158, PT_SCX, ucp_Georgian }, + { 1163, PT_SCX, ucp_Georgian }, + { 1172, PT_SCX, ucp_Glagolitic }, + { 1177, PT_SCX, ucp_Glagolitic }, + { 1188, PT_SCX, ucp_Gunjala_Gondi }, + { 1193, PT_SCX, ucp_Masaram_Gondi }, + { 1198, PT_SC, ucp_Gothic }, + { 1203, PT_SC, ucp_Gothic }, + { 1210, PT_SCX, ucp_Grantha }, + { 1215, PT_SCX, ucp_Grantha }, + { 1223, PT_BOOL, ucp_Grapheme_Base }, + { 1236, PT_BOOL, ucp_Grapheme_Extend }, + { 1251, PT_BOOL, ucp_Grapheme_Link }, + { 1264, PT_BOOL, ucp_Grapheme_Base }, + { 1271, PT_SCX, ucp_Greek }, + { 1277, PT_SCX, ucp_Greek }, + { 1282, PT_BOOL, ucp_Grapheme_Extend }, + { 1288, PT_BOOL, ucp_Grapheme_Link }, + { 1295, PT_SCX, ucp_Gujarati }, + { 1304, PT_SCX, ucp_Gujarati }, + { 1309, PT_SCX, ucp_Gunjala_Gondi }, + { 1322, PT_SCX, ucp_Gurmukhi }, + { 1331, PT_SCX, ucp_Gurmukhi }, + { 1336, PT_SCX, ucp_Han }, + { 1340, PT_SCX, ucp_Hangul }, + { 1345, PT_SCX, ucp_Hangul }, + { 1352, PT_SCX, ucp_Han }, + { 1357, PT_SCX, ucp_Hanifi_Rohingya }, + { 1372, PT_SCX, ucp_Hanunoo }, + { 1377, PT_SCX, ucp_Hanunoo }, + { 1385, PT_SC, ucp_Hatran }, + { 1390, PT_SC, ucp_Hatran }, + { 1397, PT_SC, ucp_Hebrew }, + { 1402, PT_SC, ucp_Hebrew }, + { 1409, PT_BOOL, ucp_Hex_Digit }, + { 1413, PT_BOOL, ucp_Hex_Digit }, + { 1422, PT_SCX, ucp_Hiragana }, + { 1427, PT_SCX, ucp_Hiragana }, + { 1436, PT_SC, ucp_Anatolian_Hieroglyphs }, + { 1441, PT_SC, ucp_Pahawh_Hmong }, + { 1446, PT_SC, ucp_Nyiakeng_Puachue_Hmong }, + { 1451, PT_SC, ucp_Old_Hungarian }, + { 1456, PT_BOOL, ucp_ID_Continue }, + { 1460, PT_BOOL, ucp_ID_Continue }, + { 1471, PT_BOOL, ucp_Ideographic }, + { 1476, PT_BOOL, ucp_Ideographic }, + { 1488, PT_BOOL, ucp_ID_Start }, + { 1492, PT_BOOL, ucp_IDS_Binary_Operator }, + { 1497, PT_BOOL, ucp_IDS_Binary_Operator }, + { 1515, PT_BOOL, ucp_IDS_Trinary_Operator }, + { 1520, PT_BOOL, ucp_ID_Start }, + { 1528, PT_BOOL, ucp_IDS_Trinary_Operator }, + { 1547, PT_SC, ucp_Imperial_Aramaic }, + { 1563, PT_SC, ucp_Inherited }, + { 1573, PT_SC, ucp_Inscriptional_Pahlavi }, + { 1594, PT_SC, ucp_Inscriptional_Parthian }, + { 1616, PT_SC, ucp_Old_Italic }, + { 1621, PT_SCX, ucp_Javanese }, + { 1626, PT_SCX, ucp_Javanese }, + { 1635, PT_BOOL, ucp_Join_Control }, + { 1641, PT_BOOL, ucp_Join_Control }, + { 1653, PT_SCX, ucp_Kaithi }, + { 1660, PT_SCX, ucp_Kayah_Li }, + { 1665, PT_SCX, ucp_Katakana }, + { 1670, PT_SCX, ucp_Kannada }, + { 1678, PT_SCX, ucp_Katakana }, + { 1687, PT_SCX, ucp_Kayah_Li }, + { 1695, PT_SC, ucp_Kharoshthi }, + { 1700, PT_SC, ucp_Kharoshthi }, + { 1711, PT_SC, ucp_Khitan_Small_Script }, + { 1729, PT_SC, ucp_Khmer }, + { 1735, PT_SC, ucp_Khmer }, + { 1740, PT_SCX, ucp_Khojki }, + { 1745, PT_SCX, ucp_Khojki }, + { 1752, PT_SCX, ucp_Khudawadi }, + { 1762, PT_SC, ucp_Khitan_Small_Script }, + { 1767, PT_SCX, ucp_Kannada }, + { 1772, PT_SCX, ucp_Kaithi }, + { 1777, PT_GC, ucp_L }, + { 1779, PT_LAMP, 0 }, + { 1782, PT_SC, ucp_Tai_Tham }, + { 1787, PT_SC, ucp_Lao }, + { 1791, PT_SC, ucp_Lao }, + { 1796, PT_SCX, ucp_Latin }, + { 1802, PT_SCX, ucp_Latin }, + { 1807, PT_LAMP, 0 }, + { 1810, PT_SC, ucp_Lepcha }, + { 1815, PT_SC, ucp_Lepcha }, + { 1822, PT_SCX, ucp_Limbu }, + { 1827, PT_SCX, ucp_Limbu }, + { 1833, PT_SCX, ucp_Linear_A }, + { 1838, PT_SCX, ucp_Linear_B }, + { 1843, PT_SCX, ucp_Linear_A }, + { 1851, PT_SCX, ucp_Linear_B }, + { 1859, PT_SC, ucp_Lisu }, + { 1864, PT_PC, ucp_Ll }, + { 1867, PT_PC, ucp_Lm }, + { 1870, PT_PC, ucp_Lo }, + { 1873, PT_BOOL, ucp_Logical_Order_Exception }, + { 1877, PT_BOOL, ucp_Logical_Order_Exception }, + { 1899, PT_BOOL, ucp_Lowercase }, + { 1905, PT_BOOL, ucp_Lowercase }, + { 1915, PT_PC, ucp_Lt }, + { 1918, PT_PC, ucp_Lu }, + { 1921, PT_SC, ucp_Lycian }, + { 1926, PT_SC, ucp_Lycian }, + { 1933, PT_SC, ucp_Lydian }, + { 1938, PT_SC, ucp_Lydian }, + { 1945, PT_GC, ucp_M }, + { 1947, PT_SCX, ucp_Mahajani }, + { 1956, PT_SCX, ucp_Mahajani }, + { 1961, PT_SC, ucp_Makasar }, + { 1966, PT_SC, ucp_Makasar }, + { 1974, PT_SCX, ucp_Malayalam }, + { 1984, PT_SCX, ucp_Mandaic }, + { 1989, PT_SCX, ucp_Mandaic }, + { 1997, PT_SCX, ucp_Manichaean }, + { 2002, PT_SCX, ucp_Manichaean }, + { 2013, PT_SC, ucp_Marchen }, + { 2018, PT_SC, ucp_Marchen }, + { 2026, PT_SCX, ucp_Masaram_Gondi }, + { 2039, PT_BOOL, ucp_Math }, + { 2044, PT_PC, ucp_Mc }, + { 2047, PT_PC, ucp_Me }, + { 2050, PT_SC, ucp_Medefaidrin }, + { 2062, PT_SC, ucp_Medefaidrin }, + { 2067, PT_SC, ucp_Meetei_Mayek }, + { 2079, PT_SC, ucp_Mende_Kikakui }, + { 2084, PT_SC, ucp_Mende_Kikakui }, + { 2097, PT_SC, ucp_Meroitic_Cursive }, + { 2102, PT_SC, ucp_Meroitic_Hieroglyphs }, + { 2107, PT_SC, ucp_Meroitic_Cursive }, + { 2123, PT_SC, ucp_Meroitic_Hieroglyphs }, + { 2143, PT_SC, ucp_Miao }, + { 2148, PT_SCX, ucp_Malayalam }, + { 2153, PT_PC, ucp_Mn }, + { 2156, PT_SCX, ucp_Modi }, + { 2161, PT_SCX, ucp_Mongolian }, + { 2166, PT_SCX, ucp_Mongolian }, + { 2176, PT_SC, ucp_Mro }, + { 2180, PT_SC, ucp_Mro }, + { 2185, PT_SC, ucp_Meetei_Mayek }, + { 2190, PT_SCX, ucp_Multani }, + { 2195, PT_SCX, ucp_Multani }, + { 2203, PT_SCX, ucp_Myanmar }, + { 2211, PT_SCX, ucp_Myanmar }, + { 2216, PT_GC, ucp_N }, + { 2218, PT_SC, ucp_Nabataean }, + { 2228, PT_SCX, ucp_Nandinagari }, + { 2233, PT_SCX, ucp_Nandinagari }, + { 2245, PT_SC, ucp_Old_North_Arabian }, + { 2250, PT_SC, ucp_Nabataean }, + { 2255, PT_BOOL, ucp_Noncharacter_Code_Point }, + { 2261, PT_PC, ucp_Nd }, + { 2264, PT_SC, ucp_Newa }, + { 2269, PT_SC, ucp_New_Tai_Lue }, + { 2279, PT_SCX, ucp_Nko }, + { 2283, PT_SCX, ucp_Nko }, + { 2288, PT_PC, ucp_Nl }, + { 2291, PT_PC, ucp_No }, + { 2294, PT_BOOL, ucp_Noncharacter_Code_Point }, + { 2316, PT_SC, ucp_Nushu }, + { 2321, PT_SC, ucp_Nushu }, + { 2327, PT_SC, ucp_Nyiakeng_Puachue_Hmong }, + { 2348, PT_SC, ucp_Ogham }, + { 2353, PT_SC, ucp_Ogham }, + { 2359, PT_SC, ucp_Ol_Chiki }, + { 2367, PT_SC, ucp_Ol_Chiki }, + { 2372, PT_SC, ucp_Old_Hungarian }, + { 2385, PT_SC, ucp_Old_Italic }, + { 2395, PT_SC, ucp_Old_North_Arabian }, + { 2411, PT_SCX, ucp_Old_Permic }, + { 2421, PT_SC, ucp_Old_Persian }, + { 2432, PT_SC, ucp_Old_Sogdian }, + { 2443, PT_SC, ucp_Old_South_Arabian }, + { 2459, PT_SC, ucp_Old_Turkic }, + { 2469, PT_SCX, ucp_Old_Uyghur }, + { 2479, PT_SCX, ucp_Oriya }, + { 2485, PT_SC, ucp_Old_Turkic }, + { 2490, PT_SCX, ucp_Oriya }, + { 2495, PT_SC, ucp_Osage }, + { 2501, PT_SC, ucp_Osage }, + { 2506, PT_SC, ucp_Osmanya }, + { 2511, PT_SC, ucp_Osmanya }, + { 2519, PT_SCX, ucp_Old_Uyghur }, + { 2524, PT_GC, ucp_P }, + { 2526, PT_SC, ucp_Pahawh_Hmong }, + { 2538, PT_SC, ucp_Palmyrene }, + { 2543, PT_SC, ucp_Palmyrene }, + { 2553, PT_BOOL, ucp_Pattern_Syntax }, + { 2560, PT_BOOL, ucp_Pattern_Syntax }, + { 2574, PT_BOOL, ucp_Pattern_White_Space }, + { 2592, PT_BOOL, ucp_Pattern_White_Space }, + { 2598, PT_SC, ucp_Pau_Cin_Hau }, + { 2603, PT_SC, ucp_Pau_Cin_Hau }, + { 2613, PT_PC, ucp_Pc }, + { 2616, PT_BOOL, ucp_Prepended_Concatenation_Mark }, + { 2620, PT_PC, ucp_Pd }, + { 2623, PT_PC, ucp_Pe }, + { 2626, PT_SCX, ucp_Old_Permic }, + { 2631, PT_PC, ucp_Pf }, + { 2634, PT_SCX, ucp_Phags_Pa }, + { 2639, PT_SCX, ucp_Phags_Pa }, + { 2647, PT_SC, ucp_Inscriptional_Pahlavi }, + { 2652, PT_SCX, ucp_Psalter_Pahlavi }, + { 2657, PT_SC, ucp_Phoenician }, + { 2662, PT_SC, ucp_Phoenician }, + { 2673, PT_PC, ucp_Pi }, + { 2676, PT_SC, ucp_Miao }, + { 2681, PT_PC, ucp_Po }, + { 2684, PT_BOOL, ucp_Prepended_Concatenation_Mark }, + { 2711, PT_SC, ucp_Inscriptional_Parthian }, + { 2716, PT_PC, ucp_Ps }, + { 2719, PT_SCX, ucp_Psalter_Pahlavi }, + { 2734, PT_SCX, ucp_Coptic }, + { 2739, PT_SC, ucp_Inherited }, + { 2744, PT_BOOL, ucp_Quotation_Mark }, + { 2750, PT_BOOL, ucp_Quotation_Mark }, + { 2764, PT_BOOL, ucp_Radical }, + { 2772, PT_BOOL, ucp_Regional_Indicator }, + { 2790, PT_SC, ucp_Rejang }, + { 2797, PT_BOOL, ucp_Regional_Indicator }, + { 2800, PT_SC, ucp_Rejang }, + { 2805, PT_SCX, ucp_Hanifi_Rohingya }, + { 2810, PT_SC, ucp_Runic }, + { 2816, PT_SC, ucp_Runic }, + { 2821, PT_GC, ucp_S }, + { 2823, PT_SC, ucp_Samaritan }, + { 2833, PT_SC, ucp_Samaritan }, + { 2838, PT_SC, ucp_Old_South_Arabian }, + { 2843, PT_SC, ucp_Saurashtra }, + { 2848, PT_SC, ucp_Saurashtra }, + { 2859, PT_PC, ucp_Sc }, + { 2862, PT_BOOL, ucp_Soft_Dotted }, + { 2865, PT_BOOL, ucp_Sentence_Terminal }, + { 2882, PT_SC, ucp_SignWriting }, + { 2887, PT_SCX, ucp_Sharada }, + { 2895, PT_SC, ucp_Shavian }, + { 2903, PT_SC, ucp_Shavian }, + { 2908, PT_SCX, ucp_Sharada }, + { 2913, PT_SC, ucp_Siddham }, + { 2918, PT_SC, ucp_Siddham }, + { 2926, PT_SC, ucp_SignWriting }, + { 2938, PT_SCX, ucp_Khudawadi }, + { 2943, PT_SCX, ucp_Sinhala }, + { 2948, PT_SCX, ucp_Sinhala }, + { 2956, PT_PC, ucp_Sk }, + { 2959, PT_PC, ucp_Sm }, + { 2962, PT_PC, ucp_So }, + { 2965, PT_BOOL, ucp_Soft_Dotted }, + { 2976, PT_SCX, ucp_Sogdian }, + { 2981, PT_SCX, ucp_Sogdian }, + { 2989, PT_SC, ucp_Old_Sogdian }, + { 2994, PT_SC, ucp_Sora_Sompeng }, + { 2999, PT_SC, ucp_Sora_Sompeng }, + { 3011, PT_SC, ucp_Soyombo }, + { 3016, PT_SC, ucp_Soyombo }, + { 3024, PT_BOOL, ucp_White_Space }, + { 3030, PT_BOOL, ucp_Sentence_Terminal }, + { 3036, PT_SC, ucp_Sundanese }, + { 3041, PT_SC, ucp_Sundanese }, + { 3051, PT_SCX, ucp_Syloti_Nagri }, + { 3056, PT_SCX, ucp_Syloti_Nagri }, + { 3068, PT_SCX, ucp_Syriac }, + { 3073, PT_SCX, ucp_Syriac }, + { 3080, PT_SCX, ucp_Tagalog }, + { 3088, PT_SCX, ucp_Tagbanwa }, + { 3093, PT_SCX, ucp_Tagbanwa }, + { 3102, PT_SCX, ucp_Tai_Le }, + { 3108, PT_SC, ucp_Tai_Tham }, + { 3116, PT_SC, ucp_Tai_Viet }, + { 3124, PT_SCX, ucp_Takri }, + { 3129, PT_SCX, ucp_Takri }, + { 3135, PT_SCX, ucp_Tai_Le }, + { 3140, PT_SC, ucp_New_Tai_Lue }, + { 3145, PT_SCX, ucp_Tamil }, + { 3151, PT_SCX, ucp_Tamil }, + { 3156, PT_SC, ucp_Tangut }, + { 3161, PT_SC, ucp_Tangsa }, + { 3168, PT_SC, ucp_Tangut }, + { 3175, PT_SC, ucp_Tai_Viet }, + { 3180, PT_SCX, ucp_Telugu }, + { 3185, PT_SCX, ucp_Telugu }, + { 3192, PT_BOOL, ucp_Terminal_Punctuation }, + { 3197, PT_BOOL, ucp_Terminal_Punctuation }, + { 3217, PT_SC, ucp_Tifinagh }, + { 3222, PT_SCX, ucp_Tagalog }, + { 3227, PT_SCX, ucp_Thaana }, + { 3232, PT_SCX, ucp_Thaana }, + { 3239, PT_SC, ucp_Thai }, + { 3244, PT_SC, ucp_Tibetan }, + { 3252, PT_SC, ucp_Tibetan }, + { 3257, PT_SC, ucp_Tifinagh }, + { 3266, PT_SCX, ucp_Tirhuta }, + { 3271, PT_SCX, ucp_Tirhuta }, + { 3279, PT_SC, ucp_Tangsa }, + { 3284, PT_SC, ucp_Toto }, + { 3289, PT_SC, ucp_Ugaritic }, + { 3294, PT_SC, ucp_Ugaritic }, + { 3303, PT_BOOL, ucp_Unified_Ideograph }, + { 3309, PT_BOOL, ucp_Unified_Ideograph }, + { 3326, PT_SC, ucp_Unknown }, + { 3334, PT_BOOL, ucp_Uppercase }, + { 3340, PT_BOOL, ucp_Uppercase }, + { 3350, PT_SC, ucp_Vai }, + { 3354, PT_SC, ucp_Vai }, + { 3359, PT_BOOL, ucp_Variation_Selector }, + { 3377, PT_SC, ucp_Vithkuqi }, + { 3382, PT_SC, ucp_Vithkuqi }, + { 3391, PT_BOOL, ucp_Variation_Selector }, + { 3394, PT_SC, ucp_Wancho }, + { 3401, PT_SC, ucp_Warang_Citi }, + { 3406, PT_SC, ucp_Warang_Citi }, + { 3417, PT_SC, ucp_Wancho }, + { 3422, PT_BOOL, ucp_White_Space }, + { 3433, PT_BOOL, ucp_White_Space }, + { 3440, PT_ALNUM, 0 }, + { 3444, PT_BOOL, ucp_XID_Continue }, + { 3449, PT_BOOL, ucp_XID_Continue }, + { 3461, PT_BOOL, ucp_XID_Start }, + { 3466, PT_BOOL, ucp_XID_Start }, + { 3475, PT_SC, ucp_Old_Persian }, + { 3480, PT_PXSPACE, 0 }, + { 3484, PT_SPACE, 0 }, + { 3488, PT_SC, ucp_Cuneiform }, + { 3493, PT_UCNC, 0 }, + { 3497, PT_WORD, 0 }, + { 3501, PT_SCX, ucp_Yezidi }, + { 3506, PT_SCX, ucp_Yezidi }, + { 3513, PT_SCX, ucp_Yi }, + { 3516, PT_SCX, ucp_Yi }, + { 3521, PT_GC, ucp_Z }, + { 3523, PT_SC, ucp_Zanabazar_Square }, + { 3539, PT_SC, ucp_Zanabazar_Square }, + { 3544, PT_SC, ucp_Inherited }, + { 3549, PT_PC, ucp_Zl }, + { 3552, PT_PC, ucp_Zp }, + { 3555, PT_PC, ucp_Zs }, + { 3558, PT_SC, ucp_Common }, + { 3563, PT_SC, ucp_Unknown } +}; + +const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table); + +#endif /* SUPPORT_UNICODE */ + +/* End of pcre2_ucptables.c */ diff --git a/thirdparty/pcre2/src/pcre2_xclass.c b/thirdparty/pcre2/src/pcre2_xclass.c index 8b052be66a..bb57196449 100644 --- a/thirdparty/pcre2/src/pcre2_xclass.c +++ b/thirdparty/pcre2/src/pcre2_xclass.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2019 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -135,6 +135,7 @@ while ((t = *data++) != XCL_END) { const ucd_record *prop = GET_UCD(c); BOOL isprop = t == XCL_PROP; + BOOL ok; switch(*data) { @@ -160,6 +161,12 @@ while ((t = *data++) != XCL_END) if ((data[1] == prop->script) == isprop) return !negated; break; + case PT_SCX: + ok = (data[1] == prop->script || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), data[1]) != 0); + if (ok == isprop) return !negated; + break; + case PT_ALNUM: if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || PRIV(ucp_gentype)[prop->chartype] == ucp_N) == isprop) @@ -207,6 +214,17 @@ while ((t = *data++) != XCL_END) } break; + case PT_BIDICL: + if ((UCD_BIDICLASS_PROP(prop) == data[1]) == isprop) + return !negated; + break; + + case PT_BOOL: + ok = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), data[1]) != 0; + if (ok == isprop) return !negated; + break; + /* The following three properties can occur only in an XCLASS, as there is no \p or \P coding for them. */ diff --git a/thirdparty/pcre2/src/sljit/sljitConfigInternal.h b/thirdparty/pcre2/src/sljit/sljitConfigInternal.h index 7bb9990a59..55e4e39f13 100644 --- a/thirdparty/pcre2/src/sljit/sljitConfigInternal.h +++ b/thirdparty/pcre2/src/sljit/sljitConfigInternal.h @@ -60,7 +60,7 @@ extern "C" { SLJIT_LITTLE_ENDIAN : little endian architecture SLJIT_BIG_ENDIAN : big endian architecture SLJIT_UNALIGNED : allows unaligned memory accesses for non-fpu operations (only!) - SLJIT_INDIRECT_CALL : see SLJIT_FUNC_OFFSET() for more information + SLJIT_INDIRECT_CALL : see SLJIT_FUNC_ADDR() for more information Constants: SLJIT_NUMBER_OF_REGISTERS : number of available registers @@ -148,7 +148,7 @@ extern "C" { #endif #elif defined (__aarch64__) #define SLJIT_CONFIG_ARM_64 1 -#elif defined(__ppc64__) || defined(__powerpc64__) || defined(_ARCH_PPC64) || (defined(_POWER) && defined(__64BIT__)) +#elif defined(__ppc64__) || defined(__powerpc64__) || (defined(_ARCH_PPC64) && defined(__64BIT__)) || (defined(_POWER) && defined(__64BIT__)) #define SLJIT_CONFIG_PPC_64 1 #elif defined(__ppc__) || defined(__powerpc__) || defined(_ARCH_PPC) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defined(_POWER) #define SLJIT_CONFIG_PPC_32 1 @@ -156,7 +156,7 @@ extern "C" { #define SLJIT_CONFIG_MIPS_32 1 #elif defined(__mips64) #define SLJIT_CONFIG_MIPS_64 1 -#elif defined(__sparc__) || defined(__sparc) +#elif (defined(__sparc__) || defined(__sparc)) && !defined(_LP64) #define SLJIT_CONFIG_SPARC_32 1 #elif defined(__s390x__) #define SLJIT_CONFIG_S390X 1 @@ -274,9 +274,13 @@ extern "C" { #ifndef SLJIT_INLINE /* Inline functions. Some old compilers do not support them. */ -#if defined(__SUNPRO_C) && __SUNPRO_C <= 0x510 +#ifdef __SUNPRO_C +#if __SUNPRO_C < 0x560 #define SLJIT_INLINE #else +#define SLJIT_INLINE inline +#endif /* __SUNPRO_C */ +#else #define SLJIT_INLINE __inline #endif #endif /* !SLJIT_INLINE */ @@ -319,18 +323,36 @@ extern "C" { /* Instruction cache flush. */ /****************************/ +/* + * TODO: + * + * clang >= 15 could be safe to enable below + * older versions are known to abort in some targets + * https://github.com/PhilipHazel/pcre2/issues/92 + * + * beware APPLE is known to have removed the code in iOS so + * it will need to be excempted or result in broken builds + */ #if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin) -#if __has_builtin(__builtin___clear_cache) +#if __has_builtin(__builtin___clear_cache) && !defined(__clang__) +/* + * https://gcc.gnu.org/bugzilla//show_bug.cgi?id=91248 + * https://gcc.gnu.org/bugzilla//show_bug.cgi?id=93811 + * gcc's clear_cache builtin for power and sparc are broken + */ +#if !defined(SLJIT_CONFIG_PPC) && !defined(SLJIT_CONFIG_SPARC_32) #define SLJIT_CACHE_FLUSH(from, to) \ __builtin___clear_cache((char*)(from), (char*)(to)) +#endif -#endif /* __has_builtin(__builtin___clear_cache) */ +#endif /* gcc >= 10 */ #endif /* (!defined SLJIT_CACHE_FLUSH && defined __has_builtin) */ #ifndef SLJIT_CACHE_FLUSH -#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) +#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) \ + || (defined SLJIT_CONFIG_S390X && SLJIT_CONFIG_S390X) /* Not required to implement on archs with unified caches. */ #define SLJIT_CACHE_FLUSH(from, to) @@ -340,9 +362,9 @@ extern "C" { /* Supported by all macs since Mac OS 10.5. However, it does not work on non-jailbroken iOS devices, although the compilation is successful. */ - +#include <libkern/OSCacheControl.h> #define SLJIT_CACHE_FLUSH(from, to) \ - sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from)) + sys_icache_invalidate((void*)(from), (size_t)((char*)(to) - (char*)(from))) #elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC) @@ -351,33 +373,33 @@ extern "C" { ppc_cache_flush((from), (to)) #define SLJIT_CACHE_FLUSH_OWN_IMPL 1 -#elif (defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) +#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) +/* The __clear_cache() implementation of GCC is a dummy function on Sparc. */ #define SLJIT_CACHE_FLUSH(from, to) \ - __builtin___clear_cache((char*)(from), (char*)(to)) - -#elif defined __ANDROID__ + sparc_cache_flush((from), (to)) +#define SLJIT_CACHE_FLUSH_OWN_IMPL 1 -/* Android lacks __clear_cache; instead, cacheflush should be used. */ +#elif (defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || defined(__clang__) #define SLJIT_CACHE_FLUSH(from, to) \ - cacheflush((long)(from), (long)(to), 0) + __builtin___clear_cache((char*)(from), (char*)(to)) -#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) +#elif defined __ANDROID__ -/* The __clear_cache() implementation of GCC is a dummy function on Sparc. */ +/* Android ARMv7 with gcc lacks __clear_cache; use cacheflush instead. */ +#include <sys/cachectl.h> #define SLJIT_CACHE_FLUSH(from, to) \ - sparc_cache_flush((from), (to)) -#define SLJIT_CACHE_FLUSH_OWN_IMPL 1 + cacheflush((long)(from), (long)(to), 0) #elif defined _WIN32 #define SLJIT_CACHE_FLUSH(from, to) \ - FlushInstructionCache(GetCurrentProcess(), (char*)(from), (char*)(to) - (char*)(from)) + FlushInstructionCache(GetCurrentProcess(), (void*)(from), (char*)(to) - (char*)(from)) #else -/* Calls __ARM_NR_cacheflush on ARM-Linux. */ +/* Call __ARM_NR_cacheflush on ARM-Linux or the corresponding MIPS syscall. */ #define SLJIT_CACHE_FLUSH(from, to) \ __clear_cache((char*)(from), (char*)(to)) @@ -645,18 +667,23 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr); #define SLJIT_NUMBER_OF_REGISTERS 12 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 9 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 7 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 0 #define SLJIT_LOCALS_OFFSET_BASE (compiler->locals_offset) #define SLJIT_PREF_SHIFT_REG SLJIT_R2 #elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) #define SLJIT_NUMBER_OF_REGISTERS 13 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 15 #ifndef _WIN64 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 6 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 0 #define SLJIT_LOCALS_OFFSET_BASE 0 #else /* _WIN64 */ #define SLJIT_NUMBER_OF_SAVED_REGISTERS 8 -#define SLJIT_LOCALS_OFFSET_BASE (compiler->locals_offset) +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 10 +#define SLJIT_LOCALS_OFFSET_BASE (4 * (sljit_s32)sizeof(sljit_sw)) #endif /* !_WIN64 */ #define SLJIT_PREF_SHIFT_REG SLJIT_R3 @@ -664,31 +691,39 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr); #define SLJIT_NUMBER_OF_REGISTERS 12 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 8 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 14 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 8 #define SLJIT_LOCALS_OFFSET_BASE 0 #elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) #define SLJIT_NUMBER_OF_REGISTERS 12 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 8 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 14 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 8 #define SLJIT_LOCALS_OFFSET_BASE 0 #elif (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) #define SLJIT_NUMBER_OF_REGISTERS 26 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 10 -#define SLJIT_LOCALS_OFFSET_BASE 0 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 30 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 8 +#define SLJIT_LOCALS_OFFSET_BASE (2 * (sljit_s32)sizeof(sljit_sw)) #elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC) #define SLJIT_NUMBER_OF_REGISTERS 23 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 17 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 30 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 18 #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) || (defined _AIX) -#define SLJIT_LOCALS_OFFSET_BASE ((6 + 8) * sizeof(sljit_sw)) +#define SLJIT_LOCALS_OFFSET_BASE ((6 + 8) * (sljit_s32)sizeof(sljit_sw)) #elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) /* Add +1 for double alignment. */ -#define SLJIT_LOCALS_OFFSET_BASE ((3 + 1) * sizeof(sljit_sw)) +#define SLJIT_LOCALS_OFFSET_BASE ((3 + 1) * (sljit_s32)sizeof(sljit_sw)) #else -#define SLJIT_LOCALS_OFFSET_BASE (3 * sizeof(sljit_sw)) +#define SLJIT_LOCALS_OFFSET_BASE (3 * (sljit_s32)sizeof(sljit_sw)) #endif /* SLJIT_CONFIG_PPC_64 || _AIX */ #elif (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS) @@ -696,19 +731,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr); #define SLJIT_NUMBER_OF_REGISTERS 21 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 8 #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -#define SLJIT_LOCALS_OFFSET_BASE (4 * sizeof(sljit_sw)) +#define SLJIT_LOCALS_OFFSET_BASE (4 * (sljit_s32)sizeof(sljit_sw)) +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 13 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 6 #else #define SLJIT_LOCALS_OFFSET_BASE 0 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 29 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 8 #endif #elif (defined SLJIT_CONFIG_SPARC && SLJIT_CONFIG_SPARC) #define SLJIT_NUMBER_OF_REGISTERS 18 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 14 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 14 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 0 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) /* saved registers (16), return struct pointer (1), space for 6 argument words (1), 4th double arg (2), double alignment (1). */ -#define SLJIT_LOCALS_OFFSET_BASE ((16 + 1 + 6 + 2 + 1) * sizeof(sljit_sw)) +#define SLJIT_LOCALS_OFFSET_BASE ((16 + 1 + 6 + 2 + 1) * (sljit_s32)sizeof(sljit_sw)) #endif #elif (defined SLJIT_CONFIG_S390X && SLJIT_CONFIG_S390X) @@ -736,12 +777,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr); #define SLJIT_NUMBER_OF_REGISTERS 12 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 8 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 15 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 8 #define SLJIT_LOCALS_OFFSET_BASE SLJIT_S390X_DEFAULT_STACK_FRAME_SIZE #elif (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) #define SLJIT_NUMBER_OF_REGISTERS 0 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 0 +#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 0 +#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 0 #define SLJIT_LOCALS_OFFSET_BASE 0 #endif @@ -751,13 +796,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr); #define SLJIT_NUMBER_OF_SCRATCH_REGISTERS \ (SLJIT_NUMBER_OF_REGISTERS - SLJIT_NUMBER_OF_SAVED_REGISTERS) -#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 6 -#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && (defined _WIN64) -#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 1 -#else -#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 0 -#endif - #define SLJIT_NUMBER_OF_SCRATCH_FLOAT_REGISTERS \ (SLJIT_NUMBER_OF_FLOAT_REGISTERS - SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS) @@ -765,8 +803,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr); /* CPU status flags management. */ /********************************/ -#if (defined SLJIT_CONFIG_ARM_32 && SLJIT_CONFIG_ARM_32) \ - || (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \ +#if (defined SLJIT_CONFIG_ARM && SLJIT_CONFIG_ARM) \ + || (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC) \ || (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS) \ || (defined SLJIT_CONFIG_SPARC && SLJIT_CONFIG_SPARC) \ || (defined SLJIT_CONFIG_S390X && SLJIT_CONFIG_S390X) diff --git a/thirdparty/pcre2/src/sljit/sljitExecAllocator.c b/thirdparty/pcre2/src/sljit/sljitExecAllocator.c index 6e5bf78e45..6359848cd5 100644 --- a/thirdparty/pcre2/src/sljit/sljitExecAllocator.c +++ b/thirdparty/pcre2/src/sljit/sljitExecAllocator.c @@ -66,7 +66,7 @@ /* --------------------------------------------------------------------- */ /* 64 KByte. */ -#define CHUNK_SIZE 0x10000 +#define CHUNK_SIZE (sljit_uw)0x10000u /* alloc_chunk / free_chunk : @@ -112,7 +112,7 @@ static SLJIT_INLINE void free_chunk(void *chunk, sljit_uw size) static SLJIT_INLINE int get_map_jit_flag() { - sljit_sw page_size; + size_t page_size; void *ptr; struct utsname name; static int map_jit_flag = -1; @@ -139,8 +139,9 @@ static SLJIT_INLINE int get_map_jit_flag() #endif /* MAP_ANON */ #else /* !SLJIT_CONFIG_X86 */ #if !(defined SLJIT_CONFIG_ARM && SLJIT_CONFIG_ARM) -#error Unsupported architecture +#error "Unsupported architecture" #endif /* SLJIT_CONFIG_ARM */ +#include <AvailabilityMacros.h> #include <pthread.h> #define SLJIT_MAP_JIT (MAP_JIT) @@ -149,7 +150,14 @@ static SLJIT_INLINE int get_map_jit_flag() static SLJIT_INLINE void apple_update_wx_flags(sljit_s32 enable_exec) { +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 110000 pthread_jit_write_protect_np(enable_exec); +#elif defined(__clang__) + if (__builtin_available(macOS 11.0, *)) + pthread_jit_write_protect_np(enable_exec); +#else +#error "Must target Big Sur or newer" +#endif /* BigSur */ } #endif /* SLJIT_CONFIG_X86 */ #else /* !TARGET_OS_OSX */ @@ -187,10 +195,13 @@ static SLJIT_INLINE void* alloc_chunk(sljit_uw size) if (retval == MAP_FAILED) return NULL; +#ifdef __FreeBSD__ + /* HardenedBSD's mmap lies, so check permissions again */ if (mprotect(retval, size, PROT_READ | PROT_WRITE | PROT_EXEC) < 0) { munmap(retval, size); return NULL; } +#endif /* FreeBSD */ SLJIT_UPDATE_WX_FLAGS(retval, (uint8_t *)retval + size, 0); @@ -227,7 +238,7 @@ struct free_block { #define AS_FREE_BLOCK(base, offset) \ ((struct free_block*)(((sljit_u8*)base) + offset)) #define MEM_START(base) ((void*)(((sljit_u8*)base) + sizeof(struct block_header))) -#define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7) & ~7) +#define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7u) & ~(sljit_uw)7) static struct free_block* free_blocks; static sljit_uw allocated_size; diff --git a/thirdparty/pcre2/src/sljit/sljitLir.c b/thirdparty/pcre2/src/sljit/sljitLir.c index a24a99ab87..313a061dd3 100644 --- a/thirdparty/pcre2/src/sljit/sljitLir.c +++ b/thirdparty/pcre2/src/sljit/sljitLir.c @@ -90,26 +90,28 @@ #if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) +#define SSIZE_OF(type) ((sljit_s32)sizeof(sljit_ ## type)) + #define VARIABLE_FLAG_SHIFT (10) #define VARIABLE_FLAG_MASK (0x3f << VARIABLE_FLAG_SHIFT) #define GET_FLAG_TYPE(op) ((op) >> VARIABLE_FLAG_SHIFT) #define GET_OPCODE(op) \ - ((op) & ~(SLJIT_I32_OP | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) + ((op) & ~(SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) #define HAS_FLAGS(op) \ ((op) & (SLJIT_SET_Z | VARIABLE_FLAG_MASK)) #define GET_ALL_FLAGS(op) \ - ((op) & (SLJIT_I32_OP | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) + ((op) & (SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) #if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE) #define TYPE_CAST_NEEDED(op) \ ((op) >= SLJIT_MOV_U8 && (op) <= SLJIT_MOV_S32) -#else +#else /* !SLJIT_64BIT_ARCHITECTURE */ #define TYPE_CAST_NEEDED(op) \ ((op) >= SLJIT_MOV_U8 && (op) <= SLJIT_MOV_S16) -#endif +#endif /* SLJIT_64BIT_ARCHITECTURE */ #define BUF_SIZE 4096 @@ -126,11 +128,10 @@ #define TO_OFFS_REG(reg) ((reg) << 8) /* When reg cannot be unused. */ #define FAST_IS_REG(reg) ((reg) <= REG_MASK) -/* When reg can be unused. */ -#define SLOW_IS_REG(reg) ((reg) > 0 && (reg) <= REG_MASK) /* Mask for argument types. */ -#define SLJIT_DEF_MASK ((1 << SLJIT_DEF_SHIFT) - 1) +#define SLJIT_ARG_MASK 0x7 +#define SLJIT_ARG_FULL_MASK (SLJIT_ARG_MASK | SLJIT_ARG_TYPE_SCRATCH_REG) /* Jump flags. */ #define JUMP_LABEL 0x1 @@ -247,8 +248,11 @@ #define GET_SAVED_REGISTERS_SIZE(scratches, saveds, extra) \ (((scratches < SLJIT_NUMBER_OF_SCRATCH_REGISTERS ? 0 : (scratches - SLJIT_NUMBER_OF_SCRATCH_REGISTERS)) + \ - (saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? saveds : SLJIT_NUMBER_OF_SAVED_REGISTERS) + \ - extra) * sizeof(sljit_sw)) + (saveds) + (sljit_s32)(extra)) * (sljit_s32)sizeof(sljit_sw)) + +#define GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, size) \ + (((fscratches < SLJIT_NUMBER_OF_SCRATCH_FLOAT_REGISTERS ? 0 : (fscratches - SLJIT_NUMBER_OF_SCRATCH_FLOAT_REGISTERS)) + \ + (fsaveds)) * (sljit_s32)(size)) #define ADJUST_LOCAL_OFFSET(p, i) \ if ((p) == (SLJIT_MEM1(SLJIT_SP))) \ @@ -379,9 +383,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allo && (sizeof(sljit_sw) == 4 || sizeof(sljit_sw) == 8) && (sizeof(sljit_uw) == 4 || sizeof(sljit_uw) == 8), invalid_integer_types); - SLJIT_COMPILE_ASSERT(SLJIT_I32_OP == SLJIT_F32_OP, - int_op_and_single_op_must_be_the_same); - SLJIT_COMPILE_ASSERT(SLJIT_REWRITABLE_JUMP != SLJIT_F32_OP, + SLJIT_COMPILE_ASSERT(SLJIT_REWRITABLE_JUMP != SLJIT_32, rewritable_jump_and_single_op_must_not_be_the_same); SLJIT_COMPILE_ASSERT(!(SLJIT_EQUAL & 0x1) && !(SLJIT_LESS & 0x1) && !(SLJIT_EQUAL_F64 & 0x1) && !(SLJIT_JUMP & 0x1), conditional_flags_must_be_even_numbers); @@ -415,7 +417,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allo compiler->local_size = -1; #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) - compiler->args = -1; + compiler->args_size = -1; #endif #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) @@ -439,6 +441,13 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allo compiler->delay_slot = UNMOVABLE_INS; #endif +#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) \ + || (defined SLJIT_DEBUG && SLJIT_DEBUG) + compiler->last_flags = 0; + compiler->last_return = -1; + compiler->logical_local_size = 0; +#endif + #if (defined SLJIT_NEEDS_COMPILER_INIT && SLJIT_NEEDS_COMPILER_INIT) if (!compiler_initialized) { init_compiler(); @@ -488,7 +497,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code, void *exec_allocator_d SLJIT_UNUSED_ARG(exec_allocator_data); /* Remove thumb mode flag. */ - SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1), exec_allocator_data); + SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~(sljit_uw)0x1), exec_allocator_data); } #elif (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code, void *exec_allocator_data) @@ -511,7 +520,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code, void *exec_allocator_d SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label) { if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) { - jump->flags &= ~JUMP_ADDR; + jump->flags &= (sljit_uw)~JUMP_ADDR; jump->flags |= JUMP_LABEL; jump->u.label = label; } @@ -520,7 +529,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sl SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target) { if (SLJIT_LIKELY(!!jump)) { - jump->flags &= ~JUMP_LABEL; + jump->flags &= (sljit_uw)~JUMP_LABEL; jump->flags |= JUMP_ADDR; jump->u.target = target; } @@ -533,7 +542,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_put_label(struct sljit_put_label *put_la } #define SLJIT_CURRENT_FLAGS_ALL \ - (SLJIT_CURRENT_FLAGS_I32_OP | SLJIT_CURRENT_FLAGS_ADD_SUB | SLJIT_CURRENT_FLAGS_COMPARE) + (SLJIT_CURRENT_FLAGS_32 | SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB | SLJIT_CURRENT_FLAGS_COMPARE) SLJIT_API_FUNC_ATTRIBUTE void sljit_set_current_flags(struct sljit_compiler *compiler, sljit_s32 current_flags) { @@ -547,7 +556,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_current_flags(struct sljit_compiler *com #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->last_flags = 0; if ((current_flags & ~(VARIABLE_FLAG_MASK | SLJIT_SET_Z | SLJIT_CURRENT_FLAGS_ALL)) == 0) { - compiler->last_flags = GET_FLAG_TYPE(current_flags) | (current_flags & (SLJIT_I32_OP | SLJIT_SET_Z)); + compiler->last_flags = GET_FLAG_TYPE(current_flags) | (current_flags & (SLJIT_32 | SLJIT_SET_Z)); } #endif } @@ -607,7 +616,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compile return NULL; size = (size + 3) & ~3; #endif - return ensure_abuf(compiler, size); + return ensure_abuf(compiler, (sljit_uw)size); } static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler) @@ -626,20 +635,6 @@ static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler) compiler->buf = prev; } -static SLJIT_INLINE sljit_s32 get_arg_count(sljit_s32 arg_types) -{ - sljit_s32 arg_count = 0; - - arg_types >>= SLJIT_DEF_SHIFT; - while (arg_types) { - arg_count++; - arg_types >>= SLJIT_DEF_SHIFT; - } - - return arg_count; -} - - /* Only used in RISC architectures where the instruction size is constant */ #if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) \ && !(defined SLJIT_CONFIG_S390X && SLJIT_CONFIG_S390X) @@ -679,6 +674,7 @@ static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler, compiler->fscratches = fscratches; compiler->fsaveds = fsaveds; #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->last_return = args & SLJIT_ARG_MASK; compiler->logical_local_size = local_size; #endif } @@ -696,6 +692,7 @@ static SLJIT_INLINE void set_set_context(struct sljit_compiler *compiler, compiler->fscratches = fscratches; compiler->fsaveds = fsaveds; #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->last_return = args & SLJIT_ARG_MASK; compiler->logical_local_size = local_size; #endif } @@ -711,7 +708,7 @@ static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compi compiler->last_label = label; } -static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_s32 flags) +static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_u32 flags) { jump->next = NULL; jump->flags = flags; @@ -751,6 +748,58 @@ static SLJIT_INLINE void set_put_label(struct sljit_put_label *put_label, struct #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) +static sljit_s32 function_check_arguments(sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches) +{ + sljit_s32 word_arg_count, scratch_arg_end, saved_arg_count, float_arg_count, curr_type; + + curr_type = (arg_types & SLJIT_ARG_FULL_MASK); + + if (curr_type >= SLJIT_ARG_TYPE_F64) { + if (curr_type > SLJIT_ARG_TYPE_F32 || fscratches == 0) + return 0; + } else if (curr_type >= SLJIT_ARG_TYPE_W) { + if (scratches == 0) + return 0; + } + + arg_types >>= SLJIT_ARG_SHIFT; + + word_arg_count = 0; + scratch_arg_end = 0; + saved_arg_count = 0; + float_arg_count = 0; + while (arg_types != 0) { + if (word_arg_count + float_arg_count >= 4) + return 0; + + curr_type = (arg_types & SLJIT_ARG_MASK); + + if (arg_types & SLJIT_ARG_TYPE_SCRATCH_REG) { + if (saveds == -1 || curr_type < SLJIT_ARG_TYPE_W || curr_type > SLJIT_ARG_TYPE_P) + return 0; + + word_arg_count++; + scratch_arg_end = word_arg_count; + } else { + if (curr_type < SLJIT_ARG_TYPE_W || curr_type > SLJIT_ARG_TYPE_F32) + return 0; + + if (curr_type < SLJIT_ARG_TYPE_F64) { + word_arg_count++; + saved_arg_count++; + } else + float_arg_count++; + } + + arg_types >>= SLJIT_ARG_SHIFT; + } + + if (saveds == -1) + return (word_arg_count <= scratches && float_arg_count <= fscratches); + + return (saved_arg_count <= saveds && scratch_arg_end <= scratches && float_arg_count <= fscratches); +} + #define FUNCTION_CHECK_IS_REG(r) \ (((r) >= SLJIT_R0 && (r) < (SLJIT_R0 + compiler->scratches)) \ || ((r) > (SLJIT_S0 - compiler->saveds) && (r) <= SLJIT_S0)) @@ -773,14 +822,14 @@ static sljit_s32 function_check_src_mem(struct sljit_compiler *compiler, sljit_s if (!(p & SLJIT_MEM)) return 0; - if (!((p & REG_MASK) == SLJIT_UNUSED || FUNCTION_CHECK_IS_REG(p & REG_MASK))) + if (!(!(p & REG_MASK) || FUNCTION_CHECK_IS_REG(p & REG_MASK))) return 0; if (CHECK_IF_VIRTUAL_REGISTER(p & REG_MASK)) return 0; if (p & OFFS_REG_MASK) { - if ((p & REG_MASK) == SLJIT_UNUSED) + if (!(p & REG_MASK)) return 0; if (!(FUNCTION_CHECK_IS_REG(OFFS_REG(p)))) @@ -819,12 +868,12 @@ static sljit_s32 function_check_src(struct sljit_compiler *compiler, sljit_s32 p #define FUNCTION_CHECK_SRC(p, i) \ CHECK_ARGUMENT(function_check_src(compiler, p, i)); -static sljit_s32 function_check_dst(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i, sljit_s32 unused) +static sljit_s32 function_check_dst(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) { if (compiler->scratches == -1 || compiler->saveds == -1) return 0; - if (FUNCTION_CHECK_IS_REG(p) || ((unused) && (p) == SLJIT_UNUSED)) + if (FUNCTION_CHECK_IS_REG(p)) return (i == 0); if (p == SLJIT_MEM1(SLJIT_SP)) @@ -833,8 +882,8 @@ static sljit_s32 function_check_dst(struct sljit_compiler *compiler, sljit_s32 p return function_check_src_mem(compiler, p, i); } -#define FUNCTION_CHECK_DST(p, i, unused) \ - CHECK_ARGUMENT(function_check_dst(compiler, p, i, unused)); +#define FUNCTION_CHECK_DST(p, i) \ + CHECK_ARGUMENT(function_check_dst(compiler, p, i)); static sljit_s32 function_fcheck(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) { @@ -910,10 +959,8 @@ static void sljit_verbose_param(struct sljit_compiler *compiler, sljit_s32 p, sl } else fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); - } else if (p) + } else sljit_verbose_reg(compiler, p); - else - fprintf(compiler->verbose, "unused"); } static void sljit_verbose_fparam(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) @@ -940,63 +987,61 @@ static void sljit_verbose_fparam(struct sljit_compiler *compiler, sljit_s32 p, s } static const char* op0_names[] = { - (char*)"breakpoint", (char*)"nop", (char*)"lmul.uw", (char*)"lmul.sw", - (char*)"divmod.u", (char*)"divmod.s", (char*)"div.u", (char*)"div.s", - (char*)"endbr", (char*)"skip_frames_before_return" + "breakpoint", "nop", "lmul.uw", "lmul.sw", + "divmod.u", "divmod.s", "div.u", "div.s", + "endbr", "skip_frames_before_return" }; static const char* op1_names[] = { - (char*)"", (char*)".u8", (char*)".s8", (char*)".u16", - (char*)".s16", (char*)".u32", (char*)".s32", (char*)".p", - (char*)"", (char*)".u8", (char*)".s8", (char*)".u16", - (char*)".s16", (char*)".u32", (char*)".s32", (char*)".p", - (char*)"not", (char*)"neg", (char*)"clz", + "", ".u8", ".s8", ".u16", + ".s16", ".u32", ".s32", "32", + ".p", "not", "clz", }; static const char* op2_names[] = { - (char*)"add", (char*)"addc", (char*)"sub", (char*)"subc", - (char*)"mul", (char*)"and", (char*)"or", (char*)"xor", - (char*)"shl", (char*)"lshr", (char*)"ashr", + "add", "addc", "sub", "subc", + "mul", "and", "or", "xor", + "shl", "lshr", "ashr", }; static const char* op_src_names[] = { - (char*)"fast_return", (char*)"skip_frames_before_fast_return", - (char*)"prefetch_l1", (char*)"prefetch_l2", - (char*)"prefetch_l3", (char*)"prefetch_once", + "fast_return", "skip_frames_before_fast_return", + "prefetch_l1", "prefetch_l2", + "prefetch_l3", "prefetch_once", }; static const char* fop1_names[] = { - (char*)"mov", (char*)"conv", (char*)"conv", (char*)"conv", - (char*)"conv", (char*)"conv", (char*)"cmp", (char*)"neg", - (char*)"abs", + "mov", "conv", "conv", "conv", + "conv", "conv", "cmp", "neg", + "abs", }; static const char* fop2_names[] = { - (char*)"add", (char*)"sub", (char*)"mul", (char*)"div" + "add", "sub", "mul", "div" }; #define JUMP_POSTFIX(type) \ - ((type & 0xff) <= SLJIT_NOT_OVERFLOW ? ((type & SLJIT_I32_OP) ? "32" : "") \ - : ((type & 0xff) <= SLJIT_ORDERED_F64 ? ((type & SLJIT_F32_OP) ? ".f32" : ".f64") : "")) - -static char* jump_names[] = { - (char*)"equal", (char*)"not_equal", - (char*)"less", (char*)"greater_equal", - (char*)"greater", (char*)"less_equal", - (char*)"sig_less", (char*)"sig_greater_equal", - (char*)"sig_greater", (char*)"sig_less_equal", - (char*)"overflow", (char*)"not_overflow", - (char*)"carry", (char*)"", - (char*)"equal", (char*)"not_equal", - (char*)"less", (char*)"greater_equal", - (char*)"greater", (char*)"less_equal", - (char*)"unordered", (char*)"ordered", - (char*)"jump", (char*)"fast_call", - (char*)"call", (char*)"call.cdecl" + ((type & 0xff) <= SLJIT_NOT_OVERFLOW ? ((type & SLJIT_32) ? "32" : "") \ + : ((type & 0xff) <= SLJIT_ORDERED_F64 ? ((type & SLJIT_32) ? ".f32" : ".f64") : "")) + +static const char* jump_names[] = { + "equal", "not_equal", + "less", "greater_equal", + "greater", "less_equal", + "sig_less", "sig_greater_equal", + "sig_greater", "sig_less_equal", + "overflow", "not_overflow", + "carry", "", + "equal", "not_equal", + "less", "greater_equal", + "greater", "less_equal", + "unordered", "ordered", + "jump", "fast_call", + "call", "call.cdecl" }; -static char* call_arg_names[] = { - (char*)"void", (char*)"sw", (char*)"uw", (char*)"s32", (char*)"u32", (char*)"f32", (char*)"f64" +static const char* call_arg_names[] = { + "void", "w", "32", "p", "f64", "f32" }; #endif /* SLJIT_VERBOSE */ @@ -1032,48 +1077,40 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_enter(struct sljit_compil sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { -#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - sljit_s32 types, arg_count, curr_type; -#endif - SLJIT_UNUSED_ARG(compiler); #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - CHECK_ARGUMENT(!(options & ~SLJIT_F64_ALIGNMENT)); + CHECK_ARGUMENT(!(options & ~SLJIT_ENTER_CDECL)); CHECK_ARGUMENT(scratches >= 0 && scratches <= SLJIT_NUMBER_OF_REGISTERS); - CHECK_ARGUMENT(saveds >= 0 && saveds <= SLJIT_NUMBER_OF_REGISTERS); + CHECK_ARGUMENT(saveds >= 0 && saveds <= SLJIT_NUMBER_OF_SAVED_REGISTERS); CHECK_ARGUMENT(scratches + saveds <= SLJIT_NUMBER_OF_REGISTERS); CHECK_ARGUMENT(fscratches >= 0 && fscratches <= SLJIT_NUMBER_OF_FLOAT_REGISTERS); - CHECK_ARGUMENT(fsaveds >= 0 && fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS); + CHECK_ARGUMENT(fsaveds >= 0 && fsaveds <= SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS); CHECK_ARGUMENT(fscratches + fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS); CHECK_ARGUMENT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE); - CHECK_ARGUMENT((arg_types & SLJIT_DEF_MASK) == 0); - - types = (arg_types >> SLJIT_DEF_SHIFT); - arg_count = 0; - while (types != 0 && arg_count < 3) { - curr_type = (types & SLJIT_DEF_MASK); - CHECK_ARGUMENT(curr_type == SLJIT_ARG_TYPE_SW || curr_type == SLJIT_ARG_TYPE_UW); - arg_count++; - types >>= SLJIT_DEF_SHIFT; - } - CHECK_ARGUMENT(arg_count <= saveds && types == 0); + CHECK_ARGUMENT((arg_types & SLJIT_ARG_FULL_MASK) < SLJIT_ARG_TYPE_F64); + CHECK_ARGUMENT(function_check_arguments(arg_types, scratches, saveds, fscratches)); compiler->last_flags = 0; #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { - fprintf(compiler->verbose, " enter options:%s args[", (options & SLJIT_F64_ALIGNMENT) ? "f64_align" : ""); - - arg_types >>= SLJIT_DEF_SHIFT; - while (arg_types) { - fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_DEF_MASK]); - arg_types >>= SLJIT_DEF_SHIFT; - if (arg_types) - fprintf(compiler->verbose, ","); + fprintf(compiler->verbose, " enter ret[%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); + + arg_types >>= SLJIT_ARG_SHIFT; + if (arg_types) { + fprintf(compiler->verbose, "], args["); + do { + fprintf(compiler->verbose, "%s%s", call_arg_names[arg_types & SLJIT_ARG_MASK], + (arg_types & SLJIT_ARG_TYPE_SCRATCH_REG) ? "_r" : ""); + arg_types >>= SLJIT_ARG_SHIFT; + if (arg_types) + fprintf(compiler->verbose, ","); + } while (arg_types); } - fprintf(compiler->verbose, "] scratches:%d saveds:%d fscratches:%d fsaveds:%d local_size:%d\n", + fprintf(compiler->verbose, "],%s scratches:%d, saveds:%d, fscratches:%d, fsaveds:%d, local_size:%d\n", + (options & SLJIT_ENTER_CDECL) ? " enter:cdecl," : "", scratches, saveds, fscratches, fsaveds, local_size); } #endif @@ -1084,74 +1121,94 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_set_context(struct sljit_compi sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { -#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - sljit_s32 types, arg_count, curr_type; -#endif - SLJIT_UNUSED_ARG(compiler); #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - CHECK_ARGUMENT(!(options & ~SLJIT_F64_ALIGNMENT)); + CHECK_ARGUMENT(!(options & ~SLJIT_ENTER_CDECL)); CHECK_ARGUMENT(scratches >= 0 && scratches <= SLJIT_NUMBER_OF_REGISTERS); - CHECK_ARGUMENT(saveds >= 0 && saveds <= SLJIT_NUMBER_OF_REGISTERS); + CHECK_ARGUMENT(saveds >= 0 && saveds <= SLJIT_NUMBER_OF_SAVED_REGISTERS); CHECK_ARGUMENT(scratches + saveds <= SLJIT_NUMBER_OF_REGISTERS); CHECK_ARGUMENT(fscratches >= 0 && fscratches <= SLJIT_NUMBER_OF_FLOAT_REGISTERS); - CHECK_ARGUMENT(fsaveds >= 0 && fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS); + CHECK_ARGUMENT(fsaveds >= 0 && fsaveds <= SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS); CHECK_ARGUMENT(fscratches + fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS); CHECK_ARGUMENT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE); - - types = (arg_types >> SLJIT_DEF_SHIFT); - arg_count = 0; - while (types != 0 && arg_count < 3) { - curr_type = (types & SLJIT_DEF_MASK); - CHECK_ARGUMENT(curr_type == SLJIT_ARG_TYPE_SW || curr_type == SLJIT_ARG_TYPE_UW); - arg_count++; - types >>= SLJIT_DEF_SHIFT; - } - CHECK_ARGUMENT(arg_count <= saveds && types == 0); + CHECK_ARGUMENT((arg_types & SLJIT_ARG_FULL_MASK) < SLJIT_ARG_TYPE_F64); + CHECK_ARGUMENT(function_check_arguments(arg_types, scratches, saveds, fscratches)); compiler->last_flags = 0; #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { - fprintf(compiler->verbose, " set_context options:%s args[", (options & SLJIT_F64_ALIGNMENT) ? "f64_align" : ""); - - arg_types >>= SLJIT_DEF_SHIFT; - while (arg_types) { - fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_DEF_MASK]); - arg_types >>= SLJIT_DEF_SHIFT; - if (arg_types) - fprintf(compiler->verbose, ","); + fprintf(compiler->verbose, " set_context ret[%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); + + arg_types >>= SLJIT_ARG_SHIFT; + if (arg_types) { + fprintf(compiler->verbose, "], args["); + do { + fprintf(compiler->verbose, "%s%s", call_arg_names[arg_types & SLJIT_ARG_MASK], + (arg_types & SLJIT_ARG_TYPE_SCRATCH_REG) ? "_r" : ""); + arg_types >>= SLJIT_ARG_SHIFT; + if (arg_types) + fprintf(compiler->verbose, ","); + } while (arg_types); } - fprintf(compiler->verbose, "] scratches:%d saveds:%d fscratches:%d fsaveds:%d local_size:%d\n", + fprintf(compiler->verbose, "],%s scratches:%d, saveds:%d, fscratches:%d, fsaveds:%d, local_size:%d\n", + (options & SLJIT_ENTER_CDECL) ? " enter:cdecl," : "", scratches, saveds, fscratches, fsaveds, local_size); } #endif CHECK_RETURN_OK; } +static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return_void(struct sljit_compiler *compiler) +{ + if (SLJIT_UNLIKELY(compiler->skip_checks)) { + compiler->skip_checks = 0; + CHECK_RETURN_OK; + } + +#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + CHECK_ARGUMENT(compiler->last_return == SLJIT_ARG_TYPE_VOID); +#endif + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) + if (SLJIT_UNLIKELY(!!compiler->verbose)) { + fprintf(compiler->verbose, " return_void\n"); + } +#endif + CHECK_RETURN_OK; +} + static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) CHECK_ARGUMENT(compiler->scratches >= 0); - if (op != SLJIT_UNUSED) { - CHECK_ARGUMENT(op >= SLJIT_MOV && op <= SLJIT_MOV_P); - FUNCTION_CHECK_SRC(src, srcw); + + switch (compiler->last_return) { + case SLJIT_ARG_TYPE_W: + CHECK_ARGUMENT(op >= SLJIT_MOV && op <= SLJIT_MOV_S32); + break; + case SLJIT_ARG_TYPE_32: + CHECK_ARGUMENT(op == SLJIT_MOV32 || (op >= SLJIT_MOV32_U8 && op <= SLJIT_MOV32_S16)); + break; + case SLJIT_ARG_TYPE_P: + CHECK_ARGUMENT(op == SLJIT_MOV_P); + break; + default: + /* Context not initialized, void, etc. */ + CHECK_ARGUMENT(0); + break; } - else - CHECK_ARGUMENT(src == 0 && srcw == 0); + FUNCTION_CHECK_SRC(src, srcw); compiler->last_flags = 0; #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { - if (op == SLJIT_UNUSED) - fprintf(compiler->verbose, " return\n"); - else { - fprintf(compiler->verbose, " return%s ", op1_names[op - SLJIT_OP1_BASE]); - sljit_verbose_param(compiler, src, srcw); - fprintf(compiler->verbose, "\n"); - } + fprintf(compiler->verbose, " return%s%s ", !(op & SLJIT_32) ? "" : "32", + op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE]); + sljit_verbose_param(compiler, src, srcw); + fprintf(compiler->verbose, "\n"); } #endif CHECK_RETURN_OK; @@ -1160,7 +1217,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return(struct sljit_compi static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - FUNCTION_CHECK_DST(dst, dstw, 0); + FUNCTION_CHECK_DST(dst, dstw); compiler->last_flags = 0; #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) @@ -1177,7 +1234,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op0(struct sljit_compiler { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) CHECK_ARGUMENT((op >= SLJIT_BREAKPOINT && op <= SLJIT_LMUL_SW) - || ((op & ~SLJIT_I32_OP) >= SLJIT_DIVMOD_UW && (op & ~SLJIT_I32_OP) <= SLJIT_DIV_SW) + || ((op & ~SLJIT_32) >= SLJIT_DIVMOD_UW && (op & ~SLJIT_32) <= SLJIT_DIV_SW) || (op >= SLJIT_ENDBR && op <= SLJIT_SKIP_FRAMES_BEFORE_RETURN)); CHECK_ARGUMENT(GET_OPCODE(op) < SLJIT_LMUL_UW || GET_OPCODE(op) >= SLJIT_ENDBR || compiler->scratches >= 2); if ((GET_OPCODE(op) >= SLJIT_LMUL_UW && GET_OPCODE(op) <= SLJIT_DIV_SW) || op == SLJIT_SKIP_FRAMES_BEFORE_RETURN) @@ -1188,7 +1245,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op0(struct sljit_compiler { fprintf(compiler->verbose, " %s", op0_names[GET_OPCODE(op) - SLJIT_OP0_BASE]); if (GET_OPCODE(op) >= SLJIT_DIVMOD_UW && GET_OPCODE(op) <= SLJIT_DIV_SW) { - fprintf(compiler->verbose, (op & SLJIT_I32_OP) ? "32" : "w"); + fprintf(compiler->verbose, (op & SLJIT_32) ? "32" : "w"); } fprintf(compiler->verbose, "\n"); } @@ -1210,43 +1267,39 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op1(struct sljit_compiler switch (GET_OPCODE(op)) { case SLJIT_NOT: - /* Only SLJIT_I32_OP and SLJIT_SET_Z are allowed. */ + /* Only SLJIT_32 and SLJIT_SET_Z are allowed. */ CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK)); break; - case SLJIT_NEG: - CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK) - || GET_FLAG_TYPE(op) == SLJIT_OVERFLOW); - break; case SLJIT_MOV: case SLJIT_MOV_U32: case SLJIT_MOV_P: /* Nothing allowed */ - CHECK_ARGUMENT(!(op & (SLJIT_I32_OP | SLJIT_SET_Z | VARIABLE_FLAG_MASK))); + CHECK_ARGUMENT(!(op & (SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK))); break; default: - /* Only SLJIT_I32_OP is allowed. */ + /* Only SLJIT_32 is allowed. */ CHECK_ARGUMENT(!(op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK))); break; } - FUNCTION_CHECK_DST(dst, dstw, HAS_FLAGS(op)); + FUNCTION_CHECK_DST(dst, dstw); FUNCTION_CHECK_SRC(src, srcw); if (GET_OPCODE(op) >= SLJIT_NOT) { CHECK_ARGUMENT(src != SLJIT_IMM); - compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_I32_OP | SLJIT_SET_Z)); + compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); } #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { if (GET_OPCODE(op) <= SLJIT_MOV_P) { - fprintf(compiler->verbose, " mov%s%s ", !(op & SLJIT_I32_OP) ? "" : "32", - (op != SLJIT_MOV32) ? op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE] : ""); + fprintf(compiler->verbose, " mov%s%s ", !(op & SLJIT_32) ? "" : "32", + op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE]); } else { - fprintf(compiler->verbose, " %s%s%s%s%s ", op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE], !(op & SLJIT_I32_OP) ? "" : "32", + fprintf(compiler->verbose, " %s%s%s%s%s ", op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE], !(op & SLJIT_32) ? "" : "32", !(op & SLJIT_SET_Z) ? "" : ".z", !(op & VARIABLE_FLAG_MASK) ? "" : ".", !(op & VARIABLE_FLAG_MASK) ? "" : jump_names[GET_FLAG_TYPE(op)]); } @@ -1260,7 +1313,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op1(struct sljit_compiler CHECK_RETURN_OK; } -static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, +static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 unset, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) @@ -1302,24 +1355,31 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2(struct sljit_compiler CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK) || GET_FLAG_TYPE(op) == GET_FLAG_TYPE(SLJIT_SET_CARRY)); CHECK_ARGUMENT((compiler->last_flags & 0xff) == GET_FLAG_TYPE(SLJIT_SET_CARRY)); - CHECK_ARGUMENT((op & SLJIT_I32_OP) == (compiler->last_flags & SLJIT_I32_OP)); + CHECK_ARGUMENT((op & SLJIT_32) == (compiler->last_flags & SLJIT_32)); break; default: SLJIT_UNREACHABLE(); break; } - FUNCTION_CHECK_DST(dst, dstw, HAS_FLAGS(op)); + if (unset) { + CHECK_ARGUMENT(HAS_FLAGS(op)); + } else { + FUNCTION_CHECK_DST(dst, dstw); + } FUNCTION_CHECK_SRC(src1, src1w); FUNCTION_CHECK_SRC(src2, src2w); - compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_I32_OP | SLJIT_SET_Z)); + compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { - fprintf(compiler->verbose, " %s%s%s%s%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SLJIT_I32_OP) ? "" : "32", + fprintf(compiler->verbose, " %s%s%s%s%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SLJIT_32) ? "" : "32", !(op & SLJIT_SET_Z) ? "" : ".z", !(op & VARIABLE_FLAG_MASK) ? "" : ".", !(op & VARIABLE_FLAG_MASK) ? "" : jump_names[GET_FLAG_TYPE(op)]); - sljit_verbose_param(compiler, dst, dstw); + if (unset) + fprintf(compiler->verbose, "unset"); + else + sljit_verbose_param(compiler, dst, dstw); fprintf(compiler->verbose, ", "); sljit_verbose_param(compiler, src1, src1w); fprintf(compiler->verbose, ", "); @@ -1376,10 +1436,10 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_float_register_index(sljit } static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) - int i; + sljit_u32 i; #endif SLJIT_UNUSED_ARG(compiler); @@ -1431,10 +1491,10 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1(struct sljit_compile if (SLJIT_UNLIKELY(!!compiler->verbose)) { if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) fprintf(compiler->verbose, " %s%s ", fop1_names[SLJIT_CONV_F64_FROM_F32 - SLJIT_FOP1_BASE], - (op & SLJIT_F32_OP) ? ".f32.from.f64" : ".f64.from.f32"); + (op & SLJIT_32) ? ".f32.from.f64" : ".f64.from.f32"); else fprintf(compiler->verbose, " %s%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], - (op & SLJIT_F32_OP) ? ".f32" : ".f64"); + (op & SLJIT_32) ? ".f32" : ".f64"); sljit_verbose_fparam(compiler, dst, dstw); fprintf(compiler->verbose, ", "); @@ -1450,7 +1510,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_cmp(struct sljit_com sljit_s32 src2, sljit_sw src2w) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_I32_OP | SLJIT_SET_Z)); + compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); #endif if (SLJIT_UNLIKELY(compiler->skip_checks)) { @@ -1469,7 +1529,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_cmp(struct sljit_com #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { - fprintf(compiler->verbose, " %s%s", fop1_names[SLJIT_CMP_F64 - SLJIT_FOP1_BASE], (op & SLJIT_F32_OP) ? ".f32" : ".f64"); + fprintf(compiler->verbose, " %s%s", fop1_names[SLJIT_CMP_F64 - SLJIT_FOP1_BASE], (op & SLJIT_32) ? ".f32" : ".f64"); if (op & VARIABLE_FLAG_MASK) { fprintf(compiler->verbose, ".%s_f", jump_names[GET_FLAG_TYPE(op)]); } @@ -1497,13 +1557,13 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_conv_sw_from_f64(str CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_CONV_SW_FROM_F64 && GET_OPCODE(op) <= SLJIT_CONV_S32_FROM_F64); CHECK_ARGUMENT(!(op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK))); FUNCTION_FCHECK(src, srcw); - FUNCTION_CHECK_DST(dst, dstw, 0); + FUNCTION_CHECK_DST(dst, dstw); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], (GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64) ? ".s32" : ".sw", - (op & SLJIT_F32_OP) ? ".f32" : ".f64"); + (op & SLJIT_32) ? ".f32" : ".f64"); sljit_verbose_param(compiler, dst, dstw); fprintf(compiler->verbose, ", "); sljit_verbose_fparam(compiler, src, srcw); @@ -1532,7 +1592,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_conv_f64_from_sw(str #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], - (op & SLJIT_F32_OP) ? ".f32" : ".f64", + (op & SLJIT_32) ? ".f32" : ".f64", (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) ? ".s32" : ".sw"); sljit_verbose_fparam(compiler, dst, dstw); fprintf(compiler->verbose, ", "); @@ -1558,7 +1618,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop2(struct sljit_compile #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { - fprintf(compiler->verbose, " %s%s ", fop2_names[GET_OPCODE(op) - SLJIT_FOP2_BASE], (op & SLJIT_F32_OP) ? ".f32" : ".f64"); + fprintf(compiler->verbose, " %s%s ", fop2_names[GET_OPCODE(op) - SLJIT_FOP2_BASE], (op & SLJIT_32) ? ".f32" : ".f64"); sljit_verbose_fparam(compiler, dst, dstw); fprintf(compiler->verbose, ", "); sljit_verbose_fparam(compiler, src1, src1w); @@ -1598,15 +1658,17 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_jump(struct sljit_compile } #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_I32_OP))); - CHECK_ARGUMENT((type & 0xff) != GET_FLAG_TYPE(SLJIT_SET_CARRY) && (type & 0xff) != (GET_FLAG_TYPE(SLJIT_SET_CARRY) + 1)); + CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_32))); CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_FAST_CALL); - CHECK_ARGUMENT((type & 0xff) < SLJIT_JUMP || !(type & SLJIT_I32_OP)); + CHECK_ARGUMENT((type & 0xff) < SLJIT_JUMP || !(type & SLJIT_32)); if ((type & 0xff) < SLJIT_JUMP) { if ((type & 0xff) <= SLJIT_NOT_ZERO) CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); - else + else if ((compiler->last_flags & 0xff) == SLJIT_CARRY) { + CHECK_ARGUMENT((type & 0xff) == SLJIT_CARRY || (type & 0xff) == SLJIT_NOT_CARRY); + compiler->last_flags = 0; + } else CHECK_ARGUMENT((type & 0xff) == (compiler->last_flags & 0xff) || ((type & 0xff) == SLJIT_NOT_OVERFLOW && (compiler->last_flags & 0xff) == SLJIT_OVERFLOW)); } @@ -1623,49 +1685,27 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_call(struct sljit_compile sljit_s32 arg_types) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - sljit_s32 i, types, curr_type, scratches, fscratches; - - CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP))); + CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_CALL_RETURN))); CHECK_ARGUMENT((type & 0xff) == SLJIT_CALL || (type & 0xff) == SLJIT_CALL_CDECL); + CHECK_ARGUMENT(function_check_arguments(arg_types, compiler->scratches, -1, compiler->fscratches)); - types = arg_types; - scratches = 0; - fscratches = 0; - for (i = 0; i < 5; i++) { - curr_type = (types & SLJIT_DEF_MASK); - CHECK_ARGUMENT(curr_type <= SLJIT_ARG_TYPE_F64); - if (i > 0) { - if (curr_type == 0) { - break; - } - if (curr_type >= SLJIT_ARG_TYPE_F32) - fscratches++; - else - scratches++; - } else { - if (curr_type >= SLJIT_ARG_TYPE_F32) { - CHECK_ARGUMENT(compiler->fscratches > 0); - } else if (curr_type >= SLJIT_ARG_TYPE_SW) { - CHECK_ARGUMENT(compiler->scratches > 0); - } - } - types >>= SLJIT_DEF_SHIFT; + if (type & SLJIT_CALL_RETURN) { + CHECK_ARGUMENT((arg_types & SLJIT_ARG_MASK) == compiler->last_return); } - CHECK_ARGUMENT(compiler->scratches >= scratches); - CHECK_ARGUMENT(compiler->fscratches >= fscratches); - CHECK_ARGUMENT(types == 0); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { - fprintf(compiler->verbose, " %s%s ret[%s", jump_names[type & 0xff], - !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", call_arg_names[arg_types & SLJIT_DEF_MASK]); + fprintf(compiler->verbose, " %s%s%s ret[%s", jump_names[type & 0xff], + !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", + !(type & SLJIT_CALL_RETURN) ? "" : ".ret", + call_arg_names[arg_types & SLJIT_ARG_MASK]); - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; if (arg_types) { fprintf(compiler->verbose, "], args["); do { - fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_DEF_MASK]); - arg_types >>= SLJIT_DEF_SHIFT; + fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); + arg_types >>= SLJIT_ARG_SHIFT; if (arg_types) fprintf(compiler->verbose, ","); } while (arg_types); @@ -1681,7 +1721,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmp(struct sljit_compiler sljit_s32 src2, sljit_sw src2w) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_I32_OP))); + CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_32))); CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_SIG_LESS_EQUAL); FUNCTION_CHECK_SRC(src1, src1w); FUNCTION_CHECK_SRC(src2, src2w); @@ -1690,7 +1730,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmp(struct sljit_compiler #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { fprintf(compiler->verbose, " cmp%s %s%s, ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", - jump_names[type & 0xff], (type & SLJIT_I32_OP) ? "32" : ""); + jump_names[type & 0xff], (type & SLJIT_32) ? "32" : ""); sljit_verbose_param(compiler, src1, src1w); fprintf(compiler->verbose, ", "); sljit_verbose_param(compiler, src2, src2w); @@ -1706,7 +1746,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fcmp(struct sljit_compile { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) CHECK_ARGUMENT(sljit_has_cpu_feature(SLJIT_HAS_FPU)); - CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_F32_OP))); + CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_32))); CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL_F64 && (type & 0xff) <= SLJIT_ORDERED_F64); FUNCTION_FCHECK(src1, src1w); FUNCTION_FCHECK(src2, src2w); @@ -1715,7 +1755,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fcmp(struct sljit_compile #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { fprintf(compiler->verbose, " fcmp%s %s%s, ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", - jump_names[type & 0xff], (type & SLJIT_F32_OP) ? ".f32" : ".f64"); + jump_names[type & 0xff], (type & SLJIT_32) ? ".f32" : ".f64"); sljit_verbose_fparam(compiler, src1, src1w); fprintf(compiler->verbose, ", "); sljit_verbose_fparam(compiler, src2, src2w); @@ -1752,49 +1792,27 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_icall(struct sljit_compil sljit_s32 src, sljit_sw srcw) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - sljit_s32 i, types, curr_type, scratches, fscratches; - - CHECK_ARGUMENT(type == SLJIT_CALL || type == SLJIT_CALL_CDECL); + CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_CALL_RETURN))); + CHECK_ARGUMENT((type & 0xff) == SLJIT_CALL || (type & 0xff) == SLJIT_CALL_CDECL); + CHECK_ARGUMENT(function_check_arguments(arg_types, compiler->scratches, -1, compiler->fscratches)); FUNCTION_CHECK_SRC(src, srcw); - types = arg_types; - scratches = 0; - fscratches = 0; - for (i = 0; i < 5; i++) { - curr_type = (types & SLJIT_DEF_MASK); - CHECK_ARGUMENT(curr_type <= SLJIT_ARG_TYPE_F64); - if (i > 0) { - if (curr_type == 0) { - break; - } - if (curr_type >= SLJIT_ARG_TYPE_F32) - fscratches++; - else - scratches++; - } else { - if (curr_type >= SLJIT_ARG_TYPE_F32) { - CHECK_ARGUMENT(compiler->fscratches > 0); - } else if (curr_type >= SLJIT_ARG_TYPE_SW) { - CHECK_ARGUMENT(compiler->scratches > 0); - } - } - types >>= SLJIT_DEF_SHIFT; + if (type & SLJIT_CALL_RETURN) { + CHECK_ARGUMENT((arg_types & SLJIT_ARG_MASK) == compiler->last_return); } - CHECK_ARGUMENT(compiler->scratches >= scratches); - CHECK_ARGUMENT(compiler->fscratches >= fscratches); - CHECK_ARGUMENT(types == 0); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { fprintf(compiler->verbose, " i%s%s ret[%s", jump_names[type & 0xff], - !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", call_arg_names[arg_types & SLJIT_DEF_MASK]); + !(type & SLJIT_CALL_RETURN) ? "" : ".ret", + call_arg_names[arg_types & SLJIT_ARG_MASK]); - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; if (arg_types) { fprintf(compiler->verbose, "], args["); do { - fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_DEF_MASK]); - arg_types >>= SLJIT_DEF_SHIFT; + fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); + arg_types >>= SLJIT_ARG_SHIFT; if (arg_types) fprintf(compiler->verbose, ","); } while (arg_types); @@ -1812,9 +1830,8 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_flags(struct sljit_com sljit_s32 type) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_I32_OP))); + CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_32))); CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_ORDERED_F64); - CHECK_ARGUMENT((type & 0xff) != GET_FLAG_TYPE(SLJIT_SET_CARRY) && (type & 0xff) != (GET_FLAG_TYPE(SLJIT_SET_CARRY) + 1)); CHECK_ARGUMENT(op == SLJIT_MOV || op == SLJIT_MOV32 || (GET_OPCODE(op) >= SLJIT_AND && GET_OPCODE(op) <= SLJIT_XOR)); CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK)); @@ -1823,19 +1840,20 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_flags(struct sljit_com CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); else CHECK_ARGUMENT((type & 0xff) == (compiler->last_flags & 0xff) + || ((type & 0xff) == SLJIT_NOT_CARRY && (compiler->last_flags & 0xff) == SLJIT_CARRY) || ((type & 0xff) == SLJIT_NOT_OVERFLOW && (compiler->last_flags & 0xff) == SLJIT_OVERFLOW)); - FUNCTION_CHECK_DST(dst, dstw, 0); + FUNCTION_CHECK_DST(dst, dstw); if (GET_OPCODE(op) >= SLJIT_ADD) - compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_I32_OP | SLJIT_SET_Z)); + compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { fprintf(compiler->verbose, " flags%s %s%s, ", !(op & SLJIT_SET_Z) ? "" : ".z", GET_OPCODE(op) < SLJIT_OP2_BASE ? "mov" : op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], - GET_OPCODE(op) < SLJIT_OP2_BASE ? op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE] : ((op & SLJIT_I32_OP) ? "32" : "")); + GET_OPCODE(op) < SLJIT_OP2_BASE ? op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE] : ((op & SLJIT_32) ? "32" : "")); sljit_verbose_param(compiler, dst, dstw); fprintf(compiler->verbose, ", %s%s\n", jump_names[type & 0xff], JUMP_POSTFIX(type)); } @@ -1848,11 +1866,11 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmov(struct sljit_compile sljit_s32 src, sljit_sw srcw) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_I32_OP))); + CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_32))); CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_ORDERED_F64); CHECK_ARGUMENT(compiler->scratches != -1 && compiler->saveds != -1); - CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(dst_reg & ~SLJIT_I32_OP)); + CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(dst_reg & ~SLJIT_32)); if (src != SLJIT_IMM) { CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(src)); CHECK_ARGUMENT(srcw == 0); @@ -1867,9 +1885,9 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmov(struct sljit_compile #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { fprintf(compiler->verbose, " cmov%s %s%s, ", - !(dst_reg & SLJIT_I32_OP) ? "" : "32", + !(dst_reg & SLJIT_32) ? "" : "32", jump_names[type & 0xff], JUMP_POSTFIX(type)); - sljit_verbose_reg(compiler, dst_reg & ~SLJIT_I32_OP); + sljit_verbose_reg(compiler, dst_reg & ~SLJIT_32); fprintf(compiler->verbose, ", "); sljit_verbose_param(compiler, src, srcw); fprintf(compiler->verbose, "\n"); @@ -1884,15 +1902,15 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_mem(struct sljit_compiler { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) CHECK_ARGUMENT((type & 0xff) >= SLJIT_MOV && (type & 0xff) <= SLJIT_MOV_P); - CHECK_ARGUMENT(!(type & SLJIT_I32_OP) || ((type & 0xff) != SLJIT_MOV && (type & 0xff) != SLJIT_MOV_U32 && (type & 0xff) != SLJIT_MOV_P)); + CHECK_ARGUMENT(!(type & SLJIT_32) || ((type & 0xff) != SLJIT_MOV && (type & 0xff) != SLJIT_MOV_U32 && (type & 0xff) != SLJIT_MOV_P)); CHECK_ARGUMENT((type & SLJIT_MEM_PRE) || (type & SLJIT_MEM_POST)); CHECK_ARGUMENT((type & (SLJIT_MEM_PRE | SLJIT_MEM_POST)) != (SLJIT_MEM_PRE | SLJIT_MEM_POST)); - CHECK_ARGUMENT((type & ~(0xff | SLJIT_I32_OP | SLJIT_MEM_STORE | SLJIT_MEM_SUPP | SLJIT_MEM_PRE | SLJIT_MEM_POST)) == 0); + CHECK_ARGUMENT((type & ~(0xff | SLJIT_32 | SLJIT_MEM_STORE | SLJIT_MEM_SUPP | SLJIT_MEM_PRE | SLJIT_MEM_POST)) == 0); FUNCTION_CHECK_SRC_MEM(mem, memw); CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(reg)); - CHECK_ARGUMENT((mem & REG_MASK) != SLJIT_UNUSED && (mem & REG_MASK) != reg); + CHECK_ARGUMENT((mem & REG_MASK) != 0 && (mem & REG_MASK) != reg); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (!(type & SLJIT_MEM_SUPP) && SLJIT_UNLIKELY(!!compiler->verbose)) { @@ -1900,7 +1918,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_mem(struct sljit_compiler fprintf(compiler->verbose, " //"); fprintf(compiler->verbose, " mem%s.%s%s%s ", - !(type & SLJIT_I32_OP) ? "" : "32", + !(type & SLJIT_32) ? "" : "32", (type & SLJIT_MEM_STORE) ? "st" : "ld", op1_names[(type & 0xff) - SLJIT_OP1_BASE], (type & SLJIT_MEM_PRE) ? ".pre" : ".post"); @@ -1921,7 +1939,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fmem(struct sljit_compile CHECK_ARGUMENT((type & 0xff) == SLJIT_MOV_F64); CHECK_ARGUMENT((type & SLJIT_MEM_PRE) || (type & SLJIT_MEM_POST)); CHECK_ARGUMENT((type & (SLJIT_MEM_PRE | SLJIT_MEM_POST)) != (SLJIT_MEM_PRE | SLJIT_MEM_POST)); - CHECK_ARGUMENT((type & ~(0xff | SLJIT_I32_OP | SLJIT_MEM_STORE | SLJIT_MEM_SUPP | SLJIT_MEM_PRE | SLJIT_MEM_POST)) == 0); + CHECK_ARGUMENT((type & ~(0xff | SLJIT_32 | SLJIT_MEM_STORE | SLJIT_MEM_SUPP | SLJIT_MEM_PRE | SLJIT_MEM_POST)) == 0); FUNCTION_CHECK_SRC_MEM(mem, memw); CHECK_ARGUMENT(FUNCTION_CHECK_IS_FREG(freg)); @@ -1933,7 +1951,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fmem(struct sljit_compile fprintf(compiler->verbose, " fmem.%s%s%s ", (type & SLJIT_MEM_STORE) ? "st" : "ld", - !(type & SLJIT_I32_OP) ? ".f64" : ".f32", + !(type & SLJIT_32) ? ".f64" : ".f32", (type & SLJIT_MEM_PRE) ? ".pre" : ".post"); sljit_verbose_freg(compiler, freg); fprintf(compiler->verbose, ", "); @@ -1950,7 +1968,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_local_base(struct sljit_co SLJIT_UNUSED_ARG(offset); #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - FUNCTION_CHECK_DST(dst, dstw, 0); + FUNCTION_CHECK_DST(dst, dstw); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { @@ -1967,7 +1985,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_const(struct sljit_compil SLJIT_UNUSED_ARG(init_value); #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - FUNCTION_CHECK_DST(dst, dstw, 0); + FUNCTION_CHECK_DST(dst, dstw); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { @@ -1982,7 +2000,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_const(struct sljit_compil static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) { #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - FUNCTION_CHECK_DST(dst, dstw, 0); + FUNCTION_CHECK_DST(dst, dstw); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) { @@ -2023,10 +2041,6 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_put_label(struct sljit_co static SLJIT_INLINE sljit_s32 emit_mov_before_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { - /* Return if don't need to do anything. */ - if (op == SLJIT_UNUSED) - return SLJIT_SUCCESS; - #if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE) /* At the moment the pointer size is always equal to sljit_sw. May be changed in the future. */ if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_P)) @@ -2043,6 +2057,24 @@ static SLJIT_INLINE sljit_s32 emit_mov_before_return(struct sljit_compiler *comp return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw); } +#if !(defined SLJIT_CONFIG_SPARC && SLJIT_CONFIG_SPARC) + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_return(compiler, op, src, srcw)); + + FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); + +#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) \ + || (defined SLJIT_VERBOSE && SLJIT_VERBOSE) + compiler->skip_checks = 1; +#endif + return sljit_emit_return_void(compiler); +} + +#endif + #if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) \ || (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC) \ || (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) \ @@ -2054,7 +2086,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_cmov_generic(struct sljit_compiler *com { struct sljit_label *label; struct sljit_jump *jump; - sljit_s32 op = (dst_reg & SLJIT_I32_OP) ? SLJIT_MOV32 : SLJIT_MOV; + sljit_s32 op = (dst_reg & SLJIT_32) ? SLJIT_MOV32 : SLJIT_MOV; #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -2067,7 +2099,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_cmov_generic(struct sljit_compiler *com || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; #endif - FAIL_IF(sljit_emit_op1(compiler, op, dst_reg & ~SLJIT_I32_OP, 0, src, srcw)); + FAIL_IF(sljit_emit_op1(compiler, op, dst_reg & ~SLJIT_32, 0, src, srcw)); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -2183,7 +2215,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler break; } - type = condition | (type & (SLJIT_I32_OP | SLJIT_REWRITABLE_JUMP)); + type = condition | (type & (SLJIT_32 | SLJIT_REWRITABLE_JUMP)); tmp_src = src1; src1 = src2; src2 = tmp_src; @@ -2201,13 +2233,13 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; #endif - PTR_FAIL_IF(sljit_emit_op2(compiler, SLJIT_SUB | flags | (type & SLJIT_I32_OP), - SLJIT_UNUSED, 0, src1, src1w, src2, src2w)); + PTR_FAIL_IF(sljit_emit_op2u(compiler, + SLJIT_SUB | flags | (type & SLJIT_32), src1, src1w, src2, src2w)); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; #endif - return sljit_emit_jump(compiler, condition | (type & (SLJIT_REWRITABLE_JUMP | SLJIT_I32_OP))); + return sljit_emit_jump(compiler, condition | (type & (SLJIT_REWRITABLE_JUMP | SLJIT_32))); } #endif @@ -2223,7 +2255,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compile || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; #endif - sljit_emit_fop1(compiler, SLJIT_CMP_F64 | ((type & 0xff) << VARIABLE_FLAG_SHIFT) | (type & SLJIT_I32_OP), src1, src1w, src2, src2w); + sljit_emit_fop1(compiler, SLJIT_CMP_F64 | ((type & 0xff) << VARIABLE_FLAG_SHIFT) | (type & SLJIT_32), src1, src1w, src2, src2w); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -2404,6 +2436,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp return SLJIT_ERR_UNSUPPORTED; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + SLJIT_UNUSED_ARG(compiler); + SLJIT_UNREACHABLE(); + return SLJIT_ERR_UNSUPPORTED; +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) { SLJIT_UNUSED_ARG(compiler); @@ -2452,6 +2491,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile return SLJIT_ERR_UNSUPPORTED; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + SLJIT_UNUSED_ARG(compiler); + SLJIT_UNUSED_ARG(op); + SLJIT_UNUSED_ARG(src1); + SLJIT_UNUSED_ARG(src1w); + SLJIT_UNUSED_ARG(src2); + SLJIT_UNUSED_ARG(src2w); + SLJIT_UNREACHABLE(); + return SLJIT_ERR_UNSUPPORTED; +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { @@ -2470,7 +2523,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg) } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { SLJIT_UNUSED_ARG(compiler); SLJIT_UNUSED_ARG(instruction); diff --git a/thirdparty/pcre2/src/sljit/sljitLir.h b/thirdparty/pcre2/src/sljit/sljitLir.h index 0eb62fc21b..1162658156 100644 --- a/thirdparty/pcre2/src/sljit/sljitLir.h +++ b/thirdparty/pcre2/src/sljit/sljitLir.h @@ -163,13 +163,6 @@ extern "C" { is not available at all. */ -/* When SLJIT_UNUSED is specified as the destination of sljit_emit_op1 - or sljit_emit_op2 operations the result is discarded. Some status - flags must be set when the destination is SLJIT_UNUSED, because the - operation would have no effect otherwise. Other SLJIT operations do - not support SLJIT_UNUSED as a destination operand. */ -#define SLJIT_UNUSED 0 - /* Scratch registers. */ #define SLJIT_R0 1 #define SLJIT_R1 2 @@ -231,9 +224,6 @@ extern "C" { value. The FR and FS register sets are overlap in the same way as R and S register sets. See above. */ -/* Note: SLJIT_UNUSED as destination is not valid for floating point - operations, since they cannot be used for setting flags. */ - /* Floating point scratch registers. */ #define SLJIT_FR0 1 #define SLJIT_FR1 2 @@ -263,39 +253,38 @@ extern "C" { /* Argument type definitions */ /* --------------------------------------------------------------------- */ -/* Argument type definitions. - Used by SLJIT_[DEF_]ARGx and SLJIT_[DEF]_RET macros. */ - -#define SLJIT_ARG_TYPE_VOID 0 -#define SLJIT_ARG_TYPE_SW 1 -#define SLJIT_ARG_TYPE_UW 2 -#define SLJIT_ARG_TYPE_S32 3 -#define SLJIT_ARG_TYPE_U32 4 -#define SLJIT_ARG_TYPE_F32 5 -#define SLJIT_ARG_TYPE_F64 6 - /* The following argument type definitions are used by sljit_emit_enter, sljit_set_context, sljit_emit_call, and sljit_emit_icall functions. - The following return type definitions are used by sljit_emit_call - and sljit_emit_icall functions. - When a function is called, the first integer argument must be placed - in SLJIT_R0, the second in SLJIT_R1, and so on. Similarly the first - floating point argument must be placed in SLJIT_FR0, the second in - SLJIT_FR1, and so on. + As for sljit_emit_call and sljit_emit_icall, the first integer argument + must be placed into SLJIT_R0, the second one into SLJIT_R1, and so on. + Similarly the first floating point argument must be placed into SLJIT_FR0, + the second one into SLJIT_FR1, and so on. + + As for sljit_emit_enter, the integer arguments can be stored in scratch + or saved registers. The first integer argument without _R postfix is + stored in SLJIT_S0, the next one in SLJIT_S1, and so on. The integer + arguments with _R postfix are placed into scratch registers. The index + of the scratch register is the count of the previous integer arguments + starting from SLJIT_R0. The floating point arguments are always placed + into SLJIT_FR0, SLJIT_FR1, and so on. + + Note: if a function is called by sljit_emit_call/sljit_emit_icall and + an argument is stored in a scratch register by sljit_emit_enter, + that argument uses the same scratch register index for both + integer and floating point arguments. Example function definition: - sljit_f32 SLJIT_FUNC example_c_callback(sljit_sw arg_a, + sljit_f32 SLJIT_FUNC example_c_callback(void *arg_a, sljit_f64 arg_b, sljit_u32 arg_c, sljit_f32 arg_d); Argument type definition: - SLJIT_DEF_RET(SLJIT_ARG_TYPE_F32) - | SLJIT_DEF_ARG1(SLJIT_ARG_TYPE_SW) | SLJIT_DEF_ARG2(SLJIT_ARG_TYPE_F64) - | SLJIT_DEF_ARG3(SLJIT_ARG_TYPE_U32) | SLJIT_DEF_ARG2(SLJIT_ARG_TYPE_F32) + SLJIT_ARG_RETURN(SLJIT_ARG_TYPE_F32) + | SLJIT_ARG_VALUE(SLJIT_ARG_TYPE_P, 1) | SLJIT_ARG_VALUE(SLJIT_ARG_TYPE_F64, 2) + | SLJIT_ARG_VALUE(SLJIT_ARG_TYPE_32, 3) | SLJIT_ARG_VALUE(SLJIT_ARG_TYPE_F32, 4) Short form of argument type definition: - SLJIT_RET(F32) | SLJIT_ARG1(SW) | SLJIT_ARG2(F64) - | SLJIT_ARG3(S32) | SLJIT_ARG4(F32) + SLJIT_ARGS4(32, P, F64, 32, F32) Argument passing: arg_a must be placed in SLJIT_R0 @@ -303,34 +292,73 @@ extern "C" { arg_b must be placed in SLJIT_FR0 arg_d must be placed in SLJIT_FR1 -Note: - The SLJIT_ARG_TYPE_VOID type is only supported by - SLJIT_DEF_RET, and SLJIT_ARG_TYPE_VOID is also the - default value when SLJIT_DEF_RET is not specified. */ -#define SLJIT_DEF_SHIFT 4 -#define SLJIT_DEF_RET(type) (type) -#define SLJIT_DEF_ARG1(type) ((type) << SLJIT_DEF_SHIFT) -#define SLJIT_DEF_ARG2(type) ((type) << (2 * SLJIT_DEF_SHIFT)) -#define SLJIT_DEF_ARG3(type) ((type) << (3 * SLJIT_DEF_SHIFT)) -#define SLJIT_DEF_ARG4(type) ((type) << (4 * SLJIT_DEF_SHIFT)) + Examples for argument processing by sljit_emit_enter: + SLJIT_ARGS4(VOID, P, 32_R, F32, W) + Arguments are placed into: SLJIT_S0, SLJIT_R1, SLJIT_FR0, SLJIT_S1 + + SLJIT_ARGS4(VOID, W, W_R, W, W_R) + Arguments are placed into: SLJIT_S0, SLJIT_R1, SLJIT_S1, SLJIT_R3 -/* Short form of the macros above. + SLJIT_ARGS4(VOID, F64, W, F32, W_R) + Arguments are placed into: SLJIT_FR0, SLJIT_S0, SLJIT_FR1, SLJIT_R1 - For example the following definition: - SLJIT_DEF_RET(SLJIT_ARG_TYPE_SW) | SLJIT_DEF_ARG1(SLJIT_ARG_TYPE_F32) + Note: it is recommended to pass the scratch arguments first + followed by the saved arguments: + + SLJIT_ARGS4(VOID, W_R, W_R, W, W) + Arguments are placed into: SLJIT_R0, SLJIT_R1, SLJIT_S0, SLJIT_S1 +*/ + +/* The following flag is only allowed for the integer arguments of + sljit_emit_enter. When the flag is set, the integer argument is + stored in a scratch register instead of a saved register. */ +#define SLJIT_ARG_TYPE_SCRATCH_REG 0x8 + +/* Void result, can only be used by SLJIT_ARG_RETURN. */ +#define SLJIT_ARG_TYPE_VOID 0 +/* Machine word sized integer argument or result. */ +#define SLJIT_ARG_TYPE_W 1 +#define SLJIT_ARG_TYPE_W_R (SLJIT_ARG_TYPE_W | SLJIT_ARG_TYPE_SCRATCH_REG) +/* 32 bit integer argument or result. */ +#define SLJIT_ARG_TYPE_32 2 +#define SLJIT_ARG_TYPE_32_R (SLJIT_ARG_TYPE_32 | SLJIT_ARG_TYPE_SCRATCH_REG) +/* Pointer sized integer argument or result. */ +#define SLJIT_ARG_TYPE_P 3 +#define SLJIT_ARG_TYPE_P_R (SLJIT_ARG_TYPE_P | SLJIT_ARG_TYPE_SCRATCH_REG) +/* 64 bit floating point argument or result. */ +#define SLJIT_ARG_TYPE_F64 4 +/* 32 bit floating point argument or result. */ +#define SLJIT_ARG_TYPE_F32 5 + +#define SLJIT_ARG_SHIFT 4 +#define SLJIT_ARG_RETURN(type) (type) +#define SLJIT_ARG_VALUE(type, idx) ((type) << ((idx) * SLJIT_ARG_SHIFT)) + +/* Simplified argument list definitions. + + The following definition: + SLJIT_ARG_RETURN(SLJIT_ARG_TYPE_W) | SLJIT_ARG_VALUE(SLJIT_ARG_TYPE_F32, 1) can be shortened to: - SLJIT_RET(SW) | SLJIT_ARG1(F32) - -Note: - The VOID type is only supported by SLJIT_RET, and - VOID is also the default value when SLJIT_RET is - not specified. */ -#define SLJIT_RET(type) SLJIT_DEF_RET(SLJIT_ARG_TYPE_ ## type) -#define SLJIT_ARG1(type) SLJIT_DEF_ARG1(SLJIT_ARG_TYPE_ ## type) -#define SLJIT_ARG2(type) SLJIT_DEF_ARG2(SLJIT_ARG_TYPE_ ## type) -#define SLJIT_ARG3(type) SLJIT_DEF_ARG3(SLJIT_ARG_TYPE_ ## type) -#define SLJIT_ARG4(type) SLJIT_DEF_ARG4(SLJIT_ARG_TYPE_ ## type) + SLJIT_ARGS1(W, F32) +*/ + +#define SLJIT_ARG_TO_TYPE(type) SLJIT_ARG_TYPE_ ## type + +#define SLJIT_ARGS0(ret) \ + SLJIT_ARG_RETURN(SLJIT_ARG_TO_TYPE(ret)) + +#define SLJIT_ARGS1(ret, arg1) \ + (SLJIT_ARGS0(ret) | SLJIT_ARG_VALUE(SLJIT_ARG_TO_TYPE(arg1), 1)) + +#define SLJIT_ARGS2(ret, arg1, arg2) \ + (SLJIT_ARGS1(ret, arg1) | SLJIT_ARG_VALUE(SLJIT_ARG_TO_TYPE(arg2), 2)) + +#define SLJIT_ARGS3(ret, arg1, arg2, arg3) \ + (SLJIT_ARGS2(ret, arg1, arg2) | SLJIT_ARG_VALUE(SLJIT_ARG_TO_TYPE(arg3), 3)) + +#define SLJIT_ARGS4(ret, arg1, arg2, arg3, arg4) \ + (SLJIT_ARGS3(ret, arg1, arg2, arg3) | SLJIT_ARG_VALUE(SLJIT_ARG_TO_TYPE(arg4), 4)) /* --------------------------------------------------------------------- */ /* Main structures and functions */ @@ -408,7 +436,7 @@ struct sljit_compiler { /* Code size. */ sljit_uw size; /* Relative offset of the executable mapping from the writable mapping. */ - sljit_uw executable_offset; + sljit_sw executable_offset; /* Executable size for statistical purposes. */ sljit_uw executable_size; @@ -417,17 +445,13 @@ struct sljit_compiler { #endif #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) - sljit_s32 args; + sljit_s32 args_size; sljit_s32 locals_offset; - sljit_s32 saveds_offset; - sljit_s32 stack_tmp_size; + sljit_s32 scratches_offset; #endif #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) sljit_s32 mode32; -#ifdef _WIN64 - sljit_s32 locals_offset; -#endif #endif #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) @@ -444,10 +468,14 @@ struct sljit_compiler { #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) /* Temporary fields. */ sljit_uw shift_imm; +#endif /* SLJIT_CONFIG_ARM_V5 || SLJIT_CONFIG_ARM_V7 */ + +#if (defined SLJIT_CONFIG_ARM_32 && SLJIT_CONFIG_ARM_32) && (defined __SOFTFP__) + sljit_uw args_size; #endif #if (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC) - sljit_sw imm; + sljit_u32 imm; #endif #if (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS) @@ -456,6 +484,10 @@ struct sljit_compiler { sljit_sw cache_argw; #endif +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + sljit_uw args_size; +#endif + #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) sljit_s32 delay_slot; sljit_s32 cache_arg; @@ -476,7 +508,9 @@ struct sljit_compiler { /* Flags specified by the last arithmetic instruction. It contains the type of the variable flag. */ sljit_s32 last_flags; - /* Local size passed to the functions. */ + /* Return value type set by entry functions. */ + sljit_s32 last_return; + /* Local size passed to entry functions. */ sljit_s32 logical_local_size; #endif @@ -615,38 +649,43 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) available options are listed before sljit_emit_enter. The function argument list is the combination of SLJIT_ARGx - (SLJIT_DEF_ARG1) macros. Currently maximum 3 SW / UW - (SLJIT_ARG_TYPE_SW / LJIT_ARG_TYPE_UW) arguments are supported. - The first argument goes to SLJIT_S0, the second goes to SLJIT_S1 - and so on. The register set used by the function must be declared - as well. The number of scratch and saved registers used by the - function must be passed to sljit_emit_enter. Only R registers - between R0 and "scratches" argument can be used later. E.g. if - "scratches" is set to 2, the scratch register set will be limited - to SLJIT_R0 and SLJIT_R1. The S registers and the floating point - registers ("fscratches" and "fsaveds") are specified in a similar - manner. The sljit_emit_enter is also capable of allocating a stack - space for local variables. The "local_size" argument contains the - size in bytes of this local area and its staring address is stored + (SLJIT_DEF_ARG1) macros. Currently maximum 4 arguments are + supported. The first integer argument is loaded into SLJIT_S0, + the second one is loaded into SLJIT_S1, and so on. Similarly, + the first floating point argument is loaded into SLJIT_FR0, + the second one is loaded into SLJIT_FR1, and so on. Furthermore + the register set used by the function must be declared as well. + The number of scratch and saved registers used by the function + must be passed to sljit_emit_enter. Only R registers between R0 + and "scratches" argument can be used later. E.g. if "scratches" + is set to 2, the scratch register set will be limited to SLJIT_R0 + and SLJIT_R1. The S registers and the floating point registers + ("fscratches" and "fsaveds") are specified in a similar manner. + The sljit_emit_enter is also capable of allocating a stack space + for local variables. The "local_size" argument contains the size + in bytes of this local area and its staring address is stored in SLJIT_SP. The memory area between SLJIT_SP (inclusive) and SLJIT_SP + local_size (exclusive) can be modified freely until the function returns. The stack space is not initialized. Note: the following conditions must met: 0 <= scratches <= SLJIT_NUMBER_OF_REGISTERS - 0 <= saveds <= SLJIT_NUMBER_OF_REGISTERS + 0 <= saveds <= SLJIT_NUMBER_OF_SAVED_REGISTERS scratches + saveds <= SLJIT_NUMBER_OF_REGISTERS 0 <= fscratches <= SLJIT_NUMBER_OF_FLOAT_REGISTERS - 0 <= fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS + 0 <= fsaveds <= SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS fscratches + fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS + Note: the compiler can use saved registers as scratch registers, + but the opposite is not supported + Note: every call of sljit_emit_enter and sljit_set_context overwrites the previous context. */ -/* The absolute address returned by sljit_get_local_base with -offset 0 is aligned to sljit_f64. Otherwise it is aligned to sljit_sw. */ -#define SLJIT_F64_ALIGNMENT 0x00000001 +/* The compiled function uses cdecl calling + * convention instead of SLJIT_FUNC. */ +#define SLJIT_ENTER_CDECL 0x00000001 /* The local_size must be >= 0 and <= SLJIT_MAX_LOCAL_SIZE. */ #define SLJIT_MAX_LOCAL_SIZE 65536 @@ -657,7 +696,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi /* The machine code has a context (which contains the local stack space size, number of used registers, etc.) which initialized by sljit_emit_enter. Several - functions (like sljit_emit_return) requres this context to be able to generate + functions (such as sljit_emit_return) requres this context to be able to generate the appropriate code. However, some code fragments (like inline cache) may have no normal entry point so their context is unknown for the compiler. Their context can be provided to the compiler by the sljit_set_context function. @@ -669,11 +708,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size); -/* Return from machine code. The op argument can be SLJIT_UNUSED which means the - function does not return with anything or any opcode between SLJIT_MOV and - SLJIT_MOV_P (see sljit_emit_op1). As for src and srcw they must be 0 if op - is SLJIT_UNUSED, otherwise see below the description about source and - destination arguments. */ +/* Return from machine code. The sljit_emit_return_void function does not return with + any value. The sljit_emit_return function returns with a single value which stores + the result of a data move instruction. The instruction is specified by the op + argument, and must be between SLJIT_MOV and SLJIT_MOV_P (see sljit_emit_op1). */ + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler); SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw); @@ -766,7 +806,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * #define SLJIT_MEM2(r1, r2) (SLJIT_MEM | (r1) | ((r2) << 8)) #define SLJIT_IMM 0x40 -/* Set 32 bit operation mode (I) on 64 bit CPUs. This option is ignored on +/* Sets 32 bit operation mode on 64 bit CPUs. This option is ignored on 32 bit CPUs. When this option is set for an arithmetic operation, only the lower 32 bit of the input registers are used, and the CPU status flags are set according to the 32 bit result. Although the higher 32 bit @@ -774,12 +814,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * be defined by the CPU architecture (e.g. MIPS). To satisfy these CPU requirements all source registers must be the result of those operations where this option was also set. Memory loads read 32 bit values rather - than 64 bit ones. In other words 32 bit and 64 bit operations cannot - be mixed. The only exception is SLJIT_MOV32 and SLJIT_MOVU32 whose source - register can hold any 32 or 64 bit value, and it is converted to a 32 bit - compatible format first. This conversion is free (no instructions are - emitted) on most CPUs. A 32 bit value can also be converted to a 64 bit - value by SLJIT_MOV_S32 (sign extension) or SLJIT_MOV_U32 (zero extension). + than 64 bit ones. In other words 32 bit and 64 bit operations cannot be + mixed. The only exception is SLJIT_MOV32 whose source register can hold + any 32 or 64 bit value, and it is converted to a 32 bit compatible format + first. This conversion is free (no instructions are emitted) on most CPUs. + A 32 bit value can also be converted to a 64 bit value by SLJIT_MOV_S32 + (sign extension) or SLJIT_MOV_U32 (zero extension). + + As for floating-point operations, this option sets 32 bit single + precision mode. Similar to the integer operations, all register arguments + must be the result of those operations where this option was also set. Note: memory addressing always uses 64 bit values on 64 bit systems so the result of a 32 bit operation must not be used with SLJIT_MEMx @@ -788,22 +832,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * This option is part of the instruction name, so there is no need to manually set it. E.g: - SLJIT_ADD32 == (SLJIT_ADD | SLJIT_I32_OP) */ -#define SLJIT_I32_OP 0x100 - -/* Set F32 (single) precision mode for floating-point computation. This - option is similar to SLJIT_I32_OP, it just applies to floating point - registers. When this option is passed, the CPU performs 32 bit floating - point operations, rather than 64 bit one. Similar to SLJIT_I32_OP, all - register arguments must be the result of those operations where this - option was also set. - - This option is part of the instruction name, so there is no need to - manually set it. E.g: - - SLJIT_MOV_F32 = (SLJIT_MOV_F64 | SLJIT_F32_OP) - */ -#define SLJIT_F32_OP SLJIT_I32_OP + SLJIT_ADD32 == (SLJIT_ADD | SLJIT_32) */ +#define SLJIT_32 0x100 /* Many CPUs (x86, ARM, PPC) have status flags which can be set according to the result of an operation. Other CPUs (MIPS) do not have status @@ -887,7 +917,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * The result is placed into SLJIT_R0 and the remainder into SLJIT_R1. Note: if SLJIT_R1 is 0, the behaviour is undefined. */ #define SLJIT_DIVMOD_UW (SLJIT_OP0_BASE + 4) -#define SLJIT_DIVMOD_U32 (SLJIT_DIVMOD_UW | SLJIT_I32_OP) +#define SLJIT_DIVMOD_U32 (SLJIT_DIVMOD_UW | SLJIT_32) /* Flags: - (may destroy flags) Signed divide of the value in SLJIT_R0 by the value in SLJIT_R1. The result is placed into SLJIT_R0 and the remainder into SLJIT_R1. @@ -895,13 +925,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * Note: if SLJIT_R1 is -1 and SLJIT_R0 is integer min (0x800..00), the behaviour is undefined. */ #define SLJIT_DIVMOD_SW (SLJIT_OP0_BASE + 5) -#define SLJIT_DIVMOD_S32 (SLJIT_DIVMOD_SW | SLJIT_I32_OP) +#define SLJIT_DIVMOD_S32 (SLJIT_DIVMOD_SW | SLJIT_32) /* Flags: - (may destroy flags) Unsigned divide of the value in SLJIT_R0 by the value in SLJIT_R1. The result is placed into SLJIT_R0. SLJIT_R1 preserves its value. Note: if SLJIT_R1 is 0, the behaviour is undefined. */ #define SLJIT_DIV_UW (SLJIT_OP0_BASE + 6) -#define SLJIT_DIV_U32 (SLJIT_DIV_UW | SLJIT_I32_OP) +#define SLJIT_DIV_U32 (SLJIT_DIV_UW | SLJIT_32) /* Flags: - (may destroy flags) Signed divide of the value in SLJIT_R0 by the value in SLJIT_R1. The result is placed into SLJIT_R0. SLJIT_R1 preserves its value. @@ -909,7 +939,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * Note: if SLJIT_R1 is -1 and SLJIT_R0 is integer min (0x800..00), the behaviour is undefined. */ #define SLJIT_DIV_SW (SLJIT_OP0_BASE + 7) -#define SLJIT_DIV_S32 (SLJIT_DIV_SW | SLJIT_I32_OP) +#define SLJIT_DIV_S32 (SLJIT_DIV_SW | SLJIT_32) /* Flags: - (does not modify flags) ENDBR32 instruction for x86-32 and ENDBR64 instruction for x86-64 when Intel Control-flow Enforcement Technology (CET) is enabled. @@ -941,16 +971,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile #define SLJIT_MOV (SLJIT_OP1_BASE + 0) /* Flags: - (does not modify flags) */ #define SLJIT_MOV_U8 (SLJIT_OP1_BASE + 1) -#define SLJIT_MOV32_U8 (SLJIT_MOV_U8 | SLJIT_I32_OP) +#define SLJIT_MOV32_U8 (SLJIT_MOV_U8 | SLJIT_32) /* Flags: - (does not modify flags) */ #define SLJIT_MOV_S8 (SLJIT_OP1_BASE + 2) -#define SLJIT_MOV32_S8 (SLJIT_MOV_S8 | SLJIT_I32_OP) +#define SLJIT_MOV32_S8 (SLJIT_MOV_S8 | SLJIT_32) /* Flags: - (does not modify flags) */ #define SLJIT_MOV_U16 (SLJIT_OP1_BASE + 3) -#define SLJIT_MOV32_U16 (SLJIT_MOV_U16 | SLJIT_I32_OP) +#define SLJIT_MOV32_U16 (SLJIT_MOV_U16 | SLJIT_32) /* Flags: - (does not modify flags) */ #define SLJIT_MOV_S16 (SLJIT_OP1_BASE + 4) -#define SLJIT_MOV32_S16 (SLJIT_MOV_S16 | SLJIT_I32_OP) +#define SLJIT_MOV32_S16 (SLJIT_MOV_S16 | SLJIT_32) /* Flags: - (does not modify flags) Note: no SLJIT_MOV32_U32 form, since it is the same as SLJIT_MOV32 */ #define SLJIT_MOV_U32 (SLJIT_OP1_BASE + 5) @@ -958,25 +988,21 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile Note: no SLJIT_MOV32_S32 form, since it is the same as SLJIT_MOV32 */ #define SLJIT_MOV_S32 (SLJIT_OP1_BASE + 6) /* Flags: - (does not modify flags) */ -#define SLJIT_MOV32 (SLJIT_MOV_S32 | SLJIT_I32_OP) +#define SLJIT_MOV32 (SLJIT_OP1_BASE + 7) /* Flags: - (does not modify flags) Note: load a pointer sized data, useful on x32 (a 32 bit mode on x86-64 where all x64 features are available, e.g. 16 register) or similar compiling modes */ -#define SLJIT_MOV_P (SLJIT_OP1_BASE + 7) +#define SLJIT_MOV_P (SLJIT_OP1_BASE + 8) /* Flags: Z Note: immediate source argument is not supported */ -#define SLJIT_NOT (SLJIT_OP1_BASE + 8) -#define SLJIT_NOT32 (SLJIT_NOT | SLJIT_I32_OP) -/* Flags: Z | OVERFLOW - Note: immediate source argument is not supported */ -#define SLJIT_NEG (SLJIT_OP1_BASE + 9) -#define SLJIT_NEG32 (SLJIT_NEG | SLJIT_I32_OP) +#define SLJIT_NOT (SLJIT_OP1_BASE + 9) +#define SLJIT_NOT32 (SLJIT_NOT | SLJIT_32) /* Count leading zeroes Flags: - (may destroy flags) Note: immediate source argument is not supported */ #define SLJIT_CLZ (SLJIT_OP1_BASE + 10) -#define SLJIT_CLZ32 (SLJIT_CLZ | SLJIT_I32_OP) +#define SLJIT_CLZ32 (SLJIT_CLZ | SLJIT_32) SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, @@ -987,58 +1013,64 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile /* Flags: Z | OVERFLOW | CARRY */ #define SLJIT_ADD (SLJIT_OP2_BASE + 0) -#define SLJIT_ADD32 (SLJIT_ADD | SLJIT_I32_OP) +#define SLJIT_ADD32 (SLJIT_ADD | SLJIT_32) /* Flags: CARRY */ #define SLJIT_ADDC (SLJIT_OP2_BASE + 1) -#define SLJIT_ADDC32 (SLJIT_ADDC | SLJIT_I32_OP) +#define SLJIT_ADDC32 (SLJIT_ADDC | SLJIT_32) /* Flags: Z | LESS | GREATER_EQUAL | GREATER | LESS_EQUAL SIG_LESS | SIG_GREATER_EQUAL | SIG_GREATER SIG_LESS_EQUAL | CARRY */ #define SLJIT_SUB (SLJIT_OP2_BASE + 2) -#define SLJIT_SUB32 (SLJIT_SUB | SLJIT_I32_OP) +#define SLJIT_SUB32 (SLJIT_SUB | SLJIT_32) /* Flags: CARRY */ #define SLJIT_SUBC (SLJIT_OP2_BASE + 3) -#define SLJIT_SUBC32 (SLJIT_SUBC | SLJIT_I32_OP) +#define SLJIT_SUBC32 (SLJIT_SUBC | SLJIT_32) /* Note: integer mul Flags: OVERFLOW */ #define SLJIT_MUL (SLJIT_OP2_BASE + 4) -#define SLJIT_MUL32 (SLJIT_MUL | SLJIT_I32_OP) +#define SLJIT_MUL32 (SLJIT_MUL | SLJIT_32) /* Flags: Z */ #define SLJIT_AND (SLJIT_OP2_BASE + 5) -#define SLJIT_AND32 (SLJIT_AND | SLJIT_I32_OP) +#define SLJIT_AND32 (SLJIT_AND | SLJIT_32) /* Flags: Z */ #define SLJIT_OR (SLJIT_OP2_BASE + 6) -#define SLJIT_OR32 (SLJIT_OR | SLJIT_I32_OP) +#define SLJIT_OR32 (SLJIT_OR | SLJIT_32) /* Flags: Z */ #define SLJIT_XOR (SLJIT_OP2_BASE + 7) -#define SLJIT_XOR32 (SLJIT_XOR | SLJIT_I32_OP) +#define SLJIT_XOR32 (SLJIT_XOR | SLJIT_32) /* Flags: Z Let bit_length be the length of the shift operation: 32 or 64. If src2 is immediate, src2w is masked by (bit_length - 1). Otherwise, if the content of src2 is outside the range from 0 to bit_length - 1, the result is undefined. */ #define SLJIT_SHL (SLJIT_OP2_BASE + 8) -#define SLJIT_SHL32 (SLJIT_SHL | SLJIT_I32_OP) +#define SLJIT_SHL32 (SLJIT_SHL | SLJIT_32) /* Flags: Z Let bit_length be the length of the shift operation: 32 or 64. If src2 is immediate, src2w is masked by (bit_length - 1). Otherwise, if the content of src2 is outside the range from 0 to bit_length - 1, the result is undefined. */ #define SLJIT_LSHR (SLJIT_OP2_BASE + 9) -#define SLJIT_LSHR32 (SLJIT_LSHR | SLJIT_I32_OP) +#define SLJIT_LSHR32 (SLJIT_LSHR | SLJIT_32) /* Flags: Z Let bit_length be the length of the shift operation: 32 or 64. If src2 is immediate, src2w is masked by (bit_length - 1). Otherwise, if the content of src2 is outside the range from 0 to bit_length - 1, the result is undefined. */ #define SLJIT_ASHR (SLJIT_OP2_BASE + 10) -#define SLJIT_ASHR32 (SLJIT_ASHR | SLJIT_I32_OP) +#define SLJIT_ASHR32 (SLJIT_ASHR | SLJIT_32) SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w); +/* The sljit_emit_op2u function is the same as sljit_emit_op2 except the result is discarded. */ + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w); + /* Starting index of opcodes for sljit_emit_op2. */ #define SLJIT_OP_SRC_BASE 128 @@ -1082,35 +1114,35 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *comp /* Flags: - (does not modify flags) */ #define SLJIT_MOV_F64 (SLJIT_FOP1_BASE + 0) -#define SLJIT_MOV_F32 (SLJIT_MOV_F64 | SLJIT_F32_OP) +#define SLJIT_MOV_F32 (SLJIT_MOV_F64 | SLJIT_32) /* Convert opcodes: CONV[DST_TYPE].FROM[SRC_TYPE] SRC/DST TYPE can be: D - double, S - single, W - signed word, I - signed int Rounding mode when the destination is W or I: round towards zero. */ -/* Flags: - (does not modify flags) */ +/* Flags: - (may destroy flags) */ #define SLJIT_CONV_F64_FROM_F32 (SLJIT_FOP1_BASE + 1) -#define SLJIT_CONV_F32_FROM_F64 (SLJIT_CONV_F64_FROM_F32 | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_CONV_F32_FROM_F64 (SLJIT_CONV_F64_FROM_F32 | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_CONV_SW_FROM_F64 (SLJIT_FOP1_BASE + 2) -#define SLJIT_CONV_SW_FROM_F32 (SLJIT_CONV_SW_FROM_F64 | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_CONV_SW_FROM_F32 (SLJIT_CONV_SW_FROM_F64 | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_CONV_S32_FROM_F64 (SLJIT_FOP1_BASE + 3) -#define SLJIT_CONV_S32_FROM_F32 (SLJIT_CONV_S32_FROM_F64 | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_CONV_S32_FROM_F32 (SLJIT_CONV_S32_FROM_F64 | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_CONV_F64_FROM_SW (SLJIT_FOP1_BASE + 4) -#define SLJIT_CONV_F32_FROM_SW (SLJIT_CONV_F64_FROM_SW | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_CONV_F32_FROM_SW (SLJIT_CONV_F64_FROM_SW | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_CONV_F64_FROM_S32 (SLJIT_FOP1_BASE + 5) -#define SLJIT_CONV_F32_FROM_S32 (SLJIT_CONV_F64_FROM_S32 | SLJIT_F32_OP) +#define SLJIT_CONV_F32_FROM_S32 (SLJIT_CONV_F64_FROM_S32 | SLJIT_32) /* Note: dst is the left and src is the right operand for SLJIT_CMPD. Flags: EQUAL_F | LESS_F | GREATER_EQUAL_F | GREATER_F | LESS_EQUAL_F */ #define SLJIT_CMP_F64 (SLJIT_FOP1_BASE + 6) -#define SLJIT_CMP_F32 (SLJIT_CMP_F64 | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_CMP_F32 (SLJIT_CMP_F64 | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_NEG_F64 (SLJIT_FOP1_BASE + 7) -#define SLJIT_NEG_F32 (SLJIT_NEG_F64 | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_NEG_F32 (SLJIT_NEG_F64 | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_ABS_F64 (SLJIT_FOP1_BASE + 8) -#define SLJIT_ABS_F32 (SLJIT_ABS_F64 | SLJIT_F32_OP) +#define SLJIT_ABS_F32 (SLJIT_ABS_F64 | SLJIT_32) SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, @@ -1119,18 +1151,18 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil /* Starting index of opcodes for sljit_emit_fop2. */ #define SLJIT_FOP2_BASE 192 -/* Flags: - (does not modify flags) */ +/* Flags: - (may destroy flags) */ #define SLJIT_ADD_F64 (SLJIT_FOP2_BASE + 0) -#define SLJIT_ADD_F32 (SLJIT_ADD_F64 | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_ADD_F32 (SLJIT_ADD_F64 | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_SUB_F64 (SLJIT_FOP2_BASE + 1) -#define SLJIT_SUB_F32 (SLJIT_SUB_F64 | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_SUB_F32 (SLJIT_SUB_F64 | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_MUL_F64 (SLJIT_FOP2_BASE + 2) -#define SLJIT_MUL_F32 (SLJIT_MUL_F64 | SLJIT_F32_OP) -/* Flags: - (does not modify flags) */ +#define SLJIT_MUL_F32 (SLJIT_MUL_F64 | SLJIT_32) +/* Flags: - (may destroy flags) */ #define SLJIT_DIV_F64 (SLJIT_FOP2_BASE + 3) -#define SLJIT_DIV_F32 (SLJIT_DIV_F64 | SLJIT_F32_OP) +#define SLJIT_DIV_F32 (SLJIT_DIV_F64 | SLJIT_32) SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, @@ -1170,33 +1202,35 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compi #define SLJIT_SET_OVERFLOW SLJIT_SET(SLJIT_OVERFLOW) #define SLJIT_NOT_OVERFLOW 11 -/* There is no SLJIT_CARRY or SLJIT_NOT_CARRY. */ -#define SLJIT_SET_CARRY SLJIT_SET(12) +/* Unlike other flags, sljit_emit_jump may destroy this flag. */ +#define SLJIT_CARRY 12 +#define SLJIT_SET_CARRY SLJIT_SET(SLJIT_CARRY) +#define SLJIT_NOT_CARRY 13 /* Floating point comparison types. */ #define SLJIT_EQUAL_F64 14 -#define SLJIT_EQUAL_F32 (SLJIT_EQUAL_F64 | SLJIT_F32_OP) +#define SLJIT_EQUAL_F32 (SLJIT_EQUAL_F64 | SLJIT_32) #define SLJIT_SET_EQUAL_F SLJIT_SET(SLJIT_EQUAL_F64) #define SLJIT_NOT_EQUAL_F64 15 -#define SLJIT_NOT_EQUAL_F32 (SLJIT_NOT_EQUAL_F64 | SLJIT_F32_OP) +#define SLJIT_NOT_EQUAL_F32 (SLJIT_NOT_EQUAL_F64 | SLJIT_32) #define SLJIT_SET_NOT_EQUAL_F SLJIT_SET(SLJIT_NOT_EQUAL_F64) #define SLJIT_LESS_F64 16 -#define SLJIT_LESS_F32 (SLJIT_LESS_F64 | SLJIT_F32_OP) +#define SLJIT_LESS_F32 (SLJIT_LESS_F64 | SLJIT_32) #define SLJIT_SET_LESS_F SLJIT_SET(SLJIT_LESS_F64) #define SLJIT_GREATER_EQUAL_F64 17 -#define SLJIT_GREATER_EQUAL_F32 (SLJIT_GREATER_EQUAL_F64 | SLJIT_F32_OP) +#define SLJIT_GREATER_EQUAL_F32 (SLJIT_GREATER_EQUAL_F64 | SLJIT_32) #define SLJIT_SET_GREATER_EQUAL_F SLJIT_SET(SLJIT_GREATER_EQUAL_F64) #define SLJIT_GREATER_F64 18 -#define SLJIT_GREATER_F32 (SLJIT_GREATER_F64 | SLJIT_F32_OP) +#define SLJIT_GREATER_F32 (SLJIT_GREATER_F64 | SLJIT_32) #define SLJIT_SET_GREATER_F SLJIT_SET(SLJIT_GREATER_F64) #define SLJIT_LESS_EQUAL_F64 19 -#define SLJIT_LESS_EQUAL_F32 (SLJIT_LESS_EQUAL_F64 | SLJIT_F32_OP) +#define SLJIT_LESS_EQUAL_F32 (SLJIT_LESS_EQUAL_F64 | SLJIT_32) #define SLJIT_SET_LESS_EQUAL_F SLJIT_SET(SLJIT_LESS_EQUAL_F64) #define SLJIT_UNORDERED_F64 20 -#define SLJIT_UNORDERED_F32 (SLJIT_UNORDERED_F64 | SLJIT_F32_OP) +#define SLJIT_UNORDERED_F32 (SLJIT_UNORDERED_F64 | SLJIT_32) #define SLJIT_SET_UNORDERED_F SLJIT_SET(SLJIT_UNORDERED_F64) #define SLJIT_ORDERED_F64 21 -#define SLJIT_ORDERED_F32 (SLJIT_ORDERED_F64 | SLJIT_F32_OP) +#define SLJIT_ORDERED_F32 (SLJIT_ORDERED_F64 | SLJIT_32) #define SLJIT_SET_ORDERED_F SLJIT_SET(SLJIT_ORDERED_F64) /* Unconditional jump types. */ @@ -1211,6 +1245,15 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compi /* The target can be changed during runtime (see: sljit_set_jump_addr). */ #define SLJIT_REWRITABLE_JUMP 0x1000 +/* When this flag is passed, the execution of the current function ends and + the called function returns to the caller of the current function. The + stack usage is reduced before the call, but it is not necessarily reduced + to zero. In the latter case the compiler needs to allocate space for some + arguments and the return register must be kept as well. + + This feature is highly experimental and not supported on SPARC platform + at the moment. */ +#define SLJIT_CALL_RETURN 0x2000 /* Emit a jump instruction. The destination is not set, only the type of the jump. type must be between SLJIT_EQUAL and SLJIT_FAST_CALL @@ -1221,15 +1264,14 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile /* Emit a C compiler (ABI) compatible function call. type must be SLJIT_CALL or SLJIT_CALL_CDECL - type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP + type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP and SLJIT_CALL_RETURN arg_types is the combination of SLJIT_RET / SLJIT_ARGx (SLJIT_DEF_RET / SLJIT_DEF_ARGx) macros Flags: destroy all flags. */ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 arg_types); /* Basic arithmetic comparison. In most architectures it is implemented as - an SLJIT_SUB operation (with SLJIT_UNUSED destination and setting - appropriate flags) followed by a sljit_emit_jump. However some + an compare operation followed by a sljit_emit_jump. However some architectures (i.e: ARM64 or MIPS) may employ special optimizations here. It is suggested to use this comparison form when appropriate. type must be between SLJIT_EQUAL and SLJIT_I_SIG_LESS_EQUAL @@ -1271,6 +1313,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi Direct form: set src to SLJIT_IMM() and srcw to the address Indirect form: any other valid addressing mode type must be SLJIT_CALL or SLJIT_CALL_CDECL + type can be combined (or'ed) with SLJIT_CALL_RETURN arg_types is the combination of SLJIT_RET / SLJIT_ARGx (SLJIT_DEF_RET / SLJIT_DEF_ARGx) macros Flags: destroy all flags. */ @@ -1298,7 +1341,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co type must be between SLJIT_EQUAL and SLJIT_ORDERED_F64 dst_reg must be a valid register and it can be combined - with SLJIT_I32_OP to perform a 32 bit arithmetic operation + with SLJIT_32 to perform a 32 bit arithmetic operation src must be register or immediate (SLJIT_IMM) Flags: - (does not modify flags) */ @@ -1454,26 +1497,29 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_u8 *SLJIT_FUNC sljit_stack_resize(struct sljit_st #if !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) -/* Get the entry address of a given function. */ -#define SLJIT_FUNC_OFFSET(func_name) ((sljit_sw)func_name) +/* Get the entry address of a given function (signed, unsigned result). */ +#define SLJIT_FUNC_ADDR(func_name) ((sljit_sw)func_name) +#define SLJIT_FUNC_UADDR(func_name) ((sljit_uw)func_name) #else /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */ /* All JIT related code should be placed in the same context (library, binary, etc.). */ -#define SLJIT_FUNC_OFFSET(func_name) (*(sljit_sw*)(void*)func_name) +/* Get the entry address of a given function (signed, unsigned result). */ +#define SLJIT_FUNC_ADDR(func_name) (*(sljit_sw*)(void*)func_name) +#define SLJIT_FUNC_UADDR(func_name) (*(sljit_uw*)(void*)func_name) /* For powerpc64, the function pointers point to a context descriptor. */ struct sljit_function_context { - sljit_sw addr; - sljit_sw r2; - sljit_sw r11; + sljit_uw addr; + sljit_uw r2; + sljit_uw r11; }; /* Fill the context arguments using the addr and the function. If func_ptr is NULL, it will not be set to the address of context If addr is NULL, the function address also comes from the func pointer. */ -SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_sw addr, void* func); +SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_uw addr, void* func); #endif /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */ @@ -1516,17 +1562,19 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size); + void *instruction, sljit_u32 size); /* Flags were set by a 32 bit operation. */ -#define SLJIT_CURRENT_FLAGS_I32_OP SLJIT_I32_OP +#define SLJIT_CURRENT_FLAGS_32 SLJIT_32 -/* Flags were set by an ADD, ADDC, SUB, SUBC, or NEG operation. */ -#define SLJIT_CURRENT_FLAGS_ADD_SUB 0x01 +/* Flags were set by an ADD or ADDC operations. */ +#define SLJIT_CURRENT_FLAGS_ADD 0x01 +/* Flags were set by a SUB, SUBC, or NEG operation. */ +#define SLJIT_CURRENT_FLAGS_SUB 0x02 -/* Flags were set by a SUB with unused destination. - Must be combined with SLJIT_CURRENT_FLAGS_ADD_SUB. */ -#define SLJIT_CURRENT_FLAGS_COMPARE 0x02 +/* Flags were set by sljit_emit_op2u with SLJIT_SUB opcode. + Must be combined with SLJIT_CURRENT_FLAGS_SUB. */ +#define SLJIT_CURRENT_FLAGS_COMPARE 0x04 /* Define the currently available CPU status flags. It is usually used after an sljit_emit_label or sljit_emit_op_custom operations to define which CPU diff --git a/thirdparty/pcre2/src/sljit/sljitNativeARM_32.c b/thirdparty/pcre2/src/sljit/sljitNativeARM_32.c index 74cf55fcd2..7b87f5907a 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeARM_32.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeARM_32.c @@ -65,12 +65,17 @@ static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 5] = { }; static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { - 0, 0, 1, 2, 3, 4, 5, 6, 7 + 0, 0, 1, 2, 3, 4, 5, 15, 14, 13, 12, 11, 10, 9, 8, 6, 7 }; -#define RM(rm) (reg_map[rm]) -#define RD(rd) (reg_map[rd] << 12) -#define RN(rn) (reg_map[rn] << 16) +#define RM(rm) ((sljit_uw)reg_map[rm]) +#define RM8(rm) ((sljit_uw)reg_map[rm] << 8) +#define RD(rd) ((sljit_uw)reg_map[rd] << 12) +#define RN(rn) ((sljit_uw)reg_map[rn] << 16) + +#define VM(rm) ((sljit_uw)freg_map[rm]) +#define VD(rd) ((sljit_uw)freg_map[rd] << 12) +#define VN(rn) ((sljit_uw)freg_map[rn] << 16) /* --------------------------------------------------------------------- */ /* Instrucion forms */ @@ -107,6 +112,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define SBC 0xe0c00000 #define SMULL 0xe0c00090 #define SUB 0xe0400000 +#define TST 0xe1000000 #define UMULL 0xe0800090 #define VABS_F32 0xeeb00ac0 #define VADD_F32 0xee300a00 @@ -115,12 +121,15 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define VCVT_F64_F32 0xeeb70ac0 #define VCVT_S32_F32 0xeebd0ac0 #define VDIV_F32 0xee800a00 +#define VLDR_F32 0xed100a00 #define VMOV_F32 0xeeb00a40 #define VMOV 0xee000a10 #define VMOV2 0xec400a10 #define VMRS 0xeef1fa10 #define VMUL_F32 0xee200a00 #define VNEG_F32 0xeeb10a40 +#define VPOP 0xecbd0b00 +#define VPUSH 0xed2d0b00 #define VSTR_F32 0xed000a00 #define VSUB_F32 0xee300a40 @@ -204,7 +213,7 @@ static sljit_s32 push_inst_with_literal(struct sljit_compiler *compiler, sljit_u cpool_unique_ptr = compiler->cpool_unique; do { if ((*cpool_ptr == literal) && !(*cpool_unique_ptr)) { - cpool_index = cpool_ptr - compiler->cpool; + cpool_index = (sljit_uw)(cpool_ptr - compiler->cpool); break; } cpool_ptr++; @@ -293,7 +302,7 @@ static sljit_uw patch_pc_relative_loads(sljit_uw *last_pc_patch, sljit_uw *code_ while (last_pc_patch < code_ptr) { /* Data transfer instruction with Rn == r15. */ if ((*last_pc_patch & 0x0c0f0000) == 0x040f0000) { - diff = const_pool - last_pc_patch; + diff = (sljit_uw)(const_pool - last_pc_patch); ind = (*last_pc_patch) & 0xfff; /* Must be a load instruction with immediate offset. */ @@ -308,12 +317,12 @@ static sljit_uw patch_pc_relative_loads(sljit_uw *last_pc_patch, sljit_uw *code_ SLJIT_ASSERT(diff >= 1); if (diff >= 2 || ind > 0) { - diff = (diff + ind - 2) << 2; + diff = (diff + (sljit_uw)ind - 2) << 2; SLJIT_ASSERT(diff <= 0xfff); - *last_pc_patch = (*last_pc_patch & ~0xfff) | diff; + *last_pc_patch = (*last_pc_patch & ~(sljit_uw)0xfff) | diff; } else - *last_pc_patch = (*last_pc_patch & ~(0xfff | (1 << 23))) | 0x004; + *last_pc_patch = (*last_pc_patch & ~(sljit_uw)(0xfff | (1 << 23))) | 0x004; } last_pc_patch++; } @@ -329,24 +338,24 @@ struct future_patch { static sljit_s32 resolve_const_pool_index(struct sljit_compiler *compiler, struct future_patch **first_patch, sljit_uw cpool_current_index, sljit_uw *cpool_start_address, sljit_uw *buf_ptr) { - sljit_s32 value; + sljit_u32 value; struct future_patch *curr_patch, *prev_patch; SLJIT_UNUSED_ARG(compiler); /* Using the values generated by patch_pc_relative_loads. */ if (!*first_patch) - value = (sljit_s32)cpool_start_address[cpool_current_index]; + value = cpool_start_address[cpool_current_index]; else { curr_patch = *first_patch; prev_patch = NULL; while (1) { if (!curr_patch) { - value = (sljit_s32)cpool_start_address[cpool_current_index]; + value = cpool_start_address[cpool_current_index]; break; } if ((sljit_uw)curr_patch->index == cpool_current_index) { - value = curr_patch->value; + value = (sljit_uw)curr_patch->value; if (prev_patch) prev_patch->next = curr_patch->next; else @@ -359,8 +368,8 @@ static sljit_s32 resolve_const_pool_index(struct sljit_compiler *compiler, struc } } - if (value >= 0) { - if ((sljit_uw)value > cpool_current_index) { + if ((sljit_sw)value >= 0) { + if (value > cpool_current_index) { curr_patch = (struct future_patch*)SLJIT_MALLOC(sizeof(struct future_patch), compiler->allocator_data); if (!curr_patch) { while (*first_patch) { @@ -371,8 +380,8 @@ static sljit_s32 resolve_const_pool_index(struct sljit_compiler *compiler, struc return SLJIT_ERR_ALLOC_FAILED; } curr_patch->next = *first_patch; - curr_patch->index = value; - curr_patch->value = cpool_start_address[value]; + curr_patch->index = (sljit_sw)value; + curr_patch->value = (sljit_sw)cpool_start_address[value]; *first_patch = curr_patch; } cpool_start_address[value] = *buf_ptr; @@ -395,8 +404,8 @@ static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_uw inst) static SLJIT_INLINE sljit_s32 emit_imm(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm) { - FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff))); - return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | ((imm >> 16) & 0xfff)); + FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | ((sljit_u32)imm & 0xfff))); + return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | (((sljit_u32)imm >> 16) & 0xfff)); } #endif @@ -554,8 +563,9 @@ static SLJIT_INLINE void inline_set_jump_addr(sljit_uw jump_ptr, sljit_sw execut } static sljit_uw get_imm(sljit_uw imm); +static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, sljit_uw imm); -static SLJIT_INLINE void inline_set_const(sljit_uw addr, sljit_sw executable_offset, sljit_sw new_constant, sljit_s32 flush_cache) +static SLJIT_INLINE void inline_set_const(sljit_uw addr, sljit_sw executable_offset, sljit_uw new_constant, sljit_s32 flush_cache) { #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) sljit_uw *ptr = (sljit_uw*)addr; @@ -658,7 +668,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_uw word_count; sljit_uw next_addr; sljit_sw executable_offset; - sljit_sw addr; + sljit_uw addr; #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) sljit_uw cpool_size; sljit_uw cpool_skip_alignment; @@ -737,7 +747,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == word_count) { /* Points after the current instruction. */ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; next_addr = compute_next_addr(label, jump, const_, put_label); @@ -770,7 +780,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == word_count) { /* code_ptr can be affected above. */ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr + 1, executable_offset); - label->size = (code_ptr + 1) - code; + label->size = (sljit_uw)((code_ptr + 1) - code); label = label->next; } if (const_ && const_->addr == word_count) { @@ -799,8 +809,8 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, cpool_size); if (cpool_current_index > 0) { /* Unconditional branch. */ - *code_ptr = B | (((cpool_start_address - code_ptr) + cpool_current_index - 2) & ~PUSH_POOL); - code_ptr = cpool_start_address + cpool_current_index; + *code_ptr = B | (((sljit_uw)(cpool_start_address - code_ptr) + cpool_current_index - 2) & ~PUSH_POOL); + code_ptr = (sljit_uw*)(cpool_start_address + cpool_current_index); } cpool_skip_alignment = CONST_POOL_ALIGNMENT - 1; cpool_current_index = 0; @@ -822,7 +832,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil cpool_start_address = ALIGN_INSTRUCTION(code_ptr); cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, compiler->cpool_fill); if (cpool_current_index > 0) - code_ptr = cpool_start_address + cpool_current_index; + code_ptr = (sljit_uw*)(cpool_start_address + cpool_current_index); buf_ptr = compiler->cpool; buf_end = buf_ptr + compiler->cpool_fill; @@ -845,15 +855,15 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil buf_ptr = (sljit_uw *)jump->addr; if (jump->flags & PATCH_B) { - addr = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr + 2, executable_offset); + addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr + 2, executable_offset); if (!(jump->flags & JUMP_ADDR)) { SLJIT_ASSERT(jump->flags & JUMP_LABEL); - SLJIT_ASSERT(((sljit_sw)jump->u.label->addr - addr) <= 0x01ffffff && ((sljit_sw)jump->u.label->addr - addr) >= -0x02000000); - *buf_ptr |= (((sljit_sw)jump->u.label->addr - addr) >> 2) & 0x00ffffff; + SLJIT_ASSERT((sljit_sw)(jump->u.label->addr - addr) <= 0x01ffffff && (sljit_sw)(jump->u.label->addr - addr) >= -0x02000000); + *buf_ptr |= ((jump->u.label->addr - addr) >> 2) & 0x00ffffff; } else { - SLJIT_ASSERT(((sljit_sw)jump->u.target - addr) <= 0x01ffffff && ((sljit_sw)jump->u.target - addr) >= -0x02000000); - *buf_ptr |= (((sljit_sw)jump->u.target - addr) >> 2) & 0x00ffffff; + SLJIT_ASSERT((sljit_sw)(jump->u.target - addr) <= 0x01ffffff && (sljit_sw)(jump->u.target - addr) >= -0x02000000); + *buf_ptr |= ((jump->u.target - addr) >> 2) & 0x00ffffff; } } else if (jump->flags & SLJIT_REWRITABLE_JUMP) { @@ -923,7 +933,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; - compiler->executable_size = (code_ptr - code) * sizeof(sljit_uw); + compiler->executable_size = (sljit_uw)(code_ptr - code) * sizeof(sljit_uw); code = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); code_ptr = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); @@ -972,6 +982,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) #define ALLOW_IMM 0x10 #define ALLOW_INV_IMM 0x20 #define ALLOW_ANY_IMM (ALLOW_IMM | ALLOW_INV_IMM) +#define ALLOW_NEG_IMM 0x40 /* s/l - store/load (1 bit) u/s - signed/unsigned (1 bit) @@ -999,7 +1010,7 @@ static const sljit_uw data_transfer_insts[16] = { }; #define EMIT_DATA_TRANSFER(type, add, target_reg, base_reg, arg) \ - (data_transfer_insts[(type) & 0xf] | ((add) << 23) | RD(target_reg) | RN(base_reg) | (arg)) + (data_transfer_insts[(type) & 0xf] | ((add) << 23) | RD(target_reg) | RN(base_reg) | (sljit_uw)(arg)) /* Normal ldr/str instruction. Type2: ldrsb, ldrh, ldrsh */ @@ -1008,6 +1019,26 @@ static const sljit_uw data_transfer_insts[16] = { #define TYPE2_TRANSFER_IMM(imm) \ (((imm) & 0xf) | (((imm) & 0xf0) << 4) | (1 << 22)) +#define EMIT_FPU_OPERATION(opcode, mode, dst, src1, src2) \ + ((sljit_uw)(opcode) | (sljit_uw)(mode) | VD(dst) | VM(src1) | VN(src2)) + +/* Flags for emit_op: */ + /* Arguments are swapped. */ +#define ARGS_SWAPPED 0x01 + /* Inverted immediate. */ +#define INV_IMM 0x02 + /* Source and destination is register. */ +#define MOVE_REG_CONV 0x04 + /* Unused return value. */ +#define UNUSED_RETURN 0x08 +/* SET_FLAGS must be (1 << 20) as it is also the value of S bit (can be used for optimization). */ +#define SET_FLAGS (1 << 20) +/* dst: reg + src1: reg + src2: reg or imm (if allowed) + SRC2_IMM must be (1 << 25) as it is also the value of I bit (can be used for optimization). */ +#define SRC2_IMM (1 << 25) + static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 inp_flags, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, @@ -1017,41 +1048,161 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { - sljit_s32 args, size, i, tmp; - sljit_uw push; + sljit_uw imm, offset; + sljit_s32 i, tmp, size, word_arg_count, saved_arg_count; +#ifdef __SOFTFP__ + sljit_u32 float_arg_count; +#else + sljit_u32 old_offset, f32_offset; + sljit_u32 remap[3]; + sljit_u32 *remap_ptr = remap; +#endif CHECK_ERROR(); CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - /* Push saved registers, temporary registers - stmdb sp!, {..., lr} */ - push = PUSH | (1 << 14); + imm = 0; - tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG; - for (i = SLJIT_S0; i >= tmp; i--) - push |= 1 << reg_map[i]; + tmp = SLJIT_S0 - saveds; + for (i = SLJIT_S0; i > tmp; i--) + imm |= (sljit_uw)1 << reg_map[i]; for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) - push |= 1 << reg_map[i]; + imm |= (sljit_uw)1 << reg_map[i]; + + SLJIT_ASSERT(reg_map[TMP_REG2] == 14); - FAIL_IF(push_inst(compiler, push)); + /* Push saved and temporary registers + multiple registers: stmdb sp!, {..., lr} + single register: str reg, [sp, #-4]! */ + if (imm != 0) + FAIL_IF(push_inst(compiler, PUSH | (1 << 14) | imm)); + else + FAIL_IF(push_inst(compiler, 0xe52d0004 | RD(TMP_REG2))); /* Stack must be aligned to 8 bytes: */ size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); - local_size = ((size + local_size + 7) & ~7) - size; + + if (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) { + if ((size & SSIZE_OF(sw)) != 0) { + FAIL_IF(push_inst(compiler, SUB | RD(SLJIT_SP) | RN(SLJIT_SP) | SRC2_IMM | sizeof(sljit_sw))); + size += SSIZE_OF(sw); + } + + if (fsaveds + fscratches >= SLJIT_NUMBER_OF_FLOAT_REGISTERS) { + FAIL_IF(push_inst(compiler, VPUSH | VD(SLJIT_FS0) | ((sljit_uw)SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS << 1))); + } else { + if (fsaveds > 0) + FAIL_IF(push_inst(compiler, VPUSH | VD(SLJIT_FS0) | ((sljit_uw)fsaveds << 1))); + if (fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) + FAIL_IF(push_inst(compiler, VPUSH | VD(fscratches) | ((sljit_uw)(fscratches - (SLJIT_FIRST_SAVED_FLOAT_REG - 1)) << 1))); + } + } + + local_size = ((size + local_size + 0x7) & ~0x7) - size; compiler->local_size = local_size; - if (local_size > 0) - FAIL_IF(emit_op(compiler, SLJIT_SUB, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size)); - args = get_arg_count(arg_types); + arg_types >>= SLJIT_ARG_SHIFT; + word_arg_count = 0; + saved_arg_count = 0; +#ifdef __SOFTFP__ + SLJIT_COMPILE_ASSERT(SLJIT_FR0 == 1, float_register_index_start); + + offset = 0; + float_arg_count = 0; + + while (arg_types) { + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (offset & 0x7) + offset += sizeof(sljit_sw); + + if (offset < 4 * sizeof(sljit_sw)) + FAIL_IF(push_inst(compiler, VMOV2 | (offset << 10) | ((offset + sizeof(sljit_sw)) << 14) | float_arg_count)); + else + FAIL_IF(push_inst(compiler, VLDR_F32 | 0x800100 | RN(SLJIT_SP) + | (float_arg_count << 12) | ((offset + (sljit_uw)size - 4 * sizeof(sljit_sw)) >> 2))); + float_arg_count++; + offset += sizeof(sljit_f64) - sizeof(sljit_sw); + break; + case SLJIT_ARG_TYPE_F32: + if (offset < 4 * sizeof(sljit_sw)) + FAIL_IF(push_inst(compiler, VMOV | (float_arg_count << 16) | (offset << 10))); + else + FAIL_IF(push_inst(compiler, VLDR_F32 | 0x800000 | RN(SLJIT_SP) + | (float_arg_count << 12) | ((offset + (sljit_uw)size - 4 * sizeof(sljit_sw)) >> 2))); + float_arg_count++; + break; + default: + word_arg_count++; + + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + tmp = SLJIT_S0 - saved_arg_count; + saved_arg_count++; + } else if (word_arg_count - 1 != (sljit_s32)(offset >> 2)) + tmp = word_arg_count; + else + break; + + if (offset < 4 * sizeof(sljit_sw)) + FAIL_IF(push_inst(compiler, MOV | RD(tmp) | (offset >> 2))); + else + FAIL_IF(push_inst(compiler, data_transfer_insts[WORD_SIZE | LOAD_DATA] | 0x800000 + | RN(SLJIT_SP) | RD(tmp) | (offset + (sljit_uw)size - 4 * sizeof(sljit_sw)))); + break; + } + + offset += sizeof(sljit_sw); + arg_types >>= SLJIT_ARG_SHIFT; + } + + compiler->args_size = offset; +#else + offset = SLJIT_FR0; + old_offset = SLJIT_FR0; + f32_offset = 0; + + while (arg_types) { + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (offset != old_offset) + *remap_ptr++ = EMIT_FPU_OPERATION(VMOV_F32, SLJIT_32, offset, old_offset, 0); + old_offset++; + offset++; + break; + case SLJIT_ARG_TYPE_F32: + if (f32_offset != 0) { + *remap_ptr++ = EMIT_FPU_OPERATION(VMOV_F32, 0x20, offset, f32_offset, 0); + f32_offset = 0; + } else { + if (offset != old_offset) + *remap_ptr++ = EMIT_FPU_OPERATION(VMOV_F32, 0, offset, old_offset, 0); + f32_offset = old_offset; + old_offset++; + } + offset++; + break; + default: + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + FAIL_IF(push_inst(compiler, MOV | RD(SLJIT_S0 - saved_arg_count) | RM(SLJIT_R0 + word_arg_count))); + saved_arg_count++; + } + + word_arg_count++; + break; + } + arg_types >>= SLJIT_ARG_SHIFT; + } - if (args >= 1) - FAIL_IF(push_inst(compiler, MOV | RD(SLJIT_S0) | RM(SLJIT_R0))); - if (args >= 2) - FAIL_IF(push_inst(compiler, MOV | RD(SLJIT_S1) | RM(SLJIT_R1))); - if (args >= 3) - FAIL_IF(push_inst(compiler, MOV | RD(SLJIT_S2) | RM(SLJIT_R2))); + SLJIT_ASSERT((sljit_uw)(remap_ptr - remap) <= sizeof(remap)); + + while (remap_ptr > remap) + FAIL_IF(push_inst(compiler, *(--remap_ptr))); +#endif + + if (local_size > 0) + FAIL_IF(emit_op(compiler, SLJIT_SUB, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size)); return SLJIT_SUCCESS; } @@ -1067,58 +1218,129 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); - compiler->local_size = ((size + local_size + 7) & ~7) - size; + + if ((size & SSIZE_OF(sw)) != 0 && (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG)) + size += SSIZE_OF(sw); + + compiler->local_size = ((size + local_size + 0x7) & ~0x7) - size; return SLJIT_SUCCESS; } -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) +static sljit_s32 emit_add_sp(struct sljit_compiler *compiler, sljit_uw imm) { - sljit_s32 i, tmp; - sljit_uw pop; + sljit_uw imm2 = get_imm(imm); - CHECK_ERROR(); - CHECK(check_sljit_emit_return(compiler, op, src, srcw)); + if (imm2 == 0) { + FAIL_IF(load_immediate(compiler, TMP_REG2, imm)); + imm2 = RM(TMP_REG2); + } - FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); + return push_inst(compiler, ADD | RD(SLJIT_SP) | RN(SLJIT_SP) | imm2); +} + +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler, sljit_s32 frame_size) +{ + sljit_s32 local_size, fscratches, fsaveds, i, tmp; + sljit_s32 lr_dst = TMP_PC; + sljit_uw reg_list; - if (compiler->local_size > 0) - FAIL_IF(emit_op(compiler, SLJIT_ADD, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->local_size)); + SLJIT_ASSERT(reg_map[TMP_REG2] == 14); - /* Push saved registers, temporary registers - ldmia sp!, {..., pc} */ - pop = POP | (1 << 15); + local_size = compiler->local_size; + fscratches = compiler->fscratches; + fsaveds = compiler->fsaveds; - tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG; - for (i = SLJIT_S0; i >= tmp; i--) - pop |= 1 << reg_map[i]; + if (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) { + if (local_size > 0) + FAIL_IF(emit_add_sp(compiler, (sljit_uw)local_size)); + + if (fsaveds + fscratches >= SLJIT_NUMBER_OF_FLOAT_REGISTERS) { + FAIL_IF(push_inst(compiler, VPOP | VD(SLJIT_FS0) | ((sljit_uw)SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS << 1))); + } else { + if (fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) + FAIL_IF(push_inst(compiler, VPOP | VD(fscratches) | ((sljit_uw)(fscratches - (SLJIT_FIRST_SAVED_FLOAT_REG - 1)) << 1))); + if (fsaveds > 0) + FAIL_IF(push_inst(compiler, VPOP | VD(SLJIT_FS0) | ((sljit_uw)fsaveds << 1))); + } + + local_size = GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 1) & 0x7; + } + + if (frame_size < 0) { + lr_dst = TMP_REG2; + frame_size = 0; + } else if (frame_size > 0) + lr_dst = 0; + + reg_list = 0; + if (lr_dst != 0) + reg_list |= (sljit_uw)1 << reg_map[lr_dst]; + + tmp = SLJIT_S0 - compiler->saveds; + for (i = SLJIT_S0; i > tmp; i--) + reg_list |= (sljit_uw)1 << reg_map[i]; for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) - pop |= 1 << reg_map[i]; + reg_list |= (sljit_uw)1 << reg_map[i]; + + if (lr_dst == 0 && (reg_list & (reg_list - 1)) == 0) { + /* The local_size does not include the saved registers. */ + local_size += SSIZE_OF(sw); + + if (reg_list != 0) + local_size += SSIZE_OF(sw); + + if (frame_size > local_size) + FAIL_IF(push_inst(compiler, SUB | RD(SLJIT_SP) | RN(SLJIT_SP) | (1 << 25) | (sljit_uw)(frame_size - local_size))); + else if (frame_size < local_size) + FAIL_IF(emit_add_sp(compiler, (sljit_uw)(local_size - frame_size))); + + if (reg_list == 0) + return SLJIT_SUCCESS; + + if (compiler->saveds > 0) { + SLJIT_ASSERT(reg_list == ((sljit_uw)1 << reg_map[SLJIT_S0])); + lr_dst = SLJIT_S0; + } else { + SLJIT_ASSERT(reg_list == ((sljit_uw)1 << reg_map[SLJIT_FIRST_SAVED_REG])); + lr_dst = SLJIT_FIRST_SAVED_REG; + } + + return push_inst(compiler, data_transfer_insts[WORD_SIZE | LOAD_DATA] | 0x800000 + | RN(SLJIT_SP) | RD(lr_dst) | (sljit_uw)(frame_size - 2 * SSIZE_OF(sw))); + } - return push_inst(compiler, pop); + if (local_size > 0) + FAIL_IF(emit_add_sp(compiler, (sljit_uw)local_size)); + + /* Pop saved and temporary registers + multiple registers: ldmia sp!, {...} + single register: ldr reg, [sp], #4 */ + if ((reg_list & (reg_list - 1)) == 0) { + SLJIT_ASSERT(lr_dst != 0); + SLJIT_ASSERT(reg_list == (sljit_uw)1 << reg_map[lr_dst]); + + return push_inst(compiler, 0xe49d0004 | RD(lr_dst)); + } + + FAIL_IF(push_inst(compiler, POP | reg_list)); + if (frame_size > 0) + return push_inst(compiler, SUB | RD(SLJIT_SP) | RN(SLJIT_SP) | (1 << 25) | ((sljit_uw)frame_size - sizeof(sljit_sw))); + return SLJIT_SUCCESS; +} + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); + + return emit_stack_frame_release(compiler, 0); } /* --------------------------------------------------------------------- */ /* Operators */ /* --------------------------------------------------------------------- */ -/* flags: */ - /* Arguments are swapped. */ -#define ARGS_SWAPPED 0x01 - /* Inverted immediate. */ -#define INV_IMM 0x02 - /* Source and destination is register. */ -#define MOVE_REG_CONV 0x04 - /* Unused return value. */ -#define UNUSED_RETURN 0x08 -/* SET_FLAGS must be (1 << 20) as it is also the value of S bit (can be used for optimization). */ -#define SET_FLAGS (1 << 20) -/* dst: reg - src1: reg - src2: reg or imm (if allowed) - SRC2_IMM must be (1 << 25) as it is also the value of I bit (can be used for optimization). */ -#define SRC2_IMM (1 << 25) - #define EMIT_SHIFT_INS_AND_RETURN(opcode) \ SLJIT_ASSERT(!(flags & INV_IMM) && !(src2 & SRC2_IMM)); \ if (compiler->shift_imm != 0x20) { \ @@ -1130,11 +1352,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp RD(dst) | (compiler->shift_imm << 7) | (opcode << 5) | RM(src2)); \ return push_inst(compiler, MOV | (flags & SET_FLAGS) | RD(dst) | RM(src2)); \ } \ - return push_inst(compiler, MOV | (flags & SET_FLAGS) | RD(dst) | \ - (reg_map[(flags & ARGS_SWAPPED) ? src1 : src2] << 8) | (opcode << 5) | 0x10 | RM((flags & ARGS_SWAPPED) ? src2 : src1)); + return push_inst(compiler, MOV | (flags & SET_FLAGS) | RD(dst) \ + | RM8((flags & ARGS_SWAPPED) ? src1 : src2) | (sljit_uw)(opcode << 5) \ + | 0x10 | RM((flags & ARGS_SWAPPED) ? src2 : src1)); static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, - sljit_s32 dst, sljit_s32 src1, sljit_s32 src2) + sljit_uw dst, sljit_uw src1, sljit_uw src2) { switch (GET_OPCODE(op)) { case SLJIT_MOV: @@ -1184,9 +1407,9 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl return SLJIT_SUCCESS; case SLJIT_NOT: - if (src2 & SRC2_IMM) { + if (src2 & SRC2_IMM) return push_inst(compiler, ((flags & INV_IMM) ? MOV : MVN) | (flags & SET_FLAGS) | RD(dst) | src2); - } + return push_inst(compiler, MVN | (flags & SET_FLAGS) | RD(dst) | RM(src2)); case SLJIT_CLZ: @@ -1197,9 +1420,8 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl case SLJIT_ADD: SLJIT_ASSERT(!(flags & INV_IMM)); - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; - if ((flags & (UNUSED_RETURN | SET_FLAGS)) == (UNUSED_RETURN | SET_FLAGS) && !(flags & ARGS_SWAPPED)) + if ((flags & (UNUSED_RETURN | ARGS_SWAPPED)) == UNUSED_RETURN) return push_inst(compiler, CMN | SET_FLAGS | RN(src1) | ((src2 & SRC2_IMM) ? src2 : RM(src2))); return push_inst(compiler, ADD | (flags & SET_FLAGS) | RD(dst) | RN(src1) | ((src2 & SRC2_IMM) ? src2 : RM(src2))); @@ -1209,10 +1431,10 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl case SLJIT_SUB: SLJIT_ASSERT(!(flags & INV_IMM)); - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; - if ((flags & (UNUSED_RETURN | SET_FLAGS)) == (UNUSED_RETURN | SET_FLAGS) && !(flags & ARGS_SWAPPED)) + if ((flags & (UNUSED_RETURN | ARGS_SWAPPED)) == UNUSED_RETURN) return push_inst(compiler, CMP | SET_FLAGS | RN(src1) | ((src2 & SRC2_IMM) ? src2 : RM(src2))); + return push_inst(compiler, (!(flags & ARGS_SWAPPED) ? SUB : RSB) | (flags & SET_FLAGS) | RD(dst) | RN(src1) | ((src2 & SRC2_IMM) ? src2 : RM(src2))); @@ -1227,14 +1449,16 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl compiler->status_flags_state = 0; if (!HAS_FLAGS(op)) - return push_inst(compiler, MUL | (reg_map[dst] << 16) | (reg_map[src2] << 8) | reg_map[src1]); + return push_inst(compiler, MUL | RN(dst) | RM8(src2) | RM(src1)); - FAIL_IF(push_inst(compiler, SMULL | (reg_map[TMP_REG1] << 16) | (reg_map[dst] << 12) | (reg_map[src2] << 8) | reg_map[src1])); + FAIL_IF(push_inst(compiler, SMULL | RN(TMP_REG1) | RD(dst) | RM8(src2) | RM(src1))); /* cmp TMP_REG1, dst asr #31. */ return push_inst(compiler, CMP | SET_FLAGS | RN(TMP_REG1) | RM(dst) | 0xfc0); case SLJIT_AND: + if ((flags & (UNUSED_RETURN | INV_IMM)) == UNUSED_RETURN) + return push_inst(compiler, TST | SET_FLAGS | RN(src1) | ((src2 & SRC2_IMM) ? src2 : RM(src2))); return push_inst(compiler, (!(flags & INV_IMM) ? AND : BIC) | (flags & SET_FLAGS) | RD(dst) | RN(src1) | ((src2 & SRC2_IMM) ? src2 : RM(src2))); @@ -1266,7 +1490,7 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl Returns with 0 if not possible. */ static sljit_uw get_imm(sljit_uw imm) { - sljit_s32 rol; + sljit_u32 rol; if (imm <= 0xff) return SRC2_IMM | imm; @@ -1307,7 +1531,7 @@ static sljit_s32 generate_int(struct sljit_compiler *compiler, sljit_s32 reg, sl sljit_uw mask; sljit_uw imm1; sljit_uw imm2; - sljit_s32 rol; + sljit_uw rol; /* Step1: Search a zero byte (8 continous zero bit). */ mask = 0xff000000; @@ -1418,7 +1642,7 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, sljit_uw tmp; #if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) - if (!(imm & ~0xffff)) + if (!(imm & ~(sljit_uw)0xffff)) return push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff)); #endif @@ -1455,13 +1679,13 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit SLJIT_ASSERT (arg & SLJIT_MEM); SLJIT_ASSERT((arg & REG_MASK) != tmp_reg); - if ((arg & REG_MASK) == SLJIT_UNUSED) { + if (!(arg & REG_MASK)) { if (is_type1_transfer) { - FAIL_IF(load_immediate(compiler, tmp_reg, argw & ~0xfff)); + FAIL_IF(load_immediate(compiler, tmp_reg, (sljit_uw)argw & ~(sljit_uw)0xfff)); argw &= 0xfff; } else { - FAIL_IF(load_immediate(compiler, tmp_reg, argw & ~0xff)); + FAIL_IF(load_immediate(compiler, tmp_reg, (sljit_uw)argw & ~(sljit_uw)0xff)); argw &= 0xff; } @@ -1475,20 +1699,20 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit argw &= 0x3; if (argw != 0 && !is_type1_transfer) { - FAIL_IF(push_inst(compiler, ADD | RD(tmp_reg) | RN(arg) | RM(offset_reg) | (argw << 7))); + FAIL_IF(push_inst(compiler, ADD | RD(tmp_reg) | RN(arg) | RM(offset_reg) | ((sljit_uw)argw << 7))); return push_inst(compiler, EMIT_DATA_TRANSFER(flags, 1, reg, tmp_reg, TYPE2_TRANSFER_IMM(0))); } /* Bit 25: RM is offset. */ return push_inst(compiler, EMIT_DATA_TRANSFER(flags, 1, reg, arg, - RM(offset_reg) | (is_type1_transfer ? (1 << 25) : 0) | (argw << 7))); + RM(offset_reg) | (is_type1_transfer ? (1 << 25) : 0) | ((sljit_uw)argw << 7))); } arg &= REG_MASK; if (is_type1_transfer) { if (argw > 0xfff) { - imm = get_imm(argw & ~0xfff); + imm = get_imm((sljit_uw)argw & ~(sljit_uw)0xfff); if (imm) { FAIL_IF(push_inst(compiler, ADD | RD(tmp_reg) | RN(arg) | imm)); argw = argw & 0xfff; @@ -1496,7 +1720,7 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit } } else if (argw < -0xfff) { - imm = get_imm(-argw & ~0xfff); + imm = get_imm((sljit_uw)-argw & ~(sljit_uw)0xfff); if (imm) { FAIL_IF(push_inst(compiler, SUB | RD(tmp_reg) | RN(arg) | imm)); argw = -(-argw & 0xfff); @@ -1512,7 +1736,7 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit } else { if (argw > 0xff) { - imm = get_imm(argw & ~0xff); + imm = get_imm((sljit_uw)argw & ~(sljit_uw)0xff); if (imm) { FAIL_IF(push_inst(compiler, ADD | RD(tmp_reg) | RN(arg) | imm)); argw = argw & 0xff; @@ -1520,7 +1744,7 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit } } else if (argw < -0xff) { - imm = get_imm(-argw & ~0xff); + imm = get_imm((sljit_uw)-argw & ~(sljit_uw)0xff); if (imm) { FAIL_IF(push_inst(compiler, SUB | RD(tmp_reg) | RN(arg) | imm)); argw = -(-argw & 0xff); @@ -1537,7 +1761,7 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit } } - FAIL_IF(load_immediate(compiler, tmp_reg, argw)); + FAIL_IF(load_immediate(compiler, tmp_reg, (sljit_uw)argw)); return push_inst(compiler, EMIT_DATA_TRANSFER(flags, 1, reg, arg, RM(tmp_reg) | (is_type1_transfer ? (1 << 25) : 0))); } @@ -1554,50 +1778,62 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 /* We prefers register and simple consts. */ sljit_s32 dst_reg; sljit_s32 src1_reg; - sljit_s32 src2_reg; + sljit_s32 src2_reg = 0; sljit_s32 flags = HAS_FLAGS(op) ? SET_FLAGS : 0; + sljit_s32 neg_op = 0; - /* Destination check. */ - if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) + if (dst == TMP_REG2) flags |= UNUSED_RETURN; SLJIT_ASSERT(!(inp_flags & ALLOW_INV_IMM) || (inp_flags & ALLOW_IMM)); - src2_reg = 0; + if (inp_flags & ALLOW_NEG_IMM) { + switch (GET_OPCODE(op)) { + case SLJIT_ADD: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; + neg_op = SLJIT_SUB; + break; + case SLJIT_ADDC: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; + neg_op = SLJIT_SUBC; + break; + case SLJIT_SUB: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; + neg_op = SLJIT_ADD; + break; + case SLJIT_SUBC: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; + neg_op = SLJIT_ADDC; + break; + } + } do { if (!(inp_flags & ALLOW_IMM)) break; if (src2 & SLJIT_IMM) { - src2_reg = get_imm(src2w); + src2_reg = (sljit_s32)get_imm((sljit_uw)src2w); if (src2_reg) break; if (inp_flags & ALLOW_INV_IMM) { - src2_reg = get_imm(~src2w); + src2_reg = (sljit_s32)get_imm(~(sljit_uw)src2w); if (src2_reg) { flags |= INV_IMM; break; } } - if (GET_OPCODE(op) == SLJIT_ADD) { - src2_reg = get_imm(-src2w); + if (neg_op != 0) { + src2_reg = (sljit_s32)get_imm((sljit_uw)-src2w); if (src2_reg) { - op = SLJIT_SUB | GET_ALL_FLAGS(op); - break; - } - } - if (GET_OPCODE(op) == SLJIT_SUB) { - src2_reg = get_imm(-src2w); - if (src2_reg) { - op = SLJIT_ADD | GET_ALL_FLAGS(op); + op = neg_op | GET_ALL_FLAGS(op); break; } } } if (src1 & SLJIT_IMM) { - src2_reg = get_imm(src1w); + src2_reg = (sljit_s32)get_imm((sljit_uw)src1w); if (src2_reg) { flags |= ARGS_SWAPPED; src1 = src2; @@ -1605,7 +1841,7 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 break; } if (inp_flags & ALLOW_INV_IMM) { - src2_reg = get_imm(~src1w); + src2_reg = (sljit_s32)get_imm(~(sljit_uw)src1w); if (src2_reg) { flags |= ARGS_SWAPPED | INV_IMM; src1 = src2; @@ -1613,13 +1849,13 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 break; } } - if (GET_OPCODE(op) == SLJIT_ADD) { - src2_reg = get_imm(-src1w); + if (neg_op >= SLJIT_SUB) { + /* Note: additive operation (commutative). */ + src2_reg = (sljit_s32)get_imm((sljit_uw)-src1w); if (src2_reg) { - /* Note: add is commutative operation. */ src1 = src2; src1w = src2w; - op = SLJIT_SUB | GET_ALL_FLAGS(op); + op = neg_op | GET_ALL_FLAGS(op); break; } } @@ -1634,12 +1870,12 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 src1_reg = TMP_REG1; } else { - FAIL_IF(load_immediate(compiler, TMP_REG1, src1w)); + FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)src1w)); src1_reg = TMP_REG1; } /* Destination. */ - dst_reg = SLOW_IS_REG(dst) ? dst : TMP_REG2; + dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG2; if (op <= SLJIT_MOV_P) { if (dst & SLJIT_MEM) { @@ -1663,10 +1899,10 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 else if (src2 & SLJIT_MEM) FAIL_IF(emit_op_mem(compiler, inp_flags | LOAD_DATA, src2_reg, src2, src2w, TMP_REG2)); else - FAIL_IF(load_immediate(compiler, src2_reg, src2w)); + FAIL_IF(load_immediate(compiler, src2_reg, (sljit_uw)src2w)); } - FAIL_IF(emit_single_op(compiler, op, flags, dst_reg, src1_reg, src2_reg)); + FAIL_IF(emit_single_op(compiler, op, flags, (sljit_uw)dst_reg, (sljit_uw)src1_reg, (sljit_uw)src2_reg)); if (!(dst & SLJIT_MEM)) return SLJIT_SUCCESS; @@ -1691,7 +1927,7 @@ extern int __aeabi_idivmod(int numerator, int denominator); SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) { - sljit_sw saved_reg_list[3]; + sljit_uw saved_reg_list[3]; sljit_sw saved_reg_count; CHECK_ERROR(); @@ -1708,10 +1944,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile case SLJIT_LMUL_UW: case SLJIT_LMUL_SW: return push_inst(compiler, (op == SLJIT_LMUL_UW ? UMULL : SMULL) - | (reg_map[SLJIT_R1] << 16) - | (reg_map[SLJIT_R0] << 12) - | (reg_map[SLJIT_R0] << 8) - | reg_map[SLJIT_R1]); + | RN(SLJIT_R1) | RD(SLJIT_R0) | RM8(SLJIT_R0) | RM(SLJIT_R1)); case SLJIT_DIVMOD_UW: case SLJIT_DIVMOD_SW: case SLJIT_DIV_UW: @@ -1742,7 +1975,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile #if defined(__GNUC__) FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, - ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); + ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_ADDR(__aeabi_uidivmod) : SLJIT_FUNC_ADDR(__aeabi_idivmod)))); #else #error "Software divmod functions are needed" #endif @@ -1756,7 +1989,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile SLJIT_ASSERT(saved_reg_list[1] < 8); FAIL_IF(push_inst(compiler, 0xe59d0004 | (saved_reg_list[1] << 12) /* ldr rX, [sp, #4] */)); } - return push_inst(compiler, 0xe49d0000 | (saved_reg_count >= 3 ? 16 : 8) + return push_inst(compiler, 0xe49d0000 | (sljit_uw)(saved_reg_count >= 3 ? 16 : 8) | (saved_reg_list[0] << 12) /* ldr rX, [sp], #8/16 */); } return SLJIT_SUCCESS; @@ -1781,6 +2014,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile case SLJIT_MOV: case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: case SLJIT_MOV_P: return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw); @@ -1799,13 +2033,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile case SLJIT_NOT: return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw); - case SLJIT_NEG: -#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ - || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - compiler->skip_checks = 1; -#endif - return sljit_emit_op2(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), dst, dstw, SLJIT_IMM, 0, src, srcw); - case SLJIT_CLZ: return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw); } @@ -1819,19 +2046,18 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile sljit_s32 src2, sljit_sw src2w) { CHECK_ERROR(); - CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) - return SLJIT_SUCCESS; - switch (GET_OPCODE(op)) { case SLJIT_ADD: case SLJIT_ADDC: case SLJIT_SUB: case SLJIT_SUBC: + return emit_op(compiler, op, ALLOW_IMM | ALLOW_NEG_IMM, dst, dstw, src1, src1w, src2, src2w); + case SLJIT_OR: case SLJIT_XOR: return emit_op(compiler, op, ALLOW_IMM, dst, dstw, src1, src1w, src2, src2w); @@ -1858,6 +2084,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile return SLJIT_SUCCESS; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + return sljit_emit_op2(compiler, op, TMP_REG2, 0, src1, src1w, src2, src2w); +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { @@ -1905,8 +2145,9 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { + SLJIT_UNUSED_ARG(size); CHECK_ERROR(); CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); @@ -1917,23 +2158,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *c /* Floating point operators */ /* --------------------------------------------------------------------- */ - #define FPU_LOAD (1 << 20) #define EMIT_FPU_DATA_TRANSFER(inst, add, base, freg, offs) \ - ((inst) | ((add) << 23) | (reg_map[base] << 16) | (freg_map[freg] << 12) | (offs)) -#define EMIT_FPU_OPERATION(opcode, mode, dst, src1, src2) \ - ((opcode) | (mode) | (freg_map[dst] << 12) | freg_map[src1] | (freg_map[src2] << 16)) + ((inst) | (sljit_uw)((add) << 23) | RN(base) | VD(freg) | (sljit_uw)(offs)) static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw) { sljit_uw imm; - sljit_sw inst = VSTR_F32 | (flags & (SLJIT_F32_OP | FPU_LOAD)); + sljit_uw inst = VSTR_F32 | (flags & (SLJIT_32 | FPU_LOAD)); SLJIT_ASSERT(arg & SLJIT_MEM); arg &= ~SLJIT_MEM; if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) { - FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG2) | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | ((argw & 0x3) << 7))); + FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG2) | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | (((sljit_uw)argw & 0x3) << 7))); arg = TMP_REG2; argw = 0; } @@ -1945,12 +2183,12 @@ static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, if (!(-argw & ~0x3fc)) return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, arg & REG_MASK, reg, (-argw) >> 2)); - imm = get_imm(argw & ~0x3fc); + imm = get_imm((sljit_uw)argw & ~(sljit_uw)0x3fc); if (imm) { FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG2) | RN(arg & REG_MASK) | imm)); return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG2, reg, (argw & 0x3fc) >> 2)); } - imm = get_imm(-argw & ~0x3fc); + imm = get_imm((sljit_uw)-argw & ~(sljit_uw)0x3fc); if (imm) { argw = -argw; FAIL_IF(push_inst(compiler, SUB | RD(TMP_REG2) | RN(arg & REG_MASK) | imm)); @@ -1959,11 +2197,11 @@ static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, } if (arg) { - FAIL_IF(load_immediate(compiler, TMP_REG2, argw)); + FAIL_IF(load_immediate(compiler, TMP_REG2, (sljit_uw)argw)); FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG2) | RN(arg & REG_MASK) | RM(TMP_REG2))); } else - FAIL_IF(load_immediate(compiler, TMP_REG2, argw)); + FAIL_IF(load_immediate(compiler, TMP_REG2, (sljit_uw)argw)); return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG2, reg, 0)); } @@ -1972,17 +2210,17 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_comp sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw) { - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; if (src & SLJIT_MEM) { - FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src, srcw)); + FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG1, src, srcw)); src = TMP_FREG1; } - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_S32_F32, op & SLJIT_F32_OP, TMP_FREG1, src, 0))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_S32_F32, op & SLJIT_32, TMP_FREG1, src, 0))); if (FAST_IS_REG(dst)) - return push_inst(compiler, VMOV | (1 << 20) | RD(dst) | (freg_map[TMP_FREG1] << 16)); + return push_inst(compiler, VMOV | (1 << 20) | RD(dst) | VN(TMP_FREG1)); /* Store the integer value from a VFP register. */ return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); @@ -1994,23 +2232,23 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp { sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; if (FAST_IS_REG(src)) - FAIL_IF(push_inst(compiler, VMOV | RD(src) | (freg_map[TMP_FREG1] << 16))); + FAIL_IF(push_inst(compiler, VMOV | RD(src) | VN(TMP_FREG1))); else if (src & SLJIT_MEM) { /* Load the integer value into a VFP register. */ FAIL_IF(emit_fop_mem(compiler, FPU_LOAD, TMP_FREG1, src, srcw)); } else { - FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); - FAIL_IF(push_inst(compiler, VMOV | RD(TMP_REG1) | (freg_map[TMP_FREG1] << 16))); + FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)srcw)); + FAIL_IF(push_inst(compiler, VMOV | RD(TMP_REG1) | VN(TMP_FREG1))); } - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F32_S32, op & SLJIT_F32_OP, dst_r, TMP_FREG1, 0))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F32_S32, op & SLJIT_32, dst_r, TMP_FREG1, 0))); if (dst & SLJIT_MEM) - return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw); + return emit_fop_mem(compiler, (op & SLJIT_32), TMP_FREG1, dst, dstw); return SLJIT_SUCCESS; } @@ -2018,19 +2256,19 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compile sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; if (src1 & SLJIT_MEM) { - FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w)); + FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG1, src1, src1w)); src1 = TMP_FREG1; } if (src2 & SLJIT_MEM) { - FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w)); + FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG2, src2, src2w)); src2 = TMP_FREG2; } - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCMP_F32, op & SLJIT_F32_OP, src1, src2, 0))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCMP_F32, op & SLJIT_32, src1, src2, 0))); return push_inst(compiler, VMRS); } @@ -2042,16 +2280,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil CHECK_ERROR(); - SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100), float_transfer_bit_error); + SLJIT_COMPILE_ASSERT((SLJIT_32 == 0x100), float_transfer_bit_error); SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; if (GET_OPCODE(op) != SLJIT_CONV_F64_FROM_F32) - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; if (src & SLJIT_MEM) { - FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, dst_r, src, srcw)); + FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, dst_r, src, srcw)); src = dst_r; } @@ -2059,25 +2297,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil case SLJIT_MOV_F64: if (src != dst_r) { if (dst_r != TMP_FREG1) - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, op & SLJIT_F32_OP, dst_r, src, 0))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, op & SLJIT_32, dst_r, src, 0))); else dst_r = src; } break; case SLJIT_NEG_F64: - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VNEG_F32, op & SLJIT_F32_OP, dst_r, src, 0))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VNEG_F32, op & SLJIT_32, dst_r, src, 0))); break; case SLJIT_ABS_F64: - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VABS_F32, op & SLJIT_F32_OP, dst_r, src, 0))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VABS_F32, op & SLJIT_32, dst_r, src, 0))); break; case SLJIT_CONV_F64_FROM_F32: - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F64_F32, op & SLJIT_F32_OP, dst_r, src, 0))); - op ^= SLJIT_F32_OP; + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F64_F32, op & SLJIT_32, dst_r, src, 0))); + op ^= SLJIT_32; break; } if (dst & SLJIT_MEM) - return emit_fop_mem(compiler, (op & SLJIT_F32_OP), dst_r, dst, dstw); + return emit_fop_mem(compiler, (op & SLJIT_32), dst_r, dst, dstw); return SLJIT_SUCCESS; } @@ -2094,40 +2332,40 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compil ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; if (src2 & SLJIT_MEM) { - FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w)); + FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG2, src2, src2w)); src2 = TMP_FREG2; } if (src1 & SLJIT_MEM) { - FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w)); + FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG1, src1, src1w)); src1 = TMP_FREG1; } switch (GET_OPCODE(op)) { case SLJIT_ADD_F64: - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VADD_F32, op & SLJIT_F32_OP, dst_r, src2, src1))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VADD_F32, op & SLJIT_32, dst_r, src2, src1))); break; case SLJIT_SUB_F64: - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VSUB_F32, op & SLJIT_F32_OP, dst_r, src2, src1))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VSUB_F32, op & SLJIT_32, dst_r, src2, src1))); break; case SLJIT_MUL_F64: - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMUL_F32, op & SLJIT_F32_OP, dst_r, src2, src1))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMUL_F32, op & SLJIT_32, dst_r, src2, src1))); break; case SLJIT_DIV_F64: - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VDIV_F32, op & SLJIT_F32_OP, dst_r, src2, src1))); + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VDIV_F32, op & SLJIT_32, dst_r, src2, src1))); break; } if (dst_r == TMP_FREG1) - FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw)); + FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_32), TMP_FREG1, dst, dstw)); return SLJIT_SUCCESS; } @@ -2169,10 +2407,20 @@ static sljit_uw get_cc(struct sljit_compiler *compiler, sljit_s32 type) case SLJIT_NOT_EQUAL_F64: return 0x10000000; + case SLJIT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD) + return 0x20000000; + /* fallthrough */ + case SLJIT_LESS: case SLJIT_LESS_F64: return 0x30000000; + case SLJIT_NOT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD) + return 0x30000000; + /* fallthrough */ + case SLJIT_GREATER_EQUAL: case SLJIT_GREATER_EQUAL_F64: return 0x20000000; @@ -2198,15 +2446,17 @@ static sljit_uw get_cc(struct sljit_compiler *compiler, sljit_s32 type) return 0xd0000000; case SLJIT_OVERFLOW: - if (!(compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB)) + if (!(compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB))) return 0x10000000; + /* fallthrough */ case SLJIT_UNORDERED_F64: return 0x60000000; case SLJIT_NOT_OVERFLOW: - if (!(compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB)) + if (!(compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB))) return 0x00000000; + /* fallthrough */ case SLJIT_ORDERED_F64: return 0x70000000; @@ -2277,111 +2527,124 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile #ifdef __SOFTFP__ -static sljit_s32 softfloat_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src) +static sljit_s32 softfloat_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src, sljit_u32 *extra_space) { - sljit_s32 stack_offset = 0; - sljit_s32 arg_count = 0; - sljit_s32 word_arg_offset = 0; - sljit_s32 float_arg_count = 0; + sljit_u32 is_tail_call = *extra_space & SLJIT_CALL_RETURN; + sljit_u32 offset = 0; + sljit_u32 word_arg_offset = 0; + sljit_u32 src_offset = 4 * sizeof(sljit_sw); + sljit_u32 float_arg_count = 0; sljit_s32 types = 0; - sljit_s32 src_offset = 4 * sizeof(sljit_sw); sljit_u8 offsets[4]; + sljit_u8 *offset_ptr = offsets; if (src && FAST_IS_REG(*src)) - src_offset = reg_map[*src] * sizeof(sljit_sw); + src_offset = (sljit_uw)reg_map[*src] * sizeof(sljit_sw); - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - types = (types << SLJIT_DEF_SHIFT) | (arg_types & SLJIT_DEF_MASK); + types = (types << SLJIT_ARG_SHIFT) | (arg_types & SLJIT_ARG_MASK); - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - offsets[arg_count] = (sljit_u8)stack_offset; - stack_offset += sizeof(sljit_f32); - arg_count++; + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (offset & 0x7) + offset += sizeof(sljit_sw); + *offset_ptr++ = (sljit_u8)offset; + offset += sizeof(sljit_f64); float_arg_count++; break; - case SLJIT_ARG_TYPE_F64: - if (stack_offset & 0x7) - stack_offset += sizeof(sljit_sw); - offsets[arg_count] = (sljit_u8)stack_offset; - stack_offset += sizeof(sljit_f64); - arg_count++; + case SLJIT_ARG_TYPE_F32: + *offset_ptr++ = (sljit_u8)offset; + offset += sizeof(sljit_f32); float_arg_count++; break; default: - offsets[arg_count] = (sljit_u8)stack_offset; - stack_offset += sizeof(sljit_sw); - arg_count++; + *offset_ptr++ = (sljit_u8)offset; + offset += sizeof(sljit_sw); word_arg_offset += sizeof(sljit_sw); break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } - if (stack_offset > 16) - FAIL_IF(push_inst(compiler, SUB | RD(SLJIT_SP) | RN(SLJIT_SP) | SRC2_IMM | (((stack_offset - 16) + 0x7) & ~0x7))); + if (offset > 4 * sizeof(sljit_sw) && (!is_tail_call || offset > compiler->args_size)) { + /* Keep lr register on the stack. */ + if (is_tail_call) + offset += sizeof(sljit_sw); + + offset = ((offset - 4 * sizeof(sljit_sw)) + 0x7) & ~(sljit_uw)0x7; + + *extra_space = offset; + + if (is_tail_call) + FAIL_IF(emit_stack_frame_release(compiler, (sljit_s32)offset)); + else + FAIL_IF(push_inst(compiler, SUB | RD(SLJIT_SP) | RN(SLJIT_SP) | SRC2_IMM | offset)); + } else { + if (is_tail_call) + FAIL_IF(emit_stack_frame_release(compiler, -1)); + *extra_space = 0; + } /* Process arguments in reversed direction. */ while (types) { - switch (types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - arg_count--; + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: float_arg_count--; - stack_offset = offsets[arg_count]; + offset = *(--offset_ptr); + + SLJIT_ASSERT((offset & 0x7) == 0); - if (stack_offset < 16) { - if (src_offset == stack_offset) { + if (offset < 4 * sizeof(sljit_sw)) { + if (src_offset == offset || src_offset == offset + sizeof(sljit_sw)) { FAIL_IF(push_inst(compiler, MOV | RD(TMP_REG1) | (src_offset >> 2))); *src = TMP_REG1; } - FAIL_IF(push_inst(compiler, VMOV | 0x100000 | (float_arg_count << 16) | (stack_offset << 10))); + FAIL_IF(push_inst(compiler, VMOV2 | 0x100000 | (offset << 10) | ((offset + sizeof(sljit_sw)) << 14) | float_arg_count)); } else - FAIL_IF(push_inst(compiler, VSTR_F32 | 0x800000 | RN(SLJIT_SP) | (float_arg_count << 12) | ((stack_offset - 16) >> 2))); + FAIL_IF(push_inst(compiler, VSTR_F32 | 0x800100 | RN(SLJIT_SP) + | (float_arg_count << 12) | ((offset - 4 * sizeof(sljit_sw)) >> 2))); break; - case SLJIT_ARG_TYPE_F64: - arg_count--; + case SLJIT_ARG_TYPE_F32: float_arg_count--; - stack_offset = offsets[arg_count]; - - SLJIT_ASSERT((stack_offset & 0x7) == 0); + offset = *(--offset_ptr); - if (stack_offset < 16) { - if (src_offset == stack_offset || src_offset == stack_offset + sizeof(sljit_sw)) { + if (offset < 4 * sizeof(sljit_sw)) { + if (src_offset == offset) { FAIL_IF(push_inst(compiler, MOV | RD(TMP_REG1) | (src_offset >> 2))); *src = TMP_REG1; } - FAIL_IF(push_inst(compiler, VMOV2 | 0x100000 | (stack_offset << 10) | ((stack_offset + sizeof(sljit_sw)) << 14) | float_arg_count)); + FAIL_IF(push_inst(compiler, VMOV | 0x100000 | (float_arg_count << 16) | (offset << 10))); } else - FAIL_IF(push_inst(compiler, VSTR_F32 | 0x800100 | RN(SLJIT_SP) | (float_arg_count << 12) | ((stack_offset - 16) >> 2))); + FAIL_IF(push_inst(compiler, VSTR_F32 | 0x800000 | RN(SLJIT_SP) + | (float_arg_count << 12) | ((offset - 4 * sizeof(sljit_sw)) >> 2))); break; default: - arg_count--; word_arg_offset -= sizeof(sljit_sw); - stack_offset = offsets[arg_count]; + offset = *(--offset_ptr); - SLJIT_ASSERT(stack_offset >= word_arg_offset); + SLJIT_ASSERT(offset >= word_arg_offset); - if (stack_offset != word_arg_offset) { - if (stack_offset < 16) { - if (src_offset == stack_offset) { + if (offset != word_arg_offset) { + if (offset < 4 * sizeof(sljit_sw)) { + if (src_offset == offset) { FAIL_IF(push_inst(compiler, MOV | RD(TMP_REG1) | (src_offset >> 2))); *src = TMP_REG1; } else if (src_offset == word_arg_offset) { - *src = 1 + (stack_offset >> 2); - src_offset = stack_offset; + *src = (sljit_s32)(SLJIT_R0 + (offset >> 2)); + src_offset = offset; } - FAIL_IF(push_inst(compiler, MOV | (stack_offset << 10) | (word_arg_offset >> 2))); + FAIL_IF(push_inst(compiler, MOV | (offset << 10) | (word_arg_offset >> 2))); } else - FAIL_IF(push_inst(compiler, data_transfer_insts[WORD_SIZE] | 0x800000 | RN(SLJIT_SP) | (word_arg_offset << 10) | (stack_offset - 16))); + FAIL_IF(push_inst(compiler, data_transfer_insts[WORD_SIZE] | 0x800000 | RN(SLJIT_SP) | (word_arg_offset << 10) | (offset - 4 * sizeof(sljit_sw)))); } break; } - types >>= SLJIT_DEF_SHIFT; + types >>= SLJIT_ARG_SHIFT; } return SLJIT_SUCCESS; @@ -2389,83 +2652,51 @@ static sljit_s32 softfloat_call_with_args(struct sljit_compiler *compiler, sljit static sljit_s32 softfloat_post_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types) { - sljit_s32 stack_size = 0; - - if ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F32) - FAIL_IF(push_inst(compiler, VMOV | (0 << 16) | (0 << 12))); - if ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F64) + if ((arg_types & SLJIT_ARG_MASK) == SLJIT_ARG_TYPE_F64) FAIL_IF(push_inst(compiler, VMOV2 | (1 << 16) | (0 << 12) | 0)); + if ((arg_types & SLJIT_ARG_MASK) == SLJIT_ARG_TYPE_F32) + FAIL_IF(push_inst(compiler, VMOV | (0 << 16) | (0 << 12))); - arg_types >>= SLJIT_DEF_SHIFT; - - while (arg_types) { - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - stack_size += sizeof(sljit_f32); - break; - case SLJIT_ARG_TYPE_F64: - if (stack_size & 0x7) - stack_size += sizeof(sljit_sw); - stack_size += sizeof(sljit_f64); - break; - default: - stack_size += sizeof(sljit_sw); - break; - } - - arg_types >>= SLJIT_DEF_SHIFT; - } - - if (stack_size <= 16) - return SLJIT_SUCCESS; - - return push_inst(compiler, ADD | RD(SLJIT_SP) | RN(SLJIT_SP) | SRC2_IMM | (((stack_size - 16) + 0x7) & ~0x7)); + return SLJIT_SUCCESS; } #else /* !__SOFTFP__ */ static sljit_s32 hardfloat_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types) { - sljit_u32 remap = 0; - sljit_u32 offset = 0; - sljit_u32 new_offset, mask; + sljit_u32 offset = SLJIT_FR0; + sljit_u32 new_offset = SLJIT_FR0; + sljit_u32 f32_offset = 0; /* Remove return value. */ - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - if ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F32) { - new_offset = 0; - mask = 1; - - while (remap & mask) { - new_offset++; - mask <<= 1; - } - remap |= mask; - + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: if (offset != new_offset) FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, - 0, (new_offset >> 1) + 1, (offset >> 1) + 1, 0) | ((new_offset & 0x1) ? 0x400000 : 0))); + SLJIT_32, new_offset, offset, 0))); - offset += 2; - } - else if ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F64) { - new_offset = 0; - mask = 3; - - while (remap & mask) { - new_offset += 2; - mask <<= 2; + new_offset++; + offset++; + break; + case SLJIT_ARG_TYPE_F32: + if (f32_offset != 0) { + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, + 0x400000, f32_offset, offset, 0))); + f32_offset = 0; + } else { + if (offset != new_offset) + FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, + 0, new_offset, offset, 0))); + f32_offset = new_offset; + new_offset++; } - remap |= mask; - - if (offset != new_offset) - FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, SLJIT_F32_OP, (new_offset >> 1) + 1, (offset >> 1) + 1, 0))); - - offset += 2; + offset++; + break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } return SLJIT_SUCCESS; @@ -2480,13 +2711,18 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile { #ifdef __SOFTFP__ struct sljit_jump *jump; + sljit_u32 extra_space = (sljit_u32)type; #endif CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_call(compiler, type, arg_types)); #ifdef __SOFTFP__ - PTR_FAIL_IF(softfloat_call_with_args(compiler, arg_types, NULL)); + PTR_FAIL_IF(softfloat_call_with_args(compiler, arg_types, NULL, &extra_space)); + SLJIT_ASSERT((extra_space & 0x7) == 0); + + if ((type & SLJIT_CALL_RETURN) && extra_space == 0) + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -2496,9 +2732,28 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile jump = sljit_emit_jump(compiler, type); PTR_FAIL_IF(jump == NULL); + if (extra_space > 0) { + if (type & SLJIT_CALL_RETURN) + PTR_FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, + TMP_REG2, SLJIT_SP, extra_space - sizeof(sljit_sw)))); + + PTR_FAIL_IF(push_inst(compiler, ADD | RD(SLJIT_SP) | RN(SLJIT_SP) | SRC2_IMM | extra_space)); + + if (type & SLJIT_CALL_RETURN) { + PTR_FAIL_IF(push_inst(compiler, BX | RM(TMP_REG2))); + return jump; + } + } + + SLJIT_ASSERT(!(type & SLJIT_CALL_RETURN)); PTR_FAIL_IF(softfloat_post_call_with_args(compiler, arg_types)); return jump; #else /* !__SOFTFP__ */ + if (type & SLJIT_CALL_RETURN) { + PTR_FAIL_IF(emit_stack_frame_release(compiler, -1)); + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); + } + PTR_FAIL_IF(hardfloat_call_with_args(compiler, arg_types)); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ @@ -2535,7 +2790,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); FAIL_IF(!jump); set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); - jump->u.target = srcw; + jump->u.target = (sljit_uw)srcw; #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) if (type >= SLJIT_FAST_CALL) @@ -2555,16 +2810,29 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi sljit_s32 arg_types, sljit_s32 src, sljit_sw srcw) { +#ifdef __SOFTFP__ + sljit_u32 extra_space = (sljit_u32)type; +#endif + CHECK_ERROR(); CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); -#ifdef __SOFTFP__ if (src & SLJIT_MEM) { FAIL_IF(emit_op_mem(compiler, WORD_SIZE | LOAD_DATA, TMP_REG1, src, srcw, TMP_REG1)); src = TMP_REG1; } - FAIL_IF(softfloat_call_with_args(compiler, arg_types, &src)); + if ((type & SLJIT_CALL_RETURN) && (src >= SLJIT_FIRST_SAVED_REG && src <= SLJIT_S0)) { + FAIL_IF(push_inst(compiler, MOV | RD(TMP_REG1) | RM(src))); + src = TMP_REG1; + } + +#ifdef __SOFTFP__ + FAIL_IF(softfloat_call_with_args(compiler, arg_types, &src, &extra_space)); + SLJIT_ASSERT((extra_space & 0x7) == 0); + + if ((type & SLJIT_CALL_RETURN) && extra_space == 0) + type = SLJIT_JUMP; #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -2573,8 +2841,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi FAIL_IF(sljit_emit_ijump(compiler, type, src, srcw)); + if (extra_space > 0) { + if (type & SLJIT_CALL_RETURN) + FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, + TMP_REG2, SLJIT_SP, extra_space - sizeof(sljit_sw)))); + + FAIL_IF(push_inst(compiler, ADD | RD(SLJIT_SP) | RN(SLJIT_SP) | SRC2_IMM | extra_space)); + + if (type & SLJIT_CALL_RETURN) + return push_inst(compiler, BX | RM(TMP_REG2)); + } + + SLJIT_ASSERT(!(type & SLJIT_CALL_RETURN)); return softfloat_post_call_with_args(compiler, arg_types); #else /* !__SOFTFP__ */ + if (type & SLJIT_CALL_RETURN) { + FAIL_IF(emit_stack_frame_release(compiler, -1)); + type = SLJIT_JUMP; + } + FAIL_IF(hardfloat_call_with_args(compiler, arg_types)); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ @@ -2636,27 +2921,27 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil CHECK_ERROR(); CHECK(check_sljit_emit_cmov(compiler, type, dst_reg, src, srcw)); - dst_reg &= ~SLJIT_I32_OP; + dst_reg &= ~SLJIT_32; cc = get_cc(compiler, type & 0xff); if (SLJIT_UNLIKELY(src & SLJIT_IMM)) { - tmp = get_imm(srcw); + tmp = get_imm((sljit_uw)srcw); if (tmp) return push_inst(compiler, ((MOV | RD(dst_reg) | tmp) & ~COND_MASK) | cc); - tmp = get_imm(~srcw); + tmp = get_imm(~(sljit_uw)srcw); if (tmp) return push_inst(compiler, ((MVN | RD(dst_reg) | tmp) & ~COND_MASK) | cc); #if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) - tmp = (sljit_uw) srcw; + tmp = (sljit_uw)srcw; FAIL_IF(push_inst(compiler, (MOVW & ~COND_MASK) | cc | RD(dst_reg) | ((tmp << 4) & 0xf0000) | (tmp & 0xfff))); if (tmp <= 0xffff) return SLJIT_SUCCESS; return push_inst(compiler, (MOVT & ~COND_MASK) | cc | RD(dst_reg) | ((tmp >> 12) & 0xf0000) | ((tmp >> 16) & 0xfff)); #else - FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); + FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)srcw)); src = TMP_REG1; #endif } @@ -2680,6 +2965,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile case SLJIT_MOV: case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: case SLJIT_MOV_P: flags = WORD_SIZE; break; @@ -2731,7 +3017,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile if (SLJIT_UNLIKELY(mem & OFFS_REG_MASK)) { memw &= 0x3; - inst = EMIT_DATA_TRANSFER(flags, 1, reg, mem & REG_MASK, RM(OFFS_REG(mem)) | (memw << 7)); + inst = EMIT_DATA_TRANSFER(flags, 1, reg, mem & REG_MASK, RM(OFFS_REG(mem)) | ((sljit_uw)memw << 7)); if (is_type1_transfer) inst |= (1 << 25); @@ -2757,7 +3043,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile else memw = -memw; - return push_inst(compiler, inst | memw); + return push_inst(compiler, inst | (sljit_uw)memw); } if (memw >= 0) @@ -2765,7 +3051,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile else memw = -memw; - return push_inst(compiler, inst | TYPE2_TRANSFER_IMM(memw)); + return push_inst(compiler, inst | TYPE2_TRANSFER_IMM((sljit_uw)memw)); } SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value) @@ -2777,10 +3063,11 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); ADJUST_LOCAL_OFFSET(dst, dstw); - dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG2; + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) - PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, dst_r, TMP_PC, 0), init_value)); + PTR_FAIL_IF(push_inst_with_unique_literal(compiler, + EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, dst_r, TMP_PC, 0), (sljit_uw)init_value)); compiler->patches++; #else PTR_FAIL_IF(emit_imm(compiler, dst_r, init_value)); @@ -2804,7 +3091,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct slj CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); ADJUST_LOCAL_OFFSET(dst, dstw); - dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG2; + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, dst_r, TMP_PC, 0), 0)); @@ -2829,5 +3116,5 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - inline_set_const(addr, executable_offset, new_constant, 1); + inline_set_const(addr, executable_offset, (sljit_uw)new_constant, 1); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c b/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c index 3f0f5fcc30..96453b4abe 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c @@ -48,19 +48,20 @@ static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 8] = { }; static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { - 0, 0, 1, 2, 3, 4, 5, 6, 7 + 0, 0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 15, 14, 13, 12, 11, 10, 9, 8, 30, 31 }; -#define W_OP (1u << 31) -#define RD(rd) (reg_map[rd]) -#define RT(rt) (reg_map[rt]) -#define RN(rn) (reg_map[rn] << 5) -#define RT2(rt2) (reg_map[rt2] << 10) -#define RM(rm) (reg_map[rm] << 16) -#define VD(vd) (freg_map[vd]) -#define VT(vt) (freg_map[vt]) -#define VN(vn) (freg_map[vn] << 5) -#define VM(vm) (freg_map[vm] << 16) +#define W_OP ((sljit_ins)1 << 31) +#define RD(rd) ((sljit_ins)reg_map[rd]) +#define RT(rt) ((sljit_ins)reg_map[rt]) +#define RN(rn) ((sljit_ins)reg_map[rn] << 5) +#define RT2(rt2) ((sljit_ins)reg_map[rt2] << 10) +#define RM(rm) ((sljit_ins)reg_map[rm] << 16) +#define VD(vd) ((sljit_ins)freg_map[vd]) +#define VT(vt) ((sljit_ins)freg_map[vt]) +#define VT2(vt) ((sljit_ins)freg_map[vt] << 10) +#define VN(vn) ((sljit_ins)freg_map[vn] << 5) +#define VM(vm) ((sljit_ins)freg_map[vm] << 16) /* --------------------------------------------------------------------- */ /* Instrucion forms */ @@ -96,8 +97,10 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define FNEG 0x1e614000 #define FSUB 0x1e603800 #define LDRI 0xf9400000 +#define LDRI_F64 0xfd400000 #define LDP 0xa9400000 -#define LDP_PRE 0xa9c00000 +#define LDP_F64 0x6d400000 +#define LDP_POST 0xa8c00000 #define LDR_PRE 0xf8400c00 #define LSLV 0x9ac02000 #define LSRV 0x9ac02400 @@ -117,10 +120,12 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define SMADDL 0x9b200000 #define SMULH 0x9b403c00 #define STP 0xa9000000 +#define STP_F64 0x6d000000 #define STP_PRE 0xa9800000 #define STRB 0x38206800 #define STRBI 0x39000000 #define STRI 0xf9000000 +#define STRI_F64 0xfd000000 #define STR_FI 0x3d000000 #define STR_FR 0x3c206800 #define STUR_FI 0x3c000000 @@ -145,10 +150,10 @@ static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins) static SLJIT_INLINE sljit_s32 emit_imm64_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_uw imm) { - FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); - FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 16) & 0xffff) << 5) | (1 << 21))); - FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 32) & 0xffff) << 5) | (2 << 21))); - return push_inst(compiler, MOVK | RD(dst) | ((imm >> 48) << 5) | (3 << 21)); + FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((sljit_ins)(imm & 0xffff) << 5))); + FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)(imm >> 16) & 0xffff) << 5) | (1 << 21))); + FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)(imm >> 32) & 0xffff) << 5) | (2 << 21))); + return push_inst(compiler, MOVK | RD(dst) | ((sljit_ins)(imm >> 48) << 5) | (3 << 21)); } static SLJIT_INLINE sljit_sw detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code, sljit_sw executable_offset) @@ -171,14 +176,14 @@ static SLJIT_INLINE sljit_sw detect_jump_type(struct sljit_jump *jump, sljit_ins diff = (sljit_sw)target_addr - (sljit_sw)(code_ptr + 4) - executable_offset; if (jump->flags & IS_COND) { - diff += sizeof(sljit_ins); + diff += SSIZE_OF(ins); if (diff <= 0xfffff && diff >= -0x100000) { code_ptr[-5] ^= (jump->flags & IS_CBZ) ? (0x1 << 24) : 0x1; jump->addr -= sizeof(sljit_ins); jump->flags |= PATCH_COND; return 5; } - diff -= sizeof(sljit_ins); + diff -= SSIZE_OF(ins); } if (diff <= 0x7ffffff && diff >= -0x8000000) { @@ -231,8 +236,8 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_uw word_count; sljit_uw next_addr; sljit_sw executable_offset; - sljit_uw addr; - sljit_s32 dst; + sljit_sw addr; + sljit_u32 dst; struct sljit_label *label; struct sljit_jump *jump; @@ -271,7 +276,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil /* These structures are ordered by their address. */ if (label && label->size == word_count) { label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } if (jump && jump->addr == word_count) { @@ -300,7 +305,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == word_count) { label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } @@ -313,58 +318,58 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = compiler->jumps; while (jump) { do { - addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; + addr = (sljit_sw)((jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target); buf_ptr = (sljit_ins *)jump->addr; if (jump->flags & PATCH_B) { - addr = (sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2; - SLJIT_ASSERT((sljit_sw)addr <= 0x1ffffff && (sljit_sw)addr >= -0x2000000); - buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (addr & 0x3ffffff); + addr = (addr - (sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2; + SLJIT_ASSERT(addr <= 0x1ffffff && addr >= -0x2000000); + buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (sljit_ins)(addr & 0x3ffffff); if (jump->flags & IS_COND) buf_ptr[-1] -= (4 << 5); break; } if (jump->flags & PATCH_COND) { - addr = (sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2; - SLJIT_ASSERT((sljit_sw)addr <= 0x3ffff && (sljit_sw)addr >= -0x40000); - buf_ptr[0] = (buf_ptr[0] & ~0xffffe0) | ((addr & 0x7ffff) << 5); + addr = (addr - (sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2; + SLJIT_ASSERT(addr <= 0x3ffff && addr >= -0x40000); + buf_ptr[0] = (buf_ptr[0] & ~(sljit_ins)0xffffe0) | (sljit_ins)((addr & 0x7ffff) << 5); break; } - SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || addr <= 0xffffffffl); - SLJIT_ASSERT((jump->flags & PATCH_ABS64) || addr <= 0xffffffffffffl); + SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || (sljit_uw)addr <= (sljit_uw)0xffffffff); + SLJIT_ASSERT((jump->flags & PATCH_ABS64) || (sljit_uw)addr <= (sljit_uw)0xffffffffffff); dst = buf_ptr[0] & 0x1f; - buf_ptr[0] = MOVZ | dst | ((addr & 0xffff) << 5); - buf_ptr[1] = MOVK | dst | (((addr >> 16) & 0xffff) << 5) | (1 << 21); + buf_ptr[0] = MOVZ | dst | (((sljit_ins)addr & 0xffff) << 5); + buf_ptr[1] = MOVK | dst | (((sljit_ins)(addr >> 16) & 0xffff) << 5) | (1 << 21); if (jump->flags & (PATCH_ABS48 | PATCH_ABS64)) - buf_ptr[2] = MOVK | dst | (((addr >> 32) & 0xffff) << 5) | (2 << 21); + buf_ptr[2] = MOVK | dst | (((sljit_ins)(addr >> 32) & 0xffff) << 5) | (2 << 21); if (jump->flags & PATCH_ABS64) - buf_ptr[3] = MOVK | dst | (((addr >> 48) & 0xffff) << 5) | (3 << 21); + buf_ptr[3] = MOVK | dst | ((sljit_ins)(addr >> 48) << 5) | (3 << 21); } while (0); jump = jump->next; } put_label = compiler->put_labels; while (put_label) { - addr = put_label->label->addr; - buf_ptr = (sljit_ins *)put_label->addr; + addr = (sljit_sw)put_label->label->addr; + buf_ptr = (sljit_ins*)put_label->addr; - buf_ptr[0] |= (addr & 0xffff) << 5; - buf_ptr[1] |= ((addr >> 16) & 0xffff) << 5; + buf_ptr[0] |= ((sljit_ins)addr & 0xffff) << 5; + buf_ptr[1] |= ((sljit_ins)(addr >> 16) & 0xffff) << 5; if (put_label->flags >= 1) - buf_ptr[2] |= ((addr >> 32) & 0xffff) << 5; + buf_ptr[2] |= ((sljit_ins)(addr >> 32) & 0xffff) << 5; if (put_label->flags >= 2) - buf_ptr[3] |= ((addr >> 48) & 0xffff) << 5; + buf_ptr[3] |= (sljit_ins)(addr >> 48) << 5; put_label = put_label->next; } compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; - compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); + compiler->executable_size = (sljit_uw)(code_ptr - code) * sizeof(sljit_ins); code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); @@ -426,11 +431,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) value >>= 1; \ } -#define LOGICAL_IMM_CHECK 0x100 +#define LOGICAL_IMM_CHECK (sljit_ins)0x100 -static sljit_ins logical_imm(sljit_sw imm, sljit_s32 len) +static sljit_ins logical_imm(sljit_sw imm, sljit_u32 len) { - sljit_s32 negated, ones, right; + sljit_s32 negated; + sljit_u32 ones, right; sljit_uw mask, uimm; sljit_ins ins; @@ -497,30 +503,30 @@ static sljit_ins logical_imm(sljit_sw imm, sljit_s32 len) static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw simm) { sljit_uw imm = (sljit_uw)simm; - sljit_s32 i, zeros, ones, first; + sljit_u32 i, zeros, ones, first; sljit_ins bitmask; /* Handling simple immediates first. */ if (imm <= 0xffff) - return push_inst(compiler, MOVZ | RD(dst) | (imm << 5)); + return push_inst(compiler, MOVZ | RD(dst) | ((sljit_ins)imm << 5)); if (simm < 0 && simm >= -0x10000) - return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5)); + return push_inst(compiler, MOVN | RD(dst) | (((sljit_ins)~imm & 0xffff) << 5)); if (imm <= 0xffffffffl) { if ((imm & 0xffff) == 0) - return push_inst(compiler, MOVZ | RD(dst) | ((imm >> 16) << 5) | (1 << 21)); + return push_inst(compiler, MOVZ | RD(dst) | ((sljit_ins)(imm >> 16) << 5) | (1 << 21)); if ((imm & 0xffff0000l) == 0xffff0000) - return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff) << 5)); + return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | (((sljit_ins)~imm & 0xffff) << 5)); if ((imm & 0xffff) == 0xffff) - return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); + return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | (((sljit_ins)~imm & 0xffff0000u) >> (16 - 5)) | (1 << 21)); bitmask = logical_imm(simm, 16); if (bitmask != 0) return push_inst(compiler, (ORRI ^ W_OP) | RD(dst) | RN(TMP_ZERO) | bitmask); - FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); - return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); + FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | (((sljit_ins)imm & 0xffff) << 5))); + return push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)imm & 0xffff0000u) >> (16 - 5)) | (1 << 21)); } bitmask = logical_imm(simm, 32); @@ -529,10 +535,10 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, if (simm < 0 && simm >= -0x100000000l) { if ((imm & 0xffff) == 0xffff) - return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); + return push_inst(compiler, MOVN | RD(dst) | (((sljit_ins)~imm & 0xffff0000u) >> (16 - 5)) | (1 << 21)); - FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5))); - return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); + FAIL_IF(push_inst(compiler, MOVN | RD(dst) | (((sljit_ins)~imm & 0xffff) << 5))); + return push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)imm & 0xffff0000u) >> (16 - 5)) | (1 << 21)); } /* A large amount of number can be constructed from ORR and MOVx, but computing them is costly. */ @@ -558,10 +564,10 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, } if (first) { first = 0; - FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); + FAIL_IF(push_inst(compiler, MOVN | RD(dst) | (((sljit_ins)simm & 0xffff) << 5) | (i << 21))); } else - FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((~simm & 0xffff) << 5) | (i << 21))); + FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)~simm & 0xffff) << 5) | (i << 21))); simm >>= 16; } return SLJIT_SUCCESS; @@ -574,10 +580,10 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, } if (first) { first = 0; - FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); + FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | (((sljit_ins)simm & 0xffff) << 5) | (i << 21))); } else - FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); + FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)simm & 0xffff) << 5) | (i << 21))); simm >>= 16; } return SLJIT_SUCCESS; @@ -619,12 +625,11 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s } if (flags & (ARG1_IMM | ARG2_IMM)) { - reg = (flags & ARG2_IMM) ? arg1 : arg2; + reg = (sljit_s32)((flags & ARG2_IMM) ? arg1 : arg2); imm = (flags & ARG2_IMM) ? arg2 : arg1; switch (op) { case SLJIT_MUL: - case SLJIT_NEG: case SLJIT_CLZ: case SLJIT_ADDC: case SLJIT_SUBC: @@ -639,40 +644,43 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s FAIL_IF(load_immediate(compiler, dst, (flags & INT_OP) ? (~imm & 0xffffffff) : ~imm)); goto set_flags; case SLJIT_SUB: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; if (flags & ARG1_IMM) break; imm = -imm; /* Fall through. */ case SLJIT_ADD: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; + if (op != SLJIT_SUB) + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; + if (imm == 0) { CHECK_FLAGS(1 << 29); return push_inst(compiler, ((op == SLJIT_ADD ? ADDI : SUBI) ^ inv_bits) | RD(dst) | RN(reg)); } if (imm > 0 && imm <= 0xfff) { CHECK_FLAGS(1 << 29); - return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (imm << 10)); + return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((sljit_ins)imm << 10)); } nimm = -imm; if (nimm > 0 && nimm <= 0xfff) { CHECK_FLAGS(1 << 29); - return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (nimm << 10)); + return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((sljit_ins)nimm << 10)); } if (imm > 0 && imm <= 0xffffff && !(imm & 0xfff)) { CHECK_FLAGS(1 << 29); - return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22)); + return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (((sljit_ins)imm >> 12) << 10) | (1 << 22)); } if (nimm > 0 && nimm <= 0xffffff && !(nimm & 0xfff)) { CHECK_FLAGS(1 << 29); - return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 22)); + return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (((sljit_ins)nimm >> 12) << 10) | (1 << 22)); } if (imm > 0 && imm <= 0xffffff && !(flags & SET_FLAGS)) { - FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22))); - return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | ((imm & 0xfff) << 10)); + FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (((sljit_ins)imm >> 12) << 10) | (1 << 22))); + return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | (((sljit_ins)imm & 0xfff) << 10)); } if (nimm > 0 && nimm <= 0xffffff && !(flags & SET_FLAGS)) { - FAIL_IF(push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 22))); - return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(dst) | ((nimm & 0xfff) << 10)); + FAIL_IF(push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (((sljit_ins)nimm >> 12) << 10) | (1 << 22))); + return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(dst) | (((sljit_ins)nimm & 0xfff) << 10)); } break; case SLJIT_AND: @@ -697,11 +705,13 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s break; if (flags & INT_OP) { imm &= 0x1f; - FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | ((-imm & 0x1f) << 16) | ((31 - imm) << 10))); + FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) + | (((sljit_ins)-imm & 0x1f) << 16) | ((31 - (sljit_ins)imm) << 10))); } else { imm &= 0x3f; - FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | ((-imm & 0x3f) << 16) | ((63 - imm) << 10))); + FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) + | (((sljit_ins)-imm & 0x3f) << 16) | ((63 - (sljit_ins)imm) << 10))); } goto set_flags; case SLJIT_LSHR: @@ -712,11 +722,13 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s inv_bits |= 1 << 30; if (flags & INT_OP) { imm &= 0x1f; - FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (imm << 16) | (31 << 10))); + FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) + | ((sljit_ins)imm << 16) | (31 << 10))); } else { imm &= 0x3f; - FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | (imm << 16) | (63 << 10))); + FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) + | (1 << 22) | ((sljit_ins)imm << 16) | (63 << 10))); } goto set_flags; default: @@ -766,41 +778,38 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s if (!(flags & INT_OP)) inv_bits |= 1 << 22; return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (15 << 10)); - case SLJIT_MOV_U32: + case SLJIT_MOV32: SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1); - if ((flags & INT_OP) && dst == arg2) + if (dst == arg2) return SLJIT_SUCCESS; + /* fallthrough */ + case SLJIT_MOV_U32: + SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1); return push_inst(compiler, (ORR ^ W_OP) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); case SLJIT_MOV_S32: SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1); - if ((flags & INT_OP) && dst == arg2) - return SLJIT_SUCCESS; return push_inst(compiler, SBFM | (1 << 22) | RD(dst) | RN(arg2) | (31 << 10)); case SLJIT_NOT: SLJIT_ASSERT(arg1 == TMP_REG1); FAIL_IF(push_inst(compiler, (ORN ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2))); break; /* Set flags. */ - case SLJIT_NEG: - SLJIT_ASSERT(arg1 == TMP_REG1); - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; - if (flags & SET_FLAGS) - inv_bits |= 1 << 29; - return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); case SLJIT_CLZ: SLJIT_ASSERT(arg1 == TMP_REG1); return push_inst(compiler, (CLZ ^ inv_bits) | RD(dst) | RN(arg2)); case SLJIT_ADD: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; CHECK_FLAGS(1 << 29); - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; return push_inst(compiler, (ADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); case SLJIT_ADDC: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; CHECK_FLAGS(1 << 29); return push_inst(compiler, (ADC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); case SLJIT_SUB: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; CHECK_FLAGS(1 << 29); - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); case SLJIT_SUBC: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; CHECK_FLAGS(1 << 29); return push_inst(compiler, (SBC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); case SLJIT_MUL: @@ -852,7 +861,7 @@ set_flags: #define INT_SIZE 0x2 #define WORD_SIZE 0x3 -#define MEM_SIZE_SHIFT(flags) ((flags) & 0x3) +#define MEM_SIZE_SHIFT(flags) ((sljit_ins)(flags) & 0x3) static sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw, sljit_s32 tmp_reg) @@ -872,35 +881,34 @@ static sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, s return push_inst(compiler, STRB | type | RT(reg) | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | (argw ? (1 << 12) : 0)); - FAIL_IF(push_inst(compiler, ADD | RD(tmp_reg) | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | (argw << 10))); + FAIL_IF(push_inst(compiler, ADD | RD(tmp_reg) | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | ((sljit_ins)argw << 10))); return push_inst(compiler, STRBI | type | RT(reg) | RN(tmp_reg)); } arg &= REG_MASK; - if (arg == SLJIT_UNUSED) { + if (!arg) { FAIL_IF(load_immediate(compiler, tmp_reg, argw & ~(0xfff << shift))); argw = (argw >> shift) & 0xfff; - return push_inst(compiler, STRBI | type | RT(reg) | RN(tmp_reg) | (argw << 10)); + return push_inst(compiler, STRBI | type | RT(reg) | RN(tmp_reg) | ((sljit_ins)argw << 10)); } if (argw >= 0 && (argw & ((1 << shift) - 1)) == 0) { - if ((argw >> shift) <= 0xfff) { - return push_inst(compiler, STRBI | type | RT(reg) | RN(arg) | (argw << (10 - shift))); - } + if ((argw >> shift) <= 0xfff) + return push_inst(compiler, STRBI | type | RT(reg) | RN(arg) | ((sljit_ins)argw << (10 - shift))); if (argw <= 0xffffff) { - FAIL_IF(push_inst(compiler, ADDI | (1 << 22) | RD(tmp_reg) | RN(arg) | ((argw >> 12) << 10))); + FAIL_IF(push_inst(compiler, ADDI | (1 << 22) | RD(tmp_reg) | RN(arg) | (((sljit_ins)argw >> 12) << 10))); argw = ((argw & 0xfff) >> shift); - return push_inst(compiler, STRBI | type | RT(reg) | RN(tmp_reg) | (argw << 10)); + return push_inst(compiler, STRBI | type | RT(reg) | RN(tmp_reg) | ((sljit_ins)argw << 10)); } } if (argw <= 255 && argw >= -256) - return push_inst(compiler, STURBI | type | RT(reg) | RN(arg) | ((argw & 0x1ff) << 12)); + return push_inst(compiler, STURBI | type | RT(reg) | RN(arg) | (((sljit_ins)argw & 0x1ff) << 12)); FAIL_IF(load_immediate(compiler, tmp_reg, argw)); @@ -915,39 +923,44 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { - sljit_s32 args, i, tmp, offs, prev, saved_regs_size; + sljit_s32 prev, fprev, saved_regs_size, i, tmp; + sljit_s32 word_arg_count = 0; + sljit_ins offs; CHECK_ERROR(); CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 2); - if (saved_regs_size & 0x8) - saved_regs_size += sizeof(sljit_sw); + saved_regs_size += GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, SSIZE_OF(f64)); - local_size = (local_size + 15) & ~0xf; - compiler->local_size = local_size + saved_regs_size; + local_size = (local_size + saved_regs_size + 0xf) & ~0xf; + compiler->local_size = local_size; - FAIL_IF(push_inst(compiler, STP_PRE | RT(TMP_FP) | RT2(TMP_LR) - | RN(SLJIT_SP) | ((-(saved_regs_size >> 3) & 0x7f) << 15))); + if (local_size <= 512) { + FAIL_IF(push_inst(compiler, STP_PRE | RT(TMP_FP) | RT2(TMP_LR) + | RN(SLJIT_SP) | (sljit_ins)((-(local_size >> 3) & 0x7f) << 15))); + offs = (sljit_ins)(local_size - 2 * SSIZE_OF(sw)) << (15 - 3); + local_size = 0; + } else { + saved_regs_size = ((saved_regs_size - 2 * SSIZE_OF(sw)) + 0xf) & ~0xf; -#ifdef _WIN32 - if (local_size >= 4096) - FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(SLJIT_SP) | (1 << 10) | (1 << 22))); - else if (local_size > 256) - FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(SLJIT_SP) | (local_size << 10))); -#endif + FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | ((sljit_ins)saved_regs_size << 10))); + offs = (sljit_ins)(saved_regs_size - 2 * SSIZE_OF(sw)) << (15 - 3); + local_size -= saved_regs_size; + SLJIT_ASSERT(local_size > 0); + } - tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG; prev = -1; - offs = 2 << 15; - for (i = SLJIT_S0; i >= tmp; i--) { + + tmp = SLJIT_S0 - saveds; + for (i = SLJIT_S0; i > tmp; i--) { if (prev == -1) { prev = i; continue; } FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(SLJIT_SP) | offs)); - offs += 2 << 15; + offs -= (sljit_ins)2 << 15; prev = -1; } @@ -957,84 +970,124 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi continue; } FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(SLJIT_SP) | offs)); - offs += 2 << 15; + offs -= (sljit_ins)2 << 15; prev = -1; } - if (prev != -1) - FAIL_IF(push_inst(compiler, STRI | RT(prev) | RN(SLJIT_SP) | (offs >> 5))); + fprev = -1; + tmp = SLJIT_FS0 - fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + if (fprev == -1) { + fprev = i; + continue; + } + FAIL_IF(push_inst(compiler, STP_F64 | VT(fprev) | VT2(i) | RN(SLJIT_SP) | offs)); + offs -= (sljit_ins)2 << 15; + fprev = -1; + } - FAIL_IF(push_inst(compiler, ADDI | RD(TMP_FP) | RN(SLJIT_SP) | (0 << 10))); + for (i = fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + if (fprev == -1) { + fprev = i; + continue; + } + FAIL_IF(push_inst(compiler, STP_F64 | VT(fprev) | VT2(i) | RN(SLJIT_SP) | offs)); + offs -= (sljit_ins)2 << 15; + fprev = -1; + } - args = get_arg_count(arg_types); + if (fprev != -1) + FAIL_IF(push_inst(compiler, STRI_F64 | VT(fprev) | RN(SLJIT_SP) | (offs >> 5) | (1 << 10))); - if (args >= 1) - FAIL_IF(push_inst(compiler, ORR | RD(SLJIT_S0) | RN(TMP_ZERO) | RM(SLJIT_R0))); - if (args >= 2) - FAIL_IF(push_inst(compiler, ORR | RD(SLJIT_S1) | RN(TMP_ZERO) | RM(SLJIT_R1))); - if (args >= 3) - FAIL_IF(push_inst(compiler, ORR | RD(SLJIT_S2) | RN(TMP_ZERO) | RM(SLJIT_R2))); + if (prev != -1) + FAIL_IF(push_inst(compiler, STRI | RT(prev) | RN(SLJIT_SP) | (offs >> 5) | ((fprev == -1) ? (1 << 10) : 0))); + + arg_types >>= SLJIT_ARG_SHIFT; + +#ifdef _WIN32 + if (local_size > 4096) + FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | (1 << 10) | (1 << 22))); +#endif /* _WIN32 */ + + tmp = 0; + while (arg_types > 0) { + if ((arg_types & SLJIT_ARG_MASK) < SLJIT_ARG_TYPE_F64) { + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + FAIL_IF(push_inst(compiler, ORR | RD(SLJIT_S0 - tmp) | RN(TMP_ZERO) | RM(SLJIT_R0 + word_arg_count))); + tmp++; + } + word_arg_count++; + } + arg_types >>= SLJIT_ARG_SHIFT; + } #ifdef _WIN32 - if (local_size >= 4096) { + if (local_size > 4096) { if (local_size < 4 * 4096) { /* No need for a loop. */ - if (local_size >= 2 * 4096) { - FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1))); - FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(TMP_REG1) | (1 << 10) | (1 << 22))); - local_size -= 4096; - } if (local_size >= 2 * 4096) { - FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1))); - FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(TMP_REG1) | (1 << 10) | (1 << 22))); - local_size -= 4096; - } + if (local_size >= 3 * 4096) { + FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(SLJIT_SP))); + FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | (1 << 10) | (1 << 22))); + } - FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1))); - local_size -= 4096; + FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(SLJIT_SP))); + FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | (1 << 10) | (1 << 22))); + } } else { - FAIL_IF(push_inst(compiler, MOVZ | RD(TMP_REG2) | (((local_size >> 12) - 1) << 5))); - FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1))); - FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(TMP_REG1) | (1 << 10) | (1 << 22))); - FAIL_IF(push_inst(compiler, SUBI | (1 << 29) | RD(TMP_REG2) | RN(TMP_REG2) | (1 << 10))); + FAIL_IF(push_inst(compiler, MOVZ | RD(TMP_REG1) | ((((sljit_ins)local_size >> 12) - 1) << 5))); + FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(SLJIT_SP))); + FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | (1 << 10) | (1 << 22))); + FAIL_IF(push_inst(compiler, SUBI | (1 << 29) | RD(TMP_REG1) | RN(TMP_REG1) | (1 << 10))); FAIL_IF(push_inst(compiler, B_CC | ((((sljit_ins) -3) & 0x7ffff) << 5) | 0x1 /* not-equal */)); - FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1))); - - local_size &= 0xfff; } - if (local_size > 256) { - FAIL_IF(push_inst(compiler, SUBI | RD(TMP_REG1) | RN(TMP_REG1) | (local_size << 10))); - FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1))); - } - else if (local_size > 0) - FAIL_IF(push_inst(compiler, LDR_PRE | RT(TMP_ZERO) | RN(TMP_REG1) | ((-local_size & 0x1ff) << 12))); + local_size &= 0xfff; - FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_REG1) | (0 << 10))); + if (local_size > 0) + FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(SLJIT_SP))); + else + FAIL_IF(push_inst(compiler, STP | RT(TMP_FP) | RT2(TMP_LR) | RN(SLJIT_SP))); } - else if (local_size > 256) { - FAIL_IF(push_inst(compiler, LDRI | RT(TMP_ZERO) | RN(TMP_REG1))); - FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_REG1) | (0 << 10))); + + if (local_size > 0) { + if (local_size <= 512) + FAIL_IF(push_inst(compiler, STP_PRE | RT(TMP_FP) | RT2(TMP_LR) + | RN(SLJIT_SP) | (sljit_ins)((-(local_size >> 3) & 0x7f) << 15))); + else { + if (local_size >= 4096) + local_size = (1 << (22 - 10)); + + FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | ((sljit_ins)local_size << 10))); + FAIL_IF(push_inst(compiler, STP | RT(TMP_FP) | RT2(TMP_LR) | RN(SLJIT_SP))); + } } - else if (local_size > 0) - FAIL_IF(push_inst(compiler, LDR_PRE | RT(TMP_ZERO) | RN(SLJIT_SP) | ((-local_size & 0x1ff) << 12))); #else /* !_WIN32 */ /* The local_size does not include saved registers size. */ - if (local_size > 0xfff) { - FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | ((local_size >> 12) << 10) | (1 << 22))); - local_size &= 0xfff; + if (local_size != 0) { + if (local_size > 0xfff) { + FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | (((sljit_ins)local_size >> 12) << 10) | (1 << 22))); + local_size &= 0xfff; + } + + if (local_size > 512 || local_size == 0) { + if (local_size != 0) + FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | ((sljit_ins)local_size << 10))); + + FAIL_IF(push_inst(compiler, STP | RT(TMP_FP) | RT2(TMP_LR) | RN(SLJIT_SP))); + } else + FAIL_IF(push_inst(compiler, STP_PRE | RT(TMP_FP) | RT2(TMP_LR) + | RN(SLJIT_SP) | (sljit_ins)((-(local_size >> 3) & 0x7f) << 15))); } - if (local_size != 0) - FAIL_IF(push_inst(compiler, SUBI | RD(SLJIT_SP) | RN(SLJIT_SP) | (local_size << 10))); #endif /* _WIN32 */ - return SLJIT_SUCCESS; + return push_inst(compiler, ADDI | RD(TMP_FP) | RN(SLJIT_SP) | (0 << 10)); } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler, @@ -1048,57 +1101,49 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 2); - if (saved_regs_size & 0x8) - saved_regs_size += sizeof(sljit_sw); + saved_regs_size += GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, SSIZE_OF(f64)); - compiler->local_size = saved_regs_size + ((local_size + 15) & ~0xf); + compiler->local_size = (local_size + saved_regs_size + 0xf) & ~0xf; return SLJIT_SUCCESS; } -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler) { - sljit_s32 local_size; - sljit_s32 i, tmp, offs, prev, saved_regs_size; - - CHECK_ERROR(); - CHECK(check_sljit_emit_return(compiler, op, src, srcw)); - - FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); - - saved_regs_size = GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 2); - if (saved_regs_size & 0x8) - saved_regs_size += sizeof(sljit_sw); + sljit_s32 local_size, prev, fprev, i, tmp; + sljit_ins offs; - local_size = compiler->local_size - saved_regs_size; + local_size = compiler->local_size; - /* Load LR as early as possible. */ - if (local_size == 0) + if (local_size > 512 && local_size <= 512 + 496) { + FAIL_IF(push_inst(compiler, LDP_POST | RT(TMP_FP) | RT2(TMP_LR) + | RN(SLJIT_SP) | ((sljit_ins)(local_size - 512) << (15 - 3)))); + local_size = 512; + } else FAIL_IF(push_inst(compiler, LDP | RT(TMP_FP) | RT2(TMP_LR) | RN(SLJIT_SP))); - else if (local_size < 63 * sizeof(sljit_sw)) { - FAIL_IF(push_inst(compiler, LDP_PRE | RT(TMP_FP) | RT2(TMP_LR) - | RN(SLJIT_SP) | (local_size << (15 - 3)))); - } - else { + + if (local_size > 512) { + local_size -= 512; if (local_size > 0xfff) { - FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) | ((local_size >> 12) << 10) | (1 << 22))); + FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) + | (((sljit_ins)local_size >> 12) << 10) | (1 << 22))); local_size &= 0xfff; } - if (local_size) - FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) | (local_size << 10))); - FAIL_IF(push_inst(compiler, LDP | RT(TMP_FP) | RT2(TMP_LR) | RN(SLJIT_SP))); + FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) | ((sljit_ins)local_size << 10))); + local_size = 512; } - tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG; + offs = (sljit_ins)(local_size - 2 * SSIZE_OF(sw)) << (15 - 3); prev = -1; - offs = 2 << 15; - for (i = SLJIT_S0; i >= tmp; i--) { + + tmp = SLJIT_S0 - compiler->saveds; + for (i = SLJIT_S0; i > tmp; i--) { if (prev == -1) { prev = i; continue; } FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(SLJIT_SP) | offs)); - offs += 2 << 15; + offs -= (sljit_ins)2 << 15; prev = -1; } @@ -1108,15 +1153,50 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp continue; } FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(SLJIT_SP) | offs)); - offs += 2 << 15; + offs -= (sljit_ins)2 << 15; prev = -1; } + fprev = -1; + + tmp = SLJIT_FS0 - compiler->fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + if (fprev == -1) { + fprev = i; + continue; + } + FAIL_IF(push_inst(compiler, LDP_F64 | VT(fprev) | VT2(i) | RN(SLJIT_SP) | offs)); + offs -= (sljit_ins)2 << 15; + fprev = -1; + } + + for (i = compiler->fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + if (fprev == -1) { + fprev = i; + continue; + } + FAIL_IF(push_inst(compiler, LDP_F64 | VT(fprev) | VT2(i) | RN(SLJIT_SP) | offs)); + offs -= (sljit_ins)2 << 15; + fprev = -1; + } + + if (fprev != -1) + FAIL_IF(push_inst(compiler, LDRI_F64 | VT(fprev) | RN(SLJIT_SP) | (offs >> 5) | (1 << 10))); + if (prev != -1) - FAIL_IF(push_inst(compiler, LDRI | RT(prev) | RN(SLJIT_SP) | (offs >> 5))); + FAIL_IF(push_inst(compiler, LDRI | RT(prev) | RN(SLJIT_SP) | (offs >> 5) | ((fprev == -1) ? (1 << 10) : 0))); + + /* This and the next call/jump instruction can be executed parallelly. */ + return push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) | (sljit_ins)(local_size << 10)); +} + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); + + FAIL_IF(emit_stack_frame_release(compiler)); - /* These two can be executed in parallel. */ - FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(SLJIT_SP) | (saved_regs_size << 10))); return push_inst(compiler, RET | RN(TMP_LR)); } @@ -1126,7 +1206,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) { - sljit_ins inv_bits = (op & SLJIT_I32_OP) ? W_OP : 0; + sljit_ins inv_bits = (op & SLJIT_32) ? W_OP : 0; CHECK_ERROR(); CHECK(check_sljit_emit_op0(compiler, op)); @@ -1171,13 +1251,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src, srcw); - dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; op = GET_OPCODE(op); if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) { /* Both operands are registers. */ if (dst_r != TMP_REG1 && FAST_IS_REG(src)) - return emit_op_imm(compiler, op | ((op_flags & SLJIT_I32_OP) ? INT_OP : 0), dst_r, TMP_REG1, src); + return emit_op_imm(compiler, op | ((op_flags & SLJIT_32) ? INT_OP : 0), dst_r, TMP_REG1, src); switch (op) { case SLJIT_MOV: @@ -1210,6 +1290,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile srcw = (sljit_u32)srcw; break; case SLJIT_MOV_S32: + case SLJIT_MOV32: mem_flags = INT_SIZE | SIGNED; if (src & SLJIT_IMM) srcw = (sljit_s32)srcw; @@ -1235,14 +1316,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile flags = HAS_FLAGS(op_flags) ? SET_FLAGS : 0; mem_flags = WORD_SIZE; - if (op_flags & SLJIT_I32_OP) { + if (op_flags & SLJIT_32) { flags |= INT_OP; mem_flags = INT_SIZE; } - if (dst == SLJIT_UNUSED) - flags |= UNUSED_RETURN; - if (src & SLJIT_MEM) { FAIL_IF(emit_op_mem(compiler, mem_flags, TMP_REG2, src, srcw, TMP_REG2)); src = TMP_REG2; @@ -1263,24 +1341,21 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile sljit_s32 dst_r, flags, mem_flags; CHECK_ERROR(); - CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) - return SLJIT_SUCCESS; - - dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; flags = HAS_FLAGS(op) ? SET_FLAGS : 0; mem_flags = WORD_SIZE; - if (op & SLJIT_I32_OP) { + if (op & SLJIT_32) { flags |= INT_OP; mem_flags = INT_SIZE; } - if (dst == SLJIT_UNUSED) + if (dst == TMP_REG1) flags |= UNUSED_RETURN; if (src1 & SLJIT_MEM) { @@ -1310,6 +1385,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile return SLJIT_SUCCESS; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + return sljit_emit_op2(compiler, op, TMP_REG1, 0, src1, src1w, src2, src2w); +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { @@ -1363,8 +1452,9 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { + SLJIT_UNUSED_ARG(size); CHECK_ERROR(); CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); @@ -1391,34 +1481,34 @@ static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, return push_inst(compiler, STR_FR | type | VT(reg) | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | (argw ? (1 << 12) : 0)); - FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG1) | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | (argw << 10))); + FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG1) | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | ((sljit_ins)argw << 10))); return push_inst(compiler, STR_FI | type | VT(reg) | RN(TMP_REG1)); } arg &= REG_MASK; - if (arg == SLJIT_UNUSED) { + if (!arg) { FAIL_IF(load_immediate(compiler, TMP_REG1, argw & ~(0xfff << shift))); argw = (argw >> shift) & 0xfff; - return push_inst(compiler, STR_FI | type | VT(reg) | RN(TMP_REG1) | (argw << 10)); + return push_inst(compiler, STR_FI | type | VT(reg) | RN(TMP_REG1) | ((sljit_ins)argw << 10)); } if (argw >= 0 && (argw & ((1 << shift) - 1)) == 0) { if ((argw >> shift) <= 0xfff) - return push_inst(compiler, STR_FI | type | VT(reg) | RN(arg) | (argw << (10 - shift))); + return push_inst(compiler, STR_FI | type | VT(reg) | RN(arg) | ((sljit_ins)argw << (10 - shift))); if (argw <= 0xffffff) { - FAIL_IF(push_inst(compiler, ADDI | (1 << 22) | RD(TMP_REG1) | RN(arg) | ((argw >> 12) << 10))); + FAIL_IF(push_inst(compiler, ADDI | (1 << 22) | RD(TMP_REG1) | RN(arg) | (((sljit_ins)argw >> 12) << 10))); argw = ((argw & 0xfff) >> shift); - return push_inst(compiler, STR_FI | type | VT(reg) | RN(TMP_REG1) | (argw << 10)); + return push_inst(compiler, STR_FI | type | VT(reg) | RN(TMP_REG1) | ((sljit_ins)argw << 10)); } } if (argw <= 255 && argw >= -256) - return push_inst(compiler, STUR_FI | type | VT(reg) | RN(arg) | ((argw & 0x1ff) << 12)); + return push_inst(compiler, STUR_FI | type | VT(reg) | RN(arg) | (((sljit_ins)argw & 0x1ff) << 12)); FAIL_IF(load_immediate(compiler, TMP_REG1, argw)); return push_inst(compiler, STR_FR | type | VT(reg) | RN(arg) | RM(TMP_REG1)); @@ -1429,13 +1519,13 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_comp sljit_s32 src, sljit_sw srcw) { sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; - sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0; + sljit_ins inv_bits = (op & SLJIT_32) ? (1 << 22) : 0; if (GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64) inv_bits |= W_OP; if (src & SLJIT_MEM) { - emit_fop_mem(compiler, (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE, TMP_FREG1, src, srcw); + emit_fop_mem(compiler, (op & SLJIT_32) ? INT_SIZE : WORD_SIZE, TMP_FREG1, src, srcw); src = TMP_FREG1; } @@ -1451,7 +1541,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp sljit_s32 src, sljit_sw srcw) { sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; - sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0; + sljit_ins inv_bits = (op & SLJIT_32) ? (1 << 22) : 0; if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) inv_bits |= W_OP; @@ -1471,7 +1561,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp FAIL_IF(push_inst(compiler, (SCVTF ^ inv_bits) | VD(dst_r) | RN(src))); if (dst & SLJIT_MEM) - return emit_fop_mem(compiler, ((op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE) | STORE, TMP_FREG1, dst, dstw); + return emit_fop_mem(compiler, ((op & SLJIT_32) ? INT_SIZE : WORD_SIZE) | STORE, TMP_FREG1, dst, dstw); return SLJIT_SUCCESS; } @@ -1479,8 +1569,8 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compile sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { - sljit_s32 mem_flags = (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE; - sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0; + sljit_s32 mem_flags = (op & SLJIT_32) ? INT_SIZE : WORD_SIZE; + sljit_ins inv_bits = (op & SLJIT_32) ? (1 << 22) : 0; if (src1 & SLJIT_MEM) { emit_fop_mem(compiler, mem_flags, TMP_FREG1, src1, src1w); @@ -1499,7 +1589,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw) { - sljit_s32 dst_r, mem_flags = (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE; + sljit_s32 dst_r, mem_flags = (op & SLJIT_32) ? INT_SIZE : WORD_SIZE; sljit_ins inv_bits; CHECK_ERROR(); @@ -1507,7 +1597,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil SLJIT_COMPILE_ASSERT((INT_SIZE ^ 0x1) == WORD_SIZE, must_be_one_bit_difference); SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); - inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0; + inv_bits = (op & SLJIT_32) ? (1 << 22) : 0; dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; if (src & SLJIT_MEM) { @@ -1531,7 +1621,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil FAIL_IF(push_inst(compiler, (FABS ^ inv_bits) | VD(dst_r) | VN(src))); break; case SLJIT_CONV_F64_FROM_F32: - FAIL_IF(push_inst(compiler, FCVT | ((op & SLJIT_F32_OP) ? (1 << 22) : (1 << 15)) | VD(dst_r) | VN(src))); + FAIL_IF(push_inst(compiler, FCVT | (sljit_ins)((op & SLJIT_32) ? (1 << 22) : (1 << 15)) | VD(dst_r) | VN(src))); break; } @@ -1545,8 +1635,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compil sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { - sljit_s32 dst_r, mem_flags = (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE; - sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0; + sljit_s32 dst_r, mem_flags = (op & SLJIT_32) ? INT_SIZE : WORD_SIZE; + sljit_ins inv_bits = (op & SLJIT_32) ? (1 << 22) : 0; CHECK_ERROR(); CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); @@ -1605,7 +1695,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * /* Conditional instructions */ /* --------------------------------------------------------------------- */ -static sljit_uw get_cc(struct sljit_compiler *compiler, sljit_s32 type) +static sljit_ins get_cc(struct sljit_compiler *compiler, sljit_s32 type) { switch (type) { case SLJIT_EQUAL: @@ -1616,10 +1706,20 @@ static sljit_uw get_cc(struct sljit_compiler *compiler, sljit_s32 type) case SLJIT_NOT_EQUAL_F64: return 0x0; + case SLJIT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD) + return 0x3; + /* fallthrough */ + case SLJIT_LESS: case SLJIT_LESS_F64: return 0x2; + case SLJIT_NOT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD) + return 0x2; + /* fallthrough */ + case SLJIT_GREATER_EQUAL: case SLJIT_GREATER_EQUAL_F64: return 0x3; @@ -1645,15 +1745,17 @@ static sljit_uw get_cc(struct sljit_compiler *compiler, sljit_s32 type) return 0xc; case SLJIT_OVERFLOW: - if (!(compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB)) + if (!(compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB))) return 0x0; + /* fallthrough */ case SLJIT_UNORDERED_F64: return 0x7; case SLJIT_NOT_OVERFLOW: - if (!(compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB)) + if (!(compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB))) return 0x1; + /* fallthrough */ case SLJIT_ORDERED_F64: return 0x6; @@ -1709,9 +1811,15 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 arg_types) { + SLJIT_UNUSED_ARG(arg_types); CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_call(compiler, type, arg_types)); + if (type & SLJIT_CALL_RETURN) { + PTR_FAIL_IF(emit_stack_frame_release(compiler)); + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); + } + #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; @@ -1724,7 +1832,7 @@ static SLJIT_INLINE struct sljit_jump* emit_cmp_to0(struct sljit_compiler *compi sljit_s32 src, sljit_sw srcw) { struct sljit_jump *jump; - sljit_ins inv_bits = (type & SLJIT_I32_OP) ? W_OP : 0; + sljit_ins inv_bits = (type & SLJIT_32) ? W_OP : 0; SLJIT_ASSERT((type & 0xff) == SLJIT_EQUAL || (type & 0xff) == SLJIT_NOT_EQUAL); ADJUST_LOCAL_OFFSET(src, srcw); @@ -1775,7 +1883,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); FAIL_IF(!jump); set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); - jump->u.target = srcw; + jump->u.target = (sljit_uw)srcw; FAIL_IF(emit_imm64_const(compiler, TMP_REG1, 0)); jump->addr = compiler->size; @@ -1786,8 +1894,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi sljit_s32 arg_types, sljit_s32 src, sljit_sw srcw) { + SLJIT_UNUSED_ARG(arg_types); CHECK_ERROR(); CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); + ADJUST_LOCAL_OFFSET(src, srcw); + + if (src & SLJIT_MEM) { + FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, src, srcw, TMP_REG1)); + src = TMP_REG1; + } + + if (type & SLJIT_CALL_RETURN) { + if (src >= SLJIT_FIRST_SAVED_REG && src <= SLJIT_S0) { + FAIL_IF(push_inst(compiler, ORR | RD(TMP_REG1) | RN(TMP_ZERO) | RM(src))); + src = TMP_REG1; + } + + FAIL_IF(emit_stack_frame_release(compiler)); + type = SLJIT_JUMP; + } #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -1825,7 +1950,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co flags = HAS_FLAGS(op) ? SET_FLAGS : 0; mem_flags = WORD_SIZE; - if (op & SLJIT_I32_OP) { + if (op & SLJIT_32) { flags |= INT_OP; mem_flags = INT_SIZE; } @@ -1849,14 +1974,14 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil sljit_s32 dst_reg, sljit_s32 src, sljit_sw srcw) { - sljit_ins inv_bits = (dst_reg & SLJIT_I32_OP) ? W_OP : 0; + sljit_ins inv_bits = (dst_reg & SLJIT_32) ? W_OP : 0; sljit_ins cc; CHECK_ERROR(); CHECK(check_sljit_emit_cmov(compiler, type, dst_reg, src, srcw)); if (SLJIT_UNLIKELY(src & SLJIT_IMM)) { - if (dst_reg & SLJIT_I32_OP) + if (dst_reg & SLJIT_32) srcw = (sljit_s32)srcw; FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); src = TMP_REG1; @@ -1864,7 +1989,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil } cc = get_cc(compiler, type & 0xff); - dst_reg &= ~SLJIT_I32_OP; + dst_reg &= ~SLJIT_32; return push_inst(compiler, (CSEL ^ inv_bits) | (cc << 12) | RD(dst_reg) | RN(dst_reg) | RM(src)); } @@ -1891,17 +2016,21 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile break; case SLJIT_MOV_S8: sign = 1; + /* fallthrough */ case SLJIT_MOV_U8: inst = STURBI | (MEM_SIZE_SHIFT(BYTE_SIZE) << 30) | 0x400; break; case SLJIT_MOV_S16: sign = 1; + /* fallthrough */ case SLJIT_MOV_U16: inst = STURBI | (MEM_SIZE_SHIFT(HALF_SIZE) << 30) | 0x400; break; case SLJIT_MOV_S32: sign = 1; + /* fallthrough */ case SLJIT_MOV_U32: + case SLJIT_MOV32: inst = STURBI | (MEM_SIZE_SHIFT(INT_SIZE) << 30) | 0x400; break; default: @@ -1916,7 +2045,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile if (type & SLJIT_MEM_PRE) inst |= 0x800; - return push_inst(compiler, inst | RT(reg) | RN(mem & REG_MASK) | ((memw & 0x1ff) << 12)); + return push_inst(compiler, inst | RT(reg) | RN(mem & REG_MASK) | (sljit_ins)((memw & 0x1ff) << 12)); } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compiler, sljit_s32 type, @@ -1936,7 +2065,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compil inst = STUR_FI | 0x80000400; - if (!(type & SLJIT_F32_OP)) + if (!(type & SLJIT_32)) inst |= 0x40000000; if (!(type & SLJIT_MEM_STORE)) @@ -1945,7 +2074,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compil if (type & SLJIT_MEM_PRE) inst |= 0x800; - return push_inst(compiler, inst | VT(freg) | RN(mem & REG_MASK) | ((memw & 0x1ff) << 12)); + return push_inst(compiler, inst | VT(freg) | RN(mem & REG_MASK) | (sljit_ins)((memw & 0x1ff) << 12)); } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset) @@ -1955,11 +2084,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *c CHECK_ERROR(); CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset)); - - SLJIT_ASSERT (SLJIT_LOCALS_OFFSET_BASE == 0); + ADJUST_LOCAL_OFFSET(SLJIT_MEM1(SLJIT_SP), offset); dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG1; + /* Not all instruction forms support accessing SP register. */ if (offset <= 0xffffff && offset >= -0xffffff) { ins = ADDI; if (offset < 0) { @@ -1968,13 +2097,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *c } if (offset <= 0xfff) - FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(SLJIT_SP) | (offset << 10))); + FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(SLJIT_SP) | (sljit_ins)(offset << 10))); else { - FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(SLJIT_SP) | ((offset & 0xfff000) >> (12 - 10)) | (1 << 22))); + FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(SLJIT_SP) | (sljit_ins)((offset & 0xfff000) >> (12 - 10)) | (1 << 22))); offset &= 0xfff; if (offset != 0) - FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(dst_reg) | (offset << 10))); + FAIL_IF(push_inst(compiler, ins | RD(dst_reg) | RN(dst_reg) | (sljit_ins)(offset << 10))); } } else { @@ -2002,7 +2131,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi set_const(const_, compiler); dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; - PTR_FAIL_IF(emit_imm64_const(compiler, dst_r, init_value)); + PTR_FAIL_IF(emit_imm64_const(compiler, dst_r, (sljit_uw)init_value)); if (dst & SLJIT_MEM) PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); @@ -2034,17 +2163,17 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct slj SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset) { sljit_ins* inst = (sljit_ins*)addr; - sljit_s32 dst; + sljit_u32 dst; SLJIT_UNUSED_ARG(executable_offset); SLJIT_UPDATE_WX_FLAGS(inst, inst + 4, 0); dst = inst[0] & 0x1f; SLJIT_ASSERT((inst[0] & 0xffe00000) == MOVZ && (inst[1] & 0xffe00000) == (MOVK | (1 << 21))); - inst[0] = MOVZ | dst | ((new_target & 0xffff) << 5); - inst[1] = MOVK | dst | (((new_target >> 16) & 0xffff) << 5) | (1 << 21); - inst[2] = MOVK | dst | (((new_target >> 32) & 0xffff) << 5) | (2 << 21); - inst[3] = MOVK | dst | ((new_target >> 48) << 5) | (3 << 21); + inst[0] = MOVZ | dst | (((sljit_u32)new_target & 0xffff) << 5); + inst[1] = MOVK | dst | (((sljit_u32)(new_target >> 16) & 0xffff) << 5) | (1 << 21); + inst[2] = MOVK | dst | (((sljit_u32)(new_target >> 32) & 0xffff) << 5) | (2 << 21); + inst[3] = MOVK | dst | ((sljit_u32)(new_target >> 48) << 5) | (3 << 21); SLJIT_UPDATE_WX_FLAGS(inst, inst + 4, 1); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); @@ -2053,5 +2182,5 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - sljit_set_jump_addr(addr, new_constant, executable_offset); + sljit_set_jump_addr(addr, (sljit_uw)new_constant, executable_offset); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c b/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c index e35dbe99b3..ed21ea7daa 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c @@ -50,40 +50,42 @@ static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 5] = { }; static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { - 0, 0, 1, 2, 3, 4, 5, 6, 7 + 0, 0, 1, 2, 3, 4, 5, 15, 14, 13, 12, 11, 10, 9, 8, 6, 7 }; #define COPY_BITS(src, from, to, bits) \ - ((from >= to ? (src >> (from - to)) : (src << (to - from))) & (((1 << bits) - 1) << to)) + ((from >= to ? ((sljit_ins)(src) >> (from - to)) : ((sljit_ins)(src) << (to - from))) & (((1 << bits) - 1) << to)) + +#define NEGATE(uimm) ((sljit_uw)-(sljit_sw)(uimm)) /* Thumb16 encodings. */ -#define RD3(rd) (reg_map[rd]) -#define RN3(rn) (reg_map[rn] << 3) -#define RM3(rm) (reg_map[rm] << 6) -#define RDN3(rdn) (reg_map[rdn] << 8) -#define IMM3(imm) (imm << 6) -#define IMM8(imm) (imm) +#define RD3(rd) ((sljit_ins)reg_map[rd]) +#define RN3(rn) ((sljit_ins)reg_map[rn] << 3) +#define RM3(rm) ((sljit_ins)reg_map[rm] << 6) +#define RDN3(rdn) ((sljit_ins)reg_map[rdn] << 8) +#define IMM3(imm) ((sljit_ins)imm << 6) +#define IMM8(imm) ((sljit_ins)imm) /* Thumb16 helpers. */ #define SET_REGS44(rd, rn) \ - ((reg_map[rn] << 3) | (reg_map[rd] & 0x7) | ((reg_map[rd] & 0x8) << 4)) + (((sljit_ins)reg_map[rn] << 3) | ((sljit_ins)reg_map[rd] & 0x7) | (((sljit_ins)reg_map[rd] & 0x8) << 4)) #define IS_2_LO_REGS(reg1, reg2) \ (reg_map[reg1] <= 7 && reg_map[reg2] <= 7) #define IS_3_LO_REGS(reg1, reg2, reg3) \ (reg_map[reg1] <= 7 && reg_map[reg2] <= 7 && reg_map[reg3] <= 7) /* Thumb32 encodings. */ -#define RD4(rd) (reg_map[rd] << 8) -#define RN4(rn) (reg_map[rn] << 16) -#define RM4(rm) (reg_map[rm]) -#define RT4(rt) (reg_map[rt] << 12) -#define DD4(dd) (freg_map[dd] << 12) -#define DN4(dn) (freg_map[dn] << 16) -#define DM4(dm) (freg_map[dm]) +#define RD4(rd) ((sljit_ins)reg_map[rd] << 8) +#define RN4(rn) ((sljit_ins)reg_map[rn] << 16) +#define RM4(rm) ((sljit_ins)reg_map[rm]) +#define RT4(rt) ((sljit_ins)reg_map[rt] << 12) +#define DD4(dd) ((sljit_ins)freg_map[dd] << 12) +#define DN4(dn) ((sljit_ins)freg_map[dn] << 16) +#define DM4(dm) ((sljit_ins)freg_map[dm]) #define IMM5(imm) \ - (COPY_BITS(imm, 2, 12, 3) | ((imm & 0x3) << 6)) + (COPY_BITS(imm, 2, 12, 3) | (((sljit_ins)imm & 0x3) << 6)) #define IMM12(imm) \ - (COPY_BITS(imm, 11, 26, 1) | COPY_BITS(imm, 8, 12, 3) | (imm & 0xff)) + (COPY_BITS(imm, 11, 26, 1) | COPY_BITS(imm, 8, 12, 3) | ((sljit_ins)imm & 0xff)) /* --------------------------------------------------------------------- */ /* Instrucion forms */ @@ -100,7 +102,8 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define ADDSI8 0x3000 #define ADD_W 0xeb000000 #define ADDWI 0xf2000000 -#define ADD_SP 0xb000 +#define ADD_SP 0x4485 +#define ADD_SP_I 0xb000 #define ADD_W 0xeb000000 #define ADD_WI 0xf1000000 #define ANDI 0xf0000000 @@ -126,6 +129,8 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define EORS 0x4040 #define EOR_W 0xea800000 #define IT 0xbf00 +#define LDR_SP 0x9800 +#define LDR 0xf8d00000 #define LDRI 0xf8500800 #define LSLS 0x4080 #define LSLSI 0x0000 @@ -168,13 +173,15 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define SUBSI8 0x3800 #define SUB_W 0xeba00000 #define SUBWI 0xf2a00000 -#define SUB_SP 0xb080 +#define SUB_SP_I 0xb080 #define SUB_WI 0xf1a00000 #define SXTB 0xb240 #define SXTB_W 0xfa4ff080 #define SXTH 0xb200 #define SXTH_W 0xfa0ff080 #define TST 0x4200 +#define TSTI 0xf0000f00 +#define TST_W 0xea000f00 #define UDIV 0xfbb0f0f0 #define UMULL 0xfba00000 #define UXTB 0xb2c0 @@ -188,12 +195,15 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define VCVT_F64_F32 0xeeb70ac0 #define VCVT_S32_F32 0xeebd0ac0 #define VDIV_F32 0xee800a00 +#define VLDR_F32 0xed100a00 #define VMOV_F32 0xeeb00a40 #define VMOV 0xee000a10 #define VMOV2 0xec400a10 #define VMRS 0xeef1fa10 #define VMUL_F32 0xee200a00 #define VNEG_F32 0xeeb10a40 +#define VPOP 0xecbd0b00 +#define VPUSH 0xed2d0b00 #define VSTR_F32 0xed000a00 #define VSUB_F32 0xee300a40 @@ -204,7 +214,7 @@ static sljit_s32 push_inst16(struct sljit_compiler *compiler, sljit_ins inst) ptr = (sljit_u16*)ensure_buf(compiler, sizeof(sljit_u16)); FAIL_IF(!ptr); - *ptr = inst; + *ptr = (sljit_u16)(inst); compiler->size++; return SLJIT_SUCCESS; } @@ -213,8 +223,8 @@ static sljit_s32 push_inst32(struct sljit_compiler *compiler, sljit_ins inst) { sljit_u16 *ptr = (sljit_u16*)ensure_buf(compiler, sizeof(sljit_ins)); FAIL_IF(!ptr); - *ptr++ = inst >> 16; - *ptr = inst; + *ptr++ = (sljit_u16)(inst >> 16); + *ptr = (sljit_u16)(inst); compiler->size += 2; return SLJIT_SUCCESS; } @@ -229,12 +239,12 @@ static SLJIT_INLINE sljit_s32 emit_imm32_const(struct sljit_compiler *compiler, static SLJIT_INLINE void modify_imm32_const(sljit_u16 *inst, sljit_uw new_imm) { - sljit_s32 dst = inst[1] & 0x0f00; + sljit_ins dst = inst[1] & 0x0f00; SLJIT_ASSERT(((inst[0] & 0xfbf0) == (MOVW >> 16)) && ((inst[2] & 0xfbf0) == (MOVT >> 16)) && dst == (inst[3] & 0x0f00)); - inst[0] = (MOVW >> 16) | COPY_BITS(new_imm, 12, 0, 4) | COPY_BITS(new_imm, 11, 10, 1); - inst[1] = dst | COPY_BITS(new_imm, 8, 12, 3) | (new_imm & 0xff); - inst[2] = (MOVT >> 16) | COPY_BITS(new_imm, 12 + 16, 0, 4) | COPY_BITS(new_imm, 11 + 16, 10, 1); - inst[3] = dst | COPY_BITS(new_imm, 8 + 16, 12, 3) | ((new_imm & 0xff0000) >> 16); + inst[0] = (sljit_u16)((MOVW >> 16) | COPY_BITS(new_imm, 12, 0, 4) | COPY_BITS(new_imm, 11, 10, 1)); + inst[1] = (sljit_u16)(dst | COPY_BITS(new_imm, 8, 12, 3) | (new_imm & 0xff)); + inst[2] = (sljit_u16)((MOVT >> 16) | COPY_BITS(new_imm, 12 + 16, 0, 4) | COPY_BITS(new_imm, 11 + 16, 10, 1)); + inst[3] = (sljit_u16)(dst | COPY_BITS(new_imm, 8 + 16, 12, 3) | ((new_imm & 0xff0000) >> 16)); } static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_u16 *code_ptr, sljit_u16 *code, sljit_sw executable_offset) @@ -318,24 +328,24 @@ static SLJIT_INLINE void set_jump_instruction(struct sljit_jump *jump, sljit_sw case 1: /* Encoding T1 of 'B' instruction */ SLJIT_ASSERT(diff <= 127 && diff >= -128 && (jump->flags & IS_COND)); - jump_inst[0] = 0xd000 | (jump->flags & 0xf00) | (diff & 0xff); + jump_inst[0] = (sljit_u16)(0xd000 | (jump->flags & 0xf00) | ((sljit_ins)diff & 0xff)); return; case 2: /* Encoding T3 of 'B' instruction */ SLJIT_ASSERT(diff <= 524287 && diff >= -524288 && (jump->flags & IS_COND)); - jump_inst[0] = 0xf000 | COPY_BITS(jump->flags, 8, 6, 4) | COPY_BITS(diff, 11, 0, 6) | COPY_BITS(diff, 19, 10, 1); - jump_inst[1] = 0x8000 | COPY_BITS(diff, 17, 13, 1) | COPY_BITS(diff, 18, 11, 1) | (diff & 0x7ff); + jump_inst[0] = (sljit_u16)(0xf000 | COPY_BITS(jump->flags, 8, 6, 4) | COPY_BITS(diff, 11, 0, 6) | COPY_BITS(diff, 19, 10, 1)); + jump_inst[1] = (sljit_u16)(0x8000 | COPY_BITS(diff, 17, 13, 1) | COPY_BITS(diff, 18, 11, 1) | ((sljit_ins)diff & 0x7ff)); return; case 3: SLJIT_ASSERT(jump->flags & IS_COND); - *jump_inst++ = IT | ((jump->flags >> 4) & 0xf0) | 0x8; + *jump_inst++ = (sljit_u16)(IT | ((jump->flags >> 4) & 0xf0) | 0x8); diff--; type = 5; break; case 4: /* Encoding T2 of 'B' instruction */ SLJIT_ASSERT(diff <= 1023 && diff >= -1024 && !(jump->flags & IS_COND)); - jump_inst[0] = 0xe000 | (diff & 0x7ff); + jump_inst[0] = (sljit_u16)(0xe000 | (diff & 0x7ff)); return; } @@ -345,8 +355,8 @@ static SLJIT_INLINE void set_jump_instruction(struct sljit_jump *jump, sljit_sw s = (diff >> 23) & 0x1; j1 = (~(diff >> 22) ^ s) & 0x1; j2 = (~(diff >> 21) ^ s) & 0x1; - jump_inst[0] = 0xf000 | (s << 10) | COPY_BITS(diff, 11, 0, 10); - jump_inst[1] = (j1 << 13) | (j2 << 11) | (diff & 0x7ff); + jump_inst[0] = (sljit_u16)(0xf000 | ((sljit_ins)s << 10) | COPY_BITS(diff, 11, 0, 10)); + jump_inst[1] = (sljit_u16)((j1 << 13) | (j2 << 11) | (diff & 0x7ff)); /* The others have a common form. */ if (type == 5) /* Encoding T4 of 'B' instruction */ @@ -405,7 +415,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil /* These structures are ordered by their address. */ if (label && label->size == half_count) { label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset)) | 0x1; - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } if (jump && jump->addr == half_count) { @@ -433,7 +443,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == half_count) { label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset)) | 0x1; - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } @@ -457,7 +467,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; - compiler->executable_size = (code_ptr - code) * sizeof(sljit_u16); + compiler->executable_size = (sljit_uw)(code_ptr - code) * sizeof(sljit_u16); code = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); code_ptr = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); @@ -592,7 +602,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s } if (flags & (ARG1_IMM | ARG2_IMM)) { - reg = (flags & ARG2_IMM) ? arg1 : arg2; + reg = (sljit_s32)((flags & ARG2_IMM) ? arg1 : arg2); imm = (flags & ARG2_IMM) ? arg2 : arg1; switch (flags & 0xffff) { @@ -610,8 +620,8 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s Although some clever things could be done here, "NOT IMM" does not worth the efforts. */ break; case SLJIT_ADD: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; - nimm = -(sljit_sw)imm; + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; + nimm = NEGATE(imm); if (IS_2_LO_REGS(reg, dst)) { if (imm <= 0x7) return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); @@ -633,18 +643,18 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s nimm = get_imm(imm); if (nimm != INVALID_IMM) return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); - nimm = get_imm(-(sljit_sw)imm); + nimm = get_imm(NEGATE(imm)); if (nimm != INVALID_IMM) return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); break; case SLJIT_ADDC: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; imm = get_imm(imm); if (imm != INVALID_IMM) return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); break; case SLJIT_SUB: - /* SUB operation can be replaced by ADD because of the negative carry flag. */ - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; if (flags & ARG1_IMM) { if (imm == 0 && IS_2_LO_REGS(reg, dst)) return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg)); @@ -659,11 +669,12 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s nimm = get_imm(imm); if (nimm != INVALID_IMM) return push_inst32(compiler, CMPI_W | RN4(reg) | nimm); - nimm = get_imm(-(sljit_sw)imm); + nimm = get_imm(NEGATE(imm)); if (nimm != INVALID_IMM) return push_inst32(compiler, CMNI_W | RN4(reg) | nimm); + break; } - nimm = -(sljit_sw)imm; + nimm = NEGATE(imm); if (IS_2_LO_REGS(reg, dst)) { if (imm <= 0x7) return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); @@ -685,11 +696,12 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s nimm = get_imm(imm); if (nimm != INVALID_IMM) return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); - nimm = get_imm(-(sljit_sw)imm); + nimm = get_imm(NEGATE(imm)); if (nimm != INVALID_IMM) return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); break; case SLJIT_SUBC: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; if (flags & ARG1_IMM) break; imm = get_imm(imm); @@ -699,8 +711,8 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s case SLJIT_AND: nimm = get_imm(imm); if (nimm != INVALID_IMM) - return push_inst32(compiler, ANDI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); - imm = get_imm(imm); + return push_inst32(compiler, ((flags & UNUSED_RETURN) ? TSTI : ANDI) | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); + imm = get_imm(~imm); if (imm != INVALID_IMM) return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); break; @@ -708,7 +720,7 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s nimm = get_imm(imm); if (nimm != INVALID_IMM) return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); - imm = get_imm(imm); + imm = get_imm(~imm); if (imm != INVALID_IMM) return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); break; @@ -752,12 +764,12 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s if (flags & ARG2_IMM) { imm = arg2; arg2 = (arg1 == TMP_REG1) ? TMP_REG2 : TMP_REG1; - FAIL_IF(load_immediate(compiler, arg2, imm)); + FAIL_IF(load_immediate(compiler, (sljit_s32)arg2, imm)); } else { imm = arg1; arg1 = (arg2 == TMP_REG1) ? TMP_REG2 : TMP_REG1; - FAIL_IF(load_immediate(compiler, arg1, imm)); + FAIL_IF(load_immediate(compiler, (sljit_s32)arg1, imm)); } SLJIT_ASSERT(arg1 != arg2); @@ -768,9 +780,10 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s case SLJIT_MOV: case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: case SLJIT_MOV_P: SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG2); - if (dst == arg2) + if (dst == (sljit_s32)arg2) return SLJIT_SUCCESS; return push_inst16(compiler, MOV | SET_REGS44(dst, arg2)); case SLJIT_MOV_U8: @@ -803,18 +816,19 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s FAIL_IF(push_inst32(compiler, CLZ | RN4(arg2) | RD4(dst) | RM4(arg2))); return SLJIT_SUCCESS; case SLJIT_ADD: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; if (IS_3_LO_REGS(dst, arg1, arg2)) return push_inst16(compiler, ADDS | RD3(dst) | RN3(arg1) | RM3(arg2)); - if (dst == arg1 && !(flags & SET_FLAGS)) + if (dst == (sljit_s32)arg1 && !(flags & SET_FLAGS)) return push_inst16(compiler, ADD | SET_REGS44(dst, arg2)); return push_inst32(compiler, ADD_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_ADDC: - if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; + if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) return push_inst16(compiler, ADCS | RD3(dst) | RN3(arg2)); return push_inst32(compiler, ADC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_SUB: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; if (flags & UNUSED_RETURN) { if (IS_2_LO_REGS(arg1, arg2)) return push_inst16(compiler, CMP | RD3(arg1) | RN3(arg2)); @@ -824,7 +838,8 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s return push_inst16(compiler, SUBS | RD3(dst) | RN3(arg1) | RM3(arg2)); return push_inst32(compiler, SUB_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_SUBC: - if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; + if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) return push_inst16(compiler, SBCS | RD3(dst) | RN3(arg2)); return push_inst32(compiler, SBC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_MUL: @@ -836,29 +851,29 @@ static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, s /* cmp TMP_REG2, dst asr #31. */ return push_inst32(compiler, CMP_W | RN4(TMP_REG2) | 0x70e0 | RM4(dst)); case SLJIT_AND: - if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) + if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) return push_inst16(compiler, ANDS | RD3(dst) | RN3(arg2)); if ((flags & UNUSED_RETURN) && IS_2_LO_REGS(arg1, arg2)) return push_inst16(compiler, TST | RD3(arg1) | RN3(arg2)); - return push_inst32(compiler, AND_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); + return push_inst32(compiler, ((flags & UNUSED_RETURN) ? TST_W : AND_W) | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_OR: - if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) + if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) return push_inst16(compiler, ORRS | RD3(dst) | RN3(arg2)); return push_inst32(compiler, ORR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_XOR: - if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) + if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) return push_inst16(compiler, EORS | RD3(dst) | RN3(arg2)); return push_inst32(compiler, EOR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_SHL: - if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) + if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) return push_inst16(compiler, LSLS | RD3(dst) | RN3(arg2)); return push_inst32(compiler, LSL_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_LSHR: - if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) + if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) return push_inst16(compiler, LSRS | RD3(dst) | RN3(arg2)); return push_inst32(compiler, LSR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); case SLJIT_ASHR: - if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) + if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) return push_inst16(compiler, ASRS | RD3(dst) | RN3(arg2)); return push_inst32(compiler, ASR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); } @@ -951,20 +966,22 @@ static const sljit_ins sljit_mem32[13] = { /* Helper function. Dst should be reg + value, using at most 1 instruction, flags does not set. */ static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, sljit_sw value) { + sljit_uw imm; + if (value >= 0) { if (value <= 0xfff) return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value)); - value = get_imm(value); - if (value != INVALID_IMM) - return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | value); + imm = get_imm((sljit_uw)value); + if (imm != INVALID_IMM) + return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | imm); } else { value = -value; if (value <= 0xfff) return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value)); - value = get_imm(value); - if (value != INVALID_IMM) - return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | value); + imm = get_imm((sljit_uw)value); + if (imm != INVALID_IMM) + return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | imm); } return SLJIT_ERR_UNSUPPORTED; } @@ -980,13 +997,13 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit arg &= ~SLJIT_MEM; if (SLJIT_UNLIKELY(!(arg & REG_MASK))) { - tmp = get_imm(argw & ~0xfff); + tmp = get_imm((sljit_uw)argw & ~(sljit_uw)0xfff); if (tmp != INVALID_IMM) { FAIL_IF(push_inst32(compiler, MOV_WI | RD4(tmp_reg) | tmp)); return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(tmp_reg) | (argw & 0xfff)); } - FAIL_IF(load_immediate(compiler, tmp_reg, argw)); + FAIL_IF(load_immediate(compiler, tmp_reg, (sljit_uw)argw)); if (IS_2_LO_REGS(reg, tmp_reg) && sljit_mem16_imm5[flags]) return push_inst16(compiler, sljit_mem16_imm5[flags] | RD3(reg) | RN3(tmp_reg)); return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(tmp_reg)); @@ -999,11 +1016,11 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit if (!argw && IS_3_LO_REGS(reg, arg, other_r)) return push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(other_r)); - return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(other_r) | (argw << 4)); + return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(other_r) | ((sljit_ins)argw << 4)); } if (argw > 0xfff) { - tmp = get_imm(argw & ~0xfff); + tmp = get_imm((sljit_uw)argw & ~(sljit_uw)0xfff); if (tmp != INVALID_IMM) { push_inst32(compiler, ADD_WI | RD4(tmp_reg) | RN4(arg) | tmp); arg = tmp_reg; @@ -1011,7 +1028,7 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit } } else if (argw < -0xff) { - tmp = get_imm(-argw & ~0xff); + tmp = get_imm((sljit_uw)-argw & ~(sljit_uw)0xff); if (tmp != INVALID_IMM) { push_inst32(compiler, SUB_WI | RD4(tmp_reg) | RN4(arg) | tmp); arg = tmp_reg; @@ -1037,21 +1054,21 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit } if (tmp < 3) - return push_inst16(compiler, sljit_mem16_imm5[flags] | RD3(reg) | RN3(arg) | (argw << (6 - tmp))); + return push_inst16(compiler, sljit_mem16_imm5[flags] | RD3(reg) | RN3(arg) | ((sljit_ins)argw << (6 - tmp))); } else if (SLJIT_UNLIKELY(arg == SLJIT_SP) && IS_WORD_SIZE(flags) && OFFSET_CHECK(0xff, 2) && reg_map[reg] <= 7) { /* SP based immediate. */ - return push_inst16(compiler, STR_SP | ((flags & STORE) ? 0 : 0x800) | RDN3(reg) | (argw >> 2)); + return push_inst16(compiler, STR_SP | (sljit_ins)((flags & STORE) ? 0 : 0x800) | RDN3(reg) | ((sljit_ins)argw >> 2)); } if (argw >= 0 && argw <= 0xfff) - return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | argw); + return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | (sljit_ins)argw); else if (argw < 0 && argw >= -0xff) - return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | -argw); + return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | (sljit_ins)-argw); SLJIT_ASSERT(arg != tmp_reg); - FAIL_IF(load_immediate(compiler, tmp_reg, argw)); + FAIL_IF(load_immediate(compiler, tmp_reg, (sljit_uw)argw)); if (IS_3_LO_REGS(reg, arg, tmp_reg)) return push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(tmp_reg)); return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(tmp_reg)); @@ -1065,114 +1082,203 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { - sljit_s32 args, size, i, tmp; - sljit_ins push = 0; -#ifdef _WIN32 - sljit_uw imm; + sljit_s32 size, i, tmp, word_arg_count, saved_arg_count; + sljit_uw offset; + sljit_uw imm = 0; +#ifdef __SOFTFP__ + sljit_u32 float_arg_count; +#else + sljit_u32 old_offset, f32_offset; + sljit_u32 remap[3]; + sljit_u32 *remap_ptr = remap; #endif CHECK_ERROR(); CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG; - for (i = SLJIT_S0; i >= tmp; i--) - push |= 1 << reg_map[i]; + tmp = SLJIT_S0 - saveds; + for (i = SLJIT_S0; i > tmp; i--) + imm |= (sljit_uw)1 << reg_map[i]; for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) - push |= 1 << reg_map[i]; + imm |= (sljit_uw)1 << reg_map[i]; - FAIL_IF((push & 0xff00) - ? push_inst32(compiler, PUSH_W | (1 << 14) | push) - : push_inst16(compiler, PUSH | (1 << 8) | push)); + /* At least two registers must be set for PUSH_W and one for PUSH instruction. */ + FAIL_IF((imm & 0xff00) + ? push_inst32(compiler, PUSH_W | (1 << 14) | imm) + : push_inst16(compiler, PUSH | (1 << 8) | imm)); /* Stack must be aligned to 8 bytes: (LR, R4) */ size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); - local_size = ((size + local_size + 7) & ~7) - size; + + if (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) { + if ((size & SSIZE_OF(sw)) != 0) { + FAIL_IF(push_inst16(compiler, SUB_SP_I | (sizeof(sljit_sw) >> 2))); + size += SSIZE_OF(sw); + } + + if (fsaveds + fscratches >= SLJIT_NUMBER_OF_FLOAT_REGISTERS) { + FAIL_IF(push_inst32(compiler, VPUSH | DD4(SLJIT_FS0) | ((sljit_uw)SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS << 1))); + } else { + if (fsaveds > 0) + FAIL_IF(push_inst32(compiler, VPUSH | DD4(SLJIT_FS0) | ((sljit_uw)fsaveds << 1))); + if (fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) + FAIL_IF(push_inst32(compiler, VPUSH | DD4(fscratches) | ((sljit_uw)(fscratches - (SLJIT_FIRST_SAVED_FLOAT_REG - 1)) << 1))); + } + } + + local_size = ((size + local_size + 0x7) & ~0x7) - size; compiler->local_size = local_size; -#ifdef _WIN32 - if (local_size >= 256) { - if (local_size > 4096) - imm = get_imm(4096); - else - imm = get_imm(local_size & ~0xff); + arg_types >>= SLJIT_ARG_SHIFT; + word_arg_count = 0; + saved_arg_count = 0; +#ifdef __SOFTFP__ + SLJIT_COMPILE_ASSERT(SLJIT_FR0 == 1, float_register_index_start); - SLJIT_ASSERT(imm != INVALID_IMM); - FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(SLJIT_SP) | imm)); + offset = 0; + float_arg_count = 0; + + while (arg_types) { + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (offset & 0x7) + offset += sizeof(sljit_sw); + + if (offset < 4 * sizeof(sljit_sw)) + FAIL_IF(push_inst32(compiler, VMOV2 | (offset << 10) | ((offset + sizeof(sljit_sw)) << 14) | float_arg_count)); + else + FAIL_IF(push_inst32(compiler, VLDR_F32 | 0x800100 | RN4(SLJIT_SP) + | (float_arg_count << 12) | ((offset + (sljit_uw)size - 4 * sizeof(sljit_sw)) >> 2))); + float_arg_count++; + offset += sizeof(sljit_f64) - sizeof(sljit_sw); + break; + case SLJIT_ARG_TYPE_F32: + if (offset < 4 * sizeof(sljit_sw)) + FAIL_IF(push_inst32(compiler, VMOV | (float_arg_count << 16) | (offset << 10))); + else + FAIL_IF(push_inst32(compiler, VLDR_F32 | 0x800000 | RN4(SLJIT_SP) + | (float_arg_count << 12) | ((offset + (sljit_uw)size - 4 * sizeof(sljit_sw)) >> 2))); + float_arg_count++; + break; + default: + word_arg_count++; + + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + tmp = SLJIT_S0 - saved_arg_count; + saved_arg_count++; + } else if (word_arg_count - 1 != (sljit_s32)(offset >> 2)) + tmp = word_arg_count; + else + break; + + SLJIT_ASSERT(reg_map[tmp] <= 7); + + if (offset < 4 * sizeof(sljit_sw)) + FAIL_IF(push_inst16(compiler, MOV | RD3(tmp) | (offset << 1))); + else + FAIL_IF(push_inst16(compiler, LDR_SP | RDN3(tmp) + | ((offset + (sljit_uw)size - 4 * sizeof(sljit_sw)) >> 2))); + break; + } + + offset += sizeof(sljit_sw); + arg_types >>= SLJIT_ARG_SHIFT; } + + compiler->args_size = offset; #else - if (local_size > 0) { - if (local_size <= (127 << 2)) - FAIL_IF(push_inst16(compiler, SUB_SP | (local_size >> 2))); - else - FAIL_IF(emit_op_imm(compiler, SLJIT_SUB | ARG2_IMM, SLJIT_SP, SLJIT_SP, local_size)); + offset = SLJIT_FR0; + old_offset = SLJIT_FR0; + f32_offset = 0; + + while (arg_types) { + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (offset != old_offset) + *remap_ptr++ = VMOV_F32 | SLJIT_32 | DD4(offset) | DM4(old_offset); + old_offset++; + offset++; + break; + case SLJIT_ARG_TYPE_F32: + if (f32_offset != 0) { + *remap_ptr++ = VMOV_F32 | 0x20 | DD4(offset) | DM4(f32_offset); + f32_offset = 0; + } else { + if (offset != old_offset) + *remap_ptr++ = VMOV_F32 | DD4(offset) | DM4(old_offset); + f32_offset = old_offset; + old_offset++; + } + offset++; + break; + default: + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S0 - saved_arg_count, SLJIT_R0 + word_arg_count))); + saved_arg_count++; + } + + word_arg_count++; + break; + } + arg_types >>= SLJIT_ARG_SHIFT; } -#endif - args = get_arg_count(arg_types); + SLJIT_ASSERT((sljit_uw)(remap_ptr - remap) <= sizeof(remap)); - if (args >= 1) - FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S0, SLJIT_R0))); - if (args >= 2) - FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S1, SLJIT_R1))); - if (args >= 3) - FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S2, SLJIT_R2))); + while (remap_ptr > remap) + FAIL_IF(push_inst32(compiler, *(--remap_ptr))); +#endif #ifdef _WIN32 - if (local_size >= 256) { - if (local_size > 4096) { - imm = get_imm(4096); - SLJIT_ASSERT(imm != INVALID_IMM); - - if (local_size < 4 * 4096) { - if (local_size > 2 * 4096) { - FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); - FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm)); - local_size -= 4096; - } + if (local_size >= 4096) { + imm = get_imm(4096); + SLJIT_ASSERT(imm != INVALID_IMM); - if (local_size > 2 * 4096) { - FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); - FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm)); - local_size -= 4096; - } + FAIL_IF(push_inst32(compiler, SUB_WI | RD4(SLJIT_SP) | RN4(SLJIT_SP) | imm)); - FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); - local_size -= 4096; + if (local_size < 4 * 4096) { + if (local_size > 2 * 4096) { + if (local_size > 3 * 4096) { + FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG1) | RN4(SLJIT_SP))); + FAIL_IF(push_inst32(compiler, SUB_WI | RD4(SLJIT_SP) | RN4(SLJIT_SP) | imm)); + } - SLJIT_ASSERT(local_size > 0); - } - else { - FAIL_IF(load_immediate(compiler, SLJIT_R3, (local_size >> 12) - 1)); - FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); - FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm)); - SLJIT_ASSERT(reg_map[SLJIT_R3] < 7); - FAIL_IF(push_inst16(compiler, SUBSI8 | RDN3(SLJIT_R3) | 1)); - FAIL_IF(push_inst16(compiler, BCC | (0x1 << 8) /* not-equal */ | (-7 & 0xff))); - - local_size &= 0xfff; - - if (local_size != 0) - FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); + FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG1) | RN4(SLJIT_SP))); + FAIL_IF(push_inst32(compiler, SUB_WI | RD4(SLJIT_SP) | RN4(SLJIT_SP) | imm)); } + } else { + FAIL_IF(load_immediate(compiler, TMP_REG2, ((sljit_uw)local_size >> 12) - 1)); + FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG1) | RN4(SLJIT_SP))); + FAIL_IF(push_inst32(compiler, SUB_WI | RD4(SLJIT_SP) | RN4(SLJIT_SP) | imm)); + FAIL_IF(push_inst32(compiler, SUB_WI | SET_FLAGS | RD4(TMP_REG2) | RN4(TMP_REG2) | 1)); + FAIL_IF(push_inst16(compiler, BCC | (0x1 << 8) /* not-equal */ | (-8 & 0xff))); + } - if (local_size >= 256) { - imm = get_imm(local_size & ~0xff); - SLJIT_ASSERT(imm != INVALID_IMM); + FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG1) | RN4(SLJIT_SP))); + local_size &= 0xfff; + } - FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm)); - } - } + if (local_size >= 256) { + SLJIT_ASSERT(local_size < 4096); - local_size &= 0xff; - FAIL_IF(push_inst32(compiler, LDRI | 0x400 | (local_size > 0 ? 0x100 : 0) | RT4(TMP_REG2) | RN4(TMP_REG1) | local_size)); + if (local_size <= (127 << 2)) + FAIL_IF(push_inst16(compiler, SUB_SP_I | ((sljit_uw)local_size >> 2))); + else + FAIL_IF(emit_op_imm(compiler, SLJIT_SUB | ARG2_IMM, SLJIT_SP, SLJIT_SP, (sljit_uw)local_size)); - FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_SP, TMP_REG1))); + FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG1) | RN4(SLJIT_SP))); + } else if (local_size > 0) + FAIL_IF(push_inst32(compiler, LDRI | 0x500 | RT4(TMP_REG1) | RN4(SLJIT_SP) | (sljit_uw)local_size)); +#else /* !_WIN32 */ + if (local_size > 0) { + if (local_size <= (127 << 2)) + FAIL_IF(push_inst16(compiler, SUB_SP_I | ((sljit_uw)local_size >> 2))); + else + FAIL_IF(emit_op_imm(compiler, SLJIT_SUB | ARG2_IMM, SLJIT_SP, SLJIT_SP, (sljit_uw)local_size)); } - else if (local_size > 0) - FAIL_IF(push_inst32(compiler, LDRI | 0x500 | RT4(TMP_REG1) | RN4(SLJIT_SP) | local_size)); -#endif +#endif /* _WIN32 */ return SLJIT_SUCCESS; } @@ -1188,37 +1294,143 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); - compiler->local_size = ((size + local_size + 7) & ~7) - size; + + if ((size & SSIZE_OF(sw)) != 0 && (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG)) + size += SSIZE_OF(sw); + + compiler->local_size = ((size + local_size + 0x7) & ~0x7) - size; return SLJIT_SUCCESS; } -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) +static sljit_s32 emit_add_sp(struct sljit_compiler *compiler, sljit_uw imm) { - sljit_s32 i, tmp; - sljit_ins pop = 0; + sljit_uw imm2; - CHECK_ERROR(); - CHECK(check_sljit_emit_return(compiler, op, src, srcw)); + /* The TMP_REG1 register must keep its value. */ + if (imm <= (127u << 2)) + return push_inst16(compiler, ADD_SP_I | (imm >> 2)); - FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); + if (imm <= 0xfff) + return push_inst32(compiler, ADDWI | RD4(SLJIT_SP) | RN4(SLJIT_SP) | IMM12(imm)); - if (compiler->local_size > 0) { - if (compiler->local_size <= (127 << 2)) - FAIL_IF(push_inst16(compiler, ADD_SP | (compiler->local_size >> 2))); - else - FAIL_IF(emit_op_imm(compiler, SLJIT_ADD | ARG2_IMM, SLJIT_SP, SLJIT_SP, compiler->local_size)); + imm2 = get_imm(imm); + + if (imm2 != INVALID_IMM) + return push_inst32(compiler, ADD_WI | RD4(SLJIT_SP) | RN4(SLJIT_SP) | imm2); + + FAIL_IF(load_immediate(compiler, TMP_REG2, imm)); + return push_inst16(compiler, ADD_SP | RN3(TMP_REG2)); +} + +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler, sljit_s32 frame_size) +{ + sljit_s32 local_size, fscratches, fsaveds, i, tmp; + sljit_s32 lr_dst = TMP_PC; + sljit_uw reg_list; + + SLJIT_ASSERT(reg_map[TMP_REG2] == 14 && frame_size <= 128); + + local_size = compiler->local_size; + fscratches = compiler->fscratches; + fsaveds = compiler->fsaveds; + + if (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) { + if (local_size > 0) + FAIL_IF(emit_add_sp(compiler, (sljit_uw)local_size)); + + if (fsaveds + fscratches >= SLJIT_NUMBER_OF_FLOAT_REGISTERS) { + FAIL_IF(push_inst32(compiler, VPOP | DD4(SLJIT_FS0) | ((sljit_uw)SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS << 1))); + } else { + if (fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) + FAIL_IF(push_inst32(compiler, VPOP | DD4(fscratches) | ((sljit_uw)(fscratches - (SLJIT_FIRST_SAVED_FLOAT_REG - 1)) << 1))); + if (fsaveds > 0) + FAIL_IF(push_inst32(compiler, VPOP | DD4(SLJIT_FS0) | ((sljit_uw)fsaveds << 1))); + } + + local_size = GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 1) & 0x7; } - tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG; - for (i = SLJIT_S0; i >= tmp; i--) - pop |= 1 << reg_map[i]; + if (frame_size < 0) { + lr_dst = TMP_REG2; + frame_size = 0; + } else if (frame_size > 0) + lr_dst = 0; + + reg_list = 0; + tmp = SLJIT_S0 - compiler->saveds; + for (i = SLJIT_S0; i > tmp; i--) + reg_list |= (sljit_uw)1 << reg_map[i]; for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) - pop |= 1 << reg_map[i]; + reg_list |= (sljit_uw)1 << reg_map[i]; + + if (lr_dst == 0 && (reg_list & (reg_list - 1)) == 0) { + /* The local_size does not include the saved registers. */ + local_size += SSIZE_OF(sw); + + if (reg_list != 0) + local_size += SSIZE_OF(sw); + + if (frame_size > local_size) + FAIL_IF(push_inst16(compiler, SUB_SP_I | ((sljit_uw)(frame_size - local_size) >> 2))); + else if (frame_size < local_size) + FAIL_IF(emit_add_sp(compiler, (sljit_uw)(local_size - frame_size))); + + if (reg_list == 0) + return SLJIT_SUCCESS; + + if (compiler->saveds > 0) { + SLJIT_ASSERT(reg_list == ((sljit_uw)1 << reg_map[SLJIT_S0])); + lr_dst = SLJIT_S0; + } else { + SLJIT_ASSERT(reg_list == ((sljit_uw)1 << reg_map[SLJIT_FIRST_SAVED_REG])); + lr_dst = SLJIT_FIRST_SAVED_REG; + } + + frame_size -= 2 * SSIZE_OF(sw); + + if (reg_map[lr_dst] <= 7) + return push_inst16(compiler, STR_SP | 0x800 | RDN3(lr_dst) | (sljit_uw)(frame_size >> 2)); + + return push_inst32(compiler, LDR | RT4(lr_dst) | RN4(SLJIT_SP) | (sljit_uw)frame_size); + } + + if (local_size > 0) + FAIL_IF(emit_add_sp(compiler, (sljit_uw)local_size)); + + if (!(reg_list & 0xff00) && lr_dst != TMP_REG2) { + if (lr_dst == TMP_PC) + reg_list |= 1u << 8; + + /* At least one register must be set for POP instruction. */ + SLJIT_ASSERT(reg_list != 0); - return (pop & 0xff00) - ? push_inst32(compiler, POP_W | (1 << 15) | pop) - : push_inst16(compiler, POP | (1 << 8) | pop); + FAIL_IF(push_inst16(compiler, POP | reg_list)); + } else { + if (lr_dst != 0) { + if (reg_list == 0) + return push_inst32(compiler, 0xf85d0b04 | RT4(lr_dst)); + + reg_list |= (sljit_uw)1 << reg_map[lr_dst]; + } + + /* At least two registers must be set for POP_W instruction. */ + SLJIT_ASSERT((reg_list & (reg_list - 1)) != 0); + + FAIL_IF(push_inst32(compiler, POP_W | reg_list)); + } + + if (frame_size > 0) + return push_inst16(compiler, SUB_SP_I | (((sljit_uw)frame_size - sizeof(sljit_sw)) >> 2)); + return SLJIT_SUCCESS; +} + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); + + return emit_stack_frame_release(compiler, 0); } /* --------------------------------------------------------------------- */ @@ -1250,8 +1462,8 @@ extern int __aeabi_idivmod(int numerator, int denominator); SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) { #if !(defined __ARM_FEATURE_IDIV) && !(defined __ARM_ARCH_EXT_IDIV__) - sljit_sw saved_reg_list[3]; - sljit_sw saved_reg_count; + sljit_uw saved_reg_list[3]; + sljit_uw saved_reg_count; #endif CHECK_ERROR(); @@ -1266,10 +1478,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile case SLJIT_LMUL_UW: case SLJIT_LMUL_SW: return push_inst32(compiler, (op == SLJIT_LMUL_UW ? UMULL : SMULL) - | (reg_map[SLJIT_R1] << 8) - | (reg_map[SLJIT_R0] << 12) - | (reg_map[SLJIT_R0] << 16) - | reg_map[SLJIT_R1]); + | RD4(SLJIT_R1) | RT4(SLJIT_R0) | RN4(SLJIT_R0) | RM4(SLJIT_R1)); #if (defined __ARM_FEATURE_IDIV) || (defined __ARM_ARCH_EXT_IDIV__) case SLJIT_DIVMOD_UW: case SLJIT_DIVMOD_SW: @@ -1314,10 +1523,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_R0, SLJIT_R1))); FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_R1, TMP_REG1))); FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, - ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__rt_udiv) : SLJIT_FUNC_OFFSET(__rt_sdiv)))); + ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_ADDR(__rt_udiv) : SLJIT_FUNC_ADDR(__rt_sdiv)))); #elif defined(__GNUC__) FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, - ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); + ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_ADDR(__aeabi_uidivmod) : SLJIT_FUNC_ADDR(__aeabi_idivmod)))); #else #error "Software divmod functions are needed" #endif @@ -1356,7 +1565,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src, srcw); - dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; + dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; op = GET_OPCODE(op); if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) { @@ -1364,6 +1573,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile case SLJIT_MOV: case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: case SLJIT_MOV_P: flags = WORD_SIZE; break; @@ -1394,12 +1604,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile } if (src & SLJIT_IMM) - FAIL_IF(emit_op_imm(compiler, SLJIT_MOV | ARG2_IMM, dst_r, TMP_REG2, srcw)); + FAIL_IF(emit_op_imm(compiler, SLJIT_MOV | ARG2_IMM, dst_r, TMP_REG2, (sljit_uw)srcw)); else if (src & SLJIT_MEM) { FAIL_IF(emit_op_mem(compiler, flags, dst_r, src, srcw, TMP_REG1)); } else { if (dst_r != TMP_REG1) - return emit_op_imm(compiler, op, dst_r, TMP_REG2, src); + return emit_op_imm(compiler, op, dst_r, TMP_REG2, (sljit_uw)src); dst_r = src; } @@ -1409,14 +1619,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); } - if (op == SLJIT_NEG) { -#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ - || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) - compiler->skip_checks = 1; -#endif - return sljit_emit_op2(compiler, SLJIT_SUB | op_flags, dst, dstw, SLJIT_IMM, 0, src, srcw); - } - flags = HAS_FLAGS(op_flags) ? SET_FLAGS : 0; if (src & SLJIT_MEM) { @@ -1424,7 +1626,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile src = TMP_REG1; } - emit_op_imm(compiler, flags | op, dst_r, TMP_REG2, src); + emit_op_imm(compiler, flags | op, dst_r, TMP_REG2, (sljit_uw)src); if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); @@ -1439,17 +1641,17 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile sljit_s32 dst_reg, flags, src2_reg; CHECK_ERROR(); - CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) - return SLJIT_SUCCESS; - - dst_reg = SLOW_IS_REG(dst) ? dst : TMP_REG1; + dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG1; flags = HAS_FLAGS(op) ? SET_FLAGS : 0; + if (dst == TMP_REG1) + flags |= UNUSED_RETURN; + if (src1 & SLJIT_IMM) flags |= ARG1_IMM; else if (src1 & SLJIT_MEM) { @@ -1469,16 +1671,27 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile else src2w = src2; - if (dst == SLJIT_UNUSED) - flags |= UNUSED_RETURN; - - emit_op_imm(compiler, flags | GET_OPCODE(op), dst_reg, src1w, src2w); + emit_op_imm(compiler, flags | GET_OPCODE(op), dst_reg, (sljit_uw)src1w, (sljit_uw)src2w); if (!(dst & SLJIT_MEM)) return SLJIT_SUCCESS; return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG2); } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + return sljit_emit_op2(compiler, op, TMP_REG1, 0, src1, src1w, src2, src2w); +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { @@ -1521,7 +1734,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { CHECK_ERROR(); CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); @@ -1540,22 +1753,22 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *c static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw) { sljit_uw imm; - sljit_sw inst = VSTR_F32 | (flags & (SLJIT_F32_OP | FPU_LOAD)); + sljit_ins inst = VSTR_F32 | (flags & (SLJIT_32 | FPU_LOAD)); SLJIT_ASSERT(arg & SLJIT_MEM); /* Fast loads and stores. */ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) { - FAIL_IF(push_inst32(compiler, ADD_W | RD4(TMP_REG1) | RN4(arg & REG_MASK) | RM4(OFFS_REG(arg)) | ((argw & 0x3) << 6))); + FAIL_IF(push_inst32(compiler, ADD_W | RD4(TMP_REG1) | RN4(arg & REG_MASK) | RM4(OFFS_REG(arg)) | (((sljit_uw)argw & 0x3) << 6))); arg = SLJIT_MEM | TMP_REG1; argw = 0; } if ((arg & REG_MASK) && (argw & 0x3) == 0) { if (!(argw & ~0x3fc)) - return push_inst32(compiler, inst | 0x800000 | RN4(arg & REG_MASK) | DD4(reg) | (argw >> 2)); + return push_inst32(compiler, inst | 0x800000 | RN4(arg & REG_MASK) | DD4(reg) | ((sljit_uw)argw >> 2)); if (!(-argw & ~0x3fc)) - return push_inst32(compiler, inst | RN4(arg & REG_MASK) | DD4(reg) | (-argw >> 2)); + return push_inst32(compiler, inst | RN4(arg & REG_MASK) | DD4(reg) | ((sljit_uw)-argw >> 2)); } if (arg & REG_MASK) { @@ -1563,20 +1776,22 @@ static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, FAIL_IF(compiler->error); return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg)); } - imm = get_imm(argw & ~0x3fc); + + imm = get_imm((sljit_uw)argw & ~(sljit_uw)0x3fc); if (imm != INVALID_IMM) { FAIL_IF(push_inst32(compiler, ADD_WI | RD4(TMP_REG1) | RN4(arg & REG_MASK) | imm)); - return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg) | ((argw & 0x3fc) >> 2)); + return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg) | (((sljit_uw)argw & 0x3fc) >> 2)); } - imm = get_imm(-argw & ~0x3fc); + + imm = get_imm((sljit_uw)-argw & ~(sljit_uw)0x3fc); if (imm != INVALID_IMM) { argw = -argw; FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(arg & REG_MASK) | imm)); - return push_inst32(compiler, inst | RN4(TMP_REG1) | DD4(reg) | ((argw & 0x3fc) >> 2)); + return push_inst32(compiler, inst | RN4(TMP_REG1) | DD4(reg) | (((sljit_uw)argw & 0x3fc) >> 2)); } } - FAIL_IF(load_immediate(compiler, TMP_REG1, argw)); + FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)argw)); if (arg & REG_MASK) FAIL_IF(push_inst16(compiler, ADD | SET_REGS44(TMP_REG1, (arg & REG_MASK)))); return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg)); @@ -1586,14 +1801,14 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_comp sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw) { - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; if (src & SLJIT_MEM) { - FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src, srcw)); + FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG1, src, srcw)); src = TMP_FREG1; } - FAIL_IF(push_inst32(compiler, VCVT_S32_F32 | (op & SLJIT_F32_OP) | DD4(TMP_FREG1) | DM4(src))); + FAIL_IF(push_inst32(compiler, VCVT_S32_F32 | (op & SLJIT_32) | DD4(TMP_FREG1) | DM4(src))); if (FAST_IS_REG(dst)) return push_inst32(compiler, VMOV | (1 << 20) | RT4(dst) | DN4(TMP_FREG1)); @@ -1608,7 +1823,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp { sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; if (FAST_IS_REG(src)) FAIL_IF(push_inst32(compiler, VMOV | RT4(src) | DN4(TMP_FREG1))); @@ -1617,14 +1832,14 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp FAIL_IF(emit_fop_mem(compiler, FPU_LOAD, TMP_FREG1, src, srcw)); } else { - FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); + FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)srcw)); FAIL_IF(push_inst32(compiler, VMOV | RT4(TMP_REG1) | DN4(TMP_FREG1))); } - FAIL_IF(push_inst32(compiler, VCVT_F32_S32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(TMP_FREG1))); + FAIL_IF(push_inst32(compiler, VCVT_F32_S32 | (op & SLJIT_32) | DD4(dst_r) | DM4(TMP_FREG1))); if (dst & SLJIT_MEM) - return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw); + return emit_fop_mem(compiler, (op & SLJIT_32), TMP_FREG1, dst, dstw); return SLJIT_SUCCESS; } @@ -1632,19 +1847,19 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compile sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; if (src1 & SLJIT_MEM) { - emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w); + emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG1, src1, src1w); src1 = TMP_FREG1; } if (src2 & SLJIT_MEM) { - emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w); + emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG2, src2, src2w); src2 = TMP_FREG2; } - FAIL_IF(push_inst32(compiler, VCMP_F32 | (op & SLJIT_F32_OP) | DD4(src1) | DM4(src2))); + FAIL_IF(push_inst32(compiler, VCMP_F32 | (op & SLJIT_32) | DD4(src1) | DM4(src2))); return push_inst32(compiler, VMRS); } @@ -1656,16 +1871,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil CHECK_ERROR(); - SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100), float_transfer_bit_error); + SLJIT_COMPILE_ASSERT((SLJIT_32 == 0x100), float_transfer_bit_error); SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; if (GET_OPCODE(op) != SLJIT_CONV_F64_FROM_F32) - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; if (src & SLJIT_MEM) { - emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, dst_r, src, srcw); + emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, dst_r, src, srcw); src = dst_r; } @@ -1673,25 +1888,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil case SLJIT_MOV_F64: if (src != dst_r) { if (dst_r != TMP_FREG1) - FAIL_IF(push_inst32(compiler, VMOV_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src))); + FAIL_IF(push_inst32(compiler, VMOV_F32 | (op & SLJIT_32) | DD4(dst_r) | DM4(src))); else dst_r = src; } break; case SLJIT_NEG_F64: - FAIL_IF(push_inst32(compiler, VNEG_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src))); + FAIL_IF(push_inst32(compiler, VNEG_F32 | (op & SLJIT_32) | DD4(dst_r) | DM4(src))); break; case SLJIT_ABS_F64: - FAIL_IF(push_inst32(compiler, VABS_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src))); + FAIL_IF(push_inst32(compiler, VABS_F32 | (op & SLJIT_32) | DD4(dst_r) | DM4(src))); break; case SLJIT_CONV_F64_FROM_F32: - FAIL_IF(push_inst32(compiler, VCVT_F64_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src))); - op ^= SLJIT_F32_OP; + FAIL_IF(push_inst32(compiler, VCVT_F64_F32 | (op & SLJIT_32) | DD4(dst_r) | DM4(src))); + op ^= SLJIT_32; break; } if (dst & SLJIT_MEM) - return emit_fop_mem(compiler, (op & SLJIT_F32_OP), dst_r, dst, dstw); + return emit_fop_mem(compiler, (op & SLJIT_32), dst_r, dst, dstw); return SLJIT_SUCCESS; } @@ -1708,36 +1923,36 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compil ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; if (src1 & SLJIT_MEM) { - emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w); + emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG1, src1, src1w); src1 = TMP_FREG1; } if (src2 & SLJIT_MEM) { - emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w); + emit_fop_mem(compiler, (op & SLJIT_32) | FPU_LOAD, TMP_FREG2, src2, src2w); src2 = TMP_FREG2; } switch (GET_OPCODE(op)) { case SLJIT_ADD_F64: - FAIL_IF(push_inst32(compiler, VADD_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2))); + FAIL_IF(push_inst32(compiler, VADD_F32 | (op & SLJIT_32) | DD4(dst_r) | DN4(src1) | DM4(src2))); break; case SLJIT_SUB_F64: - FAIL_IF(push_inst32(compiler, VSUB_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2))); + FAIL_IF(push_inst32(compiler, VSUB_F32 | (op & SLJIT_32) | DD4(dst_r) | DN4(src1) | DM4(src2))); break; case SLJIT_MUL_F64: - FAIL_IF(push_inst32(compiler, VMUL_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2))); + FAIL_IF(push_inst32(compiler, VMUL_F32 | (op & SLJIT_32) | DD4(dst_r) | DN4(src1) | DM4(src2))); break; case SLJIT_DIV_F64: - FAIL_IF(push_inst32(compiler, VDIV_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2))); + FAIL_IF(push_inst32(compiler, VDIV_F32 | (op & SLJIT_32) | DD4(dst_r) | DN4(src1) | DM4(src2))); break; } if (!(dst & SLJIT_MEM)) return SLJIT_SUCCESS; - return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw); + return emit_fop_mem(compiler, (op & SLJIT_32), TMP_FREG1, dst, dstw); } #undef FPU_LOAD @@ -1776,10 +1991,20 @@ static sljit_uw get_cc(struct sljit_compiler *compiler, sljit_s32 type) case SLJIT_NOT_EQUAL_F64: return 0x1; + case SLJIT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD) + return 0x2; + /* fallthrough */ + case SLJIT_LESS: case SLJIT_LESS_F64: return 0x3; + case SLJIT_NOT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD) + return 0x3; + /* fallthrough */ + case SLJIT_GREATER_EQUAL: case SLJIT_GREATER_EQUAL_F64: return 0x2; @@ -1805,15 +2030,17 @@ static sljit_uw get_cc(struct sljit_compiler *compiler, sljit_s32 type) return 0xd; case SLJIT_OVERFLOW: - if (!(compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB)) + if (!(compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB))) return 0x1; + /* fallthrough */ case SLJIT_UNORDERED_F64: return 0x6; case SLJIT_NOT_OVERFLOW: - if (!(compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB)) + if (!(compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB))) return 0x0; + /* fallthrough */ case SLJIT_ORDERED_F64: return 0x7; @@ -1874,113 +2101,126 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile #ifdef __SOFTFP__ -static sljit_s32 softfloat_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src) +static sljit_s32 softfloat_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src, sljit_u32 *extra_space) { - sljit_s32 stack_offset = 0; - sljit_s32 arg_count = 0; - sljit_s32 word_arg_offset = 0; - sljit_s32 float_arg_count = 0; + sljit_u32 is_tail_call = *extra_space & SLJIT_CALL_RETURN; + sljit_u32 offset = 0; + sljit_u32 word_arg_offset = 0; + sljit_u32 float_arg_count = 0; sljit_s32 types = 0; - sljit_s32 src_offset = 4 * sizeof(sljit_sw); + sljit_u32 src_offset = 4 * sizeof(sljit_sw); sljit_u8 offsets[4]; + sljit_u8 *offset_ptr = offsets; if (src && FAST_IS_REG(*src)) - src_offset = reg_map[*src] * sizeof(sljit_sw); + src_offset = (sljit_u32)reg_map[*src] * sizeof(sljit_sw); - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - types = (types << SLJIT_DEF_SHIFT) | (arg_types & SLJIT_DEF_MASK); + types = (types << SLJIT_ARG_SHIFT) | (arg_types & SLJIT_ARG_MASK); - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - offsets[arg_count] = (sljit_u8)stack_offset; - stack_offset += sizeof(sljit_f32); - arg_count++; + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (offset & 0x7) + offset += sizeof(sljit_sw); + *offset_ptr++ = (sljit_u8)offset; + offset += sizeof(sljit_f64); float_arg_count++; break; - case SLJIT_ARG_TYPE_F64: - if (stack_offset & 0x7) - stack_offset += sizeof(sljit_sw); - offsets[arg_count] = (sljit_u8)stack_offset; - stack_offset += sizeof(sljit_f64); - arg_count++; + case SLJIT_ARG_TYPE_F32: + *offset_ptr++ = (sljit_u8)offset; + offset += sizeof(sljit_f32); float_arg_count++; break; default: - offsets[arg_count] = (sljit_u8)stack_offset; - stack_offset += sizeof(sljit_sw); - arg_count++; + *offset_ptr++ = (sljit_u8)offset; + offset += sizeof(sljit_sw); word_arg_offset += sizeof(sljit_sw); break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } - if (stack_offset > 16) - FAIL_IF(push_inst16(compiler, SUB_SP | (((stack_offset - 16) + 0x7) & ~0x7) >> 2)); + if (offset > 4 * sizeof(sljit_sw) && (!is_tail_call || offset > compiler->args_size)) { + /* Keep lr register on the stack. */ + if (is_tail_call) + offset += sizeof(sljit_sw); + + offset = ((offset - 4 * sizeof(sljit_sw)) + 0x7) & ~(sljit_uw)0x7; + + *extra_space = offset; + + if (is_tail_call) + FAIL_IF(emit_stack_frame_release(compiler, (sljit_s32)offset)); + else + FAIL_IF(push_inst16(compiler, SUB_SP_I | (offset >> 2))); + } else { + if (is_tail_call) + FAIL_IF(emit_stack_frame_release(compiler, -1)); + *extra_space = 0; + } SLJIT_ASSERT(reg_map[TMP_REG1] == 12); /* Process arguments in reversed direction. */ while (types) { - switch (types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - arg_count--; + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: float_arg_count--; - stack_offset = offsets[arg_count]; + offset = *(--offset_ptr); + + SLJIT_ASSERT((offset & 0x7) == 0); - if (stack_offset < 16) { - if (src_offset == stack_offset) { + if (offset < 4 * sizeof(sljit_sw)) { + if (src_offset == offset || src_offset == offset + sizeof(sljit_sw)) { FAIL_IF(push_inst16(compiler, MOV | (src_offset << 1) | 4 | (1 << 7))); *src = TMP_REG1; } - FAIL_IF(push_inst32(compiler, VMOV | 0x100000 | (float_arg_count << 16) | (stack_offset << 10))); + FAIL_IF(push_inst32(compiler, VMOV2 | 0x100000 | (offset << 10) | ((offset + sizeof(sljit_sw)) << 14) | float_arg_count)); } else - FAIL_IF(push_inst32(compiler, VSTR_F32 | 0x800000 | RN4(SLJIT_SP) | (float_arg_count << 12) | ((stack_offset - 16) >> 2))); + FAIL_IF(push_inst32(compiler, VSTR_F32 | 0x800100 | RN4(SLJIT_SP) + | (float_arg_count << 12) | ((offset - 4 * sizeof(sljit_sw)) >> 2))); break; - case SLJIT_ARG_TYPE_F64: - arg_count--; + case SLJIT_ARG_TYPE_F32: float_arg_count--; - stack_offset = offsets[arg_count]; - - SLJIT_ASSERT((stack_offset & 0x7) == 0); + offset = *(--offset_ptr); - if (stack_offset < 16) { - if (src_offset == stack_offset || src_offset == stack_offset + sizeof(sljit_sw)) { + if (offset < 4 * sizeof(sljit_sw)) { + if (src_offset == offset) { FAIL_IF(push_inst16(compiler, MOV | (src_offset << 1) | 4 | (1 << 7))); *src = TMP_REG1; } - FAIL_IF(push_inst32(compiler, VMOV2 | 0x100000 | (stack_offset << 10) | ((stack_offset + sizeof(sljit_sw)) << 14) | float_arg_count)); + FAIL_IF(push_inst32(compiler, VMOV | 0x100000 | (float_arg_count << 16) | (offset << 10))); } else - FAIL_IF(push_inst32(compiler, VSTR_F32 | 0x800100 | RN4(SLJIT_SP) | (float_arg_count << 12) | ((stack_offset - 16) >> 2))); + FAIL_IF(push_inst32(compiler, VSTR_F32 | 0x800000 | RN4(SLJIT_SP) + | (float_arg_count << 12) | ((offset - 4 * sizeof(sljit_sw)) >> 2))); break; default: - arg_count--; word_arg_offset -= sizeof(sljit_sw); - stack_offset = offsets[arg_count]; + offset = *(--offset_ptr); - SLJIT_ASSERT(stack_offset >= word_arg_offset); + SLJIT_ASSERT(offset >= word_arg_offset); - if (stack_offset != word_arg_offset) { - if (stack_offset < 16) { - if (src_offset == stack_offset) { + if (offset != word_arg_offset) { + if (offset < 4 * sizeof(sljit_sw)) { + if (src_offset == offset) { FAIL_IF(push_inst16(compiler, MOV | (src_offset << 1) | 4 | (1 << 7))); *src = TMP_REG1; } else if (src_offset == word_arg_offset) { - *src = 1 + (stack_offset >> 2); - src_offset = stack_offset; + *src = (sljit_s32)(1 + (offset >> 2)); + src_offset = offset; } - FAIL_IF(push_inst16(compiler, MOV | (stack_offset >> 2) | (word_arg_offset << 1))); + FAIL_IF(push_inst16(compiler, MOV | (offset >> 2) | (word_arg_offset << 1))); } else - FAIL_IF(push_inst16(compiler, STR_SP | (word_arg_offset << 6) | ((stack_offset - 16) >> 2))); + FAIL_IF(push_inst16(compiler, STR_SP | (word_arg_offset << 6) | ((offset - 4 * sizeof(sljit_sw)) >> 2))); } break; } - types >>= SLJIT_DEF_SHIFT; + types >>= SLJIT_ARG_SHIFT; } return SLJIT_SUCCESS; @@ -1988,83 +2228,48 @@ static sljit_s32 softfloat_call_with_args(struct sljit_compiler *compiler, sljit static sljit_s32 softfloat_post_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types) { - sljit_s32 stack_size = 0; - - if ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F32) - FAIL_IF(push_inst32(compiler, VMOV | (0 << 16) | (0 << 12))); - if ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F64) + if ((arg_types & SLJIT_ARG_MASK) == SLJIT_ARG_TYPE_F64) FAIL_IF(push_inst32(compiler, VMOV2 | (1 << 16) | (0 << 12) | 0)); + if ((arg_types & SLJIT_ARG_MASK) == SLJIT_ARG_TYPE_F32) + FAIL_IF(push_inst32(compiler, VMOV | (0 << 16) | (0 << 12))); - arg_types >>= SLJIT_DEF_SHIFT; - - while (arg_types) { - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - stack_size += sizeof(sljit_f32); - break; - case SLJIT_ARG_TYPE_F64: - if (stack_size & 0x7) - stack_size += sizeof(sljit_sw); - stack_size += sizeof(sljit_f64); - break; - default: - stack_size += sizeof(sljit_sw); - break; - } - - arg_types >>= SLJIT_DEF_SHIFT; - } - - if (stack_size <= 16) - return SLJIT_SUCCESS; - - return push_inst16(compiler, ADD_SP | ((((stack_size - 16) + 0x7) & ~0x7) >> 2)); + return SLJIT_SUCCESS; } #else static sljit_s32 hardfloat_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types) { - sljit_u32 remap = 0; - sljit_u32 offset = 0; - sljit_u32 new_offset, mask; + sljit_u32 offset = SLJIT_FR0; + sljit_u32 new_offset = SLJIT_FR0; + sljit_u32 f32_offset = 0; /* Remove return value. */ - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - if ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F32) { - new_offset = 0; - mask = 1; - - while (remap & mask) { - new_offset++; - mask <<= 1; - } - remap |= mask; - + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: if (offset != new_offset) - FAIL_IF(push_inst32(compiler, VMOV_F32 | DD4((new_offset >> 1) + 1) - | ((new_offset & 0x1) ? 0x400000 : 0) | DM4((offset >> 1) + 1))); - - offset += 2; - } - else if ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F64) { - new_offset = 0; - mask = 3; + FAIL_IF(push_inst32(compiler, VMOV_F32 | SLJIT_32 | DD4(new_offset) | DM4(offset))); - while (remap & mask) { - new_offset += 2; - mask <<= 2; + new_offset++; + offset++; + break; + case SLJIT_ARG_TYPE_F32: + if (f32_offset != 0) { + FAIL_IF(push_inst32(compiler, VMOV_F32 | 0x400000 | DD4(f32_offset) | DM4(offset))); + f32_offset = 0; + } else { + if (offset != new_offset) + FAIL_IF(push_inst32(compiler, VMOV_F32 | 0x400000 | DD4(new_offset) | DM4(offset))); + f32_offset = new_offset; + new_offset++; } - remap |= mask; - - if (offset != new_offset) - FAIL_IF(push_inst32(compiler, VMOV_F32 | SLJIT_F32_OP | DD4((new_offset >> 1) + 1) | DM4((offset >> 1) + 1))); - - offset += 2; + offset++; + break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } return SLJIT_SUCCESS; @@ -2077,13 +2282,18 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile { #ifdef __SOFTFP__ struct sljit_jump *jump; + sljit_u32 extra_space = (sljit_u32)type; #endif CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_call(compiler, type, arg_types)); #ifdef __SOFTFP__ - PTR_FAIL_IF(softfloat_call_with_args(compiler, arg_types, NULL)); + PTR_FAIL_IF(softfloat_call_with_args(compiler, arg_types, NULL, &extra_space)); + SLJIT_ASSERT((extra_space & 0x7) == 0); + + if ((type & SLJIT_CALL_RETURN) && extra_space == 0) + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -2093,9 +2303,29 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile jump = sljit_emit_jump(compiler, type); PTR_FAIL_IF(jump == NULL); + if (extra_space > 0) { + if (type & SLJIT_CALL_RETURN) + PTR_FAIL_IF(push_inst32(compiler, LDR | RT4(TMP_REG2) + | RN4(SLJIT_SP) | (extra_space - sizeof(sljit_sw)))); + + PTR_FAIL_IF(push_inst16(compiler, ADD_SP_I | (extra_space >> 2))); + + if (type & SLJIT_CALL_RETURN) { + PTR_FAIL_IF(push_inst16(compiler, BX | RN3(TMP_REG2))); + return jump; + } + } + + SLJIT_ASSERT(!(type & SLJIT_CALL_RETURN)); PTR_FAIL_IF(softfloat_post_call_with_args(compiler, arg_types)); return jump; #else + if (type & SLJIT_CALL_RETURN) { + /* ldmia sp!, {..., lr} */ + PTR_FAIL_IF(emit_stack_frame_release(compiler, -1)); + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); + } + PTR_FAIL_IF(hardfloat_call_with_args(compiler, arg_types)); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ @@ -2132,7 +2362,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); FAIL_IF(!jump); set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); - jump->u.target = srcw; + jump->u.target = (sljit_uw)srcw; FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0)); jump->addr = compiler->size; @@ -2143,16 +2373,29 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi sljit_s32 arg_types, sljit_s32 src, sljit_sw srcw) { +#ifdef __SOFTFP__ + sljit_u32 extra_space = (sljit_u32)type; +#endif + CHECK_ERROR(); CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); -#ifdef __SOFTFP__ if (src & SLJIT_MEM) { FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, src, srcw, TMP_REG1)); src = TMP_REG1; } - FAIL_IF(softfloat_call_with_args(compiler, arg_types, &src)); + if ((type & SLJIT_CALL_RETURN) && (src >= SLJIT_FIRST_SAVED_REG && src <= SLJIT_S0)) { + FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG1, src))); + src = TMP_REG1; + } + +#ifdef __SOFTFP__ + FAIL_IF(softfloat_call_with_args(compiler, arg_types, &src, &extra_space)); + SLJIT_ASSERT((extra_space & 0x7) == 0); + + if ((type & SLJIT_CALL_RETURN) && extra_space == 0) + type = SLJIT_JUMP; #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -2161,8 +2404,26 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi FAIL_IF(sljit_emit_ijump(compiler, type, src, srcw)); + if (extra_space > 0) { + if (type & SLJIT_CALL_RETURN) + FAIL_IF(push_inst32(compiler, LDR | RT4(TMP_REG2) + | RN4(SLJIT_SP) | (extra_space - sizeof(sljit_sw)))); + + FAIL_IF(push_inst16(compiler, ADD_SP_I | (extra_space >> 2))); + + if (type & SLJIT_CALL_RETURN) + return push_inst16(compiler, BX | RN3(TMP_REG2)); + } + + SLJIT_ASSERT(!(type & SLJIT_CALL_RETURN)); return softfloat_post_call_with_args(compiler, arg_types); #else /* !__SOFTFP__ */ + if (type & SLJIT_CALL_RETURN) { + /* ldmia sp!, {..., lr} */ + FAIL_IF(emit_stack_frame_release(compiler, -1)); + type = SLJIT_JUMP; + } + FAIL_IF(hardfloat_call_with_args(compiler, arg_types)); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ @@ -2236,7 +2497,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil CHECK_ERROR(); CHECK(check_sljit_emit_cmov(compiler, type, dst_reg, src, srcw)); - dst_reg &= ~SLJIT_I32_OP; + dst_reg &= ~SLJIT_32; cc = get_cc(compiler, type & 0xff); @@ -2254,13 +2515,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil | COPY_BITS(tmp, 12, 16, 4) | COPY_BITS(tmp, 11, 26, 1) | COPY_BITS(tmp, 8, 12, 3) | (tmp & 0xff)); } - tmp = get_imm(srcw); + tmp = get_imm((sljit_uw)srcw); if (tmp != INVALID_IMM) { FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8)); return push_inst32(compiler, MOV_WI | RD4(dst_reg) | tmp); } - tmp = get_imm(~srcw); + tmp = get_imm(~(sljit_uw)srcw); if (tmp != INVALID_IMM) { FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8)); return push_inst32(compiler, MVN_WI | RD4(dst_reg) | tmp); @@ -2295,6 +2556,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile case SLJIT_MOV: case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: case SLJIT_MOV_P: flags = WORD_SIZE; break; @@ -2329,7 +2591,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile else memw = -memw; - return push_inst32(compiler, inst | RT4(reg) | RN4(mem & REG_MASK) | memw); + return push_inst32(compiler, inst | RT4(reg) | RN4(mem & REG_MASK) | (sljit_ins)memw); } SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value) @@ -2346,7 +2608,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compi set_const(const_, compiler); dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; - PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, init_value)); + PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, (sljit_uw)init_value)); if (dst & SLJIT_MEM) PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); @@ -2388,5 +2650,5 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - sljit_set_jump_addr(addr, new_constant, executable_offset); + sljit_set_jump_addr(addr, (sljit_uw)new_constant, executable_offset); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c index a90345f1f8..1a06b17d12 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c @@ -73,50 +73,49 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl switch (GET_OPCODE(op)) { case SLJIT_MOV: - case SLJIT_MOV_U32: - case SLJIT_MOV_S32: - case SLJIT_MOV_P: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); if (dst != src2) return push_inst(compiler, ADDU | S(src2) | TA(0) | D(dst), DR(dst)); return SLJIT_SUCCESS; case SLJIT_MOV_U8: + SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); + if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) + return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xff), DR(dst)); + SLJIT_ASSERT(dst == src2); + return SLJIT_SUCCESS; + case SLJIT_MOV_S8: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { - if (op == SLJIT_MOV_S8) { #if (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 1) - return push_inst(compiler, SEB | T(src2) | D(dst), DR(dst)); + return push_inst(compiler, SEB | T(src2) | D(dst), DR(dst)); #else /* SLJIT_MIPS_REV < 1 */ - FAIL_IF(push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(24), DR(dst))); - return push_inst(compiler, SRA | T(dst) | D(dst) | SH_IMM(24), DR(dst)); + FAIL_IF(push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(24), DR(dst))); + return push_inst(compiler, SRA | T(dst) | D(dst) | SH_IMM(24), DR(dst)); #endif /* SLJIT_MIPS_REV >= 1 */ - } - return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xff), DR(dst)); - } - else { - SLJIT_ASSERT(dst == src2); } + SLJIT_ASSERT(dst == src2); return SLJIT_SUCCESS; case SLJIT_MOV_U16: + SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); + if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) + return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xffff), DR(dst)); + SLJIT_ASSERT(dst == src2); + return SLJIT_SUCCESS; + case SLJIT_MOV_S16: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { - if (op == SLJIT_MOV_S16) { #if (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 1) - return push_inst(compiler, SEH | T(src2) | D(dst), DR(dst)); + return push_inst(compiler, SEH | T(src2) | D(dst), DR(dst)); #else /* SLJIT_MIPS_REV < 1 */ - FAIL_IF(push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(16), DR(dst))); - return push_inst(compiler, SRA | T(dst) | D(dst) | SH_IMM(16), DR(dst)); + FAIL_IF(push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(16), DR(dst))); + return push_inst(compiler, SRA | T(dst) | D(dst) | SH_IMM(16), DR(dst)); #endif /* SLJIT_MIPS_REV >= 1 */ - } - return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xffff), DR(dst)); - } - else { - SLJIT_ASSERT(dst == src2); } + SLJIT_ASSERT(dst == src2); return SLJIT_SUCCESS; case SLJIT_NOT: @@ -438,131 +437,120 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - sljit_set_jump_addr(addr, new_constant, executable_offset); + sljit_set_jump_addr(addr, (sljit_uw)new_constant, executable_offset); } -static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_ins *ins_ptr) +static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_ins *ins_ptr, sljit_u32 *extra_space) { - sljit_s32 stack_offset = 0; - sljit_s32 arg_count = 0; + sljit_u32 is_tail_call = *extra_space & SLJIT_CALL_RETURN; + sljit_u32 offset = 0; sljit_s32 float_arg_count = 0; sljit_s32 word_arg_count = 0; sljit_s32 types = 0; - sljit_s32 arg_count_save, types_save; sljit_ins prev_ins = NOP; sljit_ins ins = NOP; sljit_u8 offsets[4]; + sljit_u8 *offsets_ptr = offsets; SLJIT_ASSERT(reg_map[TMP_REG1] == 4 && freg_map[TMP_FREG1] == 12); - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; + + /* See ABI description in sljit_emit_enter. */ while (arg_types) { - types = (types << SLJIT_DEF_SHIFT) | (arg_types & SLJIT_DEF_MASK); + types = (types << SLJIT_ARG_SHIFT) | (arg_types & SLJIT_ARG_MASK); + *offsets_ptr = (sljit_u8)offset; - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - offsets[arg_count] = (sljit_u8)stack_offset; + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (offset & 0x7) { + offset += sizeof(sljit_sw); + *offsets_ptr = (sljit_u8)offset; + } - if (word_arg_count == 0 && arg_count <= 1) - offsets[arg_count] = 254 + arg_count; + if (word_arg_count == 0 && float_arg_count <= 1) + *offsets_ptr = (sljit_u8)(254 + float_arg_count); - stack_offset += sizeof(sljit_f32); - arg_count++; + offset += sizeof(sljit_f64); float_arg_count++; break; - case SLJIT_ARG_TYPE_F64: - if (stack_offset & 0x7) - stack_offset += sizeof(sljit_sw); - offsets[arg_count] = (sljit_u8)stack_offset; - - if (word_arg_count == 0 && arg_count <= 1) - offsets[arg_count] = 254 + arg_count; + case SLJIT_ARG_TYPE_F32: + if (word_arg_count == 0 && float_arg_count <= 1) + *offsets_ptr = (sljit_u8)(254 + float_arg_count); - stack_offset += sizeof(sljit_f64); - arg_count++; + offset += sizeof(sljit_f32); float_arg_count++; break; default: - offsets[arg_count] = (sljit_u8)stack_offset; - stack_offset += sizeof(sljit_sw); - arg_count++; + offset += sizeof(sljit_sw); word_arg_count++; break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; + offsets_ptr++; } - /* Stack is aligned to 16 bytes, max two doubles can be placed on the stack. */ - if (stack_offset > 16) - FAIL_IF(push_inst(compiler, ADDIU | S(SLJIT_SP) | T(SLJIT_SP) | IMM(-16), DR(SLJIT_SP))); + /* Stack is aligned to 16 bytes. */ + SLJIT_ASSERT(offset <= 8 * sizeof(sljit_sw)); - types_save = types; - arg_count_save = arg_count; + if (offset > 4 * sizeof(sljit_sw) && (!is_tail_call || offset > compiler->args_size)) { + if (is_tail_call) { + offset = (offset + sizeof(sljit_sw) + 15) & ~(sljit_uw)0xf; + FAIL_IF(emit_stack_frame_release(compiler, (sljit_s32)offset, &prev_ins)); + *extra_space = offset; + } else { + FAIL_IF(push_inst(compiler, ADDIU | S(SLJIT_SP) | T(SLJIT_SP) | IMM(-16), DR(SLJIT_SP))); + *extra_space = 16; + } + } else { + if (is_tail_call) + FAIL_IF(emit_stack_frame_release(compiler, 0, &prev_ins)); + *extra_space = 0; + } while (types) { - switch (types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - arg_count--; - if (offsets[arg_count] < 254) - ins = SWC1 | S(SLJIT_SP) | FT(float_arg_count) | IMM(offsets[arg_count]); - float_arg_count--; - break; - case SLJIT_ARG_TYPE_F64: - arg_count--; - if (offsets[arg_count] < 254) - ins = SDC1 | S(SLJIT_SP) | FT(float_arg_count) | IMM(offsets[arg_count]); - float_arg_count--; - break; - default: - if (offsets[arg_count - 1] >= 16) - ins = SW | S(SLJIT_SP) | T(word_arg_count) | IMM(offsets[arg_count - 1]); - else if (arg_count != word_arg_count) - ins = ADDU | S(word_arg_count) | TA(0) | DA(4 + (offsets[arg_count - 1] >> 2)); - else if (arg_count == 1) - ins = ADDU | S(SLJIT_R0) | TA(0) | DA(4); + --offsets_ptr; - arg_count--; - word_arg_count--; - break; - } - - if (ins != NOP) { - if (prev_ins != NOP) - FAIL_IF(push_inst(compiler, prev_ins, MOVABLE_INS)); - prev_ins = ins; - ins = NOP; - } + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (*offsets_ptr < 4 * sizeof (sljit_sw)) { + if (prev_ins != NOP) + FAIL_IF(push_inst(compiler, prev_ins, MOVABLE_INS)); - types >>= SLJIT_DEF_SHIFT; - } + /* Must be preceded by at least one other argument, + * and its starting offset must be 8 because of alignment. */ + SLJIT_ASSERT((*offsets_ptr >> 2) == 2); - types = types_save; - arg_count = arg_count_save; + prev_ins = MFC1 | TA(6) | FS(float_arg_count) | (1 << 11); + ins = MFC1 | TA(7) | FS(float_arg_count); + } else if (*offsets_ptr < 254) + ins = SDC1 | S(SLJIT_SP) | FT(float_arg_count) | IMM(*offsets_ptr); + else if (*offsets_ptr == 254) + ins = MOV_S | FMT_D | FS(SLJIT_FR0) | FD(TMP_FREG1); - while (types) { - switch (types & SLJIT_DEF_MASK) { + float_arg_count--; + break; case SLJIT_ARG_TYPE_F32: - arg_count--; - if (offsets[arg_count] == 254) + if (*offsets_ptr < 4 * sizeof (sljit_sw)) + ins = MFC1 | TA(4 + (*offsets_ptr >> 2)) | FS(float_arg_count); + else if (*offsets_ptr < 254) + ins = SWC1 | S(SLJIT_SP) | FT(float_arg_count) | IMM(*offsets_ptr); + else if (*offsets_ptr == 254) ins = MOV_S | FMT_S | FS(SLJIT_FR0) | FD(TMP_FREG1); - else if (offsets[arg_count] < 16) - ins = LW | S(SLJIT_SP) | TA(4 + (offsets[arg_count] >> 2)) | IMM(offsets[arg_count]); - break; - case SLJIT_ARG_TYPE_F64: - arg_count--; - if (offsets[arg_count] == 254) - ins = MOV_S | FMT_D | FS(SLJIT_FR0) | FD(TMP_FREG1); - else if (offsets[arg_count] < 16) { - if (prev_ins != NOP) - FAIL_IF(push_inst(compiler, prev_ins, MOVABLE_INS)); - prev_ins = LW | S(SLJIT_SP) | TA(4 + (offsets[arg_count] >> 2)) | IMM(offsets[arg_count]); - ins = LW | S(SLJIT_SP) | TA(5 + (offsets[arg_count] >> 2)) | IMM(offsets[arg_count] + sizeof(sljit_sw)); - } + + float_arg_count--; break; default: - arg_count--; + if (*offsets_ptr >= 4 * sizeof (sljit_sw)) + ins = SW | S(SLJIT_SP) | T(word_arg_count) | IMM(*offsets_ptr); + else if ((*offsets_ptr >> 2) != word_arg_count - 1) + ins = ADDU | S(word_arg_count) | TA(0) | DA(4 + (*offsets_ptr >> 2)); + else if (*offsets_ptr == 0) + ins = ADDU | S(SLJIT_R0) | TA(0) | DA(4); + + word_arg_count--; break; } @@ -573,7 +561,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t ins = NOP; } - types >>= SLJIT_DEF_SHIFT; + types >>= SLJIT_ARG_SHIFT; } *ins_ptr = prev_ins; @@ -581,41 +569,11 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t return SLJIT_SUCCESS; } -static sljit_s32 post_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types) -{ - sljit_s32 stack_offset = 0; - - arg_types >>= SLJIT_DEF_SHIFT; - - while (arg_types) { - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - stack_offset += sizeof(sljit_f32); - break; - case SLJIT_ARG_TYPE_F64: - if (stack_offset & 0x7) - stack_offset += sizeof(sljit_sw); - stack_offset += sizeof(sljit_f64); - break; - default: - stack_offset += sizeof(sljit_sw); - break; - } - - arg_types >>= SLJIT_DEF_SHIFT; - } - - /* Stack is aligned to 16 bytes, max two doubles can be placed on the stack. */ - if (stack_offset > 16) - return push_inst(compiler, ADDIU | S(SLJIT_SP) | T(SLJIT_SP) | IMM(16), DR(SLJIT_SP)); - - return SLJIT_SUCCESS; -} - SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 arg_types) { struct sljit_jump *jump; + sljit_u32 extra_space = (sljit_u32)type; sljit_ins ins; CHECK_ERROR_PTR(); @@ -624,21 +582,34 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); PTR_FAIL_IF(!jump); set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); - type &= 0xff; - PTR_FAIL_IF(call_with_args(compiler, arg_types, &ins)); + PTR_FAIL_IF(call_with_args(compiler, arg_types, &ins, &extra_space)); SLJIT_ASSERT(DR(PIC_ADDR_REG) == 25 && PIC_ADDR_REG == TMP_REG2); PTR_FAIL_IF(emit_const(compiler, PIC_ADDR_REG, 0)); - jump->flags |= IS_JAL | IS_CALL; - PTR_FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS)); + if (!(type & SLJIT_CALL_RETURN) || extra_space > 0) { + jump->flags |= IS_JAL | IS_CALL; + PTR_FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS)); + } else + PTR_FAIL_IF(push_inst(compiler, JR | S(PIC_ADDR_REG), UNMOVABLE_INS)); + jump->addr = compiler->size; PTR_FAIL_IF(push_inst(compiler, ins, UNMOVABLE_INS)); - PTR_FAIL_IF(post_call_with_args(compiler, arg_types)); + if (extra_space == 0) + return jump; + + if (type & SLJIT_CALL_RETURN) + PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, RETURN_ADDR_REG, + SLJIT_MEM1(SLJIT_SP), (sljit_sw)(extra_space - sizeof(sljit_sw)))); + + if (type & SLJIT_CALL_RETURN) + PTR_FAIL_IF(push_inst(compiler, JR | SA(RETURN_ADDR_REG), UNMOVABLE_INS)); + PTR_FAIL_IF(push_inst(compiler, ADDIU | S(SLJIT_SP) | T(SLJIT_SP) | IMM(extra_space), + (type & SLJIT_CALL_RETURN) ? UNMOVABLE_INS : DR(SLJIT_SP))); return jump; } @@ -646,6 +617,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi sljit_s32 arg_types, sljit_s32 src, sljit_sw srcw) { + sljit_u32 extra_space = (sljit_u32)type; sljit_ins ins; CHECK_ERROR(); @@ -662,10 +634,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, DR(PIC_ADDR_REG), src, srcw)); } - FAIL_IF(call_with_args(compiler, arg_types, &ins)); + FAIL_IF(call_with_args(compiler, arg_types, &ins, &extra_space)); /* Register input. */ - FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS)); + if (!(type & SLJIT_CALL_RETURN) || extra_space > 0) + FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS)); + else + FAIL_IF(push_inst(compiler, JR | S(PIC_ADDR_REG), UNMOVABLE_INS)); FAIL_IF(push_inst(compiler, ins, UNMOVABLE_INS)); - return post_call_with_args(compiler, arg_types); + + if (extra_space == 0) + return SLJIT_SUCCESS; + + if (type & SLJIT_CALL_RETURN) + FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, RETURN_ADDR_REG, + SLJIT_MEM1(SLJIT_SP), (sljit_sw)(extra_space - sizeof(sljit_sw)))); + + if (type & SLJIT_CALL_RETURN) + FAIL_IF(push_inst(compiler, JR | SA(RETURN_ADDR_REG), UNMOVABLE_INS)); + + return push_inst(compiler, ADDIU | S(SLJIT_SP) | T(SLJIT_SP) | IMM(extra_space), + (type & SLJIT_CALL_RETURN) ? UNMOVABLE_INS : DR(SLJIT_SP)); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c index 1f22e49ed9..c2b3d839c2 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c @@ -46,9 +46,9 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst_a } /* Zero extended number. */ - uimm = imm; + uimm = (sljit_uw)imm; if (imm < 0) { - uimm = ~imm; + uimm = ~(sljit_uw)imm; inv = 1; } @@ -119,7 +119,7 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst_a } #define SELECT_OP(a, b) \ - (!(op & SLJIT_I32_OP) ? a : b) + (!(op & SLJIT_32) ? a : b) #define EMIT_LOGICAL(op_imm, op_norm) \ if (flags & SRC2_IMM) { \ @@ -138,19 +138,19 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst_a #define EMIT_SHIFT(op_dimm, op_dimm32, op_imm, op_dv, op_v) \ if (flags & SRC2_IMM) { \ if (src2 >= 32) { \ - SLJIT_ASSERT(!(op & SLJIT_I32_OP)); \ + SLJIT_ASSERT(!(op & SLJIT_32)); \ ins = op_dimm32; \ src2 -= 32; \ } \ else \ - ins = (op & SLJIT_I32_OP) ? op_imm : op_dimm; \ + ins = (op & SLJIT_32) ? op_imm : op_dimm; \ if (op & SLJIT_SET_Z) \ FAIL_IF(push_inst(compiler, ins | T(src1) | DA(EQUAL_FLAG) | SH_IMM(src2), EQUAL_FLAG)); \ if (!(flags & UNUSED_DEST)) \ FAIL_IF(push_inst(compiler, ins | T(src1) | D(dst) | SH_IMM(src2), DR(dst))); \ } \ else { \ - ins = (op & SLJIT_I32_OP) ? op_v : op_dv; \ + ins = (op & SLJIT_32) ? op_v : op_dv; \ if (op & SLJIT_SET_Z) \ FAIL_IF(push_inst(compiler, ins | S(src2) | T(src1) | DA(EQUAL_FLAG), EQUAL_FLAG)); \ if (!(flags & UNUSED_DEST)) \ @@ -165,50 +165,71 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl switch (GET_OPCODE(op)) { case SLJIT_MOV: - case SLJIT_MOV_P: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); if (dst != src2) return push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(src2) | TA(0) | D(dst), DR(dst)); return SLJIT_SUCCESS; case SLJIT_MOV_U8: + SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); + if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) + return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xff), DR(dst)); + SLJIT_ASSERT(dst == src2); + return SLJIT_SUCCESS; + case SLJIT_MOV_S8: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { - if (op == SLJIT_MOV_S8) { - FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(24), DR(dst))); - return push_inst(compiler, DSRA32 | T(dst) | D(dst) | SH_IMM(24), DR(dst)); - } - return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xff), DR(dst)); - } - else { - SLJIT_ASSERT(dst == src2); +#if (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 1) + if (op & SLJIT_32) + return push_inst(compiler, SEB | T(src2) | D(dst), DR(dst)); +#endif /* SLJIT_MIPS_REV >= 1 */ + FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(24), DR(dst))); + return push_inst(compiler, DSRA32 | T(dst) | D(dst) | SH_IMM(24), DR(dst)); } + SLJIT_ASSERT(dst == src2); return SLJIT_SUCCESS; case SLJIT_MOV_U16: + SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); + if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) + return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xffff), DR(dst)); + SLJIT_ASSERT(dst == src2); + return SLJIT_SUCCESS; + case SLJIT_MOV_S16: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { - if (op == SLJIT_MOV_S16) { - FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(16), DR(dst))); - return push_inst(compiler, DSRA32 | T(dst) | D(dst) | SH_IMM(16), DR(dst)); - } - return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xffff), DR(dst)); - } - else { - SLJIT_ASSERT(dst == src2); +#if (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 1) + if (op & SLJIT_32) + return push_inst(compiler, SEH | T(src2) | D(dst), DR(dst)); +#endif /* SLJIT_MIPS_REV >= 1 */ + FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(16), DR(dst))); + return push_inst(compiler, DSRA32 | T(dst) | D(dst) | SH_IMM(16), DR(dst)); } + SLJIT_ASSERT(dst == src2); return SLJIT_SUCCESS; case SLJIT_MOV_U32: - SLJIT_ASSERT(!(op & SLJIT_I32_OP)); - FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(0), DR(dst))); - return push_inst(compiler, DSRL32 | T(dst) | D(dst) | SH_IMM(0), DR(dst)); + SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM) && !(op & SLJIT_32)); + if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { +#if (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 2) + if (dst == src2) + return push_inst(compiler, DINSU | T(src2) | SA(0) | (31 << 11) | (0 << 11), DR(dst)); +#endif /* SLJIT_MIPS_REV >= 2 */ + FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(0), DR(dst))); + return push_inst(compiler, DSRL32 | T(dst) | D(dst) | SH_IMM(0), DR(dst)); + } + SLJIT_ASSERT(dst == src2); + return SLJIT_SUCCESS; case SLJIT_MOV_S32: - SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); - return push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(0), DR(dst)); + SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM) && !(op & SLJIT_32)); + if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { + return push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(0), DR(dst)); + } + SLJIT_ASSERT(dst == src2); + return SLJIT_SUCCESS; case SLJIT_NOT: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); @@ -234,7 +255,7 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl FAIL_IF(push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(src2) | TA(0) | D(TMP_REG1), DR(TMP_REG1))); /* Check zero. */ FAIL_IF(push_inst(compiler, BEQ | S(TMP_REG1) | TA(0) | IMM(5), UNMOVABLE_INS)); - FAIL_IF(push_inst(compiler, ORI | SA(0) | T(dst) | IMM((op & SLJIT_I32_OP) ? 32 : 64), UNMOVABLE_INS)); + FAIL_IF(push_inst(compiler, ORI | SA(0) | T(dst) | IMM((op & SLJIT_32) ? 32 : 64), UNMOVABLE_INS)); FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | SA(0) | T(dst) | IMM(-1), DR(dst))); /* Loop for searching the highest bit. */ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | S(dst) | T(dst) | IMM(1), DR(dst))); @@ -462,7 +483,7 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl #if (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 6) return push_inst(compiler, SELECT_OP(DMUL, MUL) | S(src1) | T(src2) | D(dst), DR(dst)); #elif (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 1) - if (op & SLJIT_I32_OP) + if (op & SLJIT_32) return push_inst(compiler, MUL | S(src1) | T(src2) | D(dst), DR(dst)); FAIL_IF(push_inst(compiler, DMULT | S(src1) | T(src2), MOVABLE_INS)); return push_inst(compiler, MFLO | D(dst), DR(dst)); @@ -528,10 +549,10 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_UNUSED_ARG(executable_offset); SLJIT_UPDATE_WX_FLAGS(inst, inst + 6, 0); - inst[0] = (inst[0] & 0xffff0000) | ((new_target >> 48) & 0xffff); - inst[1] = (inst[1] & 0xffff0000) | ((new_target >> 32) & 0xffff); - inst[3] = (inst[3] & 0xffff0000) | ((new_target >> 16) & 0xffff); - inst[5] = (inst[5] & 0xffff0000) | (new_target & 0xffff); + inst[0] = (inst[0] & 0xffff0000) | ((sljit_ins)(new_target >> 48) & 0xffff); + inst[1] = (inst[1] & 0xffff0000) | ((sljit_ins)(new_target >> 32) & 0xffff); + inst[3] = (inst[3] & 0xffff0000) | ((sljit_ins)(new_target >> 16) & 0xffff); + inst[5] = (inst[5] & 0xffff0000) | ((sljit_ins)new_target & 0xffff); SLJIT_UPDATE_WX_FLAGS(inst, inst + 6, 1); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); SLJIT_CACHE_FLUSH(inst, inst + 6); @@ -539,7 +560,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - sljit_set_jump_addr(addr, new_constant, executable_offset); + sljit_set_jump_addr(addr, (sljit_uw)new_constant, executable_offset); } static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_ins *ins_ptr) @@ -548,19 +569,19 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t sljit_s32 word_arg_count = 0; sljit_s32 float_arg_count = 0; sljit_s32 types = 0; - sljit_ins prev_ins = NOP; + sljit_ins prev_ins = *ins_ptr; sljit_ins ins = NOP; SLJIT_ASSERT(reg_map[TMP_REG1] == 4 && freg_map[TMP_FREG1] == 12); - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - types = (types << SLJIT_DEF_SHIFT) | (arg_types & SLJIT_DEF_MASK); + types = (types << SLJIT_ARG_SHIFT) | (arg_types & SLJIT_ARG_MASK); - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: + case SLJIT_ARG_TYPE_F32: arg_count++; float_arg_count++; break; @@ -570,24 +591,24 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } while (types) { - switch (types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: if (arg_count != float_arg_count) - ins = MOV_S | FMT_S | FS(float_arg_count) | FD(arg_count); + ins = MOV_S | FMT_D | FS(float_arg_count) | FD(arg_count); else if (arg_count == 1) - ins = MOV_S | FMT_S | FS(SLJIT_FR0) | FD(TMP_FREG1); + ins = MOV_S | FMT_D | FS(SLJIT_FR0) | FD(TMP_FREG1); arg_count--; float_arg_count--; break; - case SLJIT_ARG_TYPE_F64: + case SLJIT_ARG_TYPE_F32: if (arg_count != float_arg_count) - ins = MOV_S | FMT_D | FS(float_arg_count) | FD(arg_count); + ins = MOV_S | FMT_S | FS(float_arg_count) | FD(arg_count); else if (arg_count == 1) - ins = MOV_S | FMT_D | FS(SLJIT_FR0) | FD(TMP_FREG1); + ins = MOV_S | FMT_S | FS(SLJIT_FR0) | FD(TMP_FREG1); arg_count--; float_arg_count--; break; @@ -608,7 +629,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t ins = NOP; } - types >>= SLJIT_DEF_SHIFT; + types >>= SLJIT_ARG_SHIFT; } *ins_ptr = prev_ins; @@ -620,7 +641,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile sljit_s32 arg_types) { struct sljit_jump *jump; - sljit_ins ins; + sljit_ins ins = NOP; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_call(compiler, type, arg_types)); @@ -628,7 +649,9 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); PTR_FAIL_IF(!jump); set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); - type &= 0xff; + + if (type & SLJIT_CALL_RETURN) + PTR_FAIL_IF(emit_stack_frame_release(compiler, 0, &ins)); PTR_FAIL_IF(call_with_args(compiler, arg_types, &ins)); @@ -636,8 +659,12 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile PTR_FAIL_IF(emit_const(compiler, PIC_ADDR_REG, 0)); - jump->flags |= IS_JAL | IS_CALL; - PTR_FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS)); + if (!(type & SLJIT_CALL_RETURN)) { + jump->flags |= IS_JAL | IS_CALL; + PTR_FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS)); + } else + PTR_FAIL_IF(push_inst(compiler, JR | S(PIC_ADDR_REG), UNMOVABLE_INS)); + jump->addr = compiler->size; PTR_FAIL_IF(push_inst(compiler, ins, UNMOVABLE_INS)); @@ -648,7 +675,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi sljit_s32 arg_types, sljit_s32 src, sljit_sw srcw) { - sljit_ins ins; + sljit_ins ins = NOP; CHECK_ERROR(); CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); @@ -664,9 +691,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, DR(PIC_ADDR_REG), src, srcw)); } + if (type & SLJIT_CALL_RETURN) + FAIL_IF(emit_stack_frame_release(compiler, 0, &ins)); + FAIL_IF(call_with_args(compiler, arg_types, &ins)); /* Register input. */ - FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS)); + if (!(type & SLJIT_CALL_RETURN)) + FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS)); + else + FAIL_IF(push_inst(compiler, JR | S(PIC_ADDR_REG), UNMOVABLE_INS)); return push_inst(compiler, ins, UNMOVABLE_INS); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c index fd747695a7..be5cb22a23 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c @@ -86,13 +86,13 @@ static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 5] = { #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 4] = { - 0, 0, 14, 2, 4, 6, 8, 12, 10, 16 + 0, 0, 14, 2, 4, 6, 8, 18, 30, 28, 26, 24, 22, 20, 12, 10, 16 }; #else static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 4] = { - 0, 0, 13, 14, 15, 16, 17, 12, 18, 10 + 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 1, 2, 3, 4, 5, 6, 7, 8, 9, 31, 30, 29, 28, 27, 26, 25, 24, 12, 11, 10 }; #endif @@ -101,23 +101,23 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 4] = { /* Instrucion forms */ /* --------------------------------------------------------------------- */ -#define S(s) (reg_map[s] << 21) -#define T(t) (reg_map[t] << 16) -#define D(d) (reg_map[d] << 11) -#define FT(t) (freg_map[t] << 16) -#define FS(s) (freg_map[s] << 11) -#define FD(d) (freg_map[d] << 6) +#define S(s) ((sljit_ins)reg_map[s] << 21) +#define T(t) ((sljit_ins)reg_map[t] << 16) +#define D(d) ((sljit_ins)reg_map[d] << 11) +#define FT(t) ((sljit_ins)freg_map[t] << 16) +#define FS(s) ((sljit_ins)freg_map[s] << 11) +#define FD(d) ((sljit_ins)freg_map[d] << 6) /* Absolute registers. */ -#define SA(s) ((s) << 21) -#define TA(t) ((t) << 16) -#define DA(d) ((d) << 11) -#define IMM(imm) ((imm) & 0xffff) -#define SH_IMM(imm) ((imm) << 6) +#define SA(s) ((sljit_ins)(s) << 21) +#define TA(t) ((sljit_ins)(t) << 16) +#define DA(d) ((sljit_ins)(d) << 11) +#define IMM(imm) ((sljit_ins)(imm) & 0xffff) +#define SH_IMM(imm) ((sljit_ins)(imm) << 6) #define DR(dr) (reg_map[dr]) #define FR(dr) (freg_map[dr]) -#define HI(opcode) ((opcode) << 26) -#define LO(opcode) (opcode) +#define HI(opcode) ((sljit_ins)(opcode) << 26) +#define LO(opcode) ((sljit_ins)(opcode)) #if (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 6) /* CMP.cond.fmt */ /* S = (20 << 21) D = (21 << 21) */ @@ -186,6 +186,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 4] = { #define DMULTU (HI(0) | LO(29)) #endif /* SLJIT_MIPS_REV >= 6 */ #define DIV_S (HI(17) | FMT_S | LO(3)) +#define DINSU (HI(31) | LO(6)) #define DSLL (HI(0) | LO(56)) #define DSLL32 (HI(0) | LO(60)) #define DSLLV (HI(0) | LO(20)) @@ -205,8 +206,10 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 4] = { #define JR (HI(0) | LO(8)) #endif /* SLJIT_MIPS_REV >= 6 */ #define LD (HI(55)) +#define LDC1 (HI(53)) #define LUI (HI(15)) #define LW (HI(35)) +#define LWC1 (HI(49)) #define MFC1 (HI(17)) #if (defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 6) #define MOD (HI(0) | (3 << 6) | LO(26)) @@ -292,7 +295,8 @@ static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins, sljit { sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins)); SLJIT_ASSERT(delay_slot == MOVABLE_INS || delay_slot >= UNMOVABLE_INS - || delay_slot == ((ins >> 11) & 0x1f) || delay_slot == ((ins >> 16) & 0x1f)); + || (sljit_ins)delay_slot == ((ins >> 11) & 0x1f) + || (sljit_ins)delay_slot == ((ins >> 16) & 0x1f)); FAIL_IF(!ptr); *ptr = ins; compiler->size++; @@ -300,7 +304,7 @@ static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins, sljit return SLJIT_SUCCESS; } -static SLJIT_INLINE sljit_ins invert_branch(sljit_s32 flags) +static SLJIT_INLINE sljit_ins invert_branch(sljit_uw flags) { if (flags & IS_BIT26_COND) return (1 << 26); @@ -371,7 +375,7 @@ static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_i inst[1] = NOP; return inst + 1; } - inst[0] = inst[0] ^ invert_branch(jump->flags); + inst[0] ^= invert_branch(jump->flags); inst[1] = NOP; jump->addr -= sizeof(sljit_ins); return inst + 1; @@ -379,7 +383,7 @@ static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_i } if (jump->flags & IS_COND) { - if ((jump->flags & IS_MOVABLE) && (target_addr & ~0xfffffff) == ((jump->addr + 2 * sizeof(sljit_ins)) & ~0xfffffff)) { + if ((jump->flags & IS_MOVABLE) && (target_addr & ~(sljit_uw)0xfffffff) == ((jump->addr + 2 * sizeof(sljit_ins)) & ~(sljit_uw)0xfffffff)) { jump->flags |= PATCH_J; saved_inst = inst[0]; inst[0] = inst[-1]; @@ -388,7 +392,7 @@ static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_i inst[2] = NOP; return inst + 2; } - else if ((target_addr & ~0xfffffff) == ((jump->addr + 3 * sizeof(sljit_ins)) & ~0xfffffff)) { + else if ((target_addr & ~(sljit_uw)0xfffffff) == ((jump->addr + 3 * sizeof(sljit_ins)) & ~(sljit_uw)0xfffffff)) { jump->flags |= PATCH_J; inst[0] = (inst[0] & 0xffff0000) | 3; inst[1] = NOP; @@ -400,7 +404,7 @@ static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_i } else { /* J instuctions. */ - if ((jump->flags & IS_MOVABLE) && (target_addr & ~0xfffffff) == (jump->addr & ~0xfffffff)) { + if ((jump->flags & IS_MOVABLE) && (target_addr & ~(sljit_uw)0xfffffff) == (jump->addr & ~(sljit_uw)0xfffffff)) { jump->flags |= PATCH_J; inst[0] = inst[-1]; inst[-1] = (jump->flags & IS_JAL) ? JAL : J; @@ -408,7 +412,7 @@ static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_i return inst; } - if ((target_addr & ~0xfffffff) == ((jump->addr + sizeof(sljit_ins)) & ~0xfffffff)) { + if ((target_addr & ~(sljit_uw)0xfffffff) == ((jump->addr + sizeof(sljit_ins)) & ~(sljit_uw)0xfffffff)) { jump->flags |= PATCH_J; inst[0] = (jump->flags & IS_JAL) ? JAL : J; inst[1] = NOP; @@ -472,7 +476,7 @@ static SLJIT_INLINE void put_label_set(struct sljit_put_label *put_label) { sljit_uw addr = put_label->label->addr; sljit_ins *inst = (sljit_ins *)put_label->addr; - sljit_s32 reg = *inst; + sljit_u32 reg = *inst; if (put_label->flags == 0) { SLJIT_ASSERT(addr < 0x80000000l); @@ -548,7 +552,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil /* These structures are ordered by their address. */ if (label && label->size == word_count) { label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } if (jump && jump->addr == word_count) { @@ -584,7 +588,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == word_count) { label->addr = (sljit_uw)code_ptr; - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } @@ -601,39 +605,46 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil buf_ptr = (sljit_ins *)jump->addr; if (jump->flags & PATCH_B) { - addr = (sljit_sw)(addr - ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset) + sizeof(sljit_ins))) >> 2; + addr = (sljit_uw)((sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset) - sizeof(sljit_ins)) >> 2); SLJIT_ASSERT((sljit_sw)addr <= SIMM_MAX && (sljit_sw)addr >= SIMM_MIN); - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | (addr & 0xffff); + buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((sljit_ins)addr & 0xffff); break; } if (jump->flags & PATCH_J) { - SLJIT_ASSERT((addr & ~0xfffffff) == (((sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset) + sizeof(sljit_ins)) & ~0xfffffff)); - buf_ptr[0] |= (addr >> 2) & 0x03ffffff; + SLJIT_ASSERT((addr & ~(sljit_uw)0xfffffff) + == (((sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset) + sizeof(sljit_ins)) & ~(sljit_uw)0xfffffff)); + buf_ptr[0] |= (sljit_ins)(addr >> 2) & 0x03ffffff; break; } /* Set the fields of immediate loads. */ #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff); - buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff); + SLJIT_ASSERT(((buf_ptr[0] | buf_ptr[1]) & 0xffff) == 0); + buf_ptr[0] |= (sljit_ins)(addr >> 16) & 0xffff; + buf_ptr[1] |= (sljit_ins)addr & 0xffff; #else if (jump->flags & PATCH_ABS32) { SLJIT_ASSERT(addr <= 0x7fffffff); - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff); - buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff); + SLJIT_ASSERT(((buf_ptr[0] | buf_ptr[1]) & 0xffff) == 0); + buf_ptr[0] |= (sljit_ins)(addr >> 16) & 0xffff; + buf_ptr[1] |= (sljit_ins)addr & 0xffff; + break; } - else if (jump->flags & PATCH_ABS48) { + + if (jump->flags & PATCH_ABS48) { SLJIT_ASSERT(addr <= 0x7fffffffffffl); - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 32) & 0xffff); - buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 16) & 0xffff); - buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | (addr & 0xffff); - } - else { - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 48) & 0xffff); - buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 32) & 0xffff); - buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | ((addr >> 16) & 0xffff); - buf_ptr[5] = (buf_ptr[5] & 0xffff0000) | (addr & 0xffff); + SLJIT_ASSERT(((buf_ptr[0] | buf_ptr[1] | buf_ptr[3]) & 0xffff) == 0); + buf_ptr[0] |= (sljit_ins)(addr >> 32) & 0xffff; + buf_ptr[1] |= (sljit_ins)(addr >> 16) & 0xffff; + buf_ptr[3] |= (sljit_ins)addr & 0xffff; + break; } + + SLJIT_ASSERT(((buf_ptr[0] | buf_ptr[1] | buf_ptr[3] | buf_ptr[5]) & 0xffff) == 0); + buf_ptr[0] |= (sljit_ins)(addr >> 48) & 0xffff; + buf_ptr[1] |= (sljit_ins)(addr >> 32) & 0xffff; + buf_ptr[3] |= (sljit_ins)(addr >> 16) & 0xffff; + buf_ptr[5] |= (sljit_ins)addr & 0xffff; #endif } while (0); jump = jump->next; @@ -656,7 +667,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; - compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); + compiler->executable_size = (sljit_uw)(code_ptr - code) * sizeof(sljit_ins); code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); @@ -673,7 +684,9 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) { +#if defined(__GNUC__) && !defined(SLJIT_IS_FPU_AVAILABLE) sljit_sw fir = 0; +#endif /* __GNUC__ && !SLJIT_IS_FPU_AVAILABLE */ switch (feature_type) { case SLJIT_HAS_FPU: @@ -696,7 +709,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) #endif /* SLJIT_MIPS_REV >= 1 */ default: - return fir; + return 0; } } @@ -723,15 +736,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) #define CUMULATIVE_OP 0x00080 #define LOGICAL_OP 0x00100 #define IMM_OP 0x00200 -#define SRC2_IMM 0x00400 +#define MOVE_OP 0x00400 +#define SRC2_IMM 0x00800 -#define UNUSED_DEST 0x00800 -#define REG_DEST 0x01000 -#define REG1_SOURCE 0x02000 -#define REG2_SOURCE 0x04000 -#define SLOW_SRC1 0x08000 -#define SLOW_SRC2 0x10000 -#define SLOW_DEST 0x20000 +#define UNUSED_DEST 0x01000 +#define REG_DEST 0x02000 +#define REG1_SOURCE 0x04000 +#define REG2_SOURCE 0x08000 +#define SLOW_SRC1 0x10000 +#define SLOW_SRC2 0x20000 +#define SLOW_DEST 0x40000 #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) #define STACK_STORE SW @@ -741,7 +755,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) #define STACK_LOAD LD #endif -static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw); +static sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw); +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler, sljit_s32 frame_size, sljit_ins *ins_ptr); #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) #include "sljitNativeMIPS_32.c" @@ -754,56 +769,195 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { sljit_ins base; - sljit_s32 args, i, tmp, offs; + sljit_s32 i, tmp, offset; + sljit_s32 arg_count, word_arg_count, saved_arg_count, float_arg_count; CHECK_ERROR(); CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + SLJIT_LOCALS_OFFSET; + local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) - local_size = (local_size + 15) & ~0xf; + if (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) { + if ((local_size & SSIZE_OF(sw)) != 0) + local_size += SSIZE_OF(sw); + local_size += GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sizeof(sljit_f64)); + } + + local_size = (local_size + SLJIT_LOCALS_OFFSET + 15) & ~0xf; #else - local_size = (local_size + 31) & ~0x1f; + local_size += GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sizeof(sljit_f64)); + local_size = (local_size + SLJIT_LOCALS_OFFSET + 31) & ~0x1f; #endif compiler->local_size = local_size; - if (local_size <= SIMM_MAX) { +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + tmp = arg_types >> SLJIT_ARG_SHIFT; + arg_count = 0; + offset = 0; + + while (tmp) { + offset = arg_count; + if ((tmp & SLJIT_ARG_MASK) == SLJIT_ARG_TYPE_F64) { + if ((arg_count & 0x1) != 0) + arg_count++; + arg_count++; + } + + arg_count++; + tmp >>= SLJIT_ARG_SHIFT; + } + + compiler->args_size = (sljit_uw)arg_count << 2; + offset = (offset >= 4) ? (offset << 2) : 0; +#else /* !SLJIT_CONFIG_MIPS_32 */ + offset = 0; +#endif /* SLJIT_CONFIG_MIPS_32 */ + + if (local_size + offset <= -SIMM_MIN) { /* Frequent case. */ FAIL_IF(push_inst(compiler, ADDIU_W | S(SLJIT_SP) | T(SLJIT_SP) | IMM(-local_size), DR(SLJIT_SP))); base = S(SLJIT_SP); - offs = local_size - (sljit_sw)sizeof(sljit_sw); - } - else { + offset = local_size - SSIZE_OF(sw); + } else { FAIL_IF(load_immediate(compiler, DR(OTHER_FLAG), local_size)); FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_SP) | TA(0) | D(TMP_REG2), DR(TMP_REG2))); FAIL_IF(push_inst(compiler, SUBU_W | S(SLJIT_SP) | T(OTHER_FLAG) | D(SLJIT_SP), DR(SLJIT_SP))); base = S(TMP_REG2); + offset = -SSIZE_OF(sw); +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) local_size = 0; - offs = -(sljit_sw)sizeof(sljit_sw); +#endif } - FAIL_IF(push_inst(compiler, STACK_STORE | base | TA(RETURN_ADDR_REG) | IMM(offs), MOVABLE_INS)); + FAIL_IF(push_inst(compiler, STACK_STORE | base | TA(RETURN_ADDR_REG) | IMM(offset), MOVABLE_INS)); - tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG; - for (i = SLJIT_S0; i >= tmp; i--) { - offs -= (sljit_s32)(sizeof(sljit_sw)); - FAIL_IF(push_inst(compiler, STACK_STORE | base | T(i) | IMM(offs), MOVABLE_INS)); + tmp = SLJIT_S0 - saveds; + for (i = SLJIT_S0; i > tmp; i--) { + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_STORE | base | T(i) | IMM(offset), MOVABLE_INS)); } for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) { - offs -= (sljit_s32)(sizeof(sljit_sw)); - FAIL_IF(push_inst(compiler, STACK_STORE | base | T(i) | IMM(offs), MOVABLE_INS)); + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_STORE | base | T(i) | IMM(offset), MOVABLE_INS)); + } + +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + /* This alignment is valid because offset is not used after storing FPU regs. */ + if ((offset & SSIZE_OF(sw)) != 0) + offset -= SSIZE_OF(sw); +#endif + + tmp = SLJIT_FS0 - fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + offset -= SSIZE_OF(f64); + FAIL_IF(push_inst(compiler, SDC1 | base | FT(i) | IMM(offset), MOVABLE_INS)); + } + + for (i = fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + offset -= SSIZE_OF(f64); + FAIL_IF(push_inst(compiler, SDC1 | base | FT(i) | IMM(offset), MOVABLE_INS)); + } + + arg_types >>= SLJIT_ARG_SHIFT; + arg_count = 0; + word_arg_count = 0; + saved_arg_count = 0; + float_arg_count = 0; + +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + /* The first maximum two floating point arguments are passed in floating point + registers if no integer argument precedes them. The first 16 byte data is + passed in four integer registers, the rest is placed onto the stack. + The floating point registers are also part of the first 16 byte data, so + their corresponding integer registers are not used when they are present. */ + + while (arg_types) { + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + float_arg_count++; + if ((arg_count & 0x1) != 0) + arg_count++; + + if (word_arg_count == 0 && float_arg_count <= 2) { + if (float_arg_count == 1) + FAIL_IF(push_inst(compiler, MOV_S | FMT_D | FS(TMP_FREG1) | FD(SLJIT_FR0), MOVABLE_INS)); + } else if (arg_count < 4) { + FAIL_IF(push_inst(compiler, MTC1 | TA(4 + arg_count) | FS(float_arg_count), MOVABLE_INS)); + FAIL_IF(push_inst(compiler, MTC1 | TA(5 + arg_count) | FS(float_arg_count) | (1 << 11), MOVABLE_INS)); + } else + FAIL_IF(push_inst(compiler, LDC1 | base | FT(float_arg_count) | IMM(local_size + (arg_count << 2)), MOVABLE_INS)); + arg_count++; + break; + case SLJIT_ARG_TYPE_F32: + float_arg_count++; + + if (word_arg_count == 0 && float_arg_count <= 2) { + if (float_arg_count == 1) + FAIL_IF(push_inst(compiler, MOV_S | FMT_S | FS(TMP_FREG1) | FD(SLJIT_FR0), MOVABLE_INS)); + } else if (arg_count < 4) + FAIL_IF(push_inst(compiler, MTC1 | TA(4 + arg_count) | FS(float_arg_count), MOVABLE_INS)); + else + FAIL_IF(push_inst(compiler, LWC1 | base | FT(float_arg_count) | IMM(local_size + (arg_count << 2)), MOVABLE_INS)); + break; + default: + word_arg_count++; + + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + tmp = SLJIT_S0 - saved_arg_count; + saved_arg_count++; + } else if (word_arg_count != arg_count + 1 || arg_count == 0) + tmp = word_arg_count; + else + break; + + if (arg_count < 4) + FAIL_IF(push_inst(compiler, ADDU_W | SA(4 + arg_count) | TA(0) | D(tmp), DR(tmp))); + else + FAIL_IF(push_inst(compiler, LW | base | T(tmp) | IMM(local_size + (arg_count << 2)), DR(tmp))); + break; + } + arg_count++; + arg_types >>= SLJIT_ARG_SHIFT; } - args = get_arg_count(arg_types); + SLJIT_ASSERT(compiler->args_size == (sljit_uw)arg_count << 2); +#else /* !SLJIT_CONFIG_MIPS_32 */ + while (arg_types) { + arg_count++; + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + float_arg_count++; + if (arg_count != float_arg_count) + FAIL_IF(push_inst(compiler, MOV_S | FMT_D | FS(arg_count) | FD(float_arg_count), MOVABLE_INS)); + else if (arg_count == 1) + FAIL_IF(push_inst(compiler, MOV_S | FMT_D | FS(TMP_FREG1) | FD(SLJIT_FR0), MOVABLE_INS)); + break; + case SLJIT_ARG_TYPE_F32: + float_arg_count++; + if (arg_count != float_arg_count) + FAIL_IF(push_inst(compiler, MOV_S | FMT_S | FS(arg_count) | FD(float_arg_count), MOVABLE_INS)); + else if (arg_count == 1) + FAIL_IF(push_inst(compiler, MOV_S | FMT_S | FS(TMP_FREG1) | FD(SLJIT_FR0), MOVABLE_INS)); + break; + default: + word_arg_count++; + + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + tmp = SLJIT_S0 - saved_arg_count; + saved_arg_count++; + } else if (word_arg_count != arg_count || word_arg_count <= 1) + tmp = word_arg_count; + else + break; - if (args >= 1) - FAIL_IF(push_inst(compiler, ADDU_W | SA(4) | TA(0) | D(SLJIT_S0), DR(SLJIT_S0))); - if (args >= 2) - FAIL_IF(push_inst(compiler, ADDU_W | SA(5) | TA(0) | D(SLJIT_S1), DR(SLJIT_S1))); - if (args >= 3) - FAIL_IF(push_inst(compiler, ADDU_W | SA(6) | TA(0) | D(SLJIT_S2), DR(SLJIT_S2))); + FAIL_IF(push_inst(compiler, ADDU_W | SA(3 + arg_count) | TA(0) | D(tmp), DR(tmp))); + break; + } + arg_types >>= SLJIT_ARG_SHIFT; + } +#endif /* SLJIT_CONFIG_MIPS_32 */ return SLJIT_SUCCESS; } @@ -816,57 +970,110 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + SLJIT_LOCALS_OFFSET; + local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) - compiler->local_size = (local_size + 15) & ~0xf; + if (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) { + if ((local_size & SSIZE_OF(sw)) != 0) + local_size += SSIZE_OF(sw); + local_size += GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sizeof(sljit_f64)); + } + + compiler->local_size = (local_size + SLJIT_LOCALS_OFFSET + 15) & ~0xf; #else - compiler->local_size = (local_size + 31) & ~0x1f; + local_size += GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sizeof(sljit_f64)); + compiler->local_size = (local_size + SLJIT_LOCALS_OFFSET + 31) & ~0x1f; #endif return SLJIT_SUCCESS; } -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler, sljit_s32 frame_size, sljit_ins *ins_ptr) { - sljit_s32 local_size, i, tmp, offs; - sljit_ins base; + sljit_s32 local_size, i, tmp, offset; + sljit_s32 scratches = compiler->scratches; + sljit_s32 saveds = compiler->saveds; + sljit_s32 fsaveds = compiler->fsaveds; + sljit_s32 fscratches = compiler->fscratches; - CHECK_ERROR(); - CHECK(check_sljit_emit_return(compiler, op, src, srcw)); + local_size = compiler->local_size; - FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); + tmp = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + if (fsaveds > 0 || fscratches >= SLJIT_FIRST_SAVED_FLOAT_REG) { + if ((tmp & SSIZE_OF(sw)) != 0) + tmp += SSIZE_OF(sw); + tmp += GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sizeof(sljit_f64)); + } +#else + tmp += GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sizeof(sljit_f64)); +#endif - local_size = compiler->local_size; - if (local_size <= SIMM_MAX) - base = S(SLJIT_SP); - else { - FAIL_IF(load_immediate(compiler, DR(TMP_REG1), local_size)); - FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_SP) | T(TMP_REG1) | D(TMP_REG1), DR(TMP_REG1))); - base = S(TMP_REG1); - local_size = 0; + if (local_size <= SIMM_MAX) { + if (local_size < frame_size) { + FAIL_IF(push_inst(compiler, ADDIU_W | S(SLJIT_SP) | T(SLJIT_SP) | IMM(local_size - frame_size), DR(SLJIT_SP))); + local_size = frame_size; + } + } else { + if (tmp < frame_size) + tmp = frame_size; + + FAIL_IF(load_immediate(compiler, DR(TMP_REG1), local_size - tmp)); + FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_SP) | T(TMP_REG1) | D(SLJIT_SP), DR(SLJIT_SP))); + local_size = tmp; } - FAIL_IF(push_inst(compiler, STACK_LOAD | base | TA(RETURN_ADDR_REG) | IMM(local_size - (sljit_s32)sizeof(sljit_sw)), RETURN_ADDR_REG)); - offs = local_size - (sljit_s32)GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 1); + SLJIT_ASSERT(local_size >= frame_size); + + offset = local_size - SSIZE_OF(sw); + if (frame_size == 0) + FAIL_IF(push_inst(compiler, STACK_LOAD | S(SLJIT_SP) | TA(RETURN_ADDR_REG) | IMM(offset), RETURN_ADDR_REG)); + + tmp = SLJIT_S0 - saveds; + for (i = SLJIT_S0; i > tmp; i--) { + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_LOAD | S(SLJIT_SP) | T(i) | IMM(offset), MOVABLE_INS)); + } - tmp = compiler->scratches; - for (i = SLJIT_FIRST_SAVED_REG; i <= tmp; i++) { - FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(i) | IMM(offs), DR(i))); - offs += (sljit_s32)(sizeof(sljit_sw)); + for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) { + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_LOAD | S(SLJIT_SP) | T(i) | IMM(offset), MOVABLE_INS)); } - tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG; - for (i = tmp; i <= SLJIT_S0; i++) { - FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(i) | IMM(offs), DR(i))); - offs += (sljit_s32)(sizeof(sljit_sw)); +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + /* This alignment is valid because offset is not used after storing FPU regs. */ + if ((offset & SSIZE_OF(sw)) != 0) + offset -= SSIZE_OF(sw); +#endif + + tmp = SLJIT_FS0 - fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + offset -= SSIZE_OF(f64); + FAIL_IF(push_inst(compiler, LDC1 | S(SLJIT_SP) | FT(i) | IMM(offset), MOVABLE_INS)); } - SLJIT_ASSERT(offs == local_size - (sljit_sw)(sizeof(sljit_sw))); + for (i = fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + offset -= SSIZE_OF(f64); + FAIL_IF(push_inst(compiler, LDC1 | S(SLJIT_SP) | FT(i) | IMM(offset), MOVABLE_INS)); + } - FAIL_IF(push_inst(compiler, JR | SA(RETURN_ADDR_REG), UNMOVABLE_INS)); - if (compiler->local_size <= SIMM_MAX) - return push_inst(compiler, ADDIU_W | S(SLJIT_SP) | T(SLJIT_SP) | IMM(compiler->local_size), UNMOVABLE_INS); + if (local_size > frame_size) + *ins_ptr = ADDIU_W | S(SLJIT_SP) | T(SLJIT_SP) | IMM(local_size - frame_size); else - return push_inst(compiler, ADDU_W | S(TMP_REG1) | TA(0) | D(SLJIT_SP), UNMOVABLE_INS); + *ins_ptr = NOP; + + return SLJIT_SUCCESS; +} + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + sljit_ins ins; + + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); + + emit_stack_frame_release(compiler, 0, &ins); + + FAIL_IF(push_inst(compiler, JR | SA(RETURN_ADDR_REG), UNMOVABLE_INS)); + return push_inst(compiler, ins, UNMOVABLE_INS); } #undef STACK_STORE @@ -1041,7 +1248,7 @@ static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sl return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_slot); } -static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw) +static sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw) { sljit_s32 tmp_ar, base, delay_slot; @@ -1104,14 +1311,14 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 compiler->cache_argw = 0; } - if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) { + if (dst == TMP_REG2) { SLJIT_ASSERT(HAS_FLAGS(op)); flags |= UNUSED_DEST; } else if (FAST_IS_REG(dst)) { dst_r = dst; flags |= REG_DEST; - if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) + if (flags & MOVE_OP) sugg_src2_r = dst_r; } else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, DR(TMP_REG1), dst, dstw)) @@ -1165,8 +1372,8 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 if (FAST_IS_REG(src2)) { src2_r = src2; flags |= REG2_SOURCE; - if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOV_P) - dst_r = src2_r; + if ((flags & (REG_DEST | MOVE_OP)) == MOVE_OP) + dst_r = (sljit_s32)src2_r; } else if (src2 & SLJIT_IMM) { if (!(flags & SRC2_IMM)) { @@ -1176,8 +1383,12 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 } else { src2_r = 0; - if ((op >= SLJIT_MOV && op <= SLJIT_MOV_P) && (dst & SLJIT_MEM)) - dst_r = 0; + if (flags & MOVE_OP) { + if (dst & SLJIT_MEM) + dst_r = 0; + else + op = SLJIT_MOV; + } } } } @@ -1221,7 +1432,7 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) { #if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) - sljit_s32 int_op = op & SLJIT_I32_OP; + sljit_s32 int_op = op & SLJIT_32; #endif CHECK_ERROR(); @@ -1326,11 +1537,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw) { -#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -# define flags 0 -#else sljit_s32 flags = 0; -#endif CHECK_ERROR(); CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); @@ -1338,58 +1545,50 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile ADJUST_LOCAL_OFFSET(src, srcw); #if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) - if ((op & SLJIT_I32_OP) && GET_OPCODE(op) >= SLJIT_NOT) - flags |= INT_DATA | SIGNED_DATA; + if (op & SLJIT_32) + flags = INT_DATA | SIGNED_DATA; #endif switch (GET_OPCODE(op)) { case SLJIT_MOV: +#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) + case SLJIT_MOV_U32: + case SLJIT_MOV_S32: + case SLJIT_MOV32: +#endif case SLJIT_MOV_P: - return emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw); + return emit_op(compiler, SLJIT_MOV, WORD_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, srcw); +#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) case SLJIT_MOV_U32: -#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) - return emit_op(compiler, SLJIT_MOV_U32, INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw); -#else - return emit_op(compiler, SLJIT_MOV_U32, INT_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u32)srcw : srcw); -#endif + return emit_op(compiler, SLJIT_MOV_U32, INT_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u32)srcw : srcw); case SLJIT_MOV_S32: -#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) - return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, srcw); -#else - return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s32)srcw : srcw); + case SLJIT_MOV32: + return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s32)srcw : srcw); #endif case SLJIT_MOV_U8: - return emit_op(compiler, SLJIT_MOV_U8, BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw); + return emit_op(compiler, op, BYTE_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw); case SLJIT_MOV_S8: - return emit_op(compiler, SLJIT_MOV_S8, BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw); + return emit_op(compiler, op, BYTE_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw); case SLJIT_MOV_U16: - return emit_op(compiler, SLJIT_MOV_U16, HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw); + return emit_op(compiler, op, HALF_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw); case SLJIT_MOV_S16: - return emit_op(compiler, SLJIT_MOV_S16, HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw); + return emit_op(compiler, op, HALF_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw); case SLJIT_NOT: return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); - case SLJIT_NEG: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; - return emit_op(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw); - case SLJIT_CLZ: return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); } SLJIT_UNREACHABLE(); return SLJIT_SUCCESS; - -#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -# undef flags -#endif } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, @@ -1397,23 +1596,16 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { -#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -# define flags 0 -#else sljit_s32 flags = 0; -#endif CHECK_ERROR(); - CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) - return SLJIT_SUCCESS; - #if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) - if (op & SLJIT_I32_OP) { + if (op & SLJIT_32) { flags |= INT_DATA | SIGNED_DATA; if (src1 & SLJIT_IMM) src1w = (sljit_s32)src1w; @@ -1425,12 +1617,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile switch (GET_OPCODE(op)) { case SLJIT_ADD: case SLJIT_ADDC: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); case SLJIT_SUB: case SLJIT_SUBC: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); case SLJIT_MUL: @@ -1450,7 +1642,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile src2w &= 0x1f; #else if (src2 & SLJIT_IMM) { - if (op & SLJIT_I32_OP) + if (op & SLJIT_32) src2w &= 0x1f; else src2w &= 0x3f; @@ -1461,10 +1653,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile SLJIT_UNREACHABLE(); return SLJIT_SUCCESS; +} -#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -# undef flags +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; #endif + return sljit_emit_op2(compiler, op, TMP_REG2, 0, src1, src1w, src2, src2w); } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, @@ -1512,7 +1714,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { CHECK_ERROR(); CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); @@ -1524,17 +1726,17 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *c /* Floating point operators */ /* --------------------------------------------------------------------- */ -#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_F32_OP) >> 7)) -#define FMT(op) (((op & SLJIT_F32_OP) ^ SLJIT_F32_OP) << (21 - 8)) +#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_32) >> 7)) +#define FMT(op) ((((sljit_ins)op & SLJIT_32) ^ SLJIT_32) << (21 - 8)) static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw) { #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -# define flags 0 +# define flags (sljit_u32)0 #else - sljit_s32 flags = (GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64) << 21; + sljit_u32 flags = ((sljit_u32)(GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64)) << 21; #endif if (src & SLJIT_MEM) { @@ -1560,9 +1762,9 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp sljit_s32 src, sljit_sw srcw) { #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -# define flags 0 +# define flags (sljit_u32)0 #else - sljit_s32 flags = (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW) << 21; + sljit_u32 flags = ((sljit_u32)(GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW)) << 21; #endif sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; @@ -1582,7 +1784,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp FAIL_IF(push_inst(compiler, MTC1 | flags | T(TMP_REG1) | FS(TMP_FREG1), MOVABLE_INS)); } - FAIL_IF(push_inst(compiler, CVT_S_S | flags | (4 << 21) | (((op & SLJIT_F32_OP) ^ SLJIT_F32_OP) >> 8) | FS(TMP_FREG1) | FD(dst_r), MOVABLE_INS)); + FAIL_IF(push_inst(compiler, CVT_S_S | flags | (4 << 21) | ((((sljit_ins)op & SLJIT_32) ^ SLJIT_32) >> 8) | FS(TMP_FREG1) | FD(dst_r), MOVABLE_INS)); if (dst & SLJIT_MEM) return emit_op_mem2(compiler, FLOAT_DATA(op), FR(TMP_FREG1), dst, dstw, 0, 0); @@ -1640,11 +1842,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil compiler->cache_arg = 0; compiler->cache_argw = 0; - SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100) && !(DOUBLE_DATA & 0x2), float_transfer_bit_error); + SLJIT_COMPILE_ASSERT((SLJIT_32 == 0x100) && !(DOUBLE_DATA & 0x2), float_transfer_bit_error); SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; @@ -1669,8 +1871,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil FAIL_IF(push_inst(compiler, ABS_S | FMT(op) | FS(src) | FD(dst_r), MOVABLE_INS)); break; case SLJIT_CONV_F64_FROM_F32: - FAIL_IF(push_inst(compiler, CVT_S_S | ((op & SLJIT_F32_OP) ? 1 : (1 << 21)) | FS(src) | FD(dst_r), MOVABLE_INS)); - op ^= SLJIT_F32_OP; + FAIL_IF(push_inst(compiler, CVT_S_S | (sljit_ins)((op & SLJIT_32) ? 1 : (1 << 21)) | FS(src) | FD(dst_r), MOVABLE_INS)); + op ^= SLJIT_32; break; } @@ -1841,7 +2043,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile { struct sljit_jump *jump; sljit_ins inst; - sljit_s32 flags = 0; + sljit_u32 flags = 0; sljit_s32 delay_check = UNMOVABLE_INS; CHECK_ERROR_PTR(); @@ -1864,6 +2066,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile case SLJIT_SIG_LESS: case SLJIT_SIG_GREATER: case SLJIT_OVERFLOW: + case SLJIT_CARRY: BR_Z(OTHER_FLAG); break; case SLJIT_GREATER_EQUAL: @@ -1871,6 +2074,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile case SLJIT_SIG_GREATER_EQUAL: case SLJIT_SIG_LESS_EQUAL: case SLJIT_NOT_OVERFLOW: + case SLJIT_NOT_CARRY: BR_NZ(OTHER_FLAG); break; case SLJIT_NOT_EQUAL_F64: @@ -1947,7 +2151,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler compiler->cache_arg = 0; compiler->cache_argw = 0; - flags = ((type & SLJIT_I32_OP) ? INT_DATA : WORD_DATA) | LOAD_DATA; + flags = ((type & SLJIT_32) ? INT_DATA : WORD_DATA) | LOAD_DATA; if (src1 & SLJIT_MEM) { PTR_FAIL_IF(emit_op_mem2(compiler, flags, DR(TMP_REG1), src1, src1w, src2, src2w)); src1 = TMP_REG1; @@ -2074,7 +2278,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); FAIL_IF(!jump); set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_JAL : 0)); - jump->u.target = srcw; + jump->u.target = (sljit_uw)srcw; if (compiler->delay_slot != UNMOVABLE_INS) jump->flags |= IS_MOVABLE; @@ -2103,7 +2307,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) sljit_s32 mem_type = WORD_DATA; #else - sljit_s32 mem_type = (op & SLJIT_I32_OP) ? (INT_DATA | SIGNED_DATA) : WORD_DATA; + sljit_s32 mem_type = ((op & SLJIT_32) || op == SLJIT_MOV32) ? (INT_DATA | SIGNED_DATA) : WORD_DATA; #endif CHECK_ERROR(); @@ -2111,10 +2315,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co ADJUST_LOCAL_OFFSET(dst, dstw); op = GET_OPCODE(op); -#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) - if (op == SLJIT_MOV_S32) - mem_type = INT_DATA | SIGNED_DATA; -#endif dst_ar = DR((op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2); compiler->cache_arg = 0; @@ -2131,7 +2331,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co break; case SLJIT_OVERFLOW: case SLJIT_NOT_OVERFLOW: - if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB) { + if (compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB)) { src_ar = OTHER_FLAG; break; } @@ -2142,6 +2342,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co case SLJIT_GREATER_F64: case SLJIT_LESS_EQUAL_F64: type ^= 0x1; /* Flip type bit for the XORI below. */ + /* fallthrough */ case SLJIT_EQUAL_F64: case SLJIT_NOT_EQUAL_F64: case SLJIT_LESS_F64: @@ -2203,7 +2404,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil if (SLJIT_UNLIKELY(src & SLJIT_IMM)) { #if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) - if (dst_reg & SLJIT_I32_OP) + if (dst_reg & SLJIT_32) srcw = (sljit_s32)srcw; #endif FAIL_IF(load_immediate(compiler, DR(TMP_REG1), srcw)); @@ -2211,7 +2412,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil srcw = 0; } - dst_reg &= ~SLJIT_I32_OP; + dst_reg &= ~SLJIT_32; switch (type & 0xff) { case SLJIT_EQUAL: @@ -2298,7 +2499,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct slj #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) PTR_FAIL_IF(emit_const(compiler, dst_r, 0)); #else - PTR_FAIL_IF(push_inst(compiler, dst_r, UNMOVABLE_INS)); + PTR_FAIL_IF(push_inst(compiler, (sljit_ins)dst_r, UNMOVABLE_INS)); compiler->size += 5; #endif diff --git a/thirdparty/pcre2/src/sljit/sljitNativePPC_32.c b/thirdparty/pcre2/src/sljit/sljitNativePPC_32.c index 6ddb5508ec..95fe6bbe0e 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativePPC_32.c +++ b/thirdparty/pcre2/src/sljit/sljitNativePPC_32.c @@ -86,11 +86,6 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl SLJIT_ASSERT(src1 == TMP_REG1); return push_inst(compiler, NOR | RC(flags) | S(src2) | A(dst) | B(src2)); - case SLJIT_NEG: - SLJIT_ASSERT(src1 == TMP_REG1); - /* Setting XER SO is not enough, CR SO is also needed. */ - return push_inst(compiler, NEG | OE((flags & ALT_FORM1) ? ALT_SET_FLAGS : 0) | RC(flags) | D(dst) | A(src2)); - case SLJIT_CLZ: SLJIT_ASSERT(src1 == TMP_REG1); return push_inst(compiler, CNTLZW | S(src2) | A(dst)); @@ -158,7 +153,9 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl if (flags & ALT_FORM3) { /* Setting XER SO is not enough, CR SO is also needed. */ - return push_inst(compiler, SUBF | OE(ALT_SET_FLAGS) | RC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1)); + if (src1 != TMP_ZERO) + return push_inst(compiler, SUBF | OE(ALT_SET_FLAGS) | RC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1)); + return push_inst(compiler, NEG | OE(ALT_SET_FLAGS) | RC(ALT_SET_FLAGS) | D(dst) | A(src2)); } if (flags & ALT_FORM4) { @@ -167,11 +164,17 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm); } - if (!(flags & ALT_SET_FLAGS)) + if (!(flags & ALT_SET_FLAGS)) { + SLJIT_ASSERT(src1 != TMP_ZERO); return push_inst(compiler, SUBF | D(dst) | A(src2) | B(src1)); + } + if (flags & ALT_FORM5) return push_inst(compiler, SUBFC | RC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1)); - return push_inst(compiler, SUBF | RC(flags) | D(dst) | A(src2) | B(src1)); + + if (src1 != TMP_ZERO) + return push_inst(compiler, SUBF | RC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1)); + return push_inst(compiler, NEG | RC(ALT_SET_FLAGS) | D(dst) | A(src2)); case SLJIT_SUBC: return push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1)); @@ -277,5 +280,5 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - sljit_set_jump_addr(addr, new_constant, executable_offset); + sljit_set_jump_addr(addr, (sljit_uw)new_constant, executable_offset); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativePPC_64.c b/thirdparty/pcre2/src/sljit/sljitNativePPC_64.c index cbdf2dd8a2..d104f6d75f 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativePPC_64.c +++ b/thirdparty/pcre2/src/sljit/sljitNativePPC_64.c @@ -57,20 +57,20 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, } /* Count leading zeroes. */ - tmp = (imm >= 0) ? imm : ~imm; + tmp = (sljit_uw)((imm >= 0) ? imm : ~imm); ASM_SLJIT_CLZ(tmp, shift); SLJIT_ASSERT(shift > 0); shift--; - tmp = (imm << shift); + tmp = ((sljit_uw)imm << shift); if ((tmp & ~0xffff000000000000ul) == 0) { - FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48))); + FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | (sljit_ins)(tmp >> 48))); shift += 15; return PUSH_RLDICR(reg, shift); } if ((tmp & ~0xffffffff00000000ul) == 0) { - FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(tmp >> 48))); + FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | (sljit_ins)(tmp >> 48))); FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp >> 32))); shift += 31; return PUSH_RLDICR(reg, shift); @@ -78,18 +78,18 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, /* Cut out the 16 bit from immediate. */ shift += 15; - tmp2 = imm & ((1ul << (63 - shift)) - 1); + tmp2 = (sljit_uw)imm & (((sljit_uw)1 << (63 - shift)) - 1); if (tmp2 <= 0xffff) { - FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48))); + FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | (sljit_ins)(tmp >> 48))); FAIL_IF(PUSH_RLDICR(reg, shift)); - return push_inst(compiler, ORI | S(reg) | A(reg) | tmp2); + return push_inst(compiler, ORI | S(reg) | A(reg) | (sljit_ins)tmp2); } if (tmp2 <= 0xffffffff) { FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48))); FAIL_IF(PUSH_RLDICR(reg, shift)); - FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | (tmp2 >> 16))); + FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | (sljit_ins)(tmp2 >> 16))); return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp2)) : SLJIT_SUCCESS; } @@ -97,16 +97,16 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, tmp2 <<= shift2; if ((tmp2 & ~0xffff000000000000ul) == 0) { - FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48))); + FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | (sljit_ins)(tmp >> 48))); shift2 += 15; shift += (63 - shift2); FAIL_IF(PUSH_RLDICR(reg, shift)); - FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | (tmp2 >> 48))); + FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | (sljit_ins)(tmp2 >> 48))); return PUSH_RLDICR(reg, shift2); } /* The general version. */ - FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 48))); + FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | (sljit_ins)((sljit_uw)imm >> 48))); FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm >> 32))); FAIL_IF(PUSH_RLDICR(reg, 31)); FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(imm >> 16))); @@ -199,19 +199,6 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl UN_EXTS(); return push_inst(compiler, NOR | RC(flags) | S(src2) | A(dst) | B(src2)); - case SLJIT_NEG: - SLJIT_ASSERT(src1 == TMP_REG1); - - if ((flags & (ALT_FORM1 | ALT_SIGN_EXT)) == (ALT_FORM1 | ALT_SIGN_EXT)) { - FAIL_IF(push_inst(compiler, RLDI(TMP_REG2, src2, 32, 31, 1))); - FAIL_IF(push_inst(compiler, NEG | OE(ALT_SET_FLAGS) | RC(ALT_SET_FLAGS) | D(dst) | A(TMP_REG2))); - return push_inst(compiler, RLDI(dst, dst, 32, 32, 0)); - } - - UN_EXTS(); - /* Setting XER SO is not enough, CR SO is also needed. */ - return push_inst(compiler, NEG | OE((flags & ALT_FORM1) ? ALT_SET_FLAGS : 0) | RC(flags) | D(dst) | A(src2)); - case SLJIT_CLZ: SLJIT_ASSERT(src1 == TMP_REG1); if (flags & ALT_FORM1) @@ -299,13 +286,22 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl if (flags & ALT_FORM3) { if (flags & ALT_SIGN_EXT) { - FAIL_IF(push_inst(compiler, RLDI(TMP_REG1, src1, 32, 31, 1))); - src1 = TMP_REG1; - FAIL_IF(push_inst(compiler, RLDI(TMP_REG2, src2, 32, 31, 1))); - src2 = TMP_REG2; + if (src1 != TMP_ZERO) { + FAIL_IF(push_inst(compiler, RLDI(TMP_REG1, src1, 32, 31, 1))); + src1 = TMP_REG1; + } + if (src2 != TMP_ZERO) { + FAIL_IF(push_inst(compiler, RLDI(TMP_REG2, src2, 32, 31, 1))); + src2 = TMP_REG2; + } } + /* Setting XER SO is not enough, CR SO is also needed. */ - FAIL_IF(push_inst(compiler, SUBF | OE(ALT_SET_FLAGS) | RC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1))); + if (src1 != TMP_ZERO) + FAIL_IF(push_inst(compiler, SUBF | OE(ALT_SET_FLAGS) | RC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1))); + else + FAIL_IF(push_inst(compiler, NEG | OE(ALT_SET_FLAGS) | RC(ALT_SET_FLAGS) | D(dst) | A(src2))); + if (flags & ALT_SIGN_EXT) return push_inst(compiler, RLDI(dst, dst, 32, 32, 0)); return SLJIT_SUCCESS; @@ -317,12 +313,18 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm); } - if (!(flags & ALT_SET_FLAGS)) + if (!(flags & ALT_SET_FLAGS)) { + SLJIT_ASSERT(src1 != TMP_ZERO); return push_inst(compiler, SUBF | D(dst) | A(src2) | B(src1)); + } + BIN_EXTS(); if (flags & ALT_FORM5) return push_inst(compiler, SUBFC | RC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1)); - return push_inst(compiler, SUBF | RC(flags) | D(dst) | A(src2) | B(src1)); + + if (src1 != TMP_ZERO) + return push_inst(compiler, SUBF | RC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1)); + return push_inst(compiler, NEG | RC(ALT_SET_FLAGS) | D(dst) | A(src2)); case SLJIT_SUBC: BIN_EXTS(); @@ -432,14 +434,14 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t if (src) reg = *src & REG_MASK; - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - types = (types << SLJIT_DEF_SHIFT) | (arg_types & SLJIT_DEF_MASK); + types = (types << SLJIT_ARG_SHIFT) | (arg_types & SLJIT_ARG_MASK); - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: + case SLJIT_ARG_TYPE_F32: arg_count++; break; default: @@ -453,13 +455,13 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } while (types) { - switch (types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: + switch (types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: + case SLJIT_ARG_TYPE_F32: arg_count--; break; default: @@ -471,7 +473,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t break; } - types >>= SLJIT_DEF_SHIFT; + types >>= SLJIT_ARG_SHIFT; } return SLJIT_SUCCESS; @@ -492,10 +494,10 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_UNUSED_ARG(executable_offset); SLJIT_UPDATE_WX_FLAGS(inst, inst + 5, 0); - inst[0] = (inst[0] & 0xffff0000) | ((new_target >> 48) & 0xffff); - inst[1] = (inst[1] & 0xffff0000) | ((new_target >> 32) & 0xffff); - inst[3] = (inst[3] & 0xffff0000) | ((new_target >> 16) & 0xffff); - inst[4] = (inst[4] & 0xffff0000) | (new_target & 0xffff); + inst[0] = (inst[0] & 0xffff0000u) | ((sljit_ins)(new_target >> 48) & 0xffff); + inst[1] = (inst[1] & 0xffff0000u) | ((sljit_ins)(new_target >> 32) & 0xffff); + inst[3] = (inst[3] & 0xffff0000u) | ((sljit_ins)(new_target >> 16) & 0xffff); + inst[4] = (inst[4] & 0xffff0000u) | ((sljit_ins)new_target & 0xffff); SLJIT_UPDATE_WX_FLAGS(inst, inst + 5, 1); inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); SLJIT_CACHE_FLUSH(inst, inst + 5); @@ -503,5 +505,5 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - sljit_set_jump_addr(addr, new_constant, executable_offset); + sljit_set_jump_addr(addr, (sljit_uw)new_constant, executable_offset); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativePPC_common.c b/thirdparty/pcre2/src/sljit/sljitNativePPC_common.c index 2174dbb07b..8bfdc69522 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativePPC_common.c +++ b/thirdparty/pcre2/src/sljit/sljitNativePPC_common.c @@ -109,32 +109,32 @@ static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 7] = { }; static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { - 0, 1, 2, 3, 4, 5, 6, 0, 7 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 0, 13 }; /* --------------------------------------------------------------------- */ /* Instrucion forms */ /* --------------------------------------------------------------------- */ -#define D(d) (reg_map[d] << 21) -#define S(s) (reg_map[s] << 21) -#define A(a) (reg_map[a] << 16) -#define B(b) (reg_map[b] << 11) -#define C(c) (reg_map[c] << 6) -#define FD(fd) (freg_map[fd] << 21) -#define FS(fs) (freg_map[fs] << 21) -#define FA(fa) (freg_map[fa] << 16) -#define FB(fb) (freg_map[fb] << 11) -#define FC(fc) (freg_map[fc] << 6) -#define IMM(imm) ((imm) & 0xffff) -#define CRD(d) ((d) << 21) +#define D(d) ((sljit_ins)reg_map[d] << 21) +#define S(s) ((sljit_ins)reg_map[s] << 21) +#define A(a) ((sljit_ins)reg_map[a] << 16) +#define B(b) ((sljit_ins)reg_map[b] << 11) +#define C(c) ((sljit_ins)reg_map[c] << 6) +#define FD(fd) ((sljit_ins)freg_map[fd] << 21) +#define FS(fs) ((sljit_ins)freg_map[fs] << 21) +#define FA(fa) ((sljit_ins)freg_map[fa] << 16) +#define FB(fb) ((sljit_ins)freg_map[fb] << 11) +#define FC(fc) ((sljit_ins)freg_map[fc] << 6) +#define IMM(imm) ((sljit_ins)(imm) & 0xffff) +#define CRD(d) ((sljit_ins)(d) << 21) /* Instruction bit sections. OE and Rc flag (see ALT_SET_FLAGS). */ #define OE(flags) ((flags) & ALT_SET_FLAGS) /* Rc flag (see ALT_SET_FLAGS). */ #define RC(flags) (((flags) & ALT_SET_FLAGS) >> 10) -#define HI(opcode) ((opcode) << 26) -#define LO(opcode) ((opcode) << 1) +#define HI(opcode) ((sljit_ins)(opcode) << 26) +#define LO(opcode) ((sljit_ins)(opcode) << 1) #define ADD (HI(31) | LO(266)) #define ADDC (HI(31) | LO(10)) @@ -182,6 +182,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define FSUB (HI(63) | LO(20)) #define FSUBS (HI(59) | LO(20)) #define LD (HI(58) | 0) +#define LFD (HI(50)) #define LWZ (HI(32)) #define MFCR (HI(31) | LO(19)) #define MFLR (HI(31) | LO(339) | 0x80000) @@ -215,6 +216,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define STD (HI(62) | 0) #define STDU (HI(62) | 1) #define STDUX (HI(31) | LO(181)) +#define STFD (HI(54)) #define STFIWX (HI(31) | LO(983)) #define STW (HI(36)) #define STWU (HI(37)) @@ -232,15 +234,18 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define UIMM_MAX (0xffff) #define RLDI(dst, src, sh, mb, type) \ - (HI(30) | S(src) | A(dst) | ((type) << 2) | (((sh) & 0x1f) << 11) | (((sh) & 0x20) >> 4) | (((mb) & 0x1f) << 6) | ((mb) & 0x20)) + (HI(30) | S(src) | A(dst) | ((sljit_ins)(type) << 2) | (((sljit_ins)(sh) & 0x1f) << 11) \ + | (((sljit_ins)(sh) & 0x20) >> 4) | (((sljit_ins)(mb) & 0x1f) << 6) | ((sljit_ins)(mb) & 0x20)) #if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) -SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_sw addr, void* func) +SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_uw addr, void* func) { - sljit_sw* ptrs; + sljit_uw* ptrs; + if (func_ptr) *func_ptr = (void*)context; - ptrs = (sljit_sw*)func; + + ptrs = (sljit_uw*)func; context->addr = addr ? addr : ptrs[0]; context->r2 = ptrs[1]; context->r11 = ptrs[2]; @@ -260,7 +265,7 @@ static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_in { sljit_sw diff; sljit_uw target_addr; - sljit_sw extra_jump_flags; + sljit_uw extra_jump_flags; #if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL) && (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) if (jump->flags & (SLJIT_REWRITABLE_JUMP | IS_CALL)) @@ -296,7 +301,7 @@ static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_in } extra_jump_flags = REMOVE_COND; - diff -= sizeof(sljit_ins); + diff -= SSIZE_OF(ins); } if (diff <= 0x01ffffff && diff >= -0x02000000) { @@ -349,7 +354,7 @@ static SLJIT_INLINE void put_label_set(struct sljit_put_label *put_label) { sljit_uw addr = put_label->label->addr; sljit_ins *inst = (sljit_ins *)put_label->addr; - sljit_s32 reg = *inst; + sljit_u32 reg = *inst; if (put_label->flags == 0) { SLJIT_ASSERT(addr < 0x100000000l); @@ -433,7 +438,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == word_count) { /* Just recording the address. */ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } if (jump && jump->addr == word_count) { @@ -501,7 +506,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == word_count) { label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } @@ -511,7 +516,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil SLJIT_ASSERT(!put_label); #if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) - SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size - (sizeof(struct sljit_function_context) / sizeof(sljit_ins))); + SLJIT_ASSERT(code_ptr - code <= (sljit_sw)(compiler->size - (sizeof(struct sljit_function_context) / sizeof(sljit_ins)))); #else SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size); #endif @@ -527,22 +532,22 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (!(jump->flags & PATCH_ABS_B)) { addr -= (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset); SLJIT_ASSERT((sljit_sw)addr <= 0x7fff && (sljit_sw)addr >= -0x8000); - *buf_ptr = BCx | (addr & 0xfffc) | ((*buf_ptr) & 0x03ff0001); + *buf_ptr = BCx | ((sljit_ins)addr & 0xfffc) | ((*buf_ptr) & 0x03ff0001); } else { SLJIT_ASSERT(addr <= 0xffff); - *buf_ptr = BCx | (addr & 0xfffc) | 0x2 | ((*buf_ptr) & 0x03ff0001); + *buf_ptr = BCx | ((sljit_ins)addr & 0xfffc) | 0x2 | ((*buf_ptr) & 0x03ff0001); } } else { if (!(jump->flags & PATCH_ABS_B)) { addr -= (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset); SLJIT_ASSERT((sljit_sw)addr <= 0x01ffffff && (sljit_sw)addr >= -0x02000000); - *buf_ptr = Bx | (addr & 0x03fffffc) | ((*buf_ptr) & 0x1); + *buf_ptr = Bx | ((sljit_ins)addr & 0x03fffffc) | ((*buf_ptr) & 0x1); } else { SLJIT_ASSERT(addr <= 0x03ffffff); - *buf_ptr = Bx | (addr & 0x03fffffc) | 0x2 | ((*buf_ptr) & 0x1); + *buf_ptr = Bx | ((sljit_ins)addr & 0x03fffffc) | 0x2 | ((*buf_ptr) & 0x1); } } break; @@ -550,26 +555,32 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil /* Set the fields of immediate loads. */ #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff); - buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff); + SLJIT_ASSERT(((buf_ptr[0] | buf_ptr[1]) & 0xffff) == 0); + buf_ptr[0] |= (sljit_ins)(addr >> 16) & 0xffff; + buf_ptr[1] |= (sljit_ins)addr & 0xffff; #else if (jump->flags & PATCH_ABS32) { SLJIT_ASSERT(addr <= 0x7fffffff); - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff); - buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff); + SLJIT_ASSERT(((buf_ptr[0] | buf_ptr[1]) & 0xffff) == 0); + buf_ptr[0] |= (sljit_ins)(addr >> 16) & 0xffff; + buf_ptr[1] |= (sljit_ins)addr & 0xffff; break; } + if (jump->flags & PATCH_ABS48) { SLJIT_ASSERT(addr <= 0x7fffffffffff); - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 32) & 0xffff); - buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 16) & 0xffff); - buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | (addr & 0xffff); + SLJIT_ASSERT(((buf_ptr[0] | buf_ptr[1] | buf_ptr[3]) & 0xffff) == 0); + buf_ptr[0] |= (sljit_ins)(addr >> 32) & 0xffff; + buf_ptr[1] |= (sljit_ins)(addr >> 16) & 0xffff; + buf_ptr[3] |= (sljit_ins)addr & 0xffff; break; } - buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 48) & 0xffff); - buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 32) & 0xffff); - buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | ((addr >> 16) & 0xffff); - buf_ptr[4] = (buf_ptr[4] & 0xffff0000) | (addr & 0xffff); + + SLJIT_ASSERT(((buf_ptr[0] | buf_ptr[1] | buf_ptr[3] | buf_ptr[4]) & 0xffff) == 0); + buf_ptr[0] |= (sljit_ins)(addr >> 48) & 0xffff; + buf_ptr[1] |= (sljit_ins)(addr >> 32) & 0xffff; + buf_ptr[3] |= (sljit_ins)(addr >> 16) & 0xffff; + buf_ptr[4] |= (sljit_ins)addr & 0xffff; #endif } while (0); jump = jump->next; @@ -592,7 +603,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; - compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); + compiler->executable_size = (sljit_uw)(code_ptr - code) * sizeof(sljit_ins); code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); @@ -601,7 +612,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (((sljit_sw)code_ptr) & 0x4) code_ptr++; #endif - sljit_set_function_context(NULL, (struct sljit_function_context*)code_ptr, (sljit_sw)code, (void*)sljit_generate_code); + sljit_set_function_context(NULL, (struct sljit_function_context*)code_ptr, (sljit_uw)code, (void*)sljit_generate_code); #endif code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); @@ -696,69 +707,116 @@ ALT_FORM5 0x010000 */ #define STACK_LOAD LD #endif +#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2) +#define LR_SAVE_OFFSET 2 * SSIZE_OF(sw) +#else +#define LR_SAVE_OFFSET SSIZE_OF(sw) +#endif + +#define STACK_MAX_DISTANCE (0x8000 - SSIZE_OF(sw) - LR_SAVE_OFFSET) + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { - sljit_s32 args, i, tmp, offs; + sljit_s32 i, tmp, base, offset; + sljit_s32 word_arg_count = 0; + sljit_s32 saved_arg_count = 0; +#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) + sljit_s32 arg_count = 0; +#endif CHECK_ERROR(); CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); + local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + + GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sizeof(sljit_f64)); + local_size = (local_size + SLJIT_LOCALS_OFFSET + 15) & ~0xf; + compiler->local_size = local_size; + FAIL_IF(push_inst(compiler, MFLR | D(0))); - offs = -(sljit_s32)(sizeof(sljit_sw)); - FAIL_IF(push_inst(compiler, STACK_STORE | S(TMP_ZERO) | A(SLJIT_SP) | IMM(offs))); - tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG; - for (i = SLJIT_S0; i >= tmp; i--) { - offs -= (sljit_s32)(sizeof(sljit_sw)); - FAIL_IF(push_inst(compiler, STACK_STORE | S(i) | A(SLJIT_SP) | IMM(offs))); + base = SLJIT_SP; + offset = local_size; + + if (local_size <= STACK_MAX_DISTANCE) { +#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) + FAIL_IF(push_inst(compiler, STWU | S(SLJIT_SP) | A(SLJIT_SP) | IMM(-local_size))); +#else + FAIL_IF(push_inst(compiler, STDU | S(SLJIT_SP) | A(SLJIT_SP) | IMM(-local_size))); +#endif + } else { + base = TMP_REG1; + FAIL_IF(push_inst(compiler, OR | S(SLJIT_SP) | A(TMP_REG1) | B(SLJIT_SP))); + FAIL_IF(load_immediate(compiler, TMP_REG2, -local_size)); +#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) + FAIL_IF(push_inst(compiler, STWUX | S(SLJIT_SP) | A(SLJIT_SP) | B(TMP_REG2))); +#else + FAIL_IF(push_inst(compiler, STDUX | S(SLJIT_SP) | A(SLJIT_SP) | B(TMP_REG2))); +#endif + local_size = 0; + offset = 0; } - for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) { - offs -= (sljit_s32)(sizeof(sljit_sw)); - FAIL_IF(push_inst(compiler, STACK_STORE | S(i) | A(SLJIT_SP) | IMM(offs))); + tmp = SLJIT_FS0 - fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + offset -= SSIZE_OF(f64); + FAIL_IF(push_inst(compiler, STFD | FS(i) | A(base) | IMM(offset))); } - SLJIT_ASSERT(offs == -(sljit_s32)GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 1)); + for (i = fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + offset -= SSIZE_OF(f64); + FAIL_IF(push_inst(compiler, STFD | FS(i) | A(base) | IMM(offset))); + } -#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2) - FAIL_IF(push_inst(compiler, STACK_STORE | S(0) | A(SLJIT_SP) | IMM(2 * sizeof(sljit_sw)))); -#else - FAIL_IF(push_inst(compiler, STACK_STORE | S(0) | A(SLJIT_SP) | IMM(sizeof(sljit_sw)))); -#endif + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_STORE | S(TMP_ZERO) | A(base) | IMM(offset))); - FAIL_IF(push_inst(compiler, ADDI | D(TMP_ZERO) | A(0) | 0)); + tmp = SLJIT_S0 - saveds; + for (i = SLJIT_S0; i > tmp; i--) { + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_STORE | S(i) | A(base) | IMM(offset))); + } - args = get_arg_count(arg_types); + for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) { + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_STORE | S(i) | A(base) | IMM(offset))); + } - if (args >= 1) - FAIL_IF(push_inst(compiler, OR | S(SLJIT_R0) | A(SLJIT_S0) | B(SLJIT_R0))); - if (args >= 2) - FAIL_IF(push_inst(compiler, OR | S(SLJIT_R1) | A(SLJIT_S1) | B(SLJIT_R1))); - if (args >= 3) - FAIL_IF(push_inst(compiler, OR | S(SLJIT_R2) | A(SLJIT_S2) | B(SLJIT_R2))); + FAIL_IF(push_inst(compiler, STACK_STORE | S(0) | A(base) | IMM(local_size + LR_SAVE_OFFSET))); + FAIL_IF(push_inst(compiler, ADDI | D(TMP_ZERO) | A(0) | 0)); - local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + SLJIT_LOCALS_OFFSET; - local_size = (local_size + 15) & ~0xf; - compiler->local_size = local_size; + arg_types >>= SLJIT_ARG_SHIFT; -#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) - if (local_size <= SIMM_MAX) - FAIL_IF(push_inst(compiler, STWU | S(SLJIT_SP) | A(SLJIT_SP) | IMM(-local_size))); - else { - FAIL_IF(load_immediate(compiler, 0, -local_size)); - FAIL_IF(push_inst(compiler, STWUX | S(SLJIT_SP) | A(SLJIT_SP) | B(0))); - } + while (arg_types > 0) { + if ((arg_types & SLJIT_ARG_MASK) < SLJIT_ARG_TYPE_F64) { +#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) + do { + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + tmp = SLJIT_S0 - saved_arg_count; + saved_arg_count++; + } else if (arg_count != word_arg_count) + tmp = SLJIT_R0 + word_arg_count; + else + break; + + FAIL_IF(push_inst(compiler, OR | S(SLJIT_R0 + arg_count) | A(tmp) | B(SLJIT_R0 + arg_count))); + } while (0); #else - if (local_size <= SIMM_MAX) - FAIL_IF(push_inst(compiler, STDU | S(SLJIT_SP) | A(SLJIT_SP) | IMM(-local_size))); - else { - FAIL_IF(load_immediate(compiler, 0, -local_size)); - FAIL_IF(push_inst(compiler, STDUX | S(SLJIT_SP) | A(SLJIT_SP) | B(0))); - } + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + FAIL_IF(push_inst(compiler, OR | S(SLJIT_R0 + word_arg_count) | A(SLJIT_S0 - saved_arg_count) | B(SLJIT_R0 + word_arg_count))); + saved_arg_count++; + } #endif + word_arg_count++; + } + +#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) + arg_count++; +#endif + arg_types >>= SLJIT_ARG_SHIFT; + } return SLJIT_SUCCESS; } @@ -771,54 +829,74 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + SLJIT_LOCALS_OFFSET; - compiler->local_size = (local_size + 15) & ~0xf; + local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + + GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, sizeof(sljit_f64)); + compiler->local_size = (local_size + SLJIT_LOCALS_OFFSET + 15) & ~0xf; return SLJIT_SUCCESS; } -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) -{ - sljit_s32 i, tmp, offs; - CHECK_ERROR(); - CHECK(check_sljit_emit_return(compiler, op, src, srcw)); +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler) +{ + sljit_s32 i, tmp, base, offset; + sljit_s32 local_size = compiler->local_size; + + base = SLJIT_SP; + if (local_size > STACK_MAX_DISTANCE) { + base = TMP_REG1; + if (local_size > 2 * STACK_MAX_DISTANCE + LR_SAVE_OFFSET) { + FAIL_IF(push_inst(compiler, STACK_LOAD | D(base) | A(SLJIT_SP) | IMM(0))); + local_size = 0; + } else { + FAIL_IF(push_inst(compiler, ADDI | D(TMP_REG1) | A(SLJIT_SP) | IMM(local_size - STACK_MAX_DISTANCE))); + local_size = STACK_MAX_DISTANCE; + } + } - FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); + offset = local_size; + FAIL_IF(push_inst(compiler, STACK_LOAD | S(0) | A(base) | IMM(offset + LR_SAVE_OFFSET))); - if (compiler->local_size <= SIMM_MAX) - FAIL_IF(push_inst(compiler, ADDI | D(SLJIT_SP) | A(SLJIT_SP) | IMM(compiler->local_size))); - else { - FAIL_IF(load_immediate(compiler, 0, compiler->local_size)); - FAIL_IF(push_inst(compiler, ADD | D(SLJIT_SP) | A(SLJIT_SP) | B(0))); + tmp = SLJIT_FS0 - compiler->fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + offset -= SSIZE_OF(f64); + FAIL_IF(push_inst(compiler, LFD | FS(i) | A(base) | IMM(offset))); } -#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2) - FAIL_IF(push_inst(compiler, STACK_LOAD | D(0) | A(SLJIT_SP) | IMM(2 * sizeof(sljit_sw)))); -#else - FAIL_IF(push_inst(compiler, STACK_LOAD | D(0) | A(SLJIT_SP) | IMM(sizeof(sljit_sw)))); -#endif + for (i = compiler->fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + offset -= SSIZE_OF(f64); + FAIL_IF(push_inst(compiler, LFD | FS(i) | A(base) | IMM(offset))); + } - offs = -(sljit_s32)GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 1); + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_LOAD | S(TMP_ZERO) | A(base) | IMM(offset))); - tmp = compiler->scratches; - for (i = SLJIT_FIRST_SAVED_REG; i <= tmp; i++) { - FAIL_IF(push_inst(compiler, STACK_LOAD | D(i) | A(SLJIT_SP) | IMM(offs))); - offs += (sljit_s32)(sizeof(sljit_sw)); + tmp = SLJIT_S0 - compiler->saveds; + for (i = SLJIT_S0; i > tmp; i--) { + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_LOAD | S(i) | A(base) | IMM(offset))); } - tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG; - for (i = tmp; i <= SLJIT_S0; i++) { - FAIL_IF(push_inst(compiler, STACK_LOAD | D(i) | A(SLJIT_SP) | IMM(offs))); - offs += (sljit_s32)(sizeof(sljit_sw)); + for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) { + offset -= SSIZE_OF(sw); + FAIL_IF(push_inst(compiler, STACK_LOAD | S(i) | A(base) | IMM(offset))); } - FAIL_IF(push_inst(compiler, STACK_LOAD | D(TMP_ZERO) | A(SLJIT_SP) | IMM(offs))); - SLJIT_ASSERT(offs == -(sljit_sw)(sizeof(sljit_sw))); + push_inst(compiler, MTLR | S(0)); - FAIL_IF(push_inst(compiler, MTLR | S(0))); - FAIL_IF(push_inst(compiler, BLR)); + if (local_size > 0) + return push_inst(compiler, ADDI | D(SLJIT_SP) | A(base) | IMM(local_size)); - return SLJIT_SUCCESS; + SLJIT_ASSERT(base == TMP_REG1); + return push_inst(compiler, OR | S(base) | A(SLJIT_SP) | B(base)); +} + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); + + FAIL_IF(emit_stack_frame_release(compiler)); + return push_inst(compiler, BLR); } #undef STACK_STORE @@ -843,11 +921,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) #define ARCH_32_64(a, b) a #define INST_CODE_AND_DST(inst, flags, reg) \ - ((inst) | (((flags) & MEM_MASK) <= GPR_REG ? D(reg) : FD(reg))) + ((sljit_ins)(inst) | (sljit_ins)(((flags) & MEM_MASK) <= GPR_REG ? D(reg) : FD(reg))) #else #define ARCH_32_64(a, b) b #define INST_CODE_AND_DST(inst, flags, reg) \ - (((inst) & ~INT_ALIGNED) | (((flags) & MEM_MASK) <= GPR_REG ? D(reg) : FD(reg))) + (((sljit_ins)(inst) & ~(sljit_ins)INT_ALIGNED) | (sljit_ins)(((flags) & MEM_MASK) <= GPR_REG ? D(reg) : FD(reg))) #endif static const sljit_ins data_transfer_insts[64 + 16] = { @@ -1000,7 +1078,7 @@ static sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 inp_flag if (argw != 0) { #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) - FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(arg)) | A(tmp_reg) | (argw << 11) | ((31 - argw) << 1))); + FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(arg)) | A(tmp_reg) | ((sljit_ins)argw << 11) | ((31 - (sljit_ins)argw) << 1))); #else FAIL_IF(push_inst(compiler, RLDI(tmp_reg, OFFS_REG(arg), argw, 63 - argw, 1))); #endif @@ -1073,8 +1151,10 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 sljit_s32 flags = input_flags & (ALT_FORM1 | ALT_FORM2 | ALT_FORM3 | ALT_FORM4 | ALT_FORM5 | ALT_SIGN_EXT | ALT_SET_FLAGS); /* Destination check. */ - if (SLOW_IS_REG(dst)) { + if (FAST_IS_REG(dst)) { dst_r = dst; + /* The REG_DEST is only used by SLJIT_MOV operations, although + * it is set for op2 operations with unset destination. */ flags |= REG_DEST; if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) @@ -1087,8 +1167,11 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 flags |= REG1_SOURCE; } else if (src1 & SLJIT_IMM) { - FAIL_IF(load_immediate(compiler, TMP_REG1, src1w)); - src1_r = TMP_REG1; + src1_r = TMP_ZERO; + if (src1w != 0) { + FAIL_IF(load_immediate(compiler, TMP_REG1, src1w)); + src1_r = TMP_REG1; + } } else { FAIL_IF(emit_op_mem(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, TMP_REG1)); @@ -1104,8 +1187,11 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 dst_r = src2_r; } else if (src2 & SLJIT_IMM) { - FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w)); - src2_r = sugg_src2_r; + src2_r = TMP_ZERO; + if (src2w != 0) { + FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w)); + src2_r = sugg_src2_r; + } } else { FAIL_IF(emit_op_mem(compiler, input_flags | LOAD_DATA, sugg_src2_r, src2, src2w, TMP_REG2)); @@ -1123,7 +1209,7 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) { #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) - sljit_s32 int_op = op & SLJIT_I32_OP; + sljit_s32 int_op = op & SLJIT_32; #endif CHECK_ERROR(); @@ -1174,7 +1260,7 @@ static sljit_s32 emit_prefetch(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw) { if (!(src & OFFS_REG_MASK)) { - if (srcw == 0 && (src & REG_MASK) != SLJIT_UNUSED) + if (srcw == 0 && (src & REG_MASK)) return push_inst(compiler, DCBT | A(0) | B(src & REG_MASK)); FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); @@ -1188,7 +1274,7 @@ static sljit_s32 emit_prefetch(struct sljit_compiler *compiler, return push_inst(compiler, DCBT | A(src & REG_MASK) | B(OFFS_REG(src))); #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) - FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(src)) | A(TMP_REG1) | (srcw << 11) | ((31 - srcw) << 1))); + FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(src)) | A(TMP_REG1) | ((sljit_ins)srcw << 11) | ((31 - (sljit_ins)srcw) << 1))); #else FAIL_IF(push_inst(compiler, RLDI(TMP_REG1, OFFS_REG(src), srcw, 63 - srcw, 1))); #endif @@ -1211,8 +1297,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile ADJUST_LOCAL_OFFSET(src, srcw); op = GET_OPCODE(op); - if ((src & SLJIT_IMM) && srcw == 0) - src = TMP_ZERO; if (GET_FLAG_TYPE(op_flags) == SLJIT_OVERFLOW) FAIL_IF(push_inst(compiler, MTXER | S(TMP_ZERO))); @@ -1223,7 +1307,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile } #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) - if (op_flags & SLJIT_I32_OP) { + if (op_flags & SLJIT_32) { if (op < SLJIT_NOT) { if (src & SLJIT_MEM) { if (op == SLJIT_MOV_S32) @@ -1245,11 +1329,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile switch (op) { case SLJIT_MOV: - case SLJIT_MOV_P: #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: #endif + case SLJIT_MOV_P: return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw); #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) @@ -1257,6 +1342,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile return EMIT_MOV(SLJIT_MOV_U32, INT_DATA, (sljit_u32)); case SLJIT_MOV_S32: + case SLJIT_MOV32: return EMIT_MOV(SLJIT_MOV_S32, INT_DATA | SIGNED_DATA, (sljit_s32)); #endif @@ -1275,12 +1361,9 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile case SLJIT_NOT: return emit_op(compiler, SLJIT_NOT, flags, dst, dstw, TMP_REG1, 0, src, srcw); - case SLJIT_NEG: - return emit_op(compiler, SLJIT_NEG, flags | (GET_FLAG_TYPE(op_flags) ? ALT_FORM1 : 0), dst, dstw, TMP_REG1, 0, src, srcw); - case SLJIT_CLZ: #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) - return emit_op(compiler, SLJIT_CLZ, flags | (!(op_flags & SLJIT_I32_OP) ? 0 : ALT_FORM1), dst, dstw, TMP_REG1, 0, src, srcw); + return emit_op(compiler, SLJIT_CLZ, flags | (!(op_flags & SLJIT_32) ? 0 : ALT_FORM1), dst, dstw, TMP_REG1, 0, src, srcw); #else return emit_op(compiler, SLJIT_CLZ, flags, dst, dstw, TMP_REG1, 0, src, srcw); #endif @@ -1306,7 +1389,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile #endif #define TEST_UH_IMM(src, srcw) \ - (((src) & SLJIT_IMM) && !((srcw) & ~0xffff0000)) + (((src) & SLJIT_IMM) && !((srcw) & ~(sljit_sw)0xffff0000)) #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) #define TEST_ADD_IMM(src, srcw) \ @@ -1327,13 +1410,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) #define TEST_ADD_FORM1(op) \ (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW \ - || (op & (SLJIT_I32_OP | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_I32_OP | SLJIT_SET_Z | SLJIT_SET_CARRY)) + || (op & (SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_32 | SLJIT_SET_Z | SLJIT_SET_CARRY)) #define TEST_SUB_FORM2(op) \ ((GET_FLAG_TYPE(op) >= SLJIT_SIG_LESS && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) \ - || (op & (SLJIT_I32_OP | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_I32_OP | SLJIT_SET_Z)) + || (op & (SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_32 | SLJIT_SET_Z)) #define TEST_SUB_FORM3(op) \ (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW \ - || (op & (SLJIT_I32_OP | SLJIT_SET_Z)) == (SLJIT_I32_OP | SLJIT_SET_Z)) + || (op & (SLJIT_32 | SLJIT_SET_Z)) == (SLJIT_32 | SLJIT_SET_Z)) #else #define TEST_ADD_FORM1(op) \ (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW) @@ -1351,21 +1434,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile sljit_s32 flags = HAS_FLAGS(op) ? ALT_SET_FLAGS : 0; CHECK_ERROR(); - CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) - return SLJIT_SUCCESS; - - if ((src1 & SLJIT_IMM) && src1w == 0) - src1 = TMP_ZERO; - if ((src2 & SLJIT_IMM) && src2w == 0) - src2 = TMP_ZERO; - #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) - if (op & SLJIT_I32_OP) { + if (op & SLJIT_32) { /* Most operations expect sign extended arguments. */ flags |= INT_DATA | SIGNED_DATA; if (src1 & SLJIT_IMM) @@ -1381,45 +1456,47 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile switch (GET_OPCODE(op)) { case SLJIT_ADD: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; + if (TEST_ADD_FORM1(op)) return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM1, dst, dstw, src1, src1w, src2, src2w); if (!HAS_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) { if (TEST_SL_IMM(src2, src2w)) { - compiler->imm = src2w & 0xffff; + compiler->imm = (sljit_ins)src2w & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_SL_IMM(src1, src1w)) { - compiler->imm = src1w & 0xffff; + compiler->imm = (sljit_ins)src1w & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0); } if (TEST_SH_IMM(src2, src2w)) { - compiler->imm = (src2w >> 16) & 0xffff; + compiler->imm = (sljit_ins)(src2w >> 16) & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2 | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_SH_IMM(src1, src1w)) { - compiler->imm = (src1w >> 16) & 0xffff; + compiler->imm = (sljit_ins)(src1w >> 16) & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2 | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0); } /* Range between -1 and -32768 is covered above. */ if (TEST_ADD_IMM(src2, src2w)) { - compiler->imm = src2w & 0xffffffff; + compiler->imm = (sljit_ins)src2w & 0xffffffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2 | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_ADD_IMM(src1, src1w)) { - compiler->imm = src1w & 0xffffffff; + compiler->imm = (sljit_ins)src1w & 0xffffffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2 | ALT_FORM4, dst, dstw, src2, src2w, TMP_REG2, 0); } } #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) - if ((op & (SLJIT_I32_OP | SLJIT_SET_Z)) == (SLJIT_I32_OP | SLJIT_SET_Z)) { + if ((op & (SLJIT_32 | SLJIT_SET_Z)) == (SLJIT_32 | SLJIT_SET_Z)) { if (TEST_SL_IMM(src2, src2w)) { - compiler->imm = src2w & 0xffff; + compiler->imm = (sljit_ins)src2w & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4 | ALT_FORM5, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_SL_IMM(src1, src1w)) { - compiler->imm = src1w & 0xffff; + compiler->imm = (sljit_ins)src1w & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4 | ALT_FORM5, dst, dstw, src2, src2w, TMP_REG2, 0); } return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4, dst, dstw, src1, src1w, src2, src2w); @@ -1427,39 +1504,42 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile #endif if (HAS_FLAGS(op)) { if (TEST_SL_IMM(src2, src2w)) { - compiler->imm = src2w & 0xffff; + compiler->imm = (sljit_ins)src2w & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_SL_IMM(src1, src1w)) { - compiler->imm = src1w & 0xffff; + compiler->imm = (sljit_ins)src1w & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0); } } return emit_op(compiler, SLJIT_ADD, flags | ((GET_FLAG_TYPE(op) == GET_FLAG_TYPE(SLJIT_SET_CARRY)) ? ALT_FORM5 : 0), dst, dstw, src1, src1w, src2, src2w); case SLJIT_ADDC: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; return emit_op(compiler, SLJIT_ADDC, flags, dst, dstw, src1, src1w, src2, src2w); case SLJIT_SUB: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; + if (GET_FLAG_TYPE(op) >= SLJIT_LESS && GET_FLAG_TYPE(op) <= SLJIT_LESS_EQUAL) { - if (dst == SLJIT_UNUSED) { + if (dst == TMP_REG2) { if (TEST_UL_IMM(src2, src2w)) { - compiler->imm = src2w & 0xffff; + compiler->imm = (sljit_ins)src2w & 0xffff; return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM1 | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0); } return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM1, dst, dstw, src1, src1w, src2, src2w); } if ((src2 & SLJIT_IMM) && src2w >= 0 && src2w <= (SIMM_MAX + 1)) { - compiler->imm = src2w; + compiler->imm = (sljit_ins)src2w; return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM1 | ALT_FORM2 | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); } return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM1 | ALT_FORM3, dst, dstw, src1, src1w, src2, src2w); } - if (dst == SLJIT_UNUSED && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) { + if (dst == TMP_REG2 && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) { if (TEST_SL_IMM(src2, src2w)) { - compiler->imm = src2w & 0xffff; + compiler->imm = (sljit_ins)src2w & 0xffff; return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2 | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); } return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2, dst, dstw, src1, src1w, src2, src2w); @@ -1467,7 +1547,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile if (TEST_SUB_FORM2(op)) { if ((src2 & SLJIT_IMM) && src2w >= -SIMM_MAX && src2w <= SIMM_MAX) { - compiler->imm = src2w & 0xffff; + compiler->imm = (sljit_ins)src2w & 0xffff; return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2 | ALT_FORM3 | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0); } return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2 | ALT_FORM4, dst, dstw, src1, src1w, src2, src2w); @@ -1477,45 +1557,46 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM3, dst, dstw, src1, src1w, src2, src2w); if (TEST_SL_IMM(src2, -src2w)) { - compiler->imm = (-src2w) & 0xffff; + compiler->imm = (sljit_ins)(-src2w) & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | (!HAS_FLAGS(op) ? ALT_FORM2 : ALT_FORM3), dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_SL_IMM(src1, src1w) && !(op & SLJIT_SET_Z)) { - compiler->imm = src1w & 0xffff; + compiler->imm = (sljit_ins)src1w & 0xffff; return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM4, dst, dstw, src2, src2w, TMP_REG2, 0); } if (!HAS_FLAGS(op)) { if (TEST_SH_IMM(src2, -src2w)) { - compiler->imm = ((-src2w) >> 16) & 0xffff; + compiler->imm = (sljit_ins)((-src2w) >> 16) & 0xffff; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2 | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); } /* Range between -1 and -32768 is covered above. */ if (TEST_ADD_IMM(src2, -src2w)) { - compiler->imm = -src2w & 0xffffffff; + compiler->imm = (sljit_ins)-src2w; return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2 | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0); } } - /* We know ALT_SIGN_EXT is set if it is an SLJIT_I32_OP on 64 bit systems. */ + /* We know ALT_SIGN_EXT is set if it is an SLJIT_32 on 64 bit systems. */ return emit_op(compiler, SLJIT_SUB, flags | ((GET_FLAG_TYPE(op) == GET_FLAG_TYPE(SLJIT_SET_CARRY)) ? ALT_FORM5 : 0), dst, dstw, src1, src1w, src2, src2w); case SLJIT_SUBC: + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; return emit_op(compiler, SLJIT_SUBC, flags, dst, dstw, src1, src1w, src2, src2w); case SLJIT_MUL: #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) - if (op & SLJIT_I32_OP) + if (op & SLJIT_32) flags |= ALT_FORM2; #endif if (!HAS_FLAGS(op)) { if (TEST_SL_IMM(src2, src2w)) { - compiler->imm = src2w & 0xffff; + compiler->imm = (sljit_ins)src2w & 0xffff; return emit_op(compiler, SLJIT_MUL, flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_SL_IMM(src1, src1w)) { - compiler->imm = src1w & 0xffff; + compiler->imm = (sljit_ins)src1w & 0xffff; return emit_op(compiler, SLJIT_MUL, flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0); } } @@ -1529,30 +1610,30 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile /* Commutative unsigned operations. */ if (!HAS_FLAGS(op) || GET_OPCODE(op) == SLJIT_AND) { if (TEST_UL_IMM(src2, src2w)) { - compiler->imm = src2w; + compiler->imm = (sljit_ins)src2w; return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_UL_IMM(src1, src1w)) { - compiler->imm = src1w; + compiler->imm = (sljit_ins)src1w; return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0); } if (TEST_UH_IMM(src2, src2w)) { - compiler->imm = (src2w >> 16) & 0xffff; + compiler->imm = (sljit_ins)(src2w >> 16) & 0xffff; return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_UH_IMM(src1, src1w)) { - compiler->imm = (src1w >> 16) & 0xffff; + compiler->imm = (sljit_ins)(src1w >> 16) & 0xffff; return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0); } } - if (GET_OPCODE(op) != SLJIT_AND && GET_OPCODE(op) != SLJIT_AND) { - /* Unlike or and xor, and resets unwanted bits as well. */ + if (GET_OPCODE(op) != SLJIT_AND) { + /* Unlike or and xor, the and resets unwanted bits as well. */ if (TEST_UI_IMM(src2, src2w)) { - compiler->imm = src2w; + compiler->imm = (sljit_ins)src2w; return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); } if (TEST_UI_IMM(src1, src1w)) { - compiler->imm = src1w; + compiler->imm = (sljit_ins)src1w; return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0); } } @@ -1562,11 +1643,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile case SLJIT_LSHR: case SLJIT_ASHR: #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) - if (op & SLJIT_I32_OP) + if (op & SLJIT_32) flags |= ALT_FORM2; #endif if (src2 & SLJIT_IMM) { - compiler->imm = src2w; + compiler->imm = (sljit_ins)src2w; return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); } return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w); @@ -1575,6 +1656,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile return SLJIT_SUCCESS; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + return sljit_emit_op2(compiler, op, TMP_REG2, 0, src1, src1w, src2, src2w); +} + #undef TEST_ADD_FORM1 #undef TEST_SUB_FORM2 #undef TEST_SUB_FORM3 @@ -1621,7 +1716,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { CHECK_ERROR(); CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); @@ -1633,8 +1728,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *c /* Floating point operators */ /* --------------------------------------------------------------------- */ -#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_F32_OP) >> 6)) -#define SELECT_FOP(op, single, double) ((op & SLJIT_F32_OP) ? single : double) +#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_32) >> 6)) +#define SELECT_FOP(op, single, double) ((sljit_ins)((op & SLJIT_32) ? single : double)) #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) #define FLOAT_TMP_MEM_OFFSET (6 * sizeof(sljit_sw)) @@ -1688,7 +1783,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_comp dstw &= 0x3; if (dstw) { #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) - FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(dst)) | A(TMP_REG1) | (dstw << 11) | ((31 - dstw) << 1))); + FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(dst)) | A(TMP_REG1) | ((sljit_ins)dstw << 11) | ((31 - (sljit_ins)dstw) << 1))); #else FAIL_IF(push_inst(compiler, RLDI(TMP_REG1, OFFS_REG(dst), dstw, 63 - dstw, 1))); #endif @@ -1745,7 +1840,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp if (dst & SLJIT_MEM) return emit_op_mem(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, TMP_REG1); - if (op & SLJIT_F32_OP) + if (op & SLJIT_32) return push_inst(compiler, FRSP | FD(dst_r) | FB(dst_r)); return SLJIT_SUCCESS; @@ -1755,7 +1850,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp sljit_s32 invert_sign = 1; if (src & SLJIT_IMM) { - FAIL_IF(load_immediate(compiler, TMP_REG1, srcw ^ 0x80000000)); + FAIL_IF(load_immediate(compiler, TMP_REG1, srcw ^ (sljit_sw)0x80000000)); src = TMP_REG1; invert_sign = 0; } @@ -1783,7 +1878,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp if (dst & SLJIT_MEM) return emit_op_mem(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, TMP_REG1); - if (op & SLJIT_F32_OP) + if (op & SLJIT_32) return push_inst(compiler, FRSP | FD(dst_r) | FB(dst_r)); return SLJIT_SUCCESS; @@ -1815,11 +1910,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil CHECK_ERROR(); - SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100) && !(DOUBLE_DATA & 0x4), float_transfer_bit_error); + SLJIT_COMPILE_ASSERT((SLJIT_32 == 0x100) && !(DOUBLE_DATA & 0x4), float_transfer_bit_error); SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; @@ -1830,8 +1925,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil switch (GET_OPCODE(op)) { case SLJIT_CONV_F64_FROM_F32: - op ^= SLJIT_F32_OP; - if (op & SLJIT_F32_OP) { + op ^= SLJIT_32; + if (op & SLJIT_32) { FAIL_IF(push_inst(compiler, FRSP | FD(dst_r) | FB(src))); break; } @@ -1946,12 +2041,22 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compi return label; } -static sljit_ins get_bo_bi_flags(sljit_s32 type) +static sljit_ins get_bo_bi_flags(struct sljit_compiler *compiler, sljit_s32 type) { switch (type) { + case SLJIT_NOT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_SUB) + return (4 << 21) | (2 << 16); + /* fallthrough */ + case SLJIT_EQUAL: return (12 << 21) | (2 << 16); + case SLJIT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_SUB) + return (12 << 21) | (2 << 16); + /* fallthrough */ + case SLJIT_NOT_EQUAL: return (4 << 21) | (2 << 16); @@ -2015,15 +2120,18 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_jump(compiler, type)); - bo_bi_flags = get_bo_bi_flags(type & 0xff); + bo_bi_flags = get_bo_bi_flags(compiler, type & 0xff); if (!bo_bi_flags) return NULL; jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); PTR_FAIL_IF(!jump); - set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); + set_jump(jump, compiler, (sljit_u32)type & SLJIT_REWRITABLE_JUMP); type &= 0xff; + if (type == SLJIT_CARRY || type == SLJIT_NOT_CARRY) + PTR_FAIL_IF(push_inst(compiler, ADDE | RC(ALT_SET_FLAGS) | D(TMP_REG1) | A(TMP_ZERO) | B(TMP_ZERO))); + /* In PPC, we don't need to touch the arguments. */ if (type < SLJIT_JUMP) jump->flags |= IS_COND; @@ -2049,6 +2157,11 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile PTR_FAIL_IF(call_with_args(compiler, arg_types, NULL)); #endif + if (type & SLJIT_CALL_RETURN) { + PTR_FAIL_IF(emit_stack_frame_release(compiler)); + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); + } + #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; @@ -2068,25 +2181,27 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi if (FAST_IS_REG(src)) { #if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL) - if (type >= SLJIT_CALL) { + if (type >= SLJIT_CALL && src != TMP_CALL_REG) { FAIL_IF(push_inst(compiler, OR | S(src) | A(TMP_CALL_REG) | B(src))); src_r = TMP_CALL_REG; } else src_r = src; -#else +#else /* SLJIT_PASS_ENTRY_ADDR_TO_CALL */ src_r = src; -#endif +#endif /* SLJIT_PASS_ENTRY_ADDR_TO_CALL */ } else if (src & SLJIT_IMM) { /* These jumps are converted to jump/call instructions when possible. */ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); FAIL_IF(!jump); set_jump(jump, compiler, JUMP_ADDR); - jump->u.target = srcw; + jump->u.target = (sljit_uw)srcw; + #if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL) if (type >= SLJIT_CALL) jump->flags |= IS_CALL; -#endif +#endif /* SLJIT_PASS_ENTRY_ADDR_TO_CALL */ + FAIL_IF(emit_const(compiler, TMP_CALL_REG, 0)); src_r = TMP_CALL_REG; } @@ -2108,13 +2223,23 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi CHECK_ERROR(); CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); -#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) if (src & SLJIT_MEM) { ADJUST_LOCAL_OFFSET(src, srcw); FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_CALL_REG, 0, TMP_REG1, 0, src, srcw)); src = TMP_CALL_REG; } + if (type & SLJIT_CALL_RETURN) { + if (src >= SLJIT_FIRST_SAVED_REG && src <= SLJIT_S0) { + FAIL_IF(push_inst(compiler, OR | S(src) | A(TMP_CALL_REG) | B(src))); + src = TMP_CALL_REG; + } + + FAIL_IF(emit_stack_frame_release(compiler)); + type = SLJIT_JUMP; + } + +#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) FAIL_IF(call_with_args(compiler, arg_types, &src)); #endif @@ -2130,20 +2255,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co sljit_s32 dst, sljit_sw dstw, sljit_s32 type) { - sljit_s32 reg, input_flags, cr_bit, invert; + sljit_s32 reg, invert; + sljit_u32 bit, from_xer; sljit_s32 saved_op = op; sljit_sw saved_dstw = dstw; +#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) + sljit_s32 input_flags = ((op & SLJIT_32) || op == SLJIT_MOV32) ? INT_DATA : WORD_DATA; +#else + sljit_s32 input_flags = WORD_DATA; +#endif CHECK_ERROR(); CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); ADJUST_LOCAL_OFFSET(dst, dstw); -#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) - input_flags = (op & SLJIT_I32_OP) ? INT_DATA : WORD_DATA; -#else - input_flags = WORD_DATA; -#endif - op = GET_OPCODE(op); reg = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2; @@ -2151,7 +2276,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co FAIL_IF(emit_op_mem(compiler, input_flags | LOAD_DATA, TMP_REG1, dst, dstw, TMP_REG1)); invert = 0; - cr_bit = 0; + bit = 0; + from_xer = 0; switch (type & 0xff) { case SLJIT_LESS: @@ -2165,66 +2291,80 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co case SLJIT_GREATER: case SLJIT_SIG_GREATER: - cr_bit = 1; + bit = 1; break; case SLJIT_LESS_EQUAL: case SLJIT_SIG_LESS_EQUAL: - cr_bit = 1; + bit = 1; invert = 1; break; case SLJIT_EQUAL: - cr_bit = 2; + bit = 2; break; case SLJIT_NOT_EQUAL: - cr_bit = 2; + bit = 2; invert = 1; break; case SLJIT_OVERFLOW: - cr_bit = 3; + from_xer = 1; + bit = 1; break; case SLJIT_NOT_OVERFLOW: - cr_bit = 3; + from_xer = 1; + bit = 1; invert = 1; break; + case SLJIT_CARRY: + from_xer = 1; + bit = 2; + invert = (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_SUB) != 0; + break; + + case SLJIT_NOT_CARRY: + from_xer = 1; + bit = 2; + invert = (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD) != 0; + break; + case SLJIT_LESS_F64: - cr_bit = 4 + 0; + bit = 4 + 0; break; case SLJIT_GREATER_EQUAL_F64: - cr_bit = 4 + 0; + bit = 4 + 0; invert = 1; break; case SLJIT_GREATER_F64: - cr_bit = 4 + 1; + bit = 4 + 1; break; case SLJIT_LESS_EQUAL_F64: - cr_bit = 4 + 1; + bit = 4 + 1; invert = 1; break; case SLJIT_EQUAL_F64: - cr_bit = 4 + 2; + bit = 4 + 2; break; case SLJIT_NOT_EQUAL_F64: - cr_bit = 4 + 2; + bit = 4 + 2; invert = 1; break; case SLJIT_UNORDERED_F64: - cr_bit = 4 + 3; + bit = 4 + 3; break; case SLJIT_ORDERED_F64: - cr_bit = 4 + 3; + bit = 4 + 3; invert = 1; break; @@ -2233,8 +2373,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co break; } - FAIL_IF(push_inst(compiler, MFCR | D(reg))); - FAIL_IF(push_inst(compiler, RLWINM | S(reg) | A(reg) | ((1 + (cr_bit)) << 11) | (31 << 6) | (31 << 1))); + FAIL_IF(push_inst(compiler, (from_xer ? MFXER : MFCR) | D(reg))); + FAIL_IF(push_inst(compiler, RLWINM | S(reg) | A(reg) | ((1 + bit) << 11) | (31 << 6) | (31 << 1))); if (invert) FAIL_IF(push_inst(compiler, XORI | S(reg) | A(reg) | 0x1)); @@ -2283,19 +2423,21 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compile #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: #endif mem_flags = WORD_DATA; break; #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) case SLJIT_MOV_U32: + case SLJIT_MOV32: mem_flags = INT_DATA; break; case SLJIT_MOV_S32: mem_flags = INT_DATA; - if (!(type & SLJIT_MEM_STORE) && !(type & SLJIT_I32_OP)) { + if (!(type & SLJIT_MEM_STORE) && !(type & SLJIT_32)) { if (mem & OFFS_REG_MASK) mem_flags |= SIGNED_DATA; else @@ -2436,7 +2578,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct slj #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) PTR_FAIL_IF(emit_const(compiler, dst_r, 0)); #else - PTR_FAIL_IF(push_inst(compiler, dst_r)); + PTR_FAIL_IF(push_inst(compiler, (sljit_ins)dst_r)); compiler->size += 4; #endif diff --git a/thirdparty/pcre2/src/sljit/sljitNativeS390X.c b/thirdparty/pcre2/src/sljit/sljitNativeS390X.c index 716491ec72..8eef910c42 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeS390X.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeS390X.c @@ -44,6 +44,9 @@ typedef sljit_uw sljit_ins; /* Instruction tags (most significant halfword). */ static const sljit_ins sljit_ins_const = (sljit_ins)1 << 48; +#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2) +#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3) + static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 4] = { 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 0, 1 }; @@ -97,20 +100,37 @@ static const sljit_gpr r15 = 15; /* reg_map[SLJIT_NUMBER_OF_REGISTERS + 1]: stac * link register doesn't need to change */ +/* When reg cannot be unused. */ +#define IS_GPR_REG(reg) ((reg > 0) && (reg) <= SLJIT_SP) + /* Link registers. The normal link register is r14, but since we use that for flags we need to use r0 instead to do fast calls so that flags are preserved. */ static const sljit_gpr link_r = 14; /* r14 */ static const sljit_gpr fast_link_r = 0; /* r0 */ -/* Flag register layout: +#define TMP_FREG1 (0) + +static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1] = { + 1, 0, 2, 4, 6, 3, 5, 7, 15, 14, 13, 12, 11, 10, 9, 8, +}; + +#define R0A(r) (r) +#define R4A(r) ((r) << 4) +#define R8A(r) ((r) << 8) +#define R12A(r) ((r) << 12) +#define R16A(r) ((r) << 16) +#define R20A(r) ((r) << 20) +#define R28A(r) ((r) << 28) +#define R32A(r) ((r) << 32) +#define R36A(r) ((r) << 36) - 0 32 33 34 36 64 - +---------------+---+---+-------+-------+ - | ZERO | 0 | 0 | C C |///////| - +---------------+---+---+-------+-------+ -*/ -static const sljit_gpr flag_r = 14; /* r14 */ +#define R0(r) ((sljit_ins)reg_map[r]) + +#define F0(r) ((sljit_ins)freg_map[r]) +#define F4(r) (R4A((sljit_ins)freg_map[r])) +#define F20(r) (R20A((sljit_ins)freg_map[r])) +#define F36(r) (R36A((sljit_ins)freg_map[r])) struct sljit_s390x_const { struct sljit_const const_; /* must be first */ @@ -124,19 +144,25 @@ static SLJIT_INLINE sljit_gpr gpr(sljit_s32 r) return reg_map[r]; } +static SLJIT_INLINE sljit_gpr fgpr(sljit_s32 r) +{ + SLJIT_ASSERT(r >= 0 && r < (sljit_s32)(sizeof(freg_map) / sizeof(freg_map[0]))); + return freg_map[r]; +} + /* Size of instruction in bytes. Tags must already be cleared. */ static SLJIT_INLINE sljit_uw sizeof_ins(sljit_ins ins) { /* keep faulting instructions */ if (ins == 0) - return 2; + return 2; if ((ins & 0x00000000ffffL) == ins) - return 2; + return 2; if ((ins & 0x0000ffffffffL) == ins) - return 4; + return 4; if ((ins & 0xffffffffffffL) == ins) - return 6; + return 6; SLJIT_UNREACHABLE(); return (sljit_uw)-1; @@ -172,7 +198,8 @@ static sljit_s32 encode_inst(void **ptr, sljit_ins ins) } #define SLJIT_ADD_SUB_NO_COMPARE(status_flags_state) \ - (((status_flags_state) & (SLJIT_CURRENT_FLAGS_ADD_SUB | SLJIT_CURRENT_FLAGS_COMPARE)) == SLJIT_CURRENT_FLAGS_ADD_SUB) + (((status_flags_state) & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB)) \ + && !((status_flags_state) & SLJIT_CURRENT_FLAGS_COMPARE)) /* Map the given type to a 4-bit condition code mask. */ static SLJIT_INLINE sljit_u8 get_cc(struct sljit_compiler *compiler, sljit_s32 type) { @@ -191,6 +218,7 @@ static SLJIT_INLINE sljit_u8 get_cc(struct sljit_compiler *compiler, sljit_s32 t return (cc0 | cc3); return (cc0 | cc2); } + /* fallthrough */ case SLJIT_EQUAL_F64: return cc0; @@ -204,6 +232,7 @@ static SLJIT_INLINE sljit_u8 get_cc(struct sljit_compiler *compiler, sljit_s32 t return (cc1 | cc2); return (cc1 | cc3); } + /* fallthrough */ case SLJIT_NOT_EQUAL_F64: return (cc1 | cc2 | cc3); @@ -228,10 +257,20 @@ static SLJIT_INLINE sljit_u8 get_cc(struct sljit_compiler *compiler, sljit_s32 t case SLJIT_LESS_F64: return cc1; + case SLJIT_NOT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_SUB) + return (cc2 | cc3); + /* fallthrough */ + case SLJIT_SIG_LESS_EQUAL: case SLJIT_LESS_EQUAL_F64: return (cc0 | cc1); + case SLJIT_CARRY: + if (compiler->status_flags_state & SLJIT_CURRENT_FLAGS_SUB) + return (cc0 | cc1); + /* fallthrough */ + case SLJIT_SIG_GREATER: /* Overflow is considered greater, see SLJIT_SUB. */ return cc2 | cc3; @@ -242,6 +281,7 @@ static SLJIT_INLINE sljit_u8 get_cc(struct sljit_compiler *compiler, sljit_s32 t case SLJIT_OVERFLOW: if (compiler->status_flags_state & SLJIT_SET_Z) return (cc2 | cc3); + /* fallthrough */ case SLJIT_UNORDERED_F64: return cc3; @@ -249,6 +289,7 @@ static SLJIT_INLINE sljit_u8 get_cc(struct sljit_compiler *compiler, sljit_s32 t case SLJIT_NOT_OVERFLOW: if (compiler->status_flags_state & SLJIT_SET_Z) return (cc0 | cc1); + /* fallthrough */ case SLJIT_ORDERED_F64: return (cc0 | cc1 | cc2); @@ -444,7 +485,7 @@ SLJIT_S390X_RR(or, 0x1600) #define SLJIT_S390X_RRE(name, pattern) \ SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src) \ { \ - return (pattern) | ((dst & 0xf) << 4) | (src & 0xf); \ + return (pattern) | R4A(dst) | R0A(src); \ } /* AND */ @@ -504,7 +545,7 @@ SLJIT_S390X_RRE(sgr, 0xb9090000) #define SLJIT_S390X_RIA(name, pattern, imm_type) \ SLJIT_S390X_INSTRUCTION(name, sljit_gpr reg, imm_type imm) \ { \ - return (pattern) | ((reg & 0xf) << 20) | (imm & 0xffff); \ + return (pattern) | R20A(reg) | (imm & 0xffff); \ } /* ADD HALFWORD IMMEDIATE */ @@ -534,7 +575,7 @@ SLJIT_S390X_RIA(oilh, 0xa50a0000, sljit_u16) SLJIT_S390X_INSTRUCTION(name, sljit_gpr reg, imm_type imm) \ { \ SLJIT_ASSERT(have_eimm()); \ - return (pattern) | ((sljit_ins)(reg & 0xf) << 36) | (imm & 0xffffffff); \ + return (pattern) | R36A(reg) | ((sljit_ins)imm & 0xffffffffu); \ } /* ADD IMMEDIATE */ @@ -567,17 +608,11 @@ SLJIT_S390X_RILA(slfi, 0xc20500000000, sljit_u32) /* RX-a form instructions */ #define SLJIT_S390X_RXA(name, pattern) \ -SLJIT_S390X_INSTRUCTION(name, sljit_gpr r, sljit_u16 d, sljit_gpr x, sljit_gpr b) \ +SLJIT_S390X_INSTRUCTION(name, sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b) \ { \ - sljit_ins ri, xi, bi, di; \ -\ SLJIT_ASSERT((d & 0xfff) == d); \ - ri = (sljit_ins)(r & 0xf) << 20; \ - xi = (sljit_ins)(x & 0xf) << 16; \ - bi = (sljit_ins)(b & 0xf) << 12; \ - di = (sljit_ins)(d & 0xfff); \ \ - return (pattern) | ri | xi | bi | di; \ + return (pattern) | R20A(r) | R16A(x) | R12A(b) | (sljit_ins)(d & 0xfff); \ } /* LOAD */ @@ -607,15 +642,9 @@ SLJIT_S390X_RXA(sth, 0x40000000) #define SLJIT_S390X_RXYA(name, pattern, cond) \ SLJIT_S390X_INSTRUCTION(name, sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b) \ { \ - sljit_ins ri, xi, bi, di; \ -\ SLJIT_ASSERT(cond); \ - ri = (sljit_ins)(r & 0xf) << 36; \ - xi = (sljit_ins)(x & 0xf) << 32; \ - bi = (sljit_ins)(b & 0xf) << 28; \ - di = disp_s20(d); \ \ - return (pattern) | ri | xi | bi | di; \ + return (pattern) | R36A(r) | R32A(x) | R28A(b) | disp_s20(d); \ } /* LOAD */ @@ -660,17 +689,11 @@ SLJIT_S390X_RXYA(sthy, 0xe30000000070, have_ldisp()) /* RSY-a instructions */ #define SLJIT_S390X_RSYA(name, pattern, cond) \ -SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src, sljit_sw d, sljit_gpr b) \ +SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src, sljit_s32 d, sljit_gpr b) \ { \ - sljit_ins r1, r3, b2, d2; \ -\ SLJIT_ASSERT(cond); \ - r1 = (sljit_ins)(dst & 0xf) << 36; \ - r3 = (sljit_ins)(src & 0xf) << 32; \ - b2 = (sljit_ins)(b & 0xf) << 28; \ - d2 = disp_s20(d); \ \ - return (pattern) | r1 | r3 | b2 | d2; \ + return (pattern) | R36A(dst) | R32A(src) | R28A(b) | disp_s20(d); \ } /* LOAD MULTIPLE */ @@ -691,16 +714,14 @@ SLJIT_S390X_RSYA(stmg, 0xeb0000000024, 1) #define SLJIT_S390X_RIEF(name, pattern) \ SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src, sljit_u8 start, sljit_u8 end, sljit_u8 rot) \ { \ - sljit_ins r1, r2, i3, i4, i5; \ + sljit_ins i3, i4, i5; \ \ SLJIT_ASSERT(have_genext()); \ - r1 = (sljit_ins)(dst & 0xf) << 36; \ - r2 = (sljit_ins)(src & 0xf) << 32; \ i3 = (sljit_ins)start << 24; \ i4 = (sljit_ins)end << 16; \ i5 = (sljit_ins)rot << 8; \ \ - return (pattern) | r1 | r2 | i3 | i4 | i5; \ + return (pattern) | R36A(dst & 0xf) | R32A(src & 0xf) | i3 | i4 | i5; \ } /* ROTATE THEN AND SELECTED BITS */ @@ -728,14 +749,12 @@ SLJIT_S390X_RIEF(risbhg, 0xec000000005d) #define SLJIT_S390X_RRFC(name, pattern) \ SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src, sljit_uw mask) \ { \ - sljit_ins r1, r2, m3; \ + sljit_ins m3; \ \ SLJIT_ASSERT(have_lscond1()); \ - r1 = (sljit_ins)(dst & 0xf) << 4; \ - r2 = (sljit_ins)(src & 0xf); \ m3 = (sljit_ins)(mask & 0xf) << 12; \ \ - return (pattern) | m3 | r1 | r2; \ + return (pattern) | m3 | R4A(dst) | R0A(src); \ } /* LOAD HALFWORD IMMEDIATE ON CONDITION */ @@ -748,14 +767,13 @@ SLJIT_S390X_RRFC(locgr, 0xb9e20000) #define SLJIT_S390X_RIEG(name, pattern) \ SLJIT_S390X_INSTRUCTION(name, sljit_gpr reg, sljit_sw imm, sljit_uw mask) \ { \ - sljit_ins r1, m3, i2; \ + sljit_ins m3, i2; \ \ SLJIT_ASSERT(have_lscond2()); \ - r1 = (sljit_ins)(reg & 0xf) << 36; \ m3 = (sljit_ins)(mask & 0xf) << 32; \ i2 = (sljit_ins)(imm & 0xffffL) << 16; \ \ - return (pattern) | r1 | m3 | i2; \ + return (pattern) | R36A(reg) | m3 | i2; \ } /* LOAD HALFWORD IMMEDIATE ON CONDITION */ @@ -767,13 +785,9 @@ SLJIT_S390X_RIEG(locghi, 0xec0000000046) #define SLJIT_S390X_RILB(name, pattern, cond) \ SLJIT_S390X_INSTRUCTION(name, sljit_gpr reg, sljit_sw ri) \ { \ - sljit_ins r1, ri2; \ -\ SLJIT_ASSERT(cond); \ - r1 = (sljit_ins)(reg & 0xf) << 36; \ - ri2 = (sljit_ins)(ri & 0xffffffff); \ \ - return (pattern) | r1 | ri2; \ + return (pattern) | R36A(reg) | (sljit_ins)(ri & 0xffffffff); \ } /* BRANCH RELATIVE AND SAVE LONG */ @@ -808,22 +822,20 @@ SLJIT_S390X_INSTRUCTION(brcl, sljit_uw mask, sljit_sw target) SLJIT_S390X_INSTRUCTION(flogr, sljit_gpr dst, sljit_gpr src) { - sljit_ins r1 = ((sljit_ins)dst & 0xf) << 8; - sljit_ins r2 = ((sljit_ins)src & 0xf); SLJIT_ASSERT(have_eimm()); - return 0xb9830000 | r1 | r2; + return 0xb9830000 | R8A(dst) | R0A(src); } /* INSERT PROGRAM MASK */ SLJIT_S390X_INSTRUCTION(ipm, sljit_gpr dst) { - return 0xb2220000 | ((sljit_ins)(dst & 0xf) << 4); + return 0xb2220000 | R4A(dst); } /* SET PROGRAM MASK */ SLJIT_S390X_INSTRUCTION(spm, sljit_gpr dst) { - return 0x0400 | ((sljit_ins)(dst & 0xf) << 4); + return 0x0400 | R4A(dst); } /* ROTATE THEN INSERT SELECTED BITS HIGH (ZERO) */ @@ -842,12 +854,12 @@ static sljit_s32 update_zero_overflow(struct sljit_compiler *compiler, sljit_s32 1 (non-zero and no overflow) : unchanged 2 (zero and overflow) : decreased by 1 3 (non-zero and overflow) : decreased by 1 if non-zero */ - FAIL_IF(push_inst(compiler, brc(0xc, 2 + 2 + ((op & SLJIT_I32_OP) ? 1 : 2) + 2 + 3 + 1))); - FAIL_IF(push_inst(compiler, ipm(flag_r))); - FAIL_IF(push_inst(compiler, (op & SLJIT_I32_OP) ? or(dst_r, dst_r) : ogr(dst_r, dst_r))); + FAIL_IF(push_inst(compiler, brc(0xc, 2 + 2 + ((op & SLJIT_32) ? 1 : 2) + 2 + 3 + 1))); + FAIL_IF(push_inst(compiler, ipm(tmp1))); + FAIL_IF(push_inst(compiler, (op & SLJIT_32) ? or(dst_r, dst_r) : ogr(dst_r, dst_r))); FAIL_IF(push_inst(compiler, brc(0x8, 2 + 3))); - FAIL_IF(push_inst(compiler, slfi(flag_r, 0x10000000))); - FAIL_IF(push_inst(compiler, spm(flag_r))); + FAIL_IF(push_inst(compiler, slfi(tmp1, 0x10000000))); + FAIL_IF(push_inst(compiler, spm(tmp1))); return SLJIT_SUCCESS; } @@ -858,16 +870,16 @@ static sljit_s32 push_load_imm_inst(struct sljit_compiler *compiler, sljit_gpr t if (is_s16(v)) return push_inst(compiler, lghi(target, (sljit_s16)v)); - if ((sljit_uw)v == (v & 0x000000000000ffffU)) + if (((sljit_uw)v & ~(sljit_uw)0x000000000000ffff) == 0) return push_inst(compiler, llill(target, (sljit_u16)v)); - if ((sljit_uw)v == (v & 0x00000000ffff0000U)) + if (((sljit_uw)v & ~(sljit_uw)0x00000000ffff0000) == 0) return push_inst(compiler, llilh(target, (sljit_u16)(v >> 16))); - if ((sljit_uw)v == (v & 0x0000ffff00000000U)) + if (((sljit_uw)v & ~(sljit_uw)0x0000ffff00000000) == 0) return push_inst(compiler, llihl(target, (sljit_u16)(v >> 32))); - if ((sljit_uw)v == (v & 0xffff000000000000U)) + if (((sljit_uw)v & ~(sljit_uw)0xffff000000000000) == 0) return push_inst(compiler, llihh(target, (sljit_u16)(v >> 48))); /* 6 byte instructions (requires extended immediate facility) */ @@ -875,15 +887,16 @@ static sljit_s32 push_load_imm_inst(struct sljit_compiler *compiler, sljit_gpr t if (is_s32(v)) return push_inst(compiler, lgfi(target, (sljit_s32)v)); - if ((sljit_uw)v == (v & 0x00000000ffffffffU)) + if (((sljit_uw)v >> 32) == 0) return push_inst(compiler, llilf(target, (sljit_u32)v)); - if ((sljit_uw)v == (v & 0xffffffff00000000U)) - return push_inst(compiler, llihf(target, (sljit_u32)(v >> 32))); + if (((sljit_uw)v << 32) == 0) + return push_inst(compiler, llihf(target, (sljit_u32)((sljit_uw)v >> 32))); FAIL_IF(push_inst(compiler, llilf(target, (sljit_u32)v))); return push_inst(compiler, iihf(target, (sljit_u32)(v >> 32))); } + /* TODO(mundaym): instruction sequences that don't use extended immediates */ abort(); } @@ -891,7 +904,7 @@ static sljit_s32 push_load_imm_inst(struct sljit_compiler *compiler, sljit_gpr t struct addr { sljit_gpr base; sljit_gpr index; - sljit_sw offset; + sljit_s32 offset; }; /* transform memory operand into D(X,B) form with a signed 20-bit offset */ @@ -911,7 +924,7 @@ static sljit_s32 make_addr_bxy(struct sljit_compiler *compiler, if (off != 0) { /* shift and put the result into tmp */ SLJIT_ASSERT(0 <= off && off < 64); - FAIL_IF(push_inst(compiler, sllg(tmp, index, off, 0))); + FAIL_IF(push_inst(compiler, sllg(tmp, index, (sljit_s32)off, 0))); index = tmp; off = 0; /* clear offset */ } @@ -923,7 +936,7 @@ static sljit_s32 make_addr_bxy(struct sljit_compiler *compiler, } addr->base = base; addr->index = index; - addr->offset = off; + addr->offset = (sljit_s32)off; return SLJIT_SUCCESS; } @@ -944,7 +957,7 @@ static sljit_s32 make_addr_bx(struct sljit_compiler *compiler, if (off != 0) { /* shift and put the result into tmp */ SLJIT_ASSERT(0 <= off && off < 64); - FAIL_IF(push_inst(compiler, sllg(tmp, index, off, 0))); + FAIL_IF(push_inst(compiler, sllg(tmp, index, (sljit_s32)off, 0))); index = tmp; off = 0; /* clear offset */ } @@ -956,7 +969,7 @@ static sljit_s32 make_addr_bx(struct sljit_compiler *compiler, } addr->base = base; addr->index = index; - addr->offset = off; + addr->offset = (sljit_s32)off; return SLJIT_SUCCESS; } @@ -1014,16 +1027,16 @@ static sljit_s32 emit_move(struct sljit_compiler *compiler, sljit_gpr dst_r, sljit_s32 src, sljit_sw srcw) { - SLJIT_ASSERT(!SLOW_IS_REG(src) || dst_r != gpr(src & REG_MASK)); + SLJIT_ASSERT(!IS_GPR_REG(src) || dst_r != gpr(src & REG_MASK)); if (src & SLJIT_IMM) return push_load_imm_inst(compiler, dst_r, srcw); if (src & SLJIT_MEM) - return load_word(compiler, dst_r, src, srcw, (compiler->mode & SLJIT_I32_OP) != 0); + return load_word(compiler, dst_r, src, srcw, (compiler->mode & SLJIT_32) != 0); sljit_gpr src_r = gpr(src & REG_MASK); - return push_inst(compiler, (compiler->mode & SLJIT_I32_OP) ? lr(dst_r, src_r) : lgr(dst_r, src_r)); + return push_inst(compiler, (compiler->mode & SLJIT_32) ? lr(dst_r, src_r) : lgr(dst_r, src_r)); } static sljit_s32 emit_rr(struct sljit_compiler *compiler, sljit_ins ins, @@ -1035,8 +1048,8 @@ static sljit_s32 emit_rr(struct sljit_compiler *compiler, sljit_ins ins, sljit_gpr src_r = tmp1; sljit_s32 needs_move = 1; - if (SLOW_IS_REG(dst)) { - dst_r = gpr(dst & REG_MASK); + if (FAST_IS_REG(dst)) { + dst_r = gpr(dst); if (dst == src1) needs_move = 0; @@ -1050,17 +1063,32 @@ static sljit_s32 emit_rr(struct sljit_compiler *compiler, sljit_ins ins, FAIL_IF(emit_move(compiler, dst_r, src1, src1w)); if (FAST_IS_REG(src2)) - src_r = gpr(src2 & REG_MASK); + src_r = gpr(src2); else FAIL_IF(emit_move(compiler, tmp1, src2, src2w)); - FAIL_IF(push_inst(compiler, ins | (dst_r << 4) | src_r)); + FAIL_IF(push_inst(compiler, ins | R4A(dst_r) | R0A(src_r))); if (needs_move != 2) return SLJIT_SUCCESS; dst_r = gpr(dst & REG_MASK); - return push_inst(compiler, (compiler->mode & SLJIT_I32_OP) ? lr(dst_r, tmp0) : lgr(dst_r, tmp0)); + return push_inst(compiler, (compiler->mode & SLJIT_32) ? lr(dst_r, tmp0) : lgr(dst_r, tmp0)); +} + +static sljit_s32 emit_rr1(struct sljit_compiler *compiler, sljit_ins ins, + sljit_s32 dst, + sljit_s32 src1, sljit_sw src1w) +{ + sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst) : tmp0; + sljit_gpr src_r = tmp1; + + if (FAST_IS_REG(src1)) + src_r = gpr(src1); + else + FAIL_IF(emit_move(compiler, tmp1, src1, src1w)); + + return push_inst(compiler, ins | R4A(dst_r) | R0A(src_r)); } static sljit_s32 emit_rrf(struct sljit_compiler *compiler, sljit_ins ins, @@ -1068,21 +1096,21 @@ static sljit_s32 emit_rrf(struct sljit_compiler *compiler, sljit_ins ins, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { - sljit_gpr dst_r = SLOW_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0; + sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0; sljit_gpr src1_r = tmp0; sljit_gpr src2_r = tmp1; if (FAST_IS_REG(src1)) - src1_r = gpr(src1 & REG_MASK); + src1_r = gpr(src1); else FAIL_IF(emit_move(compiler, tmp0, src1, src1w)); if (FAST_IS_REG(src2)) - src2_r = gpr(src2 & REG_MASK); + src2_r = gpr(src2); else FAIL_IF(emit_move(compiler, tmp1, src2, src2w)); - return push_inst(compiler, ins | (dst_r << 4) | src1_r | (src2_r << 12)); + return push_inst(compiler, ins | R4A(dst_r) | R0A(src1_r) | R12A(src2_r)); } typedef enum { @@ -1099,8 +1127,8 @@ static sljit_s32 emit_ri(struct sljit_compiler *compiler, sljit_ins ins, sljit_gpr dst_r = tmp0; sljit_s32 needs_move = 1; - if (SLOW_IS_REG(dst)) { - dst_r = gpr(dst & REG_MASK); + if (FAST_IS_REG(dst)) { + dst_r = gpr(dst); if (dst == src1) needs_move = 0; @@ -1110,8 +1138,8 @@ static sljit_s32 emit_ri(struct sljit_compiler *compiler, sljit_ins ins, FAIL_IF(emit_move(compiler, dst_r, src1, src1w)); if (type == RIL_A) - return push_inst(compiler, ins | (dst_r << 36) | (src2w & 0xffffffff)); - return push_inst(compiler, ins | (dst_r << 20) | (src2w & 0xffff)); + return push_inst(compiler, ins | R36A(dst_r) | (src2w & 0xffffffff)); + return push_inst(compiler, ins | R20A(dst_r) | (src2w & 0xffff)); } static sljit_s32 emit_rie_d(struct sljit_compiler *compiler, sljit_ins ins, @@ -1119,15 +1147,15 @@ static sljit_s32 emit_rie_d(struct sljit_compiler *compiler, sljit_ins ins, sljit_s32 src1, sljit_sw src1w, sljit_sw src2w) { - sljit_gpr dst_r = SLOW_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0; + sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst) : tmp0; sljit_gpr src_r = tmp0; - if (!SLOW_IS_REG(src1)) + if (!FAST_IS_REG(src1)) FAIL_IF(emit_move(compiler, tmp0, src1, src1w)); else src_r = gpr(src1 & REG_MASK); - return push_inst(compiler, ins | (dst_r << 36) | (src_r << 32) | (src2w & 0xffff) << 16); + return push_inst(compiler, ins | R36A(dst_r) | R32A(src_r) | (sljit_ins)(src2w & 0xffff) << 16); } typedef enum { @@ -1147,7 +1175,7 @@ static sljit_s32 emit_rx(struct sljit_compiler *compiler, sljit_ins ins, SLJIT_ASSERT(src2 & SLJIT_MEM); - if (SLOW_IS_REG(dst)) { + if (FAST_IS_REG(dst)) { dst_r = gpr(dst); if (dst == src1) @@ -1183,9 +1211,9 @@ static sljit_s32 emit_rx(struct sljit_compiler *compiler, sljit_ins ins, } if (type == RX_A) - ins |= (dst_r << 20) | (index << 16) | (base << 12) | src2w; + ins |= R20A(dst_r) | R16A(index) | R12A(base) | (sljit_ins)src2w; else - ins |= (dst_r << 36) | (index << 32) | (base << 28) | disp_s20(src2w); + ins |= R36A(dst_r) | R32A(index) | R28A(base) | disp_s20((sljit_s32)src2w); FAIL_IF(push_inst(compiler, ins)); @@ -1193,7 +1221,7 @@ static sljit_s32 emit_rx(struct sljit_compiler *compiler, sljit_ins ins, return SLJIT_SUCCESS; dst_r = gpr(dst); - return push_inst(compiler, (compiler->mode & SLJIT_I32_OP) ? lr(dst_r, tmp0) : lgr(dst_r, tmp0)); + return push_inst(compiler, (compiler->mode & SLJIT_32) ? lr(dst_r, tmp0) : lgr(dst_r, tmp0)); } static sljit_s32 emit_siy(struct sljit_compiler *compiler, sljit_ins ins, @@ -1226,7 +1254,7 @@ static sljit_s32 emit_siy(struct sljit_compiler *compiler, sljit_ins ins, else dst_r = gpr(dst & REG_MASK); - return push_inst(compiler, ins | ((srcw & 0xff) << 32) | (dst_r << 28) | disp_s20(dstw)); + return push_inst(compiler, ins | ((sljit_ins)(srcw & 0xff) << 32) | R28A(dst_r) | disp_s20((sljit_s32)dstw)); } struct ins_forms { @@ -1240,7 +1268,7 @@ struct ins_forms { }; static sljit_s32 emit_commutative(struct sljit_compiler *compiler, const struct ins_forms *forms, - sljit_s32 dst, sljit_sw dstw, + sljit_s32 dst, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { @@ -1250,7 +1278,7 @@ static sljit_s32 emit_commutative(struct sljit_compiler *compiler, const struct if ((src1 | src2) & SLJIT_MEM) { sljit_ins ins12, ins20; - if (mode & SLJIT_I32_OP) { + if (mode & SLJIT_32) { ins12 = forms->op; ins20 = forms->op_y; } @@ -1297,7 +1325,7 @@ static sljit_s32 emit_commutative(struct sljit_compiler *compiler, const struct } } - if (mode & SLJIT_I32_OP) { + if (mode & SLJIT_32) { ins = forms->op_r; ins_k = forms->op_rk; } @@ -1308,7 +1336,7 @@ static sljit_s32 emit_commutative(struct sljit_compiler *compiler, const struct SLJIT_ASSERT(ins != 0 || ins_k != 0); - if (ins && SLOW_IS_REG(dst)) { + if (ins && FAST_IS_REG(dst)) { if (dst == src1) return emit_rr(compiler, ins, dst, src1, src1w, src2, src2w); @@ -1323,7 +1351,7 @@ static sljit_s32 emit_commutative(struct sljit_compiler *compiler, const struct } static sljit_s32 emit_non_commutative(struct sljit_compiler *compiler, const struct ins_forms *forms, - sljit_s32 dst, sljit_sw dstw, + sljit_s32 dst, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { @@ -1333,7 +1361,7 @@ static sljit_s32 emit_non_commutative(struct sljit_compiler *compiler, const str if (src2 & SLJIT_MEM) { sljit_ins ins12, ins20; - if (mode & SLJIT_I32_OP) { + if (mode & SLJIT_32) { ins12 = forms->op; ins20 = forms->op_y; } @@ -1354,10 +1382,10 @@ static sljit_s32 emit_non_commutative(struct sljit_compiler *compiler, const str return emit_rx(compiler, ins20, dst, src1, src1w, src2, src2w, RXY_A); } - ins = (mode & SLJIT_I32_OP) ? forms->op_rk : forms->op_grk; + ins = (mode & SLJIT_32) ? forms->op_rk : forms->op_grk; - if (ins == 0 || (SLOW_IS_REG(dst) && dst == src1)) - return emit_rr(compiler, (mode & SLJIT_I32_OP) ? forms->op_r : forms->op_gr, dst, src1, src1w, src2, src2w); + if (ins == 0 || (FAST_IS_REG(dst) && dst == src1)) + return emit_rr(compiler, (mode & SLJIT_32) ? forms->op_r : forms->op_gr, dst, src1, src1w, src2, src2w); return emit_rrf(compiler, ins, dst, src1, src1w, src2, src2w); } @@ -1376,9 +1404,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil struct sljit_memory_fragment *buf; void *code, *code_ptr; sljit_uw *pool, *pool_ptr; - - sljit_uw source; - sljit_sw offset; /* TODO(carenas): only need 32 bit */ + sljit_sw source, offset; /* TODO(carenas): only need 32 bit */ CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_generate_code(compiler)); @@ -1489,38 +1515,41 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil ins &= ~sljit_ins_const; /* update instruction with relative address of constant */ - source = (sljit_uw)code_ptr; - offset = (sljit_uw)pool_ptr - source; + source = (sljit_sw)code_ptr; + offset = (sljit_sw)pool_ptr - source; + SLJIT_ASSERT(!(offset & 1)); offset >>= 1; /* halfword (not byte) offset */ SLJIT_ASSERT(is_s32(offset)); + ins |= (sljit_ins)offset & 0xffffffff; /* update address */ const_->const_.addr = (sljit_uw)pool_ptr; /* store initial value into pool and update pool address */ - *(pool_ptr++) = const_->init_value; + *(pool_ptr++) = (sljit_uw)const_->init_value; /* move to next constant */ const_ = (struct sljit_s390x_const *)const_->const_.next; } if (jump && jump->addr == j) { - sljit_sw target = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; + sljit_sw target = (sljit_sw)((jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target); if ((jump->flags & SLJIT_REWRITABLE_JUMP) || (jump->flags & JUMP_ADDR)) { jump->addr = (sljit_uw)pool_ptr; /* load address into tmp1 */ - source = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - offset = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(pool_ptr, executable_offset) - source; + source = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); + offset = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(pool_ptr, executable_offset) - source; + SLJIT_ASSERT(!(offset & 1)); offset >>= 1; SLJIT_ASSERT(is_s32(offset)); - encode_inst(&code_ptr, - lgrl(tmp1, offset & 0xffffffff)); + + encode_inst(&code_ptr, lgrl(tmp1, offset & 0xffffffff)); /* store jump target into pool and update pool address */ - *(pool_ptr++) = target; + *(pool_ptr++) = (sljit_uw)target; /* branch to tmp1 */ sljit_ins op = (ins >> 32) & 0xf; @@ -1538,7 +1567,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil } else { jump->addr = (sljit_uw)code_ptr + 2; - source = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); + source = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); offset = target - source; /* offset must be halfword aligned */ @@ -1552,14 +1581,14 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = jump->next; } if (put_label && put_label->addr == j) { - source = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); + source = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); SLJIT_ASSERT(put_label->label); put_label->addr = (sljit_uw)code_ptr; /* store target into pool */ *pool_ptr = put_label->label->addr; - offset = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(pool_ptr, executable_offset) - source; + offset = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(pool_ptr, executable_offset) - source; pool_ptr++; SLJIT_ASSERT(!(offset & 1)); @@ -1594,7 +1623,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) case SLJIT_HAS_CMOV: return have_lscond1() ? 1 : 0; case SLJIT_HAS_FPU: - return 0; + return 1; } return 0; } @@ -1607,36 +1636,67 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { - sljit_s32 args = get_arg_count(arg_types); - sljit_sw frame_size; + sljit_s32 word_arg_count = 0; + sljit_s32 offset, i, tmp; CHECK_ERROR(); CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - /* saved registers go in callee allocated save area */ - compiler->local_size = (local_size + 0xf) & ~0xf; - frame_size = compiler->local_size + SLJIT_S390X_DEFAULT_STACK_FRAME_SIZE; + /* Saved registers are stored in callee allocated save area. */ + SLJIT_ASSERT(gpr(SLJIT_FIRST_SAVED_REG) == r6 && gpr(SLJIT_S0) == r13); - FAIL_IF(push_inst(compiler, stmg(r6, r15, r6 * sizeof(sljit_sw), r15))); /* save registers TODO(MGM): optimize */ - if (frame_size != 0) { - if (is_s16(-frame_size)) - FAIL_IF(push_inst(compiler, aghi(r15, -((sljit_s16)frame_size)))); - else if (is_s32(-frame_size)) - FAIL_IF(push_inst(compiler, agfi(r15, -((sljit_s32)frame_size)))); - else { - FAIL_IF(push_load_imm_inst(compiler, tmp1, -frame_size)); - FAIL_IF(push_inst(compiler, la(r15, 0, tmp1, r15))); + offset = 2 * SSIZE_OF(sw); + if (saveds + scratches >= SLJIT_NUMBER_OF_REGISTERS) { + FAIL_IF(push_inst(compiler, stmg(r6, r14, offset, r15))); /* save registers TODO(MGM): optimize */ + offset += 9 * SSIZE_OF(sw); + } else { + if (scratches == SLJIT_FIRST_SAVED_REG) { + FAIL_IF(push_inst(compiler, stg(r6, offset, 0, r15))); + offset += SSIZE_OF(sw); + } else if (scratches > SLJIT_FIRST_SAVED_REG) { + FAIL_IF(push_inst(compiler, stmg(r6, r6 + (sljit_gpr)(scratches - SLJIT_FIRST_SAVED_REG), offset, r15))); + offset += (scratches - (SLJIT_FIRST_SAVED_REG - 1)) * SSIZE_OF(sw); } + + if (saveds == 0) { + FAIL_IF(push_inst(compiler, stg(r14, offset, 0, r15))); + offset += SSIZE_OF(sw); + } else { + FAIL_IF(push_inst(compiler, stmg(r14 - (sljit_gpr)saveds, r14, offset, r15))); + offset += (saveds + 1) * SSIZE_OF(sw); + } + } + + tmp = SLJIT_FS0 - fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + FAIL_IF(push_inst(compiler, 0x60000000 /* std */ | F20(i) | R12A(r15) | (sljit_ins)offset)); + offset += SSIZE_OF(sw); + } + + for (i = fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + FAIL_IF(push_inst(compiler, 0x60000000 /* std */ | F20(i) | R12A(r15) | (sljit_ins)offset)); + offset += SSIZE_OF(sw); } - if (args >= 1) - FAIL_IF(push_inst(compiler, lgr(gpr(SLJIT_S0), gpr(SLJIT_R0)))); - if (args >= 2) - FAIL_IF(push_inst(compiler, lgr(gpr(SLJIT_S1), gpr(SLJIT_R1)))); - if (args >= 3) - FAIL_IF(push_inst(compiler, lgr(gpr(SLJIT_S2), gpr(SLJIT_R2)))); - SLJIT_ASSERT(args < 4); + local_size = (local_size + SLJIT_S390X_DEFAULT_STACK_FRAME_SIZE + 0xf) & ~0xf; + compiler->local_size = local_size; + + FAIL_IF(push_inst(compiler, 0xe30000000071 /* lay */ | R36A(r15) | R28A(r15) | disp_s20(-local_size))); + + arg_types >>= SLJIT_ARG_SHIFT; + tmp = 0; + while (arg_types > 0) { + if ((arg_types & SLJIT_ARG_MASK) < SLJIT_ARG_TYPE_F64) { + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + FAIL_IF(push_inst(compiler, lgr(gpr(SLJIT_S0 - tmp), gpr(SLJIT_R0 + word_arg_count)))); + tmp++; + } + word_arg_count++; + } + + arg_types >>= SLJIT_ARG_SHIFT; + } return SLJIT_SUCCESS; } @@ -1649,37 +1709,67 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - /* TODO(mundaym): stack space for saved floating point registers */ - compiler->local_size = (local_size + 0xf) & ~0xf; + compiler->local_size = (local_size + SLJIT_S390X_DEFAULT_STACK_FRAME_SIZE + 0xf) & ~0xf; return SLJIT_SUCCESS; } -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler) { - sljit_sw size; - sljit_gpr end; + sljit_s32 offset, i, tmp; + sljit_s32 local_size = compiler->local_size; + sljit_s32 saveds = compiler->saveds; + sljit_s32 scratches = compiler->scratches; - CHECK_ERROR(); - CHECK(check_sljit_emit_return(compiler, op, src, srcw)); + if (is_u12(local_size)) + FAIL_IF(push_inst(compiler, 0x41000000 /* ly */ | R20A(r15) | R12A(r15) | (sljit_ins)local_size)); + else + FAIL_IF(push_inst(compiler, 0xe30000000071 /* lay */ | R36A(r15) | R28A(r15) | disp_s20(local_size))); - FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); + offset = 2 * SSIZE_OF(sw); + if (saveds + scratches >= SLJIT_NUMBER_OF_REGISTERS) { + FAIL_IF(push_inst(compiler, lmg(r6, r14, offset, r15))); /* save registers TODO(MGM): optimize */ + offset += 9 * SSIZE_OF(sw); + } else { + if (scratches == SLJIT_FIRST_SAVED_REG) { + FAIL_IF(push_inst(compiler, lg(r6, offset, 0, r15))); + offset += SSIZE_OF(sw); + } else if (scratches > SLJIT_FIRST_SAVED_REG) { + FAIL_IF(push_inst(compiler, lmg(r6, r6 + (sljit_gpr)(scratches - SLJIT_FIRST_SAVED_REG), offset, r15))); + offset += (scratches - (SLJIT_FIRST_SAVED_REG - 1)) * SSIZE_OF(sw); + } - size = compiler->local_size + SLJIT_S390X_DEFAULT_STACK_FRAME_SIZE + (r6 * sizeof(sljit_sw)); - if (!is_s20(size)) { - FAIL_IF(push_load_imm_inst(compiler, tmp1, compiler->local_size + SLJIT_S390X_DEFAULT_STACK_FRAME_SIZE)); - FAIL_IF(push_inst(compiler, la(r15, 0, tmp1, r15))); - size = r6 * sizeof(sljit_sw); - end = r14; /* r15 has been restored already */ + if (saveds == 0) { + FAIL_IF(push_inst(compiler, lg(r14, offset, 0, r15))); + offset += SSIZE_OF(sw); + } else { + FAIL_IF(push_inst(compiler, lmg(r14 - (sljit_gpr)saveds, r14, offset, r15))); + offset += (saveds + 1) * SSIZE_OF(sw); + } } - else - end = r15; - FAIL_IF(push_inst(compiler, lmg(r6, end, size, r15))); /* restore registers TODO(MGM): optimize */ - FAIL_IF(push_inst(compiler, br(r14))); /* return */ + tmp = SLJIT_FS0 - compiler->fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + FAIL_IF(push_inst(compiler, 0x68000000 /* ld */ | F20(i) | R12A(r15) | (sljit_ins)offset)); + offset += SSIZE_OF(sw); + } + + for (i = compiler->fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + FAIL_IF(push_inst(compiler, 0x68000000 /* ld */ | F20(i) | R12A(r15) | (sljit_ins)offset)); + offset += SSIZE_OF(sw); + } return SLJIT_SUCCESS; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); + + FAIL_IF(emit_stack_frame_release(compiler)); + return push_inst(compiler, br(r14)); /* return */ +} + /* --------------------------------------------------------------------- */ /* Operators */ /* --------------------------------------------------------------------- */ @@ -1692,7 +1782,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile CHECK_ERROR(); CHECK(check_sljit_emit_op0(compiler, op)); - op = GET_OPCODE(op) | (op & SLJIT_I32_OP); + op = GET_OPCODE(op) | (op & SLJIT_32); switch (op) { case SLJIT_BREAKPOINT: /* The following invalid instruction is emitted by gdb. */ @@ -1786,17 +1876,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src, srcw); - if ((dst == SLJIT_UNUSED) && !HAS_FLAGS(op)) { - /* TODO(carenas): implement prefetch? */ - return SLJIT_SUCCESS; - } - if (opcode >= SLJIT_MOV && opcode <= SLJIT_MOV_P) { /* LOAD REGISTER */ if (FAST_IS_REG(dst) && FAST_IS_REG(src)) { dst_r = gpr(dst); src_r = gpr(src); - switch (opcode | (op & SLJIT_I32_OP)) { + switch (opcode | (op & SLJIT_32)) { /* 32-bit */ case SLJIT_MOV32_U8: ins = llcr(dst_r, src_r); @@ -1811,6 +1896,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile ins = lhr(dst_r, src_r); break; case SLJIT_MOV32: + if (dst_r == src_r) + return SLJIT_SUCCESS; ins = lr(dst_r, src_r); break; /* 64-bit */ @@ -1834,11 +1921,14 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile break; case SLJIT_MOV: case SLJIT_MOV_P: + if (dst_r == src_r) + return SLJIT_SUCCESS; ins = lgr(dst_r, src_r); break; default: ins = 0; SLJIT_UNREACHABLE(); + break; } FAIL_IF(push_inst(compiler, ins)); return SLJIT_SUCCESS; @@ -1862,6 +1952,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile srcw = (sljit_sw)((sljit_u32)(srcw)); break; case SLJIT_MOV_S32: + case SLJIT_MOV32: srcw = (sljit_sw)((sljit_s32)(srcw)); break; } @@ -1875,7 +1966,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile FAIL_IF(make_addr_bxy(compiler, &mem, src, srcw, tmp1)); /* TODO(carenas): convert all calls below to LEVAL */ - switch (opcode | (op & SLJIT_I32_OP)) { + switch (opcode | (op & SLJIT_32)) { case SLJIT_MOV32_U8: ins = llc(reg, mem.offset, mem.index, mem.base); break; @@ -1914,7 +2005,9 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile ins = lg(reg, mem.offset, mem.index, mem.base); break; default: + ins = 0; SLJIT_UNREACHABLE(); + break; } FAIL_IF(push_inst(compiler, ins)); return SLJIT_SUCCESS; @@ -1940,6 +2033,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile WHEN2(is_u12(mem.offset), sth, sthy)); case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: return push_inst(compiler, WHEN2(is_u12(mem.offset), st, sty)); case SLJIT_MOV_P: @@ -1972,6 +2066,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile EVAL(sthy, tmp0, mem)); case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: FAIL_IF(push_inst(compiler, EVAL(ly, tmp0, mem))); FAIL_IF(make_addr_bxy(compiler, &mem, dst, dstw, tmp1)); @@ -1994,15 +2089,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile SLJIT_ASSERT((src & SLJIT_IMM) == 0); /* no immediates */ - dst_r = SLOW_IS_REG(dst) ? gpr(REG_MASK & dst) : tmp0; + dst_r = FAST_IS_REG(dst) ? gpr(REG_MASK & dst) : tmp0; src_r = FAST_IS_REG(src) ? gpr(REG_MASK & src) : tmp0; if (src & SLJIT_MEM) - FAIL_IF(load_word(compiler, src_r, src, srcw, src & SLJIT_I32_OP)); + FAIL_IF(load_word(compiler, src_r, src, srcw, src & SLJIT_32)); compiler->status_flags_state = op & (VARIABLE_FLAG_MASK | SLJIT_SET_Z); /* TODO(mundaym): optimize loads and stores */ - switch (opcode | (op & SLJIT_I32_OP)) { + switch (opcode | (op & SLJIT_32)) { case SLJIT_NOT: /* emulate ~x with x^-1 */ FAIL_IF(push_load_imm_inst(compiler, tmp1, -1)); @@ -2014,7 +2109,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile case SLJIT_NOT32: /* emulate ~x with x^-1 */ if (have_eimm()) - FAIL_IF(push_inst(compiler, xilf(dst_r, -1))); + FAIL_IF(push_inst(compiler, xilf(dst_r, 0xffffffff))); else { FAIL_IF(push_load_imm_inst(compiler, tmp1, -1)); if (src_r != dst_r) @@ -2023,14 +2118,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile FAIL_IF(push_inst(compiler, xr(dst_r, tmp1))); } break; - case SLJIT_NEG: - compiler->status_flags_state |= SLJIT_CURRENT_FLAGS_ADD_SUB; - FAIL_IF(push_inst(compiler, lcgr(dst_r, src_r))); - break; - case SLJIT_NEG32: - compiler->status_flags_state |= SLJIT_CURRENT_FLAGS_ADD_SUB; - FAIL_IF(push_inst(compiler, lcr(dst_r, src_r))); - break; case SLJIT_CLZ: if (have_eimm()) { FAIL_IF(push_inst(compiler, flogr(tmp0, src_r))); /* clobbers tmp1 */ @@ -2059,8 +2146,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile FAIL_IF(update_zero_overflow(compiler, op, dst_r)); /* TODO(carenas): doesn't need FAIL_IF */ - if ((dst != SLJIT_UNUSED) && (dst & SLJIT_MEM)) - FAIL_IF(store_word(compiler, dst_r, dst, dstw, op & SLJIT_I32_OP)); + if (dst & SLJIT_MEM) + FAIL_IF(store_word(compiler, dst_r, dst, dstw, op & SLJIT_32)); return SLJIT_SUCCESS; } @@ -2084,20 +2171,6 @@ static SLJIT_INLINE int is_shift(sljit_s32 op) { return (v == SLJIT_SHL || v == SLJIT_ASHR || v == SLJIT_LSHR) ? 1 : 0; } -static SLJIT_INLINE int sets_signed_flag(sljit_s32 op) -{ - switch (GET_FLAG_TYPE(op)) { - case SLJIT_OVERFLOW: - case SLJIT_NOT_OVERFLOW: - case SLJIT_SIG_LESS: - case SLJIT_SIG_LESS_EQUAL: - case SLJIT_SIG_GREATER: - case SLJIT_SIG_GREATER_EQUAL: - return 1; - } - return 0; -} - static const struct ins_forms add_forms = { 0x1a00, /* ar */ 0xb9080000, /* agr */ @@ -2131,24 +2204,24 @@ static sljit_s32 sljit_emit_add(struct sljit_compiler *compiler, sljit_s32 op, if (src2 & SLJIT_IMM) { if (!sets_zero_overflow && is_s8(src2w) && (src1 & SLJIT_MEM) && (dst == src1 && dstw == src1w)) { if (sets_overflow) - ins = (op & SLJIT_I32_OP) ? 0xeb000000006a /* asi */ : 0xeb000000007a /* agsi */; + ins = (op & SLJIT_32) ? 0xeb000000006a /* asi */ : 0xeb000000007a /* agsi */; else - ins = (op & SLJIT_I32_OP) ? 0xeb000000006e /* alsi */ : 0xeb000000007e /* algsi */; + ins = (op & SLJIT_32) ? 0xeb000000006e /* alsi */ : 0xeb000000007e /* algsi */; return emit_siy(compiler, ins, dst, dstw, src2w); } if (is_s16(src2w)) { if (sets_overflow) - ins = (op & SLJIT_I32_OP) ? 0xec00000000d8 /* ahik */ : 0xec00000000d9 /* aghik */; + ins = (op & SLJIT_32) ? 0xec00000000d8 /* ahik */ : 0xec00000000d9 /* aghik */; else - ins = (op & SLJIT_I32_OP) ? 0xec00000000da /* alhsik */ : 0xec00000000db /* alghsik */; + ins = (op & SLJIT_32) ? 0xec00000000da /* alhsik */ : 0xec00000000db /* alghsik */; FAIL_IF(emit_rie_d(compiler, ins, dst, src1, src1w, src2w)); goto done; } if (!sets_overflow) { - if ((op & SLJIT_I32_OP) || is_u32(src2w)) { - ins = (op & SLJIT_I32_OP) ? 0xc20b00000000 /* alfi */ : 0xc20a00000000 /* algfi */; + if ((op & SLJIT_32) || is_u32(src2w)) { + ins = (op & SLJIT_32) ? 0xc20b00000000 /* alfi */ : 0xc20a00000000 /* algfi */; FAIL_IF(emit_ri(compiler, ins, dst, src1, src1w, src2w, RIL_A)); goto done; } @@ -2157,22 +2230,22 @@ static sljit_s32 sljit_emit_add(struct sljit_compiler *compiler, sljit_s32 op, goto done; } } - else if ((op & SLJIT_I32_OP) || is_s32(src2w)) { - ins = (op & SLJIT_I32_OP) ? 0xc20900000000 /* afi */ : 0xc20800000000 /* agfi */; + else if ((op & SLJIT_32) || is_s32(src2w)) { + ins = (op & SLJIT_32) ? 0xc20900000000 /* afi */ : 0xc20800000000 /* agfi */; FAIL_IF(emit_ri(compiler, ins, dst, src1, src1w, src2w, RIL_A)); goto done; } } forms = sets_overflow ? &add_forms : &logical_add_forms; - FAIL_IF(emit_commutative(compiler, forms, dst, dstw, src1, src1w, src2, src2w)); + FAIL_IF(emit_commutative(compiler, forms, dst, src1, src1w, src2, src2w)); done: if (sets_zero_overflow) - FAIL_IF(update_zero_overflow(compiler, op, SLOW_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0)); + FAIL_IF(update_zero_overflow(compiler, op, FAST_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0)); if (dst & SLJIT_MEM) - return store_word(compiler, tmp0, dst, dstw, op & SLJIT_I32_OP); + return store_word(compiler, tmp0, dst, dstw, op & SLJIT_32); return SLJIT_SUCCESS; } @@ -2202,78 +2275,85 @@ static sljit_s32 sljit_emit_sub(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { - int sets_signed = sets_signed_flag(op); + sljit_s32 flag_type = GET_FLAG_TYPE(op); + int sets_signed = (flag_type >= SLJIT_SIG_LESS && flag_type <= SLJIT_NOT_OVERFLOW); int sets_zero_overflow = (op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_SET_Z | SLJIT_SET_OVERFLOW); const struct ins_forms *forms; sljit_ins ins; - if (dst == SLJIT_UNUSED && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) { - int compare_signed = GET_FLAG_TYPE(op) >= SLJIT_SIG_LESS; + if (dst == (sljit_s32)tmp0 && flag_type <= SLJIT_SIG_LESS_EQUAL) { + int compare_signed = flag_type >= SLJIT_SIG_LESS; compiler->status_flags_state |= SLJIT_CURRENT_FLAGS_COMPARE; if (src2 & SLJIT_IMM) { if (compare_signed || ((op & VARIABLE_FLAG_MASK) == 0 && is_s32(src2w))) { - if ((op & SLJIT_I32_OP) || is_s32(src2w)) { - ins = (op & SLJIT_I32_OP) ? 0xc20d00000000 /* cfi */ : 0xc20c00000000 /* cgfi */; + if ((op & SLJIT_32) || is_s32(src2w)) { + ins = (op & SLJIT_32) ? 0xc20d00000000 /* cfi */ : 0xc20c00000000 /* cgfi */; return emit_ri(compiler, ins, src1, src1, src1w, src2w, RIL_A); } } else { - if ((op & SLJIT_I32_OP) || is_u32(src2w)) { - ins = (op & SLJIT_I32_OP) ? 0xc20f00000000 /* clfi */ : 0xc20e00000000 /* clgfi */; + if ((op & SLJIT_32) || is_u32(src2w)) { + ins = (op & SLJIT_32) ? 0xc20f00000000 /* clfi */ : 0xc20e00000000 /* clgfi */; return emit_ri(compiler, ins, src1, src1, src1w, src2w, RIL_A); } if (is_s16(src2w)) - return emit_rie_d(compiler, 0xec00000000db /* alghsik */, SLJIT_UNUSED, src1, src1w, src2w); + return emit_rie_d(compiler, 0xec00000000db /* alghsik */, (sljit_s32)tmp0, src1, src1w, src2w); } } else if (src2 & SLJIT_MEM) { - if ((op & SLJIT_I32_OP) && ((src2 & OFFS_REG_MASK) || is_u12(src2w))) { + if ((op & SLJIT_32) && ((src2 & OFFS_REG_MASK) || is_u12(src2w))) { ins = compare_signed ? 0x59000000 /* c */ : 0x55000000 /* cl */; return emit_rx(compiler, ins, src1, src1, src1w, src2, src2w, RX_A); } if (compare_signed) - ins = (op & SLJIT_I32_OP) ? 0xe30000000059 /* cy */ : 0xe30000000020 /* cg */; + ins = (op & SLJIT_32) ? 0xe30000000059 /* cy */ : 0xe30000000020 /* cg */; else - ins = (op & SLJIT_I32_OP) ? 0xe30000000055 /* cly */ : 0xe30000000021 /* clg */; + ins = (op & SLJIT_32) ? 0xe30000000055 /* cly */ : 0xe30000000021 /* clg */; return emit_rx(compiler, ins, src1, src1, src1w, src2, src2w, RXY_A); } if (compare_signed) - ins = (op & SLJIT_I32_OP) ? 0x1900 /* cr */ : 0xb9200000 /* cgr */; + ins = (op & SLJIT_32) ? 0x1900 /* cr */ : 0xb9200000 /* cgr */; else - ins = (op & SLJIT_I32_OP) ? 0x1500 /* clr */ : 0xb9210000 /* clgr */; + ins = (op & SLJIT_32) ? 0x1500 /* clr */ : 0xb9210000 /* clgr */; return emit_rr(compiler, ins, src1, src1, src1w, src2, src2w); } + if (src1 == SLJIT_IMM && src1w == 0 && (flag_type == 0 || sets_signed)) { + ins = (op & SLJIT_32) ? 0x1300 /* lcr */ : 0xb9030000 /* lcgr */; + FAIL_IF(emit_rr1(compiler, ins, dst, src2, src2w)); + goto done; + } + if (src2 & SLJIT_IMM) { sljit_sw neg_src2w = -src2w; if (sets_signed || neg_src2w != 0 || (op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == 0) { if (!sets_zero_overflow && is_s8(neg_src2w) && (src1 & SLJIT_MEM) && (dst == src1 && dstw == src1w)) { if (sets_signed) - ins = (op & SLJIT_I32_OP) ? 0xeb000000006a /* asi */ : 0xeb000000007a /* agsi */; + ins = (op & SLJIT_32) ? 0xeb000000006a /* asi */ : 0xeb000000007a /* agsi */; else - ins = (op & SLJIT_I32_OP) ? 0xeb000000006e /* alsi */ : 0xeb000000007e /* algsi */; + ins = (op & SLJIT_32) ? 0xeb000000006e /* alsi */ : 0xeb000000007e /* algsi */; return emit_siy(compiler, ins, dst, dstw, neg_src2w); } if (is_s16(neg_src2w)) { if (sets_signed) - ins = (op & SLJIT_I32_OP) ? 0xec00000000d8 /* ahik */ : 0xec00000000d9 /* aghik */; + ins = (op & SLJIT_32) ? 0xec00000000d8 /* ahik */ : 0xec00000000d9 /* aghik */; else - ins = (op & SLJIT_I32_OP) ? 0xec00000000da /* alhsik */ : 0xec00000000db /* alghsik */; + ins = (op & SLJIT_32) ? 0xec00000000da /* alhsik */ : 0xec00000000db /* alghsik */; FAIL_IF(emit_rie_d(compiler, ins, dst, src1, src1w, neg_src2w)); goto done; } } if (!sets_signed) { - if ((op & SLJIT_I32_OP) || is_u32(src2w)) { - ins = (op & SLJIT_I32_OP) ? 0xc20500000000 /* slfi */ : 0xc20400000000 /* slgfi */; + if ((op & SLJIT_32) || is_u32(src2w)) { + ins = (op & SLJIT_32) ? 0xc20500000000 /* slfi */ : 0xc20400000000 /* slgfi */; FAIL_IF(emit_ri(compiler, ins, dst, src1, src1w, src2w, RIL_A)); goto done; } @@ -2282,19 +2362,19 @@ static sljit_s32 sljit_emit_sub(struct sljit_compiler *compiler, sljit_s32 op, goto done; } } - else if ((op & SLJIT_I32_OP) || is_s32(neg_src2w)) { - ins = (op & SLJIT_I32_OP) ? 0xc20900000000 /* afi */ : 0xc20800000000 /* agfi */; + else if ((op & SLJIT_32) || is_s32(neg_src2w)) { + ins = (op & SLJIT_32) ? 0xc20900000000 /* afi */ : 0xc20800000000 /* agfi */; FAIL_IF(emit_ri(compiler, ins, dst, src1, src1w, neg_src2w, RIL_A)); goto done; } } forms = sets_signed ? &sub_forms : &logical_sub_forms; - FAIL_IF(emit_non_commutative(compiler, forms, dst, dstw, src1, src1w, src2, src2w)); + FAIL_IF(emit_non_commutative(compiler, forms, dst, src1, src1w, src2, src2w)); done: if (sets_signed) { - sljit_gpr dst_r = SLOW_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0; + sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0; if ((op & VARIABLE_FLAG_MASK) != SLJIT_SET_OVERFLOW) { /* In case of overflow, the sign bit of the two source operands must be different, and @@ -2303,14 +2383,14 @@ done: The -result operation sets the corrent sign, because the result cannot be zero. The overflow is considered greater, since the result must be equal to INT_MIN so its sign bit is set. */ FAIL_IF(push_inst(compiler, brc(0xe, 2 + 2))); - FAIL_IF(push_inst(compiler, (op & SLJIT_I32_OP) ? lcr(tmp1, dst_r) : lcgr(tmp1, dst_r))); + FAIL_IF(push_inst(compiler, (op & SLJIT_32) ? lcr(tmp1, dst_r) : lcgr(tmp1, dst_r))); } else if (op & SLJIT_SET_Z) FAIL_IF(update_zero_overflow(compiler, op, dst_r)); } if (dst & SLJIT_MEM) - return store_word(compiler, tmp0, dst, dstw, op & SLJIT_I32_OP); + return store_word(compiler, tmp0, dst, dstw, op & SLJIT_32); return SLJIT_SUCCESS; } @@ -2336,7 +2416,7 @@ static const struct ins_forms multiply_overflow_forms = { }; static sljit_s32 sljit_emit_multiply(struct sljit_compiler *compiler, sljit_s32 op, - sljit_s32 dst, sljit_sw dstw, + sljit_s32 dst, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { @@ -2351,29 +2431,29 @@ static sljit_s32 sljit_emit_multiply(struct sljit_compiler *compiler, sljit_s32 } FAIL_IF(push_inst(compiler, aih(tmp0, 1))); FAIL_IF(push_inst(compiler, nihf(tmp0, ~1U))); - FAIL_IF(push_inst(compiler, ipm(flag_r))); - FAIL_IF(push_inst(compiler, oilh(flag_r, 0x2000))); */ + FAIL_IF(push_inst(compiler, ipm(tmp1))); + FAIL_IF(push_inst(compiler, oilh(tmp1, 0x2000))); */ - return emit_commutative(compiler, &multiply_overflow_forms, dst, dstw, src1, src1w, src2, src2w); + return emit_commutative(compiler, &multiply_overflow_forms, dst, src1, src1w, src2, src2w); } if (src2 & SLJIT_IMM) { if (is_s16(src2w)) { - ins = (op & SLJIT_I32_OP) ? 0xa70c0000 /* mhi */ : 0xa70d0000 /* mghi */; + ins = (op & SLJIT_32) ? 0xa70c0000 /* mhi */ : 0xa70d0000 /* mghi */; return emit_ri(compiler, ins, dst, src1, src1w, src2w, RI_A); } if (is_s32(src2w)) { - ins = (op & SLJIT_I32_OP) ? 0xc20100000000 /* msfi */ : 0xc20000000000 /* msgfi */; + ins = (op & SLJIT_32) ? 0xc20100000000 /* msfi */ : 0xc20000000000 /* msgfi */; return emit_ri(compiler, ins, dst, src1, src1w, src2w, RIL_A); } } - return emit_commutative(compiler, &multiply_forms, dst, dstw, src1, src1w, src2, src2w); + return emit_commutative(compiler, &multiply_forms, dst, src1, src1w, src2, src2w); } static sljit_s32 sljit_emit_bitwise_imm(struct sljit_compiler *compiler, sljit_s32 type, - sljit_s32 dst, sljit_sw dstw, + sljit_s32 dst, sljit_s32 src1, sljit_sw src1w, sljit_uw imm, sljit_s32 count16) { @@ -2381,7 +2461,7 @@ static sljit_s32 sljit_emit_bitwise_imm(struct sljit_compiler *compiler, sljit_s sljit_gpr dst_r = tmp0; sljit_s32 needs_move = 1; - if (SLOW_IS_REG(dst)) { + if (IS_GPR_REG(dst)) { dst_r = gpr(dst & REG_MASK); if (dst == src1) needs_move = 0; @@ -2391,38 +2471,38 @@ static sljit_s32 sljit_emit_bitwise_imm(struct sljit_compiler *compiler, sljit_s FAIL_IF(emit_move(compiler, dst_r, src1, src1w)); if (type == SLJIT_AND) { - if (!(mode & SLJIT_I32_OP)) - FAIL_IF(push_inst(compiler, 0xc00a00000000 /* nihf */ | (dst_r << 36) | (imm >> 32))); - return push_inst(compiler, 0xc00b00000000 /* nilf */ | (dst_r << 36) | (imm & 0xffffffff)); + if (!(mode & SLJIT_32)) + FAIL_IF(push_inst(compiler, 0xc00a00000000 /* nihf */ | R36A(dst_r) | (imm >> 32))); + return push_inst(compiler, 0xc00b00000000 /* nilf */ | R36A(dst_r) | (imm & 0xffffffff)); } else if (type == SLJIT_OR) { if (count16 >= 3) { - FAIL_IF(push_inst(compiler, 0xc00c00000000 /* oihf */ | (dst_r << 36) | (imm >> 32))); - return push_inst(compiler, 0xc00d00000000 /* oilf */ | (dst_r << 36) | (imm & 0xffffffff)); + FAIL_IF(push_inst(compiler, 0xc00c00000000 /* oihf */ | R36A(dst_r) | (imm >> 32))); + return push_inst(compiler, 0xc00d00000000 /* oilf */ | R36A(dst_r) | (imm & 0xffffffff)); } if (count16 >= 2) { if ((imm & 0x00000000ffffffffull) == 0) - return push_inst(compiler, 0xc00c00000000 /* oihf */ | (dst_r << 36) | (imm >> 32)); + return push_inst(compiler, 0xc00c00000000 /* oihf */ | R36A(dst_r) | (imm >> 32)); if ((imm & 0xffffffff00000000ull) == 0) - return push_inst(compiler, 0xc00d00000000 /* oilf */ | (dst_r << 36) | (imm & 0xffffffff)); + return push_inst(compiler, 0xc00d00000000 /* oilf */ | R36A(dst_r) | (imm & 0xffffffff)); } if ((imm & 0xffff000000000000ull) != 0) - FAIL_IF(push_inst(compiler, 0xa5080000 /* oihh */ | (dst_r << 20) | (imm >> 48))); + FAIL_IF(push_inst(compiler, 0xa5080000 /* oihh */ | R20A(dst_r) | (imm >> 48))); if ((imm & 0x0000ffff00000000ull) != 0) - FAIL_IF(push_inst(compiler, 0xa5090000 /* oihl */ | (dst_r << 20) | ((imm >> 32) & 0xffff))); + FAIL_IF(push_inst(compiler, 0xa5090000 /* oihl */ | R20A(dst_r) | ((imm >> 32) & 0xffff))); if ((imm & 0x00000000ffff0000ull) != 0) - FAIL_IF(push_inst(compiler, 0xa50a0000 /* oilh */ | (dst_r << 20) | ((imm >> 16) & 0xffff))); + FAIL_IF(push_inst(compiler, 0xa50a0000 /* oilh */ | R20A(dst_r) | ((imm >> 16) & 0xffff))); if ((imm & 0x000000000000ffffull) != 0 || imm == 0) - return push_inst(compiler, 0xa50b0000 /* oill */ | (dst_r << 20) | (imm & 0xffff)); + return push_inst(compiler, 0xa50b0000 /* oill */ | R20A(dst_r) | (imm & 0xffff)); return SLJIT_SUCCESS; } if ((imm & 0xffffffff00000000ull) != 0) - FAIL_IF(push_inst(compiler, 0xc00600000000 /* xihf */ | (dst_r << 36) | (imm >> 32))); + FAIL_IF(push_inst(compiler, 0xc00600000000 /* xihf */ | R36A(dst_r) | (imm >> 32))); if ((imm & 0x00000000ffffffffull) != 0 || imm == 0) - return push_inst(compiler, 0xc00700000000 /* xilf */ | (dst_r << 36) | (imm & 0xffffffff)); + return push_inst(compiler, 0xc00700000000 /* xilf */ | R36A(dst_r) | (imm & 0xffffffff)); return SLJIT_SUCCESS; } @@ -2457,18 +2537,18 @@ static const struct ins_forms bitwise_xor_forms = { }; static sljit_s32 sljit_emit_bitwise(struct sljit_compiler *compiler, sljit_s32 op, - sljit_s32 dst, sljit_sw dstw, + sljit_s32 dst, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { sljit_s32 type = GET_OPCODE(op); const struct ins_forms *forms; - if ((src2 & SLJIT_IMM) && (!(op & SLJIT_SET_Z) || (type == SLJIT_AND && dst == SLJIT_UNUSED))) { + if ((src2 & SLJIT_IMM) && (!(op & SLJIT_SET_Z) || (type == SLJIT_AND && dst == (sljit_s32)tmp0))) { sljit_s32 count16 = 0; sljit_uw imm = (sljit_uw)src2w; - if (op & SLJIT_I32_OP) + if (op & SLJIT_32) imm &= 0xffffffffull; if ((imm & 0x000000000000ffffull) != 0 || imm == 0) @@ -2480,7 +2560,7 @@ static sljit_s32 sljit_emit_bitwise(struct sljit_compiler *compiler, sljit_s32 o if ((imm & 0xffff000000000000ull) != 0) count16++; - if (type == SLJIT_AND && dst == SLJIT_UNUSED && count16 == 1) { + if (type == SLJIT_AND && dst == (sljit_s32)tmp0 && count16 == 1) { sljit_gpr src_r = tmp0; if (FAST_IS_REG(src1)) @@ -2489,16 +2569,16 @@ static sljit_s32 sljit_emit_bitwise(struct sljit_compiler *compiler, sljit_s32 o FAIL_IF(emit_move(compiler, tmp0, src1, src1w)); if ((imm & 0x000000000000ffffull) != 0 || imm == 0) - return push_inst(compiler, 0xa7010000 | (src_r << 20) | imm); + return push_inst(compiler, 0xa7010000 | R20A(src_r) | imm); if ((imm & 0x00000000ffff0000ull) != 0) - return push_inst(compiler, 0xa7000000 | (src_r << 20) | (imm >> 16)); + return push_inst(compiler, 0xa7000000 | R20A(src_r) | (imm >> 16)); if ((imm & 0x0000ffff00000000ull) != 0) - return push_inst(compiler, 0xa7030000 | (src_r << 20) | (imm >> 32)); - return push_inst(compiler, 0xa7020000 | (src_r << 20) | (imm >> 48)); + return push_inst(compiler, 0xa7030000 | R20A(src_r) | (imm >> 32)); + return push_inst(compiler, 0xa7020000 | R20A(src_r) | (imm >> 48)); } if (!(op & SLJIT_SET_Z)) - return sljit_emit_bitwise_imm(compiler, type, dst, dstw, src1, src1w, imm, count16); + return sljit_emit_bitwise_imm(compiler, type, dst, src1, src1w, imm, count16); } if (type == SLJIT_AND) @@ -2508,16 +2588,16 @@ static sljit_s32 sljit_emit_bitwise(struct sljit_compiler *compiler, sljit_s32 o else forms = &bitwise_xor_forms; - return emit_commutative(compiler, forms, dst, dstw, src1, src1w, src2, src2w); + return emit_commutative(compiler, forms, dst, src1, src1w, src2, src2w); } static sljit_s32 sljit_emit_shift(struct sljit_compiler *compiler, sljit_s32 op, - sljit_s32 dst, sljit_sw dstw, + sljit_s32 dst, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { sljit_s32 type = GET_OPCODE(op); - sljit_gpr dst_r = SLOW_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0; + sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) : tmp0; sljit_gpr src_r = tmp0; sljit_gpr base_r = tmp0; sljit_ins imm = 0; @@ -2529,7 +2609,7 @@ static sljit_s32 sljit_emit_shift(struct sljit_compiler *compiler, sljit_s32 op, FAIL_IF(emit_move(compiler, tmp0, src1, src1w)); if (src2 & SLJIT_IMM) - imm = src2w & ((op & SLJIT_I32_OP) ? 0x1f : 0x3f); + imm = (sljit_ins)(src2w & ((op & SLJIT_32) ? 0x1f : 0x3f)); else if (FAST_IS_REG(src2)) base_r = gpr(src2 & REG_MASK); else { @@ -2537,7 +2617,7 @@ static sljit_s32 sljit_emit_shift(struct sljit_compiler *compiler, sljit_s32 op, base_r = tmp1; } - if ((op & SLJIT_I32_OP) && dst_r == src_r) { + if ((op & SLJIT_32) && dst_r == src_r) { if (type == SLJIT_SHL) ins = 0x89000000 /* sll */; else if (type == SLJIT_LSHR) @@ -2545,21 +2625,21 @@ static sljit_s32 sljit_emit_shift(struct sljit_compiler *compiler, sljit_s32 op, else ins = 0x8a000000 /* sra */; - FAIL_IF(push_inst(compiler, ins | (dst_r << 20) | (base_r << 12) | imm)); + FAIL_IF(push_inst(compiler, ins | R20A(dst_r) | R12A(base_r) | imm)); } else { if (type == SLJIT_SHL) - ins = (op & SLJIT_I32_OP) ? 0xeb00000000df /* sllk */ : 0xeb000000000d /* sllg */; + ins = (op & SLJIT_32) ? 0xeb00000000df /* sllk */ : 0xeb000000000d /* sllg */; else if (type == SLJIT_LSHR) - ins = (op & SLJIT_I32_OP) ? 0xeb00000000de /* srlk */ : 0xeb000000000c /* srlg */; + ins = (op & SLJIT_32) ? 0xeb00000000de /* srlk */ : 0xeb000000000c /* srlg */; else - ins = (op & SLJIT_I32_OP) ? 0xeb00000000dc /* srak */ : 0xeb000000000a /* srag */; + ins = (op & SLJIT_32) ? 0xeb00000000dc /* srak */ : 0xeb000000000a /* srag */; - FAIL_IF(push_inst(compiler, ins | (dst_r << 36) | (src_r << 32) | (base_r << 28) | (imm << 16))); + FAIL_IF(push_inst(compiler, ins | R36A(dst_r) | R32A(src_r) | R28A(base_r) | (imm << 16))); } if ((op & SLJIT_SET_Z) && type != SLJIT_ASHR) - return push_inst(compiler, (op & SLJIT_I32_OP) ? or(dst_r, dst_r) : ogr(dst_r, dst_r)); + return push_inst(compiler, (op & SLJIT_32) ? or(dst_r, dst_r) : ogr(dst_r, dst_r)); return SLJIT_SUCCESS; } @@ -2590,20 +2670,14 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile sljit_s32 src2, sljit_sw src2w) { CHECK_ERROR(); - CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) - return SLJIT_SUCCESS; - - compiler->mode = op & SLJIT_I32_OP; + compiler->mode = op & SLJIT_32; compiler->status_flags_state = op & (VARIABLE_FLAG_MASK | SLJIT_SET_Z); - if (GET_OPCODE(op) >= SLJIT_ADD || GET_OPCODE(op) <= SLJIT_SUBC) - compiler->status_flags_state |= SLJIT_CURRENT_FLAGS_ADD_SUB; - if (is_commutative(op) && (src1 & SLJIT_IMM) && !(src2 & SLJIT_IMM)) { src1 ^= src2; src2 ^= src1; @@ -2616,39 +2690,57 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile switch (GET_OPCODE(op)) { case SLJIT_ADD: + compiler->status_flags_state |= SLJIT_CURRENT_FLAGS_ADD; return sljit_emit_add(compiler, op, dst, dstw, src1, src1w, src2, src2w); case SLJIT_ADDC: - FAIL_IF(emit_commutative(compiler, &addc_forms, dst, dstw, src1, src1w, src2, src2w)); + compiler->status_flags_state |= SLJIT_CURRENT_FLAGS_ADD; + FAIL_IF(emit_commutative(compiler, &addc_forms, dst, src1, src1w, src2, src2w)); if (dst & SLJIT_MEM) - return store_word(compiler, tmp0, dst, dstw, op & SLJIT_I32_OP); + return store_word(compiler, tmp0, dst, dstw, op & SLJIT_32); return SLJIT_SUCCESS; case SLJIT_SUB: + compiler->status_flags_state |= SLJIT_CURRENT_FLAGS_SUB; return sljit_emit_sub(compiler, op, dst, dstw, src1, src1w, src2, src2w); case SLJIT_SUBC: - FAIL_IF(emit_non_commutative(compiler, &subc_forms, dst, dstw, src1, src1w, src2, src2w)); + compiler->status_flags_state |= SLJIT_CURRENT_FLAGS_SUB; + FAIL_IF(emit_non_commutative(compiler, &subc_forms, dst, src1, src1w, src2, src2w)); if (dst & SLJIT_MEM) - return store_word(compiler, tmp0, dst, dstw, op & SLJIT_I32_OP); + return store_word(compiler, tmp0, dst, dstw, op & SLJIT_32); return SLJIT_SUCCESS; case SLJIT_MUL: - FAIL_IF(sljit_emit_multiply(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + FAIL_IF(sljit_emit_multiply(compiler, op, dst, src1, src1w, src2, src2w)); break; case SLJIT_AND: case SLJIT_OR: case SLJIT_XOR: - FAIL_IF(sljit_emit_bitwise(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + FAIL_IF(sljit_emit_bitwise(compiler, op, dst, src1, src1w, src2, src2w)); break; case SLJIT_SHL: case SLJIT_LSHR: case SLJIT_ASHR: - FAIL_IF(sljit_emit_shift(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + FAIL_IF(sljit_emit_shift(compiler, op, dst, src1, src1w, src2, src2w)); break; } if (dst & SLJIT_MEM) - return store_word(compiler, tmp0, dst, dstw, op & SLJIT_I32_OP); + return store_word(compiler, tmp0, dst, dstw, op & SLJIT_32); return SLJIT_SUCCESS; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + return sljit_emit_op2(compiler, op, (sljit_s32)tmp0, 0, src1, src1w, src2, src2w); +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src( struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) @@ -2686,17 +2778,17 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src( SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg) { CHECK_REG_INDEX(check_sljit_get_register_index(reg)); - return gpr(reg); + return (sljit_s32)gpr(reg); } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) { CHECK_REG_INDEX(check_sljit_get_float_register_index(reg)); - abort(); + return (sljit_s32)fgpr(reg); } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { sljit_ins ins = 0; @@ -2711,21 +2803,254 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *c /* Floating point operators */ /* --------------------------------------------------------------------- */ +#define FLOAT_LOAD 0 +#define FLOAT_STORE 1 + +static sljit_s32 float_mem(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 reg, + sljit_s32 mem, sljit_sw memw) +{ + struct addr addr; + sljit_ins ins; + + SLJIT_ASSERT(mem & SLJIT_MEM); + + if ((mem & OFFS_REG_MASK) || is_u12(memw) || !is_s20(memw)) { + FAIL_IF(make_addr_bx(compiler, &addr, mem, memw, tmp1)); + + if (op & FLOAT_STORE) + ins = (op & SLJIT_32) ? 0x70000000 /* ste */ : 0x60000000 /* std */; + else + ins = (op & SLJIT_32) ? 0x78000000 /* le */ : 0x68000000 /* ld */; + + return push_inst(compiler, ins | F20(reg) | R16A(addr.index) | R12A(addr.base) | (sljit_ins)addr.offset); + } + + FAIL_IF(make_addr_bxy(compiler, &addr, mem, memw, tmp1)); + + if (op & FLOAT_STORE) + ins = (op & SLJIT_32) ? 0xed0000000066 /* stey */ : 0xed0000000067 /* stdy */; + else + ins = (op & SLJIT_32) ? 0xed0000000064 /* ley */ : 0xed0000000065 /* ldy */; + + return push_inst(compiler, ins | F36(reg) | R32A(addr.index) | R28A(addr.base) | disp_s20(addr.offset)); +} + +static sljit_s32 emit_float(struct sljit_compiler *compiler, sljit_ins ins_r, sljit_ins ins, + sljit_s32 reg, + sljit_s32 src, sljit_sw srcw) +{ + struct addr addr; + + if (!(src & SLJIT_MEM)) + return push_inst(compiler, ins_r | F4(reg) | F0(src)); + + FAIL_IF(make_addr_bx(compiler, &addr, src, srcw, tmp1)); + return push_inst(compiler, ins | F36(reg) | R32A(addr.index) | R28A(addr.base) | ((sljit_ins)addr.offset << 16)); +} + +static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 dst, sljit_sw dstw, + sljit_s32 src, sljit_sw srcw) +{ + sljit_ins dst_r = FAST_IS_REG(dst) ? gpr(dst) : tmp0; + sljit_ins ins; + + if (src & SLJIT_MEM) { + FAIL_IF(float_mem(compiler, FLOAT_LOAD | (op & SLJIT_32), TMP_FREG1, src, srcw)); + src = TMP_FREG1; + } + + /* M3 is set to 5 */ + if (GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64) + ins = (op & SLJIT_32) ? 0xb3a85000 /* cgebr */ : 0xb3a95000 /* cgdbr */; + else + ins = (op & SLJIT_32) ? 0xb3985000 /* cfebr */ : 0xb3995000 /* cfdbr */; + + FAIL_IF(push_inst(compiler, ins | R4A(dst_r) | F0(src))); + + if (dst & SLJIT_MEM) + return store_word(compiler, dst_r, dst, dstw, GET_OPCODE(op) >= SLJIT_CONV_S32_FROM_F64); + + return SLJIT_SUCCESS; +} + +static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 dst, sljit_sw dstw, + sljit_s32 src, sljit_sw srcw) +{ + sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; + sljit_ins ins; + + if (src & SLJIT_IMM) { + FAIL_IF(push_load_imm_inst(compiler, tmp0, srcw)); + src = (sljit_s32)tmp0; + } + else if (src & SLJIT_MEM) { + FAIL_IF(load_word(compiler, tmp0, src, srcw, GET_OPCODE(op) >= SLJIT_CONV_F64_FROM_S32)); + src = (sljit_s32)tmp0; + } + + if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW) + ins = (op & SLJIT_32) ? 0xb3a40000 /* cegbr */ : 0xb3a50000 /* cdgbr */; + else + ins = (op & SLJIT_32) ? 0xb3940000 /* cefbr */ : 0xb3950000 /* cdfbr */; + + FAIL_IF(push_inst(compiler, ins | F4(dst_r) | R0(src))); + + if (dst & SLJIT_MEM) + return float_mem(compiler, FLOAT_STORE | (op & SLJIT_32), TMP_FREG1, dst, dstw); + + return SLJIT_SUCCESS; +} + +static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + sljit_ins ins_r, ins; + + if (src1 & SLJIT_MEM) { + FAIL_IF(float_mem(compiler, FLOAT_LOAD | (op & SLJIT_32), TMP_FREG1, src1, src1w)); + src1 = TMP_FREG1; + } + + if (op & SLJIT_32) { + ins_r = 0xb3090000 /* cebr */; + ins = 0xed0000000009 /* ceb */; + } else { + ins_r = 0xb3190000 /* cdbr */; + ins = 0xed0000000019 /* cdb */; + } + + return emit_float(compiler, ins_r, ins, src1, src2, src2w); +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw) { + sljit_s32 dst_r; + sljit_ins ins; + CHECK_ERROR(); - abort(); + + SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); + + dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; + + if (op == SLJIT_CONV_F64_FROM_F32) + FAIL_IF(emit_float(compiler, 0xb3040000 /* ldebr */, 0xed0000000004 /* ldeb */, dst_r, src, srcw)); + else { + if (src & SLJIT_MEM) { + FAIL_IF(float_mem(compiler, FLOAT_LOAD | (op == SLJIT_CONV_F32_FROM_F64 ? 0 : (op & SLJIT_32)), dst_r, src, srcw)); + src = dst_r; + } + + switch (GET_OPCODE(op)) { + case SLJIT_MOV_F64: + if (FAST_IS_REG(dst)) { + if (dst == src) + return SLJIT_SUCCESS; + + ins = (op & SLJIT_32) ? 0x3800 /* ler */ : 0x2800 /* ldr */; + break; + } + return float_mem(compiler, FLOAT_STORE | (op & SLJIT_32), src, dst, dstw); + case SLJIT_CONV_F64_FROM_F32: + /* Only SLJIT_CONV_F32_FROM_F64. */ + ins = 0xb3440000 /* ledbr */; + break; + case SLJIT_NEG_F64: + ins = (op & SLJIT_32) ? 0xb3030000 /* lcebr */ : 0xb3130000 /* lcdbr */; + break; + default: + SLJIT_ASSERT(GET_OPCODE(op) == SLJIT_ABS_F64); + ins = (op & SLJIT_32) ? 0xb3000000 /* lpebr */ : 0xb3100000 /* lpdbr */; + break; + } + + FAIL_IF(push_inst(compiler, ins | F4(dst_r) | F0(src))); + } + + if (!(dst & SLJIT_MEM)) + return SLJIT_SUCCESS; + + SLJIT_ASSERT(dst_r == TMP_FREG1); + + return float_mem(compiler, FLOAT_STORE | (op & SLJIT_32), TMP_FREG1, dst, dstw); } +#define FLOAT_MOV(op, dst_r, src_r) \ + (((op & SLJIT_32) ? 0x3800 /* ler */ : 0x2800 /* ldr */) | F4(dst_r) | F0(src_r)) + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { + sljit_s32 dst_r = TMP_FREG1; + sljit_ins ins_r, ins; + CHECK_ERROR(); - abort(); + CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + ADJUST_LOCAL_OFFSET(dst, dstw); + ADJUST_LOCAL_OFFSET(src1, src1w); + ADJUST_LOCAL_OFFSET(src2, src2w); + + do { + if (FAST_IS_REG(dst)) { + dst_r = dst; + + if (dst == src1) + break; + + if (dst == src2) { + if (GET_OPCODE(op) == SLJIT_ADD_F64 || GET_OPCODE(op) == SLJIT_MUL_F64) { + src2 = src1; + src2w = src1w; + src1 = dst; + break; + } + + FAIL_IF(push_inst(compiler, FLOAT_MOV(op, TMP_FREG1, src2))); + src2 = TMP_FREG1; + } + } + + if (src1 & SLJIT_MEM) + FAIL_IF(float_mem(compiler, FLOAT_LOAD | (op & SLJIT_32), dst_r, src1, src1w)); + else + FAIL_IF(push_inst(compiler, FLOAT_MOV(op, dst_r, src1))); + } while (0); + + switch (GET_OPCODE(op)) { + case SLJIT_ADD_F64: + ins_r = (op & SLJIT_32) ? 0xb30a0000 /* aebr */ : 0xb31a0000 /* adbr */; + ins = (op & SLJIT_32) ? 0xed000000000a /* aeb */ : 0xed000000001a /* adb */; + break; + case SLJIT_SUB_F64: + ins_r = (op & SLJIT_32) ? 0xb30b0000 /* sebr */ : 0xb31b0000 /* sdbr */; + ins = (op & SLJIT_32) ? 0xed000000000b /* seb */ : 0xed000000001b /* sdb */; + break; + case SLJIT_MUL_F64: + ins_r = (op & SLJIT_32) ? 0xb3170000 /* meebr */ : 0xb31c0000 /* mdbr */; + ins = (op & SLJIT_32) ? 0xed0000000017 /* meeb */ : 0xed000000001c /* mdb */; + break; + default: + SLJIT_ASSERT(GET_OPCODE(op) == SLJIT_DIV_F64); + ins_r = (op & SLJIT_32) ? 0xb30d0000 /* debr */ : 0xb31d0000 /* ddbr */; + ins = (op & SLJIT_32) ? 0xed000000000d /* deb */ : 0xed000000001d /* ddb */; + break; + } + + FAIL_IF(emit_float(compiler, ins_r, ins, dst_r, src2, src2w)); + + if (dst & SLJIT_MEM) + return float_mem(compiler, FLOAT_STORE | (op & SLJIT_32), TMP_FREG1, dst, dstw); + + SLJIT_ASSERT(dst_r != TMP_FREG1); + return SLJIT_SUCCESS; } /* --------------------------------------------------------------------- */ @@ -2795,6 +3120,11 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_call(compiler, type, arg_types)); + if (type & SLJIT_CALL_RETURN) { + PTR_FAIL_IF(emit_stack_frame_release(compiler)); + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); + } + #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; @@ -2809,14 +3139,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi CHECK_ERROR(); CHECK(check_sljit_emit_ijump(compiler, type, src, srcw)); - ADJUST_LOCAL_OFFSET(src, srcw); if (src & SLJIT_IMM) { SLJIT_ASSERT(!(srcw & 1)); /* target address must be even */ FAIL_IF(push_load_imm_inst(compiler, src_r, srcw)); } - else if (src & SLJIT_MEM) + else if (src & SLJIT_MEM) { + ADJUST_LOCAL_OFFSET(src, srcw); FAIL_IF(load_word(compiler, src_r, src, srcw, 0 /* 64-bit */)); + } /* emit jump instruction */ if (type >= SLJIT_FAST_CALL) @@ -2832,6 +3163,24 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi CHECK_ERROR(); CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); + SLJIT_ASSERT(gpr(TMP_REG2) == tmp1); + + if (src & SLJIT_MEM) { + ADJUST_LOCAL_OFFSET(src, srcw); + FAIL_IF(load_word(compiler, tmp1, src, srcw, 0 /* 64-bit */)); + src = TMP_REG2; + } + + if (type & SLJIT_CALL_RETURN) { + if (src >= SLJIT_FIRST_SAVED_REG && src <= SLJIT_S0) { + FAIL_IF(push_inst(compiler, lgr(tmp1, gpr(src)))); + src = TMP_REG2; + } + + FAIL_IF(emit_stack_frame_release(compiler)); + type = SLJIT_JUMP; + } + #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; @@ -2859,11 +3208,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co /* dst is also source operand */ if (dst & SLJIT_MEM) - FAIL_IF(load_word(compiler, dst_r, dst, dstw, op & SLJIT_I32_OP)); + FAIL_IF(load_word(compiler, dst_r, dst, dstw, op & SLJIT_32)); break; + case SLJIT_MOV32: + op |= SLJIT_32; + /* fallthrough */ case SLJIT_MOV: - case (SLJIT_MOV32 & ~SLJIT_I32_OP): /* can write straight into destination */ loc_r = dst_r; break; @@ -2876,7 +3227,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co if (have_lscond2()) { FAIL_IF(push_load_imm_inst(compiler, loc_r, 0)); FAIL_IF(push_inst(compiler, - WHEN2(op & SLJIT_I32_OP, lochi, locghi))); + WHEN2(op & SLJIT_32, lochi, locghi))); } else { /* TODO(mundaym): no load/store-on-condition 2 facility (ipm? branch-and-set?) */ abort(); @@ -2888,22 +3239,22 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co #define LEVAL(i) i(dst_r, loc_r) case SLJIT_AND: FAIL_IF(push_inst(compiler, - WHEN2(op & SLJIT_I32_OP, nr, ngr))); + WHEN2(op & SLJIT_32, nr, ngr))); break; case SLJIT_OR: FAIL_IF(push_inst(compiler, - WHEN2(op & SLJIT_I32_OP, or, ogr))); + WHEN2(op & SLJIT_32, or, ogr))); break; case SLJIT_XOR: FAIL_IF(push_inst(compiler, - WHEN2(op & SLJIT_I32_OP, xr, xgr))); + WHEN2(op & SLJIT_32, xr, xgr))); break; #undef LEVAL } /* store result to memory if required */ if (dst & SLJIT_MEM) - return store_word(compiler, dst_r, dst, dstw, op & SLJIT_I32_OP); + return store_word(compiler, dst_r, dst, dstw, (op & SLJIT_32)); return SLJIT_SUCCESS; } @@ -2913,7 +3264,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil sljit_s32 src, sljit_sw srcw) { sljit_u8 mask = get_cc(compiler, type & 0xff); - sljit_gpr dst_r = gpr(dst_reg & ~SLJIT_I32_OP); + sljit_gpr dst_r = gpr(dst_reg & ~SLJIT_32); sljit_gpr src_r = FAST_IS_REG(src) ? gpr(src) : tmp0; CHECK_ERROR(); @@ -2927,7 +3278,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil #define LEVAL(i) i(dst_r, src_r, mask) if (have_lscond1()) return push_inst(compiler, - WHEN2(dst_reg & SLJIT_I32_OP, locr, locgr)); + WHEN2(dst_reg & SLJIT_32, locr, locgr)); #undef LEVAL @@ -2991,7 +3342,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - sljit_set_jump_addr(addr, new_constant, executable_offset); + sljit_set_jump_addr(addr, (sljit_uw)new_constant, executable_offset); } SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label *sljit_emit_put_label( diff --git a/thirdparty/pcre2/src/sljit/sljitNativeSPARC_32.c b/thirdparty/pcre2/src/sljit/sljitNativeSPARC_32.c index 28886405af..218992b355 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeSPARC_32.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeSPARC_32.c @@ -35,16 +35,13 @@ static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, #define ARG2(flags, src2) ((flags & SRC2_IMM) ? IMM(src2) : S2(src2)) -static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, +static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_u32 flags, sljit_s32 dst, sljit_s32 src1, sljit_sw src2) { SLJIT_COMPILE_ASSERT(ICC_IS_SET == SET_FLAGS, icc_is_set_and_set_flags_must_be_the_same); switch (op) { case SLJIT_MOV: - case SLJIT_MOV_U32: - case SLJIT_MOV_S32: - case SLJIT_MOV_P: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); if (dst != src2) return push_inst(compiler, OR | D(dst) | S1(0) | S2(src2), DR(dst)); @@ -59,8 +56,7 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src2) | IMM(24), DR(dst))); return push_inst(compiler, SRA | D(dst) | S1(dst) | IMM(24), DR(dst)); } - else if (dst != src2) - SLJIT_UNREACHABLE(); + SLJIT_ASSERT(dst == src2); return SLJIT_SUCCESS; case SLJIT_MOV_U16: @@ -70,13 +66,12 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src2) | IMM(16), DR(dst))); return push_inst(compiler, (op == SLJIT_MOV_S16 ? SRA : SRL) | D(dst) | S1(dst) | IMM(16), DR(dst)); } - else if (dst != src2) - SLJIT_UNREACHABLE(); + SLJIT_ASSERT(dst == src2); return SLJIT_SUCCESS; case SLJIT_NOT: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); - return push_inst(compiler, XNOR | (flags & SET_FLAGS) | D(dst) | S1(0) | S2(src2), DR(dst) | (flags & SET_FLAGS)); + return push_inst(compiler, XNOR | (flags & SET_FLAGS) | D(dst) | S1(0) | S2(src2), DRF(dst, flags)); case SLJIT_CLZ: SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); @@ -89,22 +84,24 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl /* Loop. */ FAIL_IF(push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(TMP_REG1) | S2(0), SET_FLAGS)); FAIL_IF(push_inst(compiler, SLL | D(TMP_REG1) | S1(TMP_REG1) | IMM(1), DR(TMP_REG1))); - FAIL_IF(push_inst(compiler, BICC | DA(0xe) | (-2 & DISP_MASK), UNMOVABLE_INS)); + FAIL_IF(push_inst(compiler, BICC | DA(0xe) | ((sljit_ins)-2 & DISP_MASK), UNMOVABLE_INS)); return push_inst(compiler, ADD | D(dst) | S1(dst) | IMM(1), UNMOVABLE_INS); case SLJIT_ADD: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; - return push_inst(compiler, ADD | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS)); + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; + return push_inst(compiler, ADD | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DRF(dst, flags)); case SLJIT_ADDC: - return push_inst(compiler, ADDC | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS)); + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD; + return push_inst(compiler, ADDC | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DRF(dst, flags)); case SLJIT_SUB: - compiler->status_flags_state = SLJIT_CURRENT_FLAGS_ADD_SUB; - return push_inst(compiler, SUB | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS)); + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; + return push_inst(compiler, SUB | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DRF(dst, flags)); case SLJIT_SUBC: - return push_inst(compiler, SUBC | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS)); + compiler->status_flags_state = SLJIT_CURRENT_FLAGS_SUB; + return push_inst(compiler, SUBC | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DRF(dst, flags)); case SLJIT_MUL: compiler->status_flags_state = 0; @@ -116,13 +113,13 @@ static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sl return push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(TMP_REG1) | S2(TMP_LINK), MOVABLE_INS | SET_FLAGS); case SLJIT_AND: - return push_inst(compiler, AND | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS)); + return push_inst(compiler, AND | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DRF(dst, flags)); case SLJIT_OR: - return push_inst(compiler, OR | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS)); + return push_inst(compiler, OR | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DRF(dst, flags)); case SLJIT_XOR: - return push_inst(compiler, XOR | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS)); + return push_inst(compiler, XOR | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DRF(dst, flags)); case SLJIT_SHL: FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst))); @@ -147,7 +144,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t sljit_s32 word_reg_index = 8; sljit_s32 float_arg_index = 1; sljit_s32 double_arg_count = 0; - sljit_s32 float_offset = (16 + 6) * sizeof(sljit_sw); + sljit_u32 float_offset = (16 + 6) * sizeof(sljit_sw); sljit_s32 types = 0; sljit_s32 reg = 0; sljit_s32 move_to_tmp2 = 0; @@ -155,18 +152,12 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t if (src) reg = reg_map[*src & REG_MASK]; - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - types = (types << SLJIT_DEF_SHIFT) | (arg_types & SLJIT_DEF_MASK); + types = (types << SLJIT_ARG_SHIFT) | (arg_types & SLJIT_ARG_MASK); - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - float_arg_index++; - if (reg_index == reg) - move_to_tmp2 = 1; - reg_index++; - break; + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: float_arg_index++; double_arg_count++; @@ -174,36 +165,37 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t move_to_tmp2 = 1; reg_index += 2; break; + case SLJIT_ARG_TYPE_F32: + float_arg_index++; + if (reg_index == reg) + move_to_tmp2 = 1; + reg_index++; + break; default: - if (reg_index != word_reg_index && reg_index < 14 && reg_index == reg) + if (reg_index != word_reg_index && reg_index == reg) move_to_tmp2 = 1; reg_index++; word_reg_index++; break; } - if (move_to_tmp2) { - move_to_tmp2 = 0; - if (reg < 14) - FAIL_IF(push_inst(compiler, OR | D(TMP_REG1) | S1(0) | S2A(reg), DR(TMP_REG1))); - *src = TMP_REG1; - } + arg_types >>= SLJIT_ARG_SHIFT; + } - arg_types >>= SLJIT_DEF_SHIFT; + if (move_to_tmp2) { + if (reg < 14) + FAIL_IF(push_inst(compiler, OR | D(TMP_REG1) | S1(0) | S2A(reg), DR(TMP_REG1))); + *src = TMP_REG1; } arg_types = types; while (arg_types) { - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - float_arg_index--; - FAIL_IF(push_inst(compiler, STF | FD(float_arg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); - float_offset -= sizeof(sljit_f64); - break; + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: float_arg_index--; if (float_arg_index == 4 && double_arg_count == 4) { + /* The address is not doubleword aligned, so two instructions are required to store the double. */ FAIL_IF(push_inst(compiler, STF | FD(float_arg_index) | S1(SLJIT_SP) | IMM((16 + 7) * sizeof(sljit_sw)), MOVABLE_INS)); FAIL_IF(push_inst(compiler, STF | FD(float_arg_index) | (1 << 25) | S1(SLJIT_SP) | IMM((16 + 8) * sizeof(sljit_sw)), MOVABLE_INS)); } @@ -211,36 +203,41 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t FAIL_IF(push_inst(compiler, STDF | FD(float_arg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); float_offset -= sizeof(sljit_f64); break; + case SLJIT_ARG_TYPE_F32: + float_arg_index--; + FAIL_IF(push_inst(compiler, STF | FD(float_arg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); + float_offset -= sizeof(sljit_f64); + break; default: break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } float_offset = (16 + 6) * sizeof(sljit_sw); while (types) { - switch (types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - reg_index--; - if (reg_index < 14) - FAIL_IF(push_inst(compiler, LDUW | DA(reg_index) | S1(SLJIT_SP) | IMM(float_offset), reg_index)); - float_offset -= sizeof(sljit_f64); - break; + switch (types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: reg_index -= 2; if (reg_index < 14) { if ((reg_index & 0x1) != 0) { FAIL_IF(push_inst(compiler, LDUW | DA(reg_index) | S1(SLJIT_SP) | IMM(float_offset), reg_index)); - if (reg_index < 13) + if (reg_index < 8 + 6 - 1) FAIL_IF(push_inst(compiler, LDUW | DA(reg_index + 1) | S1(SLJIT_SP) | IMM(float_offset + sizeof(sljit_sw)), reg_index + 1)); } - else + else FAIL_IF(push_inst(compiler, LDD | DA(reg_index) | S1(SLJIT_SP) | IMM(float_offset), reg_index)); } float_offset -= sizeof(sljit_f64); break; + case SLJIT_ARG_TYPE_F32: + reg_index--; + if (reg_index < 8 + 6) + FAIL_IF(push_inst(compiler, LDUW | DA(reg_index) | S1(SLJIT_SP) | IMM(float_offset), reg_index)); + float_offset -= sizeof(sljit_f64); + break; default: reg_index--; word_reg_index--; @@ -254,7 +251,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t break; } - types >>= SLJIT_DEF_SHIFT; + types >>= SLJIT_ARG_SHIFT; } return SLJIT_SUCCESS; @@ -282,5 +279,5 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset) { - sljit_set_jump_addr(addr, new_constant, executable_offset); + sljit_set_jump_addr(addr, (sljit_uw)new_constant, executable_offset); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativeSPARC_common.c b/thirdparty/pcre2/src/sljit/sljitNativeSPARC_common.c index e833f09d7a..c8d19e16c6 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeSPARC_common.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeSPARC_common.c @@ -98,36 +98,37 @@ static void sparc_cache_flush(sljit_ins *from, sljit_ins *to) #define TMP_FREG2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 2) static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 6] = { - 0, 8, 9, 10, 11, 29, 28, 27, 23, 22, 21, 20, 19, 18, 17, 16, 26, 25, 24, 14, 1, 12, 13, 15 + 0, 8, 9, 10, 11, 23, 22, 21, 20, 19, 18, 17, 16, 29, 28, 27, 26, 25, 24, 14, 1, 12, 13, 15 }; static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { - 0, 0, 2, 4, 6, 8, 10, 12, 14 + 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 }; /* --------------------------------------------------------------------- */ /* Instrucion forms */ /* --------------------------------------------------------------------- */ -#define D(d) (reg_map[d] << 25) -#define FD(d) (freg_map[d] << 25) -#define FDN(d) ((freg_map[d] | 0x1) << 25) -#define DA(d) ((d) << 25) -#define S1(s1) (reg_map[s1] << 14) -#define FS1(s1) (freg_map[s1] << 14) -#define S1A(s1) ((s1) << 14) -#define S2(s2) (reg_map[s2]) -#define FS2(s2) (freg_map[s2]) -#define FS2N(s2) (freg_map[s2] | 0x1) -#define S2A(s2) (s2) +#define D(d) ((sljit_ins)reg_map[d] << 25) +#define FD(d) ((sljit_ins)freg_map[d] << 25) +#define FDN(d) (((sljit_ins)freg_map[d] | 0x1) << 25) +#define DA(d) ((sljit_ins)(d) << 25) +#define S1(s1) ((sljit_ins)reg_map[s1] << 14) +#define FS1(s1) ((sljit_ins)freg_map[s1] << 14) +#define S1A(s1) ((sljit_ins)(s1) << 14) +#define S2(s2) ((sljit_ins)reg_map[s2]) +#define FS2(s2) ((sljit_ins)freg_map[s2]) +#define FS2N(s2) ((sljit_ins)freg_map[s2] | 0x1) +#define S2A(s2) ((sljit_ins)(s2)) #define IMM_ARG 0x2000 -#define DOP(op) ((op) << 5) -#define IMM(imm) (((imm) & 0x1fff) | IMM_ARG) +#define DOP(op) ((sljit_ins)(op) << 5) +#define IMM(imm) (((sljit_ins)(imm) & 0x1fff) | IMM_ARG) #define DR(dr) (reg_map[dr]) -#define OPC1(opcode) ((opcode) << 30) -#define OPC2(opcode) ((opcode) << 22) -#define OPC3(opcode) ((opcode) << 19) +#define DRF(dr, flags) ((sljit_s32)(reg_map[dr] | ((flags) & SET_FLAGS))) +#define OPC1(opcode) ((sljit_ins)(opcode) << 30) +#define OPC2(opcode) ((sljit_ins)(opcode) << 22) +#define OPC3(opcode) ((sljit_ins)(opcode) << 19) #define SET_FLAGS OPC3(0x10) #define ADD (OPC1(0x2) | OPC3(0x00)) @@ -156,6 +157,8 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define FSUBS (OPC1(0x2) | OPC3(0x34) | DOP(0x45)) #define JMPL (OPC1(0x2) | OPC3(0x38)) #define LDD (OPC1(0x3) | OPC3(0x03)) +#define LDDF (OPC1(0x3) | OPC3(0x23)) +#define LDF (OPC1(0x3) | OPC3(0x20)) #define LDUW (OPC1(0x3) | OPC3(0x00)) #define NOP (OPC1(0x0) | OPC2(0x04)) #define OR (OPC1(0x2) | OPC3(0x02)) @@ -170,6 +173,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #define SRAX (OPC1(0x2) | OPC3(0x27) | (1 << 12)) #define SRL (OPC1(0x2) | OPC3(0x26)) #define SRLX (OPC1(0x2) | OPC3(0x26) | (1 << 12)) +#define STD (OPC1(0x3) | OPC3(0x07)) #define STDF (OPC1(0x3) | OPC3(0x27)) #define STF (OPC1(0x3) | OPC3(0x24)) #define STW (OPC1(0x3) | OPC3(0x04)) @@ -183,7 +187,7 @@ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 3] = { #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) #define MAX_DISP (0x1fffff) #define MIN_DISP (-0x200000) -#define DISP_MASK (0x3fffff) +#define DISP_MASK ((sljit_ins)0x3fffff) #define BICC (OPC1(0x0) | OPC2(0x2)) #define FBFCC (OPC1(0x0) | OPC2(0x6)) @@ -274,7 +278,7 @@ static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_i } } - diff += sizeof(sljit_ins); + diff += SSIZE_OF(ins); if (diff <= MAX_DISP && diff >= MIN_DISP) { jump->flags |= PATCH_B; @@ -300,7 +304,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_uw word_count; sljit_uw next_addr; sljit_sw executable_offset; - sljit_uw addr; + sljit_sw addr; struct sljit_label *label; struct sljit_jump *jump; @@ -340,7 +344,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == word_count) { /* Just recording the address. */ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } if (jump && jump->addr == word_count) { @@ -373,7 +377,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil if (label && label->size == word_count) { label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; } @@ -386,27 +390,27 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = compiler->jumps; while (jump) { do { - addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; + addr = (sljit_sw)((jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target); buf_ptr = (sljit_ins *)jump->addr; if (jump->flags & PATCH_CALL) { - addr = (sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2; - SLJIT_ASSERT((sljit_sw)addr <= 0x1fffffff && (sljit_sw)addr >= -0x20000000); - buf_ptr[0] = CALL | (addr & 0x3fffffff); + addr = (addr - (sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2; + SLJIT_ASSERT(addr <= 0x1fffffff && addr >= -0x20000000); + buf_ptr[0] = CALL | ((sljit_ins)addr & 0x3fffffff); break; } if (jump->flags & PATCH_B) { - addr = (sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2; - SLJIT_ASSERT((sljit_sw)addr <= MAX_DISP && (sljit_sw)addr >= MIN_DISP); - buf_ptr[0] = (buf_ptr[0] & ~DISP_MASK) | (addr & DISP_MASK); + addr = (addr - (sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2; + SLJIT_ASSERT(addr <= MAX_DISP && addr >= MIN_DISP); + buf_ptr[0] = (buf_ptr[0] & ~DISP_MASK) | ((sljit_ins)addr & DISP_MASK); break; } /* Set the fields of immediate loads. */ #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) SLJIT_ASSERT(((buf_ptr[0] & 0xc1cfffff) == 0x01000000) && ((buf_ptr[1] & 0xc1f83fff) == 0x80102000)); - buf_ptr[0] |= (addr >> 10) & 0x3fffff; - buf_ptr[1] |= addr & 0x3ff; + buf_ptr[0] |= (sljit_ins)(addr >> 10) & 0x3fffff; + buf_ptr[1] |= (sljit_ins)addr & 0x3ff; #else #error "Implementation required" #endif @@ -416,7 +420,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil put_label = compiler->put_labels; while (put_label) { - addr = put_label->label->addr; + addr = (sljit_sw)put_label->label->addr; buf_ptr = (sljit_ins *)put_label->addr; #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) @@ -431,7 +435,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; - compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); + compiler->executable_size = (sljit_uw)(code_ptr - code) * sizeof(sljit_ins); code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); @@ -487,13 +491,14 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) #define ALT_KEEP_CACHE 0x00040 #define CUMULATIVE_OP 0x00080 #define IMM_OP 0x00100 -#define SRC2_IMM 0x00200 +#define MOVE_OP 0x00200 +#define SRC2_IMM 0x00400 -#define REG_DEST 0x00400 -#define REG2_SOURCE 0x00800 -#define SLOW_SRC1 0x01000 -#define SLOW_SRC2 0x02000 -#define SLOW_DEST 0x04000 +#define REG_DEST 0x00800 +#define REG2_SOURCE 0x01000 +#define SLOW_SRC1 0x02000 +#define SLOW_SRC2 0x04000 +#define SLOW_DEST 0x08000 /* SET_FLAGS (0x10 << 19) also belong here! */ @@ -507,6 +512,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { + sljit_s32 reg_index, types, tmp; + sljit_u32 float_offset, args_offset; + sljit_s32 saved_arg_index, scratch_arg_index, float_arg_index; + CHECK_ERROR(); CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); @@ -514,7 +523,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi local_size = (local_size + SLJIT_LOCALS_OFFSET + 7) & ~0x7; compiler->local_size = local_size; - if (local_size <= SIMM_MAX) { + if (local_size <= -SIMM_MIN) { FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | IMM(-local_size), UNMOVABLE_INS)); } else { @@ -522,7 +531,88 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | S2(TMP_REG1), UNMOVABLE_INS)); } - /* Arguments are in their appropriate registers. */ + arg_types >>= SLJIT_ARG_SHIFT; + + types = arg_types; + float_offset = 16 * sizeof(sljit_sw); + reg_index = 24; + + while (types && reg_index < 24 + 6) { + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (reg_index & 0x1) { + FAIL_IF(push_inst(compiler, STW | DA(reg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); + if (reg_index >= 24 + 6 - 1) + break; + FAIL_IF(push_inst(compiler, STW | DA(reg_index + 1) | S1(SLJIT_SP) | IMM(float_offset + sizeof(sljit_sw)), MOVABLE_INS)); + } else + FAIL_IF(push_inst(compiler, STD | DA(reg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); + + float_offset += sizeof(sljit_f64); + reg_index++; + break; + case SLJIT_ARG_TYPE_F32: + FAIL_IF(push_inst(compiler, STW | DA(reg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); + float_offset += sizeof(sljit_f64); + break; + } + + reg_index++; + types >>= SLJIT_ARG_SHIFT; + } + + args_offset = (16 + 1 + 6) * sizeof(sljit_sw); + float_offset = 16 * sizeof(sljit_sw); + reg_index = 24; + saved_arg_index = 24; + scratch_arg_index = 8 - 1; + float_arg_index = 1; + + while (arg_types) { + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + if (reg_index < 24 + 6 - 1) { + FAIL_IF(push_inst(compiler, LDDF | FD(float_arg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); + } else if (reg_index < 24 + 6) { + FAIL_IF(push_inst(compiler, LDF | FD(float_arg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); + FAIL_IF(push_inst(compiler, LDF | FD(float_arg_index) | (1 << 25) | S1A(30) | IMM(args_offset), MOVABLE_INS)); + } else { + FAIL_IF(push_inst(compiler, LDF | FD(float_arg_index) | S1A(30) | IMM(args_offset), MOVABLE_INS)); + FAIL_IF(push_inst(compiler, LDF | FD(float_arg_index) | (1 << 25) | S1A(30) | IMM(args_offset + sizeof(sljit_sw)), MOVABLE_INS)); + } + + float_arg_index++; + float_offset += sizeof(sljit_f64); + reg_index++; + break; + case SLJIT_ARG_TYPE_F32: + if (reg_index < 24 + 6) + FAIL_IF(push_inst(compiler, LDF | FD(float_arg_index) | S1(SLJIT_SP) | IMM(float_offset), MOVABLE_INS)); + else + FAIL_IF(push_inst(compiler, LDF | FD(float_arg_index) | S1A(30) | IMM(args_offset), MOVABLE_INS)); + float_arg_index++; + float_offset += sizeof(sljit_f64); + break; + default: + scratch_arg_index++; + + if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + tmp = saved_arg_index++; + if (tmp == reg_index) + break; + } else + tmp = scratch_arg_index; + + if (reg_index < 24 + 6) + FAIL_IF(push_inst(compiler, OR | DA(tmp) | S1(0) | S2A(reg_index), tmp)); + else + FAIL_IF(push_inst(compiler, LDUW | DA(tmp) | S1A(30) | IMM(args_offset), tmp)); + break; + } + + reg_index++; + arg_types >>= SLJIT_ARG_SHIFT; + } return SLJIT_SUCCESS; } @@ -539,12 +629,21 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp return SLJIT_SUCCESS; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); + + FAIL_IF(push_inst(compiler, JMPL | D(0) | S1A(31) | IMM(8), UNMOVABLE_INS)); + return push_inst(compiler, RESTORE | D(SLJIT_R0) | S1(SLJIT_R0) | S2(0), UNMOVABLE_INS); +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { CHECK_ERROR(); CHECK(check_sljit_emit_return(compiler, op, src, srcw)); - if (op != SLJIT_MOV || !FAST_IS_REG(src)) { + if (TYPE_CAST_NEEDED(op) || !FAST_IS_REG(src)) { FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); src = SLJIT_R0; } @@ -591,7 +690,7 @@ static const sljit_ins data_transfer_insts[16 + 4] = { #undef ARCH_32_64 /* Can perform an operation using at most 1 instruction. */ -static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw) +static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_u32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw) { SLJIT_ASSERT(arg & SLJIT_MEM); @@ -632,7 +731,7 @@ static sljit_s32 can_cache(sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, slj } /* Emit the necessary instructions. See can_cache above. */ -static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw) +static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_u32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw) { sljit_s32 base, arg2, delay_slot; sljit_ins dest; @@ -660,7 +759,7 @@ static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sl arg2 = reg; else /* It must be a mov operation, so tmp1 must be free to use. */ arg2 = TMP_REG1; - FAIL_IF(push_inst(compiler, SLL_W | D(arg2) | S1(OFFS_REG(arg)) | IMM_ARG | argw, DR(arg2))); + FAIL_IF(push_inst(compiler, SLL_W | D(arg2) | S1(OFFS_REG(arg)) | IMM_ARG | (sljit_ins)argw, DR(arg2))); } } else { @@ -692,7 +791,7 @@ static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sl return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), delay_slot); } -static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw) +static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_u32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw) { if (getput_arg_fast(compiler, flags, reg, arg, argw)) return compiler->error; @@ -701,14 +800,14 @@ static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit return getput_arg(compiler, flags, reg, arg, argw, 0, 0); } -static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w) +static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_u32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w) { if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) return compiler->error; return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); } -static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, +static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_u32 flags, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) @@ -727,11 +826,11 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 compiler->cache_argw = 0; } - if (dst != SLJIT_UNUSED) { + if (dst != TMP_REG2) { if (FAST_IS_REG(dst)) { dst_r = dst; flags |= REG_DEST; - if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) + if (flags & MOVE_OP) sugg_src2_r = dst_r; } else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1, dst, dstw)) @@ -782,7 +881,7 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 if (FAST_IS_REG(src2)) { src2_r = src2; flags |= REG2_SOURCE; - if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOV_P) + if ((flags & (REG_DEST | MOVE_OP)) == MOVE_OP) dst_r = src2_r; } else if (src2 & SLJIT_IMM) { @@ -793,8 +892,12 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 } else { src2_r = 0; - if ((op >= SLJIT_MOV && op <= SLJIT_MOV_P) && (dst & SLJIT_MEM)) - dst_r = 0; + if (flags & MOVE_OP) { + if (dst & SLJIT_MEM) + dst_r = 0; + else + op = SLJIT_MOV; + } } } } @@ -888,7 +991,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw) { - sljit_s32 flags = HAS_FLAGS(op) ? SET_FLAGS : 0; + sljit_u32 flags = HAS_FLAGS(op) ? SET_FLAGS : 0; CHECK_ERROR(); CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); @@ -898,33 +1001,29 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile op = GET_OPCODE(op); switch (op) { case SLJIT_MOV: - case SLJIT_MOV_P: - return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw); - +#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) case SLJIT_MOV_U32: - return emit_op(compiler, SLJIT_MOV_U32, flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw); - case SLJIT_MOV_S32: - return emit_op(compiler, SLJIT_MOV_S32, flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, srcw); + case SLJIT_MOV32: +#endif + case SLJIT_MOV_P: + return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, srcw); case SLJIT_MOV_U8: - return emit_op(compiler, SLJIT_MOV_U8, flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw); + return emit_op(compiler, SLJIT_MOV_U8, flags | BYTE_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw); case SLJIT_MOV_S8: - return emit_op(compiler, SLJIT_MOV_S8, flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw); + return emit_op(compiler, SLJIT_MOV_S8, flags | BYTE_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw); case SLJIT_MOV_U16: - return emit_op(compiler, SLJIT_MOV_U16, flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw); + return emit_op(compiler, SLJIT_MOV_U16, flags | HALF_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw); case SLJIT_MOV_S16: - return emit_op(compiler, SLJIT_MOV_S16, flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw); + return emit_op(compiler, SLJIT_MOV_S16, flags | HALF_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw); case SLJIT_NOT: case SLJIT_CLZ: return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); - - case SLJIT_NEG: - return emit_op(compiler, SLJIT_SUB, flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw); } return SLJIT_SUCCESS; @@ -935,17 +1034,14 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w) { - sljit_s32 flags = HAS_FLAGS(op) ? SET_FLAGS : 0; + sljit_u32 flags = HAS_FLAGS(op) ? SET_FLAGS : 0; CHECK_ERROR(); - CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); - if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) - return SLJIT_SUCCESS; - op = GET_OPCODE(op); switch (op) { case SLJIT_ADD: @@ -975,6 +1071,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile return SLJIT_SUCCESS; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + CHECK_ERROR(); + CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + return sljit_emit_op2(compiler, op, TMP_REG2, 0, src1, src1w, src2, src2w); +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { @@ -1015,7 +1125,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { CHECK_ERROR(); CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); @@ -1027,8 +1137,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *c /* Floating point operators */ /* --------------------------------------------------------------------- */ -#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_F32_OP) >> 7)) -#define SELECT_FOP(op, single, double) ((op & SLJIT_F32_OP) ? single : double) +#define FLOAT_DATA(op) ((sljit_ins)DOUBLE_DATA | (((sljit_ins)(op) & SLJIT_32) >> 7)) +#define SELECT_FOP(op, single, double) ((op & SLJIT_32) ? single : double) #define FLOAT_TMP_MEM_OFFSET (22 * sizeof(sljit_sw)) static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op, @@ -1108,11 +1218,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil compiler->cache_arg = 0; compiler->cache_argw = 0; - SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100) && !(DOUBLE_DATA & 0x2), float_transfer_bit_error); + SLJIT_COMPILE_ASSERT((SLJIT_32 == 0x100) && !(DOUBLE_DATA & 0x2), float_transfer_bit_error); SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; @@ -1126,7 +1236,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil if (src != dst_r) { if (dst_r != TMP_FREG1) { FAIL_IF(push_inst(compiler, FMOVS | FD(dst_r) | FS2(src), MOVABLE_INS)); - if (!(op & SLJIT_F32_OP)) + if (!(op & SLJIT_32)) FAIL_IF(push_inst(compiler, FMOVS | FDN(dst_r) | FS2N(src), MOVABLE_INS)); } else @@ -1135,17 +1245,17 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil break; case SLJIT_NEG_F64: FAIL_IF(push_inst(compiler, FNEGS | FD(dst_r) | FS2(src), MOVABLE_INS)); - if (dst_r != src && !(op & SLJIT_F32_OP)) + if (dst_r != src && !(op & SLJIT_32)) FAIL_IF(push_inst(compiler, FMOVS | FDN(dst_r) | FS2N(src), MOVABLE_INS)); break; case SLJIT_ABS_F64: FAIL_IF(push_inst(compiler, FABSS | FD(dst_r) | FS2(src), MOVABLE_INS)); - if (dst_r != src && !(op & SLJIT_F32_OP)) + if (dst_r != src && !(op & SLJIT_32)) FAIL_IF(push_inst(compiler, FMOVS | FDN(dst_r) | FS2N(src), MOVABLE_INS)); break; case SLJIT_CONV_F64_FROM_F32: FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSTOD, FDTOS) | FD(dst_r) | FS2(src), MOVABLE_INS)); - op ^= SLJIT_F32_OP; + op ^= SLJIT_32; break; } @@ -1288,10 +1398,12 @@ static sljit_ins get_cc(struct sljit_compiler *compiler, sljit_s32 type) case SLJIT_LESS: case SLJIT_GREATER_F64: /* Unordered. */ + case SLJIT_CARRY: return DA(0x5); case SLJIT_GREATER_EQUAL: case SLJIT_LESS_EQUAL_F64: + case SLJIT_NOT_CARRY: return DA(0xd); case SLJIT_GREATER: @@ -1315,15 +1427,17 @@ static sljit_ins get_cc(struct sljit_compiler *compiler, sljit_s32 type) return DA(0x2); case SLJIT_OVERFLOW: - if (!(compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB)) + if (!(compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB))) return DA(0x9); + /* fallthrough */ case SLJIT_UNORDERED_F64: return DA(0x7); case SLJIT_NOT_OVERFLOW: - if (!(compiler->status_flags_state & SLJIT_CURRENT_FLAGS_ADD_SUB)) + if (!(compiler->status_flags_state & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB))) return DA(0x1); + /* fallthrough */ case SLJIT_ORDERED_F64: return DA(0xf); @@ -1412,7 +1526,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); FAIL_IF(!jump); set_jump(jump, compiler, JUMP_ADDR); - jump->u.target = srcw; + jump->u.target = (sljit_uw)srcw; if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) jump->flags |= IS_MOVABLE; @@ -1460,7 +1574,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co sljit_s32 dst, sljit_sw dstw, sljit_s32 type) { - sljit_s32 reg, flags = HAS_FLAGS(op) ? SET_FLAGS : 0; + sljit_s32 reg; + sljit_u32 flags = HAS_FLAGS(op) ? SET_FLAGS : 0; CHECK_ERROR(); CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c index 79a7e8bba5..b9a7b39789 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c @@ -26,6 +26,10 @@ /* x86 32-bit arch dependent functions. */ +/* --------------------------------------------------------------------- */ +/* Operators */ +/* --------------------------------------------------------------------- */ + static sljit_s32 emit_do_imm(struct sljit_compiler *compiler, sljit_u8 opcode, sljit_sw imm) { sljit_u8 *inst; @@ -38,314 +42,8 @@ static sljit_s32 emit_do_imm(struct sljit_compiler *compiler, sljit_u8 opcode, s return SLJIT_SUCCESS; } -static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_sw executable_offset) -{ - sljit_s32 type = jump->flags >> TYPE_SHIFT; - - if (type == SLJIT_JUMP) { - *code_ptr++ = JMP_i32; - jump->addr++; - } - else if (type >= SLJIT_FAST_CALL) { - *code_ptr++ = CALL_i32; - jump->addr++; - } - else { - *code_ptr++ = GROUP_0F; - *code_ptr++ = get_jump_code(type); - jump->addr += 2; - } - - if (jump->flags & JUMP_LABEL) - jump->flags |= PATCH_MW; - else - sljit_unaligned_store_sw(code_ptr, jump->u.target - (jump->addr + 4) - (sljit_uw)executable_offset); - code_ptr += 4; - - return code_ptr; -} - -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, - sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, - sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) -{ - sljit_s32 args, size; - sljit_u8 *inst; - - CHECK_ERROR(); - CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); - set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - - /* Emit ENDBR32 at function entry if needed. */ - FAIL_IF(emit_endbranch(compiler)); - - args = get_arg_count(arg_types); - compiler->args = args; - - /* [esp+0] for saving temporaries and function calls. */ - compiler->stack_tmp_size = 2 * sizeof(sljit_sw); - -#if !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) - if (scratches > 3) - compiler->stack_tmp_size = 3 * sizeof(sljit_sw); -#endif - - compiler->saveds_offset = compiler->stack_tmp_size; - if (scratches > 3) - compiler->saveds_offset += ((scratches > (3 + 6)) ? 6 : (scratches - 3)) * sizeof(sljit_sw); - - compiler->locals_offset = compiler->saveds_offset; - - if (saveds > 3) - compiler->locals_offset += (saveds - 3) * sizeof(sljit_sw); - - if (options & SLJIT_F64_ALIGNMENT) - compiler->locals_offset = (compiler->locals_offset + sizeof(sljit_f64) - 1) & ~(sizeof(sljit_f64) - 1); - - size = 1 + (scratches > 9 ? (scratches - 9) : 0) + (saveds <= 3 ? saveds : 3); -#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) - size += (args > 0 ? (args * 2) : 0) + (args > 2 ? 2 : 0); -#else - size += (args > 0 ? (2 + args * 3) : 0); -#endif - inst = (sljit_u8*)ensure_buf(compiler, 1 + size); - FAIL_IF(!inst); - - INC_SIZE(size); - PUSH_REG(reg_map[TMP_REG1]); -#if !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) - if (args > 0) { - *inst++ = MOV_r_rm; - *inst++ = MOD_REG | (reg_map[TMP_REG1] << 3) | 0x4 /* esp */; - } -#endif - if (saveds > 2 || scratches > 9) - PUSH_REG(reg_map[SLJIT_S2]); - if (saveds > 1 || scratches > 10) - PUSH_REG(reg_map[SLJIT_S1]); - if (saveds > 0 || scratches > 11) - PUSH_REG(reg_map[SLJIT_S0]); - -#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) - if (args > 0) { - inst[0] = MOV_r_rm; - inst[1] = MOD_REG | (reg_map[SLJIT_S0] << 3) | reg_map[SLJIT_R2]; - inst += 2; - } - if (args > 1) { - inst[0] = MOV_r_rm; - inst[1] = MOD_REG | (reg_map[SLJIT_S1] << 3) | reg_map[SLJIT_R1]; - inst += 2; - } - if (args > 2) { - inst[0] = MOV_r_rm; - inst[1] = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | 0x4 /* esp */; - inst[2] = 0x24; - inst[3] = sizeof(sljit_sw) * (3 + 2); /* saveds >= 3 as well. */ - } -#else - if (args > 0) { - inst[0] = MOV_r_rm; - inst[1] = MOD_DISP8 | (reg_map[SLJIT_S0] << 3) | reg_map[TMP_REG1]; - inst[2] = sizeof(sljit_sw) * 2; - inst += 3; - } - if (args > 1) { - inst[0] = MOV_r_rm; - inst[1] = MOD_DISP8 | (reg_map[SLJIT_S1] << 3) | reg_map[TMP_REG1]; - inst[2] = sizeof(sljit_sw) * 3; - inst += 3; - } - if (args > 2) { - inst[0] = MOV_r_rm; - inst[1] = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | reg_map[TMP_REG1]; - inst[2] = sizeof(sljit_sw) * 4; - } -#endif - - SLJIT_ASSERT(SLJIT_LOCALS_OFFSET > 0); - -#if defined(__APPLE__) - /* Ignore pushed registers and SLJIT_LOCALS_OFFSET when computing the aligned local size. */ - saveds = (2 + (scratches > 9 ? (scratches - 9) : 0) + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw); - local_size = ((SLJIT_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds; -#else - if (options & SLJIT_F64_ALIGNMENT) - local_size = SLJIT_LOCALS_OFFSET + ((local_size + sizeof(sljit_f64) - 1) & ~(sizeof(sljit_f64) - 1)); - else - local_size = SLJIT_LOCALS_OFFSET + ((local_size + sizeof(sljit_sw) - 1) & ~(sizeof(sljit_sw) - 1)); -#endif - - compiler->local_size = local_size; - -#ifdef _WIN32 - if (local_size > 0) { - if (local_size <= 4 * 4096) { - if (local_size > 4096) - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096); - if (local_size > 2 * 4096) - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 2); - if (local_size > 3 * 4096) - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 3); - } - else { - EMIT_MOV(compiler, SLJIT_R0, 0, SLJIT_SP, 0); - EMIT_MOV(compiler, SLJIT_R1, 0, SLJIT_IMM, (local_size - 1) >> 12); - - SLJIT_ASSERT (reg_map[SLJIT_R0] == 0); - - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_R0), -4096); - FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, 4096)); - FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1)); - - inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); - FAIL_IF(!inst); - - INC_SIZE(2); - inst[0] = JNE_i8; - inst[1] = (sljit_s8) -16; - } - - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -local_size); - } -#endif - - SLJIT_ASSERT(local_size > 0); - -#if !defined(__APPLE__) - if (options & SLJIT_F64_ALIGNMENT) { - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_SP, 0); - - /* Some space might allocated during sljit_grow_stack() above on WIN32. */ - FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size + sizeof(sljit_sw))); - -#if defined _WIN32 && !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) - if (compiler->local_size > 1024) - FAIL_IF(emit_cum_binary(compiler, BINARY_OPCODE(ADD), - TMP_REG1, 0, TMP_REG1, 0, SLJIT_IMM, sizeof(sljit_sw))); -#endif - - inst = (sljit_u8*)ensure_buf(compiler, 1 + 6); - FAIL_IF(!inst); - - INC_SIZE(6); - inst[0] = GROUP_BINARY_81; - inst[1] = MOD_REG | AND | reg_map[SLJIT_SP]; - sljit_unaligned_store_sw(inst + 2, ~(sizeof(sljit_f64) - 1)); - - /* The real local size must be used. */ - return emit_mov(compiler, SLJIT_MEM1(SLJIT_SP), compiler->local_size, TMP_REG1, 0); - } -#endif - return emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size); -} - -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler, - sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, - sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) -{ - CHECK_ERROR(); - CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); - set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); - - compiler->args = get_arg_count(arg_types); - - /* [esp+0] for saving temporaries and function calls. */ - compiler->stack_tmp_size = 2 * sizeof(sljit_sw); - -#if !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) - if (scratches > 3) - compiler->stack_tmp_size = 3 * sizeof(sljit_sw); -#endif - - compiler->saveds_offset = compiler->stack_tmp_size; - if (scratches > 3) - compiler->saveds_offset += ((scratches > (3 + 6)) ? 6 : (scratches - 3)) * sizeof(sljit_sw); - - compiler->locals_offset = compiler->saveds_offset; - - if (saveds > 3) - compiler->locals_offset += (saveds - 3) * sizeof(sljit_sw); - - if (options & SLJIT_F64_ALIGNMENT) - compiler->locals_offset = (compiler->locals_offset + sizeof(sljit_f64) - 1) & ~(sizeof(sljit_f64) - 1); - -#if defined(__APPLE__) - saveds = (2 + (scratches > 9 ? (scratches - 9) : 0) + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw); - compiler->local_size = ((SLJIT_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds; -#else - if (options & SLJIT_F64_ALIGNMENT) - compiler->local_size = SLJIT_LOCALS_OFFSET + ((local_size + sizeof(sljit_f64) - 1) & ~(sizeof(sljit_f64) - 1)); - else - compiler->local_size = SLJIT_LOCALS_OFFSET + ((local_size + sizeof(sljit_sw) - 1) & ~(sizeof(sljit_sw) - 1)); -#endif - return SLJIT_SUCCESS; -} - -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) -{ - sljit_s32 size; - sljit_u8 *inst; - - CHECK_ERROR(); - CHECK(check_sljit_emit_return(compiler, op, src, srcw)); - SLJIT_ASSERT(compiler->args >= 0); - - FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); - - SLJIT_ASSERT(compiler->local_size > 0); - -#if !defined(__APPLE__) - if (compiler->options & SLJIT_F64_ALIGNMENT) - EMIT_MOV(compiler, SLJIT_SP, 0, SLJIT_MEM1(SLJIT_SP), compiler->local_size) - else - FAIL_IF(emit_cum_binary(compiler, BINARY_OPCODE(ADD), - SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->local_size)); -#else - FAIL_IF(emit_cum_binary(compiler, BINARY_OPCODE(ADD), - SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->local_size)); -#endif - - size = 2 + (compiler->scratches > 9 ? (compiler->scratches - 9) : 0) + - (compiler->saveds <= 3 ? compiler->saveds : 3); -#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) - if (compiler->args > 2) - size += 2; -#endif - inst = (sljit_u8*)ensure_buf(compiler, 1 + size); - FAIL_IF(!inst); - - INC_SIZE(size); - - if (compiler->saveds > 0 || compiler->scratches > 11) - POP_REG(reg_map[SLJIT_S0]); - if (compiler->saveds > 1 || compiler->scratches > 10) - POP_REG(reg_map[SLJIT_S1]); - if (compiler->saveds > 2 || compiler->scratches > 9) - POP_REG(reg_map[SLJIT_S2]); - POP_REG(reg_map[TMP_REG1]); -#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) - if (compiler->args > 2) - RET_I16(sizeof(sljit_sw)); - else - RET(); -#else - RET(); -#endif - - return SLJIT_SUCCESS; -} - -/* --------------------------------------------------------------------- */ -/* Operators */ -/* --------------------------------------------------------------------- */ - /* Size contains the flags as well. */ -static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 size, +static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_uw size, /* The register or immediate operand. */ sljit_s32 a, sljit_sw imma, /* The general operand (not immediate). */ @@ -353,8 +51,9 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 { sljit_u8 *inst; sljit_u8 *buf_ptr; - sljit_s32 flags = size & ~0xf; - sljit_s32 inst_size; + sljit_u8 reg_map_b; + sljit_uw flags = size; + sljit_uw inst_size; /* Both cannot be switched on. */ SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS)); @@ -367,8 +66,6 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 SLJIT_ASSERT((flags & (EX86_PREF_F2 | EX86_PREF_F3)) != (EX86_PREF_F2 | EX86_PREF_F3) && (flags & (EX86_PREF_F2 | EX86_PREF_66)) != (EX86_PREF_F2 | EX86_PREF_66) && (flags & (EX86_PREF_F3 | EX86_PREF_66)) != (EX86_PREF_F3 | EX86_PREF_66)); - /* We don't support (%ebp). */ - SLJIT_ASSERT(!(b & SLJIT_MEM) || immb || reg_map[b & REG_MASK] != 5); size &= 0xf; inst_size = size; @@ -381,7 +78,7 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 /* Calculate size of b. */ inst_size += 1; /* mod r/m byte. */ if (b & SLJIT_MEM) { - if ((b & REG_MASK) == SLJIT_UNUSED) + if (!(b & REG_MASK)) inst_size += sizeof(sljit_sw); else if (immb != 0 && !(b & OFFS_REG_MASK)) { /* Immediate operand. */ @@ -390,11 +87,13 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 else inst_size += sizeof(sljit_sw); } + else if (reg_map[b & REG_MASK] == 5) + inst_size += sizeof(sljit_s8); if ((b & REG_MASK) == SLJIT_SP && !(b & OFFS_REG_MASK)) b |= TO_OFFS_REG(SLJIT_SP); - if ((b & OFFS_REG_MASK) != SLJIT_UNUSED) + if (b & OFFS_REG_MASK) inst_size += 1; /* SIB byte. */ } @@ -445,9 +144,9 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 if (a & SLJIT_IMM) *buf_ptr = 0; else if (!(flags & EX86_SSE2_OP1)) - *buf_ptr = reg_map[a] << 3; + *buf_ptr = U8(reg_map[a] << 3); else - *buf_ptr = a << 3; + *buf_ptr = U8(a << 3); } else { if (a & SLJIT_IMM) { @@ -460,27 +159,30 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 *buf_ptr = 0; } - if (!(b & SLJIT_MEM)) - *buf_ptr++ |= MOD_REG + ((!(flags & EX86_SSE2_OP2)) ? reg_map[b] : b); - else if ((b & REG_MASK) != SLJIT_UNUSED) { - if ((b & OFFS_REG_MASK) == SLJIT_UNUSED || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP)) { - if (immb != 0) { + if (!(b & SLJIT_MEM)) { + *buf_ptr = U8(*buf_ptr | MOD_REG | (!(flags & EX86_SSE2_OP2) ? reg_map[b] : b)); + buf_ptr++; + } else if (b & REG_MASK) { + reg_map_b = reg_map[b & REG_MASK]; + + if (!(b & OFFS_REG_MASK) || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP) || reg_map_b == 5) { + if (immb != 0 || reg_map_b == 5) { if (immb <= 127 && immb >= -128) *buf_ptr |= 0x40; else *buf_ptr |= 0x80; } - if ((b & OFFS_REG_MASK) == SLJIT_UNUSED) - *buf_ptr++ |= reg_map[b & REG_MASK]; + if (!(b & OFFS_REG_MASK)) + *buf_ptr++ |= reg_map_b; else { *buf_ptr++ |= 0x04; - *buf_ptr++ = reg_map[b & REG_MASK] | (reg_map[OFFS_REG(b)] << 3); + *buf_ptr++ = U8(reg_map_b | (reg_map[OFFS_REG(b)] << 3)); } - if (immb != 0) { + if (immb != 0 || reg_map_b == 5) { if (immb <= 127 && immb >= -128) - *buf_ptr++ = immb; /* 8 bit displacement. */ + *buf_ptr++ = U8(immb); /* 8 bit displacement. */ else { sljit_unaligned_store_sw(buf_ptr, immb); /* 32 bit displacement. */ buf_ptr += sizeof(sljit_sw); @@ -489,7 +191,7 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 } else { *buf_ptr++ |= 0x04; - *buf_ptr++ = reg_map[b & REG_MASK] | (reg_map[OFFS_REG(b)] << 3) | (immb << 6); + *buf_ptr++ = U8(reg_map_b | (reg_map[OFFS_REG(b)] << 3) | (immb << 6)); } } else { @@ -500,9 +202,9 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 if (a & SLJIT_IMM) { if (flags & EX86_BYTE_ARG) - *buf_ptr = imma; + *buf_ptr = U8(imma); else if (flags & EX86_HALF_ARG) - sljit_unaligned_store_s16(buf_ptr, imma); + sljit_unaligned_store_s16(buf_ptr, (sljit_s16)imma); else if (!(flags & EX86_SHIFT_INS)) sljit_unaligned_store_sw(buf_ptr, imma); } @@ -511,34 +213,449 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 } /* --------------------------------------------------------------------- */ -/* Call / return instructions */ +/* Enter / return */ /* --------------------------------------------------------------------- */ +static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_sw executable_offset) +{ + sljit_uw type = jump->flags >> TYPE_SHIFT; + + if (type == SLJIT_JUMP) { + *code_ptr++ = JMP_i32; + jump->addr++; + } + else if (type >= SLJIT_FAST_CALL) { + *code_ptr++ = CALL_i32; + jump->addr++; + } + else { + *code_ptr++ = GROUP_0F; + *code_ptr++ = get_jump_code(type); + jump->addr += 2; + } + + if (jump->flags & JUMP_LABEL) + jump->flags |= PATCH_MW; + else + sljit_unaligned_store_sw(code_ptr, (sljit_sw)(jump->u.target - (jump->addr + 4) - (sljit_uw)executable_offset)); + code_ptr += 4; + + return code_ptr; +} + +#define ENTER_R2_USED 0x00001 +#define ENTER_R2_TO_S 0x00002 +#define ENTER_R2_TO_R0 0x00004 +#define ENTER_R1_TO_S 0x00008 +#define ENTER_TMP_TO_R4 0x00010 +#define ENTER_TMP_TO_S 0x00020 + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, + sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, + sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) +{ + sljit_s32 word_arg_count, saved_arg_count, float_arg_count; + sljit_s32 size, locals_offset, args_size, types, status; + sljit_u8 *inst; +#ifdef _WIN32 + sljit_s32 r2_offset = -1; +#endif + + CHECK_ERROR(); + CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); + set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); + + /* Emit ENDBR32 at function entry if needed. */ + FAIL_IF(emit_endbranch(compiler)); + + SLJIT_COMPILE_ASSERT(SLJIT_FR0 == 1, float_register_index_start); + + arg_types >>= SLJIT_ARG_SHIFT; + types = arg_types; + word_arg_count = 0; + saved_arg_count = 0; + float_arg_count = 0; + args_size = SSIZE_OF(sw); + status = 0; + while (types) { + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + float_arg_count++; + FAIL_IF(emit_sse2_load(compiler, 0, float_arg_count, SLJIT_MEM1(SLJIT_SP), args_size)); + args_size += SSIZE_OF(f64); + break; + case SLJIT_ARG_TYPE_F32: + float_arg_count++; + FAIL_IF(emit_sse2_load(compiler, 1, float_arg_count, SLJIT_MEM1(SLJIT_SP), args_size)); + args_size += SSIZE_OF(f32); + break; + default: + word_arg_count++; + + if (!(types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + saved_arg_count++; + if (saved_arg_count == 4) + status |= ENTER_TMP_TO_S; + } else { + if (word_arg_count == 4) + status |= ENTER_TMP_TO_R4; #if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (word_arg_count == 3) + status |= ENTER_R2_USED; +#endif + } + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (word_arg_count <= 2 && !(options & SLJIT_ENTER_CDECL)) + break; +#endif + + args_size += SSIZE_OF(sw); + break; + } + types >>= SLJIT_ARG_SHIFT; + } + + args_size -= SSIZE_OF(sw); + compiler->args_size = args_size; + + /* [esp+0] for saving temporaries and function calls. */ + locals_offset = 2 * SSIZE_OF(sw); + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if ((options & SLJIT_ENTER_CDECL) && scratches >= 3) + locals_offset = 4 * SSIZE_OF(sw); +#else + if (scratches >= 3) + locals_offset = 4 * SSIZE_OF(sw); +#endif + + compiler->scratches_offset = locals_offset; + + if (scratches > 3) + locals_offset += ((scratches > (3 + 6)) ? 6 : (scratches - 3)) * SSIZE_OF(sw); + + if (saveds > 3) + locals_offset += (saveds - 3) * SSIZE_OF(sw); + + compiler->locals_offset = locals_offset; + + size = 1 + (scratches > 9 ? (scratches - 9) : 0) + (saveds <= 3 ? saveds : 3); + inst = (sljit_u8*)ensure_buf(compiler, (sljit_uw)(size + 1)); + FAIL_IF(!inst); + + INC_SIZE((sljit_uw)size); + PUSH_REG(reg_map[TMP_REG1]); + if (saveds > 2 || scratches > 9) + PUSH_REG(reg_map[SLJIT_S2]); + if (saveds > 1 || scratches > 10) + PUSH_REG(reg_map[SLJIT_S1]); + if (saveds > 0 || scratches > 11) + PUSH_REG(reg_map[SLJIT_S0]); + + size *= SSIZE_OF(sw); + + if (status & (ENTER_TMP_TO_R4 | ENTER_TMP_TO_S)) + EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), args_size + size); -static sljit_s32 c_fast_call_get_stack_size(sljit_s32 arg_types, sljit_s32 *word_arg_count_ptr) + size += SSIZE_OF(sw); + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (!(options & SLJIT_ENTER_CDECL)) + size += args_size; +#endif + + local_size = ((locals_offset + local_size + size + 0xf) & ~0xf) - size; + compiler->local_size = local_size; + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (!(options & SLJIT_ENTER_CDECL)) + size -= args_size; +#endif + + word_arg_count = 0; + saved_arg_count = 0; + args_size = size; + while (arg_types) { + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + args_size += SSIZE_OF(f64); + break; + case SLJIT_ARG_TYPE_F32: + args_size += SSIZE_OF(f32); + break; + default: + word_arg_count++; + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (!(options & SLJIT_ENTER_CDECL) && word_arg_count <= 2) { + if (word_arg_count == 1) { + if (status & ENTER_R2_USED) { + EMIT_MOV(compiler, (arg_types & SLJIT_ARG_TYPE_SCRATCH_REG) ? SLJIT_R0 : SLJIT_S0, 0, SLJIT_R2, 0); + } else if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + status |= ENTER_R2_TO_S; + saved_arg_count++; + } else + status |= ENTER_R2_TO_R0; + } else if (!(arg_types & SLJIT_ARG_TYPE_SCRATCH_REG)) { + status |= ENTER_R1_TO_S; + saved_arg_count++; + } + break; + } +#endif + if (arg_types & SLJIT_ARG_TYPE_SCRATCH_REG) { + SLJIT_ASSERT(word_arg_count <= 3 || (status & ENTER_TMP_TO_R4)); + + if (word_arg_count <= 3) { +#ifdef _WIN32 + if (word_arg_count == 3 && local_size > 4 * 4096) + r2_offset = local_size + args_size; + else +#endif + EMIT_MOV(compiler, word_arg_count, 0, SLJIT_MEM1(SLJIT_SP), args_size); + } + } else { + SLJIT_ASSERT(saved_arg_count <= 3 || (status & ENTER_TMP_TO_S)); + + if (saved_arg_count <= 3) + EMIT_MOV(compiler, SLJIT_S0 - saved_arg_count, 0, SLJIT_MEM1(SLJIT_SP), args_size); + saved_arg_count++; + } + args_size += SSIZE_OF(sw); + break; + } + arg_types >>= SLJIT_ARG_SHIFT; + } + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (!(options & SLJIT_ENTER_CDECL)) { + if (status & ENTER_R2_TO_R0) + EMIT_MOV(compiler, SLJIT_R0, 0, SLJIT_R2, 0); + + saved_arg_count = 0; + if (status & ENTER_R2_TO_S) { + EMIT_MOV(compiler, SLJIT_S0, 0, SLJIT_R2, 0); + saved_arg_count++; + } + + if (status & ENTER_R1_TO_S) + EMIT_MOV(compiler, SLJIT_S0 - saved_arg_count, 0, SLJIT_R1, 0); + } +#endif + + SLJIT_ASSERT(SLJIT_LOCALS_OFFSET > 0); + +#ifdef _WIN32 + SLJIT_ASSERT(r2_offset == -1 || local_size > 4 * 4096); + + if (local_size > 4096) { + if (local_size <= 4 * 4096) { + BINARY_IMM32(OR, 0, SLJIT_MEM1(SLJIT_SP), -4096); + + if (local_size > 2 * 4096) + BINARY_IMM32(OR, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 2); + if (local_size > 3 * 4096) + BINARY_IMM32(OR, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 3); + } + else { + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_IMM, local_size >> 12); + + BINARY_IMM32(OR, 0, SLJIT_MEM1(SLJIT_SP), -4096); + BINARY_IMM32(SUB, 4096, SLJIT_SP, 0); + + inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); + FAIL_IF(!inst); + + INC_SIZE(2); + inst[0] = LOOP_i8; + inst[1] = (sljit_u8)-16; + local_size &= 0xfff; + } + } + + if (local_size > 0) { + BINARY_IMM32(OR, 0, SLJIT_MEM1(SLJIT_SP), -local_size); + BINARY_IMM32(SUB, local_size, SLJIT_SP, 0); + } + + if (r2_offset != -1) + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), r2_offset); + +#else /* !_WIN32 */ + + SLJIT_ASSERT(local_size > 0); + + BINARY_IMM32(SUB, local_size, SLJIT_SP, 0); + +#endif /* _WIN32 */ + + if (status & (ENTER_TMP_TO_R4 | ENTER_TMP_TO_S)) { + size = (status & ENTER_TMP_TO_R4) ? compiler->scratches_offset : compiler->locals_offset - SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), size, TMP_REG1, 0); + } + + return SLJIT_SUCCESS; +} + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler, + sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, + sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { - sljit_s32 stack_size = 0; + sljit_s32 args_size, locals_offset; +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) sljit_s32 word_arg_count = 0; +#endif - arg_types >>= SLJIT_DEF_SHIFT; + CHECK_ERROR(); + CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); + set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); + arg_types >>= SLJIT_ARG_SHIFT; + args_size = 0; while (arg_types) { - switch (arg_types & SLJIT_DEF_MASK) { + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + args_size += SSIZE_OF(f64); + break; case SLJIT_ARG_TYPE_F32: - stack_size += sizeof(sljit_f32); + args_size += SSIZE_OF(f32); + break; + default: +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (word_arg_count >= 2) + args_size += SSIZE_OF(sw); + word_arg_count++; +#else + args_size += SSIZE_OF(sw); +#endif break; + } + arg_types >>= SLJIT_ARG_SHIFT; + } + + compiler->args_size = args_size; + + /* [esp+0] for saving temporaries and function calls. */ + locals_offset = 2 * SSIZE_OF(sw); + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if ((options & SLJIT_ENTER_CDECL) && scratches >= 3) + locals_offset = 4 * SSIZE_OF(sw); +#else + if (scratches >= 3) + locals_offset = 4 * SSIZE_OF(sw); +#endif + + compiler->scratches_offset = locals_offset; + + if (scratches > 3) + locals_offset += ((scratches > (3 + 6)) ? 6 : (scratches - 3)) * SSIZE_OF(sw); + + if (saveds > 3) + locals_offset += (saveds - 3) * SSIZE_OF(sw); + + compiler->locals_offset = locals_offset; + + saveds = (2 + (scratches > 9 ? (scratches - 9) : 0) + (saveds <= 3 ? saveds : 3)) * SSIZE_OF(sw); + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (!(options & SLJIT_ENTER_CDECL)) + saveds += args_size; +#endif + + compiler->local_size = ((locals_offset + local_size + saveds + 0xf) & ~0xf) - saveds; + return SLJIT_SUCCESS; +} + +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler) +{ + sljit_uw size; + sljit_u8 *inst; + + size = (sljit_uw)(1 + (compiler->scratches > 9 ? (compiler->scratches - 9) : 0) + + (compiler->saveds <= 3 ? compiler->saveds : 3)); + inst = (sljit_u8*)ensure_buf(compiler, 1 + size); + FAIL_IF(!inst); + + INC_SIZE(size); + + if (compiler->saveds > 0 || compiler->scratches > 11) + POP_REG(reg_map[SLJIT_S0]); + if (compiler->saveds > 1 || compiler->scratches > 10) + POP_REG(reg_map[SLJIT_S1]); + if (compiler->saveds > 2 || compiler->scratches > 9) + POP_REG(reg_map[SLJIT_S2]); + POP_REG(reg_map[TMP_REG1]); + + return SLJIT_SUCCESS; +} + +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) +{ + sljit_uw size; + sljit_u8 *inst; + + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); + + SLJIT_ASSERT(compiler->args_size >= 0); + SLJIT_ASSERT(compiler->local_size > 0); + + BINARY_IMM32(ADD, compiler->local_size, SLJIT_SP, 0); + + FAIL_IF(emit_stack_frame_release(compiler)); + + size = 1; +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (compiler->args_size > 0 && !(compiler->options & SLJIT_ENTER_CDECL)) + size = 3; +#endif + inst = (sljit_u8*)ensure_buf(compiler, 1 + size); + FAIL_IF(!inst); + + INC_SIZE(size); + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (compiler->args_size > 0 && !(compiler->options & SLJIT_ENTER_CDECL)) { + RET_I16(U8(compiler->args_size)); + return SLJIT_SUCCESS; + } +#endif + + RET(); + return SLJIT_SUCCESS; +} + +/* --------------------------------------------------------------------- */ +/* Call / return instructions */ +/* --------------------------------------------------------------------- */ + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + +static sljit_sw c_fast_call_get_stack_size(sljit_s32 arg_types, sljit_s32 *word_arg_count_ptr) +{ + sljit_sw stack_size = 0; + sljit_s32 word_arg_count = 0; + + arg_types >>= SLJIT_ARG_SHIFT; + + while (arg_types) { + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: - stack_size += sizeof(sljit_f64); + stack_size += SSIZE_OF(f64); + break; + case SLJIT_ARG_TYPE_F32: + stack_size += SSIZE_OF(f32); break; default: word_arg_count++; if (word_arg_count > 2) - stack_size += sizeof(sljit_sw); + stack_size += SSIZE_OF(sw); break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } if (word_arg_count_ptr) @@ -548,12 +665,12 @@ static sljit_s32 c_fast_call_get_stack_size(sljit_s32 arg_types, sljit_s32 *word } static sljit_s32 c_fast_call_with_args(struct sljit_compiler *compiler, - sljit_s32 arg_types, sljit_s32 stack_size, sljit_s32 word_arg_count, sljit_s32 swap_args) + sljit_s32 arg_types, sljit_sw stack_size, sljit_s32 word_arg_count, sljit_s32 swap_args) { sljit_u8 *inst; sljit_s32 float_arg_count; - if (stack_size == sizeof(sljit_sw) && word_arg_count == 3) { + if (stack_size == SSIZE_OF(sw) && word_arg_count == 3) { inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); FAIL_IF(!inst); INC_SIZE(1); @@ -561,41 +678,40 @@ static sljit_s32 c_fast_call_with_args(struct sljit_compiler *compiler, } else if (stack_size > 0) { if (word_arg_count >= 4) - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), compiler->saveds_offset - sizeof(sljit_sw)); + EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), compiler->scratches_offset); - FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, stack_size)); + BINARY_IMM32(SUB, stack_size, SLJIT_SP, 0); stack_size = 0; - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; word_arg_count = 0; float_arg_count = 0; while (arg_types) { - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - float_arg_count++; - FAIL_IF(emit_sse2_store(compiler, 1, SLJIT_MEM1(SLJIT_SP), stack_size, float_arg_count)); - stack_size += sizeof(sljit_f32); - break; + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: float_arg_count++; FAIL_IF(emit_sse2_store(compiler, 0, SLJIT_MEM1(SLJIT_SP), stack_size, float_arg_count)); - stack_size += sizeof(sljit_f64); + stack_size += SSIZE_OF(f64); + break; + case SLJIT_ARG_TYPE_F32: + float_arg_count++; + FAIL_IF(emit_sse2_store(compiler, 1, SLJIT_MEM1(SLJIT_SP), stack_size, float_arg_count)); + stack_size += SSIZE_OF(f32); break; default: word_arg_count++; if (word_arg_count == 3) { EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), stack_size, SLJIT_R2, 0); - stack_size += sizeof(sljit_sw); + stack_size += SSIZE_OF(sw); } else if (word_arg_count == 4) { EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), stack_size, TMP_REG1, 0); - stack_size += sizeof(sljit_sw); + stack_size += SSIZE_OF(sw); } break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } } @@ -605,7 +721,7 @@ static sljit_s32 c_fast_call_with_args(struct sljit_compiler *compiler, FAIL_IF(!inst); INC_SIZE(1); - *inst++ = XCHG_EAX_r | reg_map[SLJIT_R2]; + *inst++ = U8(XCHG_EAX_r | reg_map[SLJIT_R2]); } else { inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); @@ -613,7 +729,7 @@ static sljit_s32 c_fast_call_with_args(struct sljit_compiler *compiler, INC_SIZE(2); *inst++ = MOV_r_rm; - *inst++ = MOD_REG | (reg_map[SLJIT_R2] << 3) | reg_map[SLJIT_R0]; + *inst++ = U8(MOD_REG | (reg_map[SLJIT_R2] << 3) | reg_map[SLJIT_R0]); } } @@ -624,77 +740,73 @@ static sljit_s32 c_fast_call_with_args(struct sljit_compiler *compiler, static sljit_s32 cdecl_call_get_stack_size(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *word_arg_count_ptr) { - sljit_s32 stack_size = 0; + sljit_sw stack_size = 0; sljit_s32 word_arg_count = 0; - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - stack_size += sizeof(sljit_f32); - break; + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: - stack_size += sizeof(sljit_f64); + stack_size += SSIZE_OF(f64); + break; + case SLJIT_ARG_TYPE_F32: + stack_size += SSIZE_OF(f32); break; default: word_arg_count++; - stack_size += sizeof(sljit_sw); + stack_size += SSIZE_OF(sw); break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } if (word_arg_count_ptr) *word_arg_count_ptr = word_arg_count; - if (stack_size <= compiler->stack_tmp_size) + if (stack_size <= compiler->scratches_offset) return 0; -#if defined(__APPLE__) - return ((stack_size - compiler->stack_tmp_size + 15) & ~15); -#else - return stack_size - compiler->stack_tmp_size; -#endif + return ((stack_size - compiler->scratches_offset + 0xf) & ~0xf); } static sljit_s32 cdecl_call_with_args(struct sljit_compiler *compiler, - sljit_s32 arg_types, sljit_s32 stack_size, sljit_s32 word_arg_count) + sljit_s32 arg_types, sljit_sw stack_size, sljit_s32 word_arg_count) { sljit_s32 float_arg_count = 0; + sljit_u8 *inst; if (word_arg_count >= 4) - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), compiler->saveds_offset - sizeof(sljit_sw)); + EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), compiler->scratches_offset); if (stack_size > 0) - FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, stack_size)); + BINARY_IMM32(SUB, stack_size, SLJIT_SP, 0); stack_size = 0; word_arg_count = 0; - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: - float_arg_count++; - FAIL_IF(emit_sse2_store(compiler, 1, SLJIT_MEM1(SLJIT_SP), stack_size, float_arg_count)); - stack_size += sizeof(sljit_f32); - break; + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: float_arg_count++; FAIL_IF(emit_sse2_store(compiler, 0, SLJIT_MEM1(SLJIT_SP), stack_size, float_arg_count)); - stack_size += sizeof(sljit_f64); + stack_size += SSIZE_OF(f64); + break; + case SLJIT_ARG_TYPE_F32: + float_arg_count++; + FAIL_IF(emit_sse2_store(compiler, 1, SLJIT_MEM1(SLJIT_SP), stack_size, float_arg_count)); + stack_size += SSIZE_OF(f32); break; default: word_arg_count++; EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), stack_size, (word_arg_count >= 4) ? TMP_REG1 : word_arg_count, 0); - stack_size += sizeof(sljit_sw); + stack_size += SSIZE_OF(sw); break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } return SLJIT_SUCCESS; @@ -707,13 +819,12 @@ static sljit_s32 post_call_with_args(struct sljit_compiler *compiler, sljit_s32 single; if (stack_size > 0) - FAIL_IF(emit_cum_binary(compiler, BINARY_OPCODE(ADD), - SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, stack_size)); + BINARY_IMM32(ADD, stack_size, SLJIT_SP, 0); - if ((arg_types & SLJIT_DEF_MASK) < SLJIT_ARG_TYPE_F32) + if ((arg_types & SLJIT_ARG_MASK) < SLJIT_ARG_TYPE_F64) return SLJIT_SUCCESS; - single = ((arg_types & SLJIT_DEF_MASK) == SLJIT_ARG_TYPE_F32); + single = ((arg_types & SLJIT_ARG_MASK) == SLJIT_ARG_TYPE_F32); inst = (sljit_u8*)ensure_buf(compiler, 1 + 3); FAIL_IF(!inst); @@ -725,16 +836,399 @@ static sljit_s32 post_call_with_args(struct sljit_compiler *compiler, return emit_sse2_load(compiler, single, SLJIT_FR0, SLJIT_MEM1(SLJIT_SP), 0); } +static sljit_s32 tail_call_with_args(struct sljit_compiler *compiler, + sljit_s32 *extra_space, sljit_s32 arg_types, + sljit_s32 src, sljit_sw srcw) +{ + sljit_sw args_size, prev_args_size, saved_regs_size; + sljit_sw types, word_arg_count, float_arg_count; + sljit_sw stack_size, prev_stack_size, min_size, offset; + sljit_sw word_arg4_offset; + sljit_u8 r2_offset = 0; +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + sljit_u8 fast_call = (*extra_space & 0xff) == SLJIT_CALL; +#endif + sljit_u8* inst; + + ADJUST_LOCAL_OFFSET(src, srcw); + CHECK_EXTRA_REGS(src, srcw, (void)0); + + saved_regs_size = (1 + (compiler->scratches > 9 ? (compiler->scratches - 9) : 0) + + (compiler->saveds <= 3 ? compiler->saveds : 3)) * SSIZE_OF(sw); + + word_arg_count = 0; + float_arg_count = 0; + arg_types >>= SLJIT_ARG_SHIFT; + types = 0; + args_size = 0; + + while (arg_types != 0) { + types = (types << SLJIT_ARG_SHIFT) | (arg_types & SLJIT_ARG_MASK); + + switch (arg_types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + args_size += SSIZE_OF(f64); + float_arg_count++; + break; + case SLJIT_ARG_TYPE_F32: + args_size += SSIZE_OF(f32); + float_arg_count++; + break; + default: + word_arg_count++; +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (!fast_call || word_arg_count > 2) + args_size += SSIZE_OF(sw); +#else + args_size += SSIZE_OF(sw); +#endif + break; + } + arg_types >>= SLJIT_ARG_SHIFT; + } + + if (args_size <= compiler->args_size +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + && (!(compiler->options & SLJIT_ENTER_CDECL) || args_size == 0 || !fast_call) +#endif /* SLJIT_X86_32_FASTCALL */ + && 1) { +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + *extra_space = fast_call ? 0 : args_size; + prev_args_size = compiler->args_size; + stack_size = prev_args_size + SSIZE_OF(sw) + saved_regs_size; +#else /* !SLJIT_X86_32_FASTCALL */ + *extra_space = 0; + stack_size = args_size + SSIZE_OF(sw) + saved_regs_size; +#endif /* SLJIT_X86_32_FASTCALL */ + + offset = stack_size + compiler->local_size; + + if (!(src & SLJIT_IMM) && src != SLJIT_R0) { + if (word_arg_count >= 1) { + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), 0, SLJIT_R0, 0); + r2_offset = sizeof(sljit_sw); + } + EMIT_MOV(compiler, SLJIT_R0, 0, src, srcw); + } + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (!(compiler->options & SLJIT_ENTER_CDECL)) { + if (!fast_call) + offset -= SSIZE_OF(sw); + + if (word_arg_count >= 3) { + word_arg4_offset = SSIZE_OF(sw); + + if (word_arg_count + float_arg_count >= 4) { + word_arg4_offset = SSIZE_OF(sw) + SSIZE_OF(sw); + if ((types & SLJIT_ARG_MASK) == SLJIT_ARG_TYPE_F64) + word_arg4_offset = SSIZE_OF(sw) + SSIZE_OF(f64); + } + + /* In cdecl mode, at least one more word value must + * be present on the stack before the return address. */ + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset - word_arg4_offset, SLJIT_R2, 0); + } + + if (fast_call) { + if (args_size < prev_args_size) { + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), offset - prev_args_size - SSIZE_OF(sw)); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset - args_size - SSIZE_OF(sw), SLJIT_R2, 0); + } + } else if (prev_args_size > 0) { + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), offset - prev_args_size); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R2, 0); + } + } +#endif /* SLJIT_X86_32_FASTCALL */ + + while (types != 0) { + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + offset -= SSIZE_OF(f64); + FAIL_IF(emit_sse2_store(compiler, 0, SLJIT_MEM1(SLJIT_SP), offset, float_arg_count)); + float_arg_count--; + break; + case SLJIT_ARG_TYPE_F32: + offset -= SSIZE_OF(f32); + FAIL_IF(emit_sse2_store(compiler, 0, SLJIT_MEM1(SLJIT_SP), offset, float_arg_count)); + float_arg_count--; + break; + default: + switch (word_arg_count) { + case 1: +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (fast_call) { + EMIT_MOV(compiler, SLJIT_R2, 0, r2_offset != 0 ? SLJIT_MEM1(SLJIT_SP) : SLJIT_R0, 0); + break; + } +#endif + offset -= SSIZE_OF(sw); + if (r2_offset != 0) { + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), 0); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R2, 0); + } else + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R0, 0); + break; + case 2: +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (fast_call) + break; +#endif + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R1, 0); + break; + case 3: + offset -= SSIZE_OF(sw); + break; + case 4: + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), compiler->scratches_offset); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R2, 0); + break; + } + word_arg_count--; + break; + } + types >>= SLJIT_ARG_SHIFT; + } + + BINARY_IMM32(ADD, compiler->local_size, SLJIT_SP, 0); + FAIL_IF(emit_stack_frame_release(compiler)); + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (args_size < prev_args_size) + BINARY_IMM32(ADD, prev_args_size - args_size, SLJIT_SP, 0); +#endif + + return SLJIT_SUCCESS; + } + + stack_size = args_size + SSIZE_OF(sw); + + if (word_arg_count >= 1 && !(src & SLJIT_IMM) && src != SLJIT_R0) { + r2_offset = SSIZE_OF(sw); + stack_size += SSIZE_OF(sw); + } + + if (word_arg_count >= 3) + stack_size += SSIZE_OF(sw); + + prev_args_size = 0; +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (!(compiler->options & SLJIT_ENTER_CDECL)) + prev_args_size = compiler->args_size; +#endif + + prev_stack_size = prev_args_size + SSIZE_OF(sw) + saved_regs_size; + min_size = prev_stack_size + compiler->local_size; + + word_arg4_offset = compiler->scratches_offset; + + if (stack_size > min_size) { + BINARY_IMM32(SUB, stack_size - min_size, SLJIT_SP, 0); + if (src == SLJIT_MEM1(SLJIT_SP)) + srcw += stack_size - min_size; + word_arg4_offset += stack_size - min_size; + } + else + stack_size = min_size; + + if (word_arg_count >= 3) { + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), r2_offset, SLJIT_R2, 0); + + if (word_arg_count >= 4) + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), word_arg4_offset); + } + + if (!(src & SLJIT_IMM) && src != SLJIT_R0) { + if (word_arg_count >= 1) { + SLJIT_ASSERT(r2_offset == sizeof(sljit_sw)); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), 0, SLJIT_R0, 0); + } + EMIT_MOV(compiler, SLJIT_R0, 0, src, srcw); + } + + /* Restore saved registers. */ + offset = stack_size - prev_args_size - 2 * SSIZE_OF(sw); + EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), offset); + + if (compiler->saveds > 2 || compiler->scratches > 9) { + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_S2, 0, SLJIT_MEM1(SLJIT_SP), offset); + } + if (compiler->saveds > 1 || compiler->scratches > 10) { + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_S1, 0, SLJIT_MEM1(SLJIT_SP), offset); + } + if (compiler->saveds > 0 || compiler->scratches > 11) { + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_S0, 0, SLJIT_MEM1(SLJIT_SP), offset); + } + + /* Copy fourth argument and return address. */ +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (fast_call) { + offset = stack_size; + *extra_space = 0; + + if (word_arg_count >= 4 && prev_args_size == 0) { + offset -= SSIZE_OF(sw); + inst = emit_x86_instruction(compiler, 1, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), offset); + FAIL_IF(!inst); + *inst = XCHG_r_rm; + + SLJIT_ASSERT(args_size != prev_args_size); + } else { + if (word_arg_count >= 4) { + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R2, 0); + } + + if (args_size != prev_args_size) + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), stack_size - prev_args_size - SSIZE_OF(sw)); + } + + if (args_size != prev_args_size) + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), stack_size - args_size - SSIZE_OF(sw), SLJIT_R2, 0); + } else { +#endif /* SLJIT_X86_32_FASTCALL */ + offset = stack_size - SSIZE_OF(sw); + *extra_space = args_size; + + if (word_arg_count >= 4 && prev_args_size == SSIZE_OF(sw)) { + offset -= SSIZE_OF(sw); + inst = emit_x86_instruction(compiler, 1, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), offset); + FAIL_IF(!inst); + *inst = XCHG_r_rm; + + SLJIT_ASSERT(prev_args_size > 0); + } else { + if (word_arg_count >= 4) { + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R2, 0); + } + + if (prev_args_size > 0) + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), stack_size - prev_args_size - SSIZE_OF(sw)); + } + + /* Copy return address. */ + if (prev_args_size > 0) + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), stack_size - SSIZE_OF(sw), SLJIT_R2, 0); +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + } +#endif /* SLJIT_X86_32_FASTCALL */ + + while (types != 0) { + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: + offset -= SSIZE_OF(f64); + FAIL_IF(emit_sse2_store(compiler, 0, SLJIT_MEM1(SLJIT_SP), offset, float_arg_count)); + float_arg_count--; + break; + case SLJIT_ARG_TYPE_F32: + offset -= SSIZE_OF(f32); + FAIL_IF(emit_sse2_store(compiler, 0, SLJIT_MEM1(SLJIT_SP), offset, float_arg_count)); + float_arg_count--; + break; + default: + switch (word_arg_count) { + case 1: +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (fast_call) { + EMIT_MOV(compiler, SLJIT_R2, 0, r2_offset != 0 ? SLJIT_MEM1(SLJIT_SP) : SLJIT_R0, 0); + break; + } +#endif + offset -= SSIZE_OF(sw); + if (r2_offset != 0) { + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), 0); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R2, 0); + } else + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R0, 0); + break; + case 2: +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + if (fast_call) + break; +#endif + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R1, 0); + break; + case 3: + offset -= SSIZE_OF(sw); + EMIT_MOV(compiler, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), r2_offset); + EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), offset, SLJIT_R2, 0); + break; + } + word_arg_count--; + break; + } + types >>= SLJIT_ARG_SHIFT; + } + +#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) + /* Skip return address. */ + if (fast_call) + offset -= SSIZE_OF(sw); +#endif + + SLJIT_ASSERT(offset >= 0); + + if (offset == 0) + return SLJIT_SUCCESS; + + BINARY_IMM32(ADD, offset, SLJIT_SP, 0); + return SLJIT_SUCCESS; +} + +static sljit_s32 emit_tail_call_end(struct sljit_compiler *compiler, sljit_s32 extra_space) +{ + /* Called when stack consumption cannot be reduced to 0. */ + sljit_u8 *inst; + + BINARY_IMM32(ADD, extra_space, SLJIT_SP, 0); + + inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); + FAIL_IF(!inst); + INC_SIZE(1); + RET(); + + return SLJIT_SUCCESS; +} + SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 arg_types) { struct sljit_jump *jump; - sljit_s32 stack_size = 0; + sljit_sw stack_size = 0; sljit_s32 word_arg_count; CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_call(compiler, type, arg_types)); + if (type & SLJIT_CALL_RETURN) { + stack_size = type; + PTR_FAIL_IF(tail_call_with_args(compiler, &stack_size, arg_types, SLJIT_IMM, 0)); + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + + if (stack_size == 0) { + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); + return sljit_emit_jump(compiler, type); + } + + jump = sljit_emit_jump(compiler, type); + PTR_FAIL_IF(jump == NULL); + + PTR_FAIL_IF(emit_tail_call_end(compiler, stack_size)); + return jump; + } + #if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) if ((type & 0xff) == SLJIT_CALL) { stack_size = c_fast_call_get_stack_size(arg_types, &word_arg_count); @@ -772,7 +1266,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi sljit_s32 arg_types, sljit_s32 src, sljit_sw srcw) { - sljit_s32 stack_size = 0; + sljit_sw stack_size = 0; sljit_s32 word_arg_count; #if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) sljit_s32 swap_args; @@ -781,6 +1275,27 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi CHECK_ERROR(); CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); + if (type & SLJIT_CALL_RETURN) { + stack_size = type; + FAIL_IF(tail_call_with_args(compiler, &stack_size, arg_types, src, srcw)); + + if (!(src & SLJIT_IMM)) { + src = SLJIT_R0; + srcw = 0; + } + +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + + if (stack_size == 0) + return sljit_emit_ijump(compiler, SLJIT_JUMP, src, srcw); + + FAIL_IF(sljit_emit_ijump(compiler, type, src, srcw)); + return emit_tail_call_end(compiler, stack_size); + } + #if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) SLJIT_ASSERT(reg_map[SLJIT_R0] == 0 && reg_map[SLJIT_R2] == 1 && SLJIT_R0 == 1 && SLJIT_R2 == 3); @@ -800,7 +1315,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi FAIL_IF(c_fast_call_with_args(compiler, arg_types, stack_size, word_arg_count, swap_args)); - compiler->saveds_offset += stack_size; + compiler->scratches_offset += stack_size; compiler->locals_offset += stack_size; #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ @@ -809,7 +1324,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi #endif FAIL_IF(sljit_emit_ijump(compiler, type, src, srcw)); - compiler->saveds_offset -= stack_size; + compiler->scratches_offset -= stack_size; compiler->locals_offset -= stack_size; return post_call_with_args(compiler, arg_types, 0); @@ -819,7 +1334,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi stack_size = cdecl_call_get_stack_size(compiler, arg_types, &word_arg_count); FAIL_IF(cdecl_call_with_args(compiler, arg_types, stack_size, word_arg_count)); - compiler->saveds_offset += stack_size; + compiler->scratches_offset += stack_size; compiler->locals_offset += stack_size; #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ @@ -828,7 +1343,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi #endif FAIL_IF(sljit_emit_ijump(compiler, type, src, srcw)); - compiler->saveds_offset -= stack_size; + compiler->scratches_offset -= stack_size; compiler->locals_offset -= stack_size; return post_call_with_args(compiler, arg_types, stack_size); @@ -844,10 +1359,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * CHECK_EXTRA_REGS(dst, dstw, (void)0); - /* For UNUSED dst. Uncommon, but possible. */ - if (dst == SLJIT_UNUSED) - dst = TMP_REG1; - if (FAST_IS_REG(dst)) { /* Unused dest is possible here. */ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); @@ -895,34 +1406,18 @@ static sljit_s32 emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src static sljit_s32 skip_frames_before_return(struct sljit_compiler *compiler) { - sljit_s32 size, saved_size; - sljit_s32 has_f64_aligment; + sljit_sw size; /* Don't adjust shadow stack if it isn't enabled. */ - if (!cpu_has_shadow_stack ()) + if (!cpu_has_shadow_stack()) return SLJIT_SUCCESS; - SLJIT_ASSERT(compiler->args >= 0); + SLJIT_ASSERT(compiler->args_size >= 0); SLJIT_ASSERT(compiler->local_size > 0); -#if !defined(__APPLE__) - has_f64_aligment = compiler->options & SLJIT_F64_ALIGNMENT; -#else - has_f64_aligment = 0; -#endif - size = compiler->local_size; - saved_size = (1 + (compiler->scratches > 9 ? (compiler->scratches - 9) : 0) + (compiler->saveds <= 3 ? compiler->saveds : 3)) * sizeof(sljit_uw); - if (has_f64_aligment) { - /* mov TMP_REG1, [esp + local_size]. */ - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), size); - /* mov TMP_REG1, [TMP_REG1+ saved_size]. */ - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(TMP_REG1), saved_size); - /* Move return address to [esp]. */ - EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), 0, TMP_REG1, 0); - size = 0; - } else - size += saved_size; - - return adjust_shadow_stack(compiler, SLJIT_UNUSED, 0, SLJIT_SP, size); + size += (1 + (compiler->scratches > 9 ? (compiler->scratches - 9) : 0) + + (compiler->saveds <= 3 ? compiler->saveds : 3)) * SSIZE_OF(sw); + + return adjust_shadow_stack(compiler, SLJIT_MEM1(SLJIT_SP), size); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c index e85b56a61a..f37df6e1bf 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c @@ -26,6 +26,10 @@ /* x86 64-bit arch dependent functions. */ +/* --------------------------------------------------------------------- */ +/* Operators */ +/* --------------------------------------------------------------------- */ + static sljit_s32 emit_load_imm64(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm) { sljit_u8 *inst; @@ -34,14 +38,246 @@ static sljit_s32 emit_load_imm64(struct sljit_compiler *compiler, sljit_s32 reg, FAIL_IF(!inst); INC_SIZE(2 + sizeof(sljit_sw)); *inst++ = REX_W | ((reg_map[reg] <= 7) ? 0 : REX_B); - *inst++ = MOV_r_i32 + (reg_map[reg] & 0x7); + *inst++ = U8(MOV_r_i32 | (reg_map[reg] & 0x7)); sljit_unaligned_store_sw(inst, imm); return SLJIT_SUCCESS; } +static sljit_s32 emit_do_imm32(struct sljit_compiler *compiler, sljit_u8 rex, sljit_u8 opcode, sljit_sw imm) +{ + sljit_u8 *inst; + sljit_uw length = (rex ? 2 : 1) + sizeof(sljit_s32); + + inst = (sljit_u8*)ensure_buf(compiler, 1 + length); + FAIL_IF(!inst); + INC_SIZE(length); + if (rex) + *inst++ = rex; + *inst++ = opcode; + sljit_unaligned_store_s32(inst, (sljit_s32)imm); + return SLJIT_SUCCESS; +} + +static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_uw size, + /* The register or immediate operand. */ + sljit_s32 a, sljit_sw imma, + /* The general operand (not immediate). */ + sljit_s32 b, sljit_sw immb) +{ + sljit_u8 *inst; + sljit_u8 *buf_ptr; + sljit_u8 rex = 0; + sljit_u8 reg_lmap_b; + sljit_uw flags = size; + sljit_uw inst_size; + + /* The immediate operand must be 32 bit. */ + SLJIT_ASSERT(!(a & SLJIT_IMM) || compiler->mode32 || IS_HALFWORD(imma)); + /* Both cannot be switched on. */ + SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS)); + /* Size flags not allowed for typed instructions. */ + SLJIT_ASSERT(!(flags & (EX86_BIN_INS | EX86_SHIFT_INS)) || (flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) == 0); + /* Both size flags cannot be switched on. */ + SLJIT_ASSERT((flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) != (EX86_BYTE_ARG | EX86_HALF_ARG)); + /* SSE2 and immediate is not possible. */ + SLJIT_ASSERT(!(a & SLJIT_IMM) || !(flags & EX86_SSE2)); + SLJIT_ASSERT((flags & (EX86_PREF_F2 | EX86_PREF_F3)) != (EX86_PREF_F2 | EX86_PREF_F3) + && (flags & (EX86_PREF_F2 | EX86_PREF_66)) != (EX86_PREF_F2 | EX86_PREF_66) + && (flags & (EX86_PREF_F3 | EX86_PREF_66)) != (EX86_PREF_F3 | EX86_PREF_66)); + + size &= 0xf; + inst_size = size; + + if (!compiler->mode32 && !(flags & EX86_NO_REXW)) + rex |= REX_W; + else if (flags & EX86_REX) + rex |= REX; + + if (flags & (EX86_PREF_F2 | EX86_PREF_F3)) + inst_size++; + if (flags & EX86_PREF_66) + inst_size++; + + /* Calculate size of b. */ + inst_size += 1; /* mod r/m byte. */ + if (b & SLJIT_MEM) { + if (!(b & OFFS_REG_MASK)) { + if (NOT_HALFWORD(immb)) { + PTR_FAIL_IF(emit_load_imm64(compiler, TMP_REG2, immb)); + immb = 0; + if (b & REG_MASK) + b |= TO_OFFS_REG(TMP_REG2); + else + b |= TMP_REG2; + } + else if (reg_lmap[b & REG_MASK] == 4) + b |= TO_OFFS_REG(SLJIT_SP); + } + + if (!(b & REG_MASK)) + inst_size += 1 + sizeof(sljit_s32); /* SIB byte required to avoid RIP based addressing. */ + else { + if (reg_map[b & REG_MASK] >= 8) + rex |= REX_B; + + if (immb != 0 && (!(b & OFFS_REG_MASK) || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP))) { + /* Immediate operand. */ + if (immb <= 127 && immb >= -128) + inst_size += sizeof(sljit_s8); + else + inst_size += sizeof(sljit_s32); + } + else if (reg_lmap[b & REG_MASK] == 5) + inst_size += sizeof(sljit_s8); + + if (b & OFFS_REG_MASK) { + inst_size += 1; /* SIB byte. */ + if (reg_map[OFFS_REG(b)] >= 8) + rex |= REX_X; + } + } + } + else if (!(flags & EX86_SSE2_OP2)) { + if (reg_map[b] >= 8) + rex |= REX_B; + } + else if (freg_map[b] >= 8) + rex |= REX_B; + + if (a & SLJIT_IMM) { + if (flags & EX86_BIN_INS) { + if (imma <= 127 && imma >= -128) { + inst_size += 1; + flags |= EX86_BYTE_ARG; + } else + inst_size += 4; + } + else if (flags & EX86_SHIFT_INS) { + imma &= compiler->mode32 ? 0x1f : 0x3f; + if (imma != 1) { + inst_size ++; + flags |= EX86_BYTE_ARG; + } + } else if (flags & EX86_BYTE_ARG) + inst_size++; + else if (flags & EX86_HALF_ARG) + inst_size += sizeof(short); + else + inst_size += sizeof(sljit_s32); + } + else { + SLJIT_ASSERT(!(flags & EX86_SHIFT_INS) || a == SLJIT_PREF_SHIFT_REG); + /* reg_map[SLJIT_PREF_SHIFT_REG] is less than 8. */ + if (!(flags & EX86_SSE2_OP1)) { + if (reg_map[a] >= 8) + rex |= REX_R; + } + else if (freg_map[a] >= 8) + rex |= REX_R; + } + + if (rex) + inst_size++; + + inst = (sljit_u8*)ensure_buf(compiler, 1 + inst_size); + PTR_FAIL_IF(!inst); + + /* Encoding the byte. */ + INC_SIZE(inst_size); + if (flags & EX86_PREF_F2) + *inst++ = 0xf2; + if (flags & EX86_PREF_F3) + *inst++ = 0xf3; + if (flags & EX86_PREF_66) + *inst++ = 0x66; + if (rex) + *inst++ = rex; + buf_ptr = inst + size; + + /* Encode mod/rm byte. */ + if (!(flags & EX86_SHIFT_INS)) { + if ((flags & EX86_BIN_INS) && (a & SLJIT_IMM)) + *inst = (flags & EX86_BYTE_ARG) ? GROUP_BINARY_83 : GROUP_BINARY_81; + + if (a & SLJIT_IMM) + *buf_ptr = 0; + else if (!(flags & EX86_SSE2_OP1)) + *buf_ptr = U8(reg_lmap[a] << 3); + else + *buf_ptr = U8(freg_lmap[a] << 3); + } + else { + if (a & SLJIT_IMM) { + if (imma == 1) + *inst = GROUP_SHIFT_1; + else + *inst = GROUP_SHIFT_N; + } else + *inst = GROUP_SHIFT_CL; + *buf_ptr = 0; + } + + if (!(b & SLJIT_MEM)) { + *buf_ptr = U8(*buf_ptr | MOD_REG | (!(flags & EX86_SSE2_OP2) ? reg_lmap[b] : freg_lmap[b])); + buf_ptr++; + } else if (b & REG_MASK) { + reg_lmap_b = reg_lmap[b & REG_MASK]; + + if (!(b & OFFS_REG_MASK) || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP) || reg_lmap_b == 5) { + if (immb != 0 || reg_lmap_b == 5) { + if (immb <= 127 && immb >= -128) + *buf_ptr |= 0x40; + else + *buf_ptr |= 0x80; + } + + if (!(b & OFFS_REG_MASK)) + *buf_ptr++ |= reg_lmap_b; + else { + *buf_ptr++ |= 0x04; + *buf_ptr++ = U8(reg_lmap_b | (reg_lmap[OFFS_REG(b)] << 3)); + } + + if (immb != 0 || reg_lmap_b == 5) { + if (immb <= 127 && immb >= -128) + *buf_ptr++ = U8(immb); /* 8 bit displacement. */ + else { + sljit_unaligned_store_s32(buf_ptr, (sljit_s32)immb); /* 32 bit displacement. */ + buf_ptr += sizeof(sljit_s32); + } + } + } + else { + *buf_ptr++ |= 0x04; + *buf_ptr++ = U8(reg_lmap_b | (reg_lmap[OFFS_REG(b)] << 3) | (immb << 6)); + } + } + else { + *buf_ptr++ |= 0x04; + *buf_ptr++ = 0x25; + sljit_unaligned_store_s32(buf_ptr, (sljit_s32)immb); /* 32 bit displacement. */ + buf_ptr += sizeof(sljit_s32); + } + + if (a & SLJIT_IMM) { + if (flags & EX86_BYTE_ARG) + *buf_ptr = U8(imma); + else if (flags & EX86_HALF_ARG) + sljit_unaligned_store_s16(buf_ptr, (sljit_s16)imma); + else if (!(flags & EX86_SHIFT_INS)) + sljit_unaligned_store_s32(buf_ptr, (sljit_s32)imma); + } + + return !(flags & EX86_SHIFT_INS) ? inst : (inst + 1); +} + +/* --------------------------------------------------------------------- */ +/* Enter / return */ +/* --------------------------------------------------------------------- */ + static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr) { - sljit_s32 type = jump->flags >> TYPE_SHIFT; + sljit_uw type = jump->flags >> TYPE_SHIFT; int short_addr = !(jump->flags & SLJIT_REWRITABLE_JUMP) && !(jump->flags & JUMP_LABEL) && (jump->u.target <= 0xffffffff); @@ -50,7 +286,7 @@ static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ if (type < SLJIT_JUMP) { /* Invert type. */ - *code_ptr++ = get_jump_code(type ^ 0x1) - 0x10; + *code_ptr++ = U8(get_jump_code(type ^ 0x1) - 0x10); *code_ptr++ = short_addr ? (6 + 3) : (10 + 3); } @@ -63,13 +299,13 @@ static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ else if (short_addr) sljit_unaligned_store_s32(code_ptr, (sljit_s32)jump->u.target); else - sljit_unaligned_store_sw(code_ptr, jump->u.target); + sljit_unaligned_store_sw(code_ptr, (sljit_sw)jump->u.target); code_ptr += short_addr ? sizeof(sljit_s32) : sizeof(sljit_sw); *code_ptr++ = REX_B; *code_ptr++ = GROUP_FF; - *code_ptr++ = MOD_REG | (type >= SLJIT_FAST_CALL ? CALL_rm : JMP_rm) | reg_lmap[TMP_REG2]; + *code_ptr++ = U8(MOD_REG | (type >= SLJIT_FAST_CALL ? CALL_rm : JMP_rm) | reg_lmap[TMP_REG2]); return code_ptr; } @@ -90,7 +326,7 @@ static sljit_u8* generate_put_label_code(struct sljit_put_label *put_label, slji SLJIT_ASSERT((code_ptr[1] & 0xf8) == MOV_r_i32); if ((code_ptr[0] & 0x07) != 0) { - code_ptr[0] = (sljit_u8)(code_ptr[0] & ~0x08); + code_ptr[0] = U8(code_ptr[0] & ~0x08); code_ptr += 2 + sizeof(sljit_s32); } else { @@ -114,9 +350,9 @@ static sljit_u8* generate_put_label_code(struct sljit_put_label *put_label, slji SLJIT_ASSERT(code_ptr[1] == MOV_rm_r); - code_ptr[0] = (sljit_u8)(code_ptr[0] & ~0x4); + code_ptr[0] = U8(code_ptr[0] & ~0x4); code_ptr[1] = MOV_rm_i32; - code_ptr[2] = (sljit_u8)(code_ptr[2] & ~(0x7 << 3)); + code_ptr[2] = U8(code_ptr[2] & ~(0x7 << 3)); code_ptr = (sljit_u8*)(put_label->addr - (2 + sizeof(sljit_uw)) + sizeof(sljit_s32)); put_label->addr = (sljit_uw)code_ptr; @@ -128,7 +364,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { - sljit_s32 args, i, tmp, size, saved_register_size; + sljit_uw size; + sljit_s32 word_arg_count = 0; + sljit_s32 saved_arg_count = 0; + sljit_s32 saved_regs_size, tmp, i; +#ifdef _WIN64 + sljit_s32 saved_float_regs_size; + sljit_s32 saved_float_regs_offset = 0; + sljit_s32 float_arg_count = 0; +#endif /* _WIN64 */ sljit_u8 *inst; CHECK_ERROR(); @@ -140,19 +384,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi compiler->mode32 = 0; -#ifdef _WIN64 - /* Two/four register slots for parameters plus space for xmm6 register if needed. */ - if (fscratches >= 6 || fsaveds >= 1) - compiler->locals_offset = 6 * sizeof(sljit_sw); - else - compiler->locals_offset = ((scratches > 2) ? 4 : 2) * sizeof(sljit_sw); -#endif - /* Including the return address saved by the call instruction. */ - saved_register_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); + saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); - tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG; - for (i = SLJIT_S0; i >= tmp; i--) { + tmp = SLJIT_S0 - saveds; + for (i = SLJIT_S0; i > tmp; i--) { size = reg_map[i] >= 8 ? 2 : 1; inst = (sljit_u8*)ensure_buf(compiler, 1 + size); FAIL_IF(!inst); @@ -172,55 +408,75 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi PUSH_REG(reg_lmap[i]); } - args = get_arg_count(arg_types); +#ifdef _WIN64 + local_size += SLJIT_LOCALS_OFFSET; + saved_float_regs_size = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, 16); - if (args > 0) { - size = args * 3; - inst = (sljit_u8*)ensure_buf(compiler, 1 + size); - FAIL_IF(!inst); + if (saved_float_regs_size > 0) { + saved_float_regs_offset = ((local_size + 0xf) & ~0xf); + local_size = saved_float_regs_offset + saved_float_regs_size; + } +#else /* !_WIN64 */ + SLJIT_ASSERT(SLJIT_LOCALS_OFFSET == 0); +#endif /* _WIN64 */ - INC_SIZE(size); + arg_types >>= SLJIT_ARG_SHIFT; + while (arg_types > 0) { + if ((arg_types & SLJIT_ARG_MASK) < SLJIT_ARG_TYPE_F64) { + tmp = 0; #ifndef _WIN64 - if (args > 0) { - inst[0] = REX_W; - inst[1] = MOV_r_rm; - inst[2] = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x7 /* rdi */; - inst += 3; - } - if (args > 1) { - inst[0] = REX_W | REX_R; - inst[1] = MOV_r_rm; - inst[2] = MOD_REG | (reg_lmap[SLJIT_S1] << 3) | 0x6 /* rsi */; - inst += 3; - } - if (args > 2) { - inst[0] = REX_W | REX_R; - inst[1] = MOV_r_rm; - inst[2] = MOD_REG | (reg_lmap[SLJIT_S2] << 3) | 0x2 /* rdx */; - } -#else - if (args > 0) { - inst[0] = REX_W; - inst[1] = MOV_r_rm; - inst[2] = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x1 /* rcx */; - inst += 3; - } - if (args > 1) { - inst[0] = REX_W; - inst[1] = MOV_r_rm; - inst[2] = MOD_REG | (reg_map[SLJIT_S1] << 3) | 0x2 /* rdx */; - inst += 3; - } - if (args > 2) { - inst[0] = REX_W | REX_B; - inst[1] = MOV_r_rm; - inst[2] = MOD_REG | (reg_map[SLJIT_S2] << 3) | 0x0 /* r8 */; + switch (word_arg_count) { + case 0: + tmp = SLJIT_R2; + break; + case 1: + tmp = SLJIT_R1; + break; + case 2: + tmp = TMP_REG1; + break; + default: + tmp = SLJIT_R3; + break; + } +#else /* !_WIN64 */ + switch (word_arg_count + float_arg_count) { + case 0: + tmp = SLJIT_R3; + break; + case 1: + tmp = SLJIT_R1; + break; + case 2: + tmp = SLJIT_R2; + break; + default: + tmp = TMP_REG1; + break; + } +#endif /* _WIN64 */ + if (arg_types & SLJIT_ARG_TYPE_SCRATCH_REG) { + if (tmp != SLJIT_R0 + word_arg_count) + EMIT_MOV(compiler, SLJIT_R0 + word_arg_count, 0, tmp, 0); + } else { + EMIT_MOV(compiler, SLJIT_S0 - saved_arg_count, 0, tmp, 0); + saved_arg_count++; + } + word_arg_count++; + } else { +#ifdef _WIN64 + SLJIT_COMPILE_ASSERT(SLJIT_FR0 == 1, float_register_index_start); + float_arg_count++; + if (float_arg_count != float_arg_count + word_arg_count) + FAIL_IF(emit_sse2_load(compiler, (arg_types & SLJIT_ARG_MASK) == SLJIT_ARG_TYPE_F32, + float_arg_count, float_arg_count + word_arg_count, 0)); +#endif /* _WIN64 */ } -#endif + arg_types >>= SLJIT_ARG_SHIFT; } - local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_register_size + 15) & ~15) - saved_register_size; + local_size = ((local_size + saved_regs_size + 0xf) & ~0xf) - saved_regs_size; compiler->local_size = local_size; #ifdef _WIN64 @@ -234,44 +490,49 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -4096 * 3); } else { - EMIT_MOV(compiler, SLJIT_R0, 0, SLJIT_SP, 0); - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, (local_size - 1) >> 12); + EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, local_size >> 12); - SLJIT_ASSERT (reg_map[SLJIT_R0] == 0); - - EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_MEM1(SLJIT_R0), -4096); - FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, 4096)); - FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - TMP_REG1, 0, TMP_REG1, 0, SLJIT_IMM, 1)); + EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_MEM1(SLJIT_SP), -4096); + BINARY_IMM32(SUB, 4096, SLJIT_SP, 0); + BINARY_IMM32(SUB, 1, TMP_REG1, 0); inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); FAIL_IF(!inst); INC_SIZE(2); inst[0] = JNE_i8; - inst[1] = (sljit_s8) -19; + inst[1] = (sljit_u8)-21; + local_size &= 0xfff; } - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -local_size); + if (local_size > 0) + EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(SLJIT_SP), -local_size); } -#endif +#endif /* _WIN64 */ - if (local_size > 0) { - FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), - SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size)); - } + if (local_size > 0) + BINARY_IMM32(SUB, local_size, SLJIT_SP, 0); #ifdef _WIN64 - /* Save xmm6 register: movaps [rsp + 0x20], xmm6 */ - if (fscratches >= 6 || fsaveds >= 1) { - inst = (sljit_u8*)ensure_buf(compiler, 1 + 5); - FAIL_IF(!inst); - INC_SIZE(5); - *inst++ = GROUP_0F; - sljit_unaligned_store_s32(inst, 0x20247429); + if (saved_float_regs_size > 0) { + compiler->mode32 = 1; + + tmp = SLJIT_FS0 - fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + inst = emit_x86_instruction(compiler, 2 | EX86_SSE2, i, 0, SLJIT_MEM1(SLJIT_SP), saved_float_regs_offset); + *inst++ = GROUP_0F; + *inst = MOVAPS_xm_x; + saved_float_regs_offset += 16; + } + + for (i = fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + inst = emit_x86_instruction(compiler, 2 | EX86_SSE2, i, 0, SLJIT_MEM1(SLJIT_SP), saved_float_regs_offset); + *inst++ = GROUP_0F; + *inst = MOVAPS_xm_x; + saved_float_regs_offset += 16; + } } -#endif +#endif /* _WIN64 */ return SLJIT_SUCCESS; } @@ -280,46 +541,65 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *comp sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) { - sljit_s32 saved_register_size; + sljit_s32 saved_regs_size; +#ifdef _WIN64 + sljit_s32 saved_float_regs_size; +#endif /* _WIN64 */ CHECK_ERROR(); CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size)); set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); #ifdef _WIN64 - /* Two/four register slots for parameters plus space for xmm6 register if needed. */ - if (fscratches >= 6 || fsaveds >= 1) - compiler->locals_offset = 6 * sizeof(sljit_sw); - else - compiler->locals_offset = ((scratches > 2) ? 4 : 2) * sizeof(sljit_sw); -#endif + local_size += SLJIT_LOCALS_OFFSET; + saved_float_regs_size = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, 16); + + if (saved_float_regs_size > 0) + local_size = ((local_size + 0xf) & ~0xf) + saved_float_regs_size; +#else /* !_WIN64 */ + SLJIT_ASSERT(SLJIT_LOCALS_OFFSET == 0); +#endif /* _WIN64 */ /* Including the return address saved by the call instruction. */ - saved_register_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); - compiler->local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_register_size + 15) & ~15) - saved_register_size; + saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); + compiler->local_size = ((local_size + saved_regs_size + 0xf) & ~0xf) - saved_regs_size; return SLJIT_SUCCESS; } -SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) +static sljit_s32 emit_stack_frame_release(struct sljit_compiler *compiler) { - sljit_s32 i, tmp, size; + sljit_uw size; + sljit_s32 i, tmp; sljit_u8 *inst; +#ifdef _WIN64 + sljit_s32 saved_float_regs_offset; + sljit_s32 fscratches = compiler->fscratches; + sljit_s32 fsaveds = compiler->fsaveds; +#endif /* _WIN64 */ - CHECK_ERROR(); - CHECK(check_sljit_emit_return(compiler, op, src, srcw)); +#ifdef _WIN64 + saved_float_regs_offset = GET_SAVED_FLOAT_REGISTERS_SIZE(fscratches, fsaveds, 16); - FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); + if (saved_float_regs_offset > 0) { + compiler->mode32 = 1; + saved_float_regs_offset = (compiler->local_size - saved_float_regs_offset) & ~0xf; + + tmp = SLJIT_FS0 - fsaveds; + for (i = SLJIT_FS0; i > tmp; i--) { + inst = emit_x86_instruction(compiler, 2 | EX86_SSE2, i, 0, SLJIT_MEM1(SLJIT_SP), saved_float_regs_offset); + *inst++ = GROUP_0F; + *inst = MOVAPS_x_xm; + saved_float_regs_offset += 16; + } -#ifdef _WIN64 - /* Restore xmm6 register: movaps xmm6, [rsp + 0x20] */ - if (compiler->fscratches >= 6 || compiler->fsaveds >= 1) { - inst = (sljit_u8*)ensure_buf(compiler, 1 + 5); - FAIL_IF(!inst); - INC_SIZE(5); - *inst++ = GROUP_0F; - sljit_unaligned_store_s32(inst, 0x20247428); + for (i = fscratches; i >= SLJIT_FIRST_SAVED_FLOAT_REG; i--) { + inst = emit_x86_instruction(compiler, 2 | EX86_SSE2, i, 0, SLJIT_MEM1(SLJIT_SP), saved_float_regs_offset); + *inst++ = GROUP_0F; + *inst = MOVAPS_x_xm; + saved_float_regs_offset += 16; + } } -#endif +#endif /* _WIN64 */ if (compiler->local_size > 0) { if (compiler->local_size <= 127) { @@ -329,7 +609,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp *inst++ = REX_W; *inst++ = GROUP_BINARY_83; *inst++ = MOD_REG | ADD | 4; - *inst = compiler->local_size; + *inst = U8(compiler->local_size); } else { inst = (sljit_u8*)ensure_buf(compiler, 1 + 7); @@ -364,243 +644,23 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *comp POP_REG(reg_lmap[i]); } - inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); - FAIL_IF(!inst); - INC_SIZE(1); - RET(); - return SLJIT_SUCCESS; -} - -/* --------------------------------------------------------------------- */ -/* Operators */ -/* --------------------------------------------------------------------- */ - -static sljit_s32 emit_do_imm32(struct sljit_compiler *compiler, sljit_u8 rex, sljit_u8 opcode, sljit_sw imm) -{ - sljit_u8 *inst; - sljit_s32 length = 1 + (rex ? 1 : 0) + sizeof(sljit_s32); - - inst = (sljit_u8*)ensure_buf(compiler, 1 + length); - FAIL_IF(!inst); - INC_SIZE(length); - if (rex) - *inst++ = rex; - *inst++ = opcode; - sljit_unaligned_store_s32(inst, imm); return SLJIT_SUCCESS; } -static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 size, - /* The register or immediate operand. */ - sljit_s32 a, sljit_sw imma, - /* The general operand (not immediate). */ - sljit_s32 b, sljit_sw immb) +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) { sljit_u8 *inst; - sljit_u8 *buf_ptr; - sljit_u8 rex = 0; - sljit_s32 flags = size & ~0xf; - sljit_s32 inst_size; - - /* The immediate operand must be 32 bit. */ - SLJIT_ASSERT(!(a & SLJIT_IMM) || compiler->mode32 || IS_HALFWORD(imma)); - /* Both cannot be switched on. */ - SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS)); - /* Size flags not allowed for typed instructions. */ - SLJIT_ASSERT(!(flags & (EX86_BIN_INS | EX86_SHIFT_INS)) || (flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) == 0); - /* Both size flags cannot be switched on. */ - SLJIT_ASSERT((flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) != (EX86_BYTE_ARG | EX86_HALF_ARG)); - /* SSE2 and immediate is not possible. */ - SLJIT_ASSERT(!(a & SLJIT_IMM) || !(flags & EX86_SSE2)); - SLJIT_ASSERT((flags & (EX86_PREF_F2 | EX86_PREF_F3)) != (EX86_PREF_F2 | EX86_PREF_F3) - && (flags & (EX86_PREF_F2 | EX86_PREF_66)) != (EX86_PREF_F2 | EX86_PREF_66) - && (flags & (EX86_PREF_F3 | EX86_PREF_66)) != (EX86_PREF_F3 | EX86_PREF_66)); - - size &= 0xf; - inst_size = size; - - if (!compiler->mode32 && !(flags & EX86_NO_REXW)) - rex |= REX_W; - else if (flags & EX86_REX) - rex |= REX; - - if (flags & (EX86_PREF_F2 | EX86_PREF_F3)) - inst_size++; - if (flags & EX86_PREF_66) - inst_size++; - - /* Calculate size of b. */ - inst_size += 1; /* mod r/m byte. */ - if (b & SLJIT_MEM) { - if (!(b & OFFS_REG_MASK)) { - if (NOT_HALFWORD(immb)) { - PTR_FAIL_IF(emit_load_imm64(compiler, TMP_REG2, immb)); - immb = 0; - if (b & REG_MASK) - b |= TO_OFFS_REG(TMP_REG2); - else - b |= TMP_REG2; - } - else if (reg_lmap[b & REG_MASK] == 4) - b |= TO_OFFS_REG(SLJIT_SP); - } - - if ((b & REG_MASK) == SLJIT_UNUSED) - inst_size += 1 + sizeof(sljit_s32); /* SIB byte required to avoid RIP based addressing. */ - else { - if (reg_map[b & REG_MASK] >= 8) - rex |= REX_B; - - if (immb != 0 && (!(b & OFFS_REG_MASK) || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP))) { - /* Immediate operand. */ - if (immb <= 127 && immb >= -128) - inst_size += sizeof(sljit_s8); - else - inst_size += sizeof(sljit_s32); - } - else if (reg_lmap[b & REG_MASK] == 5) - inst_size += sizeof(sljit_s8); - - if ((b & OFFS_REG_MASK) != SLJIT_UNUSED) { - inst_size += 1; /* SIB byte. */ - if (reg_map[OFFS_REG(b)] >= 8) - rex |= REX_X; - } - } - } - else if (!(flags & EX86_SSE2_OP2)) { - if (reg_map[b] >= 8) - rex |= REX_B; - } - else if (freg_map[b] >= 8) - rex |= REX_B; - - if (a & SLJIT_IMM) { - if (flags & EX86_BIN_INS) { - if (imma <= 127 && imma >= -128) { - inst_size += 1; - flags |= EX86_BYTE_ARG; - } else - inst_size += 4; - } - else if (flags & EX86_SHIFT_INS) { - imma &= compiler->mode32 ? 0x1f : 0x3f; - if (imma != 1) { - inst_size ++; - flags |= EX86_BYTE_ARG; - } - } else if (flags & EX86_BYTE_ARG) - inst_size++; - else if (flags & EX86_HALF_ARG) - inst_size += sizeof(short); - else - inst_size += sizeof(sljit_s32); - } - else { - SLJIT_ASSERT(!(flags & EX86_SHIFT_INS) || a == SLJIT_PREF_SHIFT_REG); - /* reg_map[SLJIT_PREF_SHIFT_REG] is less than 8. */ - if (!(flags & EX86_SSE2_OP1)) { - if (reg_map[a] >= 8) - rex |= REX_R; - } - else if (freg_map[a] >= 8) - rex |= REX_R; - } - - if (rex) - inst_size++; - - inst = (sljit_u8*)ensure_buf(compiler, 1 + inst_size); - PTR_FAIL_IF(!inst); - - /* Encoding the byte. */ - INC_SIZE(inst_size); - if (flags & EX86_PREF_F2) - *inst++ = 0xf2; - if (flags & EX86_PREF_F3) - *inst++ = 0xf3; - if (flags & EX86_PREF_66) - *inst++ = 0x66; - if (rex) - *inst++ = rex; - buf_ptr = inst + size; - - /* Encode mod/rm byte. */ - if (!(flags & EX86_SHIFT_INS)) { - if ((flags & EX86_BIN_INS) && (a & SLJIT_IMM)) - *inst = (flags & EX86_BYTE_ARG) ? GROUP_BINARY_83 : GROUP_BINARY_81; - if (a & SLJIT_IMM) - *buf_ptr = 0; - else if (!(flags & EX86_SSE2_OP1)) - *buf_ptr = reg_lmap[a] << 3; - else - *buf_ptr = freg_lmap[a] << 3; - } - else { - if (a & SLJIT_IMM) { - if (imma == 1) - *inst = GROUP_SHIFT_1; - else - *inst = GROUP_SHIFT_N; - } else - *inst = GROUP_SHIFT_CL; - *buf_ptr = 0; - } - - if (!(b & SLJIT_MEM)) - *buf_ptr++ |= MOD_REG + ((!(flags & EX86_SSE2_OP2)) ? reg_lmap[b] : freg_lmap[b]); - else if ((b & REG_MASK) != SLJIT_UNUSED) { - if ((b & OFFS_REG_MASK) == SLJIT_UNUSED || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP)) { - if (immb != 0 || reg_lmap[b & REG_MASK] == 5) { - if (immb <= 127 && immb >= -128) - *buf_ptr |= 0x40; - else - *buf_ptr |= 0x80; - } - - if ((b & OFFS_REG_MASK) == SLJIT_UNUSED) - *buf_ptr++ |= reg_lmap[b & REG_MASK]; - else { - *buf_ptr++ |= 0x04; - *buf_ptr++ = reg_lmap[b & REG_MASK] | (reg_lmap[OFFS_REG(b)] << 3); - } - - if (immb != 0 || reg_lmap[b & REG_MASK] == 5) { - if (immb <= 127 && immb >= -128) - *buf_ptr++ = immb; /* 8 bit displacement. */ - else { - sljit_unaligned_store_s32(buf_ptr, immb); /* 32 bit displacement. */ - buf_ptr += sizeof(sljit_s32); - } - } - } - else { - if (reg_lmap[b & REG_MASK] == 5) - *buf_ptr |= 0x40; - *buf_ptr++ |= 0x04; - *buf_ptr++ = reg_lmap[b & REG_MASK] | (reg_lmap[OFFS_REG(b)] << 3) | (immb << 6); - if (reg_lmap[b & REG_MASK] == 5) - *buf_ptr++ = 0; - } - } - else { - *buf_ptr++ |= 0x04; - *buf_ptr++ = 0x25; - sljit_unaligned_store_s32(buf_ptr, immb); /* 32 bit displacement. */ - buf_ptr += sizeof(sljit_s32); - } + CHECK_ERROR(); + CHECK(check_sljit_emit_return_void(compiler)); - if (a & SLJIT_IMM) { - if (flags & EX86_BYTE_ARG) - *buf_ptr = imma; - else if (flags & EX86_HALF_ARG) - sljit_unaligned_store_s16(buf_ptr, imma); - else if (!(flags & EX86_SHIFT_INS)) - sljit_unaligned_store_s32(buf_ptr, imma); - } + FAIL_IF(emit_stack_frame_release(compiler)); - return !(flags & EX86_SHIFT_INS) ? inst : (inst + 1); + inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); + FAIL_IF(!inst); + INC_SIZE(1); + RET(); + return SLJIT_SUCCESS; } /* --------------------------------------------------------------------- */ @@ -609,43 +669,38 @@ static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 #ifndef _WIN64 -static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src_ptr, sljit_sw srcw) +static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src_ptr) { sljit_s32 src = src_ptr ? (*src_ptr) : 0; sljit_s32 word_arg_count = 0; SLJIT_ASSERT(reg_map[SLJIT_R1] == 6 && reg_map[SLJIT_R3] == 1 && reg_map[TMP_REG1] == 2); - - compiler->mode32 = 0; + SLJIT_ASSERT(!(src & SLJIT_MEM)); /* Remove return value. */ - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - if ((arg_types & SLJIT_DEF_MASK) < SLJIT_ARG_TYPE_F32) + if ((arg_types & SLJIT_ARG_MASK) < SLJIT_ARG_TYPE_F64) word_arg_count++; - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } if (word_arg_count == 0) return SLJIT_SUCCESS; - if (src & SLJIT_MEM) { - ADJUST_LOCAL_OFFSET(src, srcw); - EMIT_MOV(compiler, TMP_REG2, 0, src, srcw); - *src_ptr = TMP_REG2; + if (word_arg_count >= 3) { + if (src == SLJIT_R2) + *src_ptr = TMP_REG1; + EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_R2, 0); } - else if (src == SLJIT_R2 && word_arg_count >= SLJIT_R2) - *src_ptr = TMP_REG1; - if (word_arg_count >= 3) - EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_R2, 0); return emit_mov(compiler, SLJIT_R2, 0, SLJIT_R0, 0); } #else -static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src_ptr, sljit_sw srcw) +static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, sljit_s32 *src_ptr) { sljit_s32 src = src_ptr ? (*src_ptr) : 0; sljit_s32 arg_count = 0; @@ -656,16 +711,16 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t static sljit_u8 word_arg_regs[5] = { 0, SLJIT_R3, SLJIT_R1, SLJIT_R2, TMP_REG1 }; SLJIT_ASSERT(reg_map[SLJIT_R3] == 1 && reg_map[SLJIT_R1] == 2 && reg_map[SLJIT_R2] == 8 && reg_map[TMP_REG1] == 9); + SLJIT_ASSERT(!(src & SLJIT_MEM)); - compiler->mode32 = 0; - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; while (arg_types) { - types = (types << SLJIT_DEF_SHIFT) | (arg_types & SLJIT_DEF_MASK); + types = (types << SLJIT_ARG_SHIFT) | (arg_types & SLJIT_ARG_MASK); - switch (arg_types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: + switch (arg_types & SLJIT_ARG_MASK) { case SLJIT_ARG_TYPE_F64: + case SLJIT_ARG_TYPE_F32: arg_count++; float_arg_count++; @@ -687,29 +742,23 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t break; } - arg_types >>= SLJIT_DEF_SHIFT; + arg_types >>= SLJIT_ARG_SHIFT; } if (!data_trandfer) return SLJIT_SUCCESS; - if (src & SLJIT_MEM) { - ADJUST_LOCAL_OFFSET(src, srcw); - EMIT_MOV(compiler, TMP_REG2, 0, src, srcw); - *src_ptr = TMP_REG2; - } - while (types) { - switch (types & SLJIT_DEF_MASK) { - case SLJIT_ARG_TYPE_F32: + switch (types & SLJIT_ARG_MASK) { + case SLJIT_ARG_TYPE_F64: if (arg_count != float_arg_count) - FAIL_IF(emit_sse2_load(compiler, 1, arg_count, float_arg_count, 0)); + FAIL_IF(emit_sse2_load(compiler, 0, arg_count, float_arg_count, 0)); arg_count--; float_arg_count--; break; - case SLJIT_ARG_TYPE_F64: + case SLJIT_ARG_TYPE_F32: if (arg_count != float_arg_count) - FAIL_IF(emit_sse2_load(compiler, 0, arg_count, float_arg_count, 0)); + FAIL_IF(emit_sse2_load(compiler, 1, arg_count, float_arg_count, 0)); arg_count--; float_arg_count--; break; @@ -721,7 +770,7 @@ static sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_t break; } - types >>= SLJIT_DEF_SHIFT; + types >>= SLJIT_ARG_SHIFT; } return SLJIT_SUCCESS; @@ -735,13 +784,19 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compile CHECK_ERROR_PTR(); CHECK_PTR(check_sljit_emit_call(compiler, type, arg_types)); - PTR_FAIL_IF(call_with_args(compiler, arg_types, NULL, 0)); + compiler->mode32 = 0; + + PTR_FAIL_IF(call_with_args(compiler, arg_types, NULL)); + + if (type & SLJIT_CALL_RETURN) { + PTR_FAIL_IF(emit_stack_frame_release(compiler)); + type = SLJIT_JUMP | (type & SLJIT_REWRITABLE_JUMP); + } #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) compiler->skip_checks = 1; #endif - return sljit_emit_jump(compiler, type); } @@ -752,7 +807,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compi CHECK_ERROR(); CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); - FAIL_IF(call_with_args(compiler, arg_types, &src, srcw)); + compiler->mode32 = 0; + + if (src & SLJIT_MEM) { + ADJUST_LOCAL_OFFSET(src, srcw); + EMIT_MOV(compiler, TMP_REG2, 0, src, srcw); + src = TMP_REG2; + } + + if (type & SLJIT_CALL_RETURN) { + if (src >= SLJIT_FIRST_SAVED_REG && src <= SLJIT_S0) { + EMIT_MOV(compiler, TMP_REG2, 0, src, srcw); + src = TMP_REG2; + } + + FAIL_IF(emit_stack_frame_release(compiler)); + type = SLJIT_JUMP; + } + + FAIL_IF(call_with_args(compiler, arg_types, &src)); #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) @@ -770,10 +843,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler * CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); ADJUST_LOCAL_OFFSET(dst, dstw); - /* For UNUSED dst. Uncommon, but possible. */ - if (dst == SLJIT_UNUSED) - dst = TMP_REG1; - if (FAST_IS_REG(dst)) { if (reg_map[dst] < 8) { inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); @@ -850,9 +919,6 @@ static sljit_s32 emit_mov_int(struct sljit_compiler *compiler, sljit_s32 sign, compiler->mode32 = 0; - if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM)) - return SLJIT_SUCCESS; /* Empty instruction. */ - if (src & SLJIT_IMM) { if (FAST_IS_REG(dst)) { if (sign || ((sljit_uw)srcw <= 0x7fffffff)) { @@ -903,16 +969,16 @@ static sljit_s32 skip_frames_before_return(struct sljit_compiler *compiler) sljit_s32 tmp, size; /* Don't adjust shadow stack if it isn't enabled. */ - if (!cpu_has_shadow_stack ()) + if (!cpu_has_shadow_stack()) return SLJIT_SUCCESS; size = compiler->local_size; tmp = compiler->scratches; if (tmp >= SLJIT_FIRST_SAVED_REG) - size += (tmp - SLJIT_FIRST_SAVED_REG + 1) * sizeof(sljit_uw); + size += (tmp - SLJIT_FIRST_SAVED_REG + 1) * SSIZE_OF(sw); tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG; if (SLJIT_S0 >= tmp) - size += (SLJIT_S0 - tmp + 1) * sizeof(sljit_uw); + size += (SLJIT_S0 - tmp + 1) * SSIZE_OF(sw); - return adjust_shadow_stack(compiler, SLJIT_UNUSED, 0, SLJIT_SP, size); + return adjust_shadow_stack(compiler, SLJIT_MEM1(SLJIT_SP), size); } diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c index 515d98aefd..c7dd9be8fd 100644 --- a/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c +++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c @@ -65,6 +65,8 @@ SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void) 15 - R15 */ +#define TMP_FREG (0) + #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) /* Last register + 1. */ @@ -77,9 +79,9 @@ static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 3] = { #define CHECK_EXTRA_REGS(p, w, do) \ if (p >= SLJIT_R3 && p <= SLJIT_S3) { \ if (p <= compiler->scratches) \ - w = compiler->saveds_offset - ((p) - SLJIT_R2) * (sljit_sw)sizeof(sljit_sw); \ + w = compiler->scratches_offset + ((p) - SLJIT_R3) * SSIZE_OF(sw); \ else \ - w = compiler->locals_offset + ((p) - SLJIT_S2) * (sljit_sw)sizeof(sljit_sw); \ + w = compiler->locals_offset + ((p) - SLJIT_S2) * SSIZE_OF(sw); \ p = SLJIT_MEM1(SLJIT_SP); \ do; \ } @@ -115,11 +117,11 @@ static const sljit_u8 reg_lmap[SLJIT_NUMBER_OF_REGISTERS + 4] = { /* Args: xmm0-xmm3 */ static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1] = { - 4, 0, 1, 2, 3, 5, 6 + 4, 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; /* low-map. freg_map & 0x7. */ static const sljit_u8 freg_lmap[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1] = { - 4, 0, 1, 2, 3, 5, 6 + 4, 0, 1, 2, 3, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 }; #define REX_W 0x48 @@ -143,7 +145,8 @@ static const sljit_u8 freg_lmap[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1] = { #endif /* SLJIT_CONFIG_X86_32 */ -#define TMP_FREG (0) +#define U8(v) ((sljit_u8)(v)) + /* Size flags for emit_x86_instruction: */ #define EX86_BIN_INS 0x0010 @@ -205,12 +208,15 @@ static const sljit_u8 freg_lmap[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1] = { #define JMP_i32 0xe9 #define JMP_rm (/* GROUP_FF */ 4 << 3) #define LEA_r_m 0x8d +#define LOOP_i8 0xe2 #define MOV_r_rm 0x8b #define MOV_r_i32 0xb8 #define MOV_rm_r 0x89 #define MOV_rm_i32 0xc7 #define MOV_rm8_i8 0xc6 #define MOV_rm8_r8 0x88 +#define MOVAPS_x_xm 0x28 +#define MOVAPS_xm_x 0x29 #define MOVSD_x_xm 0x10 #define MOVSD_xm_x 0x11 #define MOVSXD_r_rm 0x63 @@ -274,14 +280,12 @@ static const sljit_u8 freg_lmap[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1] = { #define MOD_REG 0xc0 #define MOD_DISP8 0x40 -#define INC_SIZE(s) (*inst++ = (s), compiler->size += (s)) +#define INC_SIZE(s) (*inst++ = U8(s), compiler->size += (s)) -#define PUSH_REG(r) (*inst++ = (PUSH_r + (r))) -#define POP_REG(r) (*inst++ = (POP_r + (r))) -#define RET() (*inst++ = (RET_near)) -#define RET_I16(n) (*inst++ = (RET_i16), *inst++ = n, *inst++ = 0) -/* r32, r/m32 */ -#define MOV_RM(mod, reg, rm) (*inst++ = (MOV_r_rm), *inst++ = (mod) << 6 | (reg) << 3 | (rm)) +#define PUSH_REG(r) (*inst++ = U8(PUSH_r + (r))) +#define POP_REG(r) (*inst++ = U8(POP_r + (r))) +#define RET() (*inst++ = RET_near) +#define RET_I16(n) (*inst++ = RET_i16, *inst++ = U8(n), *inst++ = 0) /* Multithreading does not affect these static variables, since they store built-in CPU features. Therefore they can be overwritten by different threads @@ -371,7 +375,7 @@ static void get_cpu_features(void) cpu_has_cmov = (features >> 15) & 0x1; } -static sljit_u8 get_jump_code(sljit_s32 type) +static sljit_u8 get_jump_code(sljit_uw type) { switch (type) { case SLJIT_EQUAL: @@ -383,10 +387,12 @@ static sljit_u8 get_jump_code(sljit_s32 type) return 0x85 /* jne */; case SLJIT_LESS: + case SLJIT_CARRY: case SLJIT_LESS_F64: return 0x82 /* jc */; case SLJIT_GREATER_EQUAL: + case SLJIT_NOT_CARRY: case SLJIT_GREATER_EQUAL_F64: return 0x83 /* jae */; @@ -434,14 +440,14 @@ static sljit_u8* generate_put_label_code(struct sljit_put_label *put_label, slji static sljit_u8* generate_near_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_u8 *code, sljit_sw executable_offset) { - sljit_s32 type = jump->flags >> TYPE_SHIFT; + sljit_uw type = jump->flags >> TYPE_SHIFT; sljit_s32 short_jump; sljit_uw label_addr; if (jump->flags & JUMP_LABEL) label_addr = (sljit_uw)(code + jump->u.label->size); else - label_addr = jump->u.target - executable_offset; + label_addr = jump->u.target - (sljit_uw)executable_offset; short_jump = (sljit_sw)(label_addr - (jump->addr + 2)) >= -128 && (sljit_sw)(label_addr - (jump->addr + 2)) <= 127; @@ -463,7 +469,7 @@ static sljit_u8* generate_near_jump_code(struct sljit_jump *jump, sljit_u8 *code jump->addr++; } else if (short_jump) { - *code_ptr++ = get_jump_code(type) - 0x10; + *code_ptr++ = U8(get_jump_code(type) - 0x10); jump->addr++; } else { @@ -492,7 +498,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil sljit_u8 *buf_end; sljit_u8 len; sljit_sw executable_offset; - sljit_sw jump_addr; + sljit_uw jump_addr; struct sljit_label *label; struct sljit_jump *jump; @@ -530,7 +536,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil switch (*buf_ptr) { case 0: label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); - label->size = code_ptr - code; + label->size = (sljit_uw)(code_ptr - code); label = label->next; break; case 1: @@ -575,11 +581,11 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil jump = compiler->jumps; while (jump) { - jump_addr = jump->addr + executable_offset; + jump_addr = jump->addr + (sljit_uw)executable_offset; if (jump->flags & PATCH_MB) { SLJIT_ASSERT((sljit_sw)(jump->u.label->addr - (jump_addr + sizeof(sljit_s8))) >= -128 && (sljit_sw)(jump->u.label->addr - (jump_addr + sizeof(sljit_s8))) <= 127); - *(sljit_u8*)jump->addr = (sljit_u8)(jump->u.label->addr - (jump_addr + sizeof(sljit_s8))); + *(sljit_u8*)jump->addr = U8(jump->u.label->addr - (jump_addr + sizeof(sljit_s8))); } else if (jump->flags & PATCH_MW) { if (jump->flags & JUMP_LABEL) { #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) @@ -600,7 +606,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil } #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) else if (jump->flags & PATCH_MD) - sljit_unaligned_store_sw((void*)jump->addr, jump->u.label->addr); + sljit_unaligned_store_sw((void*)jump->addr, (sljit_sw)jump->u.label->addr); #endif jump = jump->next; @@ -626,7 +632,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil compiler->error = SLJIT_ERR_COMPILED; compiler->executable_offset = executable_offset; - compiler->executable_size = code_ptr - code; + compiler->executable_size = (sljit_uw)(code_ptr - code); code = (sljit_u8*)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); @@ -682,17 +688,40 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) #define BINARY_OPCODE(opcode) (((opcode ## _EAX_i32) << 24) | ((opcode ## _r_rm) << 16) | ((opcode ## _rm_r) << 8) | (opcode)) -static sljit_s32 emit_cum_binary(struct sljit_compiler *compiler, - sljit_u32 op_types, - sljit_s32 dst, sljit_sw dstw, - sljit_s32 src1, sljit_sw src1w, - sljit_s32 src2, sljit_sw src2w); +#define BINARY_IMM32(op_imm, immw, arg, argw) \ + do { \ + inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \ + FAIL_IF(!inst); \ + *(inst + 1) |= (op_imm); \ + } while (0) -static sljit_s32 emit_non_cum_binary(struct sljit_compiler *compiler, - sljit_u32 op_types, - sljit_s32 dst, sljit_sw dstw, - sljit_s32 src1, sljit_sw src1w, - sljit_s32 src2, sljit_sw src2w); +#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) + +#define BINARY_IMM(op_imm, op_mr, immw, arg, argw) \ + do { \ + if (IS_HALFWORD(immw) || compiler->mode32) { \ + BINARY_IMM32(op_imm, immw, arg, argw); \ + } \ + else { \ + FAIL_IF(emit_load_imm64(compiler, (arg == TMP_REG1) ? TMP_REG2 : TMP_REG1, immw)); \ + inst = emit_x86_instruction(compiler, 1, (arg == TMP_REG1) ? TMP_REG2 : TMP_REG1, 0, arg, argw); \ + FAIL_IF(!inst); \ + *inst = (op_mr); \ + } \ + } while (0) + +#define BINARY_EAX_IMM(op_eax_imm, immw) \ + FAIL_IF(emit_do_imm32(compiler, (!compiler->mode32) ? REX_W : 0, (op_eax_imm), immw)) + +#else /* !SLJIT_CONFIG_X86_64 */ + +#define BINARY_IMM(op_imm, op_mr, immw, arg, argw) \ + BINARY_IMM32(op_imm, immw, arg, argw) + +#define BINARY_EAX_IMM(op_eax_imm, immw) \ + FAIL_IF(emit_do_imm(compiler, (op_eax_imm), immw)) + +#endif /* SLJIT_CONFIG_X86_64 */ static sljit_s32 emit_mov(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, @@ -795,7 +824,7 @@ static SLJIT_INLINE sljit_s32 cpu_has_shadow_stack(void) } static SLJIT_INLINE sljit_s32 adjust_shadow_stack(struct sljit_compiler *compiler, - sljit_s32 src, sljit_sw srcw, sljit_s32 base, sljit_sw disp) + sljit_s32 src, sljit_sw srcw) { #if (defined SLJIT_CONFIG_X86_CET && SLJIT_CONFIG_X86_CET) && defined (__SHSTK__) sljit_u8 *inst, *jz_after_cmp_inst; @@ -821,12 +850,6 @@ static SLJIT_INLINE sljit_s32 adjust_shadow_stack(struct sljit_compiler *compile EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_MEM1(TMP_REG1), 0); #endif /* SLJIT_CONFIG_X86_32 */ - if (src == SLJIT_UNUSED) { - /* Return address is on stack. */ - src = SLJIT_MEM1(base); - srcw = disp; - } - /* Compare return address against TMP_REG1. */ FAIL_IF(emit_cmp_binary (compiler, TMP_REG1, 0, src, srcw)); @@ -861,8 +884,6 @@ static SLJIT_INLINE sljit_s32 adjust_shadow_stack(struct sljit_compiler *compile SLJIT_UNUSED_ARG(compiler); SLJIT_UNUSED_ARG(src); SLJIT_UNUSED_ARG(srcw); - SLJIT_UNUSED_ARG(base); - SLJIT_UNUSED_ARG(disp); #endif /* SLJIT_CONFIG_X86_CET && __SHSTK__ */ return SLJIT_SUCCESS; } @@ -879,8 +900,6 @@ static sljit_s32 emit_mov(struct sljit_compiler *compiler, { sljit_u8* inst; - SLJIT_ASSERT(dst != SLJIT_UNUSED); - if (FAST_IS_REG(src)) { inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw); FAIL_IF(!inst); @@ -890,14 +909,14 @@ static sljit_s32 emit_mov(struct sljit_compiler *compiler, if (src & SLJIT_IMM) { if (FAST_IS_REG(dst)) { #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) - return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw); + return emit_do_imm(compiler, MOV_r_i32 | reg_map[dst], srcw); #else if (!compiler->mode32) { if (NOT_HALFWORD(srcw)) return emit_load_imm64(compiler, dst, srcw); } else - return emit_do_imm32(compiler, (reg_map[dst] >= 8) ? REX_B : 0, MOV_r_i32 + reg_lmap[dst], srcw); + return emit_do_imm32(compiler, (reg_map[dst] >= 8) ? REX_B : 0, U8(MOV_r_i32 | reg_lmap[dst]), srcw); #endif } #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) @@ -938,7 +957,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile { sljit_u8 *inst; #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) - sljit_s32 size; + sljit_uw size; #endif CHECK_ERROR(); @@ -975,7 +994,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile && reg_map[SLJIT_R1] < 7 && reg_map[TMP_REG1] == 2); #endif - compiler->mode32 = op & SLJIT_I32_OP; + compiler->mode32 = op & SLJIT_32; #endif SLJIT_COMPILE_ASSERT((SLJIT_DIVMOD_UW & 0x2) == 0 && SLJIT_DIV_UW - 0x2 == SLJIT_DIVMOD_UW, bad_div_opcode_assignments); @@ -1084,7 +1103,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); \ FAIL_IF(!inst); \ INC_SIZE(1); \ - *inst = (prefix); \ + *inst = U8(prefix); \ } while (0) static sljit_s32 emit_mov_byte(struct sljit_compiler *compiler, sljit_s32 sign, @@ -1104,7 +1123,7 @@ static sljit_s32 emit_mov_byte(struct sljit_compiler *compiler, sljit_s32 sign, if (src & SLJIT_IMM) { if (FAST_IS_REG(dst)) { #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) - return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw); + return emit_do_imm(compiler, MOV_r_i32 | reg_map[dst], srcw); #else inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); FAIL_IF(!inst); @@ -1134,7 +1153,7 @@ static sljit_s32 emit_mov_byte(struct sljit_compiler *compiler, sljit_s32 sign, #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) else if (FAST_IS_REG(src) && reg_map[src] >= 4) { /* src, dst are registers. */ - SLJIT_ASSERT(SLOW_IS_REG(dst)); + SLJIT_ASSERT(FAST_IS_REG(dst)); if (reg_map[dst] < 4) { if (dst != src) EMIT_MOV(compiler, dst, 0, src, 0); @@ -1193,7 +1212,7 @@ static sljit_s32 emit_mov_byte(struct sljit_compiler *compiler, sljit_s32 sign, } if (work_r == SLJIT_R0) { - ENCODE_PREFIX(XCHG_EAX_r + reg_map[TMP_REG1]); + ENCODE_PREFIX(XCHG_EAX_r | reg_map[TMP_REG1]); } else { inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0); @@ -1206,7 +1225,7 @@ static sljit_s32 emit_mov_byte(struct sljit_compiler *compiler, sljit_s32 sign, *inst = MOV_rm8_r8; if (work_r == SLJIT_R0) { - ENCODE_PREFIX(XCHG_EAX_r + reg_map[TMP_REG1]); + ENCODE_PREFIX(XCHG_EAX_r | reg_map[TMP_REG1]); } else { inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0); @@ -1267,7 +1286,7 @@ static sljit_s32 emit_mov_half(struct sljit_compiler *compiler, sljit_s32 sign, if (src & SLJIT_IMM) { if (FAST_IS_REG(dst)) { #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) - return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw); + return emit_do_imm(compiler, MOV_r_i32 | reg_map[dst], srcw); #else inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); FAIL_IF(!inst); @@ -1316,9 +1335,6 @@ static sljit_s32 emit_unary(struct sljit_compiler *compiler, sljit_u8 opcode, return SLJIT_SUCCESS; } - if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) - dst = TMP_REG1; - if (FAST_IS_REG(dst)) { EMIT_MOV(compiler, dst, 0, src, srcw); inst = emit_x86_instruction(compiler, 1, 0, 0, dst, 0); @@ -1343,9 +1359,6 @@ static sljit_s32 emit_not_with_flags(struct sljit_compiler *compiler, { sljit_u8* inst; - if (dst == SLJIT_UNUSED) - dst = TMP_REG1; - if (FAST_IS_REG(dst)) { EMIT_MOV(compiler, dst, 0, src, srcw); inst = emit_x86_instruction(compiler, 1, 0, 0, dst, 0); @@ -1412,7 +1425,7 @@ static sljit_s32 emit_clz(struct sljit_compiler *compiler, sljit_s32 op_flags, inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 31, dst_r, 0); #else if (cpu_has_cmov) { - EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_IMM, !(op_flags & SLJIT_I32_OP) ? (64 + 63) : (32 + 31)); + EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_IMM, !(op_flags & SLJIT_32) ? (64 + 63) : (32 + 31)); inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0); FAIL_IF(!inst); @@ -1420,9 +1433,9 @@ static sljit_s32 emit_clz(struct sljit_compiler *compiler, sljit_s32 op_flags, *inst = CMOVE_r_rm; } else - FAIL_IF(sljit_emit_cmov_generic(compiler, SLJIT_EQUAL, dst_r, SLJIT_IMM, !(op_flags & SLJIT_I32_OP) ? (64 + 63) : (32 + 31))); + FAIL_IF(sljit_emit_cmov_generic(compiler, SLJIT_EQUAL, dst_r, SLJIT_IMM, !(op_flags & SLJIT_32) ? (64 + 63) : (32 + 31))); - inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op_flags & SLJIT_I32_OP) ? 63 : 31, dst_r, 0); + inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op_flags & SLJIT_32) ? 63 : 31, dst_r, 0); #endif FAIL_IF(!inst); @@ -1450,7 +1463,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile CHECK_EXTRA_REGS(dst, dstw, dst_is_ereg = 1); CHECK_EXTRA_REGS(src, srcw, (void)0); #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) - compiler->mode32 = op_flags & SLJIT_I32_OP; + compiler->mode32 = op_flags & SLJIT_32; #endif op = GET_OPCODE(op); @@ -1465,8 +1478,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile return SLJIT_SUCCESS; } - if (op_flags & SLJIT_I32_OP) { #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) + if (op_flags & SLJIT_32) { if (src & SLJIT_MEM) { if (op == SLJIT_MOV_S32) op = SLJIT_MOV_U32; @@ -1475,8 +1488,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile if (op == SLJIT_MOV_U32) op = SLJIT_MOV_S32; } -#endif } +#endif if (src & SLJIT_IMM) { switch (op) { @@ -1520,8 +1533,9 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) case SLJIT_MOV_U32: case SLJIT_MOV_S32: + case SLJIT_MOV32: #endif - FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw)); + EMIT_MOV(compiler, dst, dstw, src, srcw); break; case SLJIT_MOV_U8: FAIL_IF(emit_mov_byte(compiler, 0, dst, dstw, src, srcw)); @@ -1542,6 +1556,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile case SLJIT_MOV_S32: FAIL_IF(emit_mov_int(compiler, 1, dst, dstw, src, srcw)); break; + case SLJIT_MOV32: + compiler->mode32 = 1; + EMIT_MOV(compiler, dst, dstw, src, srcw); + compiler->mode32 = 0; + break; #endif } @@ -1558,9 +1577,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile return emit_not_with_flags(compiler, dst, dstw, src, srcw); return emit_unary(compiler, NOT_rm, dst, dstw, src, srcw); - case SLJIT_NEG: - return emit_unary(compiler, NEG_rm, dst, dstw, src, srcw); - case SLJIT_CLZ: return emit_clz(compiler, op_flags, dst, dstw, src, srcw); } @@ -1568,36 +1584,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compile return SLJIT_SUCCESS; } -#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) - -#define BINARY_IMM(op_imm, op_mr, immw, arg, argw) \ - if (IS_HALFWORD(immw) || compiler->mode32) { \ - inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \ - FAIL_IF(!inst); \ - *(inst + 1) |= (op_imm); \ - } \ - else { \ - FAIL_IF(emit_load_imm64(compiler, (arg == TMP_REG1) ? TMP_REG2 : TMP_REG1, immw)); \ - inst = emit_x86_instruction(compiler, 1, (arg == TMP_REG1) ? TMP_REG2 : TMP_REG1, 0, arg, argw); \ - FAIL_IF(!inst); \ - *inst = (op_mr); \ - } - -#define BINARY_EAX_IMM(op_eax_imm, immw) \ - FAIL_IF(emit_do_imm32(compiler, (!compiler->mode32) ? REX_W : 0, (op_eax_imm), immw)) - -#else - -#define BINARY_IMM(op_imm, op_mr, immw, arg, argw) \ - inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \ - FAIL_IF(!inst); \ - *(inst + 1) |= (op_imm); - -#define BINARY_EAX_IMM(op_eax_imm, immw) \ - FAIL_IF(emit_do_imm(compiler, (op_eax_imm), immw)) - -#endif - static sljit_s32 emit_cum_binary(struct sljit_compiler *compiler, sljit_u32 op_types, sljit_s32 dst, sljit_sw dstw, @@ -1605,23 +1591,10 @@ static sljit_s32 emit_cum_binary(struct sljit_compiler *compiler, sljit_s32 src2, sljit_sw src2w) { sljit_u8* inst; - sljit_u8 op_eax_imm = (op_types >> 24); - sljit_u8 op_rm = (op_types >> 16) & 0xff; - sljit_u8 op_mr = (op_types >> 8) & 0xff; - sljit_u8 op_imm = op_types & 0xff; - - if (dst == SLJIT_UNUSED) { - EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w); - if (src2 & SLJIT_IMM) { - BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0); - } - else { - inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w); - FAIL_IF(!inst); - *inst = op_rm; - } - return SLJIT_SUCCESS; - } + sljit_u8 op_eax_imm = U8(op_types >> 24); + sljit_u8 op_rm = U8((op_types >> 16) & 0xff); + sljit_u8 op_mr = U8((op_types >> 8) & 0xff); + sljit_u8 op_imm = U8(op_types & 0xff); if (dst == src1 && dstw == src1w) { if (src2 & SLJIT_IMM) { @@ -1725,23 +1698,10 @@ static sljit_s32 emit_non_cum_binary(struct sljit_compiler *compiler, sljit_s32 src2, sljit_sw src2w) { sljit_u8* inst; - sljit_u8 op_eax_imm = (op_types >> 24); - sljit_u8 op_rm = (op_types >> 16) & 0xff; - sljit_u8 op_mr = (op_types >> 8) & 0xff; - sljit_u8 op_imm = op_types & 0xff; - - if (dst == SLJIT_UNUSED) { - EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w); - if (src2 & SLJIT_IMM) { - BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0); - } - else { - inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w); - FAIL_IF(!inst); - *inst = op_rm; - } - return SLJIT_SUCCESS; - } + sljit_u8 op_eax_imm = U8(op_types >> 24); + sljit_u8 op_rm = U8((op_types >> 16) & 0xff); + sljit_u8 op_mr = U8((op_types >> 8) & 0xff); + sljit_u8 op_imm = U8(op_types & 0xff); if (dst == src1 && dstw == src1w) { if (src2 & SLJIT_IMM) { @@ -1810,9 +1770,7 @@ static sljit_s32 emit_mul(struct sljit_compiler *compiler, sljit_s32 src2, sljit_sw src2w) { sljit_u8* inst; - sljit_s32 dst_r; - - dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; + sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; /* Register destination. */ if (dst_r == src1 && !(src2 & SLJIT_IMM)) { @@ -1841,7 +1799,7 @@ static sljit_s32 emit_mul(struct sljit_compiler *compiler, inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); FAIL_IF(!inst); INC_SIZE(1); - *inst = (sljit_s8)src1w; + *inst = U8(src1w); } #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) else { @@ -1884,7 +1842,7 @@ static sljit_s32 emit_mul(struct sljit_compiler *compiler, inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); FAIL_IF(!inst); INC_SIZE(1); - *inst = (sljit_s8)src2w; + *inst = U8(src2w); } #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) else { @@ -2167,13 +2125,6 @@ static sljit_s32 emit_shift(struct sljit_compiler *compiler, *inst |= mode; return SLJIT_SUCCESS; } - if (dst == SLJIT_UNUSED) { - EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w); - inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0); - FAIL_IF(!inst); - *inst |= mode; - return SLJIT_SUCCESS; - } if (dst == SLJIT_PREF_SHIFT_REG && src2 == SLJIT_PREF_SHIFT_REG) { EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w); inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0); @@ -2206,7 +2157,7 @@ static sljit_s32 emit_shift(struct sljit_compiler *compiler, *inst |= mode; EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0); } - else if (SLOW_IS_REG(dst) && dst != src2 && !ADDRESSING_DEPENDS_ON(src2, dst)) { + else if (FAST_IS_REG(dst) && dst != src2 && dst != TMP_REG1 && !ADDRESSING_DEPENDS_ON(src2, dst)) { if (src1 != dst) EMIT_MOV(compiler, dst, 0, src1, src1w); EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_PREF_SHIFT_REG, 0); @@ -2235,7 +2186,7 @@ static sljit_s32 emit_shift(struct sljit_compiler *compiler, *inst |= mode; EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG2, 0); #endif - if (dst != SLJIT_UNUSED) + if (dst != TMP_REG1) return emit_mov(compiler, dst, dstw, TMP_REG1, 0); } @@ -2273,7 +2224,7 @@ static sljit_s32 emit_shift_with_flags(struct sljit_compiler *compiler, FAIL_IF(emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w)); if (FAST_IS_REG(dst)) - return emit_cmp_binary(compiler, (dst == SLJIT_UNUSED) ? TMP_REG1 : dst, dstw, SLJIT_IMM, 0); + return emit_cmp_binary(compiler, dst, dstw, SLJIT_IMM, 0); return SLJIT_SUCCESS; } @@ -2283,7 +2234,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile sljit_s32 src2, sljit_sw src2w) { CHECK_ERROR(); - CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); + CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(src1, src1w); ADJUST_LOCAL_OFFSET(src2, src2w); @@ -2292,11 +2243,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile CHECK_EXTRA_REGS(src1, src1w, (void)0); CHECK_EXTRA_REGS(src2, src2w, (void)0); #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) - compiler->mode32 = op & SLJIT_I32_OP; + compiler->mode32 = op & SLJIT_32; #endif - if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) - return SLJIT_SUCCESS; + SLJIT_ASSERT(dst != TMP_REG1 || HAS_FLAGS(op)); switch (GET_OPCODE(op)) { case SLJIT_ADD: @@ -2310,17 +2260,18 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile return emit_cum_binary(compiler, BINARY_OPCODE(ADC), dst, dstw, src1, src1w, src2, src2w); case SLJIT_SUB: + if (src1 == SLJIT_IMM && src1w == 0) + return emit_unary(compiler, NEG_rm, dst, dstw, src2, src2w); + if (!HAS_FLAGS(op)) { if ((src2 & SLJIT_IMM) && emit_lea_binary(compiler, dst, dstw, src1, src1w, SLJIT_IMM, -src2w) != SLJIT_ERR_UNSUPPORTED) return compiler->error; - if (SLOW_IS_REG(dst) && src2 == dst) { + if (FAST_IS_REG(dst) && src2 == dst) { FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), dst, 0, dst, 0, src1, src1w)); return emit_unary(compiler, NEG_rm, dst, 0, dst, 0); } } - if (dst == SLJIT_UNUSED) - return emit_cmp_binary(compiler, src1, src1w, src2, src2w); return emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), dst, dstw, src1, src1w, src2, src2w); case SLJIT_SUBC: @@ -2329,8 +2280,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile case SLJIT_MUL: return emit_mul(compiler, dst, dstw, src1, src1w, src2, src2w); case SLJIT_AND: - if (dst == SLJIT_UNUSED) - return emit_test_binary(compiler, src1, src1w, src2, src2w); return emit_cum_binary(compiler, BINARY_OPCODE(AND), dst, dstw, src1, src1w, src2, src2w); case SLJIT_OR: @@ -2353,6 +2302,38 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile return SLJIT_SUCCESS; } +SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, + sljit_s32 src1, sljit_sw src1w, + sljit_s32 src2, sljit_sw src2w) +{ + sljit_s32 opcode = GET_OPCODE(op); + + CHECK_ERROR(); + CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); + + if (opcode != SLJIT_SUB && opcode != SLJIT_AND) { +#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ + || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) + compiler->skip_checks = 1; +#endif + return sljit_emit_op2(compiler, op, TMP_REG1, 0, src1, src1w, src2, src2w); + } + + ADJUST_LOCAL_OFFSET(src1, src1w); + ADJUST_LOCAL_OFFSET(src2, src2w); + + CHECK_EXTRA_REGS(src1, src1w, (void)0); + CHECK_EXTRA_REGS(src2, src2w, (void)0); +#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) + compiler->mode32 = op & SLJIT_32; +#endif + + if (opcode == SLJIT_SUB) { + return emit_cmp_binary(compiler, src1, src1w, src2, src2w); + } + return emit_test_binary(compiler, src1, src1w, src2, src2w); +} + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw) { @@ -2369,7 +2350,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *comp /* Don't adjust shadow stack if it isn't enabled. */ if (!cpu_has_shadow_stack ()) return SLJIT_SUCCESS; - return adjust_shadow_stack(compiler, src, srcw, SLJIT_UNUSED, 0); + return adjust_shadow_stack(compiler, src, srcw); case SLJIT_PREFETCH_L1: case SLJIT_PREFETCH_L2: case SLJIT_PREFETCH_L3: @@ -2401,7 +2382,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg) } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, - void *instruction, sljit_s32 size) + void *instruction, sljit_u32 size) { sljit_u8 *inst; @@ -2420,13 +2401,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *c /* --------------------------------------------------------------------- */ /* Alignment(3) + 4 * 16 bytes. */ -static sljit_s32 sse2_data[3 + (4 * 4)]; -static sljit_s32 *sse2_buffer; +static sljit_u32 sse2_data[3 + (4 * 4)]; +static sljit_u32 *sse2_buffer; static void init_compiler(void) { /* Align to 16 bytes. */ - sse2_buffer = (sljit_s32*)(((sljit_uw)sse2_data + 15) & ~0xf); + sse2_buffer = (sljit_u32*)(((sljit_uw)sse2_data + 15) & ~(sljit_uw)0xf); /* Single precision constants (each constant is 16 byte long). */ sse2_buffer[0] = 0x80000000; @@ -2486,7 +2467,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_comp compiler->mode32 = 0; #endif - inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_F32_OP) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2_OP2, dst_r, 0, src, srcw); + inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_32) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2_OP2, dst_r, 0, src, srcw); FAIL_IF(!inst); *inst++ = GROUP_0F; *inst = CVTTSD2SI_r_xm; @@ -2518,7 +2499,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp srcw = 0; } - inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_F32_OP) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2_OP1, dst_r, 0, src, srcw); + inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_32) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2_OP1, dst_r, 0, src, srcw); FAIL_IF(!inst); *inst++ = GROUP_0F; *inst = CVTSI2SD_x_rm; @@ -2527,7 +2508,7 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_comp compiler->mode32 = 1; #endif if (dst_r == TMP_FREG) - return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG); + return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG); return SLJIT_SUCCESS; } @@ -2536,11 +2517,11 @@ static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compile sljit_s32 src2, sljit_sw src2w) { if (!FAST_IS_REG(src1)) { - FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, TMP_FREG, src1, src1w)); + FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src1, src1w)); src1 = TMP_FREG; } - return emit_sse2_logic(compiler, UCOMISD_x_xm, !(op & SLJIT_F32_OP), src1, src2, src2w); + return emit_sse2_logic(compiler, UCOMISD_x_xm, !(op & SLJIT_32), src1, src2, src2w); } SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, @@ -2558,11 +2539,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil if (GET_OPCODE(op) == SLJIT_MOV_F64) { if (FAST_IS_REG(dst)) - return emit_sse2_load(compiler, op & SLJIT_F32_OP, dst, src, srcw); + return emit_sse2_load(compiler, op & SLJIT_32, dst, src, srcw); if (FAST_IS_REG(src)) - return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, src); - FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, TMP_FREG, src, srcw)); - return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG); + return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, src); + FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src, srcw)); + return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG); } if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) { @@ -2571,41 +2552,41 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compil /* We overwrite the high bits of source. From SLJIT point of view, this is not an issue. Note: In SSE3, we could also use MOVDDUP and MOVSLDUP. */ - FAIL_IF(emit_sse2_logic(compiler, UNPCKLPD_x_xm, op & SLJIT_F32_OP, src, src, 0)); + FAIL_IF(emit_sse2_logic(compiler, UNPCKLPD_x_xm, op & SLJIT_32, src, src, 0)); } else { - FAIL_IF(emit_sse2_load(compiler, !(op & SLJIT_F32_OP), TMP_FREG, src, srcw)); + FAIL_IF(emit_sse2_load(compiler, !(op & SLJIT_32), TMP_FREG, src, srcw)); src = TMP_FREG; } - FAIL_IF(emit_sse2_logic(compiler, CVTPD2PS_x_xm, op & SLJIT_F32_OP, dst_r, src, 0)); + FAIL_IF(emit_sse2_logic(compiler, CVTPD2PS_x_xm, op & SLJIT_32, dst_r, src, 0)); if (dst_r == TMP_FREG) - return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG); + return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG); return SLJIT_SUCCESS; } if (FAST_IS_REG(dst)) { dst_r = dst; if (dst != src) - FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, dst_r, src, srcw)); + FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, dst_r, src, srcw)); } else { dst_r = TMP_FREG; - FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, dst_r, src, srcw)); + FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, dst_r, src, srcw)); } switch (GET_OPCODE(op)) { case SLJIT_NEG_F64: - FAIL_IF(emit_sse2_logic(compiler, XORPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_F32_OP ? sse2_buffer : sse2_buffer + 8))); + FAIL_IF(emit_sse2_logic(compiler, XORPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_32 ? sse2_buffer : sse2_buffer + 8))); break; case SLJIT_ABS_F64: - FAIL_IF(emit_sse2_logic(compiler, ANDPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_F32_OP ? sse2_buffer + 4 : sse2_buffer + 12))); + FAIL_IF(emit_sse2_logic(compiler, ANDPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_32 ? sse2_buffer + 4 : sse2_buffer + 12))); break; } if (dst_r == TMP_FREG) - return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG); + return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG); return SLJIT_SUCCESS; } @@ -2636,37 +2617,37 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compil src2w = src1w; } else if (dst != src2) - FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, dst_r, src1, src1w)); + FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, dst_r, src1, src1w)); else { dst_r = TMP_FREG; - FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, TMP_FREG, src1, src1w)); + FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src1, src1w)); } } else { dst_r = TMP_FREG; - FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, TMP_FREG, src1, src1w)); + FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src1, src1w)); } switch (GET_OPCODE(op)) { case SLJIT_ADD_F64: - FAIL_IF(emit_sse2(compiler, ADDSD_x_xm, op & SLJIT_F32_OP, dst_r, src2, src2w)); + FAIL_IF(emit_sse2(compiler, ADDSD_x_xm, op & SLJIT_32, dst_r, src2, src2w)); break; case SLJIT_SUB_F64: - FAIL_IF(emit_sse2(compiler, SUBSD_x_xm, op & SLJIT_F32_OP, dst_r, src2, src2w)); + FAIL_IF(emit_sse2(compiler, SUBSD_x_xm, op & SLJIT_32, dst_r, src2, src2w)); break; case SLJIT_MUL_F64: - FAIL_IF(emit_sse2(compiler, MULSD_x_xm, op & SLJIT_F32_OP, dst_r, src2, src2w)); + FAIL_IF(emit_sse2(compiler, MULSD_x_xm, op & SLJIT_32, dst_r, src2, src2w)); break; case SLJIT_DIV_F64: - FAIL_IF(emit_sse2(compiler, DIVSD_x_xm, op & SLJIT_F32_OP, dst_r, src2, src2w)); + FAIL_IF(emit_sse2(compiler, DIVSD_x_xm, op & SLJIT_32, dst_r, src2, src2w)); break; } if (dst_r == TMP_FREG) - return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG); + return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG); return SLJIT_SUCCESS; } @@ -2708,7 +2689,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compile jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); PTR_FAIL_IF_NULL(jump); - set_jump(jump, compiler, (type & SLJIT_REWRITABLE_JUMP) | ((type & 0xff) << TYPE_SHIFT)); + set_jump(jump, compiler, (sljit_u32)((type & SLJIT_REWRITABLE_JUMP) | ((type & 0xff) << TYPE_SHIFT))); type &= 0xff; /* Worst case size. */ @@ -2740,8 +2721,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi if (src == SLJIT_IMM) { jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); FAIL_IF_NULL(jump); - set_jump(jump, compiler, JUMP_ADDR | (type << TYPE_SHIFT)); - jump->u.target = srcw; + set_jump(jump, compiler, (sljit_u32)(JUMP_ADDR | (type << TYPE_SHIFT))); + jump->u.target = (sljit_uw)srcw; /* Worst case size. */ #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) @@ -2764,7 +2745,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compi inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw); FAIL_IF(!inst); *inst++ = GROUP_FF; - *inst |= (type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm; + *inst = U8(*inst | ((type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm)); } return SLJIT_SUCCESS; } @@ -2790,7 +2771,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co type &= 0xff; /* setcc = jcc + 0x10. */ - cond_set = get_jump_code(type) + 0x10; + cond_set = U8(get_jump_code((sljit_uw)type) + 0x10); #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst)) { @@ -2802,9 +2783,9 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co *inst++ = GROUP_0F; *inst++ = cond_set; *inst++ = MOD_REG | reg_lmap[TMP_REG1]; - *inst++ = REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B); + *inst++ = U8(REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B)); *inst++ = OR_rm8_r8; - *inst++ = MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst]; + *inst++ = U8(MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst]); return SLJIT_SUCCESS; } @@ -2822,7 +2803,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co /* The movzx instruction does not affect flags. */ *inst++ = GROUP_0F; *inst++ = MOVZX_r_rm8; - *inst = MOD_REG | (reg_lmap[reg] << 3) | reg_lmap[reg]; + *inst = U8(MOD_REG | (reg_lmap[reg] << 3) | reg_lmap[reg]); if (reg != TMP_REG1) return SLJIT_SUCCESS; @@ -2849,11 +2830,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co /* Set low byte to conditional flag. */ *inst++ = GROUP_0F; *inst++ = cond_set; - *inst++ = MOD_REG | reg_map[dst]; + *inst++ = U8(MOD_REG | reg_map[dst]); *inst++ = GROUP_0F; *inst++ = MOVZX_r_rm8; - *inst = MOD_REG | (reg_map[dst] << 3) | reg_map[dst]; + *inst = U8(MOD_REG | (reg_map[dst] << 3) | reg_map[dst]); return SLJIT_SUCCESS; } @@ -2872,15 +2853,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co *inst++ = GROUP_0F; /* cmovcc = setcc - 0x50. */ - *inst++ = cond_set - 0x50; - *inst++ = MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1]; + *inst++ = U8(cond_set - 0x50); + *inst++ = U8(MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1]); return SLJIT_SUCCESS; } inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1); FAIL_IF(!inst); INC_SIZE(1 + 3 + 3 + 1); - *inst++ = XCHG_EAX_r + reg_map[TMP_REG1]; + *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]); /* Set al to conditional flag. */ *inst++ = GROUP_0F; *inst++ = cond_set; @@ -2888,8 +2869,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co *inst++ = GROUP_0F; *inst++ = MOVZX_r_rm8; - *inst++ = MOD_REG | (reg_map[dst] << 3) | 0 /* eax */; - *inst++ = XCHG_EAX_r + reg_map[TMP_REG1]; + *inst++ = U8(MOD_REG | (reg_map[dst] << 3) | 0 /* eax */); + *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]); return SLJIT_SUCCESS; } @@ -2901,13 +2882,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co FAIL_IF(!inst); INC_SIZE(1 + 3 + 2 + 1); /* Set low register to conditional flag. */ - *inst++ = XCHG_EAX_r + reg_map[TMP_REG1]; + *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]); *inst++ = GROUP_0F; *inst++ = cond_set; *inst++ = MOD_REG | 0 /* eax */; *inst++ = OR_rm8_r8; *inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst]; - *inst++ = XCHG_EAX_r + reg_map[TMP_REG1]; + *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]); } else { inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + 3 + 2 + 2); @@ -2915,14 +2896,14 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co INC_SIZE(2 + 3 + 2 + 2); /* Set low register to conditional flag. */ *inst++ = XCHG_r_rm; - *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1]; + *inst++ = U8(MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1]); *inst++ = GROUP_0F; *inst++ = cond_set; *inst++ = MOD_REG | 1 /* ecx */; *inst++ = OR_rm8_r8; *inst++ = MOD_REG | (1 /* ecx */ << 3) | 0 /* eax */; *inst++ = XCHG_r_rm; - *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1]; + *inst++ = U8(MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1]); } return SLJIT_SUCCESS; } @@ -2931,7 +2912,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1); FAIL_IF(!inst); INC_SIZE(1 + 3 + 3 + 1); - *inst++ = XCHG_EAX_r + reg_map[TMP_REG1]; + *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]); /* Set al to conditional flag. */ *inst++ = GROUP_0F; *inst++ = cond_set; @@ -2941,7 +2922,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *co *inst++ = MOVZX_r_rm8; *inst++ = MOD_REG | (0 << 3) /* eax */ | 0 /* eax */; - *inst++ = XCHG_EAX_r + reg_map[TMP_REG1]; + *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]); if (GET_OPCODE(op) < SLJIT_ADD) return emit_mov(compiler, dst, dstw, TMP_REG1, 0); @@ -2964,7 +2945,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil CHECK(check_sljit_emit_cmov(compiler, type, dst_reg, src, srcw)); #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) - dst_reg &= ~SLJIT_I32_OP; + dst_reg &= ~SLJIT_32; if (!sljit_has_cpu_feature(SLJIT_HAS_CMOV) || (dst_reg >= SLJIT_R3 && dst_reg <= SLJIT_S3)) return sljit_emit_cmov_generic(compiler, type, dst_reg, src, srcw); @@ -2977,8 +2958,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil CHECK_EXTRA_REGS(src, srcw, (void)0); #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) - compiler->mode32 = dst_reg & SLJIT_I32_OP; - dst_reg &= ~SLJIT_I32_OP; + compiler->mode32 = dst_reg & SLJIT_32; + dst_reg &= ~SLJIT_32; #endif if (SLJIT_UNLIKELY(src & SLJIT_IMM)) { @@ -2990,7 +2971,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compil inst = emit_x86_instruction(compiler, 2, dst_reg, 0, src, srcw); FAIL_IF(!inst); *inst++ = GROUP_0F; - *inst = get_jump_code(type & 0xff) - 0x40; + *inst = U8(get_jump_code(type & 0xff) - 0x40); return SLJIT_SUCCESS; } @@ -3123,9 +3104,9 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta SLJIT_UPDATE_WX_FLAGS((void*)addr, (void*)(addr + sizeof(sljit_uw)), 0); #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) - sljit_unaligned_store_sw((void*)addr, new_target - (addr + 4) - (sljit_uw)executable_offset); + sljit_unaligned_store_sw((void*)addr, (sljit_sw)(new_target - (addr + 4) - (sljit_uw)executable_offset)); #else - sljit_unaligned_store_sw((void*)addr, (sljit_sw) new_target); + sljit_unaligned_store_sw((void*)addr, (sljit_sw)new_target); #endif SLJIT_UPDATE_WX_FLAGS((void*)addr, (void*)(addr + sizeof(sljit_uw)), 1); } diff --git a/thirdparty/pcre2/src/sljit/sljitProtExecAllocator.c b/thirdparty/pcre2/src/sljit/sljitProtExecAllocator.c index 147175afa6..915411fbed 100644 --- a/thirdparty/pcre2/src/sljit/sljitProtExecAllocator.c +++ b/thirdparty/pcre2/src/sljit/sljitProtExecAllocator.c @@ -66,7 +66,7 @@ /* --------------------------------------------------------------------- */ /* 64 KByte. */ -#define CHUNK_SIZE 0x10000 +#define CHUNK_SIZE (sljit_uw)0x10000 struct chunk_header { void *executable; @@ -194,7 +194,7 @@ static SLJIT_INLINE struct chunk_header* alloc_chunk(sljit_uw size) if (fd == -1) return NULL; - if (ftruncate(fd, size)) { + if (ftruncate(fd, (off_t)size)) { close(fd); return NULL; } @@ -281,7 +281,7 @@ struct free_block { #define AS_FREE_BLOCK(base, offset) \ ((struct free_block*)(((sljit_u8*)base) + offset)) #define MEM_START(base) ((void*)((base) + 1)) -#define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7) & ~7) +#define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7u) & ~(sljit_uw)7) static struct free_block* free_blocks; static sljit_uw allocated_size; diff --git a/thirdparty/pcre2/src/sljit/sljitUtils.c b/thirdparty/pcre2/src/sljit/sljitUtils.c index 9bce714735..967593b157 100644 --- a/thirdparty/pcre2/src/sljit/sljitUtils.c +++ b/thirdparty/pcre2/src/sljit/sljitUtils.c @@ -131,12 +131,12 @@ static SLJIT_INLINE int open_dev_zero(void) #ifdef _WIN32 -static SLJIT_INLINE sljit_sw get_page_alignment(void) { +static SLJIT_INLINE sljit_uw get_page_alignment(void) { SYSTEM_INFO si; - static sljit_sw sljit_page_align; + static sljit_uw sljit_page_align = 0; if (!sljit_page_align) { GetSystemInfo(&si); - sljit_page_align = si.dwPageSize - 1; + sljit_page_align = (sljit_uw)si.dwPageSize - 1; } return sljit_page_align; } @@ -145,18 +145,21 @@ static SLJIT_INLINE sljit_sw get_page_alignment(void) { #include <unistd.h> -static SLJIT_INLINE sljit_sw get_page_alignment(void) { - static sljit_sw sljit_page_align = -1; - if (sljit_page_align < 0) { +static SLJIT_INLINE sljit_uw get_page_alignment(void) { + static sljit_uw sljit_page_align = 0; + + sljit_sw align; + + if (!sljit_page_align) { #ifdef _SC_PAGESIZE - sljit_page_align = sysconf(_SC_PAGESIZE); + align = sysconf(_SC_PAGESIZE); #else - sljit_page_align = getpagesize(); + align = getpagesize(); #endif /* Should never happen. */ - if (sljit_page_align < 0) - sljit_page_align = 4096; - sljit_page_align--; + if (align < 0) + align = 4096; + sljit_page_align = (sljit_uw)align - 1; } return sljit_page_align; } @@ -227,7 +230,7 @@ SLJIT_API_FUNC_ATTRIBUTE void SLJIT_FUNC sljit_free_stack(struct sljit_stack *st SLJIT_API_FUNC_ATTRIBUTE void SLJIT_FUNC sljit_free_stack(struct sljit_stack *stack, void *allocator_data) { SLJIT_UNUSED_ARG(allocator_data); - munmap((void*)stack->min_start, stack->end - stack->min_start); + munmap((void*)stack->min_start, (size_t)(stack->end - stack->min_start)); SLJIT_FREE(stack, allocator_data); } @@ -237,7 +240,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_FUNC sljit_allocate_stack(slj { struct sljit_stack *stack; void *ptr; - sljit_sw page_align; + sljit_uw page_align; SLJIT_UNUSED_ARG(allocator_data); @@ -295,7 +298,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_u8 *SLJIT_FUNC sljit_stack_resize(struct sljit_st #if defined _WIN32 || defined(POSIX_MADV_DONTNEED) sljit_uw aligned_old_start; sljit_uw aligned_new_start; - sljit_sw page_align; + sljit_uw page_align; #endif if ((new_start < stack->min_start) || (new_start >= stack->end)) diff --git a/thirdparty/recastnavigation/Recast/Include/RecastAlloc.h b/thirdparty/recastnavigation/Recast/Include/RecastAlloc.h index e436af9a01..071278d659 100644 --- a/thirdparty/recastnavigation/Recast/Include/RecastAlloc.h +++ b/thirdparty/recastnavigation/Recast/Include/RecastAlloc.h @@ -22,7 +22,7 @@ #include <stddef.h> #include <stdint.h> -#include <RecastAssert.h> +#include "RecastAssert.h" /// Provides hint values to the memory allocator on how long the /// memory is expected to be used. @@ -106,6 +106,8 @@ class rcVectorBase { // Creates an array of the given size, copies all of this vector's data into it, and returns it. T* allocate_and_copy(rcSizeType size); void resize_impl(rcSizeType size, const T* value); + // Requires: min_capacity > m_cap. + rcSizeType get_new_capacity(rcSizeType min_capacity); public: typedef rcSizeType size_type; typedef T value_type; @@ -196,8 +198,7 @@ void rcVectorBase<T, H>::push_back(const T& value) { return; } - rcAssert(RC_SIZE_MAX / 2 >= m_size); - rcSizeType new_cap = m_size ? 2*m_size : 1; + const rcSizeType new_cap = get_new_capacity(m_cap + 1); T* data = allocate_and_copy(new_cap); // construct between allocate and destroy+free in case value is // in this vector. @@ -208,25 +209,44 @@ void rcVectorBase<T, H>::push_back(const T& value) { rcFree(m_data); m_data = data; } + +template <typename T, rcAllocHint H> +rcSizeType rcVectorBase<T, H>::get_new_capacity(rcSizeType min_capacity) { + rcAssert(min_capacity <= RC_SIZE_MAX); + if (rcUnlikely(m_cap >= RC_SIZE_MAX / 2)) + return RC_SIZE_MAX; + return 2 * m_cap > min_capacity ? 2 * m_cap : min_capacity; +} + template <typename T, rcAllocHint H> void rcVectorBase<T, H>::resize_impl(rcSizeType size, const T* value) { if (size < m_size) { destroy_range(size, m_size); m_size = size; } else if (size > m_size) { - T* new_data = allocate_and_copy(size); - // We defer deconstructing/freeing old data until after constructing - // new elements in case "value" is there. - if (value) { - construct_range(new_data + m_size, new_data + size, *value); + if (size <= m_cap) { + if (value) { + construct_range(m_data + m_size, m_data + size, *value); + } else { + construct_range(m_data + m_size, m_data + size); + } + m_size = size; } else { - construct_range(new_data + m_size, new_data + size); + const rcSizeType new_cap = get_new_capacity(size); + T* new_data = allocate_and_copy(new_cap); + // We defer deconstructing/freeing old data until after constructing + // new elements in case "value" is there. + if (value) { + construct_range(new_data + m_size, new_data + size, *value); + } else { + construct_range(new_data + m_size, new_data + size); + } + destroy_range(0, m_size); + rcFree(m_data); + m_data = new_data; + m_cap = new_cap; + m_size = size; } - destroy_range(0, m_size); - rcFree(m_data); - m_data = new_data; - m_cap = size; - m_size = size; } } template <typename T, rcAllocHint H> @@ -303,6 +323,7 @@ public: rcIntArray(int n) : m_impl(n, 0) {} void push(int item) { m_impl.push_back(item); } void resize(int size) { m_impl.resize(size); } + void clear() { m_impl.clear(); } int pop() { int v = m_impl.back(); diff --git a/thirdparty/recastnavigation/Recast/Source/RecastContour.cpp b/thirdparty/recastnavigation/Recast/Source/RecastContour.cpp index 6574c11b6b..1293d4fbde 100644 --- a/thirdparty/recastnavigation/Recast/Source/RecastContour.cpp +++ b/thirdparty/recastnavigation/Recast/Source/RecastContour.cpp @@ -921,8 +921,8 @@ bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf, continue; const unsigned char area = chf.areas[i]; - verts.resize(0); - simplified.resize(0); + verts.clear(); + simplified.clear(); ctx->startTimer(RC_TIMER_BUILD_CONTOURS_TRACE); walkContour(x, y, i, chf, flags, verts); diff --git a/thirdparty/recastnavigation/Recast/Source/RecastMeshDetail.cpp b/thirdparty/recastnavigation/Recast/Source/RecastMeshDetail.cpp index 9a423cab8a..1999200c1a 100644 --- a/thirdparty/recastnavigation/Recast/Source/RecastMeshDetail.cpp +++ b/thirdparty/recastnavigation/Recast/Source/RecastMeshDetail.cpp @@ -653,8 +653,8 @@ static bool buildPolyDetail(rcContext* ctx, const float* in, const int nin, for (int i = 0; i < nin; ++i) rcVcopy(&verts[i*3], &in[i*3]); - edges.resize(0); - tris.resize(0); + edges.clear(); + tris.clear(); const float cs = chf.cs; const float ics = 1.0f/cs; @@ -803,7 +803,7 @@ static bool buildPolyDetail(rcContext* ctx, const float* in, const int nin, int x1 = (int)ceilf(bmax[0]/sampleDist); int z0 = (int)floorf(bmin[2]/sampleDist); int z1 = (int)ceilf(bmax[2]/sampleDist); - samples.resize(0); + samples.clear(); for (int z = z0; z < z1; ++z) { for (int x = x0; x < x1; ++x) @@ -864,8 +864,8 @@ static bool buildPolyDetail(rcContext* ctx, const float* in, const int nin, // Create new triangulation. // TODO: Incremental add instead of full rebuild. - edges.resize(0); - tris.resize(0); + edges.clear(); + tris.clear(); delaunayHull(ctx, nverts, verts, nhull, hull, tris, edges); } } @@ -935,7 +935,7 @@ static void seedArrayWithPolyCenter(rcContext* ctx, const rcCompactHeightfield& pcy /= npoly; // Use seeds array as a stack for DFS - array.resize(0); + array.clear(); array.push(startCellX); array.push(startCellY); array.push(startSpanIndex); @@ -1001,7 +1001,7 @@ static void seedArrayWithPolyCenter(rcContext* ctx, const rcCompactHeightfield& rcSwap(dirs[directDir], dirs[3]); } - array.resize(0); + array.clear(); // getHeightData seeds are given in coordinates with borders array.push(cx+bs); array.push(cy+bs); @@ -1030,7 +1030,7 @@ static void getHeightData(rcContext* ctx, const rcCompactHeightfield& chf, // Note: Reads to the compact heightfield are offset by border size (bs) // since border size offset is already removed from the polymesh vertices. - queue.resize(0); + queue.clear(); // Set all heights to RC_UNSET_HEIGHT. memset(hp.data, 0xff, sizeof(unsigned short)*hp.width*hp.height); diff --git a/thirdparty/recastnavigation/Recast/Source/RecastRegion.cpp b/thirdparty/recastnavigation/Recast/Source/RecastRegion.cpp index e1fc0ee788..48318688bc 100644 --- a/thirdparty/recastnavigation/Recast/Source/RecastRegion.cpp +++ b/thirdparty/recastnavigation/Recast/Source/RecastRegion.cpp @@ -650,7 +650,7 @@ static bool mergeRegions(rcRegion& rega, rcRegion& regb) return false; // Merge neighbours. - rega.connections.resize(0); + rega.connections.clear(); for (int i = 0, ni = acon.size(); i < ni-1; ++i) rega.connections.push(acon[(insa+1+i) % ni]); @@ -876,8 +876,8 @@ static bool mergeAndFilterRegions(rcContext* ctx, int minRegionArea, int mergeRe // Also keep track of the regions connects to a tile border. bool connectsToBorder = false; int spanCount = 0; - stack.resize(0); - trace.resize(0); + stack.clear(); + trace.clear(); reg.visited = true; stack.push(i); @@ -1068,7 +1068,7 @@ static bool mergeAndFilterLayerRegions(rcContext* ctx, int minRegionArea, { const rcCompactCell& c = chf.cells[x+y*w]; - lregs.resize(0); + lregs.clear(); for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) { @@ -1139,7 +1139,7 @@ static bool mergeAndFilterLayerRegions(rcContext* ctx, int minRegionArea, // Start search. root.id = layerId; - stack.resize(0); + stack.clear(); stack.push(i); while (stack.size() > 0) diff --git a/thirdparty/rvo2/API.h b/thirdparty/rvo2/API.h deleted file mode 100644 index c64efb452c..0000000000 --- a/thirdparty/rvo2/API.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * API.h - * RVO2-3D Library - * - * Copyright 2008 University of North Carolina at Chapel Hill - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Please send all bug reports to <geom@cs.unc.edu>. - * - * The authors may be contacted via: - * - * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha - * Dept. of Computer Science - * 201 S. Columbia St. - * Frederick P. Brooks, Jr. Computer Science Bldg. - * Chapel Hill, N.C. 27599-3175 - * United States of America - * - * <http://gamma.cs.unc.edu/RVO2/> - */ - -/** - * \file API.h - * \brief Contains definitions related to Microsoft Windows. - */ - -#ifndef RVO_API_H_ -#define RVO_API_H_ - -// -- GODOT start -- -#define RVO_API -// -- GODOT end -- - -#endif /* RVO_API_H_ */ diff --git a/thirdparty/rvo2/Agent.cpp b/thirdparty/rvo2/Agent.cpp index 851d780758..b35eee9c12 100644 --- a/thirdparty/rvo2/Agent.cpp +++ b/thirdparty/rvo2/Agent.cpp @@ -8,7 +8,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,40 +27,40 @@ * Chapel Hill, N.C. 27599-3175 * United States of America * - * <http://gamma.cs.unc.edu/RVO2/> + * <https://gamma.cs.unc.edu/RVO2/> */ #include "Agent.h" -#include <algorithm> #include <cmath> +#include <algorithm> #include "Definitions.h" #include "KdTree.h" namespace RVO { -/** + /** * \brief A sufficiently small positive number. */ -const float RVO_EPSILON = 0.00001f; + const float RVO3D_EPSILON = 0.00001f; -/** + /** * \brief Defines a directed line. */ -class Line { -public: - /** + class Line { + public: + /** * \brief The direction of the directed line. */ - Vector3 direction; + Vector3 direction; - /** + /** * \brief A point on the directed line. */ - Vector3 point; -}; + Vector3 point; + }; -/** + /** * \brief Solves a one-dimensional linear program on a specified line subject to linear constraints defined by planes and a spherical constraint. * \param planes Planes defining the linear constraints. * \param planeNo The plane on which the line lies. @@ -71,9 +71,9 @@ public: * \param result A reference to the result of the linear program. * \return True if successful. */ -bool linearProgram1(const std::vector<Plane> &planes, size_t planeNo, const Line &line, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result); + bool linearProgram1(const std::vector<Plane> &planes, size_t planeNo, const Line &line, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result); -/** + /** * \brief Solves a two-dimensional linear program on a specified plane subject to linear constraints defined by planes and a spherical constraint. * \param planes Planes defining the linear constraints. * \param planeNo The plane on which the 2-d linear program is solved @@ -83,9 +83,9 @@ bool linearProgram1(const std::vector<Plane> &planes, size_t planeNo, const Line * \param result A reference to the result of the linear program. * \return True if successful. */ -bool linearProgram2(const std::vector<Plane> &planes, size_t planeNo, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result); + bool linearProgram2(const std::vector<Plane> &planes, size_t planeNo, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result); -/** + /** * \brief Solves a three-dimensional linear program subject to linear constraints defined by planes and a spherical constraint. * \param planes Planes defining the linear constraints. * \param radius The radius of the spherical constraint. @@ -94,332 +94,352 @@ bool linearProgram2(const std::vector<Plane> &planes, size_t planeNo, float radi * \param result A reference to the result of the linear program. * \return The number of the plane it fails on, and the number of planes if successful. */ -size_t linearProgram3(const std::vector<Plane> &planes, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result); + size_t linearProgram3(const std::vector<Plane> &planes, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result); -/** + /** * \brief Solves a four-dimensional linear program subject to linear constraints defined by planes and a spherical constraint. * \param planes Planes defining the linear constraints. * \param beginPlane The plane on which the 3-d linear program failed. * \param radius The radius of the spherical constraint. * \param result A reference to the result of the linear program. */ -void linearProgram4(const std::vector<Plane> &planes, size_t beginPlane, float radius, Vector3 &result); + void linearProgram4(const std::vector<Plane> &planes, size_t beginPlane, float radius, Vector3 &result); -Agent::Agent() : - id_(0), maxNeighbors_(0), maxSpeed_(0.0f), neighborDist_(0.0f), radius_(0.0f), timeHorizon_(0.0f), ignore_y_(false) {} + Agent::Agent() : id_(0), maxNeighbors_(0), maxSpeed_(0.0f), neighborDist_(0.0f), radius_(0.0f), timeHorizon_(0.0f), ignore_y_(false) { } -void Agent::computeNeighbors(KdTree *kdTree_) { - agentNeighbors_.clear(); - if (maxNeighbors_ > 0) { - kdTree_->computeAgentNeighbors(this, neighborDist_ * neighborDist_); - } -} + void Agent::computeNeighbors(KdTree *kdTree_) + { + agentNeighbors_.clear(); + if (maxNeighbors_ > 0) { + kdTree_->computeAgentNeighbors(this, neighborDist_ * neighborDist_); + } + } + void Agent::computeNewVelocity(float timeStep) + { + orcaPlanes_.clear(); + const float invTimeHorizon = 1.0f / timeHorizon_; + + /* Create agent ORCA planes. */ + for (size_t i = 0; i < agentNeighbors_.size(); ++i) { + const Agent *const other = agentNeighbors_[i].second; + + Vector3 relativePosition = other->position_ - position_; + Vector3 relativeVelocity = velocity_ - other->velocity_; + const float combinedRadius = radius_ + other->radius_; + + // This is a Godot feature that allow the agents to avoid the collision + // by moving only on the horizontal plane relative to the player velocity. + if (ignore_y_) { + // Skip if these are in two different heights #define ABS(m_v) (((m_v) < 0) ? (-(m_v)) : (m_v)) -void Agent::computeNewVelocity(float timeStep) { - orcaPlanes_.clear(); - const float invTimeHorizon = 1.0f / timeHorizon_; - - /* Create agent ORCA planes. */ - for (size_t i = 0; i < agentNeighbors_.size(); ++i) { - const Agent *const other = agentNeighbors_[i].second; - - Vector3 relativePosition = other->position_ - position_; - Vector3 relativeVelocity = velocity_ - other->velocity_; - const float combinedRadius = radius_ + other->radius_; - - // This is a Godot feature that allow the agents to avoid the collision - // by moving only on the horizontal plane relative to the player velocity. - if (ignore_y_) { - // Skip if these are in two different heights - if (ABS(relativePosition[1]) > combinedRadius * 2) { - continue; - } - relativePosition[1] = 0; - relativeVelocity[1] = 0; - } - - const float distSq = absSq(relativePosition); - const float combinedRadiusSq = sqr(combinedRadius); - - Plane plane; - Vector3 u; - - if (distSq > combinedRadiusSq) { - /* No collision. */ - const Vector3 w = relativeVelocity - invTimeHorizon * relativePosition; - /* Vector from cutoff center to relative velocity. */ - const float wLengthSq = absSq(w); - - const float dotProduct = w * relativePosition; - - if (dotProduct < 0.0f && sqr(dotProduct) > combinedRadiusSq * wLengthSq) { - /* Project on cut-off circle. */ - const float wLength = std::sqrt(wLengthSq); - const Vector3 unitW = w / wLength; - - plane.normal = unitW; - u = (combinedRadius * invTimeHorizon - wLength) * unitW; - } else { - /* Project on cone. */ - const float a = distSq; - const float b = relativePosition * relativeVelocity; - const float c = absSq(relativeVelocity) - absSq(cross(relativePosition, relativeVelocity)) / (distSq - combinedRadiusSq); - const float t = (b + std::sqrt(sqr(b) - a * c)) / a; - const Vector3 w = relativeVelocity - t * relativePosition; + if (ABS(relativePosition[1]) > combinedRadius * 2) { + continue; + } + relativePosition[1] = 0; + relativeVelocity[1] = 0; + } + + const float distSq = absSq(relativePosition); + const float combinedRadiusSq = sqr(combinedRadius); + + Plane plane; + Vector3 u; + + if (distSq > combinedRadiusSq) { + /* No collision. */ + const Vector3 w = relativeVelocity - invTimeHorizon * relativePosition; + /* Vector from cutoff center to relative velocity. */ + const float wLengthSq = absSq(w); + + const float dotProduct = w * relativePosition; + + if (dotProduct < 0.0f && sqr(dotProduct) > combinedRadiusSq * wLengthSq) { + /* Project on cut-off circle. */ + const float wLength = std::sqrt(wLengthSq); + const Vector3 unitW = w / wLength; + + plane.normal = unitW; + u = (combinedRadius * invTimeHorizon - wLength) * unitW; + } + else { + /* Project on cone. */ + const float a = distSq; + const float b = relativePosition * relativeVelocity; + const float c = absSq(relativeVelocity) - absSq(cross(relativePosition, relativeVelocity)) / (distSq - combinedRadiusSq); + const float t = (b + std::sqrt(sqr(b) - a * c)) / a; + const Vector3 ww = relativeVelocity - t * relativePosition; + const float wwLength = abs(ww); + const Vector3 unitWW = ww / wwLength; + + plane.normal = unitWW; + u = (combinedRadius * t - wwLength) * unitWW; + } + } + else { + /* Collision. */ + const float invTimeStep = 1.0f / timeStep; + const Vector3 w = relativeVelocity - invTimeStep * relativePosition; const float wLength = abs(w); const Vector3 unitW = w / wLength; plane.normal = unitW; - u = (combinedRadius * t - wLength) * unitW; + u = (combinedRadius * invTimeStep - wLength) * unitW; } - } else { - /* Collision. */ - const float invTimeStep = 1.0f / timeStep; - const Vector3 w = relativeVelocity - invTimeStep * relativePosition; - const float wLength = abs(w); - const Vector3 unitW = w / wLength; - - plane.normal = unitW; - u = (combinedRadius * invTimeStep - wLength) * unitW; - } - plane.point = velocity_ + 0.5f * u; - orcaPlanes_.push_back(plane); - } + plane.point = velocity_ + 0.5f * u; + orcaPlanes_.push_back(plane); + } - const size_t planeFail = linearProgram3(orcaPlanes_, maxSpeed_, prefVelocity_, false, newVelocity_); + const size_t planeFail = linearProgram3(orcaPlanes_, maxSpeed_, prefVelocity_, false, newVelocity_); - if (planeFail < orcaPlanes_.size()) { - linearProgram4(orcaPlanes_, planeFail, maxSpeed_, newVelocity_); - } + if (planeFail < orcaPlanes_.size()) { + linearProgram4(orcaPlanes_, planeFail, maxSpeed_, newVelocity_); + } - if (ignore_y_) { - // Not 100% necessary, but better to have. - newVelocity_[1] = prefVelocity_[1]; - } -} + if (ignore_y_) { + // Not 100% necessary, but better to have. + newVelocity_[1] = prefVelocity_[1]; + } + } -void Agent::insertAgentNeighbor(const Agent *agent, float &rangeSq) { - if (this != agent) { - const float distSq = absSq(position_ - agent->position_); + void Agent::insertAgentNeighbor(const Agent *agent, float &rangeSq) + { + if (this != agent) { + const float distSq = absSq(position_ - agent->position_); - if (distSq < rangeSq) { - if (agentNeighbors_.size() < maxNeighbors_) { - agentNeighbors_.push_back(std::make_pair(distSq, agent)); - } + if (distSq < rangeSq) { + if (agentNeighbors_.size() < maxNeighbors_) { + agentNeighbors_.push_back(std::make_pair(distSq, agent)); + } - size_t i = agentNeighbors_.size() - 1; + size_t i = agentNeighbors_.size() - 1; - while (i != 0 && distSq < agentNeighbors_[i - 1].first) { - agentNeighbors_[i] = agentNeighbors_[i - 1]; - --i; - } + while (i != 0 && distSq < agentNeighbors_[i - 1].first) { + agentNeighbors_[i] = agentNeighbors_[i - 1]; + --i; + } - agentNeighbors_[i] = std::make_pair(distSq, agent); + agentNeighbors_[i] = std::make_pair(distSq, agent); - if (agentNeighbors_.size() == maxNeighbors_) { - rangeSq = agentNeighbors_.back().first; + if (agentNeighbors_.size() == maxNeighbors_) { + rangeSq = agentNeighbors_.back().first; + } } } } -} -bool linearProgram1(const std::vector<Plane> &planes, size_t planeNo, const Line &line, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) { - const float dotProduct = line.point * line.direction; - const float discriminant = sqr(dotProduct) + sqr(radius) - absSq(line.point); - - if (discriminant < 0.0f) { - /* Max speed sphere fully invalidates line. */ - return false; - } - - const float sqrtDiscriminant = std::sqrt(discriminant); - float tLeft = -dotProduct - sqrtDiscriminant; - float tRight = -dotProduct + sqrtDiscriminant; - - for (size_t i = 0; i < planeNo; ++i) { - const float numerator = (planes[i].point - line.point) * planes[i].normal; - const float denominator = line.direction * planes[i].normal; - - if (sqr(denominator) <= RVO_EPSILON) { - /* Lines line is (almost) parallel to plane i. */ - if (numerator > 0.0f) { - return false; - } else { - continue; + bool linearProgram1(const std::vector<Plane> &planes, size_t planeNo, const Line &line, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) + { + const float dotProduct = line.point * line.direction; + const float discriminant = sqr(dotProduct) + sqr(radius) - absSq(line.point); + + if (discriminant < 0.0f) { + /* Max speed sphere fully invalidates line. */ + return false; + } + + const float sqrtDiscriminant = std::sqrt(discriminant); + float tLeft = -dotProduct - sqrtDiscriminant; + float tRight = -dotProduct + sqrtDiscriminant; + + for (size_t i = 0; i < planeNo; ++i) { + const float numerator = (planes[i].point - line.point) * planes[i].normal; + const float denominator = line.direction * planes[i].normal; + + if (sqr(denominator) <= RVO3D_EPSILON) { + /* Lines line is (almost) parallel to plane i. */ + if (numerator > 0.0f) { + return false; + } + else { + continue; + } } - } - const float t = numerator / denominator; + const float t = numerator / denominator; - if (denominator >= 0.0f) { - /* Plane i bounds line on the left. */ - tLeft = std::max(tLeft, t); - } else { - /* Plane i bounds line on the right. */ - tRight = std::min(tRight, t); + if (denominator >= 0.0f) { + /* Plane i bounds line on the left. */ + tLeft = std::max(tLeft, t); + } + else { + /* Plane i bounds line on the right. */ + tRight = std::min(tRight, t); + } + + if (tLeft > tRight) { + return false; + } } - if (tLeft > tRight) { - return false; + if (directionOpt) { + /* Optimize direction. */ + if (optVelocity * line.direction > 0.0f) { + /* Take right extreme. */ + result = line.point + tRight * line.direction; + } + else { + /* Take left extreme. */ + result = line.point + tLeft * line.direction; + } } - } - - if (directionOpt) { - /* Optimize direction. */ - if (optVelocity * line.direction > 0.0f) { - /* Take right extreme. */ - result = line.point + tRight * line.direction; - } else { - /* Take left extreme. */ - result = line.point + tLeft * line.direction; + else { + /* Optimize closest point. */ + const float t = line.direction * (optVelocity - line.point); + + if (t < tLeft) { + result = line.point + tLeft * line.direction; + } + else if (t > tRight) { + result = line.point + tRight * line.direction; + } + else { + result = line.point + t * line.direction; + } } - } else { - /* Optimize closest point. */ - const float t = line.direction * (optVelocity - line.point); - - if (t < tLeft) { - result = line.point + tLeft * line.direction; - } else if (t > tRight) { - result = line.point + tRight * line.direction; - } else { - result = line.point + t * line.direction; - } - } - return true; -} + return true; + } -bool linearProgram2(const std::vector<Plane> &planes, size_t planeNo, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) { - const float planeDist = planes[planeNo].point * planes[planeNo].normal; - const float planeDistSq = sqr(planeDist); - const float radiusSq = sqr(radius); + bool linearProgram2(const std::vector<Plane> &planes, size_t planeNo, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) + { + const float planeDist = planes[planeNo].point * planes[planeNo].normal; + const float planeDistSq = sqr(planeDist); + const float radiusSq = sqr(radius); - if (planeDistSq > radiusSq) { - /* Max speed sphere fully invalidates plane planeNo. */ - return false; - } + if (planeDistSq > radiusSq) { + /* Max speed sphere fully invalidates plane planeNo. */ + return false; + } - const float planeRadiusSq = radiusSq - planeDistSq; + const float planeRadiusSq = radiusSq - planeDistSq; - const Vector3 planeCenter = planeDist * planes[planeNo].normal; + const Vector3 planeCenter = planeDist * planes[planeNo].normal; - if (directionOpt) { - /* Project direction optVelocity on plane planeNo. */ - const Vector3 planeOptVelocity = optVelocity - (optVelocity * planes[planeNo].normal) * planes[planeNo].normal; - const float planeOptVelocityLengthSq = absSq(planeOptVelocity); + if (directionOpt) { + /* Project direction optVelocity on plane planeNo. */ + const Vector3 planeOptVelocity = optVelocity - (optVelocity * planes[planeNo].normal) * planes[planeNo].normal; + const float planeOptVelocityLengthSq = absSq(planeOptVelocity); - if (planeOptVelocityLengthSq <= RVO_EPSILON) { - result = planeCenter; - } else { - result = planeCenter + std::sqrt(planeRadiusSq / planeOptVelocityLengthSq) * planeOptVelocity; + if (planeOptVelocityLengthSq <= RVO3D_EPSILON) { + result = planeCenter; + } + else { + result = planeCenter + std::sqrt(planeRadiusSq / planeOptVelocityLengthSq) * planeOptVelocity; + } } - } else { - /* Project point optVelocity on plane planeNo. */ - result = optVelocity + ((planes[planeNo].point - optVelocity) * planes[planeNo].normal) * planes[planeNo].normal; - - /* If outside planeCircle, project on planeCircle. */ - if (absSq(result) > radiusSq) { - const Vector3 planeResult = result - planeCenter; - const float planeResultLengthSq = absSq(planeResult); - result = planeCenter + std::sqrt(planeRadiusSq / planeResultLengthSq) * planeResult; + else { + /* Project point optVelocity on plane planeNo. */ + result = optVelocity + ((planes[planeNo].point - optVelocity) * planes[planeNo].normal) * planes[planeNo].normal; + + /* If outside planeCircle, project on planeCircle. */ + if (absSq(result) > radiusSq) { + const Vector3 planeResult = result - planeCenter; + const float planeResultLengthSq = absSq(planeResult); + result = planeCenter + std::sqrt(planeRadiusSq / planeResultLengthSq) * planeResult; + } } - } - - for (size_t i = 0; i < planeNo; ++i) { - if (planes[i].normal * (planes[i].point - result) > 0.0f) { - /* Result does not satisfy constraint i. Compute new optimal result. */ - /* Compute intersection line of plane i and plane planeNo. */ - Vector3 crossProduct = cross(planes[i].normal, planes[planeNo].normal); - - if (absSq(crossProduct) <= RVO_EPSILON) { - /* Planes planeNo and i are (almost) parallel, and plane i fully invalidates plane planeNo. */ - return false; - } - - Line line; - line.direction = normalize(crossProduct); - const Vector3 lineNormal = cross(line.direction, planes[planeNo].normal); - line.point = planes[planeNo].point + (((planes[i].point - planes[planeNo].point) * planes[i].normal) / (lineNormal * planes[i].normal)) * lineNormal; - - if (!linearProgram1(planes, i, line, radius, optVelocity, directionOpt, result)) { - return false; + + for (size_t i = 0; i < planeNo; ++i) { + if (planes[i].normal * (planes[i].point - result) > 0.0f) { + /* Result does not satisfy constraint i. Compute new optimal result. */ + /* Compute intersection line of plane i and plane planeNo. */ + Vector3 crossProduct = cross(planes[i].normal, planes[planeNo].normal); + + if (absSq(crossProduct) <= RVO3D_EPSILON) { + /* Planes planeNo and i are (almost) parallel, and plane i fully invalidates plane planeNo. */ + return false; + } + + Line line; + line.direction = normalize(crossProduct); + const Vector3 lineNormal = cross(line.direction, planes[planeNo].normal); + line.point = planes[planeNo].point + (((planes[i].point - planes[planeNo].point) * planes[i].normal) / (lineNormal * planes[i].normal)) * lineNormal; + + if (!linearProgram1(planes, i, line, radius, optVelocity, directionOpt, result)) { + return false; + } } } + + return true; } - return true; -} + size_t linearProgram3(const std::vector<Plane> &planes, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) + { + if (directionOpt) { + /* Optimize direction. Note that the optimization velocity is of unit length in this case. */ + result = optVelocity * radius; + } + else if (absSq(optVelocity) > sqr(radius)) { + /* Optimize closest point and outside circle. */ + result = normalize(optVelocity) * radius; + } + else { + /* Optimize closest point and inside circle. */ + result = optVelocity; + } + + for (size_t i = 0; i < planes.size(); ++i) { + if (planes[i].normal * (planes[i].point - result) > 0.0f) { + /* Result does not satisfy constraint i. Compute new optimal result. */ + const Vector3 tempResult = result; -size_t linearProgram3(const std::vector<Plane> &planes, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) { - if (directionOpt) { - /* Optimize direction. Note that the optimization velocity is of unit length in this case. */ - result = optVelocity * radius; - } else if (absSq(optVelocity) > sqr(radius)) { - /* Optimize closest point and outside circle. */ - result = normalize(optVelocity) * radius; - } else { - /* Optimize closest point and inside circle. */ - result = optVelocity; - } - - for (size_t i = 0; i < planes.size(); ++i) { - if (planes[i].normal * (planes[i].point - result) > 0.0f) { - /* Result does not satisfy constraint i. Compute new optimal result. */ - const Vector3 tempResult = result; - - if (!linearProgram2(planes, i, radius, optVelocity, directionOpt, result)) { - result = tempResult; - return i; + if (!linearProgram2(planes, i, radius, optVelocity, directionOpt, result)) { + result = tempResult; + return i; + } } } - } - return planes.size(); -} + return planes.size(); + } -void linearProgram4(const std::vector<Plane> &planes, size_t beginPlane, float radius, Vector3 &result) { - float distance = 0.0f; - - for (size_t i = beginPlane; i < planes.size(); ++i) { - if (planes[i].normal * (planes[i].point - result) > distance) { - /* Result does not satisfy constraint of plane i. */ - std::vector<Plane> projPlanes; - - for (size_t j = 0; j < i; ++j) { - Plane plane; - - const Vector3 crossProduct = cross(planes[j].normal, planes[i].normal); - - if (absSq(crossProduct) <= RVO_EPSILON) { - /* Plane i and plane j are (almost) parallel. */ - if (planes[i].normal * planes[j].normal > 0.0f) { - /* Plane i and plane j point in the same direction. */ - continue; - } else { - /* Plane i and plane j point in opposite direction. */ - plane.point = 0.5f * (planes[i].point + planes[j].point); - } - } else { - /* Plane.point is point on line of intersection between plane i and plane j. */ - const Vector3 lineNormal = cross(crossProduct, planes[i].normal); - plane.point = planes[i].point + (((planes[j].point - planes[i].point) * planes[j].normal) / (lineNormal * planes[j].normal)) * lineNormal; + void linearProgram4(const std::vector<Plane> &planes, size_t beginPlane, float radius, Vector3 &result) + { + float distance = 0.0f; + + for (size_t i = beginPlane; i < planes.size(); ++i) { + if (planes[i].normal * (planes[i].point - result) > distance) { + /* Result does not satisfy constraint of plane i. */ + std::vector<Plane> projPlanes; + + for (size_t j = 0; j < i; ++j) { + Plane plane; + + const Vector3 crossProduct = cross(planes[j].normal, planes[i].normal); + + if (absSq(crossProduct) <= RVO3D_EPSILON) { + /* Plane i and plane j are (almost) parallel. */ + if (planes[i].normal * planes[j].normal > 0.0f) { + /* Plane i and plane j point in the same direction. */ + continue; + } + else { + /* Plane i and plane j point in opposite direction. */ + plane.point = 0.5f * (planes[i].point + planes[j].point); + } + } + else { + /* Plane.point is point on line of intersection between plane i and plane j. */ + const Vector3 lineNormal = cross(crossProduct, planes[i].normal); + plane.point = planes[i].point + (((planes[j].point - planes[i].point) * planes[j].normal) / (lineNormal * planes[j].normal)) * lineNormal; + } + + plane.normal = normalize(planes[j].normal - planes[i].normal); + projPlanes.push_back(plane); } - plane.normal = normalize(planes[j].normal - planes[i].normal); - projPlanes.push_back(plane); - } + const Vector3 tempResult = result; - const Vector3 tempResult = result; + if (linearProgram3(projPlanes, radius, planes[i].normal, true, result) < projPlanes.size()) { + /* This should in principle not happen. The result is by definition already in the feasible region of this linear program. If it fails, it is due to small floating point error, and the current result is kept. */ + result = tempResult; + } - if (linearProgram3(projPlanes, radius, planes[i].normal, true, result) < projPlanes.size()) { - /* This should in principle not happen. The result is by definition already in the feasible region of this linear program. If it fails, it is due to small floating point error, and the current result is kept. */ - result = tempResult; + distance = planes[i].normal * (planes[i].point - result); } - - distance = planes[i].normal * (planes[i].point - result); - } + } } } -} // namespace RVO diff --git a/thirdparty/rvo2/Agent.h b/thirdparty/rvo2/Agent.h index 16f75a08f6..45fbead2f5 100644 --- a/thirdparty/rvo2/Agent.h +++ b/thirdparty/rvo2/Agent.h @@ -8,7 +8,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,17 +27,15 @@ * Chapel Hill, N.C. 27599-3175 * United States of America * - * <http://gamma.cs.unc.edu/RVO2/> + * <https://gamma.cs.unc.edu/RVO2/> */ /** * \file Agent.h * \brief Contains the Agent class. */ -#ifndef RVO_AGENT_H_ -#define RVO_AGENT_H_ - -#include "API.h" +#ifndef RVO3D_AGENT_H_ +#define RVO3D_AGENT_H_ #include <cstddef> #include <utility> @@ -53,69 +51,68 @@ // - Moved the `Plane` class here. // - Added a new parameter `ignore_y_` in the `Agent`. This parameter is used to control a godot feature that allows to avoid collisions by moving on the horizontal plane. namespace RVO { -/** - * \brief Defines a plane. - */ -class Plane { -public: - /** - * \brief A point on the plane. - */ - Vector3 point; - - /** - * \brief The normal to the plane. - */ - Vector3 normal; -}; + /** + * \brief Defines a plane. + */ + class Plane { + public: + /** + * \brief A point on the plane. + */ + Vector3 point; -/** - * \brief Defines an agent in the simulation. - */ -class Agent { + /** + * \brief The normal to the plane. + */ + Vector3 normal; + }; -public: - /** + /** + * \brief Defines an agent in the simulation. + */ + class Agent { + public: + /** * \brief Constructs an agent instance. * \param sim The simulator instance. */ - explicit Agent(); + explicit Agent(); - /** + /** * \brief Computes the neighbors of this agent. */ - void computeNeighbors(class KdTree *kdTree_); + void computeNeighbors(class KdTree *kdTree_); - /** + /** * \brief Computes the new velocity of this agent. */ - void computeNewVelocity(float timeStep); + void computeNewVelocity(float timeStep); - /** + /** * \brief Inserts an agent neighbor into the set of neighbors of this agent. * \param agent A pointer to the agent to be inserted. * \param rangeSq The squared range around this agent. */ - void insertAgentNeighbor(const Agent *agent, float &rangeSq); + void insertAgentNeighbor(const Agent *agent, float &rangeSq); - Vector3 newVelocity_; - Vector3 position_; - Vector3 prefVelocity_; - Vector3 velocity_; - size_t id_; - size_t maxNeighbors_; - float maxSpeed_; - float neighborDist_; - float radius_; - float timeHorizon_; - std::vector<std::pair<float, const Agent *> > agentNeighbors_; - std::vector<Plane> orcaPlanes_; - /// This is a godot feature that allows the Agent to avoid collision by mooving - /// on the horizontal plane. - bool ignore_y_; + Vector3 newVelocity_; + Vector3 position_; + Vector3 prefVelocity_; + Vector3 velocity_; + size_t id_; + size_t maxNeighbors_; + float maxSpeed_; + float neighborDist_; + float radius_; + float timeHorizon_; + std::vector<std::pair<float, const Agent *> > agentNeighbors_; + std::vector<Plane> orcaPlanes_; + /// This is a godot feature that allows the Agent to avoid collision by mooving + /// on the horizontal plane. + bool ignore_y_; - friend class KdTree; -}; -} // namespace RVO + friend class KdTree; + }; +} -#endif /* RVO_AGENT_H_ */ +#endif /* RVO3D_AGENT_H_ */ diff --git a/thirdparty/rvo2/Definitions.h b/thirdparty/rvo2/Definitions.h index a73aca9908..707d3c897f 100644 --- a/thirdparty/rvo2/Definitions.h +++ b/thirdparty/rvo2/Definitions.h @@ -8,7 +8,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,7 +27,7 @@ * Chapel Hill, N.C. 27599-3175 * United States of America * - * <http://gamma.cs.unc.edu/RVO2/> + * <https://gamma.cs.unc.edu/RVO2/> */ /** @@ -35,10 +35,8 @@ * \brief Contains functions and constants used in multiple classes. */ -#ifndef RVO_DEFINITIONS_H_ -#define RVO_DEFINITIONS_H_ - -#include "API.h" +#ifndef RVO3D_DEFINITIONS_H_ +#define RVO3D_DEFINITIONS_H_ namespace RVO { /** @@ -52,4 +50,4 @@ namespace RVO { } } -#endif /* RVO_DEFINITIONS_H_ */ +#endif /* RVO3D_DEFINITIONS_H_ */ diff --git a/thirdparty/rvo2/KdTree.cpp b/thirdparty/rvo2/KdTree.cpp index bc224614f0..c857f299df 100644 --- a/thirdparty/rvo2/KdTree.cpp +++ b/thirdparty/rvo2/KdTree.cpp @@ -8,7 +8,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,7 +27,7 @@ * Chapel Hill, N.C. 27599-3175 * United States of America * - * <http://gamma.cs.unc.edu/RVO2/> + * <https://gamma.cs.unc.edu/RVO2/> */ #include "KdTree.h" @@ -38,115 +38,123 @@ #include "Definitions.h" namespace RVO { -const size_t RVO_MAX_LEAF_SIZE = 10; + const size_t RVO3D_MAX_LEAF_SIZE = 10; -KdTree::KdTree() {} + KdTree::KdTree() { } -void KdTree::buildAgentTree(std::vector<Agent *> agents) { - agents_.swap(agents); + void KdTree::buildAgentTree(std::vector<Agent *> agents) + { + agents_.swap(agents); - if (!agents_.empty()) { - agentTree_.resize(2 * agents_.size() - 1); - buildAgentTreeRecursive(0, agents_.size(), 0); + if (!agents_.empty()) { + agentTree_.resize(2 * agents_.size() - 1); + buildAgentTreeRecursive(0, agents_.size(), 0); + } } -} -void KdTree::buildAgentTreeRecursive(size_t begin, size_t end, size_t node) { - agentTree_[node].begin = begin; - agentTree_[node].end = end; - agentTree_[node].minCoord = agents_[begin]->position_; - agentTree_[node].maxCoord = agents_[begin]->position_; - - for (size_t i = begin + 1; i < end; ++i) { - agentTree_[node].maxCoord[0] = std::max(agentTree_[node].maxCoord[0], agents_[i]->position_.x()); - agentTree_[node].minCoord[0] = std::min(agentTree_[node].minCoord[0], agents_[i]->position_.x()); - agentTree_[node].maxCoord[1] = std::max(agentTree_[node].maxCoord[1], agents_[i]->position_.y()); - agentTree_[node].minCoord[1] = std::min(agentTree_[node].minCoord[1], agents_[i]->position_.y()); - agentTree_[node].maxCoord[2] = std::max(agentTree_[node].maxCoord[2], agents_[i]->position_.z()); - agentTree_[node].minCoord[2] = std::min(agentTree_[node].minCoord[2], agents_[i]->position_.z()); - } - - if (end - begin > RVO_MAX_LEAF_SIZE) { - /* No leaf node. */ - size_t coord; - - if (agentTree_[node].maxCoord[0] - agentTree_[node].minCoord[0] > agentTree_[node].maxCoord[1] - agentTree_[node].minCoord[1] && agentTree_[node].maxCoord[0] - agentTree_[node].minCoord[0] > agentTree_[node].maxCoord[2] - agentTree_[node].minCoord[2]) { - coord = 0; - } else if (agentTree_[node].maxCoord[1] - agentTree_[node].minCoord[1] > agentTree_[node].maxCoord[2] - agentTree_[node].minCoord[2]) { - coord = 1; - } else { - coord = 2; - } - - const float splitValue = 0.5f * (agentTree_[node].maxCoord[coord] + agentTree_[node].minCoord[coord]); - - size_t left = begin; - - size_t right = end; - - while (left < right) { - while (left < right && agents_[left]->position_[coord] < splitValue) { - ++left; - } - - while (right > left && agents_[right - 1]->position_[coord] >= splitValue) { - --right; + void KdTree::buildAgentTreeRecursive(size_t begin, size_t end, size_t node) + { + agentTree_[node].begin = begin; + agentTree_[node].end = end; + agentTree_[node].minCoord = agents_[begin]->position_; + agentTree_[node].maxCoord = agents_[begin]->position_; + + for (size_t i = begin + 1; i < end; ++i) { + agentTree_[node].maxCoord[0] = std::max(agentTree_[node].maxCoord[0], agents_[i]->position_.x()); + agentTree_[node].minCoord[0] = std::min(agentTree_[node].minCoord[0], agents_[i]->position_.x()); + agentTree_[node].maxCoord[1] = std::max(agentTree_[node].maxCoord[1], agents_[i]->position_.y()); + agentTree_[node].minCoord[1] = std::min(agentTree_[node].minCoord[1], agents_[i]->position_.y()); + agentTree_[node].maxCoord[2] = std::max(agentTree_[node].maxCoord[2], agents_[i]->position_.z()); + agentTree_[node].minCoord[2] = std::min(agentTree_[node].minCoord[2], agents_[i]->position_.z()); + } + + if (end - begin > RVO3D_MAX_LEAF_SIZE) { + /* No leaf node. */ + size_t coord; + + if (agentTree_[node].maxCoord[0] - agentTree_[node].minCoord[0] > agentTree_[node].maxCoord[1] - agentTree_[node].minCoord[1] && agentTree_[node].maxCoord[0] - agentTree_[node].minCoord[0] > agentTree_[node].maxCoord[2] - agentTree_[node].minCoord[2]) { + coord = 0; + } + else if (agentTree_[node].maxCoord[1] - agentTree_[node].minCoord[1] > agentTree_[node].maxCoord[2] - agentTree_[node].minCoord[2]) { + coord = 1; + } + else { + coord = 2; } - if (left < right) { - std::swap(agents_[left], agents_[right - 1]); - ++left; - --right; + const float splitValue = 0.5f * (agentTree_[node].maxCoord[coord] + agentTree_[node].minCoord[coord]); + + size_t left = begin; + + size_t right = end; + + while (left < right) { + while (left < right && agents_[left]->position_[coord] < splitValue) { + ++left; + } + + while (right > left && agents_[right - 1]->position_[coord] >= splitValue) { + --right; + } + + if (left < right) { + std::swap(agents_[left], agents_[right - 1]); + ++left; + --right; + } } - } - size_t leftSize = left - begin; + size_t leftSize = left - begin; - if (leftSize == 0) { - ++leftSize; - ++left; - ++right; - } + if (leftSize == 0) { + ++leftSize; + ++left; + ++right; + } - agentTree_[node].left = node + 1; - agentTree_[node].right = node + 2 * leftSize; + agentTree_[node].left = node + 1; + agentTree_[node].right = node + 2 * leftSize; - buildAgentTreeRecursive(begin, left, agentTree_[node].left); - buildAgentTreeRecursive(left, end, agentTree_[node].right); + buildAgentTreeRecursive(begin, left, agentTree_[node].left); + buildAgentTreeRecursive(left, end, agentTree_[node].right); + } } -} -void KdTree::computeAgentNeighbors(Agent *agent, float rangeSq) const { - queryAgentTreeRecursive(agent, rangeSq, 0); -} + void KdTree::computeAgentNeighbors(Agent *agent, float rangeSq) const + { + queryAgentTreeRecursive(agent, rangeSq, 0); + } -void KdTree::queryAgentTreeRecursive(Agent *agent, float &rangeSq, size_t node) const { - if (agentTree_[node].end - agentTree_[node].begin <= RVO_MAX_LEAF_SIZE) { - for (size_t i = agentTree_[node].begin; i < agentTree_[node].end; ++i) { - agent->insertAgentNeighbor(agents_[i], rangeSq); + void KdTree::queryAgentTreeRecursive(Agent *agent, float &rangeSq, size_t node) const + { + if (agentTree_[node].end - agentTree_[node].begin <= RVO3D_MAX_LEAF_SIZE) { + for (size_t i = agentTree_[node].begin; i < agentTree_[node].end; ++i) { + agent->insertAgentNeighbor(agents_[i], rangeSq); + } } - } else { - const float distSqLeft = sqr(std::max(0.0f, agentTree_[agentTree_[node].left].minCoord[0] - agent->position_.x())) + sqr(std::max(0.0f, agent->position_.x() - agentTree_[agentTree_[node].left].maxCoord[0])) + sqr(std::max(0.0f, agentTree_[agentTree_[node].left].minCoord[1] - agent->position_.y())) + sqr(std::max(0.0f, agent->position_.y() - agentTree_[agentTree_[node].left].maxCoord[1])) + sqr(std::max(0.0f, agentTree_[agentTree_[node].left].minCoord[2] - agent->position_.z())) + sqr(std::max(0.0f, agent->position_.z() - agentTree_[agentTree_[node].left].maxCoord[2])); + else { + const float distSqLeft = sqr(std::max(0.0f, agentTree_[agentTree_[node].left].minCoord[0] - agent->position_.x())) + sqr(std::max(0.0f, agent->position_.x() - agentTree_[agentTree_[node].left].maxCoord[0])) + sqr(std::max(0.0f, agentTree_[agentTree_[node].left].minCoord[1] - agent->position_.y())) + sqr(std::max(0.0f, agent->position_.y() - agentTree_[agentTree_[node].left].maxCoord[1])) + sqr(std::max(0.0f, agentTree_[agentTree_[node].left].minCoord[2] - agent->position_.z())) + sqr(std::max(0.0f, agent->position_.z() - agentTree_[agentTree_[node].left].maxCoord[2])); - const float distSqRight = sqr(std::max(0.0f, agentTree_[agentTree_[node].right].minCoord[0] - agent->position_.x())) + sqr(std::max(0.0f, agent->position_.x() - agentTree_[agentTree_[node].right].maxCoord[0])) + sqr(std::max(0.0f, agentTree_[agentTree_[node].right].minCoord[1] - agent->position_.y())) + sqr(std::max(0.0f, agent->position_.y() - agentTree_[agentTree_[node].right].maxCoord[1])) + sqr(std::max(0.0f, agentTree_[agentTree_[node].right].minCoord[2] - agent->position_.z())) + sqr(std::max(0.0f, agent->position_.z() - agentTree_[agentTree_[node].right].maxCoord[2])); + const float distSqRight = sqr(std::max(0.0f, agentTree_[agentTree_[node].right].minCoord[0] - agent->position_.x())) + sqr(std::max(0.0f, agent->position_.x() - agentTree_[agentTree_[node].right].maxCoord[0])) + sqr(std::max(0.0f, agentTree_[agentTree_[node].right].minCoord[1] - agent->position_.y())) + sqr(std::max(0.0f, agent->position_.y() - agentTree_[agentTree_[node].right].maxCoord[1])) + sqr(std::max(0.0f, agentTree_[agentTree_[node].right].minCoord[2] - agent->position_.z())) + sqr(std::max(0.0f, agent->position_.z() - agentTree_[agentTree_[node].right].maxCoord[2])); - if (distSqLeft < distSqRight) { - if (distSqLeft < rangeSq) { - queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].left); + if (distSqLeft < distSqRight) { + if (distSqLeft < rangeSq) { + queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].left); + if (distSqRight < rangeSq) { + queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].right); + } + } + } + else { if (distSqRight < rangeSq) { queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].right); - } - } - } else { - if (distSqRight < rangeSq) { - queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].right); - - if (distSqLeft < rangeSq) { - queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].left); + + if (distSqLeft < rangeSq) { + queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].left); + } } } } } } -} // namespace RVO diff --git a/thirdparty/rvo2/KdTree.h b/thirdparty/rvo2/KdTree.h index 1dbad00ea4..69d8920ce0 100644 --- a/thirdparty/rvo2/KdTree.h +++ b/thirdparty/rvo2/KdTree.h @@ -8,7 +8,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,16 +27,14 @@ * Chapel Hill, N.C. 27599-3175 * United States of America * - * <http://gamma.cs.unc.edu/RVO2/> + * <https://gamma.cs.unc.edu/RVO2/> */ /** * \file KdTree.h * \brief Contains the KdTree class. */ -#ifndef RVO_KD_TREE_H_ -#define RVO_KD_TREE_H_ - -#include "API.h" +#ifndef RVO3D_KD_TREE_H_ +#define RVO3D_KD_TREE_H_ #include <cstddef> #include <vector> @@ -47,78 +45,78 @@ // - Removed `sim_`. // - KdTree things are public namespace RVO { -class Agent; -class RVOSimulator; + class Agent; + class RVOSimulator; -/** + /** * \brief Defines <i>k</i>d-trees for agents in the simulation. */ -class KdTree { -public: - /** + class KdTree { + public: + /** * \brief Defines an agent <i>k</i>d-tree node. */ - class AgentTreeNode { - public: - /** + class AgentTreeNode { + public: + /** * \brief The beginning node number. */ - size_t begin; + size_t begin; - /** + /** * \brief The ending node number. */ - size_t end; + size_t end; - /** + /** * \brief The left node number. */ - size_t left; + size_t left; - /** + /** * \brief The right node number. */ - size_t right; + size_t right; - /** + /** * \brief The maximum coordinates. */ - Vector3 maxCoord; + Vector3 maxCoord; - /** + /** * \brief The minimum coordinates. */ - Vector3 minCoord; - }; + Vector3 minCoord; + }; - /** + /** * \brief Constructs a <i>k</i>d-tree instance. * \param sim The simulator instance. */ - explicit KdTree(); + explicit KdTree(); - /** + /** * \brief Builds an agent <i>k</i>d-tree. */ - void buildAgentTree(std::vector<Agent *> agents); + void buildAgentTree(std::vector<Agent *> agents); - void buildAgentTreeRecursive(size_t begin, size_t end, size_t node); + void buildAgentTreeRecursive(size_t begin, size_t end, size_t node); - /** + /** * \brief Computes the agent neighbors of the specified agent. * \param agent A pointer to the agent for which agent neighbors are to be computed. * \param rangeSq The squared range around the agent. */ - void computeAgentNeighbors(Agent *agent, float rangeSq) const; + void computeAgentNeighbors(Agent *agent, float rangeSq) const; - void queryAgentTreeRecursive(Agent *agent, float &rangeSq, size_t node) const; + void queryAgentTreeRecursive(Agent *agent, float &rangeSq, size_t node) const; - std::vector<Agent *> agents_; - std::vector<AgentTreeNode> agentTree_; + std::vector<Agent *> agents_; + std::vector<AgentTreeNode> agentTree_; - friend class Agent; - friend class RVOSimulator; -}; -} // namespace RVO + friend class Agent; + friend class RVOSimulator; + }; +} -#endif /* RVO_KD_TREE_H_ */ +#endif /* RVO3D_KD_TREE_H_ */ diff --git a/thirdparty/rvo2/README.md b/thirdparty/rvo2/README.md deleted file mode 100644 index 96af597cb6..0000000000 --- a/thirdparty/rvo2/README.md +++ /dev/null @@ -1,32 +0,0 @@ -Optimal Reciprocal Collision Avoidance in Three Dimensions -========================================================== - -<http://gamma.cs.unc.edu/RVO2/> - -[](https://travis-ci.org/snape/RVO2-3D) -[](https://ci.appveyor.com/project/snape/rvo2-3d) - -Copyright 2008 University of North Carolina at Chapel Hill - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -<http://www.apache.org/licenses/LICENSE-2.0> - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Please send all bug reports to [geom@cs.unc.edu](mailto:geom@cs.unc.edu). - -The authors may be contacted via: - -Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, and Dinesh Manocha -Dept. of Computer Science -201 S. Columbia St. -Frederick P. Brooks, Jr. Computer Science Bldg. -Chapel Hill, N.C. 27599-3175 -United States of America diff --git a/thirdparty/rvo2/Vector3.h b/thirdparty/rvo2/Vector3.h index 8c8835c865..f44e311f29 100644 --- a/thirdparty/rvo2/Vector3.h +++ b/thirdparty/rvo2/Vector3.h @@ -8,7 +8,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,32 +27,32 @@ * Chapel Hill, N.C. 27599-3175 * United States of America * - * <http://gamma.cs.unc.edu/RVO2/> + * <https://gamma.cs.unc.edu/RVO2/> */ /** * \file Vector3.h * \brief Contains the Vector3 class. */ -#ifndef RVO_VECTOR3_H_ -#define RVO_VECTOR3_H_ - -#include "API.h" +#ifndef RVO3D_VECTOR3_H_ +#define RVO3D_VECTOR3_H_ #include <cmath> #include <cstddef> #include <ostream> +#define RVO3D_EXPORT + namespace RVO { /** * \brief Defines a three-dimensional vector. */ - class Vector3 { + class RVO3D_EXPORT Vector3 { public: /** * \brief Constructs and initializes a three-dimensional vector instance to zero. */ - RVO_API inline Vector3() + inline Vector3() { val_[0] = 0.0f; val_[1] = 0.0f; @@ -63,7 +63,7 @@ namespace RVO { * \brief Constructs and initializes a three-dimensional vector from the specified three-element array. * \param val The three-element array containing the xyz-coordinates. */ - RVO_API inline explicit Vector3(const float val[3]) + inline explicit Vector3(const float val[3]) { val_[0] = val[0]; val_[1] = val[1]; @@ -76,7 +76,7 @@ namespace RVO { * \param y The y-coordinate of the three-dimensional vector. * \param z The z-coordinate of the three-dimensional vector. */ - RVO_API inline Vector3(float x, float y, float z) + inline Vector3(float x, float y, float z) { val_[0] = x; val_[1] = y; @@ -87,39 +87,39 @@ namespace RVO { * \brief Returns the x-coordinate of this three-dimensional vector. * \return The x-coordinate of the three-dimensional vector. */ - RVO_API inline float x() const { return val_[0]; } + inline float x() const { return val_[0]; } /** * \brief Returns the y-coordinate of this three-dimensional vector. * \return The y-coordinate of the three-dimensional vector. */ - RVO_API inline float y() const { return val_[1]; } + inline float y() const { return val_[1]; } /** * \brief Returns the z-coordinate of this three-dimensional vector. * \return The z-coordinate of the three-dimensional vector. */ - RVO_API inline float z() const { return val_[2]; } + inline float z() const { return val_[2]; } /** * \brief Returns the specified coordinate of this three-dimensional vector. * \param i The coordinate that should be returned (0 <= i < 3). * \return The specified coordinate of the three-dimensional vector. */ - RVO_API inline float operator[](size_t i) const { return val_[i]; } + inline float operator[](size_t i) const { return val_[i]; } /** * \brief Returns a reference to the specified coordinate of this three-dimensional vector. * \param i The coordinate to which a reference should be returned (0 <= i < 3). * \return A reference to the specified coordinate of the three-dimensional vector. */ - RVO_API inline float &operator[](size_t i) { return val_[i]; } + inline float &operator[](size_t i) { return val_[i]; } /** * \brief Computes the negation of this three-dimensional vector. * \return The negation of this three-dimensional vector. */ - RVO_API inline Vector3 operator-() const + inline Vector3 operator-() const { return Vector3(-val_[0], -val_[1], -val_[2]); } @@ -129,7 +129,7 @@ namespace RVO { * \param vector The three-dimensional vector with which the dot product should be computed. * \return The dot product of this three-dimensional vector with a specified three-dimensional vector. */ - RVO_API inline float operator*(const Vector3 &vector) const + inline float operator*(const Vector3 &vector) const { return val_[0] * vector[0] + val_[1] * vector[1] + val_[2] * vector[2]; } @@ -139,7 +139,7 @@ namespace RVO { * \param scalar The scalar value with which the scalar multiplication should be computed. * \return The scalar multiplication of this three-dimensional vector with a specified scalar value. */ - RVO_API inline Vector3 operator*(float scalar) const + inline Vector3 operator*(float scalar) const { return Vector3(val_[0] * scalar, val_[1] * scalar, val_[2] * scalar); } @@ -149,7 +149,7 @@ namespace RVO { * \param scalar The scalar value with which the scalar division should be computed. * \return The scalar division of this three-dimensional vector with a specified scalar value. */ - RVO_API inline Vector3 operator/(float scalar) const + inline Vector3 operator/(float scalar) const { const float invScalar = 1.0f / scalar; @@ -161,7 +161,7 @@ namespace RVO { * \param vector The three-dimensional vector with which the vector sum should be computed. * \return The vector sum of this three-dimensional vector with a specified three-dimensional vector. */ - RVO_API inline Vector3 operator+(const Vector3 &vector) const + inline Vector3 operator+(const Vector3 &vector) const { return Vector3(val_[0] + vector[0], val_[1] + vector[1], val_[2] + vector[2]); } @@ -171,7 +171,7 @@ namespace RVO { * \param vector The three-dimensional vector with which the vector difference should be computed. * \return The vector difference of this three-dimensional vector with a specified three-dimensional vector. */ - RVO_API inline Vector3 operator-(const Vector3 &vector) const + inline Vector3 operator-(const Vector3 &vector) const { return Vector3(val_[0] - vector[0], val_[1] - vector[1], val_[2] - vector[2]); } @@ -181,7 +181,7 @@ namespace RVO { * \param vector The three-dimensional vector with which to test for equality. * \return True if the three-dimensional vectors are equal. */ - RVO_API inline bool operator==(const Vector3 &vector) const + inline bool operator==(const Vector3 &vector) const { return val_[0] == vector[0] && val_[1] == vector[1] && val_[2] == vector[2]; } @@ -191,7 +191,7 @@ namespace RVO { * \param vector The three-dimensional vector with which to test for inequality. * \return True if the three-dimensional vectors are not equal. */ - RVO_API inline bool operator!=(const Vector3 &vector) const + inline bool operator!=(const Vector3 &vector) const { return val_[0] != vector[0] || val_[1] != vector[1] || val_[2] != vector[2]; } @@ -201,7 +201,7 @@ namespace RVO { * \param scalar The scalar value with which the scalar multiplication should be computed. * \return A reference to this three-dimensional vector. */ - RVO_API inline Vector3 &operator*=(float scalar) + inline Vector3 &operator*=(float scalar) { val_[0] *= scalar; val_[1] *= scalar; @@ -215,7 +215,7 @@ namespace RVO { * \param scalar The scalar value with which the scalar division should be computed. * \return A reference to this three-dimensional vector. */ - RVO_API inline Vector3 &operator/=(float scalar) + inline Vector3 &operator/=(float scalar) { const float invScalar = 1.0f / scalar; @@ -232,7 +232,7 @@ namespace RVO { * \param vector The three-dimensional vector with which the vector sum should be computed. * \return A reference to this three-dimensional vector. */ - RVO_API inline Vector3 &operator+=(const Vector3 &vector) + inline Vector3 &operator+=(const Vector3 &vector) { val_[0] += vector[0]; val_[1] += vector[1]; @@ -246,7 +246,7 @@ namespace RVO { * \param vector The three-dimensional vector with which the vector difference should be computed. * \return A reference to this three-dimensional vector. */ - RVO_API inline Vector3 &operator-=(const Vector3 &vector) + inline Vector3 &operator-=(const Vector3 &vector) { val_[0] -= vector[0]; val_[1] -= vector[1]; @@ -267,7 +267,7 @@ namespace RVO { * \param vector The three-dimensional vector with which the scalar multiplication should be computed. * \return The scalar multiplication of the three-dimensional vector with the scalar value. */ - inline Vector3 operator*(float scalar, const Vector3 &vector) + RVO3D_EXPORT inline Vector3 operator*(float scalar, const Vector3 &vector) { return Vector3(scalar * vector[0], scalar * vector[1], scalar * vector[2]); } @@ -279,7 +279,7 @@ namespace RVO { * \param vector2 The second vector with which the cross product should be computed. * \return The cross product of the two specified vectors. */ - inline Vector3 cross(const Vector3 &vector1, const Vector3 &vector2) + RVO3D_EXPORT inline Vector3 cross(const Vector3 &vector1, const Vector3 &vector2) { return Vector3(vector1[1] * vector2[2] - vector1[2] * vector2[1], vector1[2] * vector2[0] - vector1[0] * vector2[2], vector1[0] * vector2[1] - vector1[1] * vector2[0]); } @@ -291,7 +291,7 @@ namespace RVO { * \param vector The three-dimensional vector which to insert into the output stream. * \return A reference to the output stream. */ - inline std::ostream &operator<<(std::ostream &os, const Vector3 &vector) + RVO3D_EXPORT inline std::ostream &operator<<(std::ostream &os, const Vector3 &vector) { os << "(" << vector[0] << "," << vector[1] << "," << vector[2] << ")"; @@ -304,7 +304,7 @@ namespace RVO { * \param vector The three-dimensional vector whose length is to be computed. * \return The length of the three-dimensional vector. */ - inline float abs(const Vector3 &vector) + RVO3D_EXPORT inline float abs(const Vector3 &vector) { return std::sqrt(vector * vector); } @@ -315,7 +315,7 @@ namespace RVO { * \param vector The three-dimensional vector whose squared length is to be computed. * \return The squared length of the three-dimensional vector. */ - inline float absSq(const Vector3 &vector) + RVO3D_EXPORT inline float absSq(const Vector3 &vector) { return vector * vector; } @@ -326,7 +326,7 @@ namespace RVO { * \param vector The three-dimensional vector whose normalization is to be computed. * \return The normalization of the three-dimensional vector. */ - inline Vector3 normalize(const Vector3 &vector) + RVO3D_EXPORT inline Vector3 normalize(const Vector3 &vector) { return vector / abs(vector); } diff --git a/thirdparty/rvo2/patches/rvo2-godot-changes.patch b/thirdparty/rvo2/patches/rvo2-godot-changes.patch new file mode 100644 index 0000000000..16dbc203ed --- /dev/null +++ b/thirdparty/rvo2/patches/rvo2-godot-changes.patch @@ -0,0 +1,282 @@ +diff --git a/thirdparty/rvo2/Agent.cpp b/thirdparty/rvo2/Agent.cpp +index 5e49a3554c..b35eee9c12 100644 +--- a/thirdparty/rvo2/Agent.cpp ++++ b/thirdparty/rvo2/Agent.cpp +@@ -105,18 +105,17 @@ namespace RVO { + */ + void linearProgram4(const std::vector<Plane> &planes, size_t beginPlane, float radius, Vector3 &result); + +- Agent::Agent(RVOSimulator *sim) : sim_(sim), id_(0), maxNeighbors_(0), maxSpeed_(0.0f), neighborDist_(0.0f), radius_(0.0f), timeHorizon_(0.0f) { } ++ Agent::Agent() : id_(0), maxNeighbors_(0), maxSpeed_(0.0f), neighborDist_(0.0f), radius_(0.0f), timeHorizon_(0.0f), ignore_y_(false) { } + +- void Agent::computeNeighbors() ++ void Agent::computeNeighbors(KdTree *kdTree_) + { + agentNeighbors_.clear(); +- + if (maxNeighbors_ > 0) { +- sim_->kdTree_->computeAgentNeighbors(this, neighborDist_ * neighborDist_); ++ kdTree_->computeAgentNeighbors(this, neighborDist_ * neighborDist_); + } + } + +- void Agent::computeNewVelocity() ++ void Agent::computeNewVelocity(float timeStep) + { + orcaPlanes_.clear(); + const float invTimeHorizon = 1.0f / timeHorizon_; +@@ -124,10 +123,24 @@ namespace RVO { + /* Create agent ORCA planes. */ + for (size_t i = 0; i < agentNeighbors_.size(); ++i) { + const Agent *const other = agentNeighbors_[i].second; +- const Vector3 relativePosition = other->position_ - position_; +- const Vector3 relativeVelocity = velocity_ - other->velocity_; +- const float distSq = absSq(relativePosition); ++ ++ Vector3 relativePosition = other->position_ - position_; ++ Vector3 relativeVelocity = velocity_ - other->velocity_; + const float combinedRadius = radius_ + other->radius_; ++ ++ // This is a Godot feature that allow the agents to avoid the collision ++ // by moving only on the horizontal plane relative to the player velocity. ++ if (ignore_y_) { ++ // Skip if these are in two different heights ++#define ABS(m_v) (((m_v) < 0) ? (-(m_v)) : (m_v)) ++ if (ABS(relativePosition[1]) > combinedRadius * 2) { ++ continue; ++ } ++ relativePosition[1] = 0; ++ relativeVelocity[1] = 0; ++ } ++ ++ const float distSq = absSq(relativePosition); + const float combinedRadiusSq = sqr(combinedRadius); + + Plane plane; +@@ -165,7 +178,7 @@ namespace RVO { + } + else { + /* Collision. */ +- const float invTimeStep = 1.0f / sim_->timeStep_; ++ const float invTimeStep = 1.0f / timeStep; + const Vector3 w = relativeVelocity - invTimeStep * relativePosition; + const float wLength = abs(w); + const Vector3 unitW = w / wLength; +@@ -183,6 +196,11 @@ namespace RVO { + if (planeFail < orcaPlanes_.size()) { + linearProgram4(orcaPlanes_, planeFail, maxSpeed_, newVelocity_); + } ++ ++ if (ignore_y_) { ++ // Not 100% necessary, but better to have. ++ newVelocity_[1] = prefVelocity_[1]; ++ } + } + + void Agent::insertAgentNeighbor(const Agent *agent, float &rangeSq) +@@ -211,12 +229,6 @@ namespace RVO { + } + } + +- void Agent::update() +- { +- velocity_ = newVelocity_; +- position_ += velocity_ * sim_->timeStep_; +- } +- + bool linearProgram1(const std::vector<Plane> &planes, size_t planeNo, const Line &line, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) + { + const float dotProduct = line.point * line.direction; +diff --git a/thirdparty/rvo2/Agent.h b/thirdparty/rvo2/Agent.h +index d3922ec645..45fbead2f5 100644 +--- a/thirdparty/rvo2/Agent.h ++++ b/thirdparty/rvo2/Agent.h +@@ -41,30 +41,52 @@ + #include <utility> + #include <vector> + +-#include "RVOSimulator.h" + #include "Vector3.h" + ++// Note: Slightly modified to work better in Godot. ++// - The agent can be created by anyone. ++// - The simulator pointer is removed. ++// - The update function is removed. ++// - The compute velocity function now need the timeStep. ++// - Moved the `Plane` class here. ++// - Added a new parameter `ignore_y_` in the `Agent`. This parameter is used to control a godot feature that allows to avoid collisions by moving on the horizontal plane. + namespace RVO { ++ /** ++ * \brief Defines a plane. ++ */ ++ class Plane { ++ public: ++ /** ++ * \brief A point on the plane. ++ */ ++ Vector3 point; ++ ++ /** ++ * \brief The normal to the plane. ++ */ ++ Vector3 normal; ++ }; ++ + /** + * \brief Defines an agent in the simulation. + */ + class Agent { +- private: ++ public: + /** + * \brief Constructs an agent instance. + * \param sim The simulator instance. + */ +- explicit Agent(RVOSimulator *sim); ++ explicit Agent(); + + /** + * \brief Computes the neighbors of this agent. + */ +- void computeNeighbors(); ++ void computeNeighbors(class KdTree *kdTree_); + + /** + * \brief Computes the new velocity of this agent. + */ +- void computeNewVelocity(); ++ void computeNewVelocity(float timeStep); + + /** + * \brief Inserts an agent neighbor into the set of neighbors of this agent. +@@ -73,16 +95,10 @@ namespace RVO { + */ + void insertAgentNeighbor(const Agent *agent, float &rangeSq); + +- /** +- * \brief Updates the three-dimensional position and three-dimensional velocity of this agent. +- */ +- void update(); +- + Vector3 newVelocity_; + Vector3 position_; + Vector3 prefVelocity_; + Vector3 velocity_; +- RVOSimulator *sim_; + size_t id_; + size_t maxNeighbors_; + float maxSpeed_; +@@ -91,9 +107,11 @@ namespace RVO { + float timeHorizon_; + std::vector<std::pair<float, const Agent *> > agentNeighbors_; + std::vector<Plane> orcaPlanes_; ++ /// This is a godot feature that allows the Agent to avoid collision by mooving ++ /// on the horizontal plane. ++ bool ignore_y_; + + friend class KdTree; +- friend class RVOSimulator; + }; + } + +diff --git a/thirdparty/rvo2/KdTree.cpp b/thirdparty/rvo2/KdTree.cpp +index 5e9e9777a6..c857f299df 100644 +--- a/thirdparty/rvo2/KdTree.cpp ++++ b/thirdparty/rvo2/KdTree.cpp +@@ -36,16 +36,15 @@ + + #include "Agent.h" + #include "Definitions.h" +-#include "RVOSimulator.h" + + namespace RVO { + const size_t RVO3D_MAX_LEAF_SIZE = 10; + +- KdTree::KdTree(RVOSimulator *sim) : sim_(sim) { } ++ KdTree::KdTree() { } + +- void KdTree::buildAgentTree() ++ void KdTree::buildAgentTree(std::vector<Agent *> agents) + { +- agents_ = sim_->agents_; ++ agents_.swap(agents); + + if (!agents_.empty()) { + agentTree_.resize(2 * agents_.size() - 1); +diff --git a/thirdparty/rvo2/KdTree.h b/thirdparty/rvo2/KdTree.h +index a09384c20f..69d8920ce0 100644 +--- a/thirdparty/rvo2/KdTree.h ++++ b/thirdparty/rvo2/KdTree.h +@@ -41,6 +41,9 @@ + + #include "Vector3.h" + ++// Note: Slightly modified to work better with Godot. ++// - Removed `sim_`. ++// - KdTree things are public + namespace RVO { + class Agent; + class RVOSimulator; +@@ -49,7 +52,7 @@ namespace RVO { + * \brief Defines <i>k</i>d-trees for agents in the simulation. + */ + class KdTree { +- private: ++ public: + /** + * \brief Defines an agent <i>k</i>d-tree node. + */ +@@ -90,12 +93,12 @@ namespace RVO { + * \brief Constructs a <i>k</i>d-tree instance. + * \param sim The simulator instance. + */ +- explicit KdTree(RVOSimulator *sim); ++ explicit KdTree(); + + /** + * \brief Builds an agent <i>k</i>d-tree. + */ +- void buildAgentTree(); ++ void buildAgentTree(std::vector<Agent *> agents); + + void buildAgentTreeRecursive(size_t begin, size_t end, size_t node); + +@@ -110,7 +113,6 @@ namespace RVO { + + std::vector<Agent *> agents_; + std::vector<AgentTreeNode> agentTree_; +- RVOSimulator *sim_; + + friend class Agent; + friend class RVOSimulator; +diff --git a/thirdparty/rvo2/Vector3.h b/thirdparty/rvo2/Vector3.h +index 6c3223bb87..f44e311f29 100644 +--- a/thirdparty/rvo2/Vector3.h ++++ b/thirdparty/rvo2/Vector3.h +@@ -41,7 +41,7 @@ + #include <cstddef> + #include <ostream> + +-#include "Export.h" ++#define RVO3D_EXPORT + + namespace RVO { + /** +@@ -59,17 +59,6 @@ namespace RVO { + val_[2] = 0.0f; + } + +- /** +- * \brief Constructs and initializes a three-dimensional vector from the specified three-dimensional vector. +- * \param vector The three-dimensional vector containing the xyz-coordinates. +- */ +- inline Vector3(const Vector3 &vector) +- { +- val_[0] = vector[0]; +- val_[1] = vector[1]; +- val_[2] = vector[2]; +- } +- + /** + * \brief Constructs and initializes a three-dimensional vector from the specified three-element array. + * \param val The three-element array containing the xyz-coordinates. diff --git a/thirdparty/thorvg/inc/config.h b/thirdparty/thorvg/inc/config.h index d72574bc65..879b70442b 100644 --- a/thirdparty/thorvg/inc/config.h +++ b/thirdparty/thorvg/inc/config.h @@ -13,5 +13,5 @@ #define THORVG_JPG_LOADER_SUPPORT 1 -#define THORVG_VERSION_STRING "0.8.0" +#define THORVG_VERSION_STRING "0.8.1" #endif diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwCommon.h b/thirdparty/thorvg/src/lib/sw_engine/tvgSwCommon.h index be7042d6de..157fdb8f82 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwCommon.h +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwCommon.h @@ -99,9 +99,9 @@ struct SwSize struct SwOutline { SwPoint* pts; //the outline's points - uint16_t ptsCnt; //number of points in the glyph - uint16_t reservedPtsCnt; - uint16_t* cntrs; //the contour end points + uint32_t ptsCnt; //number of points in the glyph + uint32_t reservedPtsCnt; + uint32_t* cntrs; //the contour end points uint16_t cntrsCnt; //number of contours in glyph uint16_t reservedCntrsCnt; uint8_t* types; //curve type diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwImage.cpp b/thirdparty/thorvg/src/lib/sw_engine/tvgSwImage.cpp index f24d2d6f27..c02e28b432 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwImage.cpp +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwImage.cpp @@ -46,7 +46,7 @@ static bool _genOutline(SwImage* image, const Matrix* transform, SwMpool* mpool, if (outline->reservedCntrsCnt < 1) { outline->reservedCntrsCnt = 1; - outline->cntrs = static_cast<uint16_t*>(realloc(outline->cntrs, outline->reservedCntrsCnt * sizeof(uint16_t))); + outline->cntrs = static_cast<uint32_t*>(realloc(outline->cntrs, outline->reservedCntrsCnt * sizeof(uint32_t))); outline->closed = static_cast<bool*>(realloc(outline->closed, outline->reservedCntrsCnt * sizeof(bool))); outline->closed[0] = true; } diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwShape.cpp b/thirdparty/thorvg/src/lib/sw_engine/tvgSwShape.cpp index 2a2c6a1da3..e5b540bcc3 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwShape.cpp +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwShape.cpp @@ -64,7 +64,7 @@ static bool _growOutlineContour(SwOutline& outline, uint32_t n) { if (outline.reservedCntrsCnt >= outline.cntrsCnt + n) return false; outline.reservedCntrsCnt = outline.cntrsCnt + n; - outline.cntrs = static_cast<uint16_t*>(realloc(outline.cntrs, outline.reservedCntrsCnt * sizeof(uint16_t))); + outline.cntrs = static_cast<uint32_t*>(realloc(outline.cntrs, outline.reservedCntrsCnt * sizeof(uint32_t))); return true; } diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwStroke.cpp b/thirdparty/thorvg/src/lib/sw_engine/tvgSwStroke.cpp index 04aa9a36ec..fa213cc5d3 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwStroke.cpp +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwStroke.cpp @@ -780,7 +780,7 @@ static void _exportBorderOutline(const SwStroke& stroke, SwOutline* outline, uin auto src = border->tags; auto tags = outline->types + outline->ptsCnt; auto cntrs = outline->cntrs + outline->cntrsCnt; - uint16_t idx = outline->ptsCnt; + auto idx = outline->ptsCnt; while (cnt > 0) { @@ -921,7 +921,7 @@ SwOutline* strokeExportOutline(SwStroke* stroke, SwMpool* mpool, unsigned tid) outline->reservedPtsCnt = ptsCnt; } if (outline->reservedCntrsCnt < cntrsCnt) { - outline->cntrs = static_cast<uint16_t*>(realloc(outline->cntrs, sizeof(uint16_t) * cntrsCnt)); + outline->cntrs = static_cast<uint32_t*>(realloc(outline->cntrs, sizeof(uint32_t) * cntrsCnt)); outline->reservedCntrsCnt = cntrsCnt; } diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp index a842b7fa8b..42bfd4de70 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp @@ -337,7 +337,10 @@ static unsigned char _parserColor(const char* value, char** end) r = svgUtilStrtof(value, end); *end = _skipSpace(*end, nullptr); - if (**end == '%') r = 255 * r / 100; + if (**end == '%') { + r = 255 * r / 100; + (*end)++; + } *end = _skipSpace(*end, nullptr); if (r < 0 || r > 255) { @@ -1145,10 +1148,13 @@ static bool _attrParseSymbolNode(void* data, const char* key, const char* value) if (!strcmp(key, "viewBox")) { if (!_parseNumber(&value, &symbol->vx) || !_parseNumber(&value, &symbol->vy)) return false; if (!_parseNumber(&value, &symbol->vw) || !_parseNumber(&value, &symbol->vh)) return false; + symbol->hasViewBox = true; } else if (!strcmp(key, "width")) { symbol->w = _toFloat(loader->svgParse, value, SvgParserLengthType::Horizontal); + symbol->hasWidth = true; } else if (!strcmp(key, "height")) { symbol->h = _toFloat(loader->svgParse, value, SvgParserLengthType::Vertical); + symbol->hasHeight = true; } else if (!strcmp(key, "preserveAspectRatio")) { if (!strcmp(value, "none")) symbol->preserveAspect = false; } else if (!strcmp(key, "overflow")) { @@ -1306,6 +1312,12 @@ static SvgNode* _createSymbolNode(SvgLoaderData* loader, SvgNode* parent, const loader->svgParse->node->node.symbol.preserveAspect = true; loader->svgParse->node->node.symbol.overflowVisible = false; + loader->svgParse->node->node.symbol.hasViewBox = false; + loader->svgParse->node->node.symbol.hasWidth = false; + loader->svgParse->node->node.symbol.hasHeight = false; + loader->svgParse->node->node.symbol.vx = 0.0f; + loader->svgParse->node->node.symbol.vy = 0.0f; + func(buf, bufLength, _attrParseSymbolNode, loader); return loader->svgParse->node; @@ -2722,6 +2734,7 @@ static void _svgLoaderParserXmlOpen(SvgLoaderData* loader, const char* content, } /* default value for opacity */ loader->svgParse->gradStop = {0.0f, 0, 0, 0, 255}; + loader->svgParse->flags = SvgStopStyleFlags::StopDefault; simpleXmlParseAttributes(attrs, attrsLength, _attrParseStops, loader); loader->latestGradient->stops.push(loader->svgParse->gradStop); } else if (!isIgnoreUnsupportedLogElements(tagName)) { @@ -2865,7 +2878,7 @@ static SvgStyleGradient* _gradientDup(Array<SvgStyleGradient*>* gradients, const auto gradList = gradients->data; for (uint32_t i = 0; i < gradients->count; ++i) { - if (!strcmp((*gradList)->id, id)) { + if ((*gradList)->id && !strcmp((*gradList)->id, id)) { result = _cloneGradient(*gradList); break; } @@ -2875,7 +2888,7 @@ static SvgStyleGradient* _gradientDup(Array<SvgStyleGradient*>* gradients, const if (result && result->ref) { gradList = gradients->data; for (uint32_t i = 0; i < gradients->count; ++i) { - if (!strcmp((*gradList)->id, result->ref)) { + if ((*gradList)->id && !strcmp((*gradList)->id, result->ref)) { if (result->stops.count == 0) _cloneGradStops(result->stops, (*gradList)->stops); //TODO: Properly inherit other property break; diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoaderCommon.h b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoaderCommon.h index 1f25e82adc..dc9ed558c3 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoaderCommon.h +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoaderCommon.h @@ -173,6 +173,9 @@ struct SvgSymbolNode float vx, vy, vw, vh; bool preserveAspect; bool overflowVisible; + bool hasViewBox; + bool hasWidth; + bool hasHeight; }; struct SvgUseNode diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp index 90705f2523..a3f34fd46b 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp @@ -576,15 +576,17 @@ static unique_ptr<Scene> _useBuildHelper(const SvgNode* node, const Box& vBox, c if (node->node.use.symbol) { auto symbol = node->node.use.symbol->node.symbol; - auto width = symbol.w; + auto width = (symbol.hasWidth ? symbol.w : vBox.w); if (node->node.use.isWidthSet) width = node->node.use.w; - auto height = symbol.h; + auto height = (symbol.hasHeight ? symbol.h : vBox.h);; if (node->node.use.isHeightSet) height = node->node.use.h; + auto vw = (symbol.hasViewBox ? symbol.vw : width); + auto vh = (symbol.hasViewBox ? symbol.vh : height); Matrix mViewBox = {1, 0, 0, 0, 1, 0, 0, 0, 1}; - if ((!mathEqual(width, symbol.vw) || !mathEqual(height, symbol.vh)) && symbol.vw > 0 && symbol.vh > 0) { - auto sx = width / symbol.vw; - auto sy = height / symbol.vh; + if ((!mathEqual(width, vw) || !mathEqual(height, vh)) && vw > 0 && vh > 0) { + auto sx = width / vw; + auto sy = height / vh; if (symbol.preserveAspect) { if (sx < sy) sy = sx; else sx = sy; @@ -592,8 +594,8 @@ static unique_ptr<Scene> _useBuildHelper(const SvgNode* node, const Box& vBox, c auto tvx = symbol.vx * sx; auto tvy = symbol.vy * sy; - auto tvw = symbol.vw * sx; - auto tvh = symbol.vh * sy; + auto tvw = vw * sx; + auto tvh = vh * sy; tvy -= (symbol.h - tvh) * 0.5f; tvx -= (symbol.w - tvw) * 0.5f; mViewBox = {sx, 0, -tvx, 0, sy, -tvy, 0, 0, 1}; diff --git a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp index a12689c7dd..245bc7603a 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp @@ -26,6 +26,8 @@ #ifdef _WIN32 #include <malloc.h> +#elif __FreeBSD__ + #include<stdlib.h> #else #include <alloca.h> #endif diff --git a/thirdparty/thorvg/update-thorvg.sh b/thirdparty/thorvg/update-thorvg.sh index 29b5677983..77badb8b60 100755 --- a/thirdparty/thorvg/update-thorvg.sh +++ b/thirdparty/thorvg/update-thorvg.sh @@ -1,4 +1,4 @@ -VERSION=0.8.0 +VERSION=0.8.1 rm -rf AUTHORS inc LICENSE src *.zip curl -L -O https://github.com/Samsung/thorvg/archive/refs/tags/v$VERSION.zip bsdtar --strip-components=1 -xvf *.zip diff --git a/thirdparty/xatlas/xatlas.cpp b/thirdparty/xatlas/xatlas.cpp index d92ef1a83a..5c5c57ecab 100644 --- a/thirdparty/xatlas/xatlas.cpp +++ b/thirdparty/xatlas/xatlas.cpp @@ -4753,13 +4753,10 @@ public: Vector2 *v = m_vertexBuffers[m_activeVertexBuffer]; v[m_numVertices] = v[0]; m_area = 0; - float centroidx = 0, centroidy = 0; for (uint32_t k = 0; k < m_numVertices; k++) { // http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/ float f = v[k].x * v[k + 1].y - v[k + 1].x * v[k].y; m_area += f; - centroidx += f * (v[k].x + v[k + 1].x); - centroidy += f * (v[k].y + v[k + 1].y); } m_area = 0.5f * fabsf(m_area); } @@ -9089,7 +9086,6 @@ AddMeshError AddMesh(Atlas *atlas, const MeshDecl &meshDecl, uint32_t meshCountH const uint32_t kMaxWarnings = 50; uint32_t warningCount = 0; internal::Array<uint32_t> triIndices; - uint32_t firstFaceIndex = 0; internal::Triangulator triangulator; for (uint32_t face = 0; face < faceCount; face++) { // Decode face indices. @@ -9199,7 +9195,6 @@ AddMeshError AddMesh(Atlas *atlas, const MeshDecl &meshDecl, uint32_t meshCountH for (uint32_t i = 0; i < triIndices.size(); i++) meshPolygonMapping->triangleToPolygonIndicesMap.push_back(triIndices[i]); } - firstFaceIndex += faceVertexCount; } if (warningCount > kMaxWarnings) XA_PRINT(" %u additional warnings truncated\n", warningCount - kMaxWarnings); |