Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
This commit is contained in:
parent
78e90ac60b
commit
93ab45b6b5
306 changed files with 1889 additions and 1535 deletions
|
@ -127,10 +127,11 @@ public:
|
||||||
set_error(OK);
|
set_error(OK);
|
||||||
};
|
};
|
||||||
|
|
||||||
// static void make_default() {
|
/*
|
||||||
|
static void make_default() {
|
||||||
//FileAccess::create_func = FileAccessBufferedFA<T>::create;
|
FileAccess::create_func = FileAccessBufferedFA<T>::create;
|
||||||
// };
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
virtual uint64_t _get_modified_time(const String& p_file) {
|
virtual uint64_t _get_modified_time(const String& p_file) {
|
||||||
|
|
||||||
|
|
|
@ -1708,8 +1708,10 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant& p_property,
|
||||||
|
|
||||||
for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
|
for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
|
||||||
|
|
||||||
//if (!_check_type(dict[E->get()]))
|
/*
|
||||||
// continue;
|
if (!_check_type(dict[E->get()]))
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
write_variant(E->get());
|
write_variant(E->get());
|
||||||
write_variant(d[E->get()]);
|
write_variant(d[E->get()]);
|
||||||
|
|
|
@ -391,8 +391,10 @@ void ResourceLoader::get_dependencies(const String& p_path, List<String> *p_depe
|
||||||
|
|
||||||
if (!loader[i]->recognize(extension))
|
if (!loader[i]->recognize(extension))
|
||||||
continue;
|
continue;
|
||||||
//if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
|
/*
|
||||||
// continue;
|
if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
loader[i]->get_dependencies(remapped_path,p_dependencies,p_add_types);
|
loader[i]->get_dependencies(remapped_path,p_dependencies,p_add_types);
|
||||||
|
|
||||||
|
@ -416,8 +418,10 @@ Error ResourceLoader::rename_dependencies(const String &p_path,const Map<String,
|
||||||
|
|
||||||
if (!loader[i]->recognize(extension))
|
if (!loader[i]->recognize(extension))
|
||||||
continue;
|
continue;
|
||||||
//if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
|
/*
|
||||||
// continue;
|
if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
return loader[i]->rename_dependencies(p_path,p_map);
|
return loader[i]->rename_dependencies(p_path,p_map);
|
||||||
|
|
||||||
|
|
|
@ -390,8 +390,10 @@ static int _bsp_create_node(const Face3 *p_faces,const Vector<int>& p_indices,Ve
|
||||||
|
|
||||||
const Face3& f=p_faces[ indices[i] ];
|
const Face3& f=p_faces[ indices[i] ];
|
||||||
|
|
||||||
//if (f.get_plane().is_almost_like(divisor_plane))
|
/*
|
||||||
// continue;
|
if (f.get_plane().is_almost_like(divisor_plane))
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
int over_count=0;
|
int over_count=0;
|
||||||
int under_count=0;
|
int under_count=0;
|
||||||
|
|
|
@ -750,9 +750,7 @@ public:
|
||||||
return Vector<Vector3>(); //empty
|
return Vector<Vector3>(); //empty
|
||||||
}
|
}
|
||||||
|
|
||||||
// long count = 0;
|
|
||||||
long previous = polygon.size() - 1;
|
long previous = polygon.size() - 1;
|
||||||
|
|
||||||
Vector<Vector3> clipped;
|
Vector<Vector3> clipped;
|
||||||
|
|
||||||
for (int index = 0; index < polygon.size(); index++) {
|
for (int index = 0; index < polygon.size(); index++) {
|
||||||
|
|
|
@ -130,8 +130,10 @@ private:
|
||||||
|
|
||||||
~Octant() {
|
~Octant() {
|
||||||
|
|
||||||
//for (int i=0;i<8;i++)
|
/*
|
||||||
// memdelete_notnull(children[i]);
|
for (int i=0;i<8;i++)
|
||||||
|
memdelete_notnull(children[i]);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -250,8 +252,10 @@ private:
|
||||||
E->get().eA=p_A->pair_list.push_back(&E->get());
|
E->get().eA=p_A->pair_list.push_back(&E->get());
|
||||||
E->get().eB=p_B->pair_list.push_back(&E->get());
|
E->get().eB=p_B->pair_list.push_back(&E->get());
|
||||||
|
|
||||||
// if (pair_callback)
|
/*
|
||||||
// pair_callback(pair_callback_userdata,p_A->userdata,p_B->userdata);
|
if (pair_callback)
|
||||||
|
pair_callback(pair_callback_userdata,p_A->userdata,p_B->userdata);
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
E->get().refcount++;
|
E->get().refcount++;
|
||||||
|
@ -970,8 +974,10 @@ void Octree<T,use_pairs,AL>::move(OctreeElementID p_id, const Rect3& p_aabb) {
|
||||||
Octant *o=E->get().octant;
|
Octant *o=E->get().octant;
|
||||||
typename List<typename Element::OctantOwner,AL>::Element *N=E->next();
|
typename List<typename Element::OctantOwner,AL>::Element *N=E->next();
|
||||||
|
|
||||||
// if (!use_pairs)
|
/*
|
||||||
// o->elements.erase( E->get().E );
|
if (!use_pairs)
|
||||||
|
o->elements.erase( E->get().E );
|
||||||
|
*/
|
||||||
|
|
||||||
if (use_pairs && e.pairable)
|
if (use_pairs && e.pairable)
|
||||||
o->pairable_elements.erase( E->get().E );
|
o->pairable_elements.erase( E->get().E );
|
||||||
|
|
|
@ -369,8 +369,10 @@ void Object::set(const String& p_name, const Variant& p_value) {
|
||||||
|
|
||||||
_setv(p_name,p_value);
|
_setv(p_name,p_value);
|
||||||
|
|
||||||
//if (!_use_builtin_script())
|
/*
|
||||||
// return;
|
if (!_use_builtin_script())
|
||||||
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
bool success;
|
bool success;
|
||||||
ClassDB::set_property(this,p_name,p_value,success);
|
ClassDB::set_property(this,p_name,p_value,success);
|
||||||
|
@ -410,8 +412,10 @@ void Object::set(const StringName& p_name, const Variant& p_value, bool *r_valid
|
||||||
//try built-in setgetter
|
//try built-in setgetter
|
||||||
{
|
{
|
||||||
if (ClassDB::set_property(this,p_name,p_value,r_valid)) {
|
if (ClassDB::set_property(this,p_name,p_value,r_valid)) {
|
||||||
//if (r_valid)
|
/*
|
||||||
// *r_valid=true;
|
if (r_valid)
|
||||||
|
*r_valid=true;
|
||||||
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -522,11 +522,12 @@ void ResourceCache::clear() {
|
||||||
|
|
||||||
void ResourceCache::reload_externals() {
|
void ResourceCache::reload_externals() {
|
||||||
|
|
||||||
//const String *K=NULL;
|
/*
|
||||||
//while ((K=resources.next(K))) {
|
const String *K=NULL;
|
||||||
// resources[*K]->reload_external_data();
|
while ((K=resources.next(K))) {
|
||||||
// }
|
resources[*K]->reload_external_data();
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ResourceCache::has(const String& p_path) {
|
bool ResourceCache::has(const String& p_path) {
|
||||||
|
|
|
@ -2094,8 +2094,10 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
||||||
p_store_string_func(p_store_string_ud,"{ ");
|
p_store_string_func(p_store_string_ud,"{ ");
|
||||||
for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
|
for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
|
||||||
|
|
||||||
//if (!_check_type(dict[E->get()]))
|
/*
|
||||||
// continue;
|
if (!_check_type(dict[E->get()]))
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
write(E->get(),p_store_string_func,p_store_string_ud,p_encode_res_func,p_encode_res_ud);
|
write(E->get(),p_store_string_func,p_store_string_ud,p_encode_res_func,p_encode_res_ud);
|
||||||
p_store_string_func(p_store_string_ud,":");
|
p_store_string_func(p_store_string_ud,":");
|
||||||
write(dict[E->get()],p_store_string_func,p_store_string_ud,p_encode_res_func,p_encode_res_ud);
|
write(dict[E->get()],p_store_string_func,p_store_string_ud,p_encode_res_func,p_encode_res_ud);
|
||||||
|
|
|
@ -134,11 +134,13 @@ struct b2Vec2
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
///// Does this vector contain finite coordinates?
|
/*
|
||||||
//bool IsValid() const
|
/// Does this vector contain finite coordinates?
|
||||||
//{
|
bool IsValid() const
|
||||||
// return b2IsValid(x) && b2IsValid(y);
|
{
|
||||||
//}
|
return b2IsValid(x) && b2IsValid(y);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
float32 x, y;
|
float32 x, y;
|
||||||
};
|
};
|
||||||
|
|
|
@ -436,7 +436,6 @@ bool b2Polygon::IsSimple() {
|
||||||
* For internal use.
|
* For internal use.
|
||||||
*/
|
*/
|
||||||
b2Polygon* b2Polygon::Add(b2Triangle& t) {
|
b2Polygon* b2Polygon::Add(b2Triangle& t) {
|
||||||
// float32 equalTol = .001f;
|
|
||||||
// First, find vertices that connect
|
// First, find vertices that connect
|
||||||
int32 firstP = -1;
|
int32 firstP = -1;
|
||||||
int32 firstT = -1;
|
int32 firstT = -1;
|
||||||
|
@ -1362,14 +1361,15 @@ b2Polygon TraceEdge(b2Polygon* p){
|
||||||
//printf("knode %d on node %d now has %d connections\n",k,j,knode->nConnected);
|
//printf("knode %d on node %d now has %d connections\n",k,j,knode->nConnected);
|
||||||
//printf("Found duplicate point.\n");
|
//printf("Found duplicate point.\n");
|
||||||
}
|
}
|
||||||
//printf("Orphaning node at address %d\n",(int)jnode);
|
|
||||||
//for (int32 k=0; k<njConn; ++k) {
|
|
||||||
// if (jnode->connected[k]->IsConnectedTo(*jnode)) printf("Problem!!!\n");
|
|
||||||
//}
|
|
||||||
/*
|
/*
|
||||||
|
printf("Orphaning node at address %d\n",(int)jnode);
|
||||||
|
for (int32 k=0; k<njConn; ++k) {
|
||||||
|
if (jnode->connected[k]->IsConnectedTo(*jnode)) printf("Problem!!!\n");
|
||||||
|
}
|
||||||
for (int32 k=0; k < njConn; ++k){
|
for (int32 k=0; k < njConn; ++k){
|
||||||
jnode->RemoveConnectionByIndex(k);
|
jnode->RemoveConnectionByIndex(k);
|
||||||
}*/
|
}
|
||||||
|
*/
|
||||||
jnode->nConnected = 0;
|
jnode->nConnected = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,9 +74,11 @@ public:
|
||||||
|
|
||||||
void print(){
|
void print(){
|
||||||
printFormatted();
|
printFormatted();
|
||||||
// for (int32 i=0; i<nVertices; ++i){
|
/*
|
||||||
// printf("i: %d, x:%f, y:%f\n",i,x[i],y[i]);
|
for (int32 i=0; i<nVertices; ++i){
|
||||||
// }
|
printf("i: %d, x:%f, y:%f\n",i,x[i],y[i]);
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void printFormatted(){
|
void printFormatted(){
|
||||||
|
|
|
@ -4043,8 +4043,10 @@ RID RasterizerGLES2::viewport_data_create() {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
//glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0,
|
/*
|
||||||
// GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0,
|
||||||
|
GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||||
|
*/
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, format_luminance, 1, 1, 0,
|
glTexImage2D(GL_TEXTURE_2D, 0, format_luminance, 1, 1, 0,
|
||||||
format_luminance_components, format_luminance_type, NULL);
|
format_luminance_components, format_luminance_type, NULL);
|
||||||
|
|
||||||
|
@ -5128,9 +5130,11 @@ _FORCE_INLINE_ void RasterizerGLES2::_update_material_shader_params(Material *p_
|
||||||
ud.value=E->value().default_value;
|
ud.value=E->value().default_value;
|
||||||
old_inuse=false; //if reverted to default, obviously did not work
|
old_inuse=false; //if reverted to default, obviously did not work
|
||||||
|
|
||||||
//print_line("NEW: "+String(E->key())+" because: hasold-"+itos(old_mparams.has(E->key())));
|
/*
|
||||||
//if (old_mparams.has(E->key()))
|
print_line("NEW: "+String(E->key())+" because: hasold-"+itos(old_mparams.has(E->key())));
|
||||||
// print_line(" told "+Variant::get_type_name(old_mparams[E->key()].value.get_type())+" tnew "+Variant::get_type_name(E->value().default_value.get_type()));
|
if (old_mparams.has(E->key()))
|
||||||
|
print_line(" told "+Variant::get_type_name(old_mparams[E->key()].value.get_type())+" tnew "+Variant::get_type_name(E->value().default_value.get_type()));
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5216,9 +5220,11 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material
|
||||||
|
|
||||||
if (p_material->shader_cache && p_material->shader_cache->valid) {
|
if (p_material->shader_cache && p_material->shader_cache->valid) {
|
||||||
|
|
||||||
// // reduce amount of conditional compilations
|
/*
|
||||||
// for(int i=0;i<_tex_version_count;i++)
|
// reduce amount of conditional compilations
|
||||||
// material_shader.set_conditional((MaterialShaderGLES2::Conditionals)_tex_version[i],false);
|
for(int i=0;i<_tex_version_count;i++)
|
||||||
|
material_shader.set_conditional((MaterialShaderGLES2::Conditionals)_tex_version[i],false);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//material_shader.set_custom_shader(p_material->shader_cache->custom_code_id);
|
//material_shader.set_custom_shader(p_material->shader_cache->custom_code_id);
|
||||||
|
@ -5418,13 +5424,7 @@ void RasterizerGLES2::_setup_light(uint16_t p_light) {
|
||||||
if (li->near_shadow_buffer) {
|
if (li->near_shadow_buffer) {
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE0+max_texture_units-1);
|
glActiveTexture(GL_TEXTURE0+max_texture_units-1);
|
||||||
//if (read_depth_supported) {
|
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D,li->near_shadow_buffer->depth);
|
glBindTexture(GL_TEXTURE_2D,li->near_shadow_buffer->depth);
|
||||||
//} else {
|
|
||||||
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
material_shader.set_uniform(MaterialShaderGLES2::SHADOW_MATRIX,li->shadow_projection[0]);
|
material_shader.set_uniform(MaterialShaderGLES2::SHADOW_MATRIX,li->shadow_projection[0]);
|
||||||
material_shader.set_uniform(MaterialShaderGLES2::SHADOW_TEXEL_SIZE,Vector2(1.0,1.0)/li->near_shadow_buffer->size);
|
material_shader.set_uniform(MaterialShaderGLES2::SHADOW_TEXEL_SIZE,Vector2(1.0,1.0)/li->near_shadow_buffer->size);
|
||||||
|
@ -5944,8 +5944,10 @@ Error RasterizerGLES2::_setup_geometry(const Geometry *p_geometry, const Materia
|
||||||
|
|
||||||
const Surface::ArrayData& ad=surf->array[i];
|
const Surface::ArrayData& ad=surf->array[i];
|
||||||
|
|
||||||
// if (!gl_texcoord_shader[i])
|
/*
|
||||||
// continue;
|
if (!gl_texcoord_shader[i])
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
if (ad.size==0 || ! ad.bind) {
|
if (ad.size==0 || ! ad.bind) {
|
||||||
glDisableVertexAttribArray(i);
|
glDisableVertexAttribArray(i);
|
||||||
|
@ -9344,9 +9346,6 @@ void RasterizerGLES2::_canvas_item_setup_shader_params(CanvasItemMaterial *mater
|
||||||
} else {
|
} else {
|
||||||
glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height);
|
glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height);
|
||||||
}
|
}
|
||||||
// if (current_clip) {
|
|
||||||
// // print_line(" a clip ");
|
|
||||||
// }
|
|
||||||
|
|
||||||
canvas_texscreen_used=true;
|
canvas_texscreen_used=true;
|
||||||
}
|
}
|
||||||
|
@ -10232,9 +10231,11 @@ void RasterizerGLES2::free(const RID& p_rid) {
|
||||||
glDeleteFramebuffers(1,&cls->fbo);
|
glDeleteFramebuffers(1,&cls->fbo);
|
||||||
glDeleteRenderbuffers(1,&cls->rbo);
|
glDeleteRenderbuffers(1,&cls->rbo);
|
||||||
glDeleteTextures(1,&cls->depth);
|
glDeleteTextures(1,&cls->depth);
|
||||||
//if (!read_depth_supported) {
|
/*
|
||||||
// glDeleteTextures(1,&cls->rgba);
|
if (!read_depth_supported) {
|
||||||
//}
|
glDeleteTextures(1,&cls->rgba);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
canvas_light_shadow_owner.free(p_rid);
|
canvas_light_shadow_owner.free(p_rid);
|
||||||
memdelete(cls);
|
memdelete(cls);
|
||||||
|
@ -10391,7 +10392,8 @@ bool RasterizerGLES2::ShadowBuffer::init(int p_size,bool p_use_depth) {
|
||||||
GL_TEXTURE_2D, blur, 0);
|
GL_TEXTURE_2D, blur, 0);
|
||||||
|
|
||||||
// Allocate 16-bit depth buffer
|
// Allocate 16-bit depth buffer
|
||||||
/* glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size);
|
/*
|
||||||
|
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size);
|
||||||
|
|
||||||
// Attach the render buffer as depth buffer - will be ignored
|
// Attach the render buffer as depth buffer - will be ignored
|
||||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
|
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
|
||||||
|
@ -11017,8 +11019,10 @@ void RasterizerGLES2::init() {
|
||||||
use_hw_skeleton_xform=vtf>0 && float_supported;
|
use_hw_skeleton_xform=vtf>0 && float_supported;
|
||||||
float_linear_supported = extensions.has("GL_OES_texture_float_linear");
|
float_linear_supported = extensions.has("GL_OES_texture_float_linear");
|
||||||
|
|
||||||
//if (extensions.has("GL_QCOM_tiled_rendering"))
|
/*
|
||||||
// use_hw_skeleton_xform=false;
|
if (extensions.has("GL_QCOM_tiled_rendering"))
|
||||||
|
use_hw_skeleton_xform=false;
|
||||||
|
*/
|
||||||
GLint mva;
|
GLint mva;
|
||||||
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS,&mva);
|
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS,&mva);
|
||||||
if (vtf==0 && mva>8) {
|
if (vtf==0 && mva>8) {
|
||||||
|
|
|
@ -571,12 +571,13 @@ Error ShaderCompilerGLES2::compile_node(SL::ProgramNode *p_program) {
|
||||||
|
|
||||||
global_code+=uline;
|
global_code+=uline;
|
||||||
if (uniforms) {
|
if (uniforms) {
|
||||||
//if (uniforms->has(E->key())) {
|
/*
|
||||||
// //repeated uniform, error
|
if (uniforms->has(E->key())) {
|
||||||
// ERR_EXPLAIN("Uniform already exists from other shader: "+String(E->key()));
|
//repeated uniform, error
|
||||||
// ERR_FAIL_COND_V(uniforms->has(E->key()),ERR_ALREADY_EXISTS);
|
ERR_EXPLAIN("Uniform already exists from other shader: "+String(E->key()));
|
||||||
//
|
ERR_FAIL_COND_V(uniforms->has(E->key()),ERR_ALREADY_EXISTS);
|
||||||
// }
|
}
|
||||||
|
*/
|
||||||
SL::Uniform u = E->get();
|
SL::Uniform u = E->get();
|
||||||
u.order+=ubase;
|
u.order+=ubase;
|
||||||
uniforms->insert(E->key(),u);
|
uniforms->insert(E->key(),u);
|
||||||
|
|
|
@ -743,9 +743,6 @@ void RasterizerGLES2::_canvas_item_setup_shader_params(CanvasItemMaterial *mater
|
||||||
} else {
|
} else {
|
||||||
glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height);
|
glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height);
|
||||||
}
|
}
|
||||||
// if (current_clip) {
|
|
||||||
// // print_line(" a clip ");
|
|
||||||
// }
|
|
||||||
|
|
||||||
canvas_texscreen_used=true;
|
canvas_texscreen_used=true;
|
||||||
}
|
}
|
||||||
|
@ -1253,7 +1250,7 @@ void RasterizerCanvasGLES3::canvas_light_shadow_buffer_update(RID p_buffer, cons
|
||||||
|
|
||||||
//light.basis.scale(Vector3(to_light.elements[0].length(),to_light.elements[1].length(),1));
|
//light.basis.scale(Vector3(to_light.elements[0].length(),to_light.elements[1].length(),1));
|
||||||
|
|
||||||
/// p_near=1;
|
//p_near=1;
|
||||||
CameraMatrix projection;
|
CameraMatrix projection;
|
||||||
{
|
{
|
||||||
real_t fov = 90;
|
real_t fov = 90;
|
||||||
|
|
|
@ -1102,10 +1102,10 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material* p_m
|
||||||
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
|
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
|
||||||
else
|
else
|
||||||
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
|
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
|
||||||
*/
|
|
||||||
|
|
||||||
//if (p_material->line_width)
|
if (p_material->line_width)
|
||||||
// glLineWidth(p_material->line_width);
|
glLineWidth(p_material->line_width);
|
||||||
|
*/
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
//blend mode
|
//blend mode
|
||||||
|
@ -2067,8 +2067,10 @@ void RasterizerSceneGLES3::_add_geometry( RasterizerStorageGLES3::Geometry* p_g
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (e->geometry->type==RasterizerStorageGLES3::Geometry::GEOMETRY_MULTISURFACE)
|
/*
|
||||||
// e->sort_flags|=RenderList::SORT_FLAG_INSTANCING;
|
if (e->geometry->type==RasterizerStorageGLES3::Geometry::GEOMETRY_MULTISURFACE)
|
||||||
|
e->sort_flags|=RenderList::SORT_FLAG_INSTANCING;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
if (mirror) {
|
if (mirror) {
|
||||||
|
@ -3949,9 +3951,10 @@ void RasterizerSceneGLES3::render_scene(const Transform& p_cam_transform,const C
|
||||||
|
|
||||||
if (env && env->bg_mode==VS::ENV_BG_SKYBOX) {
|
if (env && env->bg_mode==VS::ENV_BG_SKYBOX) {
|
||||||
|
|
||||||
//if (use_mrt) {
|
/*
|
||||||
// glBindFramebuffer(GL_FRAMEBUFFER,storage->frame.current_rt->buffers.fbo); //switch to alpha fbo for skybox, only diffuse/ambient matters
|
if (use_mrt) {
|
||||||
//
|
glBindFramebuffer(GL_FRAMEBUFFER,storage->frame.current_rt->buffers.fbo); //switch to alpha fbo for skybox, only diffuse/ambient matters
|
||||||
|
*/
|
||||||
|
|
||||||
_draw_skybox(skybox,p_cam_projection,p_cam_transform,storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_VFLIP],env->skybox_scale);
|
_draw_skybox(skybox,p_cam_projection,p_cam_transform,storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_VFLIP],env->skybox_scale);
|
||||||
}
|
}
|
||||||
|
|
|
@ -681,11 +681,13 @@ void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 bino
|
||||||
|
|
||||||
splane.z=1.0 - splane.z;
|
splane.z=1.0 - splane.z;
|
||||||
|
|
||||||
//if (clamp_rect.z<clamp_rect.w) {
|
/*
|
||||||
// clamp_rect.x+=clamp_rect.z;
|
if (clamp_rect.z<clamp_rect.w) {
|
||||||
//} else {
|
clamp_rect.x+=clamp_rect.z;
|
||||||
// clamp_rect.y+=clamp_rect.w;
|
} else {
|
||||||
//}
|
clamp_rect.y+=clamp_rect.w;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,11 @@ void main() {
|
||||||
|
|
||||||
depth*=depth_divide;
|
depth*=depth_divide;
|
||||||
|
|
||||||
//if (depth > camera_z_far*0.999) {
|
/*
|
||||||
// discard;//skybox
|
if (depth > camera_z_far*0.999) {
|
||||||
//}
|
discard;//skybox
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
float sum = texelFetch(source_ssao, ssC, 0).r;
|
float sum = texelFetch(source_ssao, ssC, 0).r;
|
||||||
|
|
||||||
|
|
|
@ -879,10 +879,12 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
|
||||||
|
|
||||||
// Note 1: *zip_packed_data live into *packed_data
|
// Note 1: *zip_packed_data live into *packed_data
|
||||||
// Note 2: PackedData::~PackedData destroy this.
|
// Note 2: PackedData::~PackedData destroy this.
|
||||||
//#ifdef MINIZIP_ENABLED
|
/*
|
||||||
// if (zip_packed_data)
|
#ifdef MINIZIP_ENABLED
|
||||||
// memdelete( zip_packed_data );
|
if (zip_packed_data)
|
||||||
//#endif
|
memdelete( zip_packed_data );
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
unregister_core_driver_types();
|
unregister_core_driver_types();
|
||||||
unregister_core_types();
|
unregister_core_types();
|
||||||
|
@ -1587,9 +1589,10 @@ bool Main::iteration() {
|
||||||
double step=(double)ticks_elapsed / 1000000.0;
|
double step=(double)ticks_elapsed / 1000000.0;
|
||||||
float frame_slice=1.0/Engine::get_singleton()->get_iterations_per_second();
|
float frame_slice=1.0/Engine::get_singleton()->get_iterations_per_second();
|
||||||
|
|
||||||
// if (time_accum+step < frame_slice)
|
/*
|
||||||
// return false;
|
if (time_accum+step < frame_slice)
|
||||||
|
return false;
|
||||||
|
*/
|
||||||
|
|
||||||
uint64_t fixed_process_ticks=0;
|
uint64_t fixed_process_ticks=0;
|
||||||
uint64_t idle_process_ticks=0;
|
uint64_t idle_process_ticks=0;
|
||||||
|
@ -1635,8 +1638,10 @@ bool Main::iteration() {
|
||||||
|
|
||||||
time_accum-=frame_slice;
|
time_accum-=frame_slice;
|
||||||
message_queue->flush();
|
message_queue->flush();
|
||||||
//if (AudioServer::get_singleton())
|
/*
|
||||||
// AudioServer::get_singleton()->update();
|
if (AudioServer::get_singleton())
|
||||||
|
AudioServer::get_singleton()->update();
|
||||||
|
*/
|
||||||
|
|
||||||
fixed_process_ticks=MAX(fixed_process_ticks,OS::get_singleton()->get_ticks_usec()-fixed_begin); // keep the largest one for reference
|
fixed_process_ticks=MAX(fixed_process_ticks,OS::get_singleton()->get_ticks_usec()-fixed_begin); // keep the largest one for reference
|
||||||
fixed_process_max=MAX(OS::get_singleton()->get_ticks_usec()-fixed_begin,fixed_process_max);
|
fixed_process_max=MAX(OS::get_singleton()->get_ticks_usec()-fixed_begin,fixed_process_max);
|
||||||
|
|
|
@ -55,7 +55,6 @@ MainLoop * test() {
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
// static const int size = 16;
|
|
||||||
Image img;
|
Image img;
|
||||||
img.create(default_mouse_cursor_xpm);
|
img.create(default_mouse_cursor_xpm);
|
||||||
|
|
||||||
|
|
|
@ -218,8 +218,10 @@ class TestPhysics2DMainLoop : public MainLoop {
|
||||||
|
|
||||||
void _do_ray_query() {
|
void _do_ray_query() {
|
||||||
|
|
||||||
// Physics2DServer *ps = Physics2DServer::get_singleton();
|
/*
|
||||||
// ps->query_intersection_segment(ray_query,ray_from,ray_to);
|
Physics2DServer *ps = Physics2DServer::get_singleton();
|
||||||
|
ps->query_intersection_segment(ray_query,ray_from,ray_to);
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,8 +413,10 @@ public:
|
||||||
Physics2DServer::ShapeType type = types[i%4];
|
Physics2DServer::ShapeType type = types[i%4];
|
||||||
//type=Physics2DServer::SHAPE_SEGMENT;
|
//type=Physics2DServer::SHAPE_SEGMENT;
|
||||||
_add_body(type,Transform2D(i*0.8,Point2(152+i*40,100-40*i)));
|
_add_body(type,Transform2D(i*0.8,Point2(152+i*40,100-40*i)));
|
||||||
//if (i==0)
|
/*
|
||||||
// ps->body_set_mode(b,Physics2DServer::BODY_MODE_STATIC);
|
if (i==0)
|
||||||
|
ps->body_set_mode(b,Physics2DServer::BODY_MODE_STATIC);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//RID b= _add_body(Physics2DServer::SHAPE_CIRCLE,Transform2D(0,Point2(101,140)));
|
//RID b= _add_body(Physics2DServer::SHAPE_CIRCLE,Transform2D(0,Point2(101,140)));
|
||||||
|
|
|
@ -192,7 +192,6 @@ public:
|
||||||
*/
|
*/
|
||||||
RID lightaux;
|
RID lightaux;
|
||||||
|
|
||||||
//*
|
|
||||||
lightaux = vs->light_create( VisualServer::LIGHT_DIRECTIONAL );
|
lightaux = vs->light_create( VisualServer::LIGHT_DIRECTIONAL );
|
||||||
//vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,0.0) );
|
//vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,0.0) );
|
||||||
vs->light_set_color( lightaux, Color(1.0,1.0,1.0) );
|
vs->light_set_color( lightaux, Color(1.0,1.0,1.0) );
|
||||||
|
@ -203,9 +202,7 @@ public:
|
||||||
lla.set_look_at(Vector3(),Vector3(-0.000000,-0.836026,-0.548690),Vector3(0,1,0));
|
lla.set_look_at(Vector3(),Vector3(-0.000000,-0.836026,-0.548690),Vector3(0,1,0));
|
||||||
|
|
||||||
vs->instance_set_transform( light, lla );
|
vs->instance_set_transform( light, lla );
|
||||||
// */
|
|
||||||
|
|
||||||
//*
|
|
||||||
lightaux = vs->light_create( VisualServer::LIGHT_OMNI );
|
lightaux = vs->light_create( VisualServer::LIGHT_OMNI );
|
||||||
//vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,1.0) );
|
//vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,1.0) );
|
||||||
vs->light_set_color( lightaux, Color(1.0,1.0,0.0) );
|
vs->light_set_color( lightaux, Color(1.0,1.0,0.0) );
|
||||||
|
@ -213,7 +210,6 @@ public:
|
||||||
vs->light_set_param( lightaux, VisualServer::LIGHT_PARAM_ENERGY, 8 );
|
vs->light_set_param( lightaux, VisualServer::LIGHT_PARAM_ENERGY, 8 );
|
||||||
//vs->light_set_shadow( lightaux, true );
|
//vs->light_set_shadow( lightaux, true );
|
||||||
//light = vs->instance_create( lightaux );
|
//light = vs->instance_create( lightaux );
|
||||||
// */
|
|
||||||
|
|
||||||
ofs=0;
|
ofs=0;
|
||||||
quit=false;
|
quit=false;
|
||||||
|
|
|
@ -602,17 +602,19 @@ void CPPlayer::handle_tick() {
|
||||||
/* process pattern-delay. pf->patdly2 is the counter and pf->patdly is
|
/* process pattern-delay. pf->patdly2 is the counter and pf->patdly is
|
||||||
the command memory. */
|
the command memory. */
|
||||||
|
|
||||||
// if (control.pattern_delay_1) {
|
/*
|
||||||
|
if (control.pattern_delay_1) {
|
||||||
|
|
||||||
// control.pattern_delay_2=control.pattern_delay_1;
|
control.pattern_delay_2=control.pattern_delay_1;
|
||||||
// control.pattern_delay_1=0;
|
control.pattern_delay_1=0;
|
||||||
// }
|
}
|
||||||
// if (control.pattern_delay_2) {
|
if (control.pattern_delay_2) {
|
||||||
// patterndelay active
|
patterndelay active
|
||||||
// if (--control.pattern_delay_2)
|
if (--control.pattern_delay_2)
|
||||||
// so turn back pf->patpos by 1
|
// so turn back pf->patpos by 1
|
||||||
// if (pf->patpos) pf->patpos--;
|
if (pf->patpos) pf->patpos--;
|
||||||
// }
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (control.play_mode!=PLAY_NOTHING) {
|
if (control.play_mode!=PLAY_NOTHING) {
|
||||||
|
|
||||||
|
|
|
@ -111,8 +111,10 @@ int CPPlayer::find_empty_voice() {
|
||||||
|
|
||||||
for (i=0;i<control.max_voices;i++) {
|
for (i=0;i<control.max_voices;i++) {
|
||||||
/* allow us to take over a nonexisting sample */
|
/* allow us to take over a nonexisting sample */
|
||||||
// if ((voice[i].s==NULL)
|
/*
|
||||||
// return k;
|
if ((voice[i].s==NULL)
|
||||||
|
return k;
|
||||||
|
*/
|
||||||
|
|
||||||
if ((voice[i].kick==KICK_NOTHING)||(voice[i].kick==KICK_ENVELOPE)) {
|
if ((voice[i].kick==KICK_NOTHING)||(voice[i].kick==KICK_ENVELOPE)) {
|
||||||
|
|
||||||
|
|
|
@ -506,8 +506,10 @@ uint32_t NetworkedMultiplayerENet::_gen_unique_id() const {
|
||||||
(uint32_t)OS::get_singleton()->get_unix_time(), hash );
|
(uint32_t)OS::get_singleton()->get_unix_time(), hash );
|
||||||
hash = hash_djb2_one_32(
|
hash = hash_djb2_one_32(
|
||||||
(uint32_t)OS::get_singleton()->get_data_dir().hash64(), hash );
|
(uint32_t)OS::get_singleton()->get_data_dir().hash64(), hash );
|
||||||
//hash = hash_djb2_one_32(
|
/*
|
||||||
// (uint32_t)OS::get_singleton()->get_unique_ID().hash64(), hash );
|
hash = hash_djb2_one_32(
|
||||||
|
(uint32_t)OS::get_singleton()->get_unique_ID().hash64(), hash );
|
||||||
|
*/
|
||||||
hash = hash_djb2_one_32(
|
hash = hash_djb2_one_32(
|
||||||
(uint32_t)((uint64_t)this), hash ); //rely on aslr heap
|
(uint32_t)((uint64_t)this), hash ); //rely on aslr heap
|
||||||
hash = hash_djb2_one_32(
|
hash = hash_djb2_one_32(
|
||||||
|
|
|
@ -1420,9 +1420,10 @@ Error GDCompiler::_parse_function(GDScript *p_script,const GDParser::ClassNode *
|
||||||
|
|
||||||
GDFunction *gdfunc=NULL;
|
GDFunction *gdfunc=NULL;
|
||||||
|
|
||||||
//if (String(p_func->name)=="") { //initializer func
|
/*
|
||||||
// gdfunc = &p_script->initializer;
|
if (String(p_func->name)=="") { //initializer func
|
||||||
|
gdfunc = &p_script->initializer;
|
||||||
|
*/
|
||||||
//} else { //regular func
|
//} else { //regular func
|
||||||
p_script->member_functions[func_name]=memnew(GDFunction);
|
p_script->member_functions[func_name]=memnew(GDFunction);
|
||||||
gdfunc = p_script->member_functions[func_name];
|
gdfunc = p_script->member_functions[func_name];
|
||||||
|
|
|
@ -364,10 +364,12 @@ static GDCompletionIdentifier _get_type_from_variant(const Variant& p_variant) {
|
||||||
if (p_variant.get_type()==Variant::OBJECT) {
|
if (p_variant.get_type()==Variant::OBJECT) {
|
||||||
Object *obj = p_variant;
|
Object *obj = p_variant;
|
||||||
if (obj) {
|
if (obj) {
|
||||||
//if (obj->cast_to<GDNativeClass>()) {
|
/*
|
||||||
// t.obj_type=obj->cast_to<GDNativeClass>()->get_name();
|
if (obj->cast_to<GDNativeClass>()) {
|
||||||
// t.value=Variant();
|
t.obj_type=obj->cast_to<GDNativeClass>()->get_name();
|
||||||
//} else {
|
t.value=Variant();
|
||||||
|
} else {
|
||||||
|
*/
|
||||||
t.obj_type=obj->get_class();
|
t.obj_type=obj->get_class();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
@ -1998,10 +2000,10 @@ static void _find_call_arguments(GDCompletionContext& context,const GDParser::No
|
||||||
List<MethodInfo> methods;
|
List<MethodInfo> methods;
|
||||||
ClassDB::get_method_list(type,&methods);
|
ClassDB::get_method_list(type,&methods);
|
||||||
for(List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
|
for(List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
|
||||||
//if (E->get().arguments.size())
|
if (E->get().arguments.size())
|
||||||
// result.insert(E->get().name+"(");
|
result.insert(E->get().name+"(");
|
||||||
//else
|
else
|
||||||
// result.insert(E->get().name+"()");
|
result.insert(E->get().name+"()");
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -358,9 +358,11 @@ bool GDScript::get_property_default_value(const StringName& p_property, Variant
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
|
|
||||||
//for (const Map<StringName,Variant>::Element *I=member_default_values.front();I;I=I->next()) {
|
/*
|
||||||
// print_line("\t"+String(String(I->key())+":"+String(I->get())));
|
for (const Map<StringName,Variant>::Element *I=member_default_values.front();I;I=I->next()) {
|
||||||
//}
|
print_line("\t"+String(String(I->key())+":"+String(I->get())));
|
||||||
|
}
|
||||||
|
*/
|
||||||
const Map<StringName,Variant>::Element *E=member_default_values_cache.find(p_property);
|
const Map<StringName,Variant>::Element *E=member_default_values_cache.find(p_property);
|
||||||
if (E) {
|
if (E) {
|
||||||
r_value=E->get();
|
r_value=E->get();
|
||||||
|
|
|
@ -513,9 +513,11 @@ void GDTokenizerText::_advance() {
|
||||||
if (GETCHAR(1)=='=') {
|
if (GETCHAR(1)=='=') {
|
||||||
_make_token(TK_OP_ASSIGN_ADD);
|
_make_token(TK_OP_ASSIGN_ADD);
|
||||||
INCPOS(1);
|
INCPOS(1);
|
||||||
//} else if (GETCHAR(1)=='+') {
|
/*
|
||||||
// _make_token(TK_OP_PLUS_PLUS);
|
} else if (GETCHAR(1)=='+') {
|
||||||
// INCPOS(1);
|
_make_token(TK_OP_PLUS_PLUS);
|
||||||
|
INCPOS(1);
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
_make_token(TK_OP_ADD);
|
_make_token(TK_OP_ADD);
|
||||||
}
|
}
|
||||||
|
@ -526,9 +528,11 @@ void GDTokenizerText::_advance() {
|
||||||
if (GETCHAR(1)=='=') {
|
if (GETCHAR(1)=='=') {
|
||||||
_make_token(TK_OP_ASSIGN_SUB);
|
_make_token(TK_OP_ASSIGN_SUB);
|
||||||
INCPOS(1);
|
INCPOS(1);
|
||||||
//} else if (GETCHAR(1)=='-') {
|
/*
|
||||||
// _make_token(TK_OP_MINUS_MINUS);
|
} else if (GETCHAR(1)=='-') {
|
||||||
// INCPOS(1);
|
_make_token(TK_OP_MINUS_MINUS);
|
||||||
|
INCPOS(1);
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
_make_token(TK_OP_SUB);
|
_make_token(TK_OP_SUB);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1706,10 +1706,12 @@ void GridMap::bake_geometry() {
|
||||||
|
|
||||||
void GridMap::_baked_light_changed() {
|
void GridMap::_baked_light_changed() {
|
||||||
|
|
||||||
// if (!baked_light_instance)
|
/*
|
||||||
// VS::get_singleton()->instance_geometry_set_baked_light(get_instance(),RID());
|
if (!baked_light_instance)
|
||||||
// else
|
VS::get_singleton()->instance_geometry_set_baked_light(get_instance(),RID());
|
||||||
// VS::get_singleton()->instance_geometry_set_baked_light(get_instance(),baked_light_instance->get_baked_light_instance());
|
else
|
||||||
|
VS::get_singleton()->instance_geometry_set_baked_light(get_instance(),baked_light_instance->get_baked_light_instance());
|
||||||
|
*/
|
||||||
for(Map<OctantKey,Octant*>::Element *E=octant_map.front();E;E=E->next()) {
|
for(Map<OctantKey,Octant*>::Element *E=octant_map.front();E;E=E->next()) {
|
||||||
|
|
||||||
for(Map<int,Octant::ItemInstances>::Element *F=E->get()->items.front();F;F=F->next()) {
|
for(Map<int,Octant::ItemInstances>::Element *F=E->get()->items.front();F;F=F->next()) {
|
||||||
|
|
|
@ -669,9 +669,11 @@ static void decompress_pvrtc(PVRTCBlock *p_comp_img, const int p_2bit, const int
|
||||||
|
|
||||||
static void _pvrtc_decompress(Image* p_img) {
|
static void _pvrtc_decompress(Image* p_img) {
|
||||||
|
|
||||||
// static void decompress_pvrtc(const void *p_comp_img, const int p_2bit, const int p_width, const int p_height, unsigned char* p_dst) {
|
/*
|
||||||
// decompress_pvrtc((PVRTCBlock*)p_comp_img,p_2bit,p_width,p_height,1,p_dst);
|
static void decompress_pvrtc(const void *p_comp_img, const int p_2bit, const int p_width, const int p_height, unsigned char* p_dst) {
|
||||||
// }
|
decompress_pvrtc((PVRTCBlock*)p_comp_img,p_2bit,p_width,p_height,1,p_dst);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
ERR_FAIL_COND( p_img->get_format()!=Image::FORMAT_PVRTC2 && p_img->get_format()!=Image::FORMAT_PVRTC2A && p_img->get_format()!=Image::FORMAT_PVRTC4 && p_img->get_format()!=Image::FORMAT_PVRTC4A);
|
ERR_FAIL_COND( p_img->get_format()!=Image::FORMAT_PVRTC2 && p_img->get_format()!=Image::FORMAT_PVRTC2A && p_img->get_format()!=Image::FORMAT_PVRTC4 && p_img->get_format()!=Image::FORMAT_PVRTC4A);
|
||||||
|
|
||||||
|
@ -687,9 +689,11 @@ static void _pvrtc_decompress(Image* p_img) {
|
||||||
|
|
||||||
decompress_pvrtc((PVRTCBlock*)r.ptr(),_2bit,p_img->get_width(),p_img->get_height(),0,(unsigned char*)w.ptr());
|
decompress_pvrtc((PVRTCBlock*)r.ptr(),_2bit,p_img->get_width(),p_img->get_height(),0,(unsigned char*)w.ptr());
|
||||||
|
|
||||||
//for(int i=0;i<newdata.size();i++) {
|
/*
|
||||||
// print_line(itos(w[i]));
|
for(int i=0;i<newdata.size();i++) {
|
||||||
//}
|
print_line(itos(w[i]));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
w=PoolVector<uint8_t>::Write();
|
w=PoolVector<uint8_t>::Write();
|
||||||
r=PoolVector<uint8_t>::Read();
|
r=PoolVector<uint8_t>::Read();
|
||||||
|
|
|
@ -81,6 +81,9 @@ void VideoStreamPlaybackTheora::video_write(void){
|
||||||
th_ycbcr_buffer yuv;
|
th_ycbcr_buffer yuv;
|
||||||
th_decode_ycbcr_out(td,yuv);
|
th_decode_ycbcr_out(td,yuv);
|
||||||
|
|
||||||
|
// FIXME: The way stuff is commented out with `//*/` closing comments
|
||||||
|
// sounds very fishy...
|
||||||
|
|
||||||
/*
|
/*
|
||||||
int y_offset, uv_offset;
|
int y_offset, uv_offset;
|
||||||
y_offset=(ti.pic_x&~1)+yuv[0].stride*(ti.pic_y&~1);
|
y_offset=(ti.pic_x&~1)+yuv[0].stride*(ti.pic_y&~1);
|
||||||
|
|
|
@ -1136,9 +1136,11 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
|
||||||
undo_redo->add_undo_method(script.ptr(),"data_connect",name,E->get().from_node,E->get().from_port,E->get().to_node,E->get().to_port);
|
undo_redo->add_undo_method(script.ptr(),"data_connect",name,E->get().from_node,E->get().from_port,E->get().to_node,E->get().to_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
//for(int i=0;i<script->function_get_argument_count(name);i++) {
|
/*
|
||||||
//// undo_redo->add_undo_method(script.ptr(),"function_add_argument",name,script->function_get_argument_name(name,i),script->function_get_argument_type(name,i));
|
for(int i=0;i<script->function_get_argument_count(name);i++) {
|
||||||
//}
|
undo_redo->add_undo_method(script.ptr(),"function_add_argument",name,script->function_get_argument_name(name,i),script->function_get_argument_type(name,i));
|
||||||
|
}
|
||||||
|
*/
|
||||||
undo_redo->add_do_method(this,"_update_members");
|
undo_redo->add_do_method(this,"_update_members");
|
||||||
undo_redo->add_undo_method(this,"_update_members");
|
undo_redo->add_undo_method(this,"_update_members");
|
||||||
undo_redo->add_do_method(this,"_update_graph");
|
undo_redo->add_do_method(this,"_update_graph");
|
||||||
|
|
|
@ -1864,10 +1864,12 @@ bool EditorExportPlatformAndroid::can_export(String *r_error) const {
|
||||||
|
|
||||||
if (apk_expansion) {
|
if (apk_expansion) {
|
||||||
|
|
||||||
//if (apk_expansion_salt=="") {
|
/*
|
||||||
// valid=false;
|
if (apk_expansion_salt=="") {
|
||||||
// err+="Invalid SALT for apk expansion.\n";
|
valid=false;
|
||||||
//}
|
err+="Invalid SALT for apk expansion.\n";
|
||||||
|
}
|
||||||
|
*/
|
||||||
if (apk_expansion_pkey=="") {
|
if (apk_expansion_pkey=="") {
|
||||||
valid=false;
|
valid=false;
|
||||||
err+="Invalid public key for apk expansion.\n";
|
err+="Invalid public key for apk expansion.\n";
|
||||||
|
|
|
@ -539,9 +539,11 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
||||||
} break;
|
} break;
|
||||||
case AMOTION_EVENT_ACTION_MOVE: {
|
case AMOTION_EVENT_ACTION_MOVE: {
|
||||||
engine->os->process_touch(1,0,touchvec);
|
engine->os->process_touch(1,0,touchvec);
|
||||||
//for(int i=0;i<event.getPointerCount();i++) {
|
/*
|
||||||
// System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i));
|
for(int i=0;i<event.getPointerCount();i++) {
|
||||||
//}
|
System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i));
|
||||||
|
}
|
||||||
|
*/
|
||||||
} break;
|
} break;
|
||||||
case AMOTION_EVENT_ACTION_POINTER_UP: {
|
case AMOTION_EVENT_ACTION_POINTER_UP: {
|
||||||
|
|
||||||
|
@ -555,9 +557,11 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
||||||
case AMOTION_EVENT_ACTION_CANCEL:
|
case AMOTION_EVENT_ACTION_CANCEL:
|
||||||
case AMOTION_EVENT_ACTION_UP: {
|
case AMOTION_EVENT_ACTION_UP: {
|
||||||
engine->os->process_touch(2,0,touchvec);
|
engine->os->process_touch(2,0,touchvec);
|
||||||
//for(int i=0;i<event.getPointerCount();i++) {
|
/*
|
||||||
// System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i));
|
for(int i=0;i<event.getPointerCount();i++) {
|
||||||
//}
|
System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i));
|
||||||
|
}
|
||||||
|
*/
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -804,9 +804,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
||||||
} break;
|
} break;
|
||||||
case MotionEvent.ACTION_MOVE: {
|
case MotionEvent.ACTION_MOVE: {
|
||||||
GodotLib.touch(1,0,evcount,arr);
|
GodotLib.touch(1,0,evcount,arr);
|
||||||
//for(int i=0;i<event.getPointerCount();i++) {
|
/*
|
||||||
// System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i));
|
for(int i=0;i<event.getPointerCount();i++) {
|
||||||
//}
|
System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i));
|
||||||
|
}
|
||||||
|
*/
|
||||||
} break;
|
} break;
|
||||||
case MotionEvent.ACTION_POINTER_UP: {
|
case MotionEvent.ACTION_POINTER_UP: {
|
||||||
final int indexPointUp = event.getActionIndex();
|
final int indexPointUp = event.getActionIndex();
|
||||||
|
@ -822,9 +824,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
||||||
case MotionEvent.ACTION_CANCEL:
|
case MotionEvent.ACTION_CANCEL:
|
||||||
case MotionEvent.ACTION_UP: {
|
case MotionEvent.ACTION_UP: {
|
||||||
GodotLib.touch(2,0,evcount,arr);
|
GodotLib.touch(2,0,evcount,arr);
|
||||||
//for(int i=0;i<event.getPointerCount();i++) {
|
/*
|
||||||
// System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i));
|
for(int i=0;i<event.getPointerCount();i++) {
|
||||||
//}
|
System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i));
|
||||||
|
}
|
||||||
|
*/
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -866,9 +870,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
||||||
return mPaymentsManager;
|
return mPaymentsManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void setPaymentsManager(PaymentsManager mPaymentsManager) {
|
/*
|
||||||
// this.mPaymentsManager = mPaymentsManager;
|
public void setPaymentsManager(PaymentsManager mPaymentsManager) {
|
||||||
// };
|
this.mPaymentsManager = mPaymentsManager;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
|
|
|
@ -63,11 +63,13 @@ abstract public class PurchaseTask {
|
||||||
Log.d("XXX", "Starting purchase for: " + sku);
|
Log.d("XXX", "Starting purchase for: " + sku);
|
||||||
PaymentsCache pc = new PaymentsCache(context);
|
PaymentsCache pc = new PaymentsCache(context);
|
||||||
Boolean isBlocked = pc.getConsumableFlag("block", sku);
|
Boolean isBlocked = pc.getConsumableFlag("block", sku);
|
||||||
// if(isBlocked){
|
/*
|
||||||
// Log.d("XXX", "Is awaiting payment confirmation");
|
if(isBlocked){
|
||||||
// error("Awaiting payment confirmation");
|
Log.d("XXX", "Is awaiting payment confirmation");
|
||||||
// return;
|
error("Awaiting payment confirmation");
|
||||||
// }
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
final String hash = transactionId;
|
final String hash = transactionId;
|
||||||
|
|
||||||
Bundle buyIntentBundle;
|
Bundle buyIntentBundle;
|
||||||
|
|
|
@ -1151,8 +1151,10 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv * env, j
|
||||||
pointer_events.push_back(jpe);
|
pointer_events.push_back(jpe);
|
||||||
|
|
||||||
input_mutex->unlock();
|
input_mutex->unlock();
|
||||||
//if (os_android)
|
/*
|
||||||
// os_android->process_touch(ev,pointer,points);
|
if (os_android)
|
||||||
|
os_android->process_touch(ev,pointer,points);
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -190,9 +190,11 @@ void OSBB10::finalize() {
|
||||||
spatial_sound_2d_server->finish();
|
spatial_sound_2d_server->finish();
|
||||||
memdelete(spatial_sound_2d_server);
|
memdelete(spatial_sound_2d_server);
|
||||||
|
|
||||||
//if (debugger_connection_console) {
|
/*
|
||||||
// memdelete(debugger_connection_console);
|
if (debugger_connection_console) {
|
||||||
//}
|
memdelete(debugger_connection_console);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
memdelete(sample_manager);
|
memdelete(sample_manager);
|
||||||
|
|
||||||
|
|
|
@ -145,10 +145,12 @@ void HaikuDirectWindow::HandleMouseButton(BMessage* message) {
|
||||||
last_buttons_state = buttons;
|
last_buttons_state = buttons;
|
||||||
|
|
||||||
// TODO: implement the mouse_mode checks
|
// TODO: implement the mouse_mode checks
|
||||||
//if (mouse_mode == MOUSE_MODE_CAPTURED) {
|
/*
|
||||||
// event.xbutton.x=last_mouse_pos.x;
|
if (mouse_mode == MOUSE_MODE_CAPTURED) {
|
||||||
// event.xbutton.y=last_mouse_pos.y;
|
event.xbutton.x=last_mouse_pos.x;
|
||||||
//}
|
event.xbutton.y=last_mouse_pos.y;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
InputEvent mouse_event;
|
InputEvent mouse_event;
|
||||||
mouse_event.ID = ++event_id;
|
mouse_event.ID = ++event_id;
|
||||||
|
|
|
@ -119,9 +119,11 @@ void OS_Haiku::initialize(const VideoMode& p_desired, int p_video_driver, int p_
|
||||||
ERR_FAIL_COND(!visual_server);
|
ERR_FAIL_COND(!visual_server);
|
||||||
|
|
||||||
// TODO: enable multithreaded VS
|
// TODO: enable multithreaded VS
|
||||||
//if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
|
/*
|
||||||
// visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
|
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
|
||||||
//}
|
visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
input = memnew(InputDefault);
|
input = memnew(InputDefault);
|
||||||
window->SetInput(input);
|
window->SetInput(input);
|
||||||
|
|
|
@ -68,14 +68,18 @@ AudioDriverSW::OutputFormat AudioDriverJavaScript::get_output_format() const{
|
||||||
}
|
}
|
||||||
void AudioDriverJavaScript::lock(){
|
void AudioDriverJavaScript::lock(){
|
||||||
|
|
||||||
//if (active && mutex)
|
/*
|
||||||
// mutex->lock();
|
if (active && mutex)
|
||||||
|
mutex->lock();
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
void AudioDriverJavaScript::unlock() {
|
void AudioDriverJavaScript::unlock() {
|
||||||
|
|
||||||
//if (active && mutex)
|
/*
|
||||||
// mutex->unlock();
|
if (active && mutex)
|
||||||
|
mutex->unlock();
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
void AudioDriverJavaScript::finish(){
|
void AudioDriverJavaScript::finish(){
|
||||||
|
|
|
@ -617,9 +617,11 @@ void AudioServerJavascript::mix_to_js(int p_frames) {
|
||||||
|
|
||||||
void AudioServerJavascript::init(){
|
void AudioServerJavascript::init(){
|
||||||
|
|
||||||
//EM_ASM(
|
/*
|
||||||
// console.log('server is '+audio_server);
|
EM_ASM(
|
||||||
// );
|
console.log('server is '+audio_server);
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//int latency = GLOBAL_DEF("javascript/audio_latency",16384);
|
//int latency = GLOBAL_DEF("javascript/audio_latency",16384);
|
||||||
|
|
|
@ -804,8 +804,10 @@ String OS_JavaScript::get_resource_dir() const {
|
||||||
|
|
||||||
String OS_JavaScript::get_data_dir() const {
|
String OS_JavaScript::get_data_dir() const {
|
||||||
|
|
||||||
//if (get_data_dir_func)
|
/*
|
||||||
// return get_data_dir_func();
|
if (get_data_dir_func)
|
||||||
|
return get_data_dir_func();
|
||||||
|
*/
|
||||||
return "/userfs";
|
return "/userfs";
|
||||||
//return GlobalConfig::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir");
|
//return GlobalConfig::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir");
|
||||||
};
|
};
|
||||||
|
|
|
@ -148,8 +148,8 @@ static int button_mask=0;
|
||||||
|
|
||||||
- (void)applicationDidHide:(NSNotification *)notification
|
- (void)applicationDidHide:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
/* _Godotwindow* window;
|
/*
|
||||||
|
_Godotwindow* window;
|
||||||
for (window = _Godot.windowListHead; window; window = window->next)
|
for (window = _Godot.windowListHead; window; window = window->next)
|
||||||
_GodotInputWindowVisibility(window, GL_FALSE);
|
_GodotInputWindowVisibility(window, GL_FALSE);
|
||||||
*/
|
*/
|
||||||
|
@ -207,24 +207,28 @@ static int button_mask=0;
|
||||||
OS_OSX::singleton->window_size.height=fbRect.size.height*OS_OSX::singleton->display_scale;
|
OS_OSX::singleton->window_size.height=fbRect.size.height*OS_OSX::singleton->display_scale;
|
||||||
|
|
||||||
|
|
||||||
// _GodotInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);
|
/*
|
||||||
// _GodotInputWindowSize(window, contentRect.size.width, contentRect.size.height);
|
_GodotInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);
|
||||||
//_GodotInputWindowDamage(window);
|
_GodotInputWindowSize(window, contentRect.size.width, contentRect.size.height);
|
||||||
|
_GodotInputWindowDamage(window);
|
||||||
|
|
||||||
//if (window->cursorMode == Godot_CURSOR_DISABLED)
|
if (window->cursorMode == Godot_CURSOR_DISABLED)
|
||||||
// centerCursor(window);
|
centerCursor(window);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)windowDidMove:(NSNotification *)notification
|
- (void)windowDidMove:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
// [window->nsgl.context update];
|
/*
|
||||||
|
[window->nsgl.context update];
|
||||||
|
|
||||||
// int x, y;
|
int x, y;
|
||||||
// _GodotPlatformGetWindowPos(window, &x, &y);
|
_GodotPlatformGetWindowPos(window, &x, &y);
|
||||||
// _GodotInputWindowPos(window, x, y);
|
_GodotInputWindowPos(window, x, y);
|
||||||
|
|
||||||
//if (window->cursorMode == Godot_CURSOR_DISABLED)
|
if (window->cursorMode == Godot_CURSOR_DISABLED)
|
||||||
// centerCursor(window);
|
centerCursor(window);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||||
|
@ -275,13 +279,15 @@ static int button_mask=0;
|
||||||
{
|
{
|
||||||
if (self == [GodotContentView class])
|
if (self == [GodotContentView class])
|
||||||
{
|
{
|
||||||
/* if (_glfw.ns.cursor == nil)
|
/*
|
||||||
|
if (_glfw.ns.cursor == nil)
|
||||||
{
|
{
|
||||||
NSImage* data = [[NSImage alloc] initWithSize:NSMakeSize(1, 1)];
|
NSImage* data = [[NSImage alloc] initWithSize:NSMakeSize(1, 1)];
|
||||||
_glfw.ns.cursor = [[NSCursor alloc] initWithImage:data
|
_glfw.ns.cursor = [[NSCursor alloc] initWithImage:data
|
||||||
hotSpot:NSZeroPoint];
|
hotSpot:NSZeroPoint];
|
||||||
[data release];
|
[data release];
|
||||||
}*/
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1088,10 +1094,11 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
|
||||||
|
|
||||||
visual_server = memnew( VisualServerRaster );
|
visual_server = memnew( VisualServerRaster );
|
||||||
// FIXME: Reimplement threaded rendering? Or remove?
|
// FIXME: Reimplement threaded rendering? Or remove?
|
||||||
// if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) {
|
/*
|
||||||
//
|
if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) {
|
||||||
// visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD));
|
visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD));
|
||||||
// }
|
}
|
||||||
|
*/
|
||||||
visual_server->init();
|
visual_server->init();
|
||||||
visual_server->cursor_set_visible(false, 0);
|
visual_server->cursor_set_visible(false, 0);
|
||||||
|
|
||||||
|
|
|
@ -103,9 +103,11 @@ void OS_Server::finalize() {
|
||||||
spatial_sound_2d_server->finish();
|
spatial_sound_2d_server->finish();
|
||||||
memdelete(spatial_sound_2d_server);
|
memdelete(spatial_sound_2d_server);
|
||||||
|
|
||||||
//if (debugger_connection_console) {
|
/*
|
||||||
// memdelete(debugger_connection_console);
|
if (debugger_connection_console) {
|
||||||
//}
|
memdelete(debugger_connection_console);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
memdelete(sample_manager);
|
memdelete(sample_manager);
|
||||||
|
|
||||||
|
|
|
@ -412,9 +412,11 @@ void OSUWP::finalize() {
|
||||||
spatial_sound_2d_server->finish();
|
spatial_sound_2d_server->finish();
|
||||||
memdelete(spatial_sound_2d_server);
|
memdelete(spatial_sound_2d_server);
|
||||||
|
|
||||||
//if (debugger_connection_console) {
|
/*
|
||||||
// memdelete(debugger_connection_console);
|
if (debugger_connection_console) {
|
||||||
//}
|
memdelete(debugger_connection_console);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
memdelete(sample_manager);
|
memdelete(sample_manager);
|
||||||
|
|
||||||
|
|
|
@ -635,8 +635,10 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||||
gr_mem=alt_mem;
|
gr_mem=alt_mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (wParam==VK_WIN) TODO wtf is this?
|
/*
|
||||||
// meta_mem=uMsg==WM_KEYDOWN;
|
if (wParam==VK_WIN) TODO wtf is this?
|
||||||
|
meta_mem=uMsg==WM_KEYDOWN;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
} //fallthrough
|
} //fallthrough
|
||||||
|
@ -1085,12 +1087,12 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_
|
||||||
|
|
||||||
visual_server = memnew( VisualServerRaster );
|
visual_server = memnew( VisualServerRaster );
|
||||||
// FIXME: Reimplement threaded rendering? Or remove?
|
// FIXME: Reimplement threaded rendering? Or remove?
|
||||||
// if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) {
|
/*
|
||||||
//
|
if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) {
|
||||||
// visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD));
|
visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD));
|
||||||
// }
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//
|
|
||||||
physics_server = memnew( PhysicsServerSW );
|
physics_server = memnew( PhysicsServerSW );
|
||||||
physics_server->init();
|
physics_server->init();
|
||||||
|
|
||||||
|
@ -1274,9 +1276,11 @@ void OS_Windows::finalize() {
|
||||||
spatial_sound_2d_server->finish();
|
spatial_sound_2d_server->finish();
|
||||||
memdelete(spatial_sound_2d_server);
|
memdelete(spatial_sound_2d_server);
|
||||||
|
|
||||||
//if (debugger_connection_console) {
|
/*
|
||||||
// memdelete(debugger_connection_console);
|
if (debugger_connection_console) {
|
||||||
//}
|
memdelete(debugger_connection_console);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
memdelete(sample_manager);
|
memdelete(sample_manager);
|
||||||
|
|
||||||
|
|
|
@ -474,9 +474,11 @@ void OS_X11::finalize() {
|
||||||
spatial_sound_2d_server->finish();
|
spatial_sound_2d_server->finish();
|
||||||
memdelete(spatial_sound_2d_server);
|
memdelete(spatial_sound_2d_server);
|
||||||
|
|
||||||
//if (debugger_connection_console) {
|
/*
|
||||||
// memdelete(debugger_connection_console);
|
if (debugger_connection_console) {
|
||||||
//}
|
memdelete(debugger_connection_console);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef JOYDEV_ENABLED
|
#ifdef JOYDEV_ENABLED
|
||||||
memdelete(joypad);
|
memdelete(joypad);
|
||||||
|
|
|
@ -1141,8 +1141,10 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) {
|
||||||
|
|
||||||
float d = a.distance_to(b);
|
float d = a.distance_to(b);
|
||||||
|
|
||||||
//if (d<margin)
|
/*
|
||||||
/// continue;
|
if (d<margin)
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
recover_motion+=(b-a)*0.4;
|
recover_motion+=(b-a)*0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -307,8 +307,10 @@ Rect2 TouchScreenButton::get_item_rect() const {
|
||||||
|
|
||||||
if (texture.is_null())
|
if (texture.is_null())
|
||||||
return Rect2(0,0,1,1);
|
return Rect2(0,0,1,1);
|
||||||
//if (texture.is_null())
|
/*
|
||||||
// return CanvasItem::get_item_rect();
|
if (texture.is_null())
|
||||||
|
return CanvasItem::get_item_rect();
|
||||||
|
*/
|
||||||
|
|
||||||
return Rect2(Size2(),texture->get_size());
|
return Rect2(Size2(),texture->get_size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,8 +255,10 @@ Rect2 Sprite::get_item_rect() const {
|
||||||
|
|
||||||
if (texture.is_null())
|
if (texture.is_null())
|
||||||
return Rect2(0,0,1,1);
|
return Rect2(0,0,1,1);
|
||||||
//if (texture.is_null())
|
/*
|
||||||
// return CanvasItem::get_item_rect();
|
if (texture.is_null())
|
||||||
|
return CanvasItem::get_item_rect();
|
||||||
|
*/
|
||||||
|
|
||||||
Size2i s;
|
Size2i s;
|
||||||
|
|
||||||
|
@ -510,8 +512,10 @@ Rect2 ViewportSprite::get_item_rect() const {
|
||||||
|
|
||||||
if (texture.is_null())
|
if (texture.is_null())
|
||||||
return Rect2(0,0,1,1);
|
return Rect2(0,0,1,1);
|
||||||
//if (texture.is_null())
|
/*
|
||||||
// return CanvasItem::get_item_rect();
|
if (texture.is_null())
|
||||||
|
return CanvasItem::get_item_rect();
|
||||||
|
*/
|
||||||
|
|
||||||
Size2i s;
|
Size2i s;
|
||||||
|
|
||||||
|
|
|
@ -849,8 +849,10 @@ void TileMap::_set_tile_data(const PoolVector<int>& p_data) {
|
||||||
bool transpose = v&(1<<31);
|
bool transpose = v&(1<<31);
|
||||||
v&=(1<<29)-1;
|
v&=(1<<29)-1;
|
||||||
|
|
||||||
// if (x<-20 || y <-20 || x>4000 || y>4000)
|
/*
|
||||||
// continue;
|
if (x<-20 || y <-20 || x>4000 || y>4000)
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
set_cell(x,y,v,flip_h,flip_v,transpose);
|
set_cell(x,y,v,flip_h,flip_v,transpose);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,8 +191,10 @@ void Camera::_update_camera() {
|
||||||
VisualServer::get_singleton()->camera_set_transform( camera, tr );
|
VisualServer::get_singleton()->camera_set_transform( camera, tr );
|
||||||
|
|
||||||
// here goes listener stuff
|
// here goes listener stuff
|
||||||
// if (viewport_ptr && is_inside_scene() && is_current())
|
/*
|
||||||
// get_viewport()->_camera_transform_changed_notify();
|
if (viewport_ptr && is_inside_scene() && is_current())
|
||||||
|
get_viewport()->_camera_transform_changed_notify();
|
||||||
|
*/
|
||||||
|
|
||||||
if (is_inside_tree() && is_current()) {
|
if (is_inside_tree() && is_current()) {
|
||||||
get_viewport()->_camera_transform_changed_notify();
|
get_viewport()->_camera_transform_changed_notify();
|
||||||
|
|
|
@ -1038,10 +1038,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) {
|
||||||
#if 0
|
#if 0
|
||||||
float d = a.distance_to(b);
|
float d = a.distance_to(b);
|
||||||
|
|
||||||
//if (d<margin)
|
/*
|
||||||
/// continue;
|
if (d<margin)
|
||||||
///
|
continue;
|
||||||
///
|
*/
|
||||||
recover_motion+=(b-a)*0.2;
|
recover_motion+=(b-a)*0.2;
|
||||||
#else
|
#else
|
||||||
float dist = a.distance_to(b);
|
float dist = a.distance_to(b);
|
||||||
|
@ -1159,8 +1159,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 motion=p_motion*safe;
|
Vector3 motion=p_motion*safe;
|
||||||
//if (colliding)
|
/*
|
||||||
// motion+=normal*0.001;
|
if (colliding)
|
||||||
|
motion+=normal*0.001;
|
||||||
|
*/
|
||||||
Transform gt = get_global_transform();
|
Transform gt = get_global_transform();
|
||||||
gt.origin+=motion;
|
gt.origin+=motion;
|
||||||
set_global_transform(gt);
|
set_global_transform(gt);
|
||||||
|
|
|
@ -95,8 +95,10 @@ void Spatial::_propagate_transform_changed(Spatial *p_origin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (data.dirty&DIRTY_GLOBAL)
|
/*
|
||||||
// return; //already dirty
|
if (data.dirty&DIRTY_GLOBAL)
|
||||||
|
return; //already dirty
|
||||||
|
*/
|
||||||
|
|
||||||
data.children_lock++;
|
data.children_lock++;
|
||||||
|
|
||||||
|
|
|
@ -153,10 +153,12 @@ void SpatialStreamPlayer::play(float p_from_offset) {
|
||||||
|
|
||||||
SpatialSoundServer::get_singleton()->source_set_audio_stream(get_source_rid(),&internal_stream);
|
SpatialSoundServer::get_singleton()->source_set_audio_stream(get_source_rid(),&internal_stream);
|
||||||
|
|
||||||
// AudioServer::get_singleton()->stream_set_active(stream_rid,true);
|
/*
|
||||||
// AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume);
|
AudioServer::get_singleton()->stream_set_active(stream_rid,true);
|
||||||
// if (stream->get_update_mode()!=AudioStream::UPDATE_NONE)
|
AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume);
|
||||||
// set_idle_process(true);
|
if (stream->get_update_mode()!=AudioStream::UPDATE_NONE)
|
||||||
|
set_idle_process(true);
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,8 +291,10 @@ bool SpatialStreamPlayer::has_autoplay() const {
|
||||||
void SpatialStreamPlayer::set_paused(bool p_paused) {
|
void SpatialStreamPlayer::set_paused(bool p_paused) {
|
||||||
|
|
||||||
paused=p_paused;
|
paused=p_paused;
|
||||||
//if (stream.is_valid())
|
/*
|
||||||
// stream->set_paused(p_paused);
|
if (stream.is_valid())
|
||||||
|
stream->set_paused(p_paused);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpatialStreamPlayer::is_paused() const {
|
bool SpatialStreamPlayer::is_paused() const {
|
||||||
|
|
|
@ -563,8 +563,10 @@ Rect2 Sprite3D::get_item_rect() const {
|
||||||
|
|
||||||
if (texture.is_null())
|
if (texture.is_null())
|
||||||
return Rect2(0,0,1,1);
|
return Rect2(0,0,1,1);
|
||||||
//if (texture.is_null())
|
/*
|
||||||
// return CanvasItem::get_item_rect();
|
if (texture.is_null())
|
||||||
|
return CanvasItem::get_item_rect();
|
||||||
|
*/
|
||||||
|
|
||||||
Size2i s;
|
Size2i s;
|
||||||
|
|
||||||
|
|
|
@ -340,10 +340,11 @@ void VehicleBody::_update_wheel_transform(VehicleWheel& wheel ,PhysicsDirectBody
|
||||||
wheel.m_raycastInfo.m_isInContact = false;
|
wheel.m_raycastInfo.m_isInContact = false;
|
||||||
|
|
||||||
Transform chassisTrans = s->get_transform();
|
Transform chassisTrans = s->get_transform();
|
||||||
//if (interpolatedTransform && (getRigidBody()->getMotionState()))
|
/*
|
||||||
//{
|
if (interpolatedTransform && (getRigidBody()->getMotionState())) {
|
||||||
// getRigidBody()->getMotionState()->getWorldTransform(chassisTrans);
|
getRigidBody()->getMotionState()->getWorldTransform(chassisTrans);
|
||||||
//}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
wheel.m_raycastInfo.m_hardPointWS = chassisTrans.xform( wheel.m_chassisConnectionPointCS );
|
wheel.m_raycastInfo.m_hardPointWS = chassisTrans.xform( wheel.m_chassisConnectionPointCS );
|
||||||
//wheel.m_raycastInfo.m_hardPointWS+=s->get_linear_velocity()*s->get_step();
|
//wheel.m_raycastInfo.m_hardPointWS+=s->get_linear_velocity()*s->get_step();
|
||||||
|
@ -371,8 +372,10 @@ void VehicleBody::_update_wheel(int p_idx,PhysicsDirectBodyState *s) {
|
||||||
|
|
||||||
Basis rotatingMat(right,-wheel.m_rotation);
|
Basis rotatingMat(right,-wheel.m_rotation);
|
||||||
|
|
||||||
// if (p_idx==1)
|
/*
|
||||||
// print_line("steeringMat " +steeringMat);
|
if (p_idx==1)
|
||||||
|
print_line("steeringMat " +steeringMat);
|
||||||
|
*/
|
||||||
|
|
||||||
Basis basis2(
|
Basis basis2(
|
||||||
right[0],up[0],fwd[0],
|
right[0],up[0],fwd[0],
|
||||||
|
|
|
@ -426,8 +426,10 @@ void AnimationPlayer::_animation_process_animation(AnimationData* p_anim,float p
|
||||||
|
|
||||||
Variant value=a->value_track_interpolate(i,p_time);
|
Variant value=a->value_track_interpolate(i,p_time);
|
||||||
//thanks to trigger mode, this should be solved now..
|
//thanks to trigger mode, this should be solved now..
|
||||||
//if (p_delta==0 && value.get_type()==Variant::STRING)
|
/*
|
||||||
// continue; // doing this with strings is messy, should find another way
|
if (p_delta==0 && value.get_type()==Variant::STRING)
|
||||||
|
continue; // doing this with strings is messy, should find another way
|
||||||
|
*/
|
||||||
if (pa->accum_pass!=accum_pass) {
|
if (pa->accum_pass!=accum_pass) {
|
||||||
ERR_CONTINUE( cache_update_prop_size >= NODE_CACHE_UPDATE_MAX );
|
ERR_CONTINUE( cache_update_prop_size >= NODE_CACHE_UPDATE_MAX );
|
||||||
cache_update_prop[cache_update_prop_size++]=pa;
|
cache_update_prop[cache_update_prop_size++]=pa;
|
||||||
|
|
|
@ -167,8 +167,10 @@ void StreamPlayer::play(float p_from_offset) {
|
||||||
sp_update();
|
sp_update();
|
||||||
AudioServer::get_singleton()->stream_set_active(stream_rid,true);
|
AudioServer::get_singleton()->stream_set_active(stream_rid,true);
|
||||||
AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume);
|
AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume);
|
||||||
// if (stream->get_update_mode()!=AudioStream::UPDATE_NONE)
|
/*
|
||||||
// set_idle_process(true);
|
if (stream->get_update_mode()!=AudioStream::UPDATE_NONE)
|
||||||
|
set_idle_process(true);
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,8 +307,10 @@ bool StreamPlayer::has_autoplay() const {
|
||||||
void StreamPlayer::set_paused(bool p_paused) {
|
void StreamPlayer::set_paused(bool p_paused) {
|
||||||
|
|
||||||
paused=p_paused;
|
paused=p_paused;
|
||||||
//if (stream.is_valid())
|
/*
|
||||||
// stream->set_paused(p_paused);
|
if (stream.is_valid())
|
||||||
|
stream->set_paused(p_paused);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StreamPlayer::is_paused() const {
|
bool StreamPlayer::is_paused() const {
|
||||||
|
|
|
@ -468,10 +468,12 @@ void Control::_notification(int p_notification) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//if (data.theme.is_null() && data.parent && data.parent->data.theme_owner) {
|
/*
|
||||||
// data.theme_owner=data.parent->data.theme_owner;
|
if (data.theme.is_null() && data.parent && data.parent->data.theme_owner) {
|
||||||
// notification(NOTIFICATION_THEME_CHANGED);
|
data.theme_owner=data.parent->data.theme_owner;
|
||||||
//}
|
notification(NOTIFICATION_THEME_CHANGED);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case NOTIFICATION_EXIT_CANVAS: {
|
case NOTIFICATION_EXIT_CANVAS: {
|
||||||
|
@ -503,10 +505,12 @@ void Control::_notification(int p_notification) {
|
||||||
|
|
||||||
data.parent=NULL;
|
data.parent=NULL;
|
||||||
data.parent_canvas_item=NULL;
|
data.parent_canvas_item=NULL;
|
||||||
//if (data.theme_owner && data.theme.is_null()) {
|
/*
|
||||||
// data.theme_owner=NULL;
|
if (data.theme_owner && data.theme.is_null()) {
|
||||||
//notification(NOTIFICATION_THEME_CHANGED);
|
data.theme_owner=NULL;
|
||||||
//}
|
notification(NOTIFICATION_THEME_CHANGED);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case NOTIFICATION_MOVED_IN_PARENT: {
|
case NOTIFICATION_MOVED_IN_PARENT: {
|
||||||
|
|
|
@ -96,8 +96,6 @@ void LineEdit::_gui_input(InputEvent p_event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!editable)
|
|
||||||
// non_editable_clicked_signal.call();
|
|
||||||
update();
|
update();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -98,8 +98,10 @@ void NinePatchRect::set_texture(const Ref<Texture>& p_tex) {
|
||||||
return;
|
return;
|
||||||
texture=p_tex;
|
texture=p_tex;
|
||||||
update();
|
update();
|
||||||
//if (texture.is_valid())
|
/*
|
||||||
// texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites
|
if (texture.is_valid())
|
||||||
|
texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites
|
||||||
|
*/
|
||||||
minimum_size_changed();
|
minimum_size_changed();
|
||||||
emit_signal("texture_changed");
|
emit_signal("texture_changed");
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,9 +51,11 @@ void ScrollBar::_gui_input(InputEvent p_event) {
|
||||||
|
|
||||||
if (b.button_index==5 && b.pressed) {
|
if (b.button_index==5 && b.pressed) {
|
||||||
|
|
||||||
//if (orientation==VERTICAL)
|
/*
|
||||||
// set_val( get_val() + get_page() / 4.0 );
|
if (orientation==VERTICAL)
|
||||||
//else
|
set_val( get_val() + get_page() / 4.0 );
|
||||||
|
else
|
||||||
|
*/
|
||||||
set_value( get_value() + get_page() / 4.0 );
|
set_value( get_value() + get_page() / 4.0 );
|
||||||
accept_event();
|
accept_event();
|
||||||
|
|
||||||
|
@ -61,9 +63,11 @@ void ScrollBar::_gui_input(InputEvent p_event) {
|
||||||
|
|
||||||
if (b.button_index==4 && b.pressed) {
|
if (b.button_index==4 && b.pressed) {
|
||||||
|
|
||||||
//if (orientation==HORIZONTAL)
|
/*
|
||||||
// set_val( get_val() - get_page() / 4.0 );
|
if (orientation==HORIZONTAL)
|
||||||
//else
|
set_val( get_val() - get_page() / 4.0 );
|
||||||
|
else
|
||||||
|
*/
|
||||||
set_value( get_value() - get_page() / 4.0 );
|
set_value( get_value() - get_page() / 4.0 );
|
||||||
accept_event();
|
accept_event();
|
||||||
}
|
}
|
||||||
|
@ -425,8 +429,10 @@ double ScrollBar::get_grabber_size() const {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
float page = (get_page()>0)? get_page() : 0;
|
float page = (get_page()>0)? get_page() : 0;
|
||||||
// if (grabber_range < get_step())
|
/*
|
||||||
// grabber_range=get_step();
|
if (grabber_range < get_step())
|
||||||
|
grabber_range=get_step();
|
||||||
|
*/
|
||||||
|
|
||||||
double area_size=get_area_size();
|
double area_size=get_area_size();
|
||||||
double grabber_size = page / range * area_size;
|
double grabber_size = page / range * area_size;
|
||||||
|
@ -620,12 +626,16 @@ void ScrollBar::_drag_slave_input(const InputEvent& p_input) {
|
||||||
|
|
||||||
if (orientation==HORIZONTAL)
|
if (orientation==HORIZONTAL)
|
||||||
set_value(diff.x);
|
set_value(diff.x);
|
||||||
//else
|
/*
|
||||||
// drag_slave_accum.x=0;
|
else
|
||||||
|
drag_slave_accum.x=0;
|
||||||
|
*/
|
||||||
if (orientation==VERTICAL)
|
if (orientation==VERTICAL)
|
||||||
set_value(diff.y);
|
set_value(diff.y);
|
||||||
//else
|
/*
|
||||||
// drag_slave_accum.y=0;
|
else
|
||||||
|
drag_slave_accum.y=0;
|
||||||
|
*/
|
||||||
time_since_motion=0;
|
time_since_motion=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,8 +164,10 @@ void Slider::_notification(int p_what) {
|
||||||
if (orientation==VERTICAL) {
|
if (orientation==VERTICAL) {
|
||||||
|
|
||||||
style->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height)));
|
style->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height)));
|
||||||
//if (mouse_inside||has_focus())
|
/*
|
||||||
// focus->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height)));
|
if (mouse_inside||has_focus())
|
||||||
|
focus->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height)));
|
||||||
|
*/
|
||||||
float areasize = size.height - grabber->get_size().height;
|
float areasize = size.height - grabber->get_size().height;
|
||||||
if (ticks>1) {
|
if (ticks>1) {
|
||||||
int tickarea = size.height - tick->get_height();
|
int tickarea = size.height - tick->get_height();
|
||||||
|
@ -179,8 +181,10 @@ void Slider::_notification(int p_what) {
|
||||||
grabber->draw(ci,Point2i(size.width/2-grabber->get_size().width/2,size.height - get_as_ratio()*areasize - grabber->get_size().height));
|
grabber->draw(ci,Point2i(size.width/2-grabber->get_size().width/2,size.height - get_as_ratio()*areasize - grabber->get_size().height));
|
||||||
} else {
|
} else {
|
||||||
style->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height)));
|
style->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height)));
|
||||||
//if (mouse_inside||has_focus())
|
/*
|
||||||
// focus->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height)));
|
if (mouse_inside||has_focus())
|
||||||
|
focus->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height)));
|
||||||
|
*/
|
||||||
|
|
||||||
float areasize = size.width - grabber->get_size().width;
|
float areasize = size.width - grabber->get_size().width;
|
||||||
if (ticks>1) {
|
if (ticks>1) {
|
||||||
|
|
|
@ -49,8 +49,10 @@ void SpinBox::_value_changed(double) {
|
||||||
|
|
||||||
void SpinBox::_text_entered(const String& p_string) {
|
void SpinBox::_text_entered(const String& p_string) {
|
||||||
|
|
||||||
//if (!p_string.is_numeric())
|
/*
|
||||||
// return;
|
if (!p_string.is_numeric())
|
||||||
|
return;
|
||||||
|
*/
|
||||||
String value = p_string;
|
String value = p_string;
|
||||||
if (prefix!="" && p_string.begins_with(prefix))
|
if (prefix!="" && p_string.begins_with(prefix))
|
||||||
value = p_string.substr(prefix.length(), p_string.length()-prefix.length());
|
value = p_string.substr(prefix.length(), p_string.length()-prefix.length());
|
||||||
|
|
|
@ -121,8 +121,10 @@ void TextureRect::set_texture(const Ref<Texture>& p_tex) {
|
||||||
|
|
||||||
texture=p_tex;
|
texture=p_tex;
|
||||||
update();
|
update();
|
||||||
//if (texture.is_valid())
|
/*
|
||||||
// texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites
|
if (texture.is_valid())
|
||||||
|
texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites
|
||||||
|
*/
|
||||||
minimum_size_changed();
|
minimum_size_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -949,8 +949,10 @@ void Tree::draw_item_rect(const TreeItem::Cell& p_cell,const Rect2i& p_rect,cons
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (p_tool)
|
/*
|
||||||
// rect.size.x-=Math::floor(rect.size.y/2);
|
if (p_tool)
|
||||||
|
rect.size.x-=Math::floor(rect.size.y/2);
|
||||||
|
*/
|
||||||
|
|
||||||
Ref<Font> font = cache.font;
|
Ref<Font> font = cache.font;
|
||||||
|
|
||||||
|
@ -1414,8 +1416,10 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c
|
||||||
emit_signal("item_selected");
|
emit_signal("item_selected");
|
||||||
emitted_row=true;
|
emitted_row=true;
|
||||||
}
|
}
|
||||||
//if (p_col==i)
|
/*
|
||||||
// p_current->selected_signal.call(p_col);
|
if (p_col==i)
|
||||||
|
p_current->selected_signal.call(p_col);
|
||||||
|
*/
|
||||||
|
|
||||||
} else if (c.selected) {
|
} else if (c.selected) {
|
||||||
|
|
||||||
|
@ -1672,9 +1676,11 @@ int Tree::propagate_mouse_event(const Point2i &p_pos,int x_ofs,int y_ofs,bool p_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (!c.selected && select_mode==SELECT_MULTI) {
|
/*
|
||||||
// emit_signal("multi_selected",p_item,col,true);
|
if (!c.selected && select_mode==SELECT_MULTI) {
|
||||||
//}
|
emit_signal("multi_selected",p_item,col,true);
|
||||||
|
}
|
||||||
|
*/
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2787,13 +2793,10 @@ void Tree::_notification(int p_what) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int ofs=0;
|
int ofs=0;
|
||||||
// int from_y=exposed.pos.y+bg->get_margin(MARGIN_TOP);
|
|
||||||
// int size_y=exposed.size.height-bg->get_minimum_size().height;
|
|
||||||
|
|
||||||
for (int i=0;i<(columns.size()-1-1);i++) {
|
for (int i=0;i<(columns.size()-1-1);i++) {
|
||||||
|
|
||||||
ofs+=get_column_width(i);
|
ofs+=get_column_width(i);
|
||||||
//get_painter()->draw_fill_rect( Point2(ofs+cache.hseparation/2, from_y), Size2( 1, size_y ),color( COLOR_TREE_GRID) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show_column_titles) {
|
if (show_column_titles) {
|
||||||
|
@ -3016,8 +3019,10 @@ int Tree::get_edited_column() const {
|
||||||
|
|
||||||
TreeItem* Tree::get_next_selected( TreeItem* p_item) {
|
TreeItem* Tree::get_next_selected( TreeItem* p_item) {
|
||||||
|
|
||||||
//if (!p_item)
|
/*
|
||||||
// return NULL;
|
if (!p_item)
|
||||||
|
return NULL;
|
||||||
|
*/
|
||||||
if (!root)
|
if (!root)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
|
@ -455,16 +455,17 @@ void SceneTree::input_event( const InputEvent& p_event ) {
|
||||||
|
|
||||||
//call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"input","_input",ev);
|
//call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"input","_input",ev);
|
||||||
|
|
||||||
/*if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F12) {
|
/*
|
||||||
|
if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F12) {
|
||||||
|
|
||||||
print_line("RAM: "+itos(Memory::get_static_mem_usage()));
|
print_line("RAM: "+itos(Memory::get_static_mem_usage()));
|
||||||
print_line("DRAM: "+itos(Memory::get_dynamic_mem_usage()));
|
print_line("DRAM: "+itos(Memory::get_dynamic_mem_usage()));
|
||||||
}
|
}
|
||||||
*/
|
if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F11) {
|
||||||
//if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F11) {
|
|
||||||
|
|
||||||
// Memory::dump_static_mem_to_file("memdump.txt");
|
Memory::dump_static_mem_to_file("memdump.txt");
|
||||||
//}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//transform for the rest
|
//transform for the rest
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -462,8 +462,10 @@ void Viewport::_notification(int p_what) {
|
||||||
if (world_2d.is_valid())
|
if (world_2d.is_valid())
|
||||||
world_2d->_remove_viewport(this);
|
world_2d->_remove_viewport(this);
|
||||||
|
|
||||||
//if (!render_target)
|
/*
|
||||||
// _vp_exit_tree();
|
if (!render_target)
|
||||||
|
_vp_exit_tree();
|
||||||
|
*/
|
||||||
|
|
||||||
VisualServer::get_singleton()->viewport_set_scenario(viewport,RID());
|
VisualServer::get_singleton()->viewport_set_scenario(viewport,RID());
|
||||||
SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID());
|
SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID());
|
||||||
|
@ -1399,9 +1401,11 @@ Transform2D Viewport::_get_input_pre_xform() const {
|
||||||
|
|
||||||
Vector2 Viewport::_get_window_offset() const {
|
Vector2 Viewport::_get_window_offset() const {
|
||||||
|
|
||||||
// if (parent_control) {
|
/*
|
||||||
// return (parent_control->get_viewport()->get_final_transform() * parent_control->get_global_transform_with_canvas()).get_origin();
|
if (parent_control) {
|
||||||
// }
|
return (parent_control->get_viewport()->get_final_transform() * parent_control->get_global_transform_with_canvas()).get_origin();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return Vector2();
|
return Vector2();
|
||||||
}
|
}
|
||||||
|
@ -1521,8 +1525,10 @@ void Viewport::_vp_unhandled_input(const InputEvent& p_ev) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if (parent_control && !parent_control->is_visible_in_tree())
|
/*
|
||||||
// return;
|
if (parent_control && !parent_control->is_visible_in_tree())
|
||||||
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
if (to_screen_rect==Rect2())
|
if (to_screen_rect==Rect2())
|
||||||
return; //if render target, can't get input events
|
return; //if render target, can't get input events
|
||||||
|
@ -1798,9 +1804,11 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//?
|
//?
|
||||||
// if (!is_visible()) {
|
/*
|
||||||
// return; //simple and plain
|
if (!is_visible()) {
|
||||||
// }
|
return; //simple and plain
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
switch(p_event.type) {
|
switch(p_event.type) {
|
||||||
|
@ -1849,10 +1857,10 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
||||||
|
|
||||||
//Matrix32 parent_xform;
|
//Matrix32 parent_xform;
|
||||||
|
|
||||||
//if (data.parent_canvas_item)
|
/*
|
||||||
// parent_xform=data.parent_canvas_item->get_global_transform();
|
if (data.parent_canvas_item)
|
||||||
|
parent_xform=data.parent_canvas_item->get_global_transform();
|
||||||
|
*/
|
||||||
|
|
||||||
gui.mouse_focus = _gui_find_control(pos);
|
gui.mouse_focus = _gui_find_control(pos);
|
||||||
//print_line("has mf "+itos(gui.mouse_focus!=NULL));
|
//print_line("has mf "+itos(gui.mouse_focus!=NULL));
|
||||||
|
|
|
@ -2005,11 +2005,6 @@ void Animation::_transform_track_optimize(int p_idx,float p_alowed_linear_err,fl
|
||||||
prev_erased=false;
|
prev_erased=false;
|
||||||
norm=Vector3();
|
norm=Vector3();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// print_line(itos(i)+" could be eliminated: "+rtos(tr));
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -252,8 +252,10 @@ Error BitmapFont::create_from_fnt(const String& p_string) {
|
||||||
|
|
||||||
if (keys.has("face"))
|
if (keys.has("face"))
|
||||||
set_name(keys["face"]);
|
set_name(keys["face"]);
|
||||||
//if (keys.has("size"))
|
/*
|
||||||
// font->set_height(keys["size"].to_int());
|
if (keys.has("size"))
|
||||||
|
font->set_height(keys["size"].to_int());
|
||||||
|
*/
|
||||||
|
|
||||||
} else if (type=="common") {
|
} else if (type=="common") {
|
||||||
|
|
||||||
|
|
|
@ -529,9 +529,11 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
|
||||||
|
|
||||||
bool isdefault = ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && value.is_zero()) || ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && value.is_one());
|
bool isdefault = ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && value.is_zero()) || ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && value.is_one());
|
||||||
|
|
||||||
// if (nd.instance<0 && ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && value.is_zero()) || ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && value.is_one())) {
|
/*
|
||||||
// continue;
|
if (nd.instance<0 && ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && value.is_zero()) || ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && value.is_one())) {
|
||||||
// }
|
continue;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -614,8 +616,10 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
|
||||||
|
|
||||||
if (!gi.persistent)
|
if (!gi.persistent)
|
||||||
continue;
|
continue;
|
||||||
// if (instance_state_node>=0 && instance_state->is_node_in_group(instance_state_node,gi.name))
|
/*
|
||||||
// continue; //group was instanced, don't add here
|
if (instance_state_node>=0 && instance_state->is_node_in_group(instance_state_node,gi.name))
|
||||||
|
continue; //group was instanced, don't add here
|
||||||
|
*/
|
||||||
|
|
||||||
bool skip=false;
|
bool skip=false;
|
||||||
for (List<PackState>::Element *F=pack_state_stack.front();F;F=F->next()) {
|
for (List<PackState>::Element *F=pack_state_stack.front();F;F=F->next()) {
|
||||||
|
|
|
@ -1208,10 +1208,12 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re
|
||||||
if (packed_scene.is_null())
|
if (packed_scene.is_null())
|
||||||
title+="type=\""+p_resource->get_class()+"\" ";
|
title+="type=\""+p_resource->get_class()+"\" ";
|
||||||
int load_steps=saved_resources.size()+external_resources.size();
|
int load_steps=saved_resources.size()+external_resources.size();
|
||||||
//if (packed_scene.is_valid()) {
|
/*
|
||||||
// load_steps+=packed_scene->get_node_count();
|
if (packed_scene.is_valid()) {
|
||||||
//}
|
load_steps+=packed_scene->get_node_count();
|
||||||
|
}
|
||||||
//no, better to not use load steps from nodes, no point to that
|
//no, better to not use load steps from nodes, no point to that
|
||||||
|
*/
|
||||||
|
|
||||||
if (load_steps>1) {
|
if (load_steps>1) {
|
||||||
title+="load_steps="+itos(load_steps)+" ";
|
title+="load_steps="+itos(load_steps)+" ";
|
||||||
|
|
|
@ -650,9 +650,11 @@ void SurfaceTool::append_from(const Ref<Mesh>& p_existing, int p_surface,const T
|
||||||
for(List<int>::Element *E=nindices.front();E;E=E->next()) {
|
for(List<int>::Element *E=nindices.front();E;E=E->next()) {
|
||||||
|
|
||||||
int dst_index = E->get()+vfrom;
|
int dst_index = E->get()+vfrom;
|
||||||
//if (dst_index <0 || dst_index>=vertex_array.size()) {
|
/*
|
||||||
// print_line("invalid index!");
|
if (dst_index <0 || dst_index>=vertex_array.size()) {
|
||||||
//}
|
print_line("invalid index!");
|
||||||
|
}
|
||||||
|
*/
|
||||||
index_array.push_back(dst_index);
|
index_array.push_back(dst_index);
|
||||||
}
|
}
|
||||||
if (index_array.size()%3)
|
if (index_array.size()%3)
|
||||||
|
|
|
@ -265,7 +265,7 @@ bool ReverbSW::process(int *p_input,int *p_output,int p_frames,int p_stereo_stri
|
||||||
// p_input must point to a non-looping buffer.
|
// p_input must point to a non-looping buffer.
|
||||||
// BOTH p_input and p_output must be touched (use ClearModuleBuffer).
|
// BOTH p_input and p_output must be touched (use ClearModuleBuffer).
|
||||||
|
|
||||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>LOCAL MACROS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۲
|
// LOCAL MACROS
|
||||||
|
|
||||||
#undef LM_SETSRCOFFSET
|
#undef LM_SETSRCOFFSET
|
||||||
#define LM_SETSRCOFFSET(x) \
|
#define LM_SETSRCOFFSET(x) \
|
||||||
|
@ -296,14 +296,14 @@ MULSHIFT_S32 ( x, current_params->y, 15 )
|
||||||
#undef LM_REVERB
|
#undef LM_REVERB
|
||||||
#define LM_REVERB(x) reverb_buffer[ (x) + cSample ]
|
#define LM_REVERB(x) reverb_buffer[ (x) + cSample ]
|
||||||
|
|
||||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>LOCAL VARIABLES <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۲
|
// LOCAL VARIABLES
|
||||||
|
|
||||||
unsigned int Offset;
|
unsigned int Offset;
|
||||||
|
|
||||||
int lwl, lwr, rwl, rwr;
|
int lwl, lwr, rwl, rwr;
|
||||||
//unsigned char HZShift;
|
//unsigned char HZShift;
|
||||||
|
|
||||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CODE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۲
|
// CODE
|
||||||
|
|
||||||
|
|
||||||
lwl = state.lwl;
|
lwl = state.lwl;
|
||||||
|
|
|
@ -270,8 +270,10 @@ void BodySW::set_mode(PhysicsServer::BodyMode p_mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_update_inertia();
|
_update_inertia();
|
||||||
//if (get_space())
|
/*
|
||||||
// _update_queries();
|
if (get_space())
|
||||||
|
_update_queries();
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
PhysicsServer::BodyMode BodySW::get_mode() const {
|
PhysicsServer::BodyMode BodySW::get_mode() const {
|
||||||
|
@ -319,14 +321,18 @@ void BodySW::set_state(PhysicsServer::BodyState p_state, const Variant& p_varian
|
||||||
} break;
|
} break;
|
||||||
case PhysicsServer::BODY_STATE_LINEAR_VELOCITY: {
|
case PhysicsServer::BODY_STATE_LINEAR_VELOCITY: {
|
||||||
|
|
||||||
//if (mode==PhysicsServer::BODY_MODE_STATIC)
|
/*
|
||||||
// break;
|
if (mode==PhysicsServer::BODY_MODE_STATIC)
|
||||||
|
break;
|
||||||
|
*/
|
||||||
linear_velocity=p_variant;
|
linear_velocity=p_variant;
|
||||||
wakeup();
|
wakeup();
|
||||||
} break;
|
} break;
|
||||||
case PhysicsServer::BODY_STATE_ANGULAR_VELOCITY: {
|
case PhysicsServer::BODY_STATE_ANGULAR_VELOCITY: {
|
||||||
//if (mode!=PhysicsServer::BODY_MODE_RIGID)
|
/*
|
||||||
// break;
|
if (mode!=PhysicsServer::BODY_MODE_RIGID)
|
||||||
|
break;
|
||||||
|
*/
|
||||||
angular_velocity=p_variant;
|
angular_velocity=p_variant;
|
||||||
wakeup();
|
wakeup();
|
||||||
|
|
||||||
|
@ -400,11 +406,13 @@ void BodySW::set_space(SpaceSW *p_space){
|
||||||
_update_inertia();
|
_update_inertia();
|
||||||
if (active)
|
if (active)
|
||||||
get_space()->body_add_to_active_list(&active_list);
|
get_space()->body_add_to_active_list(&active_list);
|
||||||
// _update_queries();
|
/*
|
||||||
//if (is_active()) {
|
_update_queries();
|
||||||
// active=false;
|
if (is_active()) {
|
||||||
// set_active(true);
|
active=false;
|
||||||
//}
|
set_active(true);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -479,13 +487,17 @@ void BodySW::integrate_forces(real_t p_step) {
|
||||||
// If less than 0, override dampenings with that of the Body
|
// If less than 0, override dampenings with that of the Body
|
||||||
if (angular_damp>=0)
|
if (angular_damp>=0)
|
||||||
area_angular_damp=angular_damp;
|
area_angular_damp=angular_damp;
|
||||||
//else
|
/*
|
||||||
// area_angular_damp=damp_area->get_angular_damp();
|
else
|
||||||
|
area_angular_damp=damp_area->get_angular_damp();
|
||||||
|
*/
|
||||||
|
|
||||||
if (linear_damp>=0)
|
if (linear_damp>=0)
|
||||||
area_linear_damp=linear_damp;
|
area_linear_damp=linear_damp;
|
||||||
//else
|
/*
|
||||||
// area_linear_damp=damp_area->get_linear_damp();
|
else
|
||||||
|
area_linear_damp=damp_area->get_linear_damp();
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
Vector3 motion;
|
Vector3 motion;
|
||||||
|
@ -630,10 +642,10 @@ void BodySW::integrate_velocities(real_t p_step) {
|
||||||
|
|
||||||
_update_transform_dependant();
|
_update_transform_dependant();
|
||||||
|
|
||||||
//if (fi_callback) {
|
/*
|
||||||
|
if (fi_callback) {
|
||||||
// get_space()->body_add_to_state_query_list(&direct_state_query_list);
|
get_space()->body_add_to_state_query_list(&direct_state_query_list);
|
||||||
//
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -42,9 +42,11 @@ struct _CollectorCallback {
|
||||||
|
|
||||||
_FORCE_INLINE_ void call(const Vector3& p_point_A, const Vector3& p_point_B) {
|
_FORCE_INLINE_ void call(const Vector3& p_point_A, const Vector3& p_point_B) {
|
||||||
|
|
||||||
//if (normal.dot(p_point_A) >= normal.dot(p_point_B))
|
/*
|
||||||
// return;
|
if (normal.dot(p_point_A) >= normal.dot(p_point_B))
|
||||||
// print_line("** A: "+p_point_A+" B: "+p_point_B+" D: "+rtos(p_point_A.distance_to(p_point_B)));
|
return;
|
||||||
|
print_line("** A: "+p_point_A+" B: "+p_point_B+" D: "+rtos(p_point_A.distance_to(p_point_B)));
|
||||||
|
*/
|
||||||
|
|
||||||
if (swap)
|
if (swap)
|
||||||
callback(p_point_B,p_point_A,userdata);
|
callback(p_point_B,p_point_A,userdata);
|
||||||
|
@ -233,8 +235,10 @@ static void _generate_contacts_face_face(const Vector3 * p_points_A,int p_point_
|
||||||
for (int i=0;i<clipbuf_len;i++) {
|
for (int i=0;i<clipbuf_len;i++) {
|
||||||
|
|
||||||
float d = plane_B.distance_to(clipbuf_src[i]);
|
float d = plane_B.distance_to(clipbuf_src[i]);
|
||||||
//if (d>CMP_EPSILON)
|
/*
|
||||||
// continue;
|
if (d>CMP_EPSILON)
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
Vector3 closest_B=clipbuf_src[i] - plane_B.normal*d;
|
Vector3 closest_B=clipbuf_src[i] - plane_B.normal*d;
|
||||||
|
|
||||||
|
|
|
@ -50,10 +50,9 @@ real_t btGetMatrixElem(const Basis& mat, int index)
|
||||||
bool matrixToEulerXYZ(const Basis& mat,Vector3& xyz);
|
bool matrixToEulerXYZ(const Basis& mat,Vector3& xyz);
|
||||||
bool matrixToEulerXYZ(const Basis& mat,Vector3& xyz)
|
bool matrixToEulerXYZ(const Basis& mat,Vector3& xyz)
|
||||||
{
|
{
|
||||||
// // rot = cy*cz -cy*sz sy
|
// rot = cy*cz -cy*sz sy
|
||||||
// // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx
|
// cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx
|
||||||
// // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy
|
// -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy
|
||||||
//
|
|
||||||
|
|
||||||
if (btGetMatrixElem(mat,2) < real_t(1.0))
|
if (btGetMatrixElem(mat,2) < real_t(1.0))
|
||||||
{
|
{
|
||||||
|
@ -325,16 +324,18 @@ void Generic6DOFJointSW::calculateAngleInfo()
|
||||||
m_calculatedAxis[2] = axis0.cross(m_calculatedAxis[1]);
|
m_calculatedAxis[2] = axis0.cross(m_calculatedAxis[1]);
|
||||||
|
|
||||||
|
|
||||||
// if(m_debugDrawer)
|
/*
|
||||||
// {
|
if(m_debugDrawer)
|
||||||
//
|
{
|
||||||
// char buff[300];
|
|
||||||
// sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ",
|
char buff[300];
|
||||||
// m_calculatedAxisAngleDiff[0],
|
sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ",
|
||||||
// m_calculatedAxisAngleDiff[1],
|
m_calculatedAxisAngleDiff[0],
|
||||||
// m_calculatedAxisAngleDiff[2]);
|
m_calculatedAxisAngleDiff[1],
|
||||||
// m_debugDrawer->reportErrorWarning(buff);
|
m_calculatedAxisAngleDiff[2]);
|
||||||
// }
|
m_debugDrawer->reportErrorWarning(buff);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1395,11 +1395,13 @@ void PhysicsServerSW::free(RID p_rid) {
|
||||||
|
|
||||||
BodySW *body = body_owner.get(p_rid);
|
BodySW *body = body_owner.get(p_rid);
|
||||||
|
|
||||||
// if (body->get_state_query())
|
/*
|
||||||
// _clear_query(body->get_state_query());
|
if (body->get_state_query())
|
||||||
|
_clear_query(body->get_state_query());
|
||||||
|
|
||||||
// if (body->get_direct_state_query())
|
if (body->get_direct_state_query())
|
||||||
// _clear_query(body->get_direct_state_query());
|
_clear_query(body->get_direct_state_query());
|
||||||
|
*/
|
||||||
|
|
||||||
body->set_space(NULL);
|
body->set_space(NULL);
|
||||||
|
|
||||||
|
@ -1422,8 +1424,10 @@ void PhysicsServerSW::free(RID p_rid) {
|
||||||
|
|
||||||
AreaSW *area = area_owner.get(p_rid);
|
AreaSW *area = area_owner.get(p_rid);
|
||||||
|
|
||||||
// if (area->get_monitor_query())
|
/*
|
||||||
// _clear_query(area->get_monitor_query());
|
if (area->get_monitor_query())
|
||||||
|
_clear_query(area->get_monitor_query());
|
||||||
|
*/
|
||||||
|
|
||||||
area->set_space(NULL);
|
area->set_space(NULL);
|
||||||
|
|
||||||
|
|
|
@ -1048,8 +1048,10 @@ void ConcavePolygonShapeSW::_cull_segment(int p_idx,_SegmentCullParams *p_params
|
||||||
const BVH *bvh=&p_params->bvh[p_idx];
|
const BVH *bvh=&p_params->bvh[p_idx];
|
||||||
|
|
||||||
|
|
||||||
//if (p_params->dir.dot(bvh->aabb.get_support(-p_params->dir))>p_params->min_d)
|
/*
|
||||||
// return; //test against whole AABB, which isn't very costly
|
if (p_params->dir.dot(bvh->aabb.get_support(-p_params->dir))>p_params->min_d)
|
||||||
|
return; //test against whole AABB, which isn't very costly
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//printf("addr: %p\n",bvh);
|
//printf("addr: %p\n",bvh);
|
||||||
|
|
|
@ -204,8 +204,10 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID& p_shape, const Transform&
|
||||||
aabb=aabb.merge(Rect3(aabb.pos+p_motion,aabb.size)); //motion
|
aabb=aabb.merge(Rect3(aabb.pos+p_motion,aabb.size)); //motion
|
||||||
aabb=aabb.grow(p_margin);
|
aabb=aabb.grow(p_margin);
|
||||||
|
|
||||||
//if (p_motion!=Vector3())
|
/*
|
||||||
// print_line(p_motion);
|
if (p_motion!=Vector3())
|
||||||
|
print_line(p_motion);
|
||||||
|
*/
|
||||||
|
|
||||||
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,SpaceSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
|
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,SpaceSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
|
||||||
|
|
||||||
|
|
|
@ -251,8 +251,10 @@ void Body2DSW::set_mode(Physics2DServer::BodyMode p_mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_update_inertia();
|
_update_inertia();
|
||||||
//if (get_space())
|
/*
|
||||||
// _update_queries();
|
if (get_space())
|
||||||
|
_update_queries();
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
Physics2DServer::BodyMode Body2DSW::get_mode() const {
|
Physics2DServer::BodyMode Body2DSW::get_mode() const {
|
||||||
|
@ -301,15 +303,19 @@ void Body2DSW::set_state(Physics2DServer::BodyState p_state, const Variant& p_va
|
||||||
} break;
|
} break;
|
||||||
case Physics2DServer::BODY_STATE_LINEAR_VELOCITY: {
|
case Physics2DServer::BODY_STATE_LINEAR_VELOCITY: {
|
||||||
|
|
||||||
//if (mode==Physics2DServer::BODY_MODE_STATIC)
|
/*
|
||||||
// break;
|
if (mode==Physics2DServer::BODY_MODE_STATIC)
|
||||||
|
break;
|
||||||
|
*/
|
||||||
linear_velocity=p_variant;
|
linear_velocity=p_variant;
|
||||||
wakeup();
|
wakeup();
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case Physics2DServer::BODY_STATE_ANGULAR_VELOCITY: {
|
case Physics2DServer::BODY_STATE_ANGULAR_VELOCITY: {
|
||||||
//if (mode!=Physics2DServer::BODY_MODE_RIGID)
|
/*
|
||||||
// break;
|
if (mode!=Physics2DServer::BODY_MODE_RIGID)
|
||||||
|
break;
|
||||||
|
*/
|
||||||
angular_velocity=p_variant;
|
angular_velocity=p_variant;
|
||||||
wakeup();
|
wakeup();
|
||||||
|
|
||||||
|
@ -385,11 +391,13 @@ void Body2DSW::set_space(Space2DSW *p_space){
|
||||||
_update_inertia();
|
_update_inertia();
|
||||||
if (active)
|
if (active)
|
||||||
get_space()->body_add_to_active_list(&active_list);
|
get_space()->body_add_to_active_list(&active_list);
|
||||||
// _update_queries();
|
/*
|
||||||
//if (is_active()) {
|
_update_queries();
|
||||||
// active=false;
|
if (is_active()) {
|
||||||
// set_active(true);
|
active=false;
|
||||||
//}
|
set_active(true);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,13 +467,17 @@ void Body2DSW::integrate_forces(real_t p_step) {
|
||||||
// If less than 0, override dampenings with that of the Body2D
|
// If less than 0, override dampenings with that of the Body2D
|
||||||
if (angular_damp>=0)
|
if (angular_damp>=0)
|
||||||
area_angular_damp = angular_damp;
|
area_angular_damp = angular_damp;
|
||||||
//else
|
/*
|
||||||
// area_angular_damp=damp_area->get_angular_damp();
|
else
|
||||||
|
area_angular_damp=damp_area->get_angular_damp();
|
||||||
|
*/
|
||||||
|
|
||||||
if (linear_damp>=0)
|
if (linear_damp>=0)
|
||||||
area_linear_damp = linear_damp;
|
area_linear_damp = linear_damp;
|
||||||
//else
|
/*
|
||||||
// area_linear_damp=damp_area->get_linear_damp();
|
else
|
||||||
|
area_linear_damp=damp_area->get_linear_damp();
|
||||||
|
*/
|
||||||
|
|
||||||
Vector2 motion;
|
Vector2 motion;
|
||||||
bool do_motion=false;
|
bool do_motion=false;
|
||||||
|
@ -482,10 +494,12 @@ void Body2DSW::integrate_forces(real_t p_step) {
|
||||||
|
|
||||||
do_motion=true;
|
do_motion=true;
|
||||||
|
|
||||||
//for(int i=0;i<get_shape_count();i++) {
|
/*
|
||||||
// set_shape_kinematic_advance(i,Vector2());
|
for(int i=0;i<get_shape_count();i++) {
|
||||||
// set_shape_kinematic_retreat(i,0);
|
set_shape_kinematic_advance(i,Vector2());
|
||||||
//}
|
set_shape_kinematic_retreat(i,0);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!omit_force_integration && !first_integration) {
|
if (!omit_force_integration && !first_integration) {
|
||||||
|
|
|
@ -599,8 +599,10 @@ int BroadPhase2DHashGrid::cull_segment(const Vector2& p_from, const Vector2& p_t
|
||||||
|
|
||||||
E->key()->pass=pass;
|
E->key()->pass=pass;
|
||||||
|
|
||||||
// if (use_aabb && !p_aabb.intersects(E->key()->aabb))
|
/*
|
||||||
// continue;
|
if (use_aabb && !p_aabb.intersects(E->key()->aabb))
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
if (!E->key()->aabb.intersects_segment(p_from,p_to))
|
if (!E->key()->aabb.intersects_segment(p_from,p_to))
|
||||||
continue;
|
continue;
|
||||||
|
@ -645,8 +647,10 @@ int BroadPhase2DHashGrid::cull_aabb(const Rect2& p_aabb,CollisionObject2DSW** p_
|
||||||
if (!p_aabb.intersects(E->key()->aabb))
|
if (!p_aabb.intersects(E->key()->aabb))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// if (!E->key()->aabb.intersects_segment(p_from,p_to))
|
/*
|
||||||
// continue;
|
if (!E->key()->aabb.intersects_segment(p_from,p_to))
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
p_results[cullcount]=E->key()->owner;
|
p_results[cullcount]=E->key()->owner;
|
||||||
p_result_indices[cullcount]=E->key()->subindex;
|
p_result_indices[cullcount]=E->key()->subindex;
|
||||||
|
|
|
@ -40,8 +40,10 @@ struct _CollectorCallback2D {
|
||||||
|
|
||||||
_FORCE_INLINE_ void call(const Vector2& p_point_A, const Vector2& p_point_B) {
|
_FORCE_INLINE_ void call(const Vector2& p_point_A, const Vector2& p_point_B) {
|
||||||
|
|
||||||
//if (normal.dot(p_point_A) >= normal.dot(p_point_B))
|
/*
|
||||||
// return;
|
if (normal.dot(p_point_A) >= normal.dot(p_point_B))
|
||||||
|
return;
|
||||||
|
*/
|
||||||
if (swap)
|
if (swap)
|
||||||
callback(p_point_B,p_point_A,userdata);
|
callback(p_point_B,p_point_A,userdata);
|
||||||
else
|
else
|
||||||
|
@ -610,8 +612,10 @@ static void _collision_segment_segment(const Shape2DSW* p_a,const Transform2D& p
|
||||||
//this collision is kind of pointless
|
//this collision is kind of pointless
|
||||||
|
|
||||||
|
|
||||||
//if (!separator.test_previous_axis())
|
/*
|
||||||
// return;
|
if (!separator.test_previous_axis())
|
||||||
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
if (!separator.test_cast())
|
if (!separator.test_cast())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -255,9 +255,11 @@ bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A,const Transform2D& p_
|
||||||
|
|
||||||
if (type_B==Physics2DServer::SHAPE_LINE || type_B==Physics2DServer::SHAPE_RAY) {
|
if (type_B==Physics2DServer::SHAPE_LINE || type_B==Physics2DServer::SHAPE_RAY) {
|
||||||
return false;
|
return false;
|
||||||
//if (type_B==Physics2DServer::SHAPE_RAY) {
|
|
||||||
// return false;
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
if (type_B==Physics2DServer::SHAPE_RAY) {
|
||||||
|
return false;
|
||||||
|
*/
|
||||||
|
|
||||||
if (swap) {
|
if (swap) {
|
||||||
return solve_static_line(p_shape_B,p_transform_B,p_shape_A,p_transform_A,p_result_callback,p_userdata,true);
|
return solve_static_line(p_shape_B,p_transform_B,p_shape_A,p_transform_A,p_result_callback,p_userdata,true);
|
||||||
|
|
|
@ -1176,11 +1176,13 @@ void Physics2DServerSW::free(RID p_rid) {
|
||||||
|
|
||||||
Body2DSW *body = body_owner.get(p_rid);
|
Body2DSW *body = body_owner.get(p_rid);
|
||||||
|
|
||||||
// if (body->get_state_query())
|
/*
|
||||||
// _clear_query(body->get_state_query());
|
if (body->get_state_query())
|
||||||
|
_clear_query(body->get_state_query());
|
||||||
|
|
||||||
// if (body->get_direct_state_query())
|
if (body->get_direct_state_query())
|
||||||
// _clear_query(body->get_direct_state_query());
|
_clear_query(body->get_direct_state_query());
|
||||||
|
*/
|
||||||
|
|
||||||
body->set_space(NULL);
|
body->set_space(NULL);
|
||||||
|
|
||||||
|
@ -1203,8 +1205,10 @@ void Physics2DServerSW::free(RID p_rid) {
|
||||||
|
|
||||||
Area2DSW *area = area_owner.get(p_rid);
|
Area2DSW *area = area_owner.get(p_rid);
|
||||||
|
|
||||||
// if (area->get_monitor_query())
|
/*
|
||||||
// _clear_query(area->get_monitor_query());
|
if (area->get_monitor_query())
|
||||||
|
_clear_query(area->get_monitor_query());
|
||||||
|
*/
|
||||||
|
|
||||||
area->set_space(NULL);
|
area->set_space(NULL);
|
||||||
|
|
||||||
|
|
|
@ -639,8 +639,10 @@ bool ConvexPolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vect
|
||||||
for(int i=0;i<point_count;i++) {
|
for(int i=0;i<point_count;i++) {
|
||||||
|
|
||||||
//hmm crap.. no can do..
|
//hmm crap.. no can do..
|
||||||
//if (d.dot(points[i].normal)>=0)
|
/*
|
||||||
// continue;
|
if (d.dot(points[i].normal)>=0)
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
Vector2 res;
|
Vector2 res;
|
||||||
|
@ -816,8 +818,10 @@ bool ConcavePolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vec
|
||||||
real_t d=1e10;
|
real_t d=1e10;
|
||||||
bool inters=false;
|
bool inters=false;
|
||||||
|
|
||||||
//for(int i=0;i<bvh_depth;i++)
|
/*
|
||||||
// stack[i]=0;
|
for(int i=0;i<bvh_depth;i++)
|
||||||
|
stack[i]=0;
|
||||||
|
*/
|
||||||
|
|
||||||
int level=0;
|
int level=0;
|
||||||
|
|
||||||
|
@ -1077,8 +1081,10 @@ void ConcavePolygonShape2DSW::cull(const Rect2& p_local_aabb,Callback p_callback
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//for(int i=0;i<bvh_depth;i++)
|
/*
|
||||||
// stack[i]=0;
|
for(int i=0;i<bvh_depth;i++)
|
||||||
|
stack[i]=0;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
int level=0;
|
int level=0;
|
||||||
|
|
|
@ -248,8 +248,10 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Transfor
|
||||||
aabb=aabb.merge(Rect2(aabb.pos+p_motion,aabb.size)); //motion
|
aabb=aabb.merge(Rect2(aabb.pos+p_motion,aabb.size)); //motion
|
||||||
aabb=aabb.grow(p_margin);
|
aabb=aabb.grow(p_margin);
|
||||||
|
|
||||||
//if (p_motion!=Vector2())
|
/*
|
||||||
// print_line(p_motion);
|
if (p_motion!=Vector2())
|
||||||
|
print_line(p_motion);
|
||||||
|
*/
|
||||||
|
|
||||||
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,Space2DSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
|
int amount = space->broadphase->cull_aabb(aabb,space->intersection_query_results,Space2DSW::INTERSECTION_QUERY_MAX,space->intersection_query_subindex_results);
|
||||||
|
|
||||||
|
@ -661,8 +663,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
|
||||||
const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
|
const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
|
||||||
|
|
||||||
Vector2 cdir = body->get_one_way_collision_direction();
|
Vector2 cdir = body->get_one_way_collision_direction();
|
||||||
//if (cdir!=Vector2() && p_motion.dot(cdir)<0)
|
/*
|
||||||
// continue;
|
if (cdir!=Vector2() && p_motion.dot(cdir)<0)
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
|
|
||||||
cbk.valid_dir=cdir;
|
cbk.valid_dir=cdir;
|
||||||
cbk.valid_depth=body->get_one_way_collision_max_depth();
|
cbk.valid_depth=body->get_one_way_collision_max_depth();
|
||||||
|
@ -698,11 +702,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
|
||||||
float traveled = n.dot(recover_motion);
|
float traveled = n.dot(recover_motion);
|
||||||
a+=n*traveled;
|
a+=n*traveled;
|
||||||
|
|
||||||
|
float d = a.distance_to(b);
|
||||||
|
if (d<margin)
|
||||||
|
continue;
|
||||||
#endif
|
#endif
|
||||||
// float d = a.distance_to(b);
|
|
||||||
|
|
||||||
//if (d<margin)
|
|
||||||
/// continue;
|
|
||||||
recover_motion+=(b-a)*0.4;
|
recover_motion+=(b-a)*0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -999,8 +1002,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
|
||||||
|
|
||||||
float d = a.distance_to(b);
|
float d = a.distance_to(b);
|
||||||
|
|
||||||
//if (d<margin)
|
/*
|
||||||
/// continue;
|
if (d<margin)
|
||||||
|
continue;
|
||||||
|
*/
|
||||||
recover_motion+=(b-a)*0.4;
|
recover_motion+=(b-a)*0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1188,9 +1188,11 @@ bool VisualServerCanvas::free(RID p_rid) {
|
||||||
canvas_item->child_items[i]->parent=RID();
|
canvas_item->child_items[i]->parent=RID();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (canvas_item->material) {
|
/*
|
||||||
// canvas_item->material->owners.erase(canvas_item);
|
if (canvas_item->material) {
|
||||||
// }
|
canvas_item->material->owners.erase(canvas_item);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
canvas_item_owner.free( p_rid );
|
canvas_item_owner.free( p_rid );
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,10 @@ void VisualServerRaster::free( RID p_rid ){
|
||||||
|
|
||||||
void VisualServerRaster::draw(){
|
void VisualServerRaster::draw(){
|
||||||
|
|
||||||
//if (changes)
|
/*
|
||||||
// print_line("changes: "+itos(changes));
|
if (changes)
|
||||||
|
print_line("changes: "+itos(changes));
|
||||||
|
*/
|
||||||
|
|
||||||
changes=0;
|
changes=0;
|
||||||
|
|
||||||
|
@ -3335,8 +3337,10 @@ void VisualServerRaster::_update_instance(Instance *p_instance) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// if (new_aabb==p_instance->data.transformed_aabb)
|
/*
|
||||||
// return;
|
if (new_aabb==p_instance->data.transformed_aabb)
|
||||||
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
p_instance->scenario->octree.move(p_instance->octree_id,new_aabb);
|
p_instance->scenario->octree.move(p_instance->octree_id,new_aabb);
|
||||||
}
|
}
|
||||||
|
@ -4746,8 +4750,10 @@ void VisualServerRaster::free( RID p_rid ) {
|
||||||
|
|
||||||
BakedLightSampler *baked_light_sampler = baked_light_sampler_owner.get(p_rid);
|
BakedLightSampler *baked_light_sampler = baked_light_sampler_owner.get(p_rid);
|
||||||
ERR_FAIL_COND(!baked_light_sampler);
|
ERR_FAIL_COND(!baked_light_sampler);
|
||||||
//if (baked_light->data.octree_texture.is_valid())
|
/*
|
||||||
// rasterizer->free(baked_light->data.octree_texture);
|
if (baked_light->data.octree_texture.is_valid())
|
||||||
|
rasterizer->free(baked_light->data.octree_texture);
|
||||||
|
*/
|
||||||
baked_light_sampler_owner.free(p_rid);
|
baked_light_sampler_owner.free(p_rid);
|
||||||
memdelete(baked_light_sampler);
|
memdelete(baked_light_sampler);
|
||||||
|
|
||||||
|
@ -7721,8 +7727,10 @@ void VisualServerRaster::sync() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualServerRaster::draw() {
|
void VisualServerRaster::draw() {
|
||||||
//if (changes)
|
/*
|
||||||
// print_line("changes: "+itos(changes));
|
if (changes)
|
||||||
|
print_line("changes: "+itos(changes));
|
||||||
|
*/
|
||||||
changes=0;
|
changes=0;
|
||||||
shadows_enabled=GLOBAL_DEF("render/shadows_enabled",true);
|
shadows_enabled=GLOBAL_DEF("render/shadows_enabled",true);
|
||||||
room_cull_enabled = GLOBAL_DEF("render/room_cull_enabled",true);
|
room_cull_enabled = GLOBAL_DEF("render/room_cull_enabled",true);
|
||||||
|
|
|
@ -1239,8 +1239,10 @@ void VisualServerScene::_update_instance(Instance *p_instance) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// if (new_aabb==p_instance->data.transformed_aabb)
|
/*
|
||||||
// return;
|
if (new_aabb==p_instance->data.transformed_aabb)
|
||||||
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
p_instance->scenario->octree.move(p_instance->octree_id,new_aabb);
|
p_instance->scenario->octree.move(p_instance->octree_id,new_aabb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -444,9 +444,11 @@ Vector<String> Collada::_read_string_array(XMLParser& parser) {
|
||||||
// parse String data
|
// parse String data
|
||||||
String str = parser.get_node_data();
|
String str = parser.get_node_data();
|
||||||
array=str.split_spaces();
|
array=str.split_spaces();
|
||||||
//for(int i=0;i<array.size();i++) {
|
/*
|
||||||
// print_line(itos(i)+": "+array[i]);
|
for(int i=0;i<array.size();i++) {
|
||||||
//}
|
print_line(itos(i)+": "+array[i]);
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END)
|
if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END)
|
||||||
|
@ -1367,8 +1369,11 @@ void Collada::_parse_skin_controller(XMLParser& parser,String p_id) {
|
||||||
|
|
||||||
skindata.weights=weights;
|
skindata.weights=weights;
|
||||||
|
|
||||||
}// else if (!parser.is_empty())
|
}
|
||||||
// parser.skip_section();
|
/*
|
||||||
|
else if (!parser.is_empty())
|
||||||
|
parser.skip_section();
|
||||||
|
*/
|
||||||
|
|
||||||
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name()=="skin")
|
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name()=="skin")
|
||||||
break;
|
break;
|
||||||
|
@ -1442,8 +1447,10 @@ void Collada::_parse_morph_controller(XMLParser& parser, String p_id) {
|
||||||
} else if (section=="Name_array" || section=="IDREF_array") {
|
} else if (section=="Name_array" || section=="IDREF_array") {
|
||||||
// create a new array and read it.
|
// create a new array and read it.
|
||||||
|
|
||||||
//if (section=="IDREF_array")
|
/*
|
||||||
// morphdata.use_idrefs=true;
|
if (section=="IDREF_array")
|
||||||
|
morphdata.use_idrefs=true;
|
||||||
|
*/
|
||||||
if (morphdata.sources.has(current_source)) {
|
if (morphdata.sources.has(current_source)) {
|
||||||
|
|
||||||
morphdata.sources[current_source].sarray = _read_string_array(parser);
|
morphdata.sources[current_source].sarray = _read_string_array(parser);
|
||||||
|
@ -1491,8 +1498,10 @@ void Collada::_parse_morph_controller(XMLParser& parser, String p_id) {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// else if (!parser.is_empty())
|
/*
|
||||||
// parser.skip_section();
|
else if (!parser.is_empty())
|
||||||
|
parser.skip_section();
|
||||||
|
*/
|
||||||
|
|
||||||
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name()=="morph")
|
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name()=="morph")
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -647,8 +647,10 @@ public:
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (animation->track_get_type(track)!=Animation::TYPE_METHOD)
|
/*
|
||||||
// p_list->push_back( PropertyInfo( Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING));
|
if (animation->track_get_type(track)!=Animation::TYPE_METHOD)
|
||||||
|
p_list->push_back( PropertyInfo( Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING));
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
UndoRedo *undo_redo;
|
UndoRedo *undo_redo;
|
||||||
|
@ -2641,8 +2643,10 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) {
|
||||||
for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
|
for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
|
||||||
|
|
||||||
float newpos=E->get().pos-from_t+motion;
|
float newpos=E->get().pos-from_t+motion;
|
||||||
//if (newpos<0)
|
/*
|
||||||
// continue; //no add at the begining
|
if (newpos<0)
|
||||||
|
continue; //no add at the begining
|
||||||
|
*/
|
||||||
undo_redo->add_do_method(animation.ptr(),"track_insert_key",E->key().track,newpos,animation->track_get_key_value(E->key().track,E->key().key),animation->track_get_key_transition(E->key().track,E->key().key));
|
undo_redo->add_do_method(animation.ptr(),"track_insert_key",E->key().track,newpos,animation->track_get_key_value(E->key().track,E->key().key),animation->track_get_key_transition(E->key().track,E->key().key));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2651,8 +2655,10 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) {
|
||||||
for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
|
for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
|
||||||
|
|
||||||
float newpos=E->get().pos+-from_t+motion;
|
float newpos=E->get().pos+-from_t+motion;
|
||||||
//if (newpos<0)
|
/*
|
||||||
// continue; //no remove what no inserted
|
if (newpos<0)
|
||||||
|
continue; //no remove what no inserted
|
||||||
|
*/
|
||||||
undo_redo->add_undo_method(animation.ptr(),"track_remove_key_at_pos",E->key().track,newpos);
|
undo_redo->add_undo_method(animation.ptr(),"track_remove_key_at_pos",E->key().track,newpos);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -524,8 +524,10 @@ void EditorData::remove_scene(int p_idx){
|
||||||
|
|
||||||
bool EditorData::_find_updated_instances(Node* p_root,Node *p_node,Set<String> &checked_paths) {
|
bool EditorData::_find_updated_instances(Node* p_root,Node *p_node,Set<String> &checked_paths) {
|
||||||
|
|
||||||
// if (p_root!=p_node && p_node->get_owner()!=p_root && !p_root->is_editable_instance(p_node->get_owner()))
|
/*
|
||||||
// return false;
|
if (p_root!=p_node && p_node->get_owner()!=p_root && !p_root->is_editable_instance(p_node->get_owner()))
|
||||||
|
return false;
|
||||||
|
*/
|
||||||
|
|
||||||
Ref<SceneState> ss;
|
Ref<SceneState> ss;
|
||||||
|
|
||||||
|
|
|
@ -713,8 +713,10 @@ void EditorFileDialog::update_file_list() {
|
||||||
|
|
||||||
}
|
}
|
||||||
// ??
|
// ??
|
||||||
//if (tree->get_root() && tree->get_root()->get_children())
|
/*
|
||||||
// tree->get_root()->get_children()->select(0);
|
if (tree->get_root() && tree->get_root()->get_children())
|
||||||
|
tree->get_root()->get_children()->select(0);
|
||||||
|
*/
|
||||||
|
|
||||||
files.clear();
|
files.clear();
|
||||||
|
|
||||||
|
|
|
@ -349,8 +349,10 @@ void EditorHelpIndex::add_type(const String& p_type,HashMap<String,TreeItem*>& p
|
||||||
|
|
||||||
if (p_types.has(p_type))
|
if (p_types.has(p_type))
|
||||||
return;
|
return;
|
||||||
// if (!ClassDB::is_type(p_type,base) || p_type==base)
|
/*
|
||||||
// return;
|
if (!ClassDB::is_type(p_type,base) || p_type==base)
|
||||||
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
String inherits=EditorHelp::get_doc_data()->class_list[p_type].inherits;
|
String inherits=EditorHelp::get_doc_data()->class_list[p_type].inherits;
|
||||||
|
|
||||||
|
@ -1872,7 +1874,6 @@ void EditorHelpBit::_go_to_help(String p_what) {
|
||||||
|
|
||||||
void EditorHelpBit::_meta_clicked(String p_select) {
|
void EditorHelpBit::_meta_clicked(String p_select) {
|
||||||
|
|
||||||
|
|
||||||
//print_line("LINK: "+p_select);
|
//print_line("LINK: "+p_select);
|
||||||
if (p_select.begins_with("#")) {
|
if (p_select.begins_with("#")) {
|
||||||
//_goto_desc(p_select.substr(1,p_select.length()));
|
//_goto_desc(p_select.substr(1,p_select.length()));
|
||||||
|
@ -1887,10 +1888,11 @@ void EditorHelpBit::_meta_clicked(String p_select) {
|
||||||
|
|
||||||
_go_to_help("class_method:"+m.get_slice(".",0)+":"+m.get_slice(".",0));
|
_go_to_help("class_method:"+m.get_slice(".",0)+":"+m.get_slice(".",0));
|
||||||
} else {
|
} else {
|
||||||
//
|
/*
|
||||||
// if (!method_line.has(m))
|
if (!method_line.has(m))
|
||||||
// return;
|
return;
|
||||||
//class_desc->scroll_to_line(method_line[m]);
|
class_desc->scroll_to_line(method_line[m]);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,11 +420,12 @@ Vector<StringName> EditorExportPlatform::get_dependencies(bool p_bundles) const
|
||||||
{
|
{
|
||||||
|
|
||||||
List<String> l;
|
List<String> l;
|
||||||
// SceneLoader::get_recognized_extensions(&l);
|
/*
|
||||||
// for(List<String>::Element *E=l.front();E;E=E->next()) {
|
SceneLoader::get_recognized_extensions(&l);
|
||||||
//
|
for(List<String>::Element *E=l.front();E;E=E->next()) {
|
||||||
// scene_extensions.insert(E->get());
|
scene_extensions.insert(E->get());
|
||||||
// }
|
}
|
||||||
|
*/
|
||||||
ResourceLoader::get_recognized_extensions_for_type("",&l);
|
ResourceLoader::get_recognized_extensions_for_type("",&l);
|
||||||
for(List<String>::Element *E=l.front();E;E=E->next()) {
|
for(List<String>::Element *E=l.front();E;E=E->next()) {
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,10 @@ void EditorLog::_error_handler(void *p_self, const char*p_func, const char*p_fil
|
||||||
err_str=String(p_file)+":"+itos(p_line)+" - "+String(p_error);
|
err_str=String(p_file)+":"+itos(p_line)+" - "+String(p_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!self->is_visible_in_tree())
|
/*
|
||||||
// self->emit_signal("show_request");
|
if (!self->is_visible_in_tree())
|
||||||
|
self->emit_signal("show_request");
|
||||||
|
*/
|
||||||
|
|
||||||
err_str=" "+err_str;
|
err_str=" "+err_str;
|
||||||
self->log->add_newline();
|
self->log->add_newline();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue