clang-format: Various fixes to comments alignment from clang-format
13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
This commit is contained in:
parent
3b11e33a09
commit
3a6be64c12
|
@ -42,23 +42,23 @@ BVHABB_CLASS _logic_abb_merge(const BVHABB_CLASS &a, const BVHABB_CLASS &b) {
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
@file q3DynamicAABBTree.h
|
* @file q3DynamicAABBTree.h
|
||||||
@author Randy Gaul
|
* @author Randy Gaul
|
||||||
@date 10/10/2014
|
* @date 10/10/2014
|
||||||
Copyright (c) 2014 Randy Gaul http://www.randygaul.net
|
* Copyright (c) 2014 Randy Gaul http://www.randygaul.net
|
||||||
This software is provided 'as-is', without any express or implied
|
* This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
* warranty. In no event will the authors be held liable for any damages
|
||||||
arising from the use of this software.
|
* arising from the use of this software.
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
* Permission is granted to anyone to use this software for any purpose,
|
||||||
including commercial applications, and to alter it and redistribute it
|
* including commercial applications, and to alter it and redistribute it
|
||||||
freely, subject to the following restrictions:
|
* freely, subject to the following restrictions:
|
||||||
1. The origin of this software must not be misrepresented; you must not
|
* 1. The origin of this software must not be misrepresented; you must not
|
||||||
claim that you wrote the original software. If you use this software
|
* claim that you wrote the original software. If you use this software
|
||||||
in a product, an acknowledgment in the product documentation would be
|
* in a product, an acknowledgment in the product documentation would be
|
||||||
appreciated but is not required.
|
* appreciated but is not required.
|
||||||
2. Altered source versions must be plainly marked as such, and must not
|
* 2. Altered source versions must be plainly marked as such, and must not
|
||||||
be misrepresented as being the original software.
|
* be misrepresented as being the original software.
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
* 3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -76,10 +76,10 @@ int32_t _logic_balance(int32_t iA, uint32_t p_tree_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A
|
/* A
|
||||||
/ \
|
* / \
|
||||||
B C
|
* B C
|
||||||
/ \ / \
|
* / \ / \
|
||||||
D E F G
|
* D E F G
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CRASH_COND(A->num_children != 2);
|
CRASH_COND(A->num_children != 2);
|
||||||
|
|
|
@ -735,8 +735,6 @@ int32_t ConvexHullInternal::Rational64::compare(const Rational64 &b) const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// return (numerator * b.denominator > b.numerator * denominator) ? sign : (numerator * b.denominator < b.numerator * denominator) ? -sign : 0;
|
|
||||||
|
|
||||||
#ifdef USE_X86_64_ASM
|
#ifdef USE_X86_64_ASM
|
||||||
|
|
||||||
int32_t result;
|
int32_t result;
|
||||||
|
@ -757,10 +755,9 @@ int32_t ConvexHullInternal::Rational64::compare(const Rational64 &b) const {
|
||||||
: "=&b"(result), [tmp] "=&r"(tmp), "=a"(dummy)
|
: "=&b"(result), [tmp] "=&r"(tmp), "=a"(dummy)
|
||||||
: "a"(denominator), [bn] "g"(b.numerator), [tn] "g"(numerator), [bd] "g"(b.denominator)
|
: "a"(denominator), [bn] "g"(b.numerator), [tn] "g"(numerator), [bd] "g"(b.denominator)
|
||||||
: "%rdx", "cc");
|
: "%rdx", "cc");
|
||||||
return result ? result ^ sign // if sign is +1, only bit 0 of result is inverted, which does not change the sign of result (and cannot result in zero)
|
// if sign is +1, only bit 0 of result is inverted, which does not change the sign of result (and cannot result in zero)
|
||||||
// if sign is -1, all bits of result are inverted, which changes the sign of result (and again cannot result in zero)
|
// if sign is -1, all bits of result are inverted, which changes the sign of result (and again cannot result in zero)
|
||||||
:
|
return result ? result ^ sign : 0;
|
||||||
0;
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -42,18 +42,13 @@ real_t Triangulate::get_area(const Vector<Vector2> &contour) {
|
||||||
return A * 0.5;
|
return A * 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* `is_inside_triangle` decides if a point P is inside the triangle
|
||||||
is_inside_triangle decides if a point P is Inside of the triangle
|
* defined by A, B, C. */
|
||||||
defined by A, B, C.
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
|
bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
|
||||||
real_t Bx, real_t By,
|
real_t Bx, real_t By,
|
||||||
real_t Cx, real_t Cy,
|
real_t Cx, real_t Cy,
|
||||||
real_t Px, real_t Py,
|
real_t Px, real_t Py,
|
||||||
bool include_edges)
|
bool include_edges) {
|
||||||
|
|
||||||
{
|
|
||||||
real_t ax, ay, bx, by, cx, cy, apx, apy, bpx, bpy, cpx, cpy;
|
real_t ax, ay, bx, by, cx, cy, apx, apy, bpx, bpy, cpx, cpy;
|
||||||
real_t cCROSSap, bCROSScp, aCROSSbp;
|
real_t cCROSSap, bCROSScp, aCROSSbp;
|
||||||
|
|
||||||
|
|
|
@ -2317,7 +2317,8 @@ bool String::is_numeric() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class C>
|
template <class C>
|
||||||
static double built_in_strtod(const C *string, /* A decimal ASCII floating-point number,
|
static double built_in_strtod(
|
||||||
|
/* A decimal ASCII floating-point number,
|
||||||
* optionally preceded by white space. Must
|
* optionally preceded by white space. Must
|
||||||
* have form "-I.FE-X", where I is the integer
|
* have form "-I.FE-X", where I is the integer
|
||||||
* part of the mantissa, F is the fractional
|
* part of the mantissa, F is the fractional
|
||||||
|
@ -2328,17 +2329,21 @@ static double built_in_strtod(const C *string, /* A decimal ASCII floating-point
|
||||||
* necessary unless F is present. The "E" may
|
* necessary unless F is present. The "E" may
|
||||||
* actually be an "e". E and X may both be
|
* actually be an "e". E and X may both be
|
||||||
* omitted (but not just one). */
|
* omitted (but not just one). */
|
||||||
C **endPtr = nullptr) /* If non-nullptr, store terminating Cacter's
|
const C *string,
|
||||||
|
/* If non-nullptr, store terminating Cacter's
|
||||||
* address here. */
|
* address here. */
|
||||||
{
|
C **endPtr = nullptr) {
|
||||||
static const int maxExponent = 511; /* Largest possible base 10 exponent. Any
|
/* Largest possible base 10 exponent. Any
|
||||||
* exponent larger than this will already
|
* exponent larger than this will already
|
||||||
* produce underflow or overflow, so there's
|
* produce underflow or overflow, so there's
|
||||||
* no need to worry about additional digits.
|
* no need to worry about additional digits. */
|
||||||
*/
|
static const int maxExponent = 511;
|
||||||
static const double powersOf10[] = { /* Table giving binary powers of 10. Entry */
|
/* Table giving binary powers of 10. Entry
|
||||||
10., /* is 10^2^i. Used to convert decimal */
|
* is 10^2^i. Used to convert decimal
|
||||||
100., /* exponents into floating-point numbers. */
|
* exponents into floating-point numbers. */
|
||||||
|
static const double powersOf10[] = {
|
||||||
|
10.,
|
||||||
|
100.,
|
||||||
1.0e4,
|
1.0e4,
|
||||||
1.0e8,
|
1.0e8,
|
||||||
1.0e16,
|
1.0e16,
|
||||||
|
@ -2353,8 +2358,9 @@ static double built_in_strtod(const C *string, /* A decimal ASCII floating-point
|
||||||
const double *d;
|
const double *d;
|
||||||
const C *p;
|
const C *p;
|
||||||
int c;
|
int c;
|
||||||
int exp = 0; /* Exponent read from "EX" field. */
|
/* Exponent read from "EX" field. */
|
||||||
int fracExp = 0; /* Exponent that derives from the fractional
|
int exp = 0;
|
||||||
|
/* Exponent that derives from the fractional
|
||||||
* part. Under normal circumstances, it is
|
* part. Under normal circumstances, it is
|
||||||
* the negative of the number of digits in F.
|
* the negative of the number of digits in F.
|
||||||
* However, if I is very long, the last digits
|
* However, if I is very long, the last digits
|
||||||
|
@ -2363,11 +2369,13 @@ static double built_in_strtod(const C *string, /* A decimal ASCII floating-point
|
||||||
* unnecessary overflow on I alone). In this
|
* unnecessary overflow on I alone). In this
|
||||||
* case, fracExp is incremented one for each
|
* case, fracExp is incremented one for each
|
||||||
* dropped digit. */
|
* dropped digit. */
|
||||||
int mantSize; /* Number of digits in mantissa. */
|
int fracExp = 0;
|
||||||
int decPt; /* Number of mantissa digits BEFORE decimal
|
/* Number of digits in mantissa. */
|
||||||
* point. */
|
int mantSize;
|
||||||
const C *pExp; /* Temporarily holds location of exponent in
|
/* Number of mantissa digits BEFORE decimal point. */
|
||||||
* string. */
|
int decPt;
|
||||||
|
/* Temporarily holds location of exponent in string. */
|
||||||
|
const C *pExp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Strip off leading blanks and check for a sign.
|
* Strip off leading blanks and check for a sign.
|
||||||
|
|
|
@ -614,15 +614,6 @@ Path3DEditorPlugin::Path3DEditorPlugin(EditorNode *p_node) {
|
||||||
menu->connect("id_pressed", callable_mp(this, &Path3DEditorPlugin::_handle_option_pressed));
|
menu->connect("id_pressed", callable_mp(this, &Path3DEditorPlugin::_handle_option_pressed));
|
||||||
|
|
||||||
curve_edit->set_pressed(true);
|
curve_edit->set_pressed(true);
|
||||||
/*
|
|
||||||
collision_polygon_editor = memnew( PathEditor(p_node) );
|
|
||||||
editor->get_main_control()->add_child(collision_polygon_editor);
|
|
||||||
collision_polygon_editor->set_margin(MARGIN_LEFT,200);
|
|
||||||
collision_polygon_editor->set_margin(MARGIN_RIGHT,230);
|
|
||||||
collision_polygon_editor->set_margin(MARGIN_TOP,0);
|
|
||||||
collision_polygon_editor->set_margin(MARGIN_BOTTOM,10);
|
|
||||||
collision_polygon_editor->hide();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Path3DEditorPlugin::~Path3DEditorPlugin() {
|
Path3DEditorPlugin::~Path3DEditorPlugin() {
|
||||||
|
|
|
@ -1308,10 +1308,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", false);
|
OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* todo restore
|
// FIXME: Restore support.
|
||||||
OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
|
#if 0
|
||||||
|
//OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
|
||||||
video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
|
video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
if (editor || project_manager) {
|
if (editor || project_manager) {
|
||||||
// The editor and project manager always detect and use hiDPI if needed
|
// The editor and project manager always detect and use hiDPI if needed
|
||||||
OS::get_singleton()->_allow_hidpi = true;
|
OS::get_singleton()->_allow_hidpi = true;
|
||||||
|
|
|
@ -82,46 +82,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace FBXDocParser {
|
namespace FBXDocParser {
|
||||||
//enum Flag
|
|
||||||
//{
|
|
||||||
// e_unknown_0 = 1 << 0,
|
|
||||||
// e_unknown_1 = 1 << 1,
|
|
||||||
// e_unknown_2 = 1 << 2,
|
|
||||||
// e_unknown_3 = 1 << 3,
|
|
||||||
// e_unknown_4 = 1 << 4,
|
|
||||||
// e_unknown_5 = 1 << 5,
|
|
||||||
// e_unknown_6 = 1 << 6,
|
|
||||||
// e_unknown_7 = 1 << 7,
|
|
||||||
// e_unknown_8 = 1 << 8,
|
|
||||||
// e_unknown_9 = 1 << 9,
|
|
||||||
// e_unknown_10 = 1 << 10,
|
|
||||||
// e_unknown_11 = 1 << 11,
|
|
||||||
// e_unknown_12 = 1 << 12,
|
|
||||||
// e_unknown_13 = 1 << 13,
|
|
||||||
// e_unknown_14 = 1 << 14,
|
|
||||||
// e_unknown_15 = 1 << 15,
|
|
||||||
// e_unknown_16 = 1 << 16,
|
|
||||||
// e_unknown_17 = 1 << 17,
|
|
||||||
// e_unknown_18 = 1 << 18,
|
|
||||||
// e_unknown_19 = 1 << 19,
|
|
||||||
// e_unknown_20 = 1 << 20,
|
|
||||||
// e_unknown_21 = 1 << 21,
|
|
||||||
// e_unknown_22 = 1 << 22,
|
|
||||||
// e_unknown_23 = 1 << 23,
|
|
||||||
// e_flag_field_size_64_bit = 1 << 24, // Not sure what is
|
|
||||||
// e_unknown_25 = 1 << 25,
|
|
||||||
// e_unknown_26 = 1 << 26,
|
|
||||||
// e_unknown_27 = 1 << 27,
|
|
||||||
// e_unknown_28 = 1 << 28,
|
|
||||||
// e_unknown_29 = 1 << 29,
|
|
||||||
// e_unknown_30 = 1 << 30,
|
|
||||||
// e_unknown_31 = 1 << 31
|
|
||||||
//};
|
|
||||||
//
|
|
||||||
//bool check_flag(uint32_t flags, Flag to_check)
|
|
||||||
//{
|
|
||||||
// return (flags & to_check) != 0;
|
|
||||||
//}
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
Token::Token(const char *sbegin, const char *send, TokenType type, size_t offset) :
|
Token::Token(const char *sbegin, const char *send, TokenType type, size_t offset) :
|
||||||
sbegin(sbegin),
|
sbegin(sbegin),
|
||||||
|
@ -458,12 +418,6 @@ void TokenizeBinary(TokenList &output_tokens, const char *input, size_t length,
|
||||||
//TokenizeError("file is too short",0);
|
//TokenizeError("file is too short",0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//uint32_t offset = 0x15;
|
|
||||||
/* const char* cursor = input + 0x15;
|
|
||||||
const uint32_t flags = ReadWord(input, cursor, input + length);
|
|
||||||
const uint8_t padding_0 = ReadByte(input, cursor, input + length); // unused
|
|
||||||
const uint8_t padding_1 = ReadByte(input, cursor, input + length); // unused*/
|
|
||||||
|
|
||||||
if (strncmp(input, "Kaydara FBX Binary", 18)) {
|
if (strncmp(input, "Kaydara FBX Binary", 18)) {
|
||||||
TokenizeError("magic bytes not found", 0);
|
TokenizeError("magic bytes not found", 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -660,13 +660,6 @@ void ParseVectorDataArray(std::vector<Vector3> &out, const ElementPtr el) {
|
||||||
static_cast<real_t>(d[1]),
|
static_cast<real_t>(d[1]),
|
||||||
static_cast<real_t>(d[2])));
|
static_cast<real_t>(d[2])));
|
||||||
}
|
}
|
||||||
// for debugging
|
|
||||||
/*for ( size_t i = 0; i < out.size(); i++ ) {
|
|
||||||
aiVector3D vec3( out[ i ] );
|
|
||||||
std::stringstream stream;
|
|
||||||
stream << " vec3.x = " << vec3.x << " vec3.y = " << vec3.y << " vec3.z = " << vec3.z << std::endl;
|
|
||||||
DefaultLogger::get()->info( stream.str() );
|
|
||||||
}*/
|
|
||||||
} else if (type == 'f') {
|
} else if (type == 'f') {
|
||||||
const float *f = reinterpret_cast<const float *>(&buff[0]);
|
const float *f = reinterpret_cast<const float *>(&buff[0]);
|
||||||
for (unsigned int i = 0; i < count3; ++i, f += 3) {
|
for (unsigned int i = 0; i < count3; ++i, f += 3) {
|
||||||
|
|
|
@ -361,13 +361,6 @@ Error PluginScript::reload(bool p_keep_state) {
|
||||||
_properties_default_values[pi.name] = v["default_value"];
|
_properties_default_values[pi.name] = v["default_value"];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
|
||||||
/*for (Set<PlaceHolderScriptInstance*>::Element *E=placeholders.front();E;E=E->next()) {
|
|
||||||
|
|
||||||
_update_placeholder(E->get());
|
|
||||||
}*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FREE_SCRIPT_MANIFEST(manifest);
|
FREE_SCRIPT_MANIFEST(manifest);
|
||||||
return OK;
|
return OK;
|
||||||
#undef FREE_SCRIPT_MANIFEST
|
#undef FREE_SCRIPT_MANIFEST
|
||||||
|
|
|
@ -3068,8 +3068,8 @@ void GDScriptParser::get_class_doc_comment(int p_line, String &p_brief, String &
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Syntax:
|
/* Syntax:
|
||||||
@tutorial ( The Title Here ) : https://the.url/
|
* @tutorial ( The Title Here ) : https://the.url/
|
||||||
^ open ^ close ^ colon ^ url
|
* ^ open ^ close ^ colon ^ url
|
||||||
*/
|
*/
|
||||||
int open_bracket_pos = begin_scan, close_bracket_pos = 0;
|
int open_bracket_pos = begin_scan, close_bracket_pos = 0;
|
||||||
while (open_bracket_pos < striped_line.length() && (striped_line[open_bracket_pos] == ' ' || striped_line[open_bracket_pos] == '\t')) {
|
while (open_bracket_pos < striped_line.length() && (striped_line[open_bracket_pos] == ' ' || striped_line[open_bracket_pos] == '\t')) {
|
||||||
|
|
|
@ -2370,7 +2370,6 @@ void VisualScriptLanguage::debug_get_stack_level_locals(int p_level, List<String
|
||||||
const StringName *f = _call_stack[l].function;
|
const StringName *f = _call_stack[l].function;
|
||||||
|
|
||||||
ERR_FAIL_COND(!_call_stack[l].instance->functions.has(*f));
|
ERR_FAIL_COND(!_call_stack[l].instance->functions.has(*f));
|
||||||
//VisualScriptInstance::Function *func = &_call_stack[l].instance->functions[*f];
|
|
||||||
|
|
||||||
VisualScriptNodeInstance *node = _call_stack[l].instance->instances[*_call_stack[l].current_id];
|
VisualScriptNodeInstance *node = _call_stack[l].instance->instances[*_call_stack[l].current_id];
|
||||||
ERR_FAIL_COND(!node);
|
ERR_FAIL_COND(!node);
|
||||||
|
@ -2416,21 +2415,6 @@ void VisualScriptLanguage::debug_get_stack_level_locals(int p_level, List<String
|
||||||
p_locals->push_back("working_mem/mem_" + itos(i));
|
p_locals->push_back("working_mem/mem_" + itos(i));
|
||||||
p_values->push_back((*_call_stack[l].work_mem)[i]);
|
p_values->push_back((*_call_stack[l].work_mem)[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
ERR_FAIL_INDEX(p_level,_debug_call_stack_pos);
|
|
||||||
|
|
||||||
|
|
||||||
VisualFunction *f = _call_stack[l].function;
|
|
||||||
|
|
||||||
List<Pair<StringName,int> > locals;
|
|
||||||
|
|
||||||
f->debug_get_stack_member_state(*_call_stack[l].line,&locals);
|
|
||||||
for( List<Pair<StringName,int> >::Element *E = locals.front();E;E=E->next() ) {
|
|
||||||
p_locals->push_back(E->get().first);
|
|
||||||
p_values->push_back(_call_stack[l].stack[E->get().second]);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualScriptLanguage::debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
|
void VisualScriptLanguage::debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems, int p_max_depth) {
|
||||||
|
|
|
@ -851,16 +851,11 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
|
||||||
int iofs = ofs + 8;
|
int iofs = ofs + 8;
|
||||||
|
|
||||||
string_count = decode_uint32(&p_manifest[iofs]);
|
string_count = decode_uint32(&p_manifest[iofs]);
|
||||||
//styles_count = decode_uint32(&p_manifest[iofs + 4]);
|
// iofs + 4 is `styles_count`.
|
||||||
string_flags = decode_uint32(&p_manifest[iofs + 8]);
|
string_flags = decode_uint32(&p_manifest[iofs + 8]);
|
||||||
string_data_offset = decode_uint32(&p_manifest[iofs + 12]);
|
string_data_offset = decode_uint32(&p_manifest[iofs + 12]);
|
||||||
//styles_offset = decode_uint32(&p_manifest[iofs + 16]);
|
// iofs + 16 is `styles_offset`.
|
||||||
/*
|
|
||||||
printf("string count: %i\n",string_count);
|
|
||||||
printf("flags: %i\n",string_flags);
|
|
||||||
printf("sdata ofs: %i\n",string_data_offset);
|
|
||||||
printf("styles ofs: %i\n",styles_offset);
|
|
||||||
*/
|
|
||||||
uint32_t st_offset = iofs + 20;
|
uint32_t st_offset = iofs + 20;
|
||||||
string_table.resize(string_count);
|
string_table.resize(string_count);
|
||||||
uint32_t string_end = 0;
|
uint32_t string_end = 0;
|
||||||
|
|
|
@ -2926,10 +2926,7 @@ void DisplayServerX11::process_events() {
|
||||||
xi.last_relative_time = raw_event->time;
|
xi.last_relative_time = raw_event->time;
|
||||||
} break;
|
} break;
|
||||||
#ifdef TOUCH_ENABLED
|
#ifdef TOUCH_ENABLED
|
||||||
case XI_TouchBegin: // Fall-through
|
case XI_TouchBegin:
|
||||||
// Disabled hand-in-hand with the grabbing
|
|
||||||
//XIAllowTouchEvents(x11_display, event_data->deviceid, event_data->detail, x11_window, XIAcceptTouch);
|
|
||||||
|
|
||||||
case XI_TouchEnd: {
|
case XI_TouchEnd: {
|
||||||
bool is_begin = event_data->evtype == XI_TouchBegin;
|
bool is_begin = event_data->evtype == XI_TouchBegin;
|
||||||
|
|
||||||
|
@ -4137,7 +4134,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||||
}
|
}
|
||||||
show_window(main_window);
|
show_window(main_window);
|
||||||
|
|
||||||
//create RenderingDevice if used
|
|
||||||
#if defined(VULKAN_ENABLED)
|
#if defined(VULKAN_ENABLED)
|
||||||
if (rendering_driver == "vulkan") {
|
if (rendering_driver == "vulkan") {
|
||||||
//temporary
|
//temporary
|
||||||
|
@ -4148,13 +4144,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
rendering_server = memnew(RenderingServerDefault);
|
|
||||||
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
|
|
||||||
rendering_server = memnew(RenderingServerWrapMT(rendering_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
{
|
{
|
||||||
//set all event master mask
|
//set all event master mask
|
||||||
XIEventMask all_master_event_mask;
|
XIEventMask all_master_event_mask;
|
||||||
|
@ -4167,15 +4156,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||||
XISelectEvents(x11_display, DefaultRootWindow(x11_display), &all_master_event_mask, 1);
|
XISelectEvents(x11_display, DefaultRootWindow(x11_display), &all_master_event_mask, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabled by now since grabbing also blocks mouse events
|
|
||||||
// (they are received as extended events instead of standard events)
|
|
||||||
/*XIClearMask(xi.touch_event_mask.mask, XI_TouchOwnership);
|
|
||||||
|
|
||||||
// Grab touch devices to avoid OS gesture interference
|
|
||||||
for (int i = 0; i < xi.touch_devices.size(); ++i) {
|
|
||||||
XIGrabDevice(x11_display, xi.touch_devices[i], x11_window, CurrentTime, None, XIGrabModeAsync, XIGrabModeAsync, False, &xi.touch_event_mask);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
cursor_size = XcursorGetDefaultSize(x11_display);
|
cursor_size = XcursorGetDefaultSize(x11_display);
|
||||||
cursor_theme = XcursorGetTheme(x11_display);
|
cursor_theme = XcursorGetTheme(x11_display);
|
||||||
|
|
||||||
|
|
|
@ -325,11 +325,11 @@ void EditorExportPlatformOSX::_fix_plist(const Ref<EditorExportPreset> &p_preset
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
If we're running the OSX version of the Godot editor we'll:
|
* If we're running the OSX version of the Godot editor we'll:
|
||||||
- export our application bundle to a temporary folder
|
* - export our application bundle to a temporary folder
|
||||||
- attempt to code sign it
|
* - attempt to code sign it
|
||||||
- and then wrap it up in a DMG
|
* - and then wrap it up in a DMG
|
||||||
**/
|
*/
|
||||||
|
|
||||||
Error EditorExportPlatformOSX::_notarize(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
|
Error EditorExportPlatformOSX::_notarize(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
|
||||||
#ifdef OSX_ENABLED
|
#ifdef OSX_ENABLED
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
definition of invalidation: global is invalid
|
definition of invalidation: global is invalid
|
||||||
|
|
||||||
1) If a node sets a LOCAL, it produces an invalidation of everything above
|
1) If a node sets a LOCAL, it produces an invalidation of everything above
|
||||||
a) If above is invalid, don't keep invalidating upwards
|
. a) If above is invalid, don't keep invalidating upwards
|
||||||
2) If a node sets a GLOBAL, it is converted to LOCAL (and forces validation of everything pending below)
|
2) If a node sets a GLOBAL, it is converted to LOCAL (and forces validation of everything pending below)
|
||||||
|
|
||||||
drawback: setting/reading globals is useful and used very often, and using affine inverses is slow
|
drawback: setting/reading globals is useful and used very often, and using affine inverses is slow
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
definition of invalidation: NONE dirty, LOCAL dirty, GLOBAL dirty
|
definition of invalidation: NONE dirty, LOCAL dirty, GLOBAL dirty
|
||||||
|
|
||||||
1) If a node sets a LOCAL, it must climb the tree and set it as GLOBAL dirty
|
1) If a node sets a LOCAL, it must climb the tree and set it as GLOBAL dirty
|
||||||
a) marking GLOBALs as dirty up all the tree must be done always
|
. a) marking GLOBALs as dirty up all the tree must be done always
|
||||||
2) If a node sets a GLOBAL, it marks local as dirty, and that's all?
|
2) If a node sets a GLOBAL, it marks local as dirty, and that's all?
|
||||||
|
|
||||||
//is clearing the dirty state correct in this case?
|
//is clearing the dirty state correct in this case?
|
||||||
|
|
|
@ -173,24 +173,16 @@ void AudioFilterSW::prepare_coefficients(Coeffs *p_coeffs) {
|
||||||
p_coeffs->a2 = ((tmpgain + 1.0) - (tmpgain - 1.0) * cos_v - beta * sin_v);
|
p_coeffs->a2 = ((tmpgain + 1.0) - (tmpgain - 1.0) * cos_v - beta * sin_v);
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
};
|
}
|
||||||
|
|
||||||
p_coeffs->b0 /= a0;
|
p_coeffs->b0 /= a0;
|
||||||
p_coeffs->b1 /= a0;
|
p_coeffs->b1 /= a0;
|
||||||
p_coeffs->b2 /= a0;
|
p_coeffs->b2 /= a0;
|
||||||
p_coeffs->a1 /= 0.0 - a0;
|
p_coeffs->a1 /= 0.0 - a0;
|
||||||
p_coeffs->a2 /= 0.0 - a0;
|
p_coeffs->a2 /= 0.0 - a0;
|
||||||
|
|
||||||
//undenormalise
|
|
||||||
/* p_coeffs->b0=undenormalise(p_coeffs->b0);
|
|
||||||
p_coeffs->b1=undenormalise(p_coeffs->b1);
|
|
||||||
p_coeffs->b2=undenormalise(p_coeffs->b2);
|
|
||||||
p_coeffs->a1=undenormalise(p_coeffs->a1);
|
|
||||||
p_coeffs->a2=undenormalise(p_coeffs->a2);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioFilterSW::set_stages(int p_stages) { //adjust for multiple stages
|
void AudioFilterSW::set_stages(int p_stages) {
|
||||||
|
|
||||||
stages = p_stages;
|
stages = p_stages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -710,9 +710,11 @@ void GodotSoftBody3D::generate_bending_constraints(int p_distance) {
|
||||||
// A small structure to track lists of dependent link calculations.
|
// A small structure to track lists of dependent link calculations.
|
||||||
class LinkDeps {
|
class LinkDeps {
|
||||||
public:
|
public:
|
||||||
int value; // A link calculation that is dependent on this one
|
// A link calculation that is dependent on this one.
|
||||||
// Positive values = "input A" while negative values = "input B"
|
// Positive values = "input A" while negative values = "input B".
|
||||||
LinkDeps *next; // Next dependence in the list
|
int value;
|
||||||
|
// Next dependence in the list.
|
||||||
|
LinkDeps *next;
|
||||||
};
|
};
|
||||||
typedef LinkDeps *LinkDepsPtr;
|
typedef LinkDeps *LinkDepsPtr;
|
||||||
|
|
||||||
|
|
|
@ -119,10 +119,10 @@ public:
|
||||||
|
|
||||||
//! Test limit
|
//! Test limit
|
||||||
/*!
|
/*!
|
||||||
- free means upper < lower,
|
* - free means upper < lower,
|
||||||
- locked means upper == lower
|
* - locked means upper == lower
|
||||||
- limited means upper > lower
|
* - limited means upper > lower
|
||||||
- limitIndex: first 3 are linear, next 3 are angular
|
* - limitIndex: first 3 are linear, next 3 are angular
|
||||||
*/
|
*/
|
||||||
inline bool isLimited(int limitIndex) {
|
inline bool isLimited(int limitIndex) {
|
||||||
return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]);
|
return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]);
|
||||||
|
@ -291,10 +291,10 @@ public:
|
||||||
|
|
||||||
//! Test limit
|
//! Test limit
|
||||||
/*!
|
/*!
|
||||||
- free means upper < lower,
|
* - free means upper < lower,
|
||||||
- locked means upper == lower
|
* - locked means upper == lower
|
||||||
- limited means upper > lower
|
* - limited means upper > lower
|
||||||
- limitIndex: first 3 are linear, next 3 are angular
|
* - limitIndex: first 3 are linear, next 3 are angular
|
||||||
*/
|
*/
|
||||||
bool isLimited(int limitIndex) {
|
bool isLimited(int limitIndex) {
|
||||||
if (limitIndex < 3) {
|
if (limitIndex < 3) {
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#include "renderer_canvas_render_rd.h"
|
#include "renderer_canvas_render_rd.h"
|
||||||
|
|
||||||
#include "core/config/project_settings.h"
|
#include "core/config/project_settings.h"
|
||||||
#include "core/math/geometry_2d.h"
|
#include "core/math/geometry_2d.h"
|
||||||
#include "core/math/math_defs.h"
|
#include "core/math/math_defs.h"
|
||||||
|
@ -1585,9 +1586,6 @@ void RendererCanvasRenderRD::light_update_shadow(RID p_rid, int p_shadow_index,
|
||||||
push_constant.z_far = p_far;
|
push_constant.z_far = p_far;
|
||||||
push_constant.pad = 0;
|
push_constant.pad = 0;
|
||||||
|
|
||||||
/*if (i == 0)
|
|
||||||
*p_xform_cache = projection;*/
|
|
||||||
|
|
||||||
LightOccluderInstance *instance = p_occluders;
|
LightOccluderInstance *instance = p_occluders;
|
||||||
|
|
||||||
while (instance) {
|
while (instance) {
|
||||||
|
|
|
@ -91,7 +91,6 @@ void main() {
|
||||||
uint instancing = draw_data.flags & FLAGS_INSTANCING_MASK;
|
uint instancing = draw_data.flags & FLAGS_INSTANCING_MASK;
|
||||||
|
|
||||||
#ifdef USE_ATTRIBUTES
|
#ifdef USE_ATTRIBUTES
|
||||||
|
|
||||||
if (instancing > 1) {
|
if (instancing > 1) {
|
||||||
// trails
|
// trails
|
||||||
|
|
||||||
|
@ -128,10 +127,9 @@ void main() {
|
||||||
|
|
||||||
vertex = new_vertex;
|
vertex = new_vertex;
|
||||||
color *= pcolor;
|
color *= pcolor;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
#endif // USE_ATTRIBUTES
|
#endif // USE_ATTRIBUTES
|
||||||
|
{
|
||||||
if (instancing == 1) {
|
if (instancing == 1) {
|
||||||
uint stride = 2;
|
uint stride = 2;
|
||||||
{
|
{
|
||||||
|
@ -160,6 +158,7 @@ void main() {
|
||||||
matrix = transpose(matrix);
|
matrix = transpose(matrix);
|
||||||
world_matrix = world_matrix * matrix;
|
world_matrix = world_matrix * matrix;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if !defined(USE_ATTRIBUTES) && !defined(USE_PRIMITIVE)
|
#if !defined(USE_ATTRIBUTES) && !defined(USE_PRIMITIVE)
|
||||||
if (bool(draw_data.flags & FLAGS_USING_PARTICLES)) {
|
if (bool(draw_data.flags & FLAGS_USING_PARTICLES)) {
|
||||||
|
|
|
@ -1249,10 +1249,10 @@ void main() {
|
||||||
// LIGHTING
|
// LIGHTING
|
||||||
#if !defined(MODE_RENDER_DEPTH) && !defined(MODE_UNSHADED)
|
#if !defined(MODE_RENDER_DEPTH) && !defined(MODE_UNSHADED)
|
||||||
|
|
||||||
{ //directional light
|
{ // Directional light.
|
||||||
|
|
||||||
|
// Do shadow and lighting in two passes to reduce register pressure.
|
||||||
#ifndef SHADOWS_DISABLED
|
#ifndef SHADOWS_DISABLED
|
||||||
// Do shadow and lighting in two passes to reduce register pressure
|
|
||||||
uint shadow0 = 0;
|
uint shadow0 = 0;
|
||||||
uint shadow1 = 0;
|
uint shadow1 = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue