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
```

(cherry picked from commit 612ab4bbc6)
This commit is contained in:
luz.paz 2018-02-21 11:30:55 -05:00 committed by Hein-Pieter van Braam
parent 40018e995c
commit 751806b5c7
55 changed files with 82 additions and 82 deletions

View File

@ -55,7 +55,7 @@
#define _COMMA_11 , #define _COMMA_11 ,
#define _COMMA_12 , #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(ITEM, LENGTH) _COMMA_SEP_LIST_##LENGTH(ITEM)
#define _COMMA_SEP_LIST_12(ITEM) \ #define _COMMA_SEP_LIST_12(ITEM) \
_COMMA_SEP_LIST_11(ITEM) \ _COMMA_SEP_LIST_11(ITEM) \
@ -95,7 +95,7 @@
ITEM(1) ITEM(1)
#define _COMMA_SEP_LIST_0(ITEM) #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(ITEM, LENGTH) _SEMIC_SEP_LIST_##LENGTH(ITEM)
#define _SEMIC_SEP_LIST_12(ITEM) \ #define _SEMIC_SEP_LIST_12(ITEM) \
_SEMIC_SEP_LIST_11(ITEM); \ _SEMIC_SEP_LIST_11(ITEM); \
@ -135,7 +135,7 @@
ITEM(1) ITEM(1)
#define _SEMIC_SEP_LIST_0(ITEM) #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(ITEM, LENGTH) _SPACE_SEP_LIST_##LENGTH(ITEM)
#define _SPACE_SEP_LIST_12(ITEM) \ #define _SPACE_SEP_LIST_12(ITEM) \
_SPACE_SEP_LIST_11(ITEM) \ _SPACE_SEP_LIST_11(ITEM) \

View File

@ -38,7 +38,7 @@ class PHashTranslation : public Translation {
GDCLASS(PHashTranslation, Translation); GDCLASS(PHashTranslation, Translation);
//this translation uses a sort of modified perfect hash algorithm //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 //so it's slower, but at the same time it has an extreemly high chance
//of catching untranslated strings //of catching untranslated strings

View File

@ -33,7 +33,7 @@
#include "typedefs.h" #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 * inside the code. It is recommended to always return processable data, so in case of an error, the
* engine can stay working well. * engine can stay working well.
* In most cases, bugs and/or invalid data are not fatal and should never allow a perfectly running application * In most cases, bugs and/or invalid data are not fatal and should never allow a perfectly running application

View File

@ -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_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX); 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_EQUAL", Variant::OP_EQUAL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_NOT_EQUAL", Variant::OP_NOT_EQUAL); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_NOT_EQUAL", Variant::OP_NOT_EQUAL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_LESS", Variant::OP_LESS); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_LESS", Variant::OP_LESS);

View File

@ -211,7 +211,7 @@ IP_Address::IP_Address(const String &p_string) {
clear(); clear();
if (p_string == "*") { if (p_string == "*") {
// Wildcard (not a vaild IP) // Wildcard (not a valid IP)
wildcard = true; wildcard = true;
} else if (p_string.find(":") >= 0) { } else if (p_string.find(":") >= 0) {

View File

@ -197,7 +197,7 @@ private:
if (node->right != _data._nil) { if (node->right != _data._nil) {
node = node->right; 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; node = node->left;
} }
return node; return node;
@ -219,7 +219,7 @@ private:
if (node->left != _data._nil) { if (node->left != _data._nil) {
node = node->left; 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; node = node->right;
} }
return node; return node;

View File

@ -278,7 +278,7 @@ void MessageQueue::flush() {
while (read_pos < buffer_end) { 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]; Message *message = (Message *)&buffer[read_pos];

View File

@ -90,7 +90,7 @@ bool PoolAllocator::find_hole(EntryArrayPos *p_pos, int p_for_size) {
int hole_size = entry.pos - prev_entry_end_pos; 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) { if (hole_size >= p_for_size) {
*p_pos = i; *p_pos = i;
return true; return true;
@ -100,7 +100,7 @@ bool PoolAllocator::find_hole(EntryArrayPos *p_pos, int p_for_size) {
prev_entry_end_pos = entry_end(entry); 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) { if ((pool_size - prev_entry_end_pos) >= p_for_size) {
*p_pos = entry_count; *p_pos = entry_count;

View File

@ -1016,11 +1016,11 @@ void ScriptDebuggerRemote::add_profiling_frame_data(const StringName &p_name, co
} }
void ScriptDebuggerRemote::profiling_start() { void ScriptDebuggerRemote::profiling_start() {
//ignores this, uses it via connnection //ignores this, uses it via connection
} }
void ScriptDebuggerRemote::profiling_end() { 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) { void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {

View File

@ -185,7 +185,7 @@ private:
if (node->right != _data._nil) { if (node->right != _data._nil) {
node = node->right; 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; node = node->left;
} }
return node; return node;
@ -207,7 +207,7 @@ private:
if (node->left != _data._nil) { if (node->left != _data._nil) {
node = node->left; 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; node = node->right;
} }
return node; return node;

View File

@ -293,7 +293,7 @@ public:
// If this changes the table in variant_op must be updated // If this changes the table in variant_op must be updated
enum Operator { enum Operator {
//comparation //comparison
OP_EQUAL, OP_EQUAL,
OP_NOT_EQUAL, OP_NOT_EQUAL,
OP_LESS, OP_LESS,

View File

@ -147,7 +147,7 @@ Variant::operator bool() const {
return booleanize(); 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. // zeroiness.
bool Variant::booleanize() const { bool Variant::booleanize() const {
return !is_zero(); return !is_zero();

View File

@ -4,7 +4,7 @@
Helper class to handle INI-style files. Helper class to handle INI-style files.
</brief_description> </brief_description>
<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] [codeblock]
[section] [section]
some_key=42 some_key=42

View File

@ -380,7 +380,7 @@
<members> <members>
<member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap"> <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. 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> </member>
</members> </members>
<constants> <constants>

View File

@ -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. 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>
<constant name="RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE" value="431" enum="ResponseCode"> <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>
<constant name="RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS" value="451" enum="ResponseCode"> <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. 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.

View File

@ -53,7 +53,7 @@
<argument index="1" name="position" type="Vector2"> <argument index="1" name="position" type="Vector2">
</argument> </argument>
<description> <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> </description>
</method> </method>
</methods> </methods>

View File

@ -26,7 +26,7 @@
Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1.
</member> </member>
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes"> <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>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
The normal map gives depth to the Sprite. The normal map gives depth to the Sprite.

View File

@ -123,7 +123,7 @@
<return type="bool"> <return type="bool">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="set_attach_to_screen_rect"> <method name="set_attach_to_screen_rect">

View File

@ -94,7 +94,7 @@ static Vector<Vector<Vector2> > _b2d_decompose(const Vector<Vector2> &p_polygon)
float32 dot = dx0 * dx1 + dy0 * dy1; float32 dot = dx0 * dx1 + dy0 * dy1;
if (fabs(cross) < b2_angularSlop && dot > 0) { if (fabs(cross) < b2_angularSlop && dot > 0) {
//Angle too close, split the triangle across from this point. //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) //the tolerance (one of the angles is 90 degrees)
float32 dx2 = curr.x[lower] - curr.x[upper]; float32 dx2 = curr.x[lower] - curr.x[upper];
float32 dy2 = curr.y[lower] - curr.y[upper]; float32 dy2 = curr.y[lower] - curr.y[upper];

View File

@ -908,7 +908,7 @@ Ref<Image> RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSi
return Ref<Image>(img); return Ref<Image>(img);
#else #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>(); return Ref<Image>();
#endif #endif
} }

View File

@ -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) { 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; return;
} }

View File

@ -2912,7 +2912,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
if (p_state.has("editor_index")) { if (p_state.has("editor_index")) {
int index = p_state["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()) { if (index < 2 || !get_edited_scene()) {
_editor_select(index); _editor_select(index);
} }

View File

@ -50,7 +50,7 @@ void ResourceImporterCSVTranslation::get_recognized_extensions(List<String> *p_e
} }
String ResourceImporterCSVTranslation::get_save_extension() const { 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 { String ResourceImporterCSVTranslation::get_resource_type() const {

View File

@ -140,7 +140,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R
Vector<Vector2> poly = node->get_polygon(); Vector<Vector2> poly = node->get_polygon();
//first check if a point is to be added (segment split) //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) { switch (mode) {
@ -159,7 +159,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R
return true; return true;
} else { } 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 closed
_wip_close(); _wip_close();
@ -213,7 +213,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R
continue; //not valid to reuse point continue; //not valid to reuse point
real_t d = cp.distance_to(gpoint); 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_dist = d;
closest_pos = cp; closest_pos = cp;
closest_idx = i; 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))); Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth)));
real_t d = cp.distance_to(gpoint); 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_dist = d;
closest_pos = cp; closest_pos = cp;
closest_idx = i; 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))); Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth)));
real_t d = cp.distance_to(gpoint); 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_dist = d;
closest_pos = cp; closest_pos = cp;
closest_idx = i; closest_idx = i;

View File

@ -429,7 +429,7 @@ Point2 InputDefault::get_last_mouse_speed() const {
int InputDefault::get_mouse_button_mask() 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) { void InputDefault::warp_mouse_position(const Vector2 &p_to) {

View File

@ -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 # that makes object files with same names to be overwritten so the last wins and
# the library looses symbols defined by overwritten objects. # the library looses symbols defined by overwritten objects.
# By enabling quick append instead of the default mode (replacing), libraries will # 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 # 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. # changes, no multiple versions of the same object file will be present.
self.Replace(ARFLAGS='q') 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 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 # 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() # 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: # the following string values:
# "" Compiler not detected # "" Compiler not detected
@ -1627,7 +1627,7 @@ def detect_visual_c_compiler_version(tools_env):
if 'VCINSTALLDIR' in tools_env: if 'VCINSTALLDIR' in tools_env:
# print("Checking VCINSTALLDIR") # 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 # 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;") vc_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64;")
if(vc_amd64_compiler_detection_index > -1): if(vc_amd64_compiler_detection_index > -1):

View File

@ -783,7 +783,7 @@ int BulletPhysicsServer::body_get_max_contacts_reported(RID p_body) const {
return body->get_max_collisions_detection(); 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"); WARN_PRINT("Not supported by bullet and even Godot");
} }

View File

@ -239,7 +239,7 @@ public:
virtual void body_set_max_contacts_reported(RID p_body, int p_contacts); 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 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 float body_get_contacts_reported_depth_threshold(RID p_body) const;
virtual void body_set_omit_force_integration(RID p_body, bool p_omit); virtual void body_set_omit_force_integration(RID p_body, bool p_omit);

View File

@ -87,7 +87,7 @@ public:
public: public:
/// Use this function to move kinematic body /// 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) { void moveBody(const btTransform &newWorldTransform) {
bodyKinematicWorldTransf = newWorldTransform; bodyKinematicWorldTransf = newWorldTransform;
} }

View File

@ -628,7 +628,7 @@ void SpaceBullet::destroy_world() {
void SpaceBullet::check_ghost_overlaps() { void SpaceBullet::check_ghost_overlaps() {
/// Algorith support variables /// Algorithm support variables
btConvexShape *other_body_shape; btConvexShape *other_body_shape;
btConvexShape *area_shape; btConvexShape *area_shape;
btGjkPairDetector::ClosestPointInput gjk_input; btGjkPairDetector::ClosestPointInput gjk_input;

View File

@ -64,7 +64,7 @@ typedef struct {
//this is used by script languages that keep a reference counter of their own //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 //you can make make Ref<> not die when it reaches zero, so deleting the reference
//depends entirely from the script. //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); void (*refcount_incremented)(godot_pluginscript_instance_data *p_data);
bool (*refcount_decremented)(godot_pluginscript_instance_data *p_data); // return true if it can die bool (*refcount_decremented)(godot_pluginscript_instance_data *p_data); // return true if it can die
} godot_pluginscript_instance_desc; } godot_pluginscript_instance_desc;

View File

@ -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 //wait, identifier could be a local variable or something else... careful here, must reference properly
//as stack may be more interesting to work with //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); const GDScriptParser::IdentifierNode *in = static_cast<const GDScriptParser::IdentifierNode *>(p_expression);

View File

@ -4071,7 +4071,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
ConstantNode *cn = static_cast<ConstantNode *>(subexpr); ConstantNode *cn = static_cast<ConstantNode *>(subexpr);
if (cn->value.get_type() == Variant::NIL) { 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; return;
} }
member._export.type = cn->value.get_type(); member._export.type = cn->value.get_type();
@ -4207,7 +4207,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
} break; } break;
case GDScriptTokenizer::TK_PR_ENUM: { case GDScriptTokenizer::TK_PR_ENUM: {
//mutiple constant declarations.. //multiple constant declarations..
int last_assign = -1; // Incremented by 1 right before the assingment. int last_assign = -1; // Incremented by 1 right before the assingment.
String enum_name; String enum_name;

View File

@ -4,14 +4,14 @@
Class for searching text for patterns using regular expressions. Class for searching text for patterns using regular expressions.
</brief_description> </brief_description>
<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. To begin, the RegEx object needs to be compiled with the search pattern using [method compile] before it can be used.
[codeblock] [codeblock]
var regex = RegEx.new() var regex = RegEx.new()
regex.compile("\\w-(\\d+)") regex.compile("\\w-(\\d+)")
[/codeblock] [/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] 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] [codeblock]
var regex = RegEx.new() var regex = RegEx.new()
regex.compile("\\w-(\\d+)") regex.compile("\\w-(\\d+)")

View File

@ -2182,7 +2182,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
Ref<VisualScriptNode> node = F->get().node; Ref<VisualScriptNode> node = F->get().node;
VisualScriptNodeInstance *instance = instances[F->key()]; VisualScriptNodeInstance *instance = instances[F->key()];
// conect to default values // connect to default values
for (int i = 0; i < instance->input_port_count; i++) { for (int i = 0; i < instance->input_port_count; i++) {
if (instance->input_ports[i] == -1) { 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++) { for (int i = 0; i < instance->output_port_count; i++) {
if (instance->output_ports[i] == -1) { if (instance->output_ports[i] == -1) {
instance->output_ports[i] = function.trash_pos; //trash is same for all instance->output_ports[i] = function.trash_pos; //trash is same for all

View File

@ -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 { PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const {
static const Variant::Type port_types[Variant::OP_MAX] = { static const Variant::Type port_types[Variant::OP_MAX] = {
//comparation //comparison
Variant::BOOL, //OP_EQUAL, Variant::BOOL, //OP_EQUAL,
Variant::BOOL, //OP_NOT_EQUAL, Variant::BOOL, //OP_NOT_EQUAL,
Variant::BOOL, //OP_LESS, Variant::BOOL, //OP_LESS,
@ -466,7 +466,7 @@ PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const {
} }
static const char *op_names[] = { static const char *op_names[] = {
//comparation //comparison
"Equal", //OP_EQUAL, "Equal", //OP_EQUAL,
"NotEqual", //OP_NOT_EQUAL, "NotEqual", //OP_NOT_EQUAL,
"Less", //OP_LESS, "Less", //OP_LESS,
@ -506,7 +506,7 @@ String VisualScriptOperator::get_caption() const {
String VisualScriptOperator::get_text() const { String VisualScriptOperator::get_text() const {
static const wchar_t *op_names[] = { static const wchar_t *op_names[] = {
//comparation //comparison
L"A = B", //OP_EQUAL, L"A = B", //OP_EQUAL,
L"A \u2260 B", //OP_NOT_EQUAL, L"A \u2260 B", //OP_NOT_EQUAL,
L"A < B", //OP_LESS, L"A < B", //OP_LESS,

View File

@ -257,7 +257,7 @@ class EditorExportAndroid : public EditorExportPlatform {
if (dpos == -1) if (dpos == -1)
continue; continue;
d = d.substr(0, dpos).strip_edges(); d = d.substr(0, dpos).strip_edges();
//print_line("found devuce: "+d); //print_line("found device: "+d);
ldevices.push_back(d); ldevices.push_back(d);
} }
@ -996,7 +996,7 @@ public:
public: public:
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) { 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"); /*int api = p_preset->get("graphics/api");
if (api == 0) if (api == 0)
r_features->push_back("etc"); r_features->push_back("etc");

View File

@ -1068,7 +1068,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
unsigned int attributeCount = 0; 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; int colorBits = 32;
// Fail if a robustness strategy was requested // Fail if a robustness strategy was requested
@ -1114,7 +1114,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 // 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); ADD_ATTR(0);

View File

@ -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/debug", PROPERTY_HINT_GLOBAL_FILE, "zip"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", 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; const char **basic = uwp_capabilities;
while (*basic) { while (*basic) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*basic).camelcase_to_underscore(false)), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*basic).camelcase_to_underscore(false)), false));

View File

@ -148,11 +148,11 @@ def configure(env):
## Compiler configuration ## Compiler configuration
env['ENV'] = os.environ 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']) compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV'])
print("Detected MSVC compiler: " + compiler_version_str) 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"): if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"):
env["bits"] = "64" env["bits"] = "64"
env["x86_libtheora_opt_vc"] = False env["x86_libtheora_opt_vc"] = False

View File

@ -731,7 +731,7 @@ void OS_X11::set_wm_fullscreen(bool p_enabled) {
XFree(xsh); XFree(xsh);
} }
// Using EWMH -- Extened Window Manager Hints // Using EWMH -- Extended Window Manager Hints
XEvent xev; XEvent xev;
Atom wm_state = XInternAtom(x11_display, "_NET_WM_STATE", False); Atom wm_state = XInternAtom(x11_display, "_NET_WM_STATE", False);
Atom wm_fullscreen = XInternAtom(x11_display, "_NET_WM_STATE_FULLSCREEN", False); Atom wm_fullscreen = XInternAtom(x11_display, "_NET_WM_STATE_FULLSCREEN", False);

View File

@ -226,14 +226,14 @@ void AudioStreamPlayer2D::_notification(int p_what) {
setseek = setplay; setseek = setplay;
active = true; active = true;
setplay = -1; 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 //_change_notify("playing"); //update property in editor
} }
//stop playing if no longer active //stop playing if no longer active
if (!active) { if (!active) {
set_physics_process_internal(false); 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 //_change_notify("playing"); //update property in editor
emit_signal("finished"); emit_signal("finished");
} }

View File

@ -536,14 +536,14 @@ void AudioStreamPlayer3D::_notification(int p_what) {
setseek = setplay; setseek = setplay;
active = true; active = true;
setplay = -1; 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 ///_change_notify("playing"); //update property in editor
} }
//stop playing if no longer active //stop playing if no longer active
if (!active) { if (!active) {
set_physics_process_internal(false); 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 //_change_notify("playing"); //update property in editor
emit_signal("finished"); emit_signal("finished");
} }

View File

@ -108,7 +108,7 @@ class AcceptDialog : public WindowDialog {
HBoxContainer *hbc; HBoxContainer *hbc;
Label *label; Label *label;
Button *ok; 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; bool hide_on_ok;
void _custom_action(const String &p_action); void _custom_action(const String &p_action);

View File

@ -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); 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). //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++) { for (int i = 0; i < cursor.line_ofs; i++) {
@ -4471,7 +4471,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_line, text.size(), false);
ERR_FAIL_INDEX_V(p_from_column, text[p_from_line].length() + 1, 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 line = p_from_line;
int pos = -1; int pos = -1;

View File

@ -158,7 +158,7 @@ void TextureProgress::draw_nine_patch_stretched(const Ref<Texture> &p_texture, F
if (p_ratio < 1.0) { if (p_ratio < 1.0) {
// Drawing a partially-filled 9-patch is a little tricky - // Drawing a partially-filled 9-patch is a little tricky -
// texture is divided by 3 sections toward fill direction, // 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_total = 0.0;
double width_texture = 0.0; double width_texture = 0.0;

View File

@ -2010,7 +2010,7 @@ void Node::set_editable_instance(Node *p_node, bool p_editable) {
if (!p_editable) { if (!p_editable) {
data.editable_instances.erase(p); data.editable_instances.erase(p);
// Avoid this flag being needlessly saved; // 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); set_display_folded(false);
} else { } else {
data.editable_instances[p] = true; data.editable_instances[p] = true;

View File

@ -104,7 +104,7 @@ private:
StringName name; StringName name;
SceneTree *tree; SceneTree *tree;
bool inside_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; bool ready_first;
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
NodePath import_path; //path used when imported, used by scene editors to keep tracking NodePath import_path; //path used when imported, used by scene editors to keep tracking

View File

@ -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++; 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; int ofs = 0;

View File

@ -1479,9 +1479,9 @@ bool SpatialMaterial::is_grow_enabled() const {
return grow_enabled; return grow_enabled;
} }
void SpatialMaterial::set_alpha_scissor_threshold(float p_treshold) { void SpatialMaterial::set_alpha_scissor_threshold(float p_threshold) {
alpha_scissor_threshold = p_treshold; alpha_scissor_threshold = p_threshold;
VS::get_singleton()->material_set_param(_get_material(), shader_names->alpha_scissor_threshold, p_treshold); VS::get_singleton()->material_set_param(_get_material(), shader_names->alpha_scissor_threshold, p_threshold);
} }
float SpatialMaterial::get_alpha_scissor_threshold() const { float SpatialMaterial::get_alpha_scissor_threshold() const {

View File

@ -566,7 +566,7 @@ public:
void set_grow(float p_grow); void set_grow(float p_grow);
float get_grow() const; 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; float get_alpha_scissor_threshold() const;
void set_on_top_of_alpha(); void set_on_top_of_alpha();

View File

@ -189,7 +189,7 @@ public:
}; };
/** /**
Similar to quadmesh but with tesselation support Similar to quadmesh but with tessellation support
*/ */
class PlaneMesh : public PrimitiveMesh { class PlaneMesh : public PrimitiveMesh {

View File

@ -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)); 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 width = MAX(style_rect.size.width, 0);
int height = MAX(style_rect.size.height, 0); int height = MAX(style_rect.size.height, 0);
int adapted_border[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX }; 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_TOP, MARGIN_BOTTOM, adapted_border, border_width, height, height, height);
adapt_values(MARGIN_LEFT, MARGIN_RIGHT, adapted_border, border_width, width, width, width); 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 }; 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_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]); adapt_values(CORNER_TOP_LEFT, CORNER_BOTTOM_LEFT, adapted_corner, corner_radius, height, height - adapted_border[MARGIN_BOTTOM], height - adapted_border[MARGIN_TOP]);

View File

@ -49,7 +49,7 @@ class ARVRPositionalTracker;
Also each positioning tracker is accessible from here. Also each positioning tracker is accessible from here.
I've added some additional info into this header file that should move 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. or as a separate PR once this has been merged into the master branch.
**/ **/

View File

@ -153,7 +153,7 @@ void AudioDriverManager::initialize(int p_driver) {
ERR_PRINT("AudioDriverManager: all drivers failed, falling back to dummy driver"); ERR_PRINT("AudioDriverManager: all drivers failed, falling back to dummy driver");
dummy_driver.set_singleton(); dummy_driver.set_singleton();
} else { } 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_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(); 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()); temp_buffer.resize(get_channel_count());