Fix various typos

* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
Aarni Koskela 2025-01-08 11:56:49 +02:00
parent d2ada64a03
commit f134769506
86 changed files with 396 additions and 396 deletions

View file

@ -198,7 +198,7 @@ opts.Add(BoolVariable("threads", "Enable threading support", True))
opts.Add(BoolVariable("deprecated", "Enable compatibility code for deprecated and removed features", True))
opts.Add(EnumVariable("precision", "Set the floating-point precision level", "single", ("single", "double")))
opts.Add(BoolVariable("minizip", "Enable ZIP archive support using minizip", True))
opts.Add(BoolVariable("brotli", "Enable Brotli for decompresson and WOFF2 fonts support", True))
opts.Add(BoolVariable("brotli", "Enable Brotli for decompression and WOFF2 fonts support", True))
opts.Add(BoolVariable("xaudio2", "Enable the XAudio2 audio driver on supported platforms", False))
opts.Add(BoolVariable("vulkan", "Enable the vulkan rendering driver", True))
opts.Add(BoolVariable("opengl3", "Enable the OpenGL/GLES3 rendering driver", True))

View file

@ -135,9 +135,9 @@ class Delaunay3D {
R128 row3_y = v3_y - v0_y;
R128 row3_z = v3_z - v0_z;
R128 sq_lenght1 = row1_x * row1_x + row1_y * row1_y + row1_z * row1_z;
R128 sq_lenght2 = row2_x * row2_x + row2_y * row2_y + row2_z * row2_z;
R128 sq_lenght3 = row3_x * row3_x + row3_y * row3_y + row3_z * row3_z;
R128 sq_length1 = row1_x * row1_x + row1_y * row1_y + row1_z * row1_z;
R128 sq_length2 = row2_x * row2_x + row2_y * row2_y + row2_z * row2_z;
R128 sq_length3 = row3_x * row3_x + row3_y * row3_y + row3_z * row3_z;
// Compute the determinant of said matrix.
R128 determinant = row1_x * (row2_y * row3_z - row3_y * row2_z) - row2_x * (row1_y * row3_z - row3_y * row1_z) + row3_x * (row1_y * row2_z - row2_y * row1_z);
@ -146,9 +146,9 @@ class Delaunay3D {
R128 volume = determinant / R128(6.f);
R128 i12volume = R128(1.f) / (volume * R128(12.f));
R128 center_x = v0_x + i12volume * ((row2_y * row3_z - row3_y * row2_z) * sq_lenght1 - (row1_y * row3_z - row3_y * row1_z) * sq_lenght2 + (row1_y * row2_z - row2_y * row1_z) * sq_lenght3);
R128 center_y = v0_y + i12volume * (-(row2_x * row3_z - row3_x * row2_z) * sq_lenght1 + (row1_x * row3_z - row3_x * row1_z) * sq_lenght2 - (row1_x * row2_z - row2_x * row1_z) * sq_lenght3);
R128 center_z = v0_z + i12volume * ((row2_x * row3_y - row3_x * row2_y) * sq_lenght1 - (row1_x * row3_y - row3_x * row1_y) * sq_lenght2 + (row1_x * row2_y - row2_x * row1_y) * sq_lenght3);
R128 center_x = v0_x + i12volume * ((row2_y * row3_z - row3_y * row2_z) * sq_length1 - (row1_y * row3_z - row3_y * row1_z) * sq_length2 + (row1_y * row2_z - row2_y * row1_z) * sq_length3);
R128 center_y = v0_y + i12volume * (-(row2_x * row3_z - row3_x * row2_z) * sq_length1 + (row1_x * row3_z - row3_x * row1_z) * sq_length2 - (row1_x * row2_z - row2_x * row1_z) * sq_length3);
R128 center_z = v0_z + i12volume * ((row2_x * row3_y - row3_x * row2_y) * sq_length1 - (row1_x * row3_y - row3_x * row1_y) * sq_length2 + (row1_x * row2_y - row2_x * row1_y) * sq_length3);
// Once we know the center, the radius is clearly the distance to any vertex.
R128 rel1_x = center_x - v0_x;

View file

@ -417,8 +417,8 @@ public:
}
}
void set_description(const char *p_descrption) {
description = p_descrption;
void set_description(const char *p_description) {
description = p_description;
}
RID_Alloc(uint32_t p_target_chunk_byte_size = 65536, uint32_t p_maximum_number_of_elements = 262144) {
@ -515,8 +515,8 @@ public:
alloc.fill_owned_buffer(p_rid_buffer);
}
void set_description(const char *p_descrption) {
alloc.set_description(p_descrption);
void set_description(const char *p_description) {
alloc.set_description(p_description);
}
RID_PtrOwner(uint32_t p_target_chunk_byte_size = 65536, uint32_t p_maximum_number_of_elements = 262144) :
@ -570,8 +570,8 @@ public:
alloc.fill_owned_buffer(p_rid_buffer);
}
void set_description(const char *p_descrption) {
alloc.set_description(p_descrption);
void set_description(const char *p_description) {
alloc.set_description(p_description);
}
RID_Owner(uint32_t p_target_chunk_byte_size = 65536, uint32_t p_maximum_number_of_elements = 262144) :
alloc(p_target_chunk_byte_size, p_maximum_number_of_elements) {}

View file

@ -479,7 +479,7 @@ Variant Variant::get_named(const StringName &p_member, bool &r_valid) const {
} \
};
#define INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(m_base_type, m_elem_type, m_assign_type, m_max) \
#define INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(m_base_type, m_elem_type, m_assign_type, m_max) \
struct VariantIndexedSetGet_##m_base_type { \
static void get(const Variant *base, int64_t index, Variant *value, bool *oob) { \
if (index < 0 || index >= m_max) { \
@ -541,7 +541,7 @@ Variant Variant::get_named(const StringName &p_member, bool &r_valid) const {
} \
};
#define INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(m_base_type, m_elem_type, m_accessor, m_max) \
#define INDEXED_SETGET_STRUCT_BUILTIN_ACCESSOR(m_base_type, m_elem_type, m_accessor, m_max) \
struct VariantIndexedSetGet_##m_base_type { \
static void get(const Variant *base, int64_t index, Variant *value, bool *oob) { \
if (index < 0 || index >= m_max) { \
@ -597,7 +597,7 @@ Variant Variant::get_named(const StringName &p_member, bool &r_valid) const {
} \
};
#define INDEXED_SETGET_STRUCT_BULTIN_FUNC(m_base_type, m_elem_type, m_set, m_get, m_max) \
#define INDEXED_SETGET_STRUCT_BUILTIN_FUNC(m_base_type, m_elem_type, m_set, m_get, m_max) \
struct VariantIndexedSetGet_##m_base_type { \
static void get(const Variant *base, int64_t index, Variant *value, bool *oob) { \
if (index < 0 || index >= m_max) { \
@ -844,18 +844,18 @@ struct VariantIndexedSetGet_String {
static uint64_t get_indexed_size(const Variant *base) { return VariantInternal::get_string(base)->length(); }
};
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector2, double, real_t, 2)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector2i, int64_t, int32_t, 2)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector3, double, real_t, 3)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector3i, int64_t, int32_t, 3)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector4, double, real_t, 4)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector4i, int64_t, int32_t, 4)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Quaternion, double, real_t, 4)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Color, double, float, 4)
INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(Vector2, double, real_t, 2)
INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(Vector2i, int64_t, int32_t, 2)
INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(Vector3, double, real_t, 3)
INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(Vector3i, int64_t, int32_t, 3)
INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(Vector4, double, real_t, 4)
INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(Vector4i, int64_t, int32_t, 4)
INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(Quaternion, double, real_t, 4)
INDEXED_SETGET_STRUCT_BUILTIN_NUMERIC(Color, double, float, 4)
INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(Transform2D, Vector2, .columns, 3)
INDEXED_SETGET_STRUCT_BULTIN_FUNC(Basis, Vector3, set_column, get_column, 3)
INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(Projection, Vector4, .columns, 4)
INDEXED_SETGET_STRUCT_BUILTIN_ACCESSOR(Transform2D, Vector2, .columns, 3)
INDEXED_SETGET_STRUCT_BUILTIN_FUNC(Basis, Vector3, set_column, get_column, 3)
INDEXED_SETGET_STRUCT_BUILTIN_ACCESSOR(Projection, Vector4, .columns, 4)
INDEXED_SETGET_STRUCT_TYPED_NUMERIC(PackedByteArray, int64_t, uint8_t)
INDEXED_SETGET_STRUCT_TYPED_NUMERIC(PackedInt32Array, int64_t, int32_t)

View file

@ -1475,7 +1475,7 @@ EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are not
# supported properly for IE 6.0, but are supported on all modern browsers.
#

View file

@ -1280,7 +1280,7 @@
<param index="1" name="color" type="Color" />
<param index="2" name="ambient" type="int" enum="RenderingServer.EnvironmentAmbientSource" default="0" />
<param index="3" name="energy" type="float" default="1.0" />
<param index="4" name="sky_contibution" type="float" default="0.0" />
<param index="4" name="sky_contribution" type="float" default="0.0" />
<param index="5" name="reflection_source" type="int" enum="RenderingServer.EnvironmentReflectionSource" default="0" />
<description>
Sets the values to be used for ambient light rendering. See [Environment] for more details.

View file

@ -1660,7 +1660,7 @@ bool RenderingDeviceDriverD3D12::texture_can_make_shared_with_format(TextureID p
/**** SAMPLER ****/
/*****************/
static const D3D12_TEXTURE_ADDRESS_MODE RD_REPEAT_MODE_TO_D3D12_ADDRES_MODE[RDD::SAMPLER_REPEAT_MODE_MAX] = {
static const D3D12_TEXTURE_ADDRESS_MODE RD_REPEAT_MODE_TO_D3D12_ADDRESS_MODE[RDD::SAMPLER_REPEAT_MODE_MAX] = {
D3D12_TEXTURE_ADDRESS_MODE_WRAP,
D3D12_TEXTURE_ADDRESS_MODE_MIRROR,
D3D12_TEXTURE_ADDRESS_MODE_CLAMP,
@ -1715,9 +1715,9 @@ RDD::SamplerID RenderingDeviceDriverD3D12::sampler_create(const SamplerState &p_
p_state.enable_compare ? D3D12_FILTER_REDUCTION_TYPE_COMPARISON : D3D12_FILTER_REDUCTION_TYPE_STANDARD);
}
sampler_desc.AddressU = RD_REPEAT_MODE_TO_D3D12_ADDRES_MODE[p_state.repeat_u];
sampler_desc.AddressV = RD_REPEAT_MODE_TO_D3D12_ADDRES_MODE[p_state.repeat_v];
sampler_desc.AddressW = RD_REPEAT_MODE_TO_D3D12_ADDRES_MODE[p_state.repeat_w];
sampler_desc.AddressU = RD_REPEAT_MODE_TO_D3D12_ADDRESS_MODE[p_state.repeat_u];
sampler_desc.AddressV = RD_REPEAT_MODE_TO_D3D12_ADDRESS_MODE[p_state.repeat_v];
sampler_desc.AddressW = RD_REPEAT_MODE_TO_D3D12_ADDRESS_MODE[p_state.repeat_w];
for (int i = 0; i < 4; i++) {
sampler_desc.BorderColor[i] = RD_TO_D3D12_SAMPLER_BORDER_COLOR[p_state.border_color][i];
@ -3811,7 +3811,7 @@ void RenderingDeviceDriverD3D12::shader_destroy_modules(ShaderID p_shader) {
/**** UNIFORM SET ****/
/*********************/
static void _add_descriptor_count_for_uniform(RenderingDevice::UniformType p_type, uint32_t p_binding_length, bool p_dobule_srv_uav_ambiguous, uint32_t &r_num_resources, uint32_t &r_num_samplers, bool &r_srv_uav_ambiguity) {
static void _add_descriptor_count_for_uniform(RenderingDevice::UniformType p_type, uint32_t p_binding_length, bool p_double_srv_uav_ambiguous, uint32_t &r_num_resources, uint32_t &r_num_samplers, bool &r_srv_uav_ambiguity) {
r_srv_uav_ambiguity = false;
// Some resource types can be SRV or UAV, depending on what NIR-DXIL decided for a specific shader variant.
@ -3832,11 +3832,11 @@ static void _add_descriptor_count_for_uniform(RenderingDevice::UniformType p_typ
r_num_resources += 1;
} break;
case RenderingDevice::UNIFORM_TYPE_STORAGE_BUFFER: {
r_num_resources += p_dobule_srv_uav_ambiguous ? 2 : 1;
r_num_resources += p_double_srv_uav_ambiguous ? 2 : 1;
r_srv_uav_ambiguity = true;
} break;
case RenderingDevice::UNIFORM_TYPE_IMAGE: {
r_num_resources += p_binding_length * (p_dobule_srv_uav_ambiguous ? 2 : 1);
r_num_resources += p_binding_length * (p_double_srv_uav_ambiguous ? 2 : 1);
r_srv_uav_ambiguity = true;
} break;
default: {

View file

@ -757,7 +757,7 @@ public:
virtual void shadow_atlas_free(RID p_atlas) override;
virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits = true) override;
virtual void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) override;
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) override;
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_instance, float p_coverage, uint64_t p_light_version) override;
_FORCE_INLINE_ bool shadow_atlas_owns_light_instance(RID p_atlas, RID p_light_instance) {
ShadowAtlas *atlas = shadow_atlas_owner.get_or_null(p_atlas);
@ -883,7 +883,7 @@ public:
virtual void shadow_atlas_update(RID p_atlas) override;
virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = true) override;
virtual int get_directional_light_shadow_size(RID p_light_intance) override;
virtual int get_directional_light_shadow_size(RID p_light_instance) override;
virtual void set_directional_shadow_count(int p_count) override;
Rect2i get_directional_shadow_rect();

View file

@ -274,7 +274,7 @@ public:
MTLFormatType getFormatType(DataFormat p_format);
/** Returns the format type corresponding to the specified Metal MTLPixelFormat, */
MTLFormatType getFormatType(MTLPixelFormat p_formt);
MTLFormatType getFormatType(MTLPixelFormat p_format);
/**
* Returns the Metal MTLPixelFormat corresponding to the specified Godot pixel

View file

@ -144,8 +144,8 @@ MTLFormatType PixelFormats::getFormatType(DataFormat p_format) {
return getDataFormatDesc(p_format).formatType;
}
MTLFormatType PixelFormats::getFormatType(MTLPixelFormat p_formt) {
return getDataFormatDesc(p_formt).formatType;
MTLFormatType PixelFormats::getFormatType(MTLPixelFormat p_format) {
return getDataFormatDesc(p_format).formatType;
}
MTLPixelFormat PixelFormats::getMTLPixelFormat(DataFormat p_format) {

View file

@ -417,8 +417,8 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
animation_path = animation_path.replace(":frame", ":animation");
int animation_track = get_animation()->find_track(animation_path, get_animation()->track_get_type(get_track()));
float track_time = get_animation()->track_get_key_time(get_track(), p_index);
int animaiton_index = get_animation()->track_find_key(animation_track, track_time);
animation_name = get_animation()->track_get_key_value(animation_track, animaiton_index);
int animation_index = get_animation()->track_find_key(animation_track, track_time);
animation_name = get_animation()->track_get_key_value(animation_track, animation_index);
}
Ref<Texture2D> texture = sf->get_frame_texture(animation_name, frame);
@ -509,8 +509,8 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
animation_path = animation_path.replace(":frame", ":animation");
int animation_track = get_animation()->find_track(animation_path, get_animation()->track_get_type(get_track()));
float track_time = get_animation()->track_get_key_time(get_track(), p_index);
int animaiton_index = get_animation()->track_find_key(animation_track, track_time);
animation_name = get_animation()->track_get_key_value(animation_track, animaiton_index);
int animation_index = get_animation()->track_find_key(animation_track, track_time);
animation_name = get_animation()->track_get_key_value(animation_track, animation_index);
}
texture = sf->get_frame_texture(animation_name, frame);

View file

@ -75,7 +75,7 @@ static String _translate_doc_string(const String &p_text) {
return translated.indent(indent);
}
// Comparator for constructors, based on `MetodDoc` operator.
// Comparator for constructors, based on `MethodDoc` operator.
struct ConstructorCompare {
_FORCE_INLINE_ bool operator()(const DocData::MethodDoc &p_lhs, const DocData::MethodDoc &p_rhs) const {
// Must be a constructor (i.e. assume named for the class)

View file

@ -275,7 +275,7 @@ private:
uint32_t spare3; // Not used.
uint64_t code_limit_64; // Set to 0 and ignore.
// Version 0x20400
uint64_t exec_seg_base; // Start of the signed code segmet.
uint64_t exec_seg_base; // Start of the signed code segment.
uint64_t exec_seg_limit; // Code segment (__TEXT) vmsize.
uint64_t exec_seg_flags; // Executable segment flags.
// Version 0x20500

View file

@ -82,7 +82,7 @@ Control *FileSystemList::make_custom_tooltip(const String &p_text) const {
}
void FileSystemList::_line_editor_submit(const String &p_text) {
if (popup_edit_commited) {
if (popup_edit_committed) {
return; // Already processed by _text_editor_popup_modal_close
}
@ -90,7 +90,7 @@ void FileSystemList::_line_editor_submit(const String &p_text) {
return; // ESC pressed, app focus lost, or forced close from code.
}
popup_edit_commited = true; // End edit popup processing.
popup_edit_committed = true; // End edit popup processing.
popup_editor->hide();
emit_signal(SNAME("item_edited"));
@ -139,7 +139,7 @@ bool FileSystemList::edit_selected() {
line_editor->set_text(name);
line_editor->select(0, name.rfind_char('.'));
popup_edit_commited = false; // Start edit popup processing.
popup_edit_committed = false; // Start edit popup processing.
popup_editor->popup();
popup_editor->child_controls_changed();
line_editor->grab_focus();
@ -151,7 +151,7 @@ String FileSystemList::get_edit_text() {
}
void FileSystemList::_text_editor_popup_modal_close() {
if (popup_edit_commited) {
if (popup_edit_committed) {
return; // Already processed by _text_editor_popup_modal_close
}
@ -1184,7 +1184,7 @@ HashSet<String> FileSystemDock::_get_valid_conversions_for_file_paths(const Vect
return HashSet<String>();
}
// Get a list of all potentional conversion-to targets.
// Get a list of all potential conversion-to targets.
HashSet<String> current_valid_conversion_to_targets;
for (const Ref<EditorResourceConversionPlugin> &E : conversions) {
const String what = E->converts_to();

View file

@ -60,7 +60,7 @@ class FileSystemTree : public Tree {
class FileSystemList : public ItemList {
GDCLASS(FileSystemList, ItemList);
bool popup_edit_commited = true;
bool popup_edit_committed = true;
VBoxContainer *popup_editor_vb = nullptr;
Popup *popup_editor = nullptr;
LineEdit *line_editor = nullptr;

View file

@ -645,13 +645,13 @@ void PostImportPluginSkeletonRestFixer::internal_process(InternalImportCategory
// Scan descendants for mapped bones.
bool found_mapped = false;
Vector<int> decendants_to_process = src_skeleton->get_bone_children(src_idx);
while (decendants_to_process.size() > 0) {
int desc_idx = decendants_to_process[0];
decendants_to_process.erase(desc_idx);
Vector<int> descendants_to_process = src_skeleton->get_bone_children(src_idx);
while (descendants_to_process.size() > 0) {
int desc_idx = descendants_to_process[0];
descendants_to_process.erase(desc_idx);
Vector<int> desc_children = src_skeleton->get_bone_children(desc_idx);
for (const int &desc_child : desc_children) {
decendants_to_process.push_back(desc_child);
descendants_to_process.push_back(desc_child);
}
StringName desc_bone_name = is_renamed ? StringName(src_skeleton->get_bone_name(desc_idx)) : bone_map->find_profile_bone_name(src_skeleton->get_bone_name(desc_idx));

View file

@ -2363,12 +2363,12 @@ void ResourceImporterScene::get_import_options(const String &p_path, List<Import
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/root_type", PROPERTY_HINT_TYPE_STRING, "Node"), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/root_name"), ""));
List<String> script_extentions;
ResourceLoader::get_recognized_extensions_for_type("Script", &script_extentions);
List<String> script_extensions;
ResourceLoader::get_recognized_extensions_for_type("Script", &script_extensions);
String script_ext_hint;
for (const String &E : script_extentions) {
for (const String &E : script_extensions) {
if (!script_ext_hint.is_empty()) {
script_ext_hint += ",";
}

View file

@ -489,7 +489,7 @@ void ResourceImporterLayeredTexture::_check_compress_ctex(const String &p_source
_save_tex(*r_texture_import->slices, r_texture_import->save_path + "." + extension, r_texture_import->compress_mode, r_texture_import->lossy, Image::COMPRESS_S3TC /* IGNORED */, *r_texture_import->csource, r_texture_import->used_channels, r_texture_import->mipmaps, false);
return;
}
// Must import in all formats, in order of priority (so platform choses the best supported one. IE, etc2 over etc).
// Must import in all formats, in order of priority (so platform chooses the best supported one. IE, etc2 over etc).
// Android, GLES 2.x
const bool can_s3tc_bptc = ResourceImporterTextureSettings::should_import_s3tc_bptc();

View file

@ -2072,8 +2072,8 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
bool current_hover_handle_secondary = false;
int curreny_hover_handle = spatial_editor->get_current_hover_gizmo_handle(current_hover_handle_secondary);
if (found_gizmo != spatial_editor->get_current_hover_gizmo() || found_handle != curreny_hover_handle || found_handle_secondary != current_hover_handle_secondary) {
int current_hover_handle = spatial_editor->get_current_hover_gizmo_handle(current_hover_handle_secondary);
if (found_gizmo != spatial_editor->get_current_hover_gizmo() || found_handle != current_hover_handle || found_handle_secondary != current_hover_handle_secondary) {
spatial_editor->set_current_hover_gizmo(found_gizmo);
spatial_editor->set_current_hover_gizmo_handle(found_handle, found_handle_secondary);
spatial_editor->get_single_selected_node()->update_gizmos();

View file

@ -1277,8 +1277,8 @@ Ref<Script> ScriptEditor::_get_current_script() {
TypedArray<Script> ScriptEditor::_get_open_scripts() const {
TypedArray<Script> ret;
Vector<Ref<Script>> scripts = get_open_scripts();
int scrits_amount = scripts.size();
for (int idx_script = 0; idx_script < scrits_amount; idx_script++) {
int scripts_amount = scripts.size();
for (int idx_script = 0; idx_script < scripts_amount; idx_script++) {
ret.push_back(scripts[idx_script]);
}
return ret;

View file

@ -435,7 +435,7 @@ class ScriptEditor : public PanelContainer {
void _clear_execution(Ref<RefCounted> p_script);
void _breaked(bool p_breaked, bool p_can_debug);
void _script_created(Ref<Script> p_script);
void _set_breakpoint(Ref<RefCounted> p_scrpt, int p_line, bool p_enabled);
void _set_breakpoint(Ref<RefCounted> p_script, int p_line, bool p_enabled);
void _clear_breakpoints();
Array _get_cached_breakpoints_for_script(const String &p_path) const;

View file

@ -216,7 +216,7 @@ void AtlasMergingDialog::_merge_confirmed(const String &p_path) {
}
}
undo_redo->commit_action();
commited_actions_count++;
committed_actions_count++;
hide();
}
@ -228,10 +228,10 @@ void AtlasMergingDialog::ok_pressed() {
void AtlasMergingDialog::cancel_pressed() {
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (int i = 0; i < commited_actions_count; i++) {
for (int i = 0; i < committed_actions_count; i++) {
undo_redo->undo();
}
commited_actions_count = 0;
committed_actions_count = 0;
}
void AtlasMergingDialog::custom_action(const String &p_action) {
@ -289,7 +289,7 @@ void AtlasMergingDialog::update_tile_set(Ref<TileSet> p_tile_set) {
get_ok_button()->set_disabled(true);
merge_button->set_disabled(true);
commited_actions_count = 0;
committed_actions_count = 0;
}
AtlasMergingDialog::AtlasMergingDialog() {

View file

@ -44,7 +44,7 @@ class AtlasMergingDialog : public ConfirmationDialog {
GDCLASS(AtlasMergingDialog, ConfirmationDialog);
private:
int commited_actions_count = 0;
int committed_actions_count = 0;
bool delete_original_atlases = true;
Ref<TileSetAtlasSource> merged;
LocalVector<HashMap<Vector2i, Vector2i>> merged_mapping;

View file

@ -85,7 +85,7 @@ void TileProxiesManagerDialog::_delete_selected_bindings() {
undo_redo->add_undo_method(this, "_update_lists");
undo_redo->commit_action();
commited_actions_count += 1;
committed_actions_count += 1;
}
void TileProxiesManagerDialog::_update_lists() {
@ -191,7 +191,7 @@ void TileProxiesManagerDialog::_add_button_pressed() {
undo_redo->add_do_method(this, "_update_lists");
undo_redo->add_undo_method(this, "_update_lists");
undo_redo->commit_action();
commited_actions_count++;
committed_actions_count++;
}
}
@ -306,10 +306,10 @@ void TileProxiesManagerDialog::_unhandled_key_input(Ref<InputEvent> p_event) {
void TileProxiesManagerDialog::cancel_pressed() {
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (int i = 0; i < commited_actions_count; i++) {
for (int i = 0; i < committed_actions_count; i++) {
undo_redo->undo();
}
commited_actions_count = 0;
committed_actions_count = 0;
}
void TileProxiesManagerDialog::_bind_methods() {
@ -320,7 +320,7 @@ void TileProxiesManagerDialog::_bind_methods() {
void TileProxiesManagerDialog::update_tile_set(Ref<TileSet> p_tile_set) {
ERR_FAIL_COND(p_tile_set.is_null());
tile_set = p_tile_set;
commited_actions_count = 0;
committed_actions_count = 0;
_update_lists();
}

View file

@ -43,7 +43,7 @@ class TileProxiesManagerDialog : public ConfirmationDialog {
GDCLASS(TileProxiesManagerDialog, ConfirmationDialog);
private:
int commited_actions_count = 0;
int committed_actions_count = 0;
Ref<TileSet> tile_set;
TileMapCell from;

View file

@ -439,10 +439,10 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro
// Get the list of properties common to all tiles (similar to what's done in MultiNodeEdit).
struct PropertyId {
int occurence_id = 0;
int occurrence_id = 0;
String property;
bool operator<(const PropertyId &p_other) const {
return occurence_id == p_other.occurence_id ? property < p_other.property : occurence_id < p_other.occurence_id;
return occurrence_id == p_other.occurrence_id ? property < p_other.property : occurrence_id < p_other.occurrence_id;
}
};
struct PLData {

View file

@ -104,7 +104,7 @@ public:
Ref<TileSetAtlasSource> get_edited_tile_set_atlas_source() const { return tile_set_atlas_source; }
RBSet<TileSelection> get_edited_tiles() const { return tiles; }
// Update the proxyed object.
// Update the proxied object.
void edit(Ref<TileSetAtlasSource> p_tile_set_atlas_source, const RBSet<TileSelection> &p_tiles = RBSet<TileSelection>());
AtlasTileProxyObject(TileSetAtlasSourceEditor *p_tiles_set_atlas_source_editor) {

View file

@ -85,7 +85,7 @@ private:
static void _bind_methods();
public:
// Update the proxyed object.
// Update the proxied object.
void edit(TileSetScenesCollectionSource *p_tile_set_atlas_source, int p_scene_id);
SceneTileProxyObject(TileSetScenesCollectionSourceEditor *p_tiles_set_scenes_collection_source_editor) {

View file

@ -23,8 +23,8 @@ def parse_template(inherits, source, delimiter):
line = line[len(meta_prefix) :]
for m in meta:
if line.startswith(m):
strip_lenght = len(m) + 1
script_template[m] = line[strip_lenght:].strip()
strip_length = len(m) + 1
script_template[m] = line[strip_length:].strip()
else:
script_template["script"] += line
if script_template["space-indent"] != "":

View file

@ -92,14 +92,14 @@ SteamTracker::SteamTracker() {
if (steam_init_flat_function) {
char err_msg[1024] = {};
steam_initalized = (steam_init_flat_function(&err_msg[0]) == SteamAPIInitResult_OK);
steam_initialized = (steam_init_flat_function(&err_msg[0]) == SteamAPIInitResult_OK);
} else if (steam_init_function) {
steam_initalized = steam_init_function();
steam_initialized = steam_init_function();
}
}
SteamTracker::~SteamTracker() {
if (steam_shutdown_function && steam_initalized) {
if (steam_shutdown_function && steam_initialized) {
steam_shutdown_function();
}
if (steam_library_handle) {

View file

@ -62,7 +62,7 @@ class SteamTracker {
SteamAPI_InitFunction steam_init_function = nullptr;
SteamAPI_InitFlatFunction steam_init_flat_function = nullptr;
SteamAPI_ShutdownFunction steam_shutdown_function = nullptr;
bool steam_initalized = false;
bool steam_initialized = false;
public:
SteamTracker();

View file

@ -17,8 +17,8 @@ const ENSURE_CROSSORIGIN_ISOLATION_HEADERS = ___GODOT_ENSURE_CROSSORIGIN_ISOLATI
const CACHED_FILES = ___GODOT_CACHE___;
// Files that we might not want the user to preload, and will only be cached on first load.
/** @type {string[]} */
const CACHABLE_FILES = ___GODOT_OPT_CACHE___;
const FULL_CACHE = CACHED_FILES.concat(CACHABLE_FILES);
const CACHEABLE_FILES = ___GODOT_OPT_CACHE___;
const FULL_CACHE = CACHED_FILES.concat(CACHEABLE_FILES);
self.addEventListener('install', (event) => {
event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(CACHED_FILES)));
@ -99,8 +99,8 @@ self.addEventListener(
const referrer = event.request.referrer || '';
const base = referrer.slice(0, referrer.lastIndexOf('/') + 1);
const local = url.startsWith(base) ? url.replace(base, '') : '';
const isCachable = FULL_CACHE.some((v) => v === local) || (base === referrer && base.endsWith(CACHED_FILES[0]));
if (isNavigate || isCachable) {
const isCacheable = FULL_CACHE.some((v) => v === local) || (base === referrer && base.endsWith(CACHED_FILES[0]));
if (isNavigate || isCacheable) {
event.respondWith((async () => {
// Try to use cache first
const cache = await caches.open(CACHE_NAME);
@ -112,7 +112,7 @@ self.addEventListener(
if (missing) {
try {
// Try network if some cached file is missing (so we can display offline page in case).
const response = await fetchAndCache(event, cache, isCachable);
const response = await fetchAndCache(event, cache, isCacheable);
return response;
} catch (e) {
// And return the hopefully always cached offline page in case of network failure.
@ -129,7 +129,7 @@ self.addEventListener(
return cached;
}
// Try network if don't have it in cache.
const response = await fetchAndCache(event, cache, isCachable);
const response = await fetchAndCache(event, cache, isCacheable);
return response;
})());
} else if (ENSURE_CROSSORIGIN_ISOLATION_HEADERS) {

View file

@ -4508,11 +4508,11 @@ void GDScriptAnalyzer::reduce_identifier(GDScriptParser::IdentifierNode *p_ident
result.builtin_type = Variant::OBJECT;
result.native_type = SNAME("Node");
if (ResourceLoader::get_resource_type(autoload.path) == "GDScript") {
Ref<GDScriptParserRef> singl_parser = parser->get_depended_parser_for(autoload.path);
if (singl_parser.is_valid()) {
Error err = singl_parser->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
Ref<GDScriptParserRef> single_parser = parser->get_depended_parser_for(autoload.path);
if (single_parser.is_valid()) {
Error err = single_parser->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
if (err == OK) {
result = type_from_metatype(singl_parser->get_parser()->head->get_datatype());
result = type_from_metatype(single_parser->get_parser()->head->get_datatype());
}
}
} else if (ResourceLoader::get_resource_type(autoload.path) == "PackedScene") {
@ -4522,11 +4522,11 @@ void GDScriptAnalyzer::reduce_identifier(GDScriptParser::IdentifierNode *p_ident
if (node != nullptr) {
Ref<GDScript> scr = node->get_script();
if (scr.is_valid()) {
Ref<GDScriptParserRef> singl_parser = parser->get_depended_parser_for(scr->get_script_path());
if (singl_parser.is_valid()) {
Error err = singl_parser->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
Ref<GDScriptParserRef> single_parser = parser->get_depended_parser_for(scr->get_script_path());
if (single_parser.is_valid()) {
Error err = single_parser->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
if (err == OK) {
result = type_from_metatype(singl_parser->get_parser()->head->get_datatype());
result = type_from_metatype(single_parser->get_parser()->head->get_datatype());
}
}
}

View file

@ -2249,7 +2249,7 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
// Operator `is` used, check if identifier is in there! this helps resolve in blocks that are (if (identifier is value)): which are very common..
// Super dirty hack, but very useful.
// Credit: Zylann.
// TODO: this could be hacked to detect ANDed conditions too...
// TODO: this could be hacked to detect AND-ed conditions too...
const GDScriptParser::TypeTestNode *type_test = static_cast<const GDScriptParser::TypeTestNode *>(suite->parent_if->condition);
if (type_test->operand && type_test->test_type && type_test->operand->type == GDScriptParser::Node::IDENTIFIER && static_cast<const GDScriptParser::IdentifierNode *>(type_test->operand)->name == p_identifier->name && static_cast<const GDScriptParser::IdentifierNode *>(type_test->operand)->source == p_identifier->source) {
// Bingo.

View file

@ -43,12 +43,12 @@
#define COLUMN_NUMBER_TO_INDEX(p_column) ((p_column) - 1)
#endif
#ifndef SYMBOL_SEPERATOR
#define SYMBOL_SEPERATOR "::"
#ifndef SYMBOL_SEPARATOR
#define SYMBOL_SEPARATOR "::"
#endif
#ifndef JOIN_SYMBOLS
#define JOIN_SYMBOLS(p_path, name) ((p_path) + SYMBOL_SEPERATOR + (name))
#define JOIN_SYMBOLS(p_path, name) ((p_path) + SYMBOL_SEPARATOR + (name))
#endif
typedef HashMap<String, const lsp::DocumentSymbol *> ClassMembers;

View file

@ -307,7 +307,7 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) {
} else if (data.is_string()) {
String query = data;
Vector<String> param_symbols = query.split(SYMBOL_SEPERATOR, false);
Vector<String> param_symbols = query.split(SYMBOL_SEPARATOR, false);
if (param_symbols.size() >= 2) {
StringName class_name = param_symbols[0];

View file

@ -8175,7 +8175,7 @@ void GLTFDocument::_bind_methods() {
&GLTFDocument::get_supported_gltf_extensions);
}
void GLTFDocument::_build_parent_hierachy(Ref<GLTFState> p_state) {
void GLTFDocument::_build_parent_hierarchy(Ref<GLTFState> p_state) {
// build the hierarchy
for (GLTFNodeIndex node_i = 0; node_i < p_state->nodes.size(); node_i++) {
for (int j = 0; j < p_state->nodes[node_i]->children.size(); j++) {

View file

@ -103,7 +103,7 @@ public:
static String _gen_unique_name_static(HashSet<String> &r_unique_names, const String &p_name);
private:
void _build_parent_hierachy(Ref<GLTFState> p_state);
void _build_parent_hierarchy(Ref<GLTFState> p_state);
double _filter_number(double p_float);
void _round_min_max_components(Vector<double> &r_type_min, Vector<double> &r_type_max);
String _get_component_type_name(const GLTFAccessor::GLTFComponentType p_component_type);

View file

@ -358,7 +358,7 @@ k_tensor(GodotBody2D *a, GodotBody2D *b, Vector2 r1, Vector2 r2, Vector2 *k1, Ve
k21 += r1nxy;
k22 += r1xsq;
// add the influnce from r2
// add the influence from r2
real_t b_i_inv = b->get_inv_inertia();
real_t r2xsq = r2.x * r2.x * b_i_inv;
real_t r2ysq = r2.y * r2.y * b_i_inv;

View file

@ -57,7 +57,7 @@ public:
// You should return the pointer to the last struct you define as your result.
// If you are not adding any structs, just return `p_next_pointer`.
// See existing extensions for examples of this implementation.
virtual void *set_system_properties_and_get_next_pointer(void *p_next_pointer) { return p_next_pointer; } // Add additional data structures when we interogate OpenXRS system abilities.
virtual void *set_system_properties_and_get_next_pointer(void *p_next_pointer) { return p_next_pointer; } // Add additional data structures when we interrogate OpenXRS system abilities.
virtual void *set_instance_create_info_and_get_next_pointer(void *p_next_pointer) { return p_next_pointer; } // Add additional data structures when we create our OpenXR instance.
virtual void *set_session_create_and_get_next_pointer(void *p_next_pointer) { return p_next_pointer; } // Add additional data structures when we create our OpenXR session.
virtual void *set_swapchain_create_info_and_get_next_pointer(void *p_next_pointer) { return p_next_pointer; } // Add additional data structures when creating OpenXR swap chains.

View file

@ -5794,7 +5794,7 @@ bool TextServerAdvanced::_shaped_text_update_breaks(const RID &p_shaped) {
return sd->line_breaks_valid;
}
_FORCE_INLINE_ int64_t _generate_kashida_justification_opportunies(const String &p_data, int64_t p_start, int64_t p_end) {
_FORCE_INLINE_ int64_t _generate_kashida_justification_opportunities(const String &p_data, int64_t p_start, int64_t p_end) {
int64_t kashida_pos = -1;
int8_t priority = 100;
int64_t i = p_start;
@ -5899,14 +5899,14 @@ bool TextServerAdvanced::_shaped_text_update_justification_ops(const RID &p_shap
int limit = 0;
for (int i = 0; i < sd->text.length(); i++) {
if (is_whitespace(data[i])) {
int ks = _generate_kashida_justification_opportunies(sd->text, limit, i) + sd->start;
int ks = _generate_kashida_justification_opportunities(sd->text, limit, i) + sd->start;
if (ks != -1) {
sd->jstops[ks] = true;
}
limit = i + 1;
}
}
int ks = _generate_kashida_justification_opportunies(sd->text, limit, sd->text.length()) + sd->start;
int ks = _generate_kashida_justification_opportunities(sd->text, limit, sd->text.length()) + sd->start;
if (ks != -1) {
sd->jstops[ks] = true;
}
@ -5916,7 +5916,7 @@ bool TextServerAdvanced::_shaped_text_update_justification_ops(const RID &p_shap
if (ubrk_getRuleStatus(bi) != UBRK_WORD_NONE) {
int i = _convert_pos(sd, ubrk_current(bi));
sd->jstops[i + sd->start] = false;
int ks = _generate_kashida_justification_opportunies(sd->text, limit, i);
int ks = _generate_kashida_justification_opportunities(sd->text, limit, i);
if (ks != -1) {
sd->jstops[ks + sd->start] = true;
}

View file

@ -350,10 +350,10 @@ String OS_IOS::get_temp_path() const {
}
String OS_IOS::get_locale() const {
NSString *preferedLanguage = [NSLocale preferredLanguages].firstObject;
NSString *preferredLanguage = [NSLocale preferredLanguages].firstObject;
if (preferedLanguage) {
return String::utf8([preferedLanguage UTF8String]).replace("-", "_");
if (preferredLanguage) {
return String::utf8([preferredLanguage UTF8String]).replace("-", "_");
}
NSString *localeIdentifier = [[NSLocale currentLocale] localeIdentifier];

View file

@ -1296,18 +1296,18 @@ Error EditorExportPlatformMacOS::_copy_and_sign_files(Ref<DirAccess> &dir_access
#endif
print_verbose("export framework: " + p_src_path + " -> " + p_in_app_path);
bool plist_misssing = false;
bool plist_missing = false;
Ref<PList> plist;
plist.instantiate();
plist->load_file(p_src_path.path_join("Resources").path_join("Info.plist"));
Ref<PListNode> root_node = plist->get_root();
if (root_node.is_null()) {
plist_misssing = true;
plist_missing = true;
} else {
Dictionary root = root_node->get_value();
if (!root.has("CFBundleExecutable") || !root.has("CFBundleIdentifier") || !root.has("CFBundlePackageType") || !root.has("CFBundleInfoDictionaryVersion") || !root.has("CFBundleName") || !root.has("CFBundleSupportedPlatforms")) {
plist_misssing = true;
plist_missing = true;
}
}
@ -1315,7 +1315,7 @@ Error EditorExportPlatformMacOS::_copy_and_sign_files(Ref<DirAccess> &dir_access
if (err == OK) {
err = dir_access->copy_dir(p_src_path, p_in_app_path, -1, true);
}
if (err == OK && plist_misssing) {
if (err == OK && plist_missing) {
add_message(EXPORT_MESSAGE_WARNING, TTR("Export"), vformat(TTR("\"%s\": Info.plist missing or invalid, new Info.plist generated."), p_src_path.get_file()));
// Generate Info.plist
String lib_name = p_src_path.get_basename().get_file();

View file

@ -512,7 +512,7 @@ Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset
}
}
String file_verion = p_preset->get_version("application/file_version", true);
String file_version = p_preset->get_version("application/file_version", true);
String product_version = p_preset->get_version("application/product_version", true);
String company_name = p_preset->get("application/company_name");
String product_name = p_preset->get("application/product_name");
@ -527,9 +527,9 @@ Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset
args.push_back("--set-icon");
args.push_back(tmp_icon_path);
}
if (!file_verion.is_empty()) {
if (!file_version.is_empty()) {
args.push_back("--set-file-version");
args.push_back(file_verion);
args.push_back(file_version);
}
if (!product_version.is_empty()) {
args.push_back("--set-product-version");

View file

@ -165,10 +165,10 @@ void CPUParticles2D::_update_mesh_texture() {
};
Vector<Vector2> uvs;
AtlasTexture *atlas_texure = Object::cast_to<AtlasTexture>(*texture);
if (atlas_texure && atlas_texure->get_atlas().is_valid()) {
Rect2 region_rect = atlas_texure->get_region();
Size2 atlas_size = atlas_texure->get_atlas()->get_size();
AtlasTexture *atlas_texture = Object::cast_to<AtlasTexture>(*texture);
if (atlas_texture && atlas_texture->get_atlas().is_valid()) {
Rect2 region_rect = atlas_texture->get_region();
Size2 atlas_size = atlas_texture->get_atlas()->get_size();
uvs.push_back(Vector2(region_rect.position.x / atlas_size.x, region_rect.position.y / atlas_size.y));
uvs.push_back(Vector2((region_rect.position.x + region_rect.size.x) / atlas_size.x, region_rect.position.y / atlas_size.y));
uvs.push_back(Vector2((region_rect.position.x + region_rect.size.x) / atlas_size.x, (region_rect.position.y + region_rect.size.y) / atlas_size.y));

View file

@ -643,10 +643,10 @@ void GPUParticles2D::_notification(int p_what) {
};
Vector<Vector2> uvs;
AtlasTexture *atlas_texure = Object::cast_to<AtlasTexture>(*texture);
if (atlas_texure && atlas_texure->get_atlas().is_valid()) {
Rect2 region_rect = atlas_texure->get_region();
Size2 atlas_size = atlas_texure->get_atlas()->get_size();
AtlasTexture *atlas_texture = Object::cast_to<AtlasTexture>(*texture);
if (atlas_texture && atlas_texture->get_atlas().is_valid()) {
Rect2 region_rect = atlas_texture->get_region();
Size2 atlas_size = atlas_texture->get_atlas()->get_size();
uvs.push_back(Vector2(region_rect.position.x / atlas_size.x, region_rect.position.y / atlas_size.y));
uvs.push_back(Vector2((region_rect.position.x + region_rect.size.x) / atlas_size.x, region_rect.position.y / atlas_size.y));
uvs.push_back(Vector2((region_rect.position.x + region_rect.size.x) / atlas_size.x, (region_rect.position.y + region_rect.size.y) / atlas_size.y));

View file

@ -163,14 +163,14 @@ void NavigationRegion2D::_notification(int p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
#ifdef DEBUG_ENABLED
_set_debug_visibile(is_visible_in_tree());
_set_debug_visible(is_visible_in_tree());
#endif // DEBUG_ENABLED
} break;
case NOTIFICATION_EXIT_TREE: {
_region_exit_navigation_map();
#ifdef DEBUG_ENABLED
_set_debug_visibile(false);
_set_debug_visible(false);
#endif // DEBUG_ENABLED
} break;
@ -208,7 +208,7 @@ void NavigationRegion2D::set_navigation_polygon(const Ref<NavigationPolygon> &p_
#ifdef DEBUG_ENABLED
if (navigation_polygon.is_null()) {
_set_debug_visibile(false);
_set_debug_visible(false);
}
#endif // DEBUG_ENABLED
@ -445,7 +445,7 @@ void NavigationRegion2D::_region_update_transform() {
#ifdef DEBUG_ENABLED
void NavigationRegion2D::_update_debug_mesh() {
if (!is_inside_tree()) {
_set_debug_visibile(false);
_set_debug_visible(false);
return;
}
@ -640,7 +640,7 @@ void NavigationRegion2D::_update_debug_baking_rect() {
#endif // DEBUG_ENABLED
#ifdef DEBUG_ENABLED
void NavigationRegion2D::_set_debug_visibile(bool p_visible) {
void NavigationRegion2D::_set_debug_visible(bool p_visible) {
RenderingServer *rs = RenderingServer::get_singleton();
ERR_FAIL_NULL(rs);
if (debug_instance_rid.is_valid()) {

View file

@ -57,7 +57,7 @@ private:
bool debug_mesh_dirty = true;
void _set_debug_visibile(bool p_visible);
void _set_debug_visible(bool p_visible);
void _update_debug_mesh();
void _update_debug_edge_connections_mesh();
void _update_debug_baking_rect();

View file

@ -316,7 +316,7 @@ void AnimationNodeBlendSpace2D::_set_triangles(const Vector<int> &p_triangles) {
Vector<int> AnimationNodeBlendSpace2D::_get_triangles() const {
Vector<int> t;
if (auto_triangles && trianges_dirty) {
if (auto_triangles && triangles_dirty) {
return t;
}
@ -330,20 +330,20 @@ Vector<int> AnimationNodeBlendSpace2D::_get_triangles() const {
}
void AnimationNodeBlendSpace2D::_queue_auto_triangles() {
if (!auto_triangles || trianges_dirty) {
if (!auto_triangles || triangles_dirty) {
return;
}
trianges_dirty = true;
triangles_dirty = true;
callable_mp(this, &AnimationNodeBlendSpace2D::_update_triangles).call_deferred();
}
void AnimationNodeBlendSpace2D::_update_triangles() {
if (!auto_triangles || !trianges_dirty) {
if (!auto_triangles || !triangles_dirty) {
return;
}
trianges_dirty = false;
triangles_dirty = false;
triangles.clear();
if (blend_points_used < 3) {
emit_signal(SNAME("triangles_updated"));

View file

@ -79,7 +79,7 @@ protected:
void _blend_triangle(const Vector2 &p_pos, const Vector2 *p_points, float *r_weights);
bool auto_triangles = true;
bool trianges_dirty = false;
bool triangles_dirty = false;
void _update_triangles();
void _queue_auto_triangles();

View file

@ -330,8 +330,8 @@ double AnimationNodeAnimation::get_timeline_length() const {
return timeline_length;
}
void AnimationNodeAnimation::set_stretch_time_scale(bool p_strech_time_scale) {
stretch_time_scale = p_strech_time_scale;
void AnimationNodeAnimation::set_stretch_time_scale(bool p_stretch_time_scale) {
stretch_time_scale = p_stretch_time_scale;
notify_property_list_changed();
}

View file

@ -86,7 +86,7 @@ public:
void set_timeline_length(double p_length);
double get_timeline_length() const;
void set_stretch_time_scale(bool p_strech_time_scale);
void set_stretch_time_scale(bool p_stretch_time_scale);
bool is_stretching_time_scale() const;
void set_start_offset(double p_offset);

View file

@ -575,7 +575,7 @@ void AnimationMixer::_clear_caches() {
memdelete(K.value);
}
track_cache.clear();
animation_track_num_to_track_cashe.clear();
animation_track_num_to_track_cache.clear();
cache_valid = false;
capture_cache.clear();
@ -612,18 +612,18 @@ void AnimationMixer::_init_root_motion_cache() {
root_motion_scale_accumulator = Vector3(1, 1, 1);
}
void AnimationMixer::_create_track_num_to_track_cashe_for_animation(Ref<Animation> &p_animation) {
ERR_FAIL_COND(animation_track_num_to_track_cashe.has(p_animation));
LocalVector<TrackCache *> &track_num_to_track_cashe = animation_track_num_to_track_cashe.insert_new(p_animation, LocalVector<TrackCache *>())->value;
void AnimationMixer::_create_track_num_to_track_cache_for_animation(Ref<Animation> &p_animation) {
ERR_FAIL_COND(animation_track_num_to_track_cache.has(p_animation));
LocalVector<TrackCache *> &track_num_to_track_cache = animation_track_num_to_track_cache.insert_new(p_animation, LocalVector<TrackCache *>())->value;
const Vector<Animation::Track *> &tracks = p_animation->get_tracks();
track_num_to_track_cashe.resize(tracks.size());
track_num_to_track_cache.resize(tracks.size());
for (int i = 0; i < tracks.size(); i++) {
TrackCache **track_ptr = track_cache.getptr(tracks[i]->thash);
if (track_ptr == nullptr) {
track_num_to_track_cashe[i] = nullptr;
track_num_to_track_cache[i] = nullptr;
} else {
track_num_to_track_cashe[i] = *track_ptr;
track_num_to_track_cache[i] = *track_ptr;
}
}
}
@ -964,10 +964,10 @@ bool AnimationMixer::_update_caches() {
K.value->blend_idx = track_map[K.value->path];
}
animation_track_num_to_track_cashe.clear();
animation_track_num_to_track_cache.clear();
for (const StringName &E : sname_list) {
Ref<Animation> anim = get_animation(E);
_create_track_num_to_track_cashe_for_animation(anim);
_create_track_num_to_track_cache_for_animation(anim);
}
track_count = idx;
@ -1101,7 +1101,7 @@ void AnimationMixer::blend_capture(double p_delta) {
capture_cache.remain -= p_delta * capture_cache.step;
if (Animation::is_less_or_equal_approx(capture_cache.remain, 0)) {
if (capture_cache.animation.is_valid()) {
animation_track_num_to_track_cashe.erase(capture_cache.animation);
animation_track_num_to_track_cache.erase(capture_cache.animation);
}
capture_cache.clear();
return;
@ -1135,8 +1135,8 @@ void AnimationMixer::_blend_calc_total_weight() {
real_t weight = ai.playback_info.weight;
const real_t *track_weights_ptr = ai.playback_info.track_weights.ptr();
int track_weights_count = ai.playback_info.track_weights.size();
ERR_CONTINUE_EDMSG(!animation_track_num_to_track_cashe.has(a), "No animation in cache.");
LocalVector<TrackCache *> &track_num_to_track_cashe = animation_track_num_to_track_cashe[a];
ERR_CONTINUE_EDMSG(!animation_track_num_to_track_cache.has(a), "No animation in cache.");
LocalVector<TrackCache *> &track_num_to_track_cache = animation_track_num_to_track_cache[a];
thread_local HashSet<Animation::TypeHash, HashHasher> processed_hashes;
processed_hashes.clear();
const Vector<Animation::Track *> tracks = a->get_tracks();
@ -1148,7 +1148,7 @@ void AnimationMixer::_blend_calc_total_weight() {
continue;
}
Animation::TypeHash thash = animation_track->thash;
TrackCache *track = track_num_to_track_cashe[i];
TrackCache *track = track_num_to_track_cache[i];
if (track == nullptr || processed_hashes.has(thash)) {
// No path, but avoid error spamming.
// Or, there is the case different track type with same path; These can be distinguished by hash. So don't add the weight doubly.
@ -1185,8 +1185,8 @@ void AnimationMixer::_blend_process(double p_delta, bool p_update_only) {
#ifndef _3D_DISABLED
bool calc_root = !seeked || is_external_seeking;
#endif // _3D_DISABLED
ERR_CONTINUE_EDMSG(!animation_track_num_to_track_cashe.has(a), "No animation in cache.");
LocalVector<TrackCache *> &track_num_to_track_cashe = animation_track_num_to_track_cashe[a];
ERR_CONTINUE_EDMSG(!animation_track_num_to_track_cache.has(a), "No animation in cache.");
LocalVector<TrackCache *> &track_num_to_track_cache = animation_track_num_to_track_cache[a];
const Vector<Animation::Track *> tracks = a->get_tracks();
Animation::Track *const *tracks_ptr = tracks.ptr();
real_t a_length = a->get_length();
@ -1196,7 +1196,7 @@ void AnimationMixer::_blend_process(double p_delta, bool p_update_only) {
if (!animation_track->enabled) {
continue;
}
TrackCache *track = track_num_to_track_cashe[i];
TrackCache *track = track_num_to_track_cache[i];
if (track == nullptr) {
continue; // No path, but avoid error spamming.
}
@ -2300,7 +2300,7 @@ void AnimationMixer::capture(const StringName &p_name, double p_duration, Tween:
capture_cache.trans_type = p_trans_type;
capture_cache.ease_type = p_ease_type;
if (capture_cache.animation.is_valid()) {
animation_track_num_to_track_cashe.erase(capture_cache.animation);
animation_track_num_to_track_cache.erase(capture_cache.animation);
}
capture_cache.animation.instantiate();
@ -2326,7 +2326,7 @@ void AnimationMixer::capture(const StringName &p_name, double p_duration, Tween:
if (!is_valid) {
capture_cache.clear();
} else {
_create_track_num_to_track_cashe_for_animation(capture_cache.animation);
_create_track_num_to_track_cache_for_animation(capture_cache.animation);
}
}

View file

@ -311,7 +311,7 @@ protected:
RootMotionCache root_motion_cache;
AHashMap<Animation::TypeHash, TrackCache *, HashHasher> track_cache;
AHashMap<Ref<Animation>, LocalVector<TrackCache *>> animation_track_num_to_track_cashe;
AHashMap<Ref<Animation>, LocalVector<TrackCache *>> animation_track_num_to_track_cache;
HashSet<TrackCache *> playing_caches;
Vector<Node *> playing_audio_stream_players;
@ -321,7 +321,7 @@ protected:
void _clear_playing_caches();
void _init_root_motion_cache();
bool _update_caches();
void _create_track_num_to_track_cashe_for_animation(Ref<Animation> &p_animation);
void _create_track_num_to_track_cache_for_animation(Ref<Animation> &p_animation);
/* ---- Audio ---- */
AudioServer::PlaybackType playback_type;
@ -371,7 +371,7 @@ protected:
void _blend_init();
virtual bool _blend_pre_process(double p_delta, int p_track_count, const AHashMap<NodePath, int> &p_track_map);
virtual void _blend_capture(double p_delta);
void _blend_calc_total_weight(); // For undeterministic blending.
void _blend_calc_total_weight(); // For indeterministic blending.
void _blend_process(double p_delta, bool p_update_only = false);
void _blend_apply();
virtual void _blend_post_process();

View file

@ -498,7 +498,7 @@ bool AnimationNodeStateMachinePlayback::_travel(AnimationTree *p_tree, Animation
String AnimationNodeStateMachinePlayback::_validate_path(AnimationNodeStateMachine *p_state_machine, const String &p_path) {
if (p_state_machine->get_state_machine_type() == AnimationNodeStateMachine::STATE_MACHINE_TYPE_GROUPED) {
return p_path; // Grouped state machine doesn't allow validat-able request.
return p_path; // Grouped state machine doesn't allow validate-able request.
}
String target = p_path;
Ref<AnimationNodeStateMachine> anodesm = p_state_machine->find_node_by_path(target);
@ -799,7 +799,7 @@ AnimationNode::NodeTimeInfo AnimationNodeStateMachinePlayback::_process(const St
pi.is_external_seeking = false;
pi.weight = 0;
current_nti = p_state_machine->blend_node(p_state_machine->states[current].node, current, pi, AnimationNode::FILTER_IGNORE, true, true);
// Don't process first node if not necessary, insteads process next node.
// Don't process first node if not necessary, instead process next node.
_transition_to_next_recursive(tree, p_state_machine, p_delta, p_test_only);
}

View file

@ -458,7 +458,7 @@ float GraphEditArranger::_calculate_threshold(const StringName &p_v, const Strin
Vector2 pos_from = gnode_from->get_output_port_position(incoming->from_port) * graph_edit->get_zoom();
Vector2 pos_to = gnode_to->get_input_port_position(incoming->to_port) * graph_edit->get_zoom();
// If connected block node is selected, calculate thershold or add current block to list.
// If connected block node is selected, calculate threshold or add current block to list.
if (gnode_from->is_selected()) {
Vector2 connected_block_pos = r_node_positions[r_root[incoming->from_node]];
if (connected_block_pos.y != FLT_MAX) {
@ -489,7 +489,7 @@ float GraphEditArranger::_calculate_threshold(const StringName &p_v, const Strin
Vector2 pos_from = gnode_from->get_output_port_position(outgoing->from_port) * graph_edit->get_zoom();
Vector2 pos_to = gnode_to->get_input_port_position(outgoing->to_port) * graph_edit->get_zoom();
// If connected block node is selected, calculate thershold or add current block to list.
// If connected block node is selected, calculate threshold or add current block to list.
if (gnode_to->is_selected()) {
Vector2 connected_block_pos = r_node_positions[r_root[outgoing->to_node]];
if (connected_block_pos.y != FLT_MAX) {

View file

@ -817,7 +817,7 @@ void TextEdit::_notification(int p_what) {
int first_vis_line = get_first_visible_line() - 1;
int draw_amount = visible_rows + (smooth_scroll_enabled ? 1 : 0);
draw_amount += draw_placeholder ? placeholder_wraped_rows.size() - 1 : get_line_wrap_count(first_vis_line + 1);
draw_amount += draw_placeholder ? placeholder_wrapped_rows.size() - 1 : get_line_wrap_count(first_vis_line + 1);
// Draw minimap.
if (draw_minimap) {
@ -1046,8 +1046,8 @@ void TextEdit::_notification(int p_what) {
const Ref<TextParagraph> ldata = draw_placeholder ? placeholder_data_buf : text.get_line_data(line);
const Vector<String> wrap_rows = draw_placeholder ? placeholder_wraped_rows : get_line_wrapped_text(line);
int line_wrap_amount = draw_placeholder ? placeholder_wraped_rows.size() - 1 : get_line_wrap_count(line);
const Vector<String> wrap_rows = draw_placeholder ? placeholder_wrapped_rows : get_line_wrapped_text(line);
int line_wrap_amount = draw_placeholder ? placeholder_wrapped_rows.size() - 1 : get_line_wrap_count(line);
for (int line_wrap_index = 0; line_wrap_index <= line_wrap_amount; line_wrap_index++) {
if (line_wrap_index != 0) {
@ -2915,10 +2915,10 @@ void TextEdit::_update_placeholder() {
placeholder_max_width = placeholder_data_buf->get_size().x;
// Update wrapped rows.
placeholder_wraped_rows.clear();
placeholder_wrapped_rows.clear();
for (int i = 0; i <= wrap_amount; i++) {
Vector2i line_range = placeholder_data_buf->get_line_range(i);
placeholder_wraped_rows.push_back(placeholder_translated.substr(line_range.x, line_range.y - line_range.x));
placeholder_wrapped_rows.push_back(placeholder_translated.substr(line_range.x, line_range.y - line_range.x));
}
}
@ -7328,8 +7328,8 @@ void TextEdit::_paste_internal(int p_caret) {
}
// Paste text at each caret or one line per caret.
Vector<String> clipboad_lines = clipboard.split("\n");
bool insert_line_per_caret = p_caret == -1 && get_caret_count() > 1 && clipboad_lines.size() == get_caret_count();
Vector<String> clipboard_lines = clipboard.split("\n");
bool insert_line_per_caret = p_caret == -1 && get_caret_count() > 1 && clipboard_lines.size() == get_caret_count();
begin_complex_operation();
begin_multicaret_edit();
@ -7345,7 +7345,7 @@ void TextEdit::_paste_internal(int p_caret) {
}
if (insert_line_per_caret) {
clipboard = clipboad_lines[i];
clipboard = clipboard_lines[i];
}
insert_text_at_caret(clipboard, caret_index);
@ -7988,7 +7988,7 @@ void TextEdit::_update_scrollbars() {
bool draw_placeholder = _using_placeholder();
int visible_rows = get_visible_line_count();
int total_rows = draw_placeholder ? placeholder_wraped_rows.size() : get_total_visible_line_count();
int total_rows = draw_placeholder ? placeholder_wrapped_rows.size() : get_total_visible_line_count();
if (scroll_past_end_of_file_enabled && !fit_content_height) {
total_rows += visible_rows - 1;
}
@ -8074,14 +8074,14 @@ void TextEdit::_scroll_moved(double p_to_val) {
for (n_line = 0; n_line < text.size(); n_line++) {
if (!_is_line_hidden(n_line)) {
sc++;
sc += draw_placeholder ? placeholder_wraped_rows.size() - 1 : get_line_wrap_count(n_line);
sc += draw_placeholder ? placeholder_wrapped_rows.size() - 1 : get_line_wrap_count(n_line);
if (sc > v_scroll_i) {
break;
}
}
}
n_line = MIN(n_line, text.size() - 1);
int line_wrap_amount = draw_placeholder ? placeholder_wraped_rows.size() - 1 : get_line_wrap_count(n_line);
int line_wrap_amount = draw_placeholder ? placeholder_wrapped_rows.size() - 1 : get_line_wrap_count(n_line);
int wi = line_wrap_amount - (sc - v_scroll_i - 1);
wi = CLAMP(wi, 0, line_wrap_amount);

View file

@ -290,7 +290,7 @@ private:
int placeholder_line_height = -1;
int placeholder_max_width = -1;
Vector<String> placeholder_wraped_rows;
Vector<String> placeholder_wrapped_rows;
void _update_placeholder();
bool _using_placeholder() const;

View file

@ -3244,7 +3244,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, int
}
void Tree::_text_editor_popup_modal_close() {
if (popup_edit_commited) {
if (popup_edit_committed) {
return; // Already processed by LineEdit/TextEdit commit.
}
@ -3268,7 +3268,7 @@ void Tree::_text_editor_popup_modal_close() {
}
void Tree::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
if (popup_edit_commited) {
if (popup_edit_committed) {
return; // Already processed by _text_editor_popup_modal_close
}
@ -3279,7 +3279,7 @@ void Tree::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
if (p_event->is_action_pressed("ui_text_newline_blank", true)) {
accept_event();
} else if (p_event->is_action_pressed("ui_text_newline")) {
popup_edit_commited = true; // End edit popup processing.
popup_edit_committed = true; // End edit popup processing.
popup_editor->hide();
_apply_multiline_edit();
accept_event();
@ -3310,7 +3310,7 @@ void Tree::_apply_multiline_edit() {
}
void Tree::_line_editor_submit(String p_text) {
if (popup_edit_commited) {
if (popup_edit_committed) {
return; // Already processed by _text_editor_popup_modal_close
}
@ -3318,7 +3318,7 @@ void Tree::_line_editor_submit(String p_text) {
return; // ESC pressed, app focus lost, or forced close from code.
}
popup_edit_commited = true; // End edit popup processing.
popup_edit_committed = true; // End edit popup processing.
popup_editor->hide();
if (!popup_edited_item) {
@ -4283,7 +4283,7 @@ bool Tree::edit_selected(bool p_force_edit) {
if (!popup_editor->is_embedded()) {
popup_editor->set_content_scale_factor(popup_scale);
}
popup_edit_commited = false; // Start edit popup processing.
popup_edit_committed = false; // Start edit popup processing.
popup_editor->popup();
popup_editor->child_controls_changed();
@ -4303,7 +4303,7 @@ bool Tree::edit_selected(bool p_force_edit) {
if (!popup_editor->is_embedded()) {
popup_editor->set_content_scale_factor(popup_scale);
}
popup_edit_commited = false; // Start edit popup processing.
popup_edit_committed = false; // Start edit popup processing.
popup_editor->popup();
popup_editor->child_controls_changed();

View file

@ -498,7 +498,7 @@ private:
VBoxContainer *popup_editor_vb = nullptr;
bool popup_edit_commited = true;
bool popup_edit_committed = true;
Popup *popup_editor = nullptr;
LineEdit *line_editor = nullptr;
TextEdit *text_editor = nullptr;

View file

@ -1061,11 +1061,11 @@ void CylinderMesh::create_mesh_array(Array &p_arr, float top_radius, float botto
float height_v = height / vertical_length;
float padding_v = p_uv2_padding / vertical_length;
float horizonal_length = MAX(MAX(2.0 * (top_radius + bottom_radius + p_uv2_padding), top_circumference + p_uv2_padding), bottom_circumference + p_uv2_padding);
float center_h = 0.5 * (horizonal_length - p_uv2_padding) / horizonal_length;
float top_h = top_circumference / horizonal_length;
float bottom_h = bottom_circumference / horizonal_length;
float padding_h = p_uv2_padding / horizonal_length;
float horizontal_length = MAX(MAX(2.0 * (top_radius + bottom_radius + p_uv2_padding), top_circumference + p_uv2_padding), bottom_circumference + p_uv2_padding);
float center_h = 0.5 * (horizontal_length - p_uv2_padding) / horizontal_length;
float top_h = top_circumference / horizontal_length;
float bottom_h = bottom_circumference / horizontal_length;
float padding_h = p_uv2_padding / horizontal_length;
Vector<Vector3> points;
Vector<Vector3> normals;
@ -1132,9 +1132,9 @@ void CylinderMesh::create_mesh_array(Array &p_arr, float top_radius, float botto
}
// Adjust for bottom section, only used if we calculate UV2s.
top_h = top_radius / horizonal_length;
top_h = top_radius / horizontal_length;
float top_v = top_radius / vertical_length;
bottom_h = bottom_radius / horizonal_length;
bottom_h = bottom_radius / horizontal_length;
float bottom_v = bottom_radius / vertical_length;
// Add top.

View file

@ -377,8 +377,8 @@ private:
// bind helpers
private:
bool _float_track_optimize_key(const TKey<float> t0, const TKey<float> t1, const TKey<float> t2, real_t p_allowed_velocity_err, real_t p_allowed_precision_error);
bool _vector2_track_optimize_key(const TKey<Vector2> t0, const TKey<Vector2> t1, const TKey<Vector2> t2, real_t p_alowed_velocity_err, real_t p_allowed_angular_error, real_t p_allowed_precision_error);
bool _vector3_track_optimize_key(const TKey<Vector3> t0, const TKey<Vector3> t1, const TKey<Vector3> t2, real_t p_alowed_velocity_err, real_t p_allowed_angular_error, real_t p_allowed_precision_error);
bool _vector2_track_optimize_key(const TKey<Vector2> t0, const TKey<Vector2> t1, const TKey<Vector2> t2, real_t p_allowed_velocity_err, real_t p_allowed_angular_error, real_t p_allowed_precision_error);
bool _vector3_track_optimize_key(const TKey<Vector3> t0, const TKey<Vector3> t1, const TKey<Vector3> t2, real_t p_allowed_velocity_err, real_t p_allowed_angular_error, real_t p_allowed_precision_error);
bool _quaternion_track_optimize_key(const TKey<Quaternion> t0, const TKey<Quaternion> t1, const TKey<Quaternion> t2, real_t p_allowed_velocity_err, real_t p_allowed_angular_error, real_t p_allowed_precision_error);
void _position_track_optimize(int p_idx, real_t p_allowed_velocity_err, real_t p_allowed_angular_err, real_t p_allowed_precision_error);

View file

@ -3173,7 +3173,7 @@ void SystemFont::_update_base_font() {
base_font.unref();
}
face_indeces.clear();
face_indices.clear();
ftr_weight = 0;
ftr_stretch = 0;
ftr_italic = 0;
@ -3211,17 +3211,17 @@ void SystemFont::_update_base_font() {
score += 30;
}
if (score > best_score) {
face_indeces.clear();
face_indices.clear();
}
if (score >= best_score) {
best_score = score;
face_indeces.push_back(i);
face_indices.push_back(i);
}
}
if (face_indeces.is_empty()) {
face_indeces.push_back(0);
if (face_indices.is_empty()) {
face_indices.push_back(0);
}
file->set_face_index(0, face_indeces[0]);
file->set_face_index(0, face_indices[0]);
// If it's a variable font, apply weight, stretch and italic coordinates to match requested style.
if (best_score != 150) {
@ -3275,7 +3275,7 @@ void SystemFont::reset_state() {
}
names.clear();
face_indeces.clear();
face_indices.clear();
ftr_weight = 0;
ftr_stretch = 0;
ftr_italic = 0;
@ -3579,9 +3579,9 @@ RID SystemFont::find_variation(const Dictionary &p_variation_coordinates, int p_
var[TS->name_to_tag("italic")] = ftr_italic;
}
if (!face_indeces.is_empty()) {
int face_index = CLAMP(p_face_index, 0, face_indeces.size() - 1);
return f->find_variation(var, face_indeces[face_index], p_strength, p_transform, p_spacing_top, p_spacing_bottom, p_spacing_space, p_spacing_glyph, p_baseline_offset);
if (!face_indices.is_empty()) {
int face_index = CLAMP(p_face_index, 0, face_indices.size() - 1);
return f->find_variation(var, face_indices[face_index], p_strength, p_transform, p_spacing_top, p_spacing_bottom, p_spacing_space, p_spacing_glyph, p_baseline_offset);
} else {
return f->find_variation(var, 0, p_strength, p_transform, p_spacing_top, p_spacing_bottom, p_spacing_space, p_spacing_glyph, p_baseline_offset);
}
@ -3592,7 +3592,7 @@ RID SystemFont::find_variation(const Dictionary &p_variation_coordinates, int p_
RID SystemFont::_get_rid() const {
Ref<Font> f = _get_base_font_or_default();
if (f.is_valid()) {
if (!face_indeces.is_empty()) {
if (!face_indices.is_empty()) {
Dictionary var;
if (ftr_weight > 0) {
var[TS->name_to_tag("weight")] = ftr_weight;
@ -3603,7 +3603,7 @@ RID SystemFont::_get_rid() const {
if (ftr_italic > 0) {
var[TS->name_to_tag("italic")] = ftr_italic;
}
return f->find_variation(var, face_indeces[0]);
return f->find_variation(var, face_indices[0]);
} else {
return f->_get_rid();
}
@ -3612,7 +3612,7 @@ RID SystemFont::_get_rid() const {
}
int64_t SystemFont::get_face_count() const {
return face_indeces.size();
return face_indices.size();
}
SystemFont::SystemFont() {

View file

@ -471,7 +471,7 @@ class SystemFont : public Font {
mutable Ref<Font> theme_font;
Ref<FontFile> base_font;
Vector<int> face_indeces;
Vector<int> face_indices;
int ftr_weight = 0;
int ftr_stretch = 0;
int ftr_italic = 0;

View file

@ -145,8 +145,8 @@ void AudioEffectSpectrumAnalyzerInstance::process(const AudioFrame *p_src_frames
}
//determine time of capture
double remainer_sec = (temporal_fft_pos / mix_rate); //subtract remainder from mix time
last_fft_time = time - uint64_t(remainer_sec * 1000000.0);
double remainder_sec = (temporal_fft_pos / mix_rate); //subtract remainder from mix time
last_fft_time = time - uint64_t(remainder_sec * 1000000.0);
}
void AudioEffectSpectrumAnalyzerInstance::_bind_methods() {

View file

@ -618,7 +618,7 @@ Point2i DisplayServer::ime_get_selection() const {
}
String DisplayServer::ime_get_text() const {
ERR_FAIL_V_MSG(String(), "IME or NOTIFICATION_WM_IME_UPDATEnot supported by this display server.");
ERR_FAIL_V_MSG(String(), "IME or NOTIFICATION_WM_IME_UPDATE not supported by this display server.");
}
void DisplayServer::virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect, VirtualKeyboardType p_type, int p_max_length, int p_cursor_start, int p_cursor_end) {
@ -1268,8 +1268,8 @@ Input::CursorShape DisplayServer::_input_get_current_cursor_shape() {
return (Input::CursorShape)singleton->cursor_get_shape();
}
void DisplayServer::_input_set_custom_mouse_cursor_func(const Ref<Resource> &p_image, Input::CursorShape p_shape, const Vector2 &p_hostspot) {
singleton->cursor_set_custom_image(p_image, (CursorShape)p_shape, p_hostspot);
void DisplayServer::_input_set_custom_mouse_cursor_func(const Ref<Resource> &p_image, Input::CursorShape p_shape, const Vector2 &p_hotspot) {
singleton->cursor_set_custom_image(p_image, (CursorShape)p_shape, p_hotspot);
}
bool DisplayServer::can_create_rendering_device() {

View file

@ -100,7 +100,7 @@ private:
static Input::MouseMode _input_get_mouse_mode();
static void _input_warp(const Vector2 &p_to_pos);
static Input::CursorShape _input_get_current_cursor_shape();
static void _input_set_custom_mouse_cursor_func(const Ref<Resource> &, Input::CursorShape, const Vector2 &p_hostspot);
static void _input_set_custom_mouse_cursor_func(const Ref<Resource> &, Input::CursorShape, const Vector2 &p_hotspot);
protected:
static void _bind_methods();

View file

@ -209,12 +209,12 @@ public:
virtual void shadow_atlas_free(RID p_atlas) override {}
virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits = true) override {}
virtual void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) override {}
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) override { return false; }
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_instance, float p_coverage, uint64_t p_light_version) override { return false; }
virtual void shadow_atlas_update(RID p_atlas) override {}
virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = true) override {}
virtual int get_directional_light_shadow_size(RID p_light_intance) override { return 0; }
virtual int get_directional_light_shadow_size(RID p_light_instance) override { return 0; }
virtual void set_directional_shadow_count(int p_count) override {}
};

View file

@ -2159,8 +2159,8 @@ void GI::SDFGI::render_region(Ref<RenderSceneBuffersRD> p_render_buffers, int p_
}
//clear dispatch indirect data
uint32_t dispatch_indirct_data[4] = { 0, 0, 0, 0 };
RD::get_singleton()->buffer_update(cascades[cascade].solid_cell_dispatch_buffer_storage, 0, sizeof(uint32_t) * 4, dispatch_indirct_data);
uint32_t dispatch_indirect_data[4] = { 0, 0, 0, 0 };
RD::get_singleton()->buffer_update(cascades[cascade].solid_cell_dispatch_buffer_storage, 0, sizeof(uint32_t) * 4, dispatch_indirect_data);
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();

View file

@ -103,7 +103,7 @@ void RendererCanvasRenderRD::_update_transform_to_mat4(const Transform3D &p_tran
RendererCanvasRender::PolygonID RendererCanvasRenderRD::request_polygon(const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, const Vector<int> &p_bones, const Vector<float> &p_weights) {
// Care must be taken to generate array formats
// in ways where they could be reused, so we will
// put single-occuring elements first, and repeated
// put single-occurring elements first, and repeated
// elements later. This way the generated formats are
// the same no matter the length of the arrays.
// This dramatically reduces the amount of pipeline objects

View file

@ -260,14 +260,14 @@ void main() {
#ifdef MODE_COMPOSITE_BOKEH
frag_color.rgb = texture(source_color, uv).rgb;
float center_weigth = texture(source_weight, uv).r;
float center_weight = texture(source_weight, uv).r;
float sample_weight = texture(original_weight, uv).r;
float mix_amount;
if (sample_weight < center_weigth) {
mix_amount = min(1.0, max(0.0, max(abs(center_weigth), abs(sample_weight)) - DEPTH_GAP));
if (sample_weight < center_weight) {
mix_amount = min(1.0, max(0.0, max(abs(center_weight), abs(sample_weight)) - DEPTH_GAP));
} else {
mix_amount = min(1.0, max(0.0, abs(center_weigth) - DEPTH_GAP));
mix_amount = min(1.0, max(0.0, abs(center_weight) - DEPTH_GAP));
}
// let alpha blending take care of mixing

View file

@ -313,11 +313,11 @@ float sample_omni_pcf_shadow(texture2D shadow, float blur_scale, vec2 coord, vec
vec2 offset = offset_scale * (disk_rotation * scene_data_block.data.soft_shadow_kernel[i].xy);
vec2 sample_coord = coord + offset;
float sample_coord_length_sqaured = dot(sample_coord, sample_coord);
bool do_flip = sample_coord_length_sqaured > 1.0;
float sample_coord_length_squared = dot(sample_coord, sample_coord);
bool do_flip = sample_coord_length_squared > 1.0;
if (do_flip) {
float len = sqrt(sample_coord_length_sqaured);
float len = sqrt(sample_coord_length_squared);
sample_coord = sample_coord * (2.0 / len - 1.0);
}

View file

@ -2575,12 +2575,12 @@ Rect2i LightStorage::get_directional_shadow_rect() {
return _get_directional_shadow_rect(directional_shadow.size, directional_shadow.light_count, directional_shadow.current_light);
}
int LightStorage::get_directional_light_shadow_size(RID p_light_intance) {
int LightStorage::get_directional_light_shadow_size(RID p_light_instance) {
ERR_FAIL_COND_V(directional_shadow.light_count == 0, 0);
Rect2i r = _get_directional_shadow_rect(directional_shadow.size, directional_shadow.light_count, 0);
LightInstance *light_instance = light_instance_owner.get_or_null(p_light_intance);
LightInstance *light_instance = light_instance_owner.get_or_null(p_light_instance);
ERR_FAIL_NULL_V(light_instance, 0);
switch (light_directional_get_shadow_mode(light_instance->light)) {

View file

@ -1103,7 +1103,7 @@ public:
void _light_instance_setup_directional_shadow(int p_shadow_index, Instance *p_instance, const Transform3D p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect);
_FORCE_INLINE_ bool _light_instance_update_shadow(Instance *p_instance, const Transform3D p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect, RID p_shadow_atlas, Scenario *p_scenario, float p_scren_mesh_lod_threshold, uint32_t p_visible_layers = 0xFFFFFF);
_FORCE_INLINE_ bool _light_instance_update_shadow(Instance *p_instance, const Transform3D p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect, RID p_shadow_atlas, Scenario *p_scenario, float p_screen_mesh_lod_threshold, uint32_t p_visible_layers = 0xFFFFFF);
RID _render_get_environment(RID p_camera, RID p_scenario);
RID _render_get_compositor(RID p_camera, RID p_scenario);

View file

@ -174,7 +174,7 @@ void RendererSceneRender::CameraData::set_multiview_camera(uint32_t p_view_count
Vector3 local_min_vec = main_transform_inv.xform(min_vec);
Vector3 local_max_vec = main_transform_inv.xform(max_vec);
// 15. get x and y from these to obtain left, top, right bottom for the frustum. Get the distance from near plane to camera origin to obtain near, and the distance from the far plane to the camer origin to obtain far.
// 15. get x and y from these to obtain left, top, right bottom for the frustum. Get the distance from near plane to camera origin to obtain near, and the distance from the far plane to the camera origin to obtain far.
float z_near = -near_plane.distance_to(main_transform.origin);
float z_far = -far_plane.distance_to(main_transform.origin);

View file

@ -595,7 +595,7 @@ public:
RENDER_PRIMITIVE_TRIANGLES,
RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY,
RENDER_PRIMITIVE_TRIANGLE_STRIPS,
RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY,
RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY, // TODO: Fix typo in "ADJACENCY" (in 5.0).
RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX,
RENDER_PRIMITIVE_TESSELATION_PATCH,
RENDER_PRIMITIVE_MAX

View file

@ -193,12 +193,12 @@ public:
virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_use_16_bits = true) = 0;
virtual void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) = 0;
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) = 0;
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_instance, float p_coverage, uint64_t p_light_version) = 0;
virtual void shadow_atlas_update(RID p_atlas) = 0;
virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = true) = 0;
virtual int get_directional_light_shadow_size(RID p_light_intance) = 0;
virtual int get_directional_light_shadow_size(RID p_light_instance) = 0;
virtual void set_directional_shadow_count(int p_count) = 0;
};

View file

@ -3016,7 +3016,7 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("environment_set_bg_color", "env", "color"), &RenderingServer::environment_set_bg_color);
ClassDB::bind_method(D_METHOD("environment_set_bg_energy", "env", "multiplier", "exposure_value"), &RenderingServer::environment_set_bg_energy);
ClassDB::bind_method(D_METHOD("environment_set_canvas_max_layer", "env", "max_layer"), &RenderingServer::environment_set_canvas_max_layer);
ClassDB::bind_method(D_METHOD("environment_set_ambient_light", "env", "color", "ambient", "energy", "sky_contibution", "reflection_source"), &RenderingServer::environment_set_ambient_light, DEFVAL(RS::ENV_AMBIENT_SOURCE_BG), DEFVAL(1.0), DEFVAL(0.0), DEFVAL(RS::ENV_REFLECTION_SOURCE_BG));
ClassDB::bind_method(D_METHOD("environment_set_ambient_light", "env", "color", "ambient", "energy", "sky_contribution", "reflection_source"), &RenderingServer::environment_set_ambient_light, DEFVAL(RS::ENV_AMBIENT_SOURCE_BG), DEFVAL(1.0), DEFVAL(0.0), DEFVAL(RS::ENV_REFLECTION_SOURCE_BG));
ClassDB::bind_method(D_METHOD("environment_set_glow", "env", "enable", "levels", "intensity", "strength", "mix", "bloom_threshold", "blend_mode", "hdr_bleed_threshold", "hdr_bleed_scale", "hdr_luminance_cap", "glow_map_strength", "glow_map"), &RenderingServer::environment_set_glow);
ClassDB::bind_method(D_METHOD("environment_set_tonemap", "env", "tone_mapper", "exposure", "white"), &RenderingServer::environment_set_tonemap);
ClassDB::bind_method(D_METHOD("environment_set_adjustment", "env", "enable", "brightness", "contrast", "saturation", "use_1d_color_correction", "color_correction"), &RenderingServer::environment_set_adjustment);

View file

@ -1402,7 +1402,7 @@ public:
INSTANCE_VOXEL_GI,
INSTANCE_LIGHTMAP,
INSTANCE_OCCLUDER,
INSTANCE_VISIBLITY_NOTIFIER,
INSTANCE_VISIBLITY_NOTIFIER, // TODO: Fix typo in "VISIBILITY" (in 5.0).
INSTANCE_FOG_VOLUME,
INSTANCE_MAX,

View file

@ -535,7 +535,7 @@ public:
virtual int64_t shaped_text_prev_character_pos(const RID &p_shaped, int64_t p_pos) const;
virtual int64_t shaped_text_closest_character_pos(const RID &p_shaped, int64_t p_pos) const;
// The pen position is always placed on the baseline and moveing left to right.
// The pen position is always placed on the baseline and moving left to right.
virtual void shaped_text_draw(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l = -1.0, double p_clip_r = -1.0, const Color &p_color = Color(1, 1, 1)) const;
virtual void shaped_text_draw_outline(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l = -1.0, double p_clip_r = -1.0, int64_t p_outline_size = 1, const Color &p_color = Color(1, 1, 1)) const;

View file

@ -96,7 +96,7 @@ TEST_CASE("[Plane] Plane-point operations") {
CHECK_MESSAGE(
y_facing_plane.get_any_perpendicular_normal().is_equal_approx(Vector3(1, 0, 0)),
"get_any_perpindicular_normal() should return the expected result.");
"get_any_perpendicular_normal() should return the expected result.");
// TODO distance_to()
}

View file

@ -101,7 +101,7 @@ public:
String get_name() const override { return "mock"; }
// You can simulate DisplayServer-events by calling this function.
// The events will be deliverd to Godot's Input-system.
// The events will be delivered to Godot's Input-system.
// Mouse-events (Button & Motion) will additionally update the DisplayServer's mouse position.
// For Mouse motion events, the `relative`-property is set based on the distance to the previous mouse position.
void simulate_event(Ref<InputEvent> p_event) {

View file

@ -848,7 +848,7 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
SceneTree::get_singleton()->get_root()->add_child(code_edit);
code_edit->grab_focus();
const Point2 OUTSIDE_DELIMETER = Point2(-1, -1);
const Point2 OUTSIDE_DELIMITER = Point2(-1, -1);
code_edit->clear_string_delimiters();
code_edit->clear_comment_delimiters();
@ -1047,13 +1047,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in string. */
CHECK(code_edit->is_in_string(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in string. */
CHECK(code_edit->is_in_string(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column after start key is in string and start / end positions are correct. */
CHECK(code_edit->is_in_string(1, 1) != -1);
@ -1062,8 +1062,8 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line after is not in string. */
CHECK(code_edit->is_in_string(2, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMITER);
/* Check region metadata. */
int idx = code_edit->is_in_string(1, 1);
@ -1075,13 +1075,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in string. */
CHECK(code_edit->is_in_string(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before first start key is not in string. */
CHECK(code_edit->is_in_string(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column after the first start key is in string and start / end positions are correct. */
CHECK(code_edit->is_in_string(1, 1) != -1);
@ -1095,8 +1095,8 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line after is not in string. */
CHECK(code_edit->is_in_string(2, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMITER);
/* Check is in string with no column returns true if entire line is comment excluding whitespace. */
code_edit->set_text(" \n # # \n ");
@ -1138,13 +1138,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in comment. */
CHECK(code_edit->is_in_comment(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in comment. */
CHECK(code_edit->is_in_comment(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column after start key is in comment and start / end positions are correct. */
CHECK(code_edit->is_in_comment(1, 1) != -1);
@ -1153,8 +1153,8 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line after is not in comment. */
CHECK(code_edit->is_in_comment(2, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMITER);
/* Check region metadata. */
int idx = code_edit->is_in_comment(1, 1);
@ -1166,13 +1166,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in comment. */
CHECK(code_edit->is_in_comment(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before first start key is not in comment. */
CHECK(code_edit->is_in_comment(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column after the first start key is in comment and start / end positions are correct. */
CHECK(code_edit->is_in_comment(1, 1) != -1);
@ -1186,8 +1186,8 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line after is not in comment. */
CHECK(code_edit->is_in_comment(2, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMITER);
/* Check is in comment with no column returns true if entire line is comment excluding whitespace. */
code_edit->set_text(" \n # # \n ");
@ -1235,13 +1235,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in comment. */
CHECK(code_edit->is_in_comment(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before first start key is not in comment. */
CHECK(code_edit->is_in_comment(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column after the first start key is in comment and start / end positions are correct. */
CHECK(code_edit->is_in_comment(1, 1) != -1);
@ -1256,8 +1256,8 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line after is not in comment. */
CHECK(code_edit->is_in_comment(2, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMITER);
/* Remove the comment delimiter. */
code_edit->remove_comment_delimiter("#");
@ -1266,8 +1266,8 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* The "first" comment region is no longer valid. */
CHECK(code_edit->is_in_comment(1, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 1) == OUTSIDE_DELIMITER);
/* The "second" region as string is now valid. */
CHECK(code_edit->is_in_string(1, 5) != -1);
@ -1291,13 +1291,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in string. */
CHECK(code_edit->is_in_string(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in string. */
CHECK(code_edit->is_in_string(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column before closing delimiter is in string. */
CHECK(code_edit->is_in_string(1, 2) != -1);
@ -1306,13 +1306,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in string. */
CHECK(code_edit->is_in_string(1, 6) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 6) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 6) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 6) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 6) == OUTSIDE_DELIMITER);
/* Check line after is not in string. */
CHECK(code_edit->is_in_string(2, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMITER);
/* Check the region metadata. */
int idx = code_edit->is_in_string(1, 2);
@ -1324,13 +1324,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in string. */
CHECK(code_edit->is_in_string(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in string. */
CHECK(code_edit->is_in_string(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column just after start key is in string. */
CHECK(code_edit->is_in_string(1, 2) != -1);
@ -1349,26 +1349,26 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in string. */
CHECK(code_edit->is_in_string(3, 3) == -1);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMITER);
/* Check line after is not in string. */
CHECK(code_edit->is_in_string(4, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMITER);
/* Next test over a multiple non-blank lines. */
code_edit->set_text(" \n # \n \n # \n ");
/* Check line above is not in string. */
CHECK(code_edit->is_in_string(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in string. */
CHECK(code_edit->is_in_string(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column just after start key is in string. */
CHECK(code_edit->is_in_string(1, 2) != -1);
@ -1387,13 +1387,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in string. */
CHECK(code_edit->is_in_string(3, 3) == -1);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMITER);
/* Check line after is not in string. */
CHECK(code_edit->is_in_string(4, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMITER);
/* check the region metadata. */
idx = code_edit->is_in_string(1, 2);
@ -1409,13 +1409,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in string. */
CHECK(code_edit->is_in_string(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in string. */
CHECK(code_edit->is_in_string(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column just after start key is in string. */
CHECK(code_edit->is_in_string(1, 2) != -1);
@ -1434,13 +1434,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in string. */
CHECK(code_edit->is_in_string(3, 3) == -1);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMITER);
/* Check line after is not in string. */
CHECK(code_edit->is_in_string(4, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMITER);
/* check the region metadata. */
idx = code_edit->is_in_string(1, 2);
@ -1493,13 +1493,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in comment. */
CHECK(code_edit->is_in_comment(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in comment. */
CHECK(code_edit->is_in_comment(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column before closing delimiter is in comment. */
CHECK(code_edit->is_in_comment(1, 2) != -1);
@ -1508,13 +1508,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in comment. */
CHECK(code_edit->is_in_comment(1, 6) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 6) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 6) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 6) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 6) == OUTSIDE_DELIMITER);
/* Check line after is not in comment. */
CHECK(code_edit->is_in_comment(2, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMITER);
/* Check the region metadata. */
int idx = code_edit->is_in_comment(1, 2);
@ -1526,13 +1526,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in comment. */
CHECK(code_edit->is_in_comment(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in comment. */
CHECK(code_edit->is_in_comment(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column just after start key is in comment. */
CHECK(code_edit->is_in_comment(1, 2) != -1);
@ -1551,26 +1551,26 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in comment. */
CHECK(code_edit->is_in_comment(3, 3) == -1);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMITER);
/* Check line after is not in comment. */
CHECK(code_edit->is_in_comment(4, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMITER);
/* Next test over a multiple non-blank lines. */
code_edit->set_text(" \n # \n \n # \n ");
/* Check line above is not in comment. */
CHECK(code_edit->is_in_comment(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in comment. */
CHECK(code_edit->is_in_comment(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column just after start key is in comment. */
CHECK(code_edit->is_in_comment(1, 2) != -1);
@ -1589,13 +1589,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in comment. */
CHECK(code_edit->is_in_comment(3, 3) == -1);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMITER);
/* Check line after is not in comment. */
CHECK(code_edit->is_in_comment(4, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMITER);
/* check the region metadata. */
idx = code_edit->is_in_comment(1, 2);
@ -1611,13 +1611,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in comment. */
CHECK(code_edit->is_in_comment(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in comment. */
CHECK(code_edit->is_in_comment(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column just after start key is in comment. */
CHECK(code_edit->is_in_comment(1, 2) != -1);
@ -1636,13 +1636,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in comment. */
CHECK(code_edit->is_in_comment(3, 3) == -1);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMITER);
/* Check line after is not in comment. */
CHECK(code_edit->is_in_comment(4, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMITER);
/* check the region metadata. */
idx = code_edit->is_in_comment(1, 2);
@ -1700,13 +1700,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check line above is not in comment. */
CHECK(code_edit->is_in_comment(0, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMITER);
/* Check column before start key is not in comment. */
CHECK(code_edit->is_in_comment(1, 0) == -1);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMITER);
/* Check column just after start key is in comment. */
CHECK(code_edit->is_in_comment(1, 2) != -1);
@ -1725,13 +1725,13 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") {
/* Check column after end key is not in comment. */
CHECK(code_edit->is_in_comment(3, 3) == -1);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMITER);
/* Check line after is not in comment. */
CHECK(code_edit->is_in_comment(4, 1) == -1);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMITER);
CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMITER);
/* check the region metadata. */
int idx = code_edit->is_in_comment(1, 2);

View file

@ -51,7 +51,7 @@ struct GLTFKeyValue {
struct GLTFTestCase {
String filename;
String copywrite;
String copyright;
String generator;
String version;
Vector<GLTFArraySize> array_sizes;
@ -169,7 +169,7 @@ void test_gltf_document_values(Ref<GLTFDocument> &p_gltf_document, Ref<GLTFState
CHECK_MESSAGE(p_gltf_state->getvar(key_value.key) == key_value.val, "Expected \"", key_value.key, "\" to be \"", key_value.val, "\".");
}
CHECK(p_gltf_state->get_copyright() == p_test_case.copywrite);
CHECK(p_gltf_state->get_copyright() == p_test_case.copyright);
CHECK(((Dictionary)p_gltf_state->get_json()["asset"])["generator"] == p_test_case.generator);
CHECK(((Dictionary)p_gltf_state->get_json()["asset"])["version"] == p_test_case.version);
}

View file

@ -634,7 +634,7 @@ TEST_SUITE("[Navigation]") {
CHECK_EQ(source_geometry->get_indices().size(), 6);
}
SUBCASE("Parsed geometry should be extendible with other geometry") {
SUBCASE("Parsed geometry should be extendable with other geometry") {
source_geometry->merge(source_geometry); // Merging with itself.
const Vector<float> vertices = source_geometry->get_vertices();
const Vector<int> indices = source_geometry->get_indices();

View file

@ -174,20 +174,20 @@ int register_test_command(String p_command, TestFunc p_function);
MessageQueue::get_singleton()->flush(); \
}
#define _UPDATE_EVENT_MODIFERS(m_event, m_modifers) \
m_event->set_shift_pressed(((m_modifers) & KeyModifierMask::SHIFT) != Key::NONE); \
m_event->set_alt_pressed(((m_modifers) & KeyModifierMask::ALT) != Key::NONE); \
m_event->set_ctrl_pressed(((m_modifers) & KeyModifierMask::CTRL) != Key::NONE); \
m_event->set_meta_pressed(((m_modifers) & KeyModifierMask::META) != Key::NONE);
#define _UPDATE_EVENT_MODIFIERS(m_event, m_modifiers) \
m_event->set_shift_pressed(((m_modifiers) & KeyModifierMask::SHIFT) != Key::NONE); \
m_event->set_alt_pressed(((m_modifiers) & KeyModifierMask::ALT) != Key::NONE); \
m_event->set_ctrl_pressed(((m_modifiers) & KeyModifierMask::CTRL) != Key::NONE); \
m_event->set_meta_pressed(((m_modifiers) & KeyModifierMask::META) != Key::NONE);
#define _CREATE_GUI_MOUSE_EVENT(m_screen_pos, m_input, m_mask, m_modifers) \
Ref<InputEventMouseButton> event; \
event.instantiate(); \
event->set_position(m_screen_pos); \
event->set_button_index(m_input); \
event->set_button_mask(m_mask); \
event->set_factor(1); \
_UPDATE_EVENT_MODIFERS(event, m_modifers); \
#define _CREATE_GUI_MOUSE_EVENT(m_screen_pos, m_input, m_mask, m_modifiers) \
Ref<InputEventMouseButton> event; \
event.instantiate(); \
event->set_position(m_screen_pos); \
event->set_button_index(m_input); \
event->set_button_mask(m_mask); \
event->set_factor(1); \
_UPDATE_EVENT_MODIFIERS(event, m_modifiers); \
event->set_pressed(true);
#define _CREATE_GUI_TOUCH_EVENT(m_screen_pos, m_pressed, m_double) \
@ -197,42 +197,42 @@ int register_test_command(String p_command, TestFunc p_function);
event->set_pressed(m_pressed); \
event->set_double_tap(m_double);
#define SEND_GUI_MOUSE_BUTTON_EVENT(m_screen_pos, m_input, m_mask, m_modifers) \
{ \
_CREATE_GUI_MOUSE_EVENT(m_screen_pos, m_input, m_mask, m_modifers); \
_SEND_DISPLAYSERVER_EVENT(event); \
MessageQueue::get_singleton()->flush(); \
#define SEND_GUI_MOUSE_BUTTON_EVENT(m_screen_pos, m_input, m_mask, m_modifiers) \
{ \
_CREATE_GUI_MOUSE_EVENT(m_screen_pos, m_input, m_mask, m_modifiers); \
_SEND_DISPLAYSERVER_EVENT(event); \
MessageQueue::get_singleton()->flush(); \
}
#define SEND_GUI_MOUSE_BUTTON_RELEASED_EVENT(m_screen_pos, m_input, m_mask, m_modifers) \
{ \
_CREATE_GUI_MOUSE_EVENT(m_screen_pos, m_input, m_mask, m_modifers); \
event->set_pressed(false); \
_SEND_DISPLAYSERVER_EVENT(event); \
MessageQueue::get_singleton()->flush(); \
#define SEND_GUI_MOUSE_BUTTON_RELEASED_EVENT(m_screen_pos, m_input, m_mask, m_modifiers) \
{ \
_CREATE_GUI_MOUSE_EVENT(m_screen_pos, m_input, m_mask, m_modifiers); \
event->set_pressed(false); \
_SEND_DISPLAYSERVER_EVENT(event); \
MessageQueue::get_singleton()->flush(); \
}
#define SEND_GUI_DOUBLE_CLICK(m_screen_pos, m_modifers) \
{ \
_CREATE_GUI_MOUSE_EVENT(m_screen_pos, MouseButton::LEFT, 0, m_modifers); \
event->set_double_click(true); \
_SEND_DISPLAYSERVER_EVENT(event); \
MessageQueue::get_singleton()->flush(); \
#define SEND_GUI_DOUBLE_CLICK(m_screen_pos, m_modifiers) \
{ \
_CREATE_GUI_MOUSE_EVENT(m_screen_pos, MouseButton::LEFT, 0, m_modifiers); \
event->set_double_click(true); \
_SEND_DISPLAYSERVER_EVENT(event); \
MessageQueue::get_singleton()->flush(); \
}
// We toggle _print_error_enabled to prevent display server not supported warnings.
#define SEND_GUI_MOUSE_MOTION_EVENT(m_screen_pos, m_mask, m_modifers) \
{ \
bool errors_enabled = CoreGlobals::print_error_enabled; \
CoreGlobals::print_error_enabled = false; \
Ref<InputEventMouseMotion> event; \
event.instantiate(); \
event->set_position(m_screen_pos); \
event->set_button_mask(m_mask); \
_UPDATE_EVENT_MODIFERS(event, m_modifers); \
_SEND_DISPLAYSERVER_EVENT(event); \
MessageQueue::get_singleton()->flush(); \
CoreGlobals::print_error_enabled = errors_enabled; \
#define SEND_GUI_MOUSE_MOTION_EVENT(m_screen_pos, m_mask, m_modifiers) \
{ \
bool errors_enabled = CoreGlobals::print_error_enabled; \
CoreGlobals::print_error_enabled = false; \
Ref<InputEventMouseMotion> event; \
event.instantiate(); \
event->set_position(m_screen_pos); \
event->set_button_mask(m_mask); \
_UPDATE_EVENT_MODIFIERS(event, m_modifiers); \
_SEND_DISPLAYSERVER_EVENT(event); \
MessageQueue::get_singleton()->flush(); \
CoreGlobals::print_error_enabled = errors_enabled; \
}
#define SEND_GUI_TOUCH_EVENT(m_screen_pos, m_pressed, m_double) \