Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt` Whitelist consists of: ``` ang doubleclick lod nd que te unselect ```
This commit is contained in:
parent
6afaf83de3
commit
612ab4bbc6
|
@ -55,7 +55,7 @@
|
|||
#define _COMMA_11 ,
|
||||
#define _COMMA_12 ,
|
||||
|
||||
// 1-based comma separed list of ITEMs
|
||||
// 1-based comma separated list of ITEMs
|
||||
#define COMMA_SEP_LIST(ITEM, LENGTH) _COMMA_SEP_LIST_##LENGTH(ITEM)
|
||||
#define _COMMA_SEP_LIST_12(ITEM) \
|
||||
_COMMA_SEP_LIST_11(ITEM) \
|
||||
|
@ -95,7 +95,7 @@
|
|||
ITEM(1)
|
||||
#define _COMMA_SEP_LIST_0(ITEM)
|
||||
|
||||
// 1-based semicolon separed list of ITEMs
|
||||
// 1-based semicolon separated list of ITEMs
|
||||
#define SEMIC_SEP_LIST(ITEM, LENGTH) _SEMIC_SEP_LIST_##LENGTH(ITEM)
|
||||
#define _SEMIC_SEP_LIST_12(ITEM) \
|
||||
_SEMIC_SEP_LIST_11(ITEM); \
|
||||
|
@ -135,7 +135,7 @@
|
|||
ITEM(1)
|
||||
#define _SEMIC_SEP_LIST_0(ITEM)
|
||||
|
||||
// 1-based space separed list of ITEMs
|
||||
// 1-based space separated list of ITEMs
|
||||
#define SPACE_SEP_LIST(ITEM, LENGTH) _SPACE_SEP_LIST_##LENGTH(ITEM)
|
||||
#define _SPACE_SEP_LIST_12(ITEM) \
|
||||
_SPACE_SEP_LIST_11(ITEM) \
|
||||
|
|
|
@ -38,7 +38,7 @@ class PHashTranslation : public Translation {
|
|||
GDCLASS(PHashTranslation, Translation);
|
||||
|
||||
//this translation uses a sort of modified perfect hash algorithm
|
||||
//it requieres hashing strings twice and then does a binary search,
|
||||
//it requires hashing strings twice and then does a binary search,
|
||||
//so it's slower, but at the same time it has an extreemly high chance
|
||||
//of catching untranslated strings
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include "typedefs.h"
|
||||
/**
|
||||
* Error macros. Unlike exceptions and asserts, these macros try to mantain consistency and stability
|
||||
* Error macros. Unlike exceptions and asserts, these macros try to maintain consistency and stability
|
||||
* inside the code. It is recommended to always return processable data, so in case of an error, the
|
||||
* engine can stay working well.
|
||||
* In most cases, bugs and/or invalid data are not fatal and should never allow a perfectly running application
|
||||
|
|
|
@ -580,7 +580,7 @@ void register_global_constants() {
|
|||
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY);
|
||||
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
|
||||
|
||||
//comparation
|
||||
//comparison
|
||||
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_EQUAL", Variant::OP_EQUAL);
|
||||
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_NOT_EQUAL", Variant::OP_NOT_EQUAL);
|
||||
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_LESS", Variant::OP_LESS);
|
||||
|
|
|
@ -211,7 +211,7 @@ IP_Address::IP_Address(const String &p_string) {
|
|||
clear();
|
||||
|
||||
if (p_string == "*") {
|
||||
// Wildcard (not a vaild IP)
|
||||
// Wildcard (not a valid IP)
|
||||
wildcard = true;
|
||||
|
||||
} else if (p_string.find(":") >= 0) {
|
||||
|
|
|
@ -197,7 +197,7 @@ private:
|
|||
if (node->right != _data._nil) {
|
||||
|
||||
node = node->right;
|
||||
while (node->left != _data._nil) { /* returns the minium of the right subtree of node */
|
||||
while (node->left != _data._nil) { /* returns the minimum of the right subtree of node */
|
||||
node = node->left;
|
||||
}
|
||||
return node;
|
||||
|
@ -219,7 +219,7 @@ private:
|
|||
if (node->left != _data._nil) {
|
||||
|
||||
node = node->left;
|
||||
while (node->right != _data._nil) { /* returns the minium of the left subtree of node */
|
||||
while (node->right != _data._nil) { /* returns the minimum of the left subtree of node */
|
||||
node = node->right;
|
||||
}
|
||||
return node;
|
||||
|
|
|
@ -278,7 +278,7 @@ void MessageQueue::flush() {
|
|||
|
||||
while (read_pos < buffer_end) {
|
||||
|
||||
//lock on each interation, so a call can re-add itself to the message queue
|
||||
//lock on each iteration, so a call can re-add itself to the message queue
|
||||
|
||||
Message *message = (Message *)&buffer[read_pos];
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ bool PoolAllocator::find_hole(EntryArrayPos *p_pos, int p_for_size) {
|
|||
|
||||
int hole_size = entry.pos - prev_entry_end_pos;
|
||||
|
||||
/* detemine if what we want fits in that hole */
|
||||
/* determine if what we want fits in that hole */
|
||||
if (hole_size >= p_for_size) {
|
||||
*p_pos = i;
|
||||
return true;
|
||||
|
@ -100,7 +100,7 @@ bool PoolAllocator::find_hole(EntryArrayPos *p_pos, int p_for_size) {
|
|||
prev_entry_end_pos = entry_end(entry);
|
||||
}
|
||||
|
||||
/* No holes between entrys, check at the end..*/
|
||||
/* No holes between entries, check at the end..*/
|
||||
|
||||
if ((pool_size - prev_entry_end_pos) >= p_for_size) {
|
||||
*p_pos = entry_count;
|
||||
|
|
|
@ -1016,11 +1016,11 @@ void ScriptDebuggerRemote::add_profiling_frame_data(const StringName &p_name, co
|
|||
}
|
||||
|
||||
void ScriptDebuggerRemote::profiling_start() {
|
||||
//ignores this, uses it via connnection
|
||||
//ignores this, uses it via connection
|
||||
}
|
||||
|
||||
void ScriptDebuggerRemote::profiling_end() {
|
||||
//ignores this, uses it via connnection
|
||||
//ignores this, uses it via connection
|
||||
}
|
||||
|
||||
void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {
|
||||
|
|
|
@ -185,7 +185,7 @@ private:
|
|||
if (node->right != _data._nil) {
|
||||
|
||||
node = node->right;
|
||||
while (node->left != _data._nil) { /* returns the minium of the right subtree of node */
|
||||
while (node->left != _data._nil) { /* returns the minimum of the right subtree of node */
|
||||
node = node->left;
|
||||
}
|
||||
return node;
|
||||
|
@ -207,7 +207,7 @@ private:
|
|||
if (node->left != _data._nil) {
|
||||
|
||||
node = node->left;
|
||||
while (node->right != _data._nil) { /* returns the minium of the left subtree of node */
|
||||
while (node->right != _data._nil) { /* returns the minimum of the left subtree of node */
|
||||
node = node->right;
|
||||
}
|
||||
return node;
|
||||
|
|
|
@ -293,7 +293,7 @@ public:
|
|||
// If this changes the table in variant_op must be updated
|
||||
enum Operator {
|
||||
|
||||
//comparation
|
||||
//comparison
|
||||
OP_EQUAL,
|
||||
OP_NOT_EQUAL,
|
||||
OP_LESS,
|
||||
|
|
|
@ -147,7 +147,7 @@ Variant::operator bool() const {
|
|||
return booleanize();
|
||||
}
|
||||
|
||||
// We consider all unitialized or empty types to be false based on the type's
|
||||
// We consider all uninitialized or empty types to be false based on the type's
|
||||
// zeroiness.
|
||||
bool Variant::booleanize() const {
|
||||
return !is_zero();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Helper class to handle INI-style files.
|
||||
</brief_description>
|
||||
<description>
|
||||
This helper class can be used to store [Variant] values on the filesystem using INI-style formatting. The stored values are indentified by a section and a key:
|
||||
This helper class can be used to store [Variant] values on the filesystem using INI-style formatting. The stored values are identified by a section and a key:
|
||||
[codeblock]
|
||||
[section]
|
||||
some_key=42
|
||||
|
|
|
@ -380,7 +380,7 @@
|
|||
<members>
|
||||
<member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap">
|
||||
If [code]true[/code] the file's endianness is swapped. Use this if you're dealing with files written in big endian machines.
|
||||
Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file.
|
||||
Note that this is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -384,7 +384,7 @@
|
|||
HTTP status code [code]429 Too Many Requests[/code]. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later.
|
||||
</constant>
|
||||
<constant name="RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE" value="431" enum="ResponseCode">
|
||||
HTTP status code [code]431 Rquest Header Fields Too Large[/code]. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
|
||||
HTTP status code [code]431 Request Header Fields Too Large[/code]. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
|
||||
</constant>
|
||||
<constant name="RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS" value="451" enum="ResponseCode">
|
||||
HTTP status code [code]451 Response Unavailable For Legal Reasons[/code]. The server is denying access to the resource as a consequence of a legal demand.
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<argument index="1" name="position" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Overwites the position in point [code]i[/code] with the supplied [code]position[/code].
|
||||
Overwrites the position in point [code]i[/code] with the supplied [code]position[/code].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1.
|
||||
</member>
|
||||
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes">
|
||||
The number of collumns in the sprite sheet.
|
||||
The number of columns in the sprite sheet.
|
||||
</member>
|
||||
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
|
||||
The normal map gives depth to the Sprite.
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Get the enabled status of the size strech override set with [method set_size_override_stretch].
|
||||
Get the enabled status of the size stretch override set with [method set_size_override_stretch].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_attach_to_screen_rect">
|
||||
|
|
|
@ -1274,7 +1274,7 @@
|
|||
<return type="void">
|
||||
</return>
|
||||
<description>
|
||||
Syncronizes threads.
|
||||
Synchronizes threads.
|
||||
</description>
|
||||
</method>
|
||||
<method name="free_rid">
|
||||
|
|
|
@ -94,7 +94,7 @@ static Vector<Vector<Vector2> > _b2d_decompose(const Vector<Vector2> &p_polygon)
|
|||
float32 dot = dx0 * dx1 + dy0 * dy1;
|
||||
if (fabs(cross) < b2_angularSlop && dot > 0) {
|
||||
//Angle too close, split the triangle across from this point.
|
||||
//This is guaranteed to result in two triangles that satify
|
||||
//This is guaranteed to result in two triangles that satisfy
|
||||
//the tolerance (one of the angles is 90 degrees)
|
||||
float32 dx2 = curr.x[lower] - curr.x[upper];
|
||||
float32 dy2 = curr.y[lower] - curr.y[upper];
|
||||
|
|
|
@ -908,7 +908,7 @@ Ref<Image> RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSi
|
|||
return Ref<Image>(img);
|
||||
#else
|
||||
|
||||
ERR_EXPLAIN("Sorry, It's not posible to obtain images back in OpenGL ES");
|
||||
ERR_EXPLAIN("Sorry, It's not possible to obtain images back in OpenGL ES");
|
||||
return Ref<Image>();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ void DictionaryPropertyEdit::_notif_changev(const String &p_v) {
|
|||
|
||||
void DictionaryPropertyEdit::_set_key(const Variant &p_old_key, const Variant &p_new_key) {
|
||||
|
||||
// TODO: Set key of a dictionary is not allowd yet
|
||||
// TODO: Set key of a dictionary is not allowed yet
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2908,7 +2908,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
|
|||
|
||||
if (p_state.has("editor_index")) {
|
||||
int index = p_state["editor_index"];
|
||||
if (current < 2) { //if currently in spatial/2d, only switch to spatial/2d. if curently in script, stay there
|
||||
if (current < 2) { //if currently in spatial/2d, only switch to spatial/2d. if currently in script, stay there
|
||||
if (index < 2 || !get_edited_scene()) {
|
||||
_editor_select(index);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ void ResourceImporterCSVTranslation::get_recognized_extensions(List<String> *p_e
|
|||
}
|
||||
|
||||
String ResourceImporterCSVTranslation::get_save_extension() const {
|
||||
return ""; //does not save a single resoure
|
||||
return ""; //does not save a single resource
|
||||
}
|
||||
|
||||
String ResourceImporterCSVTranslation::get_resource_type() const {
|
||||
|
|
|
@ -597,7 +597,7 @@ void CanvasItemEditor::_save_canvas_item_state(List<CanvasItem *> p_canvas_items
|
|||
bone = Object::cast_to<Node2D>(bone->get_parent());
|
||||
}
|
||||
|
||||
//Save the bone state and lenght if we have an IK chain
|
||||
//Save the bone state and length if we have an IK chain
|
||||
if (ik_found) {
|
||||
bone = Object::cast_to<Node2D>(canvas_item);
|
||||
Transform2D bone_xform = bone->get_global_transform();
|
||||
|
@ -676,12 +676,12 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve
|
|||
Ref<InputEventMouseButton> b = p_event;
|
||||
Ref<InputEventMouseMotion> m = p_event;
|
||||
|
||||
// Start draging a guide
|
||||
// Start dragging a guide
|
||||
if (drag_type == DRAG_NONE) {
|
||||
if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
|
||||
if (show_guides && show_rulers && EditorNode::get_singleton()->get_edited_scene()) {
|
||||
Transform2D xform = viewport_scrollable->get_transform() * transform;
|
||||
// Retreive the guide lists
|
||||
// Retrieve the guide lists
|
||||
Array vguides;
|
||||
if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) {
|
||||
vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_");
|
||||
|
|
|
@ -140,7 +140,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R
|
|||
Vector<Vector2> poly = node->get_polygon();
|
||||
|
||||
//first check if a point is to be added (segment split)
|
||||
real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
|
||||
real_t grab_threshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
|
||||
|
||||
switch (mode) {
|
||||
|
||||
|
@ -159,7 +159,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R
|
|||
return true;
|
||||
} else {
|
||||
|
||||
if (wip.size() > 1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x, wip[0].y, depth))).distance_to(gpoint) < grab_treshold) {
|
||||
if (wip.size() > 1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x, wip[0].y, depth))).distance_to(gpoint) < grab_threshold) {
|
||||
//wip closed
|
||||
_wip_close();
|
||||
|
||||
|
@ -213,7 +213,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R
|
|||
continue; //not valid to reuse point
|
||||
|
||||
real_t d = cp.distance_to(gpoint);
|
||||
if (d < closest_dist && d < grab_treshold) {
|
||||
if (d < closest_dist && d < grab_threshold) {
|
||||
closest_dist = d;
|
||||
closest_pos = cp;
|
||||
closest_idx = i;
|
||||
|
@ -242,7 +242,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R
|
|||
Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth)));
|
||||
|
||||
real_t d = cp.distance_to(gpoint);
|
||||
if (d < closest_dist && d < grab_treshold) {
|
||||
if (d < closest_dist && d < grab_threshold) {
|
||||
closest_dist = d;
|
||||
closest_pos = cp;
|
||||
closest_idx = i;
|
||||
|
@ -288,7 +288,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R
|
|||
Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth)));
|
||||
|
||||
real_t d = cp.distance_to(gpoint);
|
||||
if (d < closest_dist && d < grab_treshold) {
|
||||
if (d < closest_dist && d < grab_threshold) {
|
||||
closest_dist = d;
|
||||
closest_pos = cp;
|
||||
closest_idx = i;
|
||||
|
|
|
@ -429,7 +429,7 @@ Point2 InputDefault::get_last_mouse_speed() const {
|
|||
|
||||
int InputDefault::get_mouse_button_mask() const {
|
||||
|
||||
return mouse_button_mask; // do not trust OS implementaiton, should remove it - OS::get_singleton()->get_mouse_button_state();
|
||||
return mouse_button_mask; // do not trust OS implementation, should remove it - OS::get_singleton()->get_mouse_button_state();
|
||||
}
|
||||
|
||||
void InputDefault::warp_mouse_position(const Vector2 &p_to) {
|
||||
|
|
|
@ -1432,7 +1432,7 @@ def use_windows_spawn_fix(self, platform=None):
|
|||
# that makes object files with same names to be overwritten so the last wins and
|
||||
# the library looses symbols defined by overwritten objects.
|
||||
# By enabling quick append instead of the default mode (replacing), libraries will
|
||||
# got built correctly regardless the invokation strategy.
|
||||
# got built correctly regardless the invocation strategy.
|
||||
# Furthermore, since SCons will rebuild the library from scratch when an object file
|
||||
# changes, no multiple versions of the same object file will be present.
|
||||
self.Replace(ARFLAGS='q')
|
||||
|
@ -1607,7 +1607,7 @@ def detect_visual_c_compiler_version(tools_env):
|
|||
# There is no flag to give to visual c compilers to set the architecture, ie scons bits argument (32,64,ARM etc)
|
||||
# There are many different cl.exe files that are run, and each one compiles & links to a different architecture
|
||||
# As far as I know, the only way to figure out what compiler will be run when Scons calls cl.exe via Program()
|
||||
# is to check the PATH variable and figure out which one will be called first. Code bellow does that and returns:
|
||||
# is to check the PATH variable and figure out which one will be called first. Code below does that and returns:
|
||||
# the following string values:
|
||||
|
||||
# "" Compiler not detected
|
||||
|
@ -1627,7 +1627,7 @@ def detect_visual_c_compiler_version(tools_env):
|
|||
if 'VCINSTALLDIR' in tools_env:
|
||||
# print("Checking VCINSTALLDIR")
|
||||
|
||||
# find() works with -1 so big ifs bellow are needed... the simplest solution, in fact
|
||||
# find() works with -1 so big ifs below are needed... the simplest solution, in fact
|
||||
# First test if amd64 and amd64_x86 compilers are present in the path
|
||||
vc_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64;")
|
||||
if(vc_amd64_compiler_detection_index > -1):
|
||||
|
|
|
@ -783,7 +783,7 @@ int BulletPhysicsServer::body_get_max_contacts_reported(RID p_body) const {
|
|||
return body->get_max_collisions_detection();
|
||||
}
|
||||
|
||||
void BulletPhysicsServer::body_set_contacts_reported_depth_threshold(RID p_body, float p_treshold) {
|
||||
void BulletPhysicsServer::body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold) {
|
||||
WARN_PRINT("Not supported by bullet and even Godot");
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ public:
|
|||
virtual void body_set_max_contacts_reported(RID p_body, int p_contacts);
|
||||
virtual int body_get_max_contacts_reported(RID p_body) const;
|
||||
|
||||
virtual void body_set_contacts_reported_depth_threshold(RID p_body, float p_treshold);
|
||||
virtual void body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold);
|
||||
virtual float body_get_contacts_reported_depth_threshold(RID p_body) const;
|
||||
|
||||
virtual void body_set_omit_force_integration(RID p_body, bool p_omit);
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
|
||||
public:
|
||||
/// Use this function to move kinematic body
|
||||
/// -- or set initial transfom before body creation.
|
||||
/// -- or set initial transform before body creation.
|
||||
void moveBody(const btTransform &newWorldTransform) {
|
||||
bodyKinematicWorldTransf = newWorldTransform;
|
||||
}
|
||||
|
|
|
@ -628,7 +628,7 @@ void SpaceBullet::destroy_world() {
|
|||
|
||||
void SpaceBullet::check_ghost_overlaps() {
|
||||
|
||||
/// Algorith support variables
|
||||
/// Algorithm support variables
|
||||
btConvexShape *other_body_shape;
|
||||
btConvexShape *area_shape;
|
||||
btGjkPairDetector::ClosestPointInput gjk_input;
|
||||
|
|
|
@ -64,7 +64,7 @@ typedef struct {
|
|||
//this is used by script languages that keep a reference counter of their own
|
||||
//you can make make Ref<> not die when it reaches zero, so deleting the reference
|
||||
//depends entirely from the script.
|
||||
// Note: You can set thoses function pointer to NULL if not needed.
|
||||
// Note: You can set those function pointer to NULL if not needed.
|
||||
void (*refcount_incremented)(godot_pluginscript_instance_data *p_data);
|
||||
bool (*refcount_decremented)(godot_pluginscript_instance_data *p_data); // return true if it can die
|
||||
} godot_pluginscript_instance_desc;
|
||||
|
|
|
@ -181,7 +181,7 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
|
|||
//wait, identifier could be a local variable or something else... careful here, must reference properly
|
||||
//as stack may be more interesting to work with
|
||||
|
||||
//This could be made much simpler by just indexing "self", but done this way (with custom self-addressing modes) increases peformance a lot.
|
||||
//This could be made much simpler by just indexing "self", but done this way (with custom self-addressing modes) increases performance a lot.
|
||||
|
||||
const GDScriptParser::IdentifierNode *in = static_cast<const GDScriptParser::IdentifierNode *>(p_expression);
|
||||
|
||||
|
|
|
@ -4098,7 +4098,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
|
|||
ConstantNode *cn = static_cast<ConstantNode *>(subexpr);
|
||||
if (cn->value.get_type() == Variant::NIL) {
|
||||
|
||||
_set_error("Can't accept a null constant expression for infering export type.");
|
||||
_set_error("Can't accept a null constant expression for inferring export type.");
|
||||
return;
|
||||
}
|
||||
member._export.type = cn->value.get_type();
|
||||
|
@ -4234,7 +4234,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
|
|||
|
||||
} break;
|
||||
case GDScriptTokenizer::TK_PR_ENUM: {
|
||||
//mutiple constant declarations..
|
||||
//multiple constant declarations..
|
||||
|
||||
int last_assign = -1; // Incremented by 1 right before the assingment.
|
||||
String enum_name;
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
Class for searching text for patterns using regular expressions.
|
||||
</brief_description>
|
||||
<description>
|
||||
Regular Expression (or regex) is a compact programming language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of [code]ab[0-9][/code] would find any string that is [code]ab[/code] followed by any number from [code]0[/code] to [code]9[/code]. For a more in-depth look, you can easily find various tutorials and detailed explainations on the Internet.
|
||||
Regular Expression (or regex) is a compact programming language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of [code]ab[0-9][/code] would find any string that is [code]ab[/code] followed by any number from [code]0[/code] to [code]9[/code]. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet.
|
||||
To begin, the RegEx object needs to be compiled with the search pattern using [method compile] before it can be used.
|
||||
[codeblock]
|
||||
var regex = RegEx.new()
|
||||
regex.compile("\\w-(\\d+)")
|
||||
[/codeblock]
|
||||
The search pattern must be escaped first for gdscript before it is escaped for the expression. For example, [code]compile("\\d+")[/code] would be read by RegEx as [code]\d+[/code]. Similarly, [code]compile("\"(?:\\\\.|[^\"])*\"")[/code] would be read as [code]"(?:\\.|[^"])*"[/code]
|
||||
Using [method search] you can find the pattern within the given text. If a pattern is found, [RegExMatch] is returned and you can retrieve details of the results using fuctions such as [method RegExMatch.get_string] and [method RegExMatch.get_start].
|
||||
Using [method search] you can find the pattern within the given text. If a pattern is found, [RegExMatch] is returned and you can retrieve details of the results using functions such as [method RegExMatch.get_string] and [method RegExMatch.get_start].
|
||||
[codeblock]
|
||||
var regex = RegEx.new()
|
||||
regex.compile("\\w-(\\d+)")
|
||||
|
|
|
@ -2182,7 +2182,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
|
|||
Ref<VisualScriptNode> node = F->get().node;
|
||||
VisualScriptNodeInstance *instance = instances[F->key()];
|
||||
|
||||
// conect to default values
|
||||
// connect to default values
|
||||
for (int i = 0; i < instance->input_port_count; i++) {
|
||||
if (instance->input_ports[i] == -1) {
|
||||
|
||||
|
@ -2192,7 +2192,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
|
|||
}
|
||||
}
|
||||
|
||||
// conect to trash
|
||||
// connect to trash
|
||||
for (int i = 0; i < instance->output_port_count; i++) {
|
||||
if (instance->output_ports[i] == -1) {
|
||||
instance->output_ports[i] = function.trash_pos; //trash is same for all
|
||||
|
|
|
@ -425,7 +425,7 @@ PropertyInfo VisualScriptOperator::get_input_value_port_info(int p_idx) const {
|
|||
}
|
||||
PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const {
|
||||
static const Variant::Type port_types[Variant::OP_MAX] = {
|
||||
//comparation
|
||||
//comparison
|
||||
Variant::BOOL, //OP_EQUAL,
|
||||
Variant::BOOL, //OP_NOT_EQUAL,
|
||||
Variant::BOOL, //OP_LESS,
|
||||
|
@ -466,7 +466,7 @@ PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const {
|
|||
}
|
||||
|
||||
static const char *op_names[] = {
|
||||
//comparation
|
||||
//comparison
|
||||
"Equal", //OP_EQUAL,
|
||||
"NotEqual", //OP_NOT_EQUAL,
|
||||
"Less", //OP_LESS,
|
||||
|
@ -506,7 +506,7 @@ String VisualScriptOperator::get_caption() const {
|
|||
String VisualScriptOperator::get_text() const {
|
||||
|
||||
static const wchar_t *op_names[] = {
|
||||
//comparation
|
||||
//comparison
|
||||
L"A = B", //OP_EQUAL,
|
||||
L"A \u2260 B", //OP_NOT_EQUAL,
|
||||
L"A < B", //OP_LESS,
|
||||
|
|
|
@ -108,7 +108,7 @@ static bool _lws_poll(struct lws_context *context, _LWSRef *ref) {
|
|||
static void _lws_make_protocols(void *p_obj, lws_callback_function *p_callback, PoolVector<String> p_names, _LWSRef **r_lws_ref) {
|
||||
/* the input strings might go away after this call,
|
||||
* we need to copy them. Will clear them when
|
||||
* detroying the context */
|
||||
* destroying the context */
|
||||
int i;
|
||||
int len = p_names.size();
|
||||
size_t data_size = sizeof(struct LWSPeer::PeerData);
|
||||
|
|
|
@ -257,7 +257,7 @@ class EditorExportAndroid : public EditorExportPlatform {
|
|||
if (dpos == -1)
|
||||
continue;
|
||||
d = d.substr(0, dpos).strip_edges();
|
||||
//print_line("found devuce: "+d);
|
||||
//print_line("found device: "+d);
|
||||
ldevices.push_back(d);
|
||||
}
|
||||
|
||||
|
@ -996,7 +996,7 @@ public:
|
|||
public:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
|
||||
|
||||
// Reenable when a GLES 2.0 backend is readded
|
||||
// Re-enable when a GLES 2.0 backend is read
|
||||
/*int api = p_preset->get("graphics/api");
|
||||
if (api == 0)
|
||||
r_features->push_back("etc");
|
||||
|
|
|
@ -1092,7 +1092,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
|
|||
|
||||
unsigned int attributeCount = 0;
|
||||
|
||||
// OS X needs non-zero color size, so set resonable values
|
||||
// OS X needs non-zero color size, so set reasonable values
|
||||
int colorBits = 32;
|
||||
|
||||
// Fail if a robustness strategy was requested
|
||||
|
@ -1138,7 +1138,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
|
|||
*/
|
||||
|
||||
// NOTE: All NSOpenGLPixelFormats on the relevant cards support sRGB
|
||||
// frambuffer, so there's no need (and no way) to request it
|
||||
// framebuffer, so there's no need (and no way) to request it
|
||||
|
||||
ADD_ATTR(0);
|
||||
|
||||
|
|
|
@ -1082,7 +1082,7 @@ public:
|
|||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "zip"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "zip"), ""));
|
||||
|
||||
// Capabilites
|
||||
// Capabilities
|
||||
const char **basic = uwp_capabilities;
|
||||
while (*basic) {
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*basic).camelcase_to_underscore(false)), false));
|
||||
|
|
|
@ -148,11 +148,11 @@ def configure(env):
|
|||
## Compiler configuration
|
||||
|
||||
env['ENV'] = os.environ
|
||||
# This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far bellow in the code
|
||||
# This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far below in the code
|
||||
compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV'])
|
||||
|
||||
print("Detected MSVC compiler: " + compiler_version_str)
|
||||
# If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writting)... vc compiler for 64bit can not compile _asm
|
||||
# If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writing)... vc compiler for 64bit can not compile _asm
|
||||
if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"):
|
||||
env["bits"] = "64"
|
||||
env["x86_libtheora_opt_vc"] = False
|
||||
|
|
|
@ -751,7 +751,7 @@ void OS_X11::set_wm_fullscreen(bool p_enabled) {
|
|||
XFree(xsh);
|
||||
}
|
||||
|
||||
// Using EWMH -- Extened Window Manager Hints
|
||||
// Using EWMH -- Extended Window Manager Hints
|
||||
XEvent xev;
|
||||
Atom wm_state = XInternAtom(x11_display, "_NET_WM_STATE", False);
|
||||
Atom wm_fullscreen = XInternAtom(x11_display, "_NET_WM_STATE_FULLSCREEN", False);
|
||||
|
|
|
@ -226,14 +226,14 @@ void AudioStreamPlayer2D::_notification(int p_what) {
|
|||
setseek = setplay;
|
||||
active = true;
|
||||
setplay = -1;
|
||||
//do not update, this makes it easier to animate (will shut off otherise)
|
||||
//do not update, this makes it easier to animate (will shut off otherwise)
|
||||
//_change_notify("playing"); //update property in editor
|
||||
}
|
||||
|
||||
//stop playing if no longer active
|
||||
if (!active) {
|
||||
set_physics_process_internal(false);
|
||||
//do not update, this makes it easier to animate (will shut off otherise)
|
||||
//do not update, this makes it easier to animate (will shut off otherwise)
|
||||
//_change_notify("playing"); //update property in editor
|
||||
emit_signal("finished");
|
||||
}
|
||||
|
|
|
@ -536,14 +536,14 @@ void AudioStreamPlayer3D::_notification(int p_what) {
|
|||
setseek = setplay;
|
||||
active = true;
|
||||
setplay = -1;
|
||||
//do not update, this makes it easier to animate (will shut off otherise)
|
||||
//do not update, this makes it easier to animate (will shut off otherwise)
|
||||
///_change_notify("playing"); //update property in editor
|
||||
}
|
||||
|
||||
//stop playing if no longer active
|
||||
if (!active) {
|
||||
set_physics_process_internal(false);
|
||||
//do not update, this makes it easier to animate (will shut off otherise)
|
||||
//do not update, this makes it easier to animate (will shut off otherwise)
|
||||
//_change_notify("playing"); //update property in editor
|
||||
emit_signal("finished");
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ class AcceptDialog : public WindowDialog {
|
|||
HBoxContainer *hbc;
|
||||
Label *label;
|
||||
Button *ok;
|
||||
//Button *cancel; no more cancel (there is X on tht titlebar)
|
||||
//Button *cancel; no more cancel (there is X on that titlebar)
|
||||
bool hide_on_ok;
|
||||
|
||||
void _custom_action(const String &p_action);
|
||||
|
|
|
@ -628,7 +628,7 @@ void TextEdit::_notification(int p_what) {
|
|||
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2i(), get_size()), cache.background_color);
|
||||
}
|
||||
//compute actual region to start (may be inside say, a comment).
|
||||
//slow in very large documments :( but ok for source!
|
||||
//slow in very large documents :( but ok for source!
|
||||
|
||||
for (int i = 0; i < cursor.line_ofs; i++) {
|
||||
|
||||
|
@ -4470,7 +4470,7 @@ bool TextEdit::search(const String &p_key, uint32_t p_search_flags, int p_from_l
|
|||
ERR_FAIL_INDEX_V(p_from_line, text.size(), false);
|
||||
ERR_FAIL_INDEX_V(p_from_column, text[p_from_line].length() + 1, false);
|
||||
|
||||
//search through the whole documment, but start by current line
|
||||
//search through the whole document, but start by current line
|
||||
|
||||
int line = p_from_line;
|
||||
int pos = -1;
|
||||
|
|
|
@ -158,7 +158,7 @@ void TextureProgress::draw_nine_patch_stretched(const Ref<Texture> &p_texture, F
|
|||
if (p_ratio < 1.0) {
|
||||
// Drawing a partially-filled 9-patch is a little tricky -
|
||||
// texture is divided by 3 sections toward fill direction,
|
||||
// then middle section is streching while the other two aren't.
|
||||
// then middle section is stretching while the other two aren't.
|
||||
|
||||
double width_total = 0.0;
|
||||
double width_texture = 0.0;
|
||||
|
|
|
@ -2010,7 +2010,7 @@ void Node::set_editable_instance(Node *p_node, bool p_editable) {
|
|||
if (!p_editable) {
|
||||
data.editable_instances.erase(p);
|
||||
// Avoid this flag being needlessly saved;
|
||||
// also give more visual feedback if editable children is reenabled
|
||||
// also give more visual feedback if editable children is re-enabled
|
||||
set_display_folded(false);
|
||||
} else {
|
||||
data.editable_instances[p] = true;
|
||||
|
|
|
@ -104,7 +104,7 @@ private:
|
|||
StringName name;
|
||||
SceneTree *tree;
|
||||
bool inside_tree;
|
||||
bool ready_notified; //this is a small hack, so if a node is added during _ready() to the tree, it corretly gets the _ready() notification
|
||||
bool ready_notified; //this is a small hack, so if a node is added during _ready() to the tree, it correctly gets the _ready() notification
|
||||
bool ready_first;
|
||||
#ifdef TOOLS_ENABLED
|
||||
NodePath import_path; //path used when imported, used by scene editors to keep tracking
|
||||
|
|
|
@ -1778,7 +1778,7 @@ void SceneTree::_rpc(Node *p_from, int p_to, bool p_unreliable, bool p_set, cons
|
|||
psc->id = last_send_cache_id++;
|
||||
}
|
||||
|
||||
//create base packet, lots of harcode because it must be tight
|
||||
//create base packet, lots of hardcode because it must be tight
|
||||
|
||||
int ofs = 0;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ void BitMap::create(const Size2 &p_size) {
|
|||
zeromem(bitmask.ptrw(), bitmask.size());
|
||||
}
|
||||
|
||||
void BitMap::create_from_image_alpha(const Ref<Image> &p_image, float p_treshold) {
|
||||
void BitMap::create_from_image_alpha(const Ref<Image> &p_image, float p_threshold) {
|
||||
|
||||
ERR_FAIL_COND(p_image.is_null() || p_image->empty());
|
||||
Ref<Image> img = p_image->duplicate();
|
||||
|
@ -58,7 +58,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image, float p_treshold
|
|||
|
||||
int bbyte = i / 8;
|
||||
int bbit = i % 8;
|
||||
if (r[i * 2 + 1] / 255.0 > p_treshold) {
|
||||
if (r[i * 2 + 1] / 255.0 > p_threshold) {
|
||||
w[bbyte] |= (1 << bbit);
|
||||
}
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ void BitMap::grow_mask(int p_pixels, const Rect2 &p_rect) {
|
|||
void BitMap::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("create", "size"), &BitMap::create);
|
||||
ClassDB::bind_method(D_METHOD("create_from_image_alpha", "image", "treshold"), &BitMap::create_from_image_alpha, DEFVAL(0.1));
|
||||
ClassDB::bind_method(D_METHOD("create_from_image_alpha", "image", "threshold"), &BitMap::create_from_image_alpha, DEFVAL(0.1));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_bit", "position", "bit"), &BitMap::set_bit);
|
||||
ClassDB::bind_method(D_METHOD("get_bit", "position"), &BitMap::get_bit);
|
||||
|
|
|
@ -54,7 +54,7 @@ protected:
|
|||
|
||||
public:
|
||||
void create(const Size2 &p_size);
|
||||
void create_from_image_alpha(const Ref<Image> &p_image, float p_treshold = 0.1);
|
||||
void create_from_image_alpha(const Ref<Image> &p_image, float p_threshold = 0.1);
|
||||
|
||||
void set_bit(const Point2 &p_pos, bool p_value);
|
||||
bool get_bit(const Point2 &p_pos) const;
|
||||
|
|
|
@ -1482,9 +1482,9 @@ bool SpatialMaterial::is_grow_enabled() const {
|
|||
return grow_enabled;
|
||||
}
|
||||
|
||||
void SpatialMaterial::set_alpha_scissor_threshold(float p_treshold) {
|
||||
alpha_scissor_threshold = p_treshold;
|
||||
VS::get_singleton()->material_set_param(_get_material(), shader_names->alpha_scissor_threshold, p_treshold);
|
||||
void SpatialMaterial::set_alpha_scissor_threshold(float p_threshold) {
|
||||
alpha_scissor_threshold = p_threshold;
|
||||
VS::get_singleton()->material_set_param(_get_material(), shader_names->alpha_scissor_threshold, p_threshold);
|
||||
}
|
||||
|
||||
float SpatialMaterial::get_alpha_scissor_threshold() const {
|
||||
|
|
|
@ -566,7 +566,7 @@ public:
|
|||
void set_grow(float p_grow);
|
||||
float get_grow() const;
|
||||
|
||||
void set_alpha_scissor_threshold(float p_treshold);
|
||||
void set_alpha_scissor_threshold(float p_threshold);
|
||||
float get_alpha_scissor_threshold() const;
|
||||
|
||||
void set_on_top_of_alpha();
|
||||
|
|
|
@ -189,7 +189,7 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
Similar to quadmesh but with tesselation support
|
||||
Similar to quadmesh but with tessellation support
|
||||
*/
|
||||
class PlaneMesh : public PrimitiveMesh {
|
||||
|
||||
|
|
|
@ -650,14 +650,14 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
|
|||
style_rect = style_rect.grow(-((aa_size + 1) / 2));
|
||||
}
|
||||
|
||||
//adapt borders (prevent weired overlapping/glitchy drawings)
|
||||
//adapt borders (prevent weird overlapping/glitchy drawings)
|
||||
int width = MAX(style_rect.size.width, 0);
|
||||
int height = MAX(style_rect.size.height, 0);
|
||||
int adapted_border[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
|
||||
adapt_values(MARGIN_TOP, MARGIN_BOTTOM, adapted_border, border_width, height, height, height);
|
||||
adapt_values(MARGIN_LEFT, MARGIN_RIGHT, adapted_border, border_width, width, width, width);
|
||||
|
||||
//adapt corners (prevent weired overlapping/glitchy drawings)
|
||||
//adapt corners (prevent weird overlapping/glitchy drawings)
|
||||
int adapted_corner[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
|
||||
adapt_values(CORNER_TOP_RIGHT, CORNER_BOTTOM_RIGHT, adapted_corner, corner_radius, height, height - adapted_border[MARGIN_BOTTOM], height - adapted_border[MARGIN_TOP]);
|
||||
adapt_values(CORNER_TOP_LEFT, CORNER_BOTTOM_LEFT, adapted_corner, corner_radius, height, height - adapted_border[MARGIN_BOTTOM], height - adapted_border[MARGIN_TOP]);
|
||||
|
|
|
@ -49,7 +49,7 @@ class ARVRPositionalTracker;
|
|||
Also each positioning tracker is accessible from here.
|
||||
|
||||
I've added some additional info into this header file that should move
|
||||
into the documention, I will do so when we're close to accepting this PR
|
||||
into the documentation, I will do so when we're close to accepting this PR
|
||||
or as a separate PR once this has been merged into the master branch.
|
||||
**/
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ void AudioDriverManager::initialize(int p_driver) {
|
|||
ERR_PRINT("AudioDriverManager: all drivers failed, falling back to dummy driver");
|
||||
dummy_driver.set_singleton();
|
||||
} else {
|
||||
ERR_PRINT("AudioDriverManager: dummy driver faild to init()");
|
||||
ERR_PRINT("AudioDriverManager: dummy driver failed to init()");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -858,7 +858,7 @@ void AudioServer::init() {
|
|||
|
||||
channel_disable_threshold_db = GLOBAL_DEF("audio/channel_disable_threshold_db", -60.0);
|
||||
channel_disable_frames = float(GLOBAL_DEF("audio/channel_disable_time", 2.0)) * get_mix_rate();
|
||||
buffer_size = 1024; //harcoded for now
|
||||
buffer_size = 1024; //hardcoded for now
|
||||
|
||||
temp_buffer.resize(get_channel_count());
|
||||
|
||||
|
|
Loading…
Reference in New Issue