Style: apply clang-format (5.0.0) to current source

This commit is contained in:
Rémi Verschelde 2017-12-11 15:31:49 +01:00
parent 7e2d6b4450
commit 6a4e7198c5
147 changed files with 465 additions and 399 deletions

View File

@ -102,8 +102,8 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
} break;
// math types
// math types
case Variant::VECTOR2: {
ERR_FAIL_COND_V(len < (int)4 * 2, ERR_INVALID_DATA);
@ -880,8 +880,8 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len) {
r_len++; //pad
} break;
// math types
// math types
case Variant::VECTOR2: {
if (buf) {

View File

@ -57,8 +57,8 @@ class AStar : public Reference {
Point *prev_point;
float distance;
Point()
: list(this) {}
Point() :
list(this) {}
};
Map<int, Point *> points;

View File

@ -195,8 +195,7 @@ bool Face3::intersects_aabb(const AABB &p_aabb) const {
if (!p_aabb.intersects_plane(get_plane()))
return false;
/** TEST FACE AXIS */
/** TEST FACE AXIS */
#define TEST_AXIS(m_ax) \
{ \
float aabb_min = p_aabb.pos.m_ax; \

View File

@ -256,6 +256,6 @@ bool Face3::intersects_aabb2(const AABB &p_aabb) const {
return true;
}
//this sucks...
//this sucks...
#endif // FACE3_H

View File

@ -138,7 +138,7 @@ public:
#elif defined(_MSC_VER) && _MSC_VER < 1800
__asm fld a __asm fistp b
/*#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
/*#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
// use AT&T inline assembly style, document that
// we use memory as output (=m) and input (m)
__asm__ __volatile__ (

View File

@ -74,8 +74,9 @@ public:
operator String() const;
_FORCE_INLINE_ Plane() { d = 0; }
_FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d)
: normal(p_a, p_b, p_c), d(p_d){};
_FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d) :
normal(p_a, p_b, p_c),
d(p_d){};
_FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_d);
_FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3 &p_normal);

View File

@ -114,7 +114,7 @@ static inline int atomic_conditional_increment(volatile int *pw) {
"m"(*pw)
: // input (%3)
"cc" // clobbers
);
);
return rv;
}
@ -135,7 +135,7 @@ static inline int atomic_decrement(volatile int *pw) {
return static_cast<int>(rv);
}
/* PowerPC32/64 GCC */
/* PowerPC32/64 GCC */
#elif (defined(__GNUC__)) && (defined(__powerpc__) || defined(__ppc__))
@ -188,7 +188,7 @@ inline int atomic_decrement(int *pw) {
return rv;
}
/* CW ARM */
/* CW ARM */
#elif defined(__GNUC__) && (defined(__arm__))
@ -234,7 +234,7 @@ inline int atomic_decrement(volatile int *v) {
return t;
}
/* CW PPC */
/* CW PPC */
#elif (defined(__MWERKS__)) && defined(__POWERPC__)
@ -279,7 +279,7 @@ inline long atomic_decrement(register long *pw) {
return a;
}
/* Any Windows (MSVC) */
/* Any Windows (MSVC) */
#elif defined(_MSC_VER)

View File

@ -77,7 +77,7 @@ T *_nullptr() {
#define OFFSET_OF(st, m) \
((size_t)((char *)&(_nullptr<st>()->m) - (char *)0))
/**
/**
* Some platforms (devices) not define NULL
*/
@ -85,7 +85,7 @@ T *_nullptr() {
#define NULL 0
#endif
/**
/**
* Windows defines a lot of badly stuff we'll never ever use. undefine it.
*/
@ -107,7 +107,7 @@ T *_nullptr() {
#include "int_types.h"
/** Generic ABS function, for math uses please use Math::abs */
/** Generic ABS function, for math uses please use Math::abs */
#ifndef ABS
#define ABS(m_v) ((m_v < 0) ? (-(m_v)) : (m_v))

View File

@ -66,7 +66,6 @@ String Variant::get_type_name(Variant::Type p_type) {
} break;
// math types
case VECTOR2: {
return "Vector2";
@ -733,7 +732,6 @@ bool Variant::is_zero() const {
} break;
// math types
case VECTOR2: {
return *reinterpret_cast<const Vector2 *>(_data._mem) == Vector2();
@ -958,7 +956,6 @@ void Variant::reference(const Variant &p_variant) {
} break;
// math types
case VECTOR2: {
memnew_placement(_data._mem, Vector2(*reinterpret_cast<const Vector2 *>(p_variant._data._mem)));
@ -2608,8 +2605,8 @@ uint32_t Variant::hash() const {
return reinterpret_cast<const String *>(_data._mem)->hash();
} break;
// math types
// math types
case VECTOR2: {
uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Vector2 *>(_data._mem)->x);

View File

@ -1031,7 +1031,6 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
return String();
// math types
case VECTOR2:
return Vector2(); // 5
case RECT2: return Rect2();

View File

@ -153,7 +153,7 @@ static Vector<Vector<Vector2> > _b2d_decompose(const Vector<Vector2> &p_polygon)
delete p;
return res; // pdarray; //needs to be deleted after body is created
}
}
} // namespace b2ConvexDecomp
Vector<Vector<Vector2> > b2d_decompose(const Vector<Vector2> &p_polygon) {

View File

@ -4091,7 +4091,7 @@ void RasterizerGLES2::capture_viewport(Image *r_capture) {
w = DVector<uint8_t>::Write();
r_capture->create(viewport.width, viewport.height, 0, Image::FORMAT_RGBA, pixels);
//r_capture->flip_y();
//r_capture->flip_y();
#endif
}
@ -7686,7 +7686,7 @@ void RasterizerGLES2::_draw_gui_primitive(int p_points, const Vector2 *p_vertice
static const GLenum prim[5] = { GL_POINTS, GL_POINTS, GL_LINES, GL_TRIANGLES, GL_TRIANGLE_FAN };
//#define GLES_USE_PRIMITIVE_BUFFER
//#define GLES_USE_PRIMITIVE_BUFFER
#ifndef GLES_NO_CLIENT_ARRAYS
@ -9805,10 +9805,10 @@ void RasterizerGLES2::_update_framebuffer() {
glGenFramebuffers(1, &framebuffer.fbo);
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.fbo);
//print_line("generating fbo, id: "+itos(framebuffer.fbo));
//depth
//print_line("generating fbo, id: "+itos(framebuffer.fbo));
//depth
// Create a render buffer
// Create a render buffer
#if 0
glGenTextures(1, &framebuffer.depth);
@ -10341,7 +10341,7 @@ void RasterizerGLES2::init() {
full_float_fb_supported = extensions.has("GL_EXT_color_buffer_float");
//etc_supported=false;
//etc_supported=false;
#endif

View File

@ -210,8 +210,8 @@ class RasterizerGLES2 : public Rasterizer {
SelfList<Shader> dirty_list;
Shader()
: dirty_list(this) {
Shader() :
dirty_list(this) {
valid = false;
custom_code_id = 0;
@ -480,8 +480,8 @@ class RasterizerGLES2 : public Rasterizer {
SelfList<MultiMesh> dirty_list;
MultiMesh()
: dirty_list(this) {
MultiMesh() :
dirty_list(this) {
tw = 1;
th = 1;
@ -612,8 +612,8 @@ class RasterizerGLES2 : public Rasterizer {
SelfList<Skeleton> dirty_list;
Skeleton()
: dirty_list(this) {
Skeleton() :
dirty_list(this) {
tex_id = 0;
pixel_size = 1.0;
}

View File

@ -63,12 +63,16 @@ private:
unsigned int _size;
public:
nrex_array()
: _data(NREX_NEW_ARRAY(T, 2)), _reserved(2), _size(0) {
nrex_array() :
_data(NREX_NEW_ARRAY(T, 2)),
_reserved(2),
_size(0) {
}
nrex_array(unsigned int reserved)
: _data(NREX_NEW_ARRAY(T, reserved ? reserved : 1)), _reserved(reserved ? reserved : 1), _size(0) {
nrex_array(unsigned int reserved) :
_data(NREX_NEW_ARRAY(T, reserved ? reserved : 1)),
_reserved(reserved ? reserved : 1),
_size(0) {
}
~nrex_array() {
@ -179,8 +183,11 @@ struct nrex_search {
return str[pos];
}
nrex_search(const nrex_char *str, nrex_result *captures, int lookahead)
: str(str), captures(captures), end(0), lookahead_pos(lookahead) {
nrex_search(const nrex_char *str, nrex_result *captures, int lookahead) :
str(str),
captures(captures),
end(0),
lookahead_pos(lookahead) {
}
};
@ -191,8 +198,12 @@ struct nrex_node {
bool quantifiable;
int length;
nrex_node(bool quantify = false)
: next(NULL), previous(NULL), parent(NULL), quantifiable(quantify), length(-1) {
nrex_node(bool quantify = false) :
next(NULL),
previous(NULL),
parent(NULL),
quantifiable(quantify),
length(-1) {
}
virtual ~nrex_node() {
@ -252,8 +263,12 @@ struct nrex_node_group : public nrex_node {
nrex_array<nrex_node *> childset;
nrex_node *back;
nrex_node_group(nrex_group_type type, int id = 0)
: nrex_node(true), type(type), id(id), negate(false), back(NULL) {
nrex_node_group(nrex_group_type type, int id = 0) :
nrex_node(true),
type(type),
id(id),
negate(false),
back(NULL) {
if (type != nrex_group_bracket) {
length = 0;
} else {
@ -386,8 +401,9 @@ struct nrex_node_group : public nrex_node {
struct nrex_node_char : public nrex_node {
nrex_char ch;
nrex_node_char(nrex_char c)
: nrex_node(true), ch(c) {
nrex_node_char(nrex_char c) :
nrex_node(true),
ch(c) {
length = 1;
}
@ -403,8 +419,10 @@ struct nrex_node_range : public nrex_node {
nrex_char start;
nrex_char end;
nrex_node_range(nrex_char s, nrex_char e)
: nrex_node(true), start(s), end(e) {
nrex_node_range(nrex_char s, nrex_char e) :
nrex_node(true),
start(s),
end(e) {
length = 1;
}
@ -474,8 +492,9 @@ static nrex_class_type nrex_parse_class(const nrex_char **pos) {
struct nrex_node_class : public nrex_node {
nrex_class_type type;
nrex_node_class(nrex_class_type t)
: nrex_node(true), type(t) {
nrex_node_class(nrex_class_type t) :
nrex_node(true),
type(t) {
length = 1;
}
@ -614,8 +633,9 @@ static bool nrex_is_shorthand(nrex_char repr) {
struct nrex_node_shorthand : public nrex_node {
nrex_char repr;
nrex_node_shorthand(nrex_char c)
: nrex_node(true), repr(c) {
nrex_node_shorthand(nrex_char c) :
nrex_node(true),
repr(c) {
length = 1;
}
@ -676,8 +696,12 @@ struct nrex_node_quantifier : public nrex_node {
bool greedy;
nrex_node *child;
nrex_node_quantifier(int min, int max)
: nrex_node(), min(min), max(max), greedy(true), child(NULL) {
nrex_node_quantifier(int min, int max) :
nrex_node(),
min(min),
max(max),
greedy(true),
child(NULL) {
}
virtual ~nrex_node_quantifier() {
@ -747,8 +771,9 @@ struct nrex_node_quantifier : public nrex_node {
struct nrex_node_anchor : public nrex_node {
bool end;
nrex_node_anchor(bool end)
: nrex_node(), end(end) {
nrex_node_anchor(bool end) :
nrex_node(),
end(end) {
length = 0;
}
@ -765,8 +790,9 @@ struct nrex_node_anchor : public nrex_node {
struct nrex_node_word_boundary : public nrex_node {
bool inverse;
nrex_node_word_boundary(bool inverse)
: nrex_node(), inverse(inverse) {
nrex_node_word_boundary(bool inverse) :
nrex_node(),
inverse(inverse) {
length = 0;
}
@ -795,8 +821,9 @@ struct nrex_node_word_boundary : public nrex_node {
struct nrex_node_backreference : public nrex_node {
int ref;
nrex_node_backreference(int ref)
: nrex_node(true), ref(ref) {
nrex_node_backreference(int ref) :
nrex_node(true),
ref(ref) {
length = -1;
}
@ -823,12 +850,16 @@ bool nrex_has_lookbehind(nrex_array<nrex_node_group *> &stack) {
return false;
}
nrex::nrex()
: _capturing(0), _lookahead_depth(0), _root(NULL) {
nrex::nrex() :
_capturing(0),
_lookahead_depth(0),
_root(NULL) {
}
nrex::nrex(const nrex_char *pattern, int captures)
: _capturing(0), _lookahead_depth(0), _root(NULL) {
nrex::nrex(const nrex_char *pattern, int captures) :
_capturing(0),
_lookahead_depth(0),
_root(NULL) {
compile(pattern, captures);
}

View File

@ -45,7 +45,6 @@
#include "scene/animation/animation_cache.h"
#include "scene/resources/animation.h"
#include "scene_tree_editor.h"
#include "scene_tree_editor.h"
class AnimationKeyEdit;
class AnimationCurveEdit;

View File

@ -114,8 +114,7 @@ class CreateDialog : public ConfirmationDialog {
void update_tree();
void _create();
void _cancel();
void add_type(const String &p_type, HashMap<String, TreeItem *> &p_types, TreeItem
*p_root);
void add_type(const String &p_type, HashMap<String, TreeItem *> &p_types, TreeItem *p_root);
String base;
void _text_changed(String p_text);

View File

@ -30,7 +30,6 @@
#include "editor_file_server.h"
#include "../editor_settings.h"
#include "io/marshalls.h"
#include "io/marshalls.h"
//#define DEBUG_PRINT(m_p) print_line(m_p)
#define DEBUG_TIME(m_what) printf("MS: %s - %lli\n", m_what, OS::get_singleton()->get_ticks_usec());

View File

@ -109,10 +109,12 @@ private:
String path;
bool is_file;
FileOrFolder()
: path(""), is_file(false) {}
FileOrFolder(const String &p_path, bool p_is_file)
: path(p_path), is_file(p_is_file) {}
FileOrFolder() :
path(""),
is_file(false) {}
FileOrFolder(const String &p_path, bool p_is_file) :
path(p_path),
is_file(p_is_file) {}
};
FileOrFolder to_rename;
Vector<FileOrFolder> to_move;

View File

@ -2167,9 +2167,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
}
}
/*********************************************************************************/
/*************************************** SCENE ***********************************/
/*********************************************************************************/
/*********************************************************************************/
/*************************************** SCENE ***********************************/
/*********************************************************************************/
#define DEBUG_ANIMATION

View File

@ -127,7 +127,7 @@ void BakedLightEditor::_notification(int p_option) {
baker->update_octree_images(octree_texture, light_texture);
baker->update_octree_sampler(octree_sampler);
// print_line("sampler size: "+itos(octree_sampler.size()*4));
//print_line("sampler size: "+itos(octree_sampler.size()*4));
#if 1
//debug

View File

@ -66,8 +66,8 @@ class SnapDialog : public ConfirmationDialog {
SpinBox *rotation_step;
public:
SnapDialog()
: ConfirmationDialog() {
SnapDialog() :
ConfirmationDialog() {
const int SPIN_BOX_GRID_RANGE = 256;
const int SPIN_BOX_ROTATION_RANGE = 360;
Label *label;

View File

@ -392,7 +392,7 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) {
button_edit->set_toggle_mode(true);
button_edit->set_tooltip("Edit existing polygon:\nLMB: Move Point.\nCtrl+LMB: Split Segment.\nRMB: Erase Point.");
//add_constant_override("separation",0);
//add_constant_override("separation",0);
#if 0
options = memnew( MenuButton );

View File

@ -512,7 +512,7 @@ CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) {
button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT));
button_edit->set_toggle_mode(true);
//add_constant_override("separation",0);
//add_constant_override("separation",0);
#if 0
options = memnew( MenuButton );

View File

@ -427,7 +427,7 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) {
add_child(create_poly);
create_poly->get_ok()->set_text(TTR("Create"));
//add_constant_override("separation",0);
//add_constant_override("separation",0);
#if 0
options = memnew( MenuButton );

View File

@ -470,7 +470,7 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
add_child(create_nav);
create_nav->get_ok()->set_text(TTR("Create"));
//add_constant_override("separation",0);
//add_constant_override("separation",0);
#if 0
options = memnew( MenuButton );

View File

@ -775,7 +775,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
add_child(button_uv);
button_uv->connect("pressed", this, "_menu_option", varray(MODE_EDIT_UV));
//add_constant_override("separation",0);
//add_constant_override("separation",0);
#if 0
options = memnew( MenuButton );

View File

@ -211,7 +211,7 @@ struct _PaletteEntry {
return name < p_rhs.name;
}
};
}
} // namespace
void TileMapEditor::_update_palette() {

View File

@ -3496,8 +3496,8 @@ void PropertyEditor::_item_edited() {
_edit_set(name, item->get_text(1));
}
} break;
// math types
// math types
case Variant::VECTOR3: {
} break;

View File

@ -117,7 +117,6 @@ static String unescape_cmdline(const String &p_str) {
}
//#define DEBUG_INIT
#ifdef DEBUG_INIT
#define MAIN_PRINT(m_txt) print_line(m_txt)
#else

View File

@ -100,4 +100,4 @@ MainLoop *test() {
return NULL;
}
}
} // namespace TestContainers

View File

@ -198,4 +198,4 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
}
} // namespace TestMultiMesh

View File

@ -1044,7 +1044,7 @@ MainLoop *test(TestType p_test) {
return NULL;
}
}
} // namespace TestGDScript
#else
@ -1054,6 +1054,6 @@ MainLoop *test(TestType p_test) {
return NULL;
}
}
} // namespace TestGDScript
#endif

View File

@ -41,6 +41,6 @@ enum TestType {
};
MainLoop *test(TestType p_type);
}
} // namespace TestGDScript
#endif // TEST_GDSCRIPT_H

View File

@ -374,6 +374,6 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
}
} // namespace TestGUI
#endif

View File

@ -67,4 +67,4 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
}
} // namespace TestImage

View File

@ -177,7 +177,7 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
}
} // namespace TestIO
#else
@ -187,5 +187,5 @@ MainLoop *test() {
return NULL;
}
}
} // namespace TestIO
#endif

View File

@ -358,4 +358,4 @@ MainLoop *test() {
#endif
return NULL;
}
}
} // namespace TestMath

View File

@ -447,4 +447,4 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
}
} // namespace TestMisc

View File

@ -110,4 +110,4 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
}
} // namespace TestParticles

View File

@ -615,4 +615,4 @@ MainLoop *test() {
return memnew(TestPhysicsMainLoop);
}
}
} // namespace TestPhysics

View File

@ -417,4 +417,4 @@ MainLoop *test() {
return memnew(TestPhysics2DMainLoop);
}
}
} // namespace TestPhysics2D

View File

@ -49,6 +49,6 @@ void test() {
PyRun_SimpleString("b.mooch();\n");
PyRun_SimpleString("b.meis();\n");
}
}
} // namespace TestPython
#endif

View File

@ -240,4 +240,4 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
}
} // namespace TestRender

View File

@ -339,4 +339,4 @@ MainLoop *test() {
return NULL;
}
}
} // namespace TestShaderLang

View File

@ -81,4 +81,4 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
}
} // namespace TestSound

View File

@ -930,4 +930,4 @@ MainLoop *test() {
return NULL;
}
}
} // namespace TestString

View File

@ -683,8 +683,8 @@ float EventStreamPlaybackChibi::get_last_note_time(int p_channel) const {
return v;
}
EventStreamPlaybackChibi::EventStreamPlaybackChibi(Ref<EventStreamChibi> p_stream)
: mixer(_get_mixer()) {
EventStreamPlaybackChibi::EventStreamPlaybackChibi(Ref<EventStreamChibi> p_stream) :
mixer(_get_mixer()) {
stream = p_stream;
player = memnew(CPPlayer(&mixer, &p_stream->song));

View File

@ -771,7 +771,7 @@ int GDCompiler::_parse_expression(CodeGen &codegen, const GDParser::Node *p_expr
ERR_FAIL_COND_V(on->arguments.size() != 2, -1);
if (on->arguments[0]->type == GDParser::Node::TYPE_OPERATOR && (static_cast<GDParser::OperatorNode *>(on->arguments[0])->op == GDParser::OperatorNode::OP_INDEX || static_cast<GDParser::OperatorNode *>(on->arguments[0])->op == GDParser::OperatorNode::OP_INDEX_NAMED)) {
//SET (chained) MODE!!
//SET (chained) MODE!!
#ifdef DEBUG_ENABLED
if (static_cast<GDParser::OperatorNode *>(on->arguments[0])->op == GDParser::OperatorNode::OP_INDEX_NAMED) {

View File

@ -148,7 +148,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
#ifdef DEBUG_ENABLED
//GDScriptLanguage::get_singleton()->calls++;
//GDScriptLanguage::get_singleton()->calls++;
#endif
@ -1265,8 +1265,8 @@ void GDFunction::clear() {
}
#endif
GDFunction::GDFunction()
: function_list(this) {
GDFunction::GDFunction() :
function_list(this) {
_stack_size = 0;
_call_size = 0;

View File

@ -795,8 +795,8 @@ void GDScript::get_script_signal_list(List<MethodInfo> *r_signals) const {
#endif
}
GDScript::GDScript()
: script_list(this) {
GDScript::GDScript() :
script_list(this) {
_static_ref = this;
valid = false;

View File

@ -1026,7 +1026,7 @@ void GDTokenizerText::advance(int p_amount) {
_advance();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
#define BYTECODE_VERSION 10

View File

@ -241,11 +241,11 @@ ResourceFormatPVR::ResourceFormatPVR() {
Image::_image_compress_pvrtc2_func = _compress_pvrtc4;
}
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
//PVRTC decompressor, Based on PVRTC decompressor by IMGTEC.
//PVRTC decompressor, Based on PVRTC decompressor by IMGTEC.
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
#define PT_INDEX 2
#define BLK_Y_SIZE 4

View File

@ -661,7 +661,7 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
}
}
//print_line("no theora: "+itos(no_theora)+" theora eos: "+itos(theora_eos)+" frame done "+itos(frame_done));
//print_line("no theora: "+itos(no_theora)+" theora eos: "+itos(theora_eos)+" frame done "+itos(frame_done));
#ifdef THEORA_USE_THREAD_STREAMING
if (file && thread_eof && no_theora && theora_eos && ring_buffer.data_left() == 0) {

View File

@ -106,7 +106,7 @@ int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) {
break;
}
//printf("to mix %i - mix me %i bytes\n",to_mix,to_mix*stream_channels*sizeof(int16_t));
//printf("to mix %i - mix me %i bytes\n",to_mix,to_mix*stream_channels*sizeof(int16_t));
#ifdef BIG_ENDIAN_ENABLED
long ret = ov_read(&vf, (char *)p_bufer, todo * stream_channels * sizeof(int16_t), 1, 2, 1, &current_section);

View File

@ -591,7 +591,7 @@ static void engine_handle_cmd(struct android_app *app, int32_t cmd) {
engine_draw_frame(engine);
engine->animating = 1;
/*
/*
EGLint w,h;
eglQuerySurface(engine->display, engine->surface, EGL_WIDTH, &w);
eglQuerySurface(engine->display, engine->surface, EGL_HEIGHT, &h);

View File

@ -29,6 +29,6 @@
/*************************************************************************/
#include "haiku_application.h"
HaikuApplication::HaikuApplication()
: BApplication("application/x-vnd.godot") {
HaikuApplication::HaikuApplication() :
BApplication("application/x-vnd.godot") {
}

View File

@ -34,8 +34,8 @@
#include "main/main.h"
#include "os/keyboard.h"
HaikuDirectWindow::HaikuDirectWindow(BRect p_frame)
: BDirectWindow(p_frame, "Godot", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) {
HaikuDirectWindow::HaikuDirectWindow(BRect p_frame) :
BDirectWindow(p_frame, "Godot", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) {
last_mouse_pos_valid = false;
last_buttons_state = 0;
last_button_mask = 0;

View File

@ -30,8 +30,8 @@
#include "haiku_gl_view.h"
#include "main/main.h"
HaikuGLView::HaikuGLView(BRect frame, uint32 type)
: BGLView(frame, "GodotGLView", B_FOLLOW_ALL_SIDES, 0, type) {
HaikuGLView::HaikuGLView(BRect frame, uint32 type) :
BGLView(frame, "GodotGLView", B_FOLLOW_ALL_SIDES, 0, type) {
}
void HaikuGLView::AttachedToWindow(void) {

View File

@ -144,7 +144,7 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
input = memnew(InputDefault);
/*
/*
#ifdef IOS_SCORELOOP_ENABLED
scoreloop = memnew(ScoreloopIOS);
Globals::get_singleton()->add_singleton(Globals::Singleton("Scoreloop", scoreloop));

View File

@ -1502,7 +1502,7 @@ void RasterizerIPhone::begin_frame() {
glClearColor(0, 0, 1, 1);
glClear(GL_COLOR_BUFFER_BIT);
/* nehe ?*/
/* nehe ?*/
#if 0
glViewport(0,0,window_size.width,window_size.height); // Reset The Current Viewport
@ -2210,8 +2210,14 @@ void RasterizerIPhone::canvas_draw_line(const Point2 &p_from, const Point2 &p_to
};
float colors[] = {
p_color.r, p_color.g, p_color.b, p_color.a,
p_color.r, p_color.g, p_color.b, p_color.a,
p_color.r,
p_color.g,
p_color.b,
p_color.a,
p_color.r,
p_color.g,
p_color.b,
p_color.a,
};
glLineWidth(p_width);
_draw_primitive(2, verts, 0, colors, 0);

View File

@ -146,8 +146,8 @@ class RasterizerIPhone : public Rasterizer {
Vector3 scale;
Vector3 uv_scale;
Geometry()
: scale(1, 1, 1) {
Geometry() :
scale(1, 1, 1) {
has_alpha = false;
material_owned = false;
}

View File

@ -262,7 +262,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_CAPS_LOCK:
return KEY_CAPSLOCK;
/*
/*
case DOM_VK_KANA: return KEY_UNKNOWN;
case DOM_VK_HANGUL: return KEY_UNKNOWN;
case DOM_VK_EISU: return KEY_UNKNOWN;
@ -274,7 +274,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_ESCAPE:
return KEY_ESCAPE;
/*
/*
case DOM_VK_CONVERT: return KEY_UNKNOWN;
case DOM_VK_NONCONVERT: return KEY_UNKNOWN;
case DOM_VK_ACCEPT: return KEY_UNKNOWN;
@ -292,7 +292,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_DOWN:
return KEY_DOWN;
//case DOM_VK_SELECT: return KEY_UNKNOWN;
//case DOM_VK_SELECT: return KEY_UNKNOWN;
case DOM_VK_PRINTSCREEN: // this is the usual printScreen key
case DOM_VK_PRINT: // maybe for alt+printScreen or physical printers?
@ -320,7 +320,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_DIVIDE:
return KEY_KP_DIVIDE;
/*
/*
case DOM_VK_F17: return KEY_UNKNOWN;
case DOM_VK_F18: return KEY_UNKNOWN;
case DOM_VK_F19: return KEY_UNKNOWN;
@ -335,7 +335,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_SCROLL_LOCK:
return KEY_SCROLLLOCK;
/*
/*
case DOM_VK_WIN_OEM_FJ_JISHO: return KEY_UNKNOWN;
case DOM_VK_WIN_OEM_FJ_MASSHOU: return KEY_UNKNOWN;
case DOM_VK_WIN_OEM_FJ_TOUROKU: return KEY_UNKNOWN;
@ -375,7 +375,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_QUOTE:
return KEY_APOSTROPHE;
// rest is OEM/unusual
// rest is OEM/unusual
default: return KEY_UNKNOWN;
};

View File

@ -60,8 +60,8 @@ class symbol {
static const int max_name_len = 1024;
public:
symbol(HANDLE process, DWORD64 address)
: sym((sym_type *)::operator new(sizeof(*sym) + max_name_len)) {
symbol(HANDLE process, DWORD64 address) :
sym((sym_type *)::operator new(sizeof(*sym) + max_name_len)) {
memset(sym, '\0', sizeof(*sym) + max_name_len);
sym->SizeOfStruct = sizeof(*sym);
sym->MaxNameLength = max_name_len;
@ -84,8 +84,8 @@ class get_mod_info {
HANDLE process;
public:
get_mod_info(HANDLE h)
: process(h) {}
get_mod_info(HANDLE h) :
process(h) {}
module_data operator()(HMODULE module) {
module_data ret;

View File

@ -78,15 +78,15 @@ public:
return 0;
}
App::App()
: mWindowClosed(false),
mWindowVisible(true),
mWindowWidth(0),
mWindowHeight(0),
mEglDisplay(EGL_NO_DISPLAY),
mEglContext(EGL_NO_CONTEXT),
mEglSurface(EGL_NO_SURFACE),
number_of_contacts(0) {
App::App() :
mWindowClosed(false),
mWindowVisible(true),
mWindowWidth(0),
mWindowHeight(0),
mEglDisplay(EGL_NO_DISPLAY),
mEglContext(EGL_NO_CONTEXT),
mEglSurface(EGL_NO_SURFACE),
number_of_contacts(0) {
}
// The first method called when the IFrameworkView is being created.

View File

@ -48,8 +48,8 @@ class AudioDriverWinRT : public AudioDriverSW {
struct XAudio2DriverVoiceCallback : public IXAudio2VoiceCallback {
HANDLE buffer_end_event;
XAudio2DriverVoiceCallback()
: buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {}
XAudio2DriverVoiceCallback() :
buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {}
void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext) { /*print_line("buffer ended");*/
SetEvent(buffer_end_event);
}

View File

@ -182,19 +182,28 @@ ASN1_SEQUENCE(SPCIndirectDataContent) = {
} ASN1_SEQUENCE_END(SPCIndirectDataContent)
IMPLEMENT_ASN1_FUNCTIONS(SPCAttributeTypeAndOptionalValue) ASN1_SEQUENCE(SPCAttributeTypeAndOptionalValue) = {
ASN1_SIMPLE(SPCAttributeTypeAndOptionalValue, type, ASN1_OBJECT), ASN1_OPT(SPCAttributeTypeAndOptionalValue, value, ASN1_ANY),
ASN1_SIMPLE(SPCAttributeTypeAndOptionalValue, type, ASN1_OBJECT),
ASN1_OPT(SPCAttributeTypeAndOptionalValue, value, ASN1_ANY),
} ASN1_SEQUENCE_END(SPCAttributeTypeAndOptionalValue)
IMPLEMENT_ASN1_FUNCTIONS(SPCInfoValue) ASN1_SEQUENCE(SPCInfoValue) = {
ASN1_SIMPLE(SPCInfoValue, i1, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, s1, ASN1_OCTET_STRING), ASN1_SIMPLE(SPCInfoValue, i2, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, i3, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, i4, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, i5, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, i6, ASN1_INTEGER),
ASN1_SIMPLE(SPCInfoValue, i1, ASN1_INTEGER),
ASN1_SIMPLE(SPCInfoValue, s1, ASN1_OCTET_STRING),
ASN1_SIMPLE(SPCInfoValue, i2, ASN1_INTEGER),
ASN1_SIMPLE(SPCInfoValue, i3, ASN1_INTEGER),
ASN1_SIMPLE(SPCInfoValue, i4, ASN1_INTEGER),
ASN1_SIMPLE(SPCInfoValue, i5, ASN1_INTEGER),
ASN1_SIMPLE(SPCInfoValue, i6, ASN1_INTEGER),
} ASN1_SEQUENCE_END(SPCInfoValue)
IMPLEMENT_ASN1_FUNCTIONS(DigestInfo) ASN1_SEQUENCE(DigestInfo) = {
ASN1_SIMPLE(DigestInfo, digestAlgorithm, X509_ALGOR), ASN1_SIMPLE(DigestInfo, digest, ASN1_OCTET_STRING),
ASN1_SIMPLE(DigestInfo, digestAlgorithm, X509_ALGOR),
ASN1_SIMPLE(DigestInfo, digest, ASN1_OCTET_STRING),
} ASN1_SEQUENCE_END(DigestInfo)
ASN1_SEQUENCE(SPCSpOpusInfo) = {
ASN1_OPT(SPCSpOpusInfo, programName, ASN1_ANY), ASN1_OPT(SPCSpOpusInfo, moreInfo, ASN1_ANY),
ASN1_OPT(SPCSpOpusInfo, programName, ASN1_ANY),
ASN1_OPT(SPCSpOpusInfo, moreInfo, ASN1_ANY),
} ASN1_SEQUENCE_END(SPCSpOpusInfo) IMPLEMENT_ASN1_FUNCTIONS(SPCSpOpusInfo)
ASN1_SEQUENCE(SPCStatementType) = {
@ -1095,7 +1104,7 @@ AppxPackager::AppxPackager() {}
AppxPackager::~AppxPackager() {}
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
#ifdef OPENSSL_ENABLED
Error AppxPackager::openssl_error(unsigned long p_err) {
@ -1115,8 +1124,22 @@ void AppxPackager::MakeSPCInfoValue(asn1::SPCInfoValue &info) {
// I have no idea what these numbers mean.
static uint8_t s1Magic[] = {
0x4B, 0xDF, 0xC5, 0x0A, 0x07, 0xCE, 0xE2, 0x4D,
0xB7, 0x6E, 0x23, 0xC8, 0x39, 0xA0, 0x9F, 0xD1,
0x4B,
0xDF,
0xC5,
0x0A,
0x07,
0xCE,
0xE2,
0x4D,
0xB7,
0x6E,
0x23,
0xC8,
0x39,
0xA0,
0x9F,
0xD1,
};
ASN1_INTEGER_set(info.i1, 0x01010000);
ASN1_OCTET_STRING_set(info.s1, s1Magic, sizeof(s1Magic));

View File

@ -108,7 +108,8 @@ Error ContextEGL::initialize() {
EGL_NONE,*/
// These are the default display attributes, used to request ANGLE's D3D11 renderer.
// eglInitialize will only succeed with these attributes if the hardware supports D3D11 Feature Level 10_0+.
EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
EGL_PLATFORM_ANGLE_TYPE_ANGLE,
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
// EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization that can have large performance benefits on mobile devices.
// Its syntax is subject to change, though. Please update your Visual Studio templates if you experience compilation issues with it.
@ -117,7 +118,8 @@ Error ContextEGL::initialize() {
// EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that enables ANGLE to automatically call
// the IDXGIDevice3::Trim method on behalf of the application when it gets suspended.
// Calling IDXGIDevice3::Trim when an application is suspended is a Windows Store application certification requirement.
EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE,
EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE,
EGL_TRUE,
EGL_NONE,
};
@ -190,10 +192,10 @@ void ContextEGL::cleanup() {
}
};
ContextEGL::ContextEGL(CoreWindow ^ p_window)
: mEglDisplay(EGL_NO_DISPLAY),
mEglContext(EGL_NO_CONTEXT),
mEglSurface(EGL_NO_SURFACE) {
ContextEGL::ContextEGL(CoreWindow ^ p_window) :
mEglDisplay(EGL_NO_DISPLAY),
mEglContext(EGL_NO_CONTEXT),
mEglSurface(EGL_NO_SURFACE) {
window = p_window;
};

View File

@ -53,7 +53,7 @@ uint32_t JoystickWinrt::process_controllers(uint32_t p_last_id) {
case ControllerType::GAMEPAD_CONTROLLER: {
GamepadReading reading = ((Gamepad ^)joy.controller_reference)->GetCurrentReading();
GamepadReading reading = ((Gamepad ^) joy.controller_reference)->GetCurrentReading();
int button_mask = (int)GamepadButtons::Menu;
for (int j = 0; j < 14; j++) {
@ -162,7 +162,7 @@ void JoystickWinrt::joypad_vibration_start(int p_device, float p_weak_magnitude,
GamepadVibration vibration;
vibration.LeftMotor = p_strong_magnitude;
vibration.RightMotor = p_weak_magnitude;
((Gamepad ^)joy.controller_reference)->Vibration = vibration;
((Gamepad ^) joy.controller_reference)->Vibration = vibration;
joy.ff_timestamp = p_timestamp;
joy.ff_end_timestamp = p_duration == 0 ? 0 : p_timestamp + (uint64_t)(p_duration * 1000000.0);
@ -176,7 +176,7 @@ void JoystickWinrt::joypad_vibration_stop(int p_device, uint64_t p_timestamp) {
GamepadVibration vibration;
vibration.LeftMotor = 0.0;
vibration.RightMotor = 0.0;
((Gamepad ^)joy.controller_reference)->Vibration = vibration;
((Gamepad ^) joy.controller_reference)->Vibration = vibration;
joy.ff_timestamp = p_timestamp;
joy.vibrating = false;

View File

@ -202,8 +202,8 @@ bool ContextGL_X11::is_using_vsync() const {
return use_vsync;
}
ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, bool p_opengl_3_context)
: x11_window(p_x11_window) {
ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, bool p_opengl_3_context) :
x11_window(p_x11_window) {
default_video_mode = p_default_video_mode;
x11_display = p_x11_display;

View File

@ -537,9 +537,9 @@ void OS_X11::finalize() {
spatial_sound_2d_server->finish();
memdelete(spatial_sound_2d_server);
//if (debugger_connection_console) {
// memdelete(debugger_connection_console);
//}
//if (debugger_connection_console) {
// memdelete(debugger_connection_console);
//}
#ifdef JOYDEV_ENABLED
memdelete(joystick);
@ -1384,8 +1384,8 @@ void OS_X11::process_xevents() {
switch (event_data->evtype) {
case XI_TouchBegin: // Fall-through
// Disabled hand-in-hand with the grabbing
//XIAllowTouchEvents(x11_display, event_data->deviceid, event_data->detail, x11_window, XIAcceptTouch);
// Disabled hand-in-hand with the grabbing
//XIAllowTouchEvents(x11_display, event_data->deviceid, event_data->detail, x11_window, XIAcceptTouch);
case XI_TouchEnd: {

View File

@ -30,7 +30,6 @@
#include "animated_sprite.h"
#include "os/os.h"
#include "scene/scene_string_names.h"
#include "scene/scene_string_names.h"
////////////////////////////

View File

@ -643,8 +643,8 @@ void Area2D::_bind_methods() {
ADD_PROPERTYNO(PropertyInfo(Variant::INT, "collision/mask", PROPERTY_HINT_ALL_FLAGS), _SCS("set_collision_mask"), _SCS("get_collision_mask"));
}
Area2D::Area2D()
: CollisionObject2D(Physics2DServer::get_singleton()->area_create(), true) {
Area2D::Area2D() :
CollisionObject2D(Physics2DServer::get_singleton()->area_create(), true) {
space_override = SPACE_OVERRIDE_DISABLED;
set_gravity(98);

View File

@ -1086,8 +1086,8 @@ Rect2 CanvasItem::get_item_and_children_rect() const {
return rect;
}
CanvasItem::CanvasItem()
: xform_change(this) {
CanvasItem::CanvasItem() :
xform_change(this) {
canvas_item = VisualServer::get_singleton()->canvas_item_create();
hidden = false;

View File

@ -158,8 +158,8 @@ bool PhysicsBody2D::get_layer_mask_bit(int p_bit) const {
return get_layer_mask() & (1 << p_bit);
}
PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode)
: CollisionObject2D(Physics2DServer::get_singleton()->body_create(p_mode), false) {
PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode) :
CollisionObject2D(Physics2DServer::get_singleton()->body_create(p_mode), false) {
mask = 1;
collision_mask = 1;
@ -275,8 +275,8 @@ void StaticBody2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_bounce"), _SCS("get_bounce"));
}
StaticBody2D::StaticBody2D()
: PhysicsBody2D(Physics2DServer::BODY_MODE_STATIC) {
StaticBody2D::StaticBody2D() :
PhysicsBody2D(Physics2DServer::BODY_MODE_STATIC) {
constant_angular_velocity = 0;
bounce = 0;
@ -971,8 +971,8 @@ void RigidBody2D::_bind_methods() {
BIND_CONSTANT(CCD_MODE_CAST_SHAPE);
}
RigidBody2D::RigidBody2D()
: PhysicsBody2D(Physics2DServer::BODY_MODE_RIGID) {
RigidBody2D::RigidBody2D() :
PhysicsBody2D(Physics2DServer::BODY_MODE_RIGID) {
mode = MODE_RIGID;
@ -1385,8 +1385,8 @@ void KinematicBody2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), _SCS("set_collision_margin"), _SCS("get_collision_margin"));
}
KinematicBody2D::KinematicBody2D()
: PhysicsBody2D(Physics2DServer::BODY_MODE_KINEMATIC) {
KinematicBody2D::KinematicBody2D() :
PhysicsBody2D(Physics2DServer::BODY_MODE_KINEMATIC) {
colliding = false;
collider = 0;

View File

@ -29,7 +29,6 @@
/*************************************************************************/
#include "sample_player_2d.h"
#include "servers/audio_server.h"
#include "servers/audio_server.h"
#include "servers/spatial_sound_server.h"

View File

@ -270,7 +270,7 @@ struct _BodyParams {
return p_rhs.one_way_direction == one_way_direction && p_rhs.one_way_max_depth == one_way_max_depth;
}
};
}
} // namespace
void TileMap::_update_dirty_quadrants() {

View File

@ -136,8 +136,8 @@ private:
navpoly_ids = q.navpoly_ids;
occluder_instances = q.occluder_instances;
}
Quadrant(const Quadrant &q)
: dirty_list(this) {
Quadrant(const Quadrant &q) :
dirty_list(this) {
pos = q.pos;
canvas_items = q.canvas_items;
bodies = q.bodies;
@ -145,8 +145,8 @@ private:
occluder_instances = q.occluder_instances;
navpoly_ids = q.navpoly_ids;
}
Quadrant()
: dirty_list(this) {}
Quadrant() :
dirty_list(this) {}
};
Map<PosKey, Quadrant> quadrant_map;

View File

@ -34,7 +34,6 @@
#include "scene/2d/physics_body_2d.h"
#include "scene/animation/animation_player.h"
#include "scene/scene_string_names.h"
#include "scene/scene_string_names.h"
void VisibilityNotifier2D::_enter_viewport(Viewport *p_viewport) {

View File

@ -639,8 +639,8 @@ void Area::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision/mask", PROPERTY_HINT_ALL_FLAGS), _SCS("set_collision_mask"), _SCS("get_collision_mask"));
}
Area::Area()
: CollisionObject(PhysicsServer::get_singleton()->area_create(), true) {
Area::Area() :
CollisionObject(PhysicsServer::get_singleton()->area_create(), true) {
space_override = SPACE_OVERRIDE_DISABLED;
set_gravity(9.8);

View File

@ -598,8 +598,8 @@ void DirectionalLight::_bind_methods() {
BIND_CONSTANT(SHADOW_PARAM_PSSM_ZOFFSET_SCALE);
}
DirectionalLight::DirectionalLight()
: Light(VisualServer::LIGHT_DIRECTIONAL) {
DirectionalLight::DirectionalLight() :
Light(VisualServer::LIGHT_DIRECTIONAL) {
shadow_mode = SHADOW_ORTHOGONAL;
shadow_param[SHADOW_PARAM_MAX_DISTANCE] = 0;

View File

@ -192,8 +192,8 @@ protected:
static void _bind_methods();
public:
OmniLight()
: Light(VisualServer::LIGHT_OMNI) { set_parameter(PARAM_SHADOW_Z_OFFSET, 0.001); }
OmniLight() :
Light(VisualServer::LIGHT_OMNI) { set_parameter(PARAM_SHADOW_Z_OFFSET, 0.001); }
};
class SpotLight : public Light {
@ -204,8 +204,8 @@ protected:
static void _bind_methods();
public:
SpotLight()
: Light(VisualServer::LIGHT_SPOT) {}
SpotLight() :
Light(VisualServer::LIGHT_SPOT) {}
};
#endif

View File

@ -163,8 +163,8 @@ void PhysicsBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision/mask", PROPERTY_HINT_ALL_FLAGS), _SCS("set_collision_mask"), _SCS("get_collision_mask"));
}
PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode)
: CollisionObject(PhysicsServer::get_singleton()->body_create(p_mode), false) {
PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode) :
CollisionObject(PhysicsServer::get_singleton()->body_create(p_mode), false) {
layer_mask = 1;
collision_mask = 1;
@ -238,8 +238,8 @@ void StaticBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "constant_angular_velocity"), _SCS("set_constant_angular_velocity"), _SCS("get_constant_angular_velocity"));
}
StaticBody::StaticBody()
: PhysicsBody(PhysicsServer::BODY_MODE_STATIC) {
StaticBody::StaticBody() :
PhysicsBody(PhysicsServer::BODY_MODE_STATIC) {
bounce = 0;
friction = 1;
@ -871,8 +871,8 @@ void RigidBody::_bind_methods() {
BIND_CONSTANT(MODE_CHARACTER);
}
RigidBody::RigidBody()
: PhysicsBody(PhysicsServer::BODY_MODE_RIGID) {
RigidBody::RigidBody() :
PhysicsBody(PhysicsServer::BODY_MODE_RIGID) {
mode = MODE_RIGID;
@ -1283,8 +1283,8 @@ void KinematicBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), _SCS("set_collision_margin"), _SCS("get_collision_margin"));
}
KinematicBody::KinematicBody()
: PhysicsBody(PhysicsServer::BODY_MODE_KINEMATIC) {
KinematicBody::KinematicBody() :
PhysicsBody(PhysicsServer::BODY_MODE_KINEMATIC) {
collide_static = true;
collide_rigid = true;

View File

@ -788,8 +788,8 @@ void Spatial::_bind_methods() {
ADD_SIGNAL(MethodInfo("visibility_changed"));
}
Spatial::Spatial()
: xform_change(this) {
Spatial::Spatial() :
xform_change(this) {
data.dirty = DIRTY_NONE;
data.children_lock = 0;

View File

@ -597,7 +597,7 @@ Sprite3D::Sprite3D() {
hframes = 1;
}
////////////////////////////////////////
////////////////////////////////////////
#if 0

View File

@ -54,8 +54,8 @@ public:
const Vector3 &inertiaInvA,
const real_t massInvA,
const Vector3 &inertiaInvB,
const real_t massInvB)
: m_linearJointAxis(jointAxis) {
const real_t massInvB) :
m_linearJointAxis(jointAxis) {
m_aJ = world2A.xform(rel_pos1.cross(m_linearJointAxis));
m_bJ = world2B.xform(rel_pos2.cross(-m_linearJointAxis));
m_0MinvJt = inertiaInvA * m_aJ;
@ -573,12 +573,12 @@ void VehicleBody::_resolve_single_bilateral(PhysicsDirectBodyState *s, const Vec
#endif
}
VehicleBody::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirectBodyState *s, PhysicsBody *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse)
: m_s(s),
m_body1(body1),
m_frictionPositionWorld(frictionPosWorld),
m_frictionDirectionWorld(frictionDirectionWorld),
m_maxImpulse(maxImpulse) {
VehicleBody::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirectBodyState *s, PhysicsBody *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse) :
m_s(s),
m_body1(body1),
m_frictionPositionWorld(frictionPosWorld),
m_frictionDirectionWorld(frictionDirectionWorld),
m_maxImpulse(maxImpulse) {
float denom0 = 0;
float denom1 = 0;
@ -947,8 +947,8 @@ void VehicleBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "body/friction", PROPERTY_HINT_RANGE, "0.01,1,0.01"), _SCS("set_friction"), _SCS("get_friction"));
}
VehicleBody::VehicleBody()
: PhysicsBody(PhysicsServer::BODY_MODE_RIGID) {
VehicleBody::VehicleBody() :
PhysicsBody(PhysicsServer::BODY_MODE_RIGID) {
m_pitchControl = 0;
m_currentVehicleSpeedKmHour = real_t(0.);

View File

@ -32,7 +32,6 @@
#include "scene/3d/physics_body.h"
#include "scene/animation/animation_player.h"
#include "scene/scene_string_names.h"
#include "scene/scene_string_names.h"
void VisibilityNotifier::_enter_camera(Camera *p_camera) {

View File

@ -50,7 +50,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return c * t / d + b;
}
};
}; // namespace linear
///////////////////////////////////////////////////////////////////////////
// sine
///////////////////////////////////////////////////////////////////////////
@ -70,7 +70,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace sine
///////////////////////////////////////////////////////////////////////////
// quint
///////////////////////////////////////////////////////////////////////////
@ -92,7 +92,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace quint
///////////////////////////////////////////////////////////////////////////
// quart
///////////////////////////////////////////////////////////////////////////
@ -114,7 +114,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace quart
///////////////////////////////////////////////////////////////////////////
// quad
///////////////////////////////////////////////////////////////////////////
@ -137,7 +137,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace quad
///////////////////////////////////////////////////////////////////////////
// expo
///////////////////////////////////////////////////////////////////////////
@ -163,7 +163,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace expo
///////////////////////////////////////////////////////////////////////////
// elastic
///////////////////////////////////////////////////////////////////////////
@ -205,7 +205,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace elastic
///////////////////////////////////////////////////////////////////////////
// cubic
///////////////////////////////////////////////////////////////////////////
@ -227,7 +227,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace cubic
///////////////////////////////////////////////////////////////////////////
// circ
///////////////////////////////////////////////////////////////////////////
@ -248,7 +248,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace circ
///////////////////////////////////////////////////////////////////////////
// bounce
///////////////////////////////////////////////////////////////////////////
@ -281,7 +281,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace bounce
///////////////////////////////////////////////////////////////////////////
// back
///////////////////////////////////////////////////////////////////////////
@ -307,7 +307,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
};
}; // namespace back
Tween::interpolater Tween::interpolaters[Tween::TRANS_COUNT][Tween::EASE_COUNT] = {
{ &linear::in, &linear::out, &linear::in_out, &linear::out_in },

View File

@ -70,8 +70,8 @@ class HBoxContainer : public BoxContainer {
OBJ_TYPE(HBoxContainer, BoxContainer);
public:
HBoxContainer()
: BoxContainer(false) {}
HBoxContainer() :
BoxContainer(false) {}
};
class MarginContainer;
@ -82,8 +82,8 @@ class VBoxContainer : public BoxContainer {
public:
MarginContainer *add_margin_child(const String &p_label, Control *p_control, bool p_expand = false);
VBoxContainer()
: BoxContainer(true) {}
VBoxContainer() :
BoxContainer(true) {}
};
VARIANT_ENUM_CAST(BoxContainer::AlignMode);

View File

@ -116,16 +116,16 @@ class HButtonArray : public ButtonArray {
OBJ_TYPE(HButtonArray, ButtonArray);
public:
HButtonArray()
: ButtonArray(HORIZONTAL){};
HButtonArray() :
ButtonArray(HORIZONTAL){};
};
class VButtonArray : public ButtonArray {
OBJ_TYPE(VButtonArray, ButtonArray);
public:
VButtonArray()
: ButtonArray(VERTICAL){};
VButtonArray() :
ButtonArray(VERTICAL){};
};
#endif // BUTTON_ARRAY_H

View File

@ -156,6 +156,6 @@ void ButtonGroup::_bind_methods() {
ADD_SIGNAL(MethodInfo("button_selected", PropertyInfo(Variant::OBJECT, "button", PROPERTY_HINT_RESOURCE_TYPE, "BaseButton")));
}
ButtonGroup::ButtonGroup()
: BoxContainer(true) {
ButtonGroup::ButtonGroup() :
BoxContainer(true) {
}

View File

@ -63,8 +63,8 @@ bool CheckBox::is_radio() {
return (parent != 0);
}
CheckBox::CheckBox(const String &p_text)
: Button(p_text) {
CheckBox::CheckBox(const String &p_text) :
Button(p_text) {
set_toggle_mode(true);
set_text_align(ALIGN_LEFT);
}

View File

@ -435,8 +435,8 @@ void ColorPicker::_bind_methods() {
ADD_SIGNAL(MethodInfo("color_changed", PropertyInfo(Variant::COLOR, "color")));
}
ColorPicker::ColorPicker()
: BoxContainer(true) {
ColorPicker::ColorPicker() :
BoxContainer(true) {
updating = true;
edit_alpha = true;

View File

@ -33,7 +33,6 @@
#include "box_container.h"
#include "os/dir_access.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/option_button.h"
#include "scene/gui/tool_button.h"

View File

@ -655,8 +655,7 @@ void LineEdit::_notification(int p_what) {
font->draw_char(ci, Point2(x_ofs, y_ofs + font_ascent), cchar, next, selected ? font_color_selected : font_color);
if (char_ofs == cursor_pos && draw_caret) {
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(
Point2(x_ofs, y_ofs), Size2(1, caret_height)),
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(x_ofs, y_ofs), Size2(1, caret_height)),
cursor_color);
}
@ -665,8 +664,7 @@ void LineEdit::_notification(int p_what) {
}
if (char_ofs == cursor_pos && draw_caret) { //may be at the end
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(
Point2(x_ofs, y_ofs), Size2(1, caret_height)),
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(x_ofs, y_ofs), Size2(1, caret_height)),
cursor_color);
}
} break;

View File

@ -110,8 +110,8 @@ class HScrollBar : public ScrollBar {
OBJ_TYPE(HScrollBar, ScrollBar);
public:
HScrollBar()
: ScrollBar(HORIZONTAL) { set_v_size_flags(0); }
HScrollBar() :
ScrollBar(HORIZONTAL) { set_v_size_flags(0); }
};
class VScrollBar : public ScrollBar {
@ -119,8 +119,8 @@ class VScrollBar : public ScrollBar {
OBJ_TYPE(VScrollBar, ScrollBar);
public:
VScrollBar()
: ScrollBar(VERTICAL) { set_h_size_flags(0); }
VScrollBar() :
ScrollBar(VERTICAL) { set_h_size_flags(0); }
};
#endif

View File

@ -73,8 +73,8 @@ class HSlider : public Slider {
OBJ_TYPE(HSlider, Slider);
public:
HSlider()
: Slider(HORIZONTAL) { set_v_size_flags(0); }
HSlider() :
Slider(HORIZONTAL) { set_v_size_flags(0); }
};
class VSlider : public Slider {
@ -82,8 +82,8 @@ class VSlider : public Slider {
OBJ_TYPE(VSlider, Slider);
public:
VSlider()
: Slider(VERTICAL) { set_h_size_flags(0); }
VSlider() :
Slider(VERTICAL) { set_h_size_flags(0); }
};
#endif // SLIDER_H

View File

@ -87,8 +87,8 @@ class HSplitContainer : public SplitContainer {
OBJ_TYPE(HSplitContainer, SplitContainer);
public:
HSplitContainer()
: SplitContainer(false) { set_default_cursor_shape(CURSOR_HSPLIT); }
HSplitContainer() :
SplitContainer(false) { set_default_cursor_shape(CURSOR_HSPLIT); }
};
class VSplitContainer : public SplitContainer {
@ -96,8 +96,8 @@ class VSplitContainer : public SplitContainer {
OBJ_TYPE(VSplitContainer, SplitContainer);
public:
VSplitContainer()
: SplitContainer(true) { set_default_cursor_shape(CURSOR_VSPLIT); }
VSplitContainer() :
SplitContainer(true) { set_default_cursor_shape(CURSOR_VSPLIT); }
};
#endif // SPLIT_CONTAINER_H

View File

@ -738,6 +738,7 @@ Ref<Mesh> SceneTree::get_debug_contact_mesh() {
Vector3(0, 0, 1)
};
/* clang-format off */
int diamond_faces[8 * 3] = {
0, 2, 4,
0, 3, 4,
@ -748,6 +749,7 @@ Ref<Mesh> SceneTree::get_debug_contact_mesh() {
1, 2, 5,
1, 3, 5,
};
/* clang-format on */
DVector<int> indices;
for (int i = 0; i < 8 * 3; i++)

View File

@ -334,8 +334,8 @@ public:
void set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 p_minsize);
//void change_scene(const String& p_path);
//Node *get_loaded_scene();
//void change_scene(const String& p_path);
//Node *get_loaded_scene();
#ifdef TOOLS_ENABLED
void set_edited_scene_root(Node *p_node);

View File

@ -74,7 +74,6 @@
#include "scene/gui/separator.h"
#include "scene/gui/slider.h"
#include "scene/gui/spin_box.h"
#include "scene/gui/spin_box.h"
#include "scene/gui/split_container.h"
#include "scene/gui/tab_container.h"
#include "scene/gui/tabs.h"
@ -126,7 +125,6 @@
#include "scene/animation/tween.h"
#include "scene/main/resource_preloader.h"
#include "scene/main/scene_main_loop.h"
#include "scene/main/scene_main_loop.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/dynamic_font.h"
@ -256,7 +254,7 @@ void register_scene_types() {
#ifdef TOOLS_ENABLED
//scene first!
//scene first!
#endif

Some files were not shown because too many files have changed in this diff Show More